- Restore original file permissions after patching a file (issue #387).
- Add the ability to selectively apply patches based on the presence of an environment variable (issue #388). - Add a patch to disable scrollbar bounce and scrollbar overlay on Lion based on the presence of the CEF_SPI_BUILD environment variable (issue #364). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@339 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
7a91ff899f
commit
df921942ea
|
@ -1,12 +1,30 @@
|
||||||
# An element of this array associates a patch file with a target directory.
|
# Each map in the list associates a patch file name with a target path and
|
||||||
# All paths in the patch file must be relative to that directory. Each patch
|
# optional condition. All paths in the patch file must be relative to the
|
||||||
# file entry for source code changes should be proceeded by the code review
|
# target path. Each map should include a comment linking to the code review
|
||||||
# or bug report link that it relates to.
|
# or bug report that the patch relates to. If a condition is provided the
|
||||||
patches = {
|
# patch will only be applied if an environment variable with the specified
|
||||||
|
# name exists.
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
{
|
||||||
# http://codereview.chromium.org/8086022/
|
# http://codereview.chromium.org/8086022/
|
||||||
'build' : '../build/',
|
'name': 'build',
|
||||||
|
'path': '../build/',
|
||||||
|
},
|
||||||
|
{
|
||||||
# http://codereview.chromium.org/6730028/
|
# http://codereview.chromium.org/6730028/
|
||||||
'base' : '../base/',
|
'name': 'base',
|
||||||
|
'path': '../base/',
|
||||||
|
},
|
||||||
|
{
|
||||||
# http://code.google.com/p/gyp/issues/detail?id=223
|
# http://code.google.com/p/gyp/issues/detail?id=223
|
||||||
'tools_gyp' : '../tools/gyp/',
|
'name': 'tools_gyp',
|
||||||
}
|
'path': '../tools/gyp/',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
# http://code.google.com/p/chromiumembedded/issues/detail?id=364
|
||||||
|
'name': 'spi_webcore_364',
|
||||||
|
'path': '../third_party/WebKit/Source/WebCore/',
|
||||||
|
'condition': 'CEF_SPI_BUILD',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
Index: page/FrameView.cpp
|
||||||
|
===================================================================
|
||||||
|
--- page/FrameView.cpp (revision 97950)
|
||||||
|
+++ page/FrameView.cpp (working copy)
|
||||||
|
@@ -152,10 +152,12 @@
|
||||||
|
m_page = page;
|
||||||
|
m_page->addScrollableArea(this);
|
||||||
|
|
||||||
|
+#if 0
|
||||||
|
if (m_frame == m_page->mainFrame()) {
|
||||||
|
ScrollableArea::setVerticalScrollElasticity(ScrollElasticityAllowed);
|
||||||
|
ScrollableArea::setHorizontalScrollElasticity(ScrollElasticityAllowed);
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Index: platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm
|
||||||
|
===================================================================
|
||||||
|
--- platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm (revision 97950)
|
||||||
|
+++ platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm (working copy)
|
||||||
|
@@ -356,9 +356,13 @@
|
||||||
|
|
||||||
|
bool isScrollbarOverlayAPIAvailable()
|
||||||
|
{
|
||||||
|
+#if 0
|
||||||
|
static bool apiAvailable = [lookUpNSScrollerImpClass() respondsToSelector:@selector(scrollerImpWithStyle:controlSize:horizontal:replacingScrollerImp:)] &&
|
||||||
|
[lookUpNSScrollerImpPairClass() instancesRespondToSelector:@selector(scrollerStyle)];
|
||||||
|
return apiAvailable;
|
||||||
|
+#else
|
||||||
|
+ return false;
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // USE(WK_SCROLLBAR_PAINTER)
|
|
@ -20,7 +20,9 @@ __version__ = "8.12-1"
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
import re
|
import re
|
||||||
|
from stat import *
|
||||||
# cStringIO doesn't support unicode in 2.5
|
# cStringIO doesn't support unicode in 2.5
|
||||||
from StringIO import StringIO
|
from StringIO import StringIO
|
||||||
from logging import debug, info, warning
|
from logging import debug, info, warning
|
||||||
|
@ -500,6 +502,9 @@ def patch_stream(instream, hunks):
|
||||||
|
|
||||||
|
|
||||||
def patch_hunks(srcname, tgtname, hunks):
|
def patch_hunks(srcname, tgtname, hunks):
|
||||||
|
# get the current file mode
|
||||||
|
mode = os.stat(srcname)[ST_MODE]
|
||||||
|
|
||||||
src = open(srcname, "rb")
|
src = open(srcname, "rb")
|
||||||
tgt = open(tgtname, "wb")
|
tgt = open(tgtname, "wb")
|
||||||
|
|
||||||
|
@ -509,6 +514,10 @@ def patch_hunks(srcname, tgtname, hunks):
|
||||||
|
|
||||||
tgt.close()
|
tgt.close()
|
||||||
src.close()
|
src.close()
|
||||||
|
|
||||||
|
# restore the file mode
|
||||||
|
os.chmod(tgtname, mode)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
import pickle
|
import pickle
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
import os.path
|
import os
|
||||||
import sys
|
import sys
|
||||||
from file_util import *
|
from file_util import *
|
||||||
from patch_util import *
|
from patch_util import *
|
||||||
|
@ -51,13 +51,22 @@ else:
|
||||||
execfile(options.patchconfig, scope)
|
execfile(options.patchconfig, scope)
|
||||||
patches = scope["patches"]
|
patches = scope["patches"]
|
||||||
|
|
||||||
for name in patches.keys():
|
for patch in patches:
|
||||||
file = patchdir+'patches/'+name+'.patch'
|
file = patchdir+'patches/'+patch['name']+'.patch'
|
||||||
|
dopatch = True
|
||||||
|
|
||||||
|
if 'condition' in patch:
|
||||||
|
# Check that the environment variable is set.
|
||||||
|
if patch['condition'] not in os.environ:
|
||||||
|
sys.stderr.write('Skipping patch file '+file+'\n')
|
||||||
|
dopatch = False
|
||||||
|
|
||||||
|
if dopatch:
|
||||||
if not os.path.isfile(file):
|
if not os.path.isfile(file):
|
||||||
sys.stderr.write('Patch file '+file+' does not exist.\n')
|
sys.stderr.write('Patch file '+file+' does not exist.\n')
|
||||||
else:
|
else:
|
||||||
sys.stderr.write('Reading patch file '+file+'\n')
|
sys.stderr.write('Reading patch file '+file+'\n')
|
||||||
dir = patches[name]
|
dir = patch['path']
|
||||||
patchObj = from_file(file)
|
patchObj = from_file(file)
|
||||||
patchObj.apply(dir)
|
patchObj.apply(dir)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue