summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/mac
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-16 16:25:10 +0100
committerBen Murdoch <benm@google.com>2011-05-23 18:54:14 +0100
commitab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb (patch)
treedb769fadd053248f85db67434a5b275224defef7 /Source/WebKit/mac
parent52e2557aeb8477967e97fd24f20f8f407a10fa15 (diff)
downloadexternal_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.zip
external_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.tar.gz
external_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.tar.bz2
Merge WebKit at r76408: Initial merge by git.
Change-Id: I5b91decbd693ccbf5c1b8354b37cd68cc9a1ea53
Diffstat (limited to 'Source/WebKit/mac')
-rw-r--r--Source/WebKit/mac/ChangeLog122
-rw-r--r--Source/WebKit/mac/Misc/WebKitNSStringExtras.mm1
-rw-r--r--Source/WebKit/mac/Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib96
-rw-r--r--Source/WebKit/mac/Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nibbin10052 -> 10192 bytes
-rw-r--r--Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h3
-rw-r--r--Source/WebKit/mac/Storage/WebDatabaseTrackerClient.mm3
-rw-r--r--Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm2
-rw-r--r--Source/WebKit/mac/WebView/WebDelegateImplementationCaching.h4
-rw-r--r--Source/WebKit/mac/WebView/WebDelegateImplementationCaching.mm23
-rw-r--r--Source/WebKit/mac/WebView/WebDynamicScrollBarsView.mm6
-rw-r--r--Source/WebKit/mac/WebView/WebFrame.mm4
-rw-r--r--Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h1
-rw-r--r--Source/WebKit/mac/WebView/WebPreferences.mm10
-rw-r--r--Source/WebKit/mac/WebView/WebPreferencesPrivate.h3
-rw-r--r--Source/WebKit/mac/WebView/WebScriptDebugDelegate.h8
-rw-r--r--Source/WebKit/mac/WebView/WebScriptDebugger.h2
-rw-r--r--Source/WebKit/mac/WebView/WebScriptDebugger.mm31
-rw-r--r--Source/WebKit/mac/WebView/WebView.mm16
18 files changed, 266 insertions, 69 deletions
diff --git a/Source/WebKit/mac/ChangeLog b/Source/WebKit/mac/ChangeLog
index fcd7edb..121250d 100644
--- a/Source/WebKit/mac/ChangeLog
+++ b/Source/WebKit/mac/ChangeLog
@@ -1,3 +1,125 @@
+2011-01-21 Chris Rogers <crogers@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Add run-time enable support for the web audio API
+ https://bugs.webkit.org/show_bug.cgi?id=52741
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (-[WebPreferences webAudioEnabled]):
+ (-[WebPreferences setWebAudioEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2011-01-20 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Shift-tab doesn't cycle through fields in http authentication panel
+ https://bugs.webkit.org/show_bug.cgi?id=52850
+
+ * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib:
+ * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
+ Re-wired the key loop so that there aren't two views with the same nextKeyView.
+
+2011-01-20 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Geoffrey Garen.
+
+ Fix for <rdar://problem/8890255>
+
+ Allow WebKitSystemInterface to draw scrollbars
+ when appropriate.
+ * WebCoreSupport/WebSystemInterface.mm:
+ (InitWebCoreSystemInterface):
+
+2011-01-19 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ GraphicsLayers in subframes can get sync'd multiple times
+ https://bugs.webkit.org/show_bug.cgi?id=52489
+
+ * WebView/WebView.mm:
+ (-[WebView _syncCompositingChanges]): syncCompositingStateRecursive()
+ was renamed to syncCompositingStateIncludingSubframes().
+
+2011-01-19 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Would like script debugging protocol method to differentiate between caught and uncaught exceptions
+ https://bugs.webkit.org/show_bug.cgi?id=52104
+ rdar://problem/8704226
+
+ * WebView/WebDelegateImplementationCaching.h:
+ Fix type of second integer in CallScriptDebugDelegate function overload
+ to be int to match the actual Objective-C method. Added a new overload
+ that includes a BOOL in the right place. Added a boolean named
+ exceptionWasRaisedExpectsHasHandlerFlag.
+
+ * WebView/WebDelegateImplementationCaching.mm:
+ (CallDelegate): Added overloads as above.
+ (CallScriptDebugDelegate): Ditto.
+
+ * WebView/WebScriptDebugDelegate.h: Added new method with the additional
+ boolean argument. Marked the old method informally deprecated.
+
+ * WebView/WebScriptDebugger.mm:
+ (WebScriptDebugger::exception): Added code to call with or without the
+ boolean depending on exceptionWasRaisedExpectsHasHandlerFlag.
+
+ * WebView/WebView.mm:
+ (-[WebView _cacheScriptDebugDelegateImplementations]): Set up the
+ exceptionWasRaisedExpectsHasHandlerFlag. Also fixed old code that was not
+ guaranteed to set didParseSourceExpectsBaseLineNumber to NO.
+
+2011-01-19 Tony Gentilcore <tonyg@chromium.org>
+
+ Reviewed by Mihai Parparita.
+
+ Perform some forward declaration
+ https://bugs.webkit.org/show_bug.cgi?id=52522
+
+ * Misc/WebKitNSStringExtras.mm:
+
+2011-01-19 Pavel Podivilov <podivilov@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: [JSC] scripts have incorrect starting line (always 1).
+ https://bugs.webkit.org/show_bug.cgi?id=52721
+
+ * WebView/WebScriptDebugger.h:
+ * WebView/WebScriptDebugger.mm:
+ (toNSString):
+ (WebScriptDebugger::sourceParsed):
+
+2011-01-19 Levi Weintraub <leviw@google.com>
+
+ Reviewed by Ryosuke Niwa.
+
+ Updating to use Position::parentAnchoredEquivalent instead of
+ the old htmlediting rangeCompliantEquivalent.
+
+ remove rangeCompliantEquivalent and replace it with Position methods
+ https://bugs.webkit.org/show_bug.cgi?id=25057
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _smartDeleteRangeForProposedRange:]):
+
+2011-01-18 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION: A problem with Voiceover and finding links
+ https://bugs.webkit.org/show_bug.cgi?id=52324
+
+ * WebView/WebDynamicScrollBarsView.mm:
+ (-[WebDynamicScrollBarsView accessibilityIsIgnored]):
+
2011-01-17 David Kilzer <ddkilzer@apple.com>
<http://webkit.org/b/52596> Add missing DOMDocument/DOMDocumentFragment headers to Xcode project
diff --git a/Source/WebKit/mac/Misc/WebKitNSStringExtras.mm b/Source/WebKit/mac/Misc/WebKitNSStringExtras.mm
index 4bf268c..a997e30 100644
--- a/Source/WebKit/mac/Misc/WebKitNSStringExtras.mm
+++ b/Source/WebKit/mac/Misc/WebKitNSStringExtras.mm
@@ -30,6 +30,7 @@
#import <WebCore/Font.h>
#import <WebCore/GraphicsContext.h>
+#import <WebCore/TextRun.h>
#import <WebCore/WebCoreNSStringExtras.h>
#import <WebKit/WebNSFileManagerExtras.h>
#import <WebKit/WebNSObjectExtras.h>
diff --git a/Source/WebKit/mac/Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib b/Source/WebKit/mac/Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib
index 1e684d5..d102a89 100644
--- a/Source/WebKit/mac/Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib
+++ b/Source/WebKit/mac/Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib
@@ -2,13 +2,13 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">10J530</string>
- <string key="IBDocument.InterfaceBuilderVersion">804</string>
+ <string key="IBDocument.SystemVersion">10J567</string>
+ <string key="IBDocument.InterfaceBuilderVersion">823</string>
<string key="IBDocument.AppKitVersion">1038.35</string>
- <string key="IBDocument.HIToolboxVersion">461.00</string>
+ <string key="IBDocument.HIToolboxVersion">462.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="NS.object.0">804</string>
+ <string key="NS.object.0">823</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -389,14 +389,6 @@
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">nextKeyView</string>
- <reference key="source" ref="71972597"/>
- <reference key="destination" ref="368270689"/>
- </object>
- <int key="connectionID">36</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
<string key="label">imageView</string>
<reference key="source" ref="238662661"/>
<reference key="destination" ref="285173040"/>
@@ -413,67 +405,91 @@
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">nextKeyView</string>
- <reference key="source" ref="368270689"/>
- <reference key="destination" ref="657854151"/>
+ <string key="label">separateRealmLabel</string>
+ <reference key="source" ref="238662661"/>
+ <reference key="destination" ref="1000280557"/>
</object>
- <int key="connectionID">41</int>
+ <int key="connectionID">100057</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">nextKeyView</string>
- <reference key="source" ref="657854151"/>
- <reference key="destination" ref="494193237"/>
+ <reference key="source" ref="705333610"/>
+ <reference key="destination" ref="1000280557"/>
</object>
- <int key="connectionID">42</int>
+ <int key="connectionID">100058</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">nextKeyView</string>
- <reference key="source" ref="494193237"/>
- <reference key="destination" ref="305175176"/>
+ <reference key="source" ref="1000280557"/>
+ <reference key="destination" ref="199018347"/>
</object>
- <int key="connectionID">43</int>
+ <int key="connectionID">100059</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">nextKeyView</string>
- <reference key="source" ref="305175176"/>
- <reference key="destination" ref="705333610"/>
+ <reference key="source" ref="199018347"/>
+ <reference key="destination" ref="477300420"/>
</object>
- <int key="connectionID">100042</int>
+ <int key="connectionID">100060</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">nextKeyView</string>
- <reference key="source" ref="705333610"/>
- <reference key="destination" ref="199018347"/>
+ <reference key="source" ref="477300420"/>
+ <reference key="destination" ref="71972597"/>
</object>
- <int key="connectionID">100045</int>
+ <int key="connectionID">100061</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">nextKeyView</string>
- <reference key="source" ref="199018347"/>
- <reference key="destination" ref="71972597"/>
+ <reference key="source" ref="71972597"/>
+ <reference key="destination" ref="833115728"/>
</object>
- <int key="connectionID">100046</int>
+ <int key="connectionID">100062</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">nextKeyView</string>
- <reference key="source" ref="1000280557"/>
+ <reference key="source" ref="833115728"/>
<reference key="destination" ref="368270689"/>
</object>
- <int key="connectionID">100051</int>
+ <int key="connectionID">100063</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">separateRealmLabel</string>
- <reference key="source" ref="238662661"/>
- <reference key="destination" ref="1000280557"/>
+ <string key="label">nextKeyView</string>
+ <reference key="source" ref="368270689"/>
+ <reference key="destination" ref="657854151"/>
</object>
- <int key="connectionID">100057</int>
+ <int key="connectionID">100064</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">nextKeyView</string>
+ <reference key="source" ref="657854151"/>
+ <reference key="destination" ref="494193237"/>
+ </object>
+ <int key="connectionID">100065</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">nextKeyView</string>
+ <reference key="source" ref="494193237"/>
+ <reference key="destination" ref="305175176"/>
+ </object>
+ <int key="connectionID">100066</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">nextKeyView</string>
+ <reference key="source" ref="305175176"/>
+ <reference key="destination" ref="705333610"/>
+ </object>
+ <int key="connectionID">100067</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
@@ -780,10 +796,10 @@
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
- <string>{{288, 734}, {424, 254}}</string>
+ <string>{{288, 843}, {424, 254}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
- <string>{{288, 734}, {424, 254}}</string>
+ <string>{{288, 843}, {424, 254}}</string>
<integer value="1"/>
<integer value="0"/>
<integer value="0"/>
@@ -809,7 +825,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">100057</int>
+ <int key="maxID">100067</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
diff --git a/Source/WebKit/mac/Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib b/Source/WebKit/mac/Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib
index 5bd4806..42a4b1d 100644
--- a/Source/WebKit/mac/Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib
+++ b/Source/WebKit/mac/Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib
Binary files differ
diff --git a/Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h b/Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
index f784ade..4f2c566 100644
--- a/Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
+++ b/Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
@@ -313,7 +313,8 @@ private:
bool demarshalValueFromArray(JSC::ExecState*, NSArray *array, NSUInteger& index, JSC::JSValue& result);
void demarshalValues(JSC::ExecState*, data_t valuesData, mach_msg_type_number_t valuesLength, JSC::MarkedArgumentBuffer& result);
- class LocalObjectMap : Noncopyable {
+ class LocalObjectMap {
+ WTF_MAKE_NONCOPYABLE(LocalObjectMap);
public:
LocalObjectMap();
~LocalObjectMap();
diff --git a/Source/WebKit/mac/Storage/WebDatabaseTrackerClient.mm b/Source/WebKit/mac/Storage/WebDatabaseTrackerClient.mm
index 2913739..65aba43 100644
--- a/Source/WebKit/mac/Storage/WebDatabaseTrackerClient.mm
+++ b/Source/WebKit/mac/Storage/WebDatabaseTrackerClient.mm
@@ -52,7 +52,8 @@ WebDatabaseTrackerClient::~WebDatabaseTrackerClient()
{
}
-class DidModifyOriginData : public Noncopyable {
+class DidModifyOriginData {
+ WTF_MAKE_NONCOPYABLE(DidModifyOriginData);
public:
static void dispatchToMainThread(WebDatabaseTrackerClient* client, SecurityOrigin* origin)
{
diff --git a/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm b/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
index e1c1058..70767ee 100644
--- a/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
+++ b/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
@@ -123,6 +123,8 @@ void InitWebCoreSystemInterface(void)
INIT(CreateCTTypesetterWithUniCharProviderAndOptions);
INIT(IOSurfaceContextCreate);
INIT(IOSurfaceContextCreateImage);
+ INIT(MakeScrollbarPainter);
+ INIT(ScrollbarPainterPaint);
#endif
didInit = true;
diff --git a/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.h b/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.h
index 2aadc83..8bc776b 100644
--- a/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.h
+++ b/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.h
@@ -80,6 +80,7 @@ struct WebFrameLoadDelegateImplementationCache {
struct WebScriptDebugDelegateImplementationCache {
BOOL didParseSourceExpectsBaseLineNumber;
+ BOOL exceptionWasRaisedExpectsHasHandlerFlag;
IMP didParseSourceFunc;
IMP failedToParseSourceFunc;
IMP didEnterCallFrameFunc;
@@ -138,7 +139,8 @@ BOOL CallResourceLoadDelegateReturningBoolean(BOOL, IMP, WebView *, SEL, id, id,
id CallScriptDebugDelegate(IMP, WebView *, SEL, id, id, NSInteger, id);
id CallScriptDebugDelegate(IMP, WebView *, SEL, id, NSInteger, id, NSInteger, id);
id CallScriptDebugDelegate(IMP, WebView *, SEL, id, NSInteger, id, id, id);
-id CallScriptDebugDelegate(IMP, WebView *, SEL, id, NSInteger, NSInteger, id);
+id CallScriptDebugDelegate(IMP, WebView *, SEL, id, NSInteger, int, id);
+id CallScriptDebugDelegate(IMP, WebView *, SEL, id, BOOL, NSInteger, int, id);
id CallHistoryDelegate(IMP, WebView *, SEL);
id CallHistoryDelegate(IMP, WebView *, SEL, id, id);
diff --git a/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.mm b/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.mm
index d00d60b..c070b2b 100644
--- a/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.mm
+++ b/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.mm
@@ -345,7 +345,7 @@ static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SE
return nil;
}
-static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector, id object1, NSInteger integer1, NSInteger integer2, id object2)
+static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector, id object1, NSInteger integer1, int integer2, id object2)
{
if (!delegate)
return nil;
@@ -359,6 +359,20 @@ static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SE
return nil;
}
+static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector, id object1, BOOL boolean, NSInteger integer1, int integer2, id object2)
+{
+ if (!delegate)
+ return nil;
+ if (!self->_private->catchesDelegateExceptions)
+ return implementation(delegate, selector, self, object1, boolean, integer1, integer2, object2);
+ @try {
+ return implementation(delegate, selector, self, object1, boolean, integer1, integer2, object2);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return nil;
+}
+
static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector, id object1, id object2, NSInteger integer, id object3)
{
if (!delegate)
@@ -574,11 +588,16 @@ id CallScriptDebugDelegate(IMP implementation, WebView *self, SEL selector, id o
return CallDelegate(implementation, self, self->_private->scriptDebugDelegate, selector, object1, integer, object2, object3, object4);
}
-id CallScriptDebugDelegate(IMP implementation, WebView *self, SEL selector, id object1, NSInteger integer1, NSInteger integer2, id object2)
+id CallScriptDebugDelegate(IMP implementation, WebView *self, SEL selector, id object1, NSInteger integer1, int integer2, id object2)
{
return CallDelegate(implementation, self, self->_private->scriptDebugDelegate, selector, object1, integer1, integer2, object2);
}
+id CallScriptDebugDelegate(IMP implementation, WebView *self, SEL selector, id object1, BOOL boolean, NSInteger integer1, int integer2, id object2)
+{
+ return CallDelegate(implementation, self, self->_private->scriptDebugDelegate, selector, object1, boolean, integer1, integer2, object2);
+}
+
id CallHistoryDelegate(IMP implementation, WebView *self, SEL selector)
{
return CallDelegate(implementation, self, self->_private->historyDelegate, selector);
diff --git a/Source/WebKit/mac/WebView/WebDynamicScrollBarsView.mm b/Source/WebKit/mac/WebView/WebDynamicScrollBarsView.mm
index 79c3067..b8edef8 100644
--- a/Source/WebKit/mac/WebView/WebDynamicScrollBarsView.mm
+++ b/Source/WebKit/mac/WebView/WebDynamicScrollBarsView.mm
@@ -565,11 +565,7 @@ static const unsigned cMaxUpdateScrollbarsPass = 2;
- (BOOL)accessibilityIsIgnored
{
- id docView = [self documentView];
- if ([docView isKindOfClass:[WebFrameView class]] && ![(WebFrameView *)docView allowsScrolling])
- return YES;
-
- return [super accessibilityIsIgnored];
+ return YES;
}
- (void)setScrollOrigin:(NSPoint)scrollOrigin updatePosition:(BOOL)updatePosition
diff --git a/Source/WebKit/mac/WebView/WebFrame.mm b/Source/WebKit/mac/WebView/WebFrame.mm
index 3dde06f..154156a 100644
--- a/Source/WebKit/mac/WebView/WebFrame.mm
+++ b/Source/WebKit/mac/WebView/WebFrame.mm
@@ -802,8 +802,8 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
if (newEnd.isNull())
newEnd = end;
- newStart = rangeCompliantEquivalent(newStart);
- newEnd = rangeCompliantEquivalent(newEnd);
+ newStart = newStart.parentAnchoredEquivalent();
+ newEnd = newEnd.parentAnchoredEquivalent();
RefPtr<Range> range = _private->coreFrame->document()->createRange();
int exception = 0;
diff --git a/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h b/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
index 93f83fc..e6ba629 100644
--- a/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
+++ b/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
@@ -91,6 +91,7 @@
#define WebKitAcceleratedCompositingEnabledPreferenceKey @"WebKitAcceleratedCompositingEnabled"
#define WebKitShowDebugBordersPreferenceKey @"WebKitShowDebugBorders"
#define WebKitShowRepaintCounterPreferenceKey @"WebKitShowRepaintCounter"
+#define WebKitWebAudioEnabledPreferenceKey @"WebKitWebAudioEnabled"
#define WebKitWebGLEnabledPreferenceKey @"WebKitWebGLEnabled"
#define WebKitAccelerated2dCanvasEnabledPreferenceKey @"WebKitAccelerated2dCanvasEnabled"
#define WebKitPluginAllowedRunTimePreferenceKey @"WebKitPluginAllowedRunTime"
diff --git a/Source/WebKit/mac/WebView/WebPreferences.mm b/Source/WebKit/mac/WebView/WebPreferences.mm
index 7ce3bc4..c97cc2a 100644
--- a/Source/WebKit/mac/WebView/WebPreferences.mm
+++ b/Source/WebKit/mac/WebView/WebPreferences.mm
@@ -1264,6 +1264,16 @@ static NSString *classIBCreatorID = nil;
[self _setBoolValue:enabled forKey:WebKitShowRepaintCounterPreferenceKey];
}
+- (BOOL)webAudioEnabled
+{
+ return [self _boolValueForKey:WebKitWebAudioEnabledPreferenceKey];
+}
+
+- (void)setWebAudioEnabled:(BOOL)enabled
+{
+ [self _setBoolValue:enabled forKey:WebKitWebAudioEnabledPreferenceKey];
+}
+
- (BOOL)webGLEnabled
{
return [self _boolValueForKey:WebKitWebGLEnabledPreferenceKey];
diff --git a/Source/WebKit/mac/WebView/WebPreferencesPrivate.h b/Source/WebKit/mac/WebView/WebPreferencesPrivate.h
index 89b6288..25a1bbd 100644
--- a/Source/WebKit/mac/WebView/WebPreferencesPrivate.h
+++ b/Source/WebKit/mac/WebView/WebPreferencesPrivate.h
@@ -185,6 +185,9 @@ extern NSString *WebPreferencesRemovedNotification;
- (BOOL)showRepaintCounter;
- (void)setShowRepaintCounter:(BOOL)show;
+- (BOOL)webAudioEnabled;
+- (void)setWebAudioEnabled:(BOOL)enabled;
+
- (BOOL)webGLEnabled;
- (void)setWebGLEnabled:(BOOL)enabled;
diff --git a/Source/WebKit/mac/WebView/WebScriptDebugDelegate.h b/Source/WebKit/mac/WebView/WebScriptDebugDelegate.h
index 823cc35..2444b98 100644
--- a/Source/WebKit/mac/WebView/WebScriptDebugDelegate.h
+++ b/Source/WebKit/mac/WebView/WebScriptDebugDelegate.h
@@ -99,9 +99,17 @@ enum {
// exception is being thrown
- (void)webView:(WebView *)webView exceptionWasRaised:(WebScriptCallFrame *)frame
+ hasHandler:(BOOL)hasHandler
sourceId:(WebSourceId)sid
line:(int)lineno
forWebFrame:(WebFrame *)webFrame;
+
+// exception is being thrown (deprecated old version; called only if new version is not implemented)
+- (void)webView:(WebView *)webView exceptionWasRaised:(WebScriptCallFrame *)frame
+ sourceId:(WebSourceId)sid
+ line:(int)lineno
+ forWebFrame:(WebFrame *)webFrame;
+
@end
diff --git a/Source/WebKit/mac/WebView/WebScriptDebugger.h b/Source/WebKit/mac/WebView/WebScriptDebugger.h
index c4147a2..73c9466 100644
--- a/Source/WebKit/mac/WebView/WebScriptDebugger.h
+++ b/Source/WebKit/mac/WebView/WebScriptDebugger.h
@@ -53,7 +53,7 @@ public:
void initGlobalCallFrame(const JSC::DebuggerCallFrame&);
- virtual void sourceParsed(JSC::ExecState*, const JSC::SourceCode&, int errorLine, const JSC::UString& errorMsg);
+ virtual void sourceParsed(JSC::ExecState*, JSC::SourceProvider*, int errorLine, const JSC::UString& errorMsg);
virtual void callEvent(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineNumber);
virtual void atStatement(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineNumber);
virtual void returnEvent(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineNumber);
diff --git a/Source/WebKit/mac/WebView/WebScriptDebugger.mm b/Source/WebKit/mac/WebView/WebScriptDebugger.mm
index 25ef4b7..9bc3bce 100644
--- a/Source/WebKit/mac/WebView/WebScriptDebugger.mm
+++ b/Source/WebKit/mac/WebView/WebScriptDebugger.mm
@@ -34,7 +34,7 @@
#import "WebViewInternal.h"
#import <JavaScriptCore/DebuggerCallFrame.h>
#import <JavaScriptCore/JSGlobalObject.h>
-#import <JavaScriptCore/SourceCode.h>
+#import <JavaScriptCore/SourceProvider.h>
#import <WebCore/DOMWindow.h>
#import <WebCore/Frame.h>
#import <WebCore/JSDOMWindow.h>
@@ -57,11 +57,11 @@ NSString *toNSString(const UString& s)
return [NSString stringWithCharacters:reinterpret_cast<const unichar*>(s.characters()) length:s.length()];
}
-static NSString *toNSString(const SourceCode& s)
+static NSString *toNSString(SourceProvider* s)
{
- if (!s.length())
+ if (!s->length())
return nil;
- return [NSString stringWithCharacters:reinterpret_cast<const unichar*>(s.data()) length:s.length()];
+ return [NSString stringWithCharacters:reinterpret_cast<const unichar*>(s->data()) length:s->length()];
}
// convert UString to NSURL
@@ -104,15 +104,16 @@ void WebScriptDebugger::initGlobalCallFrame(const DebuggerCallFrame& debuggerCal
}
// callbacks - relay to delegate
-void WebScriptDebugger::sourceParsed(ExecState* exec, const SourceCode& source, int errorLine, const UString& errorMsg)
+void WebScriptDebugger::sourceParsed(ExecState* exec, SourceProvider* sourceProvider, int errorLine, const UString& errorMsg)
{
if (m_callingDelegate)
return;
m_callingDelegate = true;
- NSString *nsSource = toNSString(source);
- NSURL *nsURL = toNSURL(source.provider()->url());
+ NSString *nsSource = toNSString(sourceProvider);
+ NSURL *nsURL = toNSURL(sourceProvider->url());
+ int firstLine = sourceProvider->startPosition().m_line.oneBasedInt();
WebFrame *webFrame = toWebFrame(exec->dynamicGlobalObject());
WebView *webView = [webFrame webView];
@@ -121,9 +122,9 @@ void WebScriptDebugger::sourceParsed(ExecState* exec, const SourceCode& source,
if (errorLine == -1) {
if (implementations->didParseSourceFunc) {
if (implementations->didParseSourceExpectsBaseLineNumber)
- CallScriptDebugDelegate(implementations->didParseSourceFunc, webView, @selector(webView:didParseSource:baseLineNumber:fromURL:sourceId:forWebFrame:), nsSource, source.firstLine(), nsURL, source.provider()->asID(), webFrame);
+ CallScriptDebugDelegate(implementations->didParseSourceFunc, webView, @selector(webView:didParseSource:baseLineNumber:fromURL:sourceId:forWebFrame:), nsSource, firstLine, nsURL, sourceProvider->asID(), webFrame);
else
- CallScriptDebugDelegate(implementations->didParseSourceFunc, webView, @selector(webView:didParseSource:fromURL:sourceId:forWebFrame:), nsSource, [nsURL absoluteString], source.provider()->asID(), webFrame);
+ CallScriptDebugDelegate(implementations->didParseSourceFunc, webView, @selector(webView:didParseSource:fromURL:sourceId:forWebFrame:), nsSource, [nsURL absoluteString], sourceProvider->asID(), webFrame);
}
} else {
NSString* nsErrorMessage = toNSString(errorMsg);
@@ -131,7 +132,7 @@ void WebScriptDebugger::sourceParsed(ExecState* exec, const SourceCode& source,
NSError *error = [[NSError alloc] initWithDomain:WebScriptErrorDomain code:WebScriptGeneralErrorCode userInfo:info];
if (implementations->failedToParseSourceFunc)
- CallScriptDebugDelegate(implementations->failedToParseSourceFunc, webView, @selector(webView:failedToParseSource:baseLineNumber:fromURL:withError:forWebFrame:), nsSource, source.firstLine(), nsURL, error, webFrame);
+ CallScriptDebugDelegate(implementations->failedToParseSourceFunc, webView, @selector(webView:failedToParseSource:baseLineNumber:fromURL:withError:forWebFrame:), nsSource, firstLine, nsURL, error, webFrame);
[error release];
[info release];
@@ -211,9 +212,13 @@ void WebScriptDebugger::exception(const DebuggerCallFrame& debuggerCallFrame, in
WebView *webView = [webFrame webView];
[m_topCallFrame.get() _setDebuggerCallFrame:debuggerCallFrame];
- WebScriptDebugDelegateImplementationCache* implementations = WebViewGetScriptDebugDelegateImplementations(webView);
- if (implementations->exceptionWasRaisedFunc)
- CallScriptDebugDelegate(implementations->exceptionWasRaisedFunc, webView, @selector(webView:exceptionWasRaised:sourceId:line:forWebFrame:), m_topCallFrame.get(), sourceID, lineNumber, webFrame);
+ WebScriptDebugDelegateImplementationCache* cache = WebViewGetScriptDebugDelegateImplementations(webView);
+ if (cache->exceptionWasRaisedFunc) {
+ if (cache->exceptionWasRaisedExpectsHasHandlerFlag)
+ CallScriptDebugDelegate(cache->exceptionWasRaisedFunc, webView, @selector(webView:exceptionWasRaised:hasHandler:sourceId:line:forWebFrame:), m_topCallFrame.get(), hasHandler, sourceID, lineNumber, webFrame);
+ else
+ CallScriptDebugDelegate(cache->exceptionWasRaisedFunc, webView, @selector(webView:exceptionWasRaised:sourceId:line:forWebFrame:), m_topCallFrame.get(), sourceID, lineNumber, webFrame);
+ }
m_callingDelegate = false;
}
diff --git a/Source/WebKit/mac/WebView/WebView.mm b/Source/WebKit/mac/WebView/WebView.mm
index 809b286..82e4f2c 100644
--- a/Source/WebKit/mac/WebView/WebView.mm
+++ b/Source/WebKit/mac/WebView/WebView.mm
@@ -1496,6 +1496,7 @@ static bool fastDocumentTeardownEnabled()
settings->setShowDebugBorders([preferences showDebugBorders]);
settings->setShowRepaintCounter([preferences showRepaintCounter]);
settings->setPluginAllowedRunTime([preferences pluginAllowedRunTime]);
+ settings->setWebAudioEnabled([preferences webAudioEnabled]);
settings->setWebGLEnabled([preferences webGLEnabled]);
settings->setAccelerated2dCanvasEnabled([preferences accelerated2dCanvasEnabled]);
settings->setLoadDeferringEnabled(shouldEnableLoadDeferring());
@@ -1604,14 +1605,23 @@ static inline IMP getMethod(id o, SEL s)
cache->didParseSourceFunc = getMethod(delegate, @selector(webView:didParseSource:baseLineNumber:fromURL:sourceId:forWebFrame:));
if (cache->didParseSourceFunc)
cache->didParseSourceExpectsBaseLineNumber = YES;
- else
+ else {
+ cache->didParseSourceExpectsBaseLineNumber = NO;
cache->didParseSourceFunc = getMethod(delegate, @selector(webView:didParseSource:fromURL:sourceId:forWebFrame:));
+ }
cache->failedToParseSourceFunc = getMethod(delegate, @selector(webView:failedToParseSource:baseLineNumber:fromURL:withError:forWebFrame:));
cache->didEnterCallFrameFunc = getMethod(delegate, @selector(webView:didEnterCallFrame:sourceId:line:forWebFrame:));
cache->willExecuteStatementFunc = getMethod(delegate, @selector(webView:willExecuteStatement:sourceId:line:forWebFrame:));
cache->willLeaveCallFrameFunc = getMethod(delegate, @selector(webView:willLeaveCallFrame:sourceId:line:forWebFrame:));
- cache->exceptionWasRaisedFunc = getMethod(delegate, @selector(webView:exceptionWasRaised:sourceId:line:forWebFrame:));
+
+ cache->exceptionWasRaisedFunc = getMethod(delegate, @selector(webView:exceptionWasRaised:hasHandler:sourceId:line:forWebFrame:));
+ if (cache->exceptionWasRaisedFunc)
+ cache->exceptionWasRaisedExpectsHasHandlerFlag = YES;
+ else {
+ cache->exceptionWasRaisedExpectsHasHandlerFlag = NO;
+ cache->exceptionWasRaisedFunc = getMethod(delegate, @selector(webView:exceptionWasRaised:sourceId:line:forWebFrame:));
+ }
}
- (void)_cacheHistoryDelegateImplementations
@@ -5947,7 +5957,7 @@ static inline uint64_t roundUpToPowerOf2(uint64_t num)
{
Frame* frame = [self _mainCoreFrame];
if (frame && frame->view())
- return frame->view()->syncCompositingStateRecursive();
+ return frame->view()->syncCompositingStateIncludingSubframes();
return YES;
}