Skip to content

Commit b7a6ee7

Browse files
committed
Merge branch 'HEAD' of https://code.google.com/p/cefpython/
2 parents 9eca634 + 85bd85f commit b7a6ee7

File tree

11 files changed

+1891
-26
lines changed

11 files changed

+1891
-26
lines changed

cefpython/cef3/linux/compile.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,8 @@
7777
sys.exit(1)
7878
subprocess_exe = "./../linux/binaries_%s/subprocess" % (BITS)
7979
if os.path.exists("./subprocess"):
80-
shutil.copyfile("./subprocess", subprocess_exe)
81-
st = os.stat(subprocess_exe)
82-
os.chmod(subprocess_exe, st.st_mode | stat.S_IEXEC)
80+
# .copy() will also copy Permission bits
81+
shutil.copy("./subprocess", subprocess_exe)
8382

8483
# os.chdir("./../v8function_handler/")
8584
# ret = subprocess.call("make -f Makefile", shell=True)
@@ -134,7 +133,7 @@
134133
if os.path.exists(pyxfile):
135134
os.remove(pyxfile)
136135

137-
if ret != 0:
136+
if ret != 0:
138137
sys.exit("ERROR")
139138

140139
if DEBUG:
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
/* http://prismjs.com/download.html?themes=prism&languages=clike+javascript+python */
2+
/**
3+
* prism.js default theme for JavaScript, CSS and HTML
4+
* Based on dabblet (http://dabblet.com)
5+
* @author Lea Verou
6+
*/
7+
8+
code[class*="language-"],
9+
pre[class*="language-"] {
10+
color: black;
11+
text-shadow: 0 1px white;
12+
font-family: Consolas, Monaco, 'Andale Mono', monospace;
13+
direction: ltr;
14+
text-align: left;
15+
white-space: pre;
16+
word-spacing: normal;
17+
word-break: normal;
18+
19+
20+
-moz-tab-size: 4;
21+
-o-tab-size: 4;
22+
tab-size: 4;
23+
24+
-webkit-hyphens: none;
25+
-moz-hyphens: none;
26+
-ms-hyphens: none;
27+
hyphens: none;
28+
}
29+
30+
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
31+
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
32+
text-shadow: none;
33+
background: #b3d4fc;
34+
}
35+
36+
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
37+
code[class*="language-"]::selection, code[class*="language-"] ::selection {
38+
text-shadow: none;
39+
background: #b3d4fc;
40+
}
41+
42+
@media print {
43+
code[class*="language-"],
44+
pre[class*="language-"] {
45+
text-shadow: none;
46+
}
47+
}
48+
49+
/* Code blocks */
50+
pre[class*="language-"] {
51+
padding: 1em;
52+
margin: .5em 0;
53+
overflow: auto;
54+
}
55+
56+
:not(pre) > code[class*="language-"],
57+
pre[class*="language-"] {
58+
background: #f5f2f0;
59+
}
60+
61+
/* Inline code */
62+
:not(pre) > code[class*="language-"] {
63+
padding: .1em;
64+
border-radius: .3em;
65+
}
66+
67+
.token.comment,
68+
.token.prolog,
69+
.token.doctype,
70+
.token.cdata {
71+
color: slategray;
72+
}
73+
74+
.token.punctuation {
75+
color: #999;
76+
}
77+
78+
.namespace {
79+
opacity: .7;
80+
}
81+
82+
.token.property,
83+
.token.tag,
84+
.token.boolean,
85+
.token.number,
86+
.token.constant,
87+
.token.symbol {
88+
color: #905;
89+
}
90+
91+
.token.selector,
92+
.token.attr-name,
93+
.token.string,
94+
.token.builtin {
95+
color: #690;
96+
}
97+
98+
.token.operator,
99+
.token.entity,
100+
.token.url,
101+
.language-css .token.string,
102+
.style .token.string,
103+
.token.variable {
104+
color: #a67f59;
105+
background: hsla(0,0%,100%,.5);
106+
}
107+
108+
.token.atrule,
109+
.token.attr-value,
110+
.token.keyword {
111+
color: #07a;
112+
}
113+
114+
.token.function {
115+
color: #DD4A68;
116+
}
117+
118+
.token.regex,
119+
.token.important {
120+
color: #e90;
121+
}
122+
123+
.token.important {
124+
font-weight: bold;
125+
}
126+
127+
.token.entity {
128+
cursor: help;
129+
}
130+

cefpython/cef3/mac/binaries_32bit/prism.js

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cefpython/cef3/mac/binaries_32bit/wxpython.py

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import uuid
3434
import platform
3535
import inspect
36+
import struct
3637

3738
g_applicationSettings = None
3839
g_browserSettings = None
@@ -190,25 +191,31 @@ def CreateMenu(self):
190191
self.SetMenuBar(menubar)
191192

192193
def OnClose(self, event):
193-
if self.browser:
194-
# Calling CloseBrowser will cause that OnClose event occurs again,
195-
# so self.browser must be checked if non-empty.
196-
self.browser.StopLoad()
197-
self.browser.CloseBrowser()
198-
# Remove all CEF browser references so that browser is closed
199-
# cleanly. Otherwise there may be issues for example with cookies
200-
# not being flushed to disk when closing app immediately
201-
# (Issue 158).
202-
del self.javascriptExternal.mainBrowser
203-
del self.clientHandler.mainBrowser
204-
del self.browser
205-
self.Destroy()
206-
# In wx.chromectrl calling browser.CloseBrowser and/or self.Destroy
207-
# may cause crashes when embedding multiple browsers in tab
208-
# (Issue 107). In such case instead of calling CloseBrowser/Destroy
209-
# try this code:
210-
# | self.browser.ParentWindowWillClose()
211-
# | event.Skip()
194+
# Calling CloseBrowser will cause that OnClose event occurs again,
195+
# so self.browser must be checked if non-empty.
196+
if not self.browser:
197+
return
198+
199+
self.browser.StopLoad()
200+
self.browser.CloseBrowser()
201+
202+
# Remove all CEF browser references so that browser is closed
203+
# cleanly. Otherwise there may be issues for example with cookies
204+
# not being flushed to disk when closing app immediately
205+
# (Issue 158).
206+
del self.javascriptExternal.mainBrowser
207+
del self.clientHandler.mainBrowser
208+
del self.browser
209+
210+
# Destroy wx frame, this will complete the destruction of CEF browser
211+
self.Destroy()
212+
213+
# In wx.chromectrl calling browser.CloseBrowser and/or self.Destroy
214+
# may cause crashes when embedding multiple browsers in tab
215+
# (Issue 107). In such case instead of calling CloseBrowser/Destroy
216+
# try this code:
217+
# | self.browser.ParentWindowWillClose()
218+
# | event.Skip()
212219

213220
global g_countWindows
214221
g_countWindows -= 1
@@ -759,6 +766,7 @@ def GetSources():
759766
return sources
760767

761768
if __name__ == '__main__':
769+
print('[wxpython.py] architecture=%s-bit' % (8 * struct.calcsize("P")))
762770
print('[wxpython.py] wx.version=%s' % wx.version())
763771

764772
# Intercept python exceptions. Exit app immediately when exception
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
/* http://prismjs.com/download.html?themes=prism&languages=clike+javascript+python */
2+
/**
3+
* prism.js default theme for JavaScript, CSS and HTML
4+
* Based on dabblet (http://dabblet.com)
5+
* @author Lea Verou
6+
*/
7+
8+
code[class*="language-"],
9+
pre[class*="language-"] {
10+
color: black;
11+
text-shadow: 0 1px white;
12+
font-family: Consolas, Monaco, 'Andale Mono', monospace;
13+
direction: ltr;
14+
text-align: left;
15+
white-space: pre;
16+
word-spacing: normal;
17+
word-break: normal;
18+
19+
20+
-moz-tab-size: 4;
21+
-o-tab-size: 4;
22+
tab-size: 4;
23+
24+
-webkit-hyphens: none;
25+
-moz-hyphens: none;
26+
-ms-hyphens: none;
27+
hyphens: none;
28+
}
29+
30+
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
31+
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
32+
text-shadow: none;
33+
background: #b3d4fc;
34+
}
35+
36+
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
37+
code[class*="language-"]::selection, code[class*="language-"] ::selection {
38+
text-shadow: none;
39+
background: #b3d4fc;
40+
}
41+
42+
@media print {
43+
code[class*="language-"],
44+
pre[class*="language-"] {
45+
text-shadow: none;
46+
}
47+
}
48+
49+
/* Code blocks */
50+
pre[class*="language-"] {
51+
padding: 1em;
52+
margin: .5em 0;
53+
overflow: auto;
54+
}
55+
56+
:not(pre) > code[class*="language-"],
57+
pre[class*="language-"] {
58+
background: #f5f2f0;
59+
}
60+
61+
/* Inline code */
62+
:not(pre) > code[class*="language-"] {
63+
padding: .1em;
64+
border-radius: .3em;
65+
}
66+
67+
.token.comment,
68+
.token.prolog,
69+
.token.doctype,
70+
.token.cdata {
71+
color: slategray;
72+
}
73+
74+
.token.punctuation {
75+
color: #999;
76+
}
77+
78+
.namespace {
79+
opacity: .7;
80+
}
81+
82+
.token.property,
83+
.token.tag,
84+
.token.boolean,
85+
.token.number,
86+
.token.constant,
87+
.token.symbol {
88+
color: #905;
89+
}
90+
91+
.token.selector,
92+
.token.attr-name,
93+
.token.string,
94+
.token.builtin {
95+
color: #690;
96+
}
97+
98+
.token.operator,
99+
.token.entity,
100+
.token.url,
101+
.language-css .token.string,
102+
.style .token.string,
103+
.token.variable {
104+
color: #a67f59;
105+
background: hsla(0,0%,100%,.5);
106+
}
107+
108+
.token.atrule,
109+
.token.attr-value,
110+
.token.keyword {
111+
color: #07a;
112+
}
113+
114+
.token.function {
115+
color: #DD4A68;
116+
}
117+
118+
.token.regex,
119+
.token.important {
120+
color: #e90;
121+
}
122+
123+
.token.important {
124+
font-weight: bold;
125+
}
126+
127+
.token.entity {
128+
cursor: help;
129+
}
130+

0 commit comments

Comments
 (0)