summaryrefslogtreecommitdiffstats
path: root/WebKit/mac
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/mac')
-rw-r--r--WebKit/mac/Carbon/CarbonWindowAdapter.mm8
-rw-r--r--WebKit/mac/Carbon/HIViewAdapter.m1
-rw-r--r--WebKit/mac/Carbon/HIWebView.mm6
-rw-r--r--WebKit/mac/ChangeLog7483
-rw-r--r--WebKit/mac/Configurations/Base.xcconfig54
-rw-r--r--WebKit/mac/Configurations/DebugRelease.xcconfig47
-rw-r--r--WebKit/mac/Configurations/FeatureDefines.xcconfig93
-rw-r--r--WebKit/mac/Configurations/Version.xcconfig21
-rw-r--r--WebKit/mac/Configurations/WebKit.xcconfig60
-rw-r--r--WebKit/mac/DOM/WebDOMOperations.mm58
-rw-r--r--WebKit/mac/DOM/WebDOMOperationsPrivate.h7
-rw-r--r--WebKit/mac/DefaultDelegates/WebDefaultPolicyDelegate.m2
-rw-r--r--WebKit/mac/DefaultDelegates/WebDefaultUIDelegate.m4
-rw-r--r--WebKit/mac/ForwardingHeaders/runtime/Error.h1
-rw-r--r--WebKit/mac/History/WebBackForwardList.mm26
-rw-r--r--WebKit/mac/History/WebBackForwardListInternal.h8
-rw-r--r--WebKit/mac/History/WebHistoryItem.mm2
-rw-r--r--WebKit/mac/MigrateHeaders.make7
-rw-r--r--WebKit/mac/Misc/MailQuirksUserScript.js57
-rw-r--r--WebKit/mac/Misc/QuickDrawCompatibility.h96
-rw-r--r--WebKit/mac/Misc/WebCache.mm8
-rw-r--r--WebKit/mac/Misc/WebCoreStatistics.h6
-rw-r--r--WebKit/mac/Misc/WebCoreStatistics.mm51
-rw-r--r--WebKit/mac/Misc/WebDownload.mm4
-rw-r--r--WebKit/mac/Misc/WebElementDictionary.mm8
-rw-r--r--WebKit/mac/Misc/WebIconDatabase.mm11
-rw-r--r--WebKit/mac/Misc/WebIconFetcher.mm128
-rw-r--r--WebKit/mac/Misc/WebKitNSStringExtras.h1
-rw-r--r--WebKit/mac/Misc/WebKitNSStringExtras.mm23
-rw-r--r--WebKit/mac/Misc/WebKitStatistics.h3
-rw-r--r--WebKit/mac/Misc/WebKitVersionChecks.h9
-rw-r--r--WebKit/mac/Misc/WebKitVersionChecks.m16
-rw-r--r--WebKit/mac/Misc/WebLocalizableStrings.h2
-rw-r--r--WebKit/mac/Misc/WebNSAttributedStringExtras.mm8
-rw-r--r--WebKit/mac/Misc/WebNSDictionaryExtras.h1
-rw-r--r--WebKit/mac/Misc/WebNSDictionaryExtras.m7
-rw-r--r--WebKit/mac/Misc/WebNSFileManagerExtras.h11
-rw-r--r--WebKit/mac/Misc/WebNSFileManagerExtras.m118
-rw-r--r--WebKit/mac/Misc/WebNSObjectExtras.h1
-rw-r--r--WebKit/mac/Misc/WebNSObjectExtras.mm5
-rw-r--r--WebKit/mac/Misc/WebNSPasteboardExtras.mm18
-rw-r--r--WebKit/mac/Misc/WebNSPrintOperationExtras.h2
-rw-r--r--WebKit/mac/Misc/WebNSPrintOperationExtras.m12
-rw-r--r--WebKit/mac/Misc/WebNSURLExtras.mm37
-rw-r--r--WebKit/mac/Misc/WebNSUserDefaultsExtras.m131
-rw-r--r--WebKit/mac/Misc/WebNSUserDefaultsExtras.mm (renamed from WebKit/mac/Plugins/WebNullPluginView.h)18
-rw-r--r--WebKit/mac/Misc/WebQuotaManager.h65
-rw-r--r--WebKit/mac/Misc/WebUserContentURLPattern.h39
-rw-r--r--WebKit/mac/Misc/WebUserContentURLPattern.mm89
-rw-r--r--WebKit/mac/Panels/WebAuthenticationPanel.m3
-rw-r--r--WebKit/mac/Panels/WebPanelAuthenticationHandler.m4
-rw-r--r--WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm6
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h13
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm43
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.h22
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm187
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h104
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm360
-rw-r--r--WebKit/mac/Plugins/Hosted/ProxyInstance.h13
-rw-r--r--WebKit/mac/Plugins/Hosted/ProxyInstance.mm90
-rw-r--r--WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.h (renamed from WebKit/mac/Misc/EmptyProtocolDefinitions.h)43
-rw-r--r--WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.mm55
-rw-r--r--WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h1
-rw-r--r--WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm93
-rw-r--r--WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs9
-rw-r--r--WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs7
-rw-r--r--WebKit/mac/Plugins/Hosted/WebKitPluginHostTypes.h6
-rw-r--r--WebKit/mac/Plugins/WebBaseNetscapePluginView.h24
-rw-r--r--WebKit/mac/Plugins/WebBaseNetscapePluginView.mm136
-rw-r--r--WebKit/mac/Plugins/WebBasePluginPackage.h44
-rw-r--r--WebKit/mac/Plugins/WebBasePluginPackage.mm310
-rw-r--r--WebKit/mac/Plugins/WebNetscapeContainerCheckContextInfo.h10
-rw-r--r--WebKit/mac/Plugins/WebNetscapeContainerCheckContextInfo.mm6
-rw-r--r--WebKit/mac/Plugins/WebNetscapeContainerCheckPrivate.h12
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm30
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginPackage.h6
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginPackage.mm113
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginStream.h (renamed from WebKit/mac/Plugins/WebBaseNetscapePluginStream.h)13
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginStream.mm (renamed from WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm)38
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginView.h31
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginView.mm190
-rw-r--r--WebKit/mac/Plugins/WebNullPluginView.mm100
-rw-r--r--WebKit/mac/Plugins/WebPluginContainerCheck.mm2
-rw-r--r--WebKit/mac/Plugins/WebPluginController.h7
-rw-r--r--WebKit/mac/Plugins/WebPluginController.mm150
-rw-r--r--WebKit/mac/Plugins/WebPluginDatabase.mm149
-rw-r--r--WebKit/mac/Plugins/WebPluginPackage.h4
-rw-r--r--WebKit/mac/Plugins/WebPluginPackage.mm (renamed from WebKit/mac/Plugins/WebPluginPackage.m)25
-rw-r--r--WebKit/mac/Plugins/npapi.mm24
-rw-r--r--WebKit/mac/Resources/nullplugin.tiffbin1562 -> 0 bytes
-rw-r--r--WebKit/mac/Storage/WebDatabaseManager.mm28
-rw-r--r--WebKit/mac/Storage/WebDatabaseManagerPrivate.h4
-rw-r--r--WebKit/mac/Storage/WebDatabaseQuotaManager.h32
-rw-r--r--WebKit/mac/Storage/WebDatabaseQuotaManager.mm78
-rw-r--r--WebKit/mac/Storage/WebDatabaseTrackerClient.h2
-rw-r--r--WebKit/mac/Storage/WebDatabaseTrackerClient.mm42
-rw-r--r--WebKit/mac/WebCoreSupport/WebApplicationCache.h12
-rw-r--r--WebKit/mac/WebCoreSupport/WebApplicationCache.mm24
-rw-r--r--WebKit/mac/WebCoreSupport/WebApplicationCacheQuotaManager.h32
-rw-r--r--WebKit/mac/WebCoreSupport/WebApplicationCacheQuotaManager.mm81
-rw-r--r--WebKit/mac/WebCoreSupport/WebChromeClient.h59
-rw-r--r--WebKit/mac/WebCoreSupport/WebChromeClient.mm210
-rw-r--r--WebKit/mac/WebCoreSupport/WebContextMenuClient.h2
-rw-r--r--WebKit/mac/WebCoreSupport/WebContextMenuClient.mm75
-rw-r--r--WebKit/mac/WebCoreSupport/WebDeviceOrientationClient.h58
-rw-r--r--WebKit/mac/WebCoreSupport/WebDeviceOrientationClient.mm76
-rw-r--r--WebKit/mac/WebCoreSupport/WebDragClient.h2
-rw-r--r--WebKit/mac/WebCoreSupport/WebEditorClient.h36
-rw-r--r--WebKit/mac/WebCoreSupport/WebEditorClient.mm123
-rw-r--r--WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h56
-rw-r--r--WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm291
-rw-r--r--WebKit/mac/WebCoreSupport/WebFrameNetworkingContext.h39
-rw-r--r--WebKit/mac/WebCoreSupport/WebFrameNetworkingContext.mm46
-rw-r--r--WebKit/mac/WebCoreSupport/WebGeolocationControllerClient.h1
-rw-r--r--WebKit/mac/WebCoreSupport/WebGeolocationMock.mm59
-rw-r--r--WebKit/mac/WebCoreSupport/WebIconDatabaseClient.h7
-rw-r--r--WebKit/mac/WebCoreSupport/WebIconDatabaseClient.mm2
-rw-r--r--WebKit/mac/WebCoreSupport/WebInspectorClient.h55
-rw-r--r--WebKit/mac/WebCoreSupport/WebInspectorClient.mm271
-rw-r--r--WebKit/mac/WebCoreSupport/WebPasteboardHelper.h6
-rw-r--r--WebKit/mac/WebCoreSupport/WebPasteboardHelper.mm6
-rw-r--r--WebKit/mac/WebCoreSupport/WebPlatformStrategies.h169
-rw-r--r--WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm837
-rw-r--r--WebKit/mac/WebCoreSupport/WebPluginHalterClient.h4
-rw-r--r--WebKit/mac/WebCoreSupport/WebSecurityOrigin.mm (renamed from WebKit/mac/Storage/WebSecurityOrigin.mm)98
-rw-r--r--WebKit/mac/WebCoreSupport/WebSecurityOriginInternal.h (renamed from WebKit/mac/Storage/WebSecurityOriginInternal.h)0
-rw-r--r--WebKit/mac/WebCoreSupport/WebSecurityOriginPrivate.h (renamed from WebKit/mac/Storage/WebSecurityOriginPrivate.h)24
-rw-r--r--WebKit/mac/WebCoreSupport/WebSystemInterface.h10
-rw-r--r--WebKit/mac/WebCoreSupport/WebSystemInterface.mm (renamed from WebKit/mac/WebCoreSupport/WebSystemInterface.m)17
-rw-r--r--WebKit/mac/WebCoreSupport/WebViewFactory.mm679
-rw-r--r--WebKit/mac/WebInspector/WebInspector.h2
-rw-r--r--WebKit/mac/WebInspector/WebInspector.mm19
-rw-r--r--WebKit/mac/WebInspector/WebInspectorFrontend.h (renamed from WebKit/mac/Misc/WebIconFetcher.h)17
-rw-r--r--WebKit/mac/WebInspector/WebInspectorFrontend.mm (renamed from WebKit/mac/Misc/WebIconFetcherInternal.h)33
-rw-r--r--WebKit/mac/WebInspector/WebInspectorPrivate.h5
-rw-r--r--WebKit/mac/WebInspector/WebNodeHighlightView.mm13
-rw-r--r--WebKit/mac/WebKit.exp8
-rw-r--r--WebKit/mac/WebKit.order3215
-rw-r--r--WebKit/mac/WebKitPrefix.h2
-rw-r--r--WebKit/mac/WebView/WebArchive.mm8
-rw-r--r--WebKit/mac/WebView/WebClipView.h1
-rw-r--r--WebKit/mac/WebView/WebClipView.mm (renamed from WebKit/mac/WebView/WebClipView.m)42
-rw-r--r--WebKit/mac/WebView/WebDashboardRegion.h51
-rw-r--r--WebKit/mac/WebView/WebDashboardRegion.mm93
-rw-r--r--WebKit/mac/WebView/WebDataSource.mm32
-rw-r--r--WebKit/mac/WebView/WebDataSourcePrivate.h2
-rw-r--r--WebKit/mac/WebView/WebDelegateImplementationCaching.h4
-rw-r--r--WebKit/mac/WebView/WebDelegateImplementationCaching.mm12
-rw-r--r--WebKit/mac/WebView/WebDeviceOrientation.h35
-rw-r--r--WebKit/mac/WebView/WebDeviceOrientation.mm78
-rw-r--r--WebKit/mac/WebView/WebDeviceOrientationInternal.h45
-rw-r--r--WebKit/mac/WebView/WebDeviceOrientationProvider.h32
-rw-r--r--WebKit/mac/WebView/WebDeviceOrientationProviderMock.h38
-rw-r--r--WebKit/mac/WebView/WebDeviceOrientationProviderMock.mm116
-rw-r--r--WebKit/mac/WebView/WebDeviceOrientationProviderMockInternal.h48
-rw-r--r--WebKit/mac/WebView/WebDocumentInternal.h1
-rw-r--r--WebKit/mac/WebView/WebDocumentPrivate.h5
-rw-r--r--WebKit/mac/WebView/WebDynamicScrollBarsView.h70
-rw-r--r--WebKit/mac/WebView/WebDynamicScrollBarsView.mm323
-rw-r--r--WebKit/mac/WebView/WebDynamicScrollBarsViewInternal.h2
-rw-r--r--WebKit/mac/WebView/WebFrame.h1
-rw-r--r--WebKit/mac/WebView/WebFrame.mm370
-rw-r--r--WebKit/mac/WebView/WebFrameInternal.h14
-rw-r--r--WebKit/mac/WebView/WebFramePrivate.h36
-rw-r--r--WebKit/mac/WebView/WebFrameView.mm111
-rw-r--r--WebKit/mac/WebView/WebFrameViewPrivate.h23
-rw-r--r--WebKit/mac/WebView/WebGeolocationPosition.mm6
-rw-r--r--WebKit/mac/WebView/WebHTMLRepresentation.mm94
-rw-r--r--WebKit/mac/WebView/WebHTMLView.mm806
-rw-r--r--WebKit/mac/WebView/WebHTMLViewInternal.h3
-rw-r--r--WebKit/mac/WebView/WebHTMLViewPrivate.h26
-rw-r--r--WebKit/mac/WebView/WebNavigationData.mm2
-rw-r--r--WebKit/mac/WebView/WebPDFDocumentExtras.mm2
-rw-r--r--WebKit/mac/WebView/WebPDFRepresentation.mm6
-rw-r--r--WebKit/mac/WebView/WebPDFView.h3
-rw-r--r--WebKit/mac/WebView/WebPDFView.mm11
-rw-r--r--WebKit/mac/WebView/WebPreferenceKeysPrivate.h16
-rw-r--r--WebKit/mac/WebView/WebPreferences.mm191
-rw-r--r--WebKit/mac/WebView/WebPreferencesPrivate.h55
-rw-r--r--WebKit/mac/WebView/WebRenderLayer.h (renamed from WebKit/mac/WebCoreSupport/WebGeolocationMockPrivate.h)30
-rw-r--r--WebKit/mac/WebView/WebRenderLayer.mm280
-rw-r--r--WebKit/mac/WebView/WebRenderNode.mm9
-rw-r--r--WebKit/mac/WebView/WebResource.mm4
-rw-r--r--WebKit/mac/WebView/WebResourceLoadDelegatePrivate.h10
-rw-r--r--WebKit/mac/WebView/WebScriptDebugDelegate.mm6
-rw-r--r--WebKit/mac/WebView/WebScriptDebugger.mm4
-rw-r--r--WebKit/mac/WebView/WebScriptWorld.h2
-rw-r--r--WebKit/mac/WebView/WebScriptWorld.mm5
-rw-r--r--WebKit/mac/WebView/WebSerializedJSValue.mm35
-rw-r--r--WebKit/mac/WebView/WebSerializedJSValuePrivate.h (renamed from WebKit/mac/WebView/WebHTMLRepresentationInternal.h)9
-rw-r--r--WebKit/mac/WebView/WebTextCompletionController.mm7
-rw-r--r--WebKit/mac/WebView/WebTextIterator.mm4
-rw-r--r--WebKit/mac/WebView/WebUIDelegatePrivate.h35
-rw-r--r--WebKit/mac/WebView/WebVideoFullscreenController.h3
-rw-r--r--WebKit/mac/WebView/WebVideoFullscreenController.mm203
-rw-r--r--WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm11
-rw-r--r--WebKit/mac/WebView/WebView.mm683
-rw-r--r--WebKit/mac/WebView/WebViewData.h13
-rw-r--r--WebKit/mac/WebView/WebViewData.mm9
-rw-r--r--WebKit/mac/WebView/WebViewInternal.h17
-rw-r--r--WebKit/mac/WebView/WebViewPrivate.h53
201 files changed, 17377 insertions, 5192 deletions
diff --git a/WebKit/mac/Carbon/CarbonWindowAdapter.mm b/WebKit/mac/Carbon/CarbonWindowAdapter.mm
index ba1da71..9747350 100644
--- a/WebKit/mac/Carbon/CarbonWindowAdapter.mm
+++ b/WebKit/mac/Carbon/CarbonWindowAdapter.mm
@@ -74,13 +74,14 @@
#import <WebCore/WebCoreObjCExtras.h>
#import <runtime/InitializeThreading.h>
+#import <wtf/Threading.h>
#import "WebKitLogging.h"
#import "WebNSObjectExtras.h"
#import "WebTypesInternal.h"
@interface NSWindow(HIWebFrameView)
-- _initContent:(const NSRect *)contentRect styleMask:(unsigned int)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag contentView:aView;
+- (id)_initContent:(const NSRect *)contentRect styleMask:(unsigned int)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag contentView:aView;
- (void)_oldPlaceWindow:(NSRect)frameRect;
- (void)_windowMovedToRect:(NSRect)actualFrame;
- (void)_setWindowNumber:(NSInteger)nativeWindow;
@@ -269,6 +270,7 @@ static OSStatus NSCarbonWindowHandleEvent(EventHandlerCallRef inEventHandlerCall
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
@@ -515,7 +517,7 @@ static OSStatus NSCarbonWindowHandleEvent(EventHandlerCallRef inEventHandlerCall
// Do the right thing for a Carbon window.
-- _destroyRealWindow:(BOOL)orderingOut {
+- (id)_destroyRealWindow:(BOOL)orderingOut {
// Complain, because this should never be called. We don't support one-shot NSCarbonWindows.
NSLog(@"-[NSCarbonWindow _destroyRealWindow:] is not implemented.");
@@ -802,7 +804,7 @@ static OSStatus NSCarbonWindowHandleEvent(EventHandlerCallRef inEventHandlerCall
return;
}
-- _clearModalWindowLevel {
+- (id)_clearModalWindowLevel {
return nil;
}
diff --git a/WebKit/mac/Carbon/HIViewAdapter.m b/WebKit/mac/Carbon/HIViewAdapter.m
index d11bea4..565be4f 100644
--- a/WebKit/mac/Carbon/HIViewAdapter.m
+++ b/WebKit/mac/Carbon/HIViewAdapter.m
@@ -30,6 +30,7 @@
#import "HIViewAdapter.h"
+#import "QuickDrawCompatibility.h"
#import "WebNSObjectExtras.h"
#import <wtf/Assertions.h>
diff --git a/WebKit/mac/Carbon/HIWebView.mm b/WebKit/mac/Carbon/HIWebView.mm
index b461394..a3cdc66 100644
--- a/WebKit/mac/Carbon/HIWebView.mm
+++ b/WebKit/mac/Carbon/HIWebView.mm
@@ -32,11 +32,11 @@
#import "CarbonWindowAdapter.h"
#import "HIViewAdapter.h"
+#import "QuickDrawCompatibility.h"
#import "WebHTMLViewInternal.h"
#import "WebKit.h"
-
-#import <objc/objc-runtime.h>
#import <WebKitSystemInterface.h>
+#import <objc/objc-runtime.h>
@interface NSWindow (AppKitSecretsHIWebViewKnows)
- (void)_removeWindowRef;
@@ -351,7 +351,7 @@ Draw( HIWebView* inView, RgnHandle limitRgn, CGContextRef inContext )
NSView <WebDocumentView> *documentView = [[[inView->fWebView mainFrame] frameView] documentView];
if ([documentView isKindOfClass:[WebHTMLView class]])
- [(WebHTMLView *)documentView _web_layoutIfNeededRecursive];
+ [(WebHTMLView *)documentView _web_updateLayoutAndStyleIfNeededRecursive];
if ( inView->fIsComposited )
[inView->fWebView displayIfNeededInRect: *(NSRect*)&hiRect];
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index b545a40..8d54870 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,7486 @@
+2010-11-08 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Plug-in views should not assume that plugins are RenderEmbeddedObjects
+ https://bugs.webkit.org/show_bug.cgi?id=49196
+ <rdar://problem/8638467>
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView pluginHostDied]):
+
+2010-11-08 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=48685
+ Notify UI process about focused frame
+
+ Added an empty implementation of the new ChromeClient method.
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::focusedFrameChanged):
+
+2010-11-08 Anders Carlsson <andersca@apple.com>
+
+ Build fix.
+
+ * MigrateHeaders.make:
+
+2010-11-08 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Remove use of HIGetScaleFactor
+ https://bugs.webkit.org/show_bug.cgi?id=49186
+ <rdar://problem/8618410>
+
+ Scale factors can vary on a display-by-display basis and it doesn't make sense
+ to compute scale factor event coordinates like this.
+
+ * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
+ (getCarbonEvent):
+
+2010-11-08 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Allow applets to participate in accelerated compositing
+ https://bugs.webkit.org/show_bug.cgi?id=49117
+ <rdar://problem/8625819>
+
+ If Java is being loaded via the Netscape Plugin API, create a
+ NetscapePluginWidget so that it has an implementation of platformLayer().
+
+ Also clean up by using early returns.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+
+2010-11-07 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Rename Cache to MemoryCache
+ https://bugs.webkit.org/show_bug.cgi?id=49159
+
+ * Misc/WebCache.mm:
+ (+[WebCache statistics]):
+ * WebCoreSupport/WebDeviceOrientationClient.mm:
+ (WebDeviceOrientationClient::setController):
+ * WebView/WebView.mm:
+
+2010-11-05 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=49100
+ ASSERT([self window]) fails in -[WebBaseNetscapePluginView restartTimers]
+
+ * Plugins/WebBaseNetscapePluginView.mm: (-[WebBaseNetscapePluginView restartTimers]):
+ Removed the assertion. Multiple callers provide no guarantee that the plug-in is still alive
+ (see bug comments), and there seems to be no harm in executing this function in that case.
+
+2010-11-05 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Move resumeAnimations/suspendAnimations from Frame to AnimationController.
+ https://bugs.webkit.org/show_bug.cgi?id=49073
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _suspendAnimations]):
+ (-[WebFrame _resumeAnimations]):
+
+2010-11-04 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=49008
+ <rdar://problem/7906226> Frequent crashes on mail.yahoo.co.jp
+
+ Callers of NetscapePluginInstanceProxy::waitForReply() are not prepared to be deleted during
+ the call, unless it returns 0. There are two reasons for NetscapePluginInstanceProxy to be
+ deleted during wait:
+ - plugin crashed;
+ - plugin was stopped (e.g. due to a DOM modification performed by another reply that came in
+ while waiting).
+
+ We didn't recognize the latter.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::PluginDestroyDeferrer::~PluginDestroyDeferrer):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ (WebKit::NetscapePluginInstanceProxy::waitForReply):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::didCallPluginFunction):
+
+2010-11-05 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Make suspendAnimations/resumeAnimations and setCSSAnimations traverse through subframes and remember state
+ https://bugs.webkit.org/show_bug.cgi?id=46945
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _suspendAnimations]):
+ (-[WebFrame _resumeAnimations]):
+
+2010-11-04 Jia Pu <jpu@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ reversion bubble in WebViews
+ https://bugs.webkit.org/show_bug.cgi?id=47630
+ <rdar://problem/8530960>
+
+ This patch is to add reversion to correction panel. Please see WebCore/ChangeLog for detail.
+
+ * WebCoreSupport/WebEditorClient.h: Adopted new signature of base class method.
+ * WebCoreSupport/WebEditorClient.mm: Adopted new signature of base class method. And code
+ change to use new reversion API in AppKit.
+ (WebEditorClient::WebEditorClient):
+ (WebEditorClient::~WebEditorClient):
+ (WebEditorClient::respondToChangedSelection):
+ (WebEditorClient::showCorrectionPanel):
+ (WebEditorClient::dismissCorrectionPanel):
+ (WebEditorClient::isShowingCorrectionPanel):
+
+2010-11-04 Mike Thole <mthole@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Title for images should use localized numerals
+ https://bugs.webkit.org/show_bug.cgi?id=49017
+
+ * WebCoreSupport/WebPlatformStrategies.mm:
+ (WebPlatformStrategies::imageTitle): Use localized numerals on Snow Leopard or newer.
+
+2010-11-02 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Adam Barth.
+
+ For unnamed frames, window.name returns a generated name
+ https://bugs.webkit.org/show_bug.cgi?id=6751
+
+ Part 1 of 2.
+
+ Substitute FrameTree::uniqueName() for FrameTree::name() in the Mac port.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame name]):
+
+2010-11-01 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ <rdar://problem/7660547> and https://bugs.webkit.org/show_bug.cgi?id=48699
+ Context menu support for WebKit 2.
+
+ * WebCoreSupport/WebChromeClient.h:
+ (WebChromeClient::showContextMenu):
+
+2010-10-29 Daniel Bates <dbates@rim.com>
+
+ No review, rolling out 70971.
+ http://trac.webkit.org/changeset/70971
+ https://bugs.webkit.org/show_bug.cgi?id=6751
+
+ Rolling out changeset 70971 <http://trac.webkit.org/changeset/70971> since
+ it caused layout test failures on all bots. In particular, the
+ child count in a generated frame name differs after this patch. We need
+ to look into this further.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame name]):
+
+2010-10-28 Antonio Gomes <agomes@rim.com>
+
+ Reviewed by Ojan Vafai.
+
+ Needs a "LinuxEditingBehavior", perhaps with a better name
+ https://bugs.webkit.org/show_bug.cgi?id=36627
+
+ Added the corresponding GTK+ setting to WebCore's EditingUnixBehavior: WebKitEditingUnixBehavior.
+
+ * WebView/WebFrame.mm:
+ (core):
+ * WebView/WebPreferencesPrivate.h:
+
+2010-10-29 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Adam Barth.
+
+ For unnamed frames, window.name returns a generated name
+ https://bugs.webkit.org/show_bug.cgi?id=6751
+
+ Modified Mac-port to use FrameTree::uniqueName().
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame name]):
+
+2010-10-29 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Change BackForwardList clients to use BackForwardListImpl to prepare for further refactoring
+ https://bugs.webkit.org/show_bug.cgi?id=48574
+
+ * History/WebBackForwardList.mm:
+ Use BackForwardListImpl.
+
+2010-10-29 Alexey Proskuryakov <ap@apple.com>
+
+ Rubber-stamped by Sam Weinig.
+
+ Comment for usesDocumentViews explains it backwards. This flag is true in ToT, and we do
+ create views for subframes.
+
+ * WebView/WebViewData.h: Double negation is better than a lie.
+
+2010-10-27 Jer Noble <jer.noble@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Full screen video in Safari (still) exits full-screen if you switch to another
+ app on a multi-display system.
+ https://bugs.webkit.org/show_bug.cgi?id=47364
+ <rdar://problem/8382299>
+
+ The FullScreen window does not technically close when it deactivates, but the
+ two NSWindows that make up the FullScreen feature should not hide when deactivated.
+
+ * WebView/WebVideoFullscreenController.mm:
+ (createBackgroundFullscreenWindow): Do not set hidesOnDeactivate.
+ (-[WebVideoFullscreenWindow initWithContentRect:styleMask:backing:defer:]): Ditto.
+ * WebView/WebVideoFullscreenHUDWindowController.mm:
+ (-[WebVideoFullscreenHUDWindow initWithContentRect:styleMask:backing:defer:]): Ditto.
+
+2010-10-29 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=48576
+ Let WebKit2 client know when a frame is a frameset
+
+ Added a blank implementation of the new FrameLoaderClient method.
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::dispatchDidBecomeFrameset):
+
+2010-10-29 Csaba Osztrogonác <ossy@webkit.org>
+
+ Reviewed by Adam Roben and David Kilzer.
+
+ Fix and cleanup of build systems
+ https://bugs.webkit.org/show_bug.cgi?id=48342
+
+ * Configurations/FeatureDefines.xcconfig: Remove unnecessary ENABLE_SANDBOX.
+
+2010-10-28 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ LLVM compiler build fix
+
+ * Misc/WebDownload.mm:
+ (-[WebDownload initWithRequest:delegate:]): Changed the delegate type from id to
+ id<NSURLDownloadDelegate> to match the method signature in NSURLDownload.
+
+2010-10-28 Ivan Krstić <ike@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Remove unused experimental proxied panel interface.
+ <rdar://problem/7237059>
+
+ * Plugins/Hosted/NetscapePluginHostManager.h:
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::hostForPlugin):
+ (WebKit::NetscapePluginHostManager::spawnPluginHost):
+ (WebKit::NetscapePluginHostManager::instantiatePlugin):
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ * Plugins/Hosted/WebKitPluginHost.defs:
+ * WebCoreSupport/WebSystemInterface.mm:
+ (InitWebCoreSystemInterface):
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ * WebView/WebPreferencesPrivate.h:
+
+2010-10-27 Pratik Solanki <psolanki@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Improve memSize calculation in [WebView _setCacheModel]
+ https://bugs.webkit.org/show_bug.cgi?id=48484
+
+ * WebView/WebView.mm:
+ (roundUpToPowerOf2): Added. Utility function to calculate the nearest power of 2.
+ (+[WebView _setCacheModel:]): Update memSize calculation to set it to the next
+ bigger power of 2. Also update WebCore cache settings.
+
+2010-10-26 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ WebKitTestRunner needs to support layoutTestController.dumpBackForwardList
+ https://bugs.webkit.org/show_bug.cgi?id=42322
+ rdar://problem/8193631
+
+ WebKitTestRunner needs to support layoutTestController.clearBackForwardList
+ https://bugs.webkit.org/show_bug.cgi?id=42333
+ rdar://problem/8193643
+
+ * History/WebBackForwardList.mm:
+ (core): Return BackForwardListImpl.
+ (kit): Take BackForwardListImpl.
+ (-[WebBackForwardList initWithBackForwardList:]): Use BackForwardListImpl.
+ (-[WebBackForwardList dealloc]): Ditto.
+ (-[WebBackForwardList finalize]): Ditto.
+ (-[WebBackForwardList description]): Ditto.
+ (-[WebBackForwardList setPageCacheSize:]): Ditto.
+ (-[WebBackForwardList pageCacheSize]): Ditto.
+ * History/WebBackForwardListInternal.h: Ditto.
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView keyDown:]): Ditto.
+ * WebView/WebView.mm:
+ (-[WebView initWithCoder:]): Ditto.
+ (-[WebView encodeWithCoder:]): Ditto.
+ (-[WebView backForwardList]): Ditto.
+ (-[WebView setMaintainsBackForwardList:]): Ditto.
+
+2010-10-27 Chris Rogers <crogers@google.com>
+
+ Reviewed by Chris Marrin.
+
+ Add ENABLE_WEB_AUDIO feature enable flag (initially disabled) to build-webkit
+ https://bugs.webkit.org/show_bug.cgi?id=48279
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-10-27 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=48385 Add WebKit
+ SPI to scale a WebView
+ -and corresponding-
+ <rdar://problem/8107667>
+
+ This patch adds SPI to Mac WebKit that scales the page by the given
+ scale factor.
+
+ * WebView/WebView.mm:
+ (-[WebView _scaleWebView:]):
+ (-[WebView _viewScaleFactor]):
+ * WebView/WebViewPrivate.h:
+
+2010-10-27 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION (r70335): Incorrect article layout in Safari Reader
+ https://bugs.webkit.org/show_bug.cgi?id=48436
+
+ * Misc/WebKitVersionChecks.h: Added WEBKIT_FIRST_VERSION_WITH_GET_MATCHED_CSS_RULES_RESTRICTIONS.
+ * WebView/WebView.mm:
+ (-[WebView _needsUnrestrictedGetMatchedCSSRules]): Added. Returns YES for Safari linked against
+ versions of WebKit that did not have the cross-origin restrictions in getMatchedCSSRules().
+ (-[WebView _preferencesChangedNotification:]): Call Settings::setCrossOriginCheckInGetMatchedCSSRulesDisabled()
+ based on the above.
+
+2010-10-18 Jer Noble <jer.noble@apple.com>
+
+ Reviewed by Eric Carlson.
+
+ Safari fullscreen media element tickles when it should not.
+
+ https://bugs.webkit.org/show_bug.cgi?id=47861
+
+ * WebView/WebVideoFullscreenController.mm:
+ (-[WebVideoFullscreenController updatePowerAssertions]):
+
+2010-10-26 Jenn Braithwaite <jennb@chromium.org>
+
+ Reviewed by Dmitry Titov.
+
+ Resource tracking failure when trying to move a frame between documents
+ https://bugs.webkit.org/show_bug.cgi?id=44713
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::didTransferChildFrameToNewDocument):
+ Empty method.
+ (WebFrameLoaderClient::transferLoadingResourceFromPage):
+ Update resource tracking for a resource load that has been transferred
+ to a new page.
+
+2010-10-25 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Gavin Barraclough.
+
+ Remove exec and globalData arguments from jsNumber
+ https://bugs.webkit.org/show_bug.cgi?id=48270
+
+ Mechanical removal of exec parameter to jsNumber
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyInstance::numberValue):
+
+2010-10-24 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Expose HitTestResult::absoluteMediaURL() via WebKit API
+ https://bugs.webkit.org/show_bug.cgi?id=48219
+
+ * Misc/WebElementDictionary.mm:
+ (+[WebElementDictionary initializeLookupTable]): Map WebElementMediaURLKey to
+ _absoluteMediaURL.
+ (-[WebElementDictionary _absoluteMediaURL]): Added. Returns absoluteMediaURL().
+ * WebKit.exp: Export WebElementMediaURLKey.
+ * WebView/WebView.mm: Define WebElementMediaURLKey.
+ * WebView/WebViewPrivate.h: Declare WebElementMediaURLKey.
+
+2010-10-24 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Removed deprecated methods from the WebHTMLHighlighter private protocol.
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::customHighlightRect): Call -highlightRectForLine:representedNode:
+ unconditionally.
+ (WebChromeClient::paintCustomHighlight): Call
+ -paintHighlightForBox:onLine:behindText:entireLine:representedNode: unconditionally.
+ * WebView/WebHTMLViewPrivate.h:
+
+2010-10-23 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Sam Weinig.
+
+ Unify globalData APIs
+ https://bugs.webkit.org/show_bug.cgi?id=47969
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::evaluate):
+ (WebKit::NetscapePluginInstanceProxy::invoke):
+ (WebKit::NetscapePluginInstanceProxy::invokeDefault):
+ (WebKit::NetscapePluginInstanceProxy::construct):
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame evaluateWebScript:]):
+
+2010-10-23 David Kilzer <ddkilzer@apple.com>
+
+ <http://webkit.org/b/48186> Remove unneeded WebHTMLRepresentationInternal.h header
+
+ Reviewed by Sam Weinig.
+
+ The only method defined in WebHTMLRepresentationInternal.h is
+ also defined in WebHTMLRepresentation.h, so use that instead.
+
+ * WebView/WebHTMLRepresentationInternal.h: Removed.
+
+2010-10-23 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=48083
+ <rdar://problem/8489082> Need WebKit2 API for private browsing (48083)
+
+ * WebCoreSupport/WebSystemInterface.mm: (InitWebCoreSystemInterface): Initialize the new method.
+
+2010-10-22 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ WebKit2 needs to pass the current event modifier flags when requesting a new window
+ https://bugs.webkit.org/show_bug.cgi?id=48140
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::createWindow):
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::dispatchCreatePage):
+ Add NavigationAction parameter.
+
+2010-10-21 Andy Estes <aestes@apple.com>
+
+ Reviewed by Eric Carlson.
+
+ WebKit shouldn't load a plug-in based on file extension if a MIME type
+ is specified.
+ https://bugs.webkit.org/show_bug.cgi?id=48046
+
+ If a MIME type is specified in an object or embed element, and that MIME
+ type isn't supported by an installed plug-in, WebKit shouldn't attempt
+ to find a plug-in based on the file extension of the url attribute.
+ Doing so can lead to cases where a plug-in is loaded that can't handle
+ resources of the MIME type specified by the author.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createPlugin): Only check for a pluginPackage by
+ extension if MIME type is the empty string.
+
+2010-10-20 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Composited elements drawn twice when WebView is layer-backed
+ https://bugs.webkit.org/show_bug.cgi?id=48024
+ <rdar://problem/7916580>
+
+ When drawing content in a layer-backed WebView, WebFrame's test
+ for drawing to a bitmap succeeded, causing us to paint flattened
+ compositing layers into the view. They would also be rendered
+ by the normal compositing path, resulting in double rendering.
+
+ Fix this by detecting when the WebHTMLView is being drawn into
+ a layer, and avoiding flattening in that case.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _showFlattenedCompositingLayers:]):
+ (-[WebFrame _drawRect:contentsOnly:]):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView drawLayer:inContext:]):
+ (-[WebHTMLView _web_isDrawingIntoLayer]):
+ * WebView/WebHTMLViewInternal.h:
+
+2010-10-20 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by David Levin.
+
+ Repost the DatabaseTracker notifications to the main thread, if needed.
+ https://bugs.webkit.org/show_bug.cgi?id=40655
+
+ * Storage/WebDatabaseTrackerClient.mm:
+ (DidModifyOriginData::dispatchToMainThread):
+ (DidModifyOriginData::DidModifyOriginData):
+ (DidModifyOriginData::dispatchDidModifyOriginOnMainThread):
+ (WebDatabaseTrackerClient::dispatchDidModifyOrigin):
+ (WebDatabaseTrackerClient::dispatchDidModifyDatabase):
+
+2010-10-20 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION(r67568-r67643): Some HTML/CSS renders upside down and backwards on Leopard
+ https://bugs.webkit.org/show_bug.cgi?id=47369
+
+ r46947 added code that limits the size of the layer-backed view on Leopard when
+ the page height exceeds 4096px (later adjusted to 2048px in r48401).
+
+ Later, r67576 altered the geometry flipping behavior to push the geometry flipping
+ down into WebKit. However, the code that adjusts the hosting layer's sublayer transform
+ to account for layer-backed view size-limiting was not fixed at the same time.
+ This change corrects that.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _updateLayerHostingViewPosition]):
+
+2010-10-19 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/8508422> Compositing layers aren't always displayed correctly in layer-backed WebViews
+
+ AppKit has some special code to prevent it meddling with view's layers
+ under layer-backed WebViews. When a layer-backed WebView became composited,
+ this caused our layer to remain zero-sized. Fix this by manually
+ setting the geometry for our layer, if the WebHTMLView has a layer.
+
+ This does not seem to be a problem if the WebView becomes layer-backed, or
+ stops being layer-backed after the WebView starts using compositing.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView attachRootLayer:]):
+
+2010-10-20 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Merge ColorSpace and ImageColorSpace enums
+ https://bugs.webkit.org/show_bug.cgi?id=47922
+
+ Renamed ColorSpace enum entries DeviceColorSpace and sRGBColorSpace to ColorSpaceDeviceRGB and ColorSpaceSRGB
+ to follow webkit style rules.
+
+ * Misc/WebKitNSStringExtras.mm:
+ (-[NSString _web_drawAtPoint:font:textColor:allowingFontSmoothing:]):
+
+2010-10-19 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=47933
+ <rdar://problem/8494337> navigator.language doesn't work in WebKit2
+
+ * Misc/WebNSUserDefaultsExtras.mm: Moved code for computing default language to WebCore.
+ We need to keep _webkit_preferredLanguageCode for Safari.
+
+ * WebCoreSupport/WebSystemInterface.mm: (InitWebCoreSystemInterface):
+ Initialize wkCopyCFLocalizationPreferredName.
+
+ * WebCoreSupport/WebViewFactory.mm: Removed defaultLanguage. WebCore was the only caller.
+
+2010-10-18 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by David Kilzer.
+
+ https://bugs.webkit.org/show_bug.cgi?id=47864
+ Convert WebNSUserDefaultsExtras.m to .mm
+
+ Also, fixed some issues in the process:
+ - removed locking, which was only necessary when this code was in Foundation;
+ - fixed notification center observer to actually work (previously, it picked up changes
+ when application preferences changed, not when system language did);
+ - removed unused NSString category;
+ - updated style.
+
+ * Misc/WebNSUserDefaultsExtras.m: Removed.
+ * Misc/WebNSUserDefaultsExtras.mm: Copied from WebKit/mac/Misc/WebNSUserDefaultsExtras.m.
+ (createHTTPStyleLanguageCode):
+ (+[NSUserDefaults _webkit_defaultsDidChange]):
+ (addLanguageChangeObserver):
+ (+[NSUserDefaults _webkit_preferredLanguageCode]):
+
+2010-10-18 Stuart Morgan <stuartmorgan@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Switch to using the new Carbon NPAPI event declarations, and remove
+ the old ones.
+
+ https://bugs.webkit.org/show_bug.cgi?id=40784
+
+ * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
+ (WebNetscapePluginEventHandlerCarbon::mouseEntered):
+ (WebNetscapePluginEventHandlerCarbon::mouseExited):
+ (WebNetscapePluginEventHandlerCarbon::mouseMoved):
+ (WebNetscapePluginEventHandlerCarbon::focusChanged):
+
+2010-10-18 Pavel Podivilov <podivilov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: disable private browsing for inspector
+ https://bugs.webkit.org/show_bug.cgi?id=47827
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController init]):
+
+2010-10-14 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: inspector settings/properties/states management
+ should be extracted into separate class.
+
+ We have a lot of flags/values in InspectorController.
+ Some flags are persisting into profile.
+ Others are part of inspector state for frontend.
+ All these flags should keep their values after navigation.
+ It'd be better to extract these flags/values into separate
+ class which will care about theirs lifetime.
+
+ https://bugs.webkit.org/show_bug.cgi?id=47275
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController showWindow:]):
+ (-[WebInspectorWindowController attach]):
+ (-[WebInspectorWindowController detach]):
+
+2010-10-13 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=43987
+ Switch XMLHttpRequest, FileReader, and FileReaderSync to use a Stringbuilder
+ to construct their internal result string. Remove ScriptString (this is now
+ redundant).
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+
+2010-10-12 Andy Estes <aestes@apple.com>
+
+ Rubber-stamped by Darin Adler.
+
+ Check in some cleanup from the previous commit.
+
+ * WebView/WebView.mm:
+ (leakMailQuirksUserScriptPath): Renamed to indicate that this function
+ leaks an NSString.
+ (-[WebView _injectMailQuirksScript]): Moved a static initialization from
+ a separate class method into the only method that used it and removed
+ the now-unnecessary class method.
+
+2010-10-12 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION (new parser): Leopard/Tiger Mail <head>/<body> quirk is gone
+ https://bugs.webkit.org/show_bug.cgi?id=45693
+
+ Re-implement this former WebCore parser quirk as a
+ Mac-only userscript-based quirk. As far as I can tell
+ from Darin's description this should satisfy Mail's needs.
+
+ * Misc/MailQuirksUserScript.js: Added.
+ * WebView/WebView.mm:
+ (+[WebView _mailQuirksUserScript]):
+ (-[WebView _injectMailQuirksScript]):
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+
+2010-10-12 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add 'didDraw' callback for framerate tracking
+ https://bugs.webkit.org/show_bug.cgi?id=47478
+
+ Add a callback at the end of -[WebHTMLView drawRect:] so
+ a delegate can get notified when a draw happens.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView drawRect:]):
+ * WebView/WebUIDelegatePrivate.h:
+
+2010-10-11 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Remove WebIconFetcher from WebKit and IconFetcher from WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=47523
+
+ Remove all traces of the WebKit WebIconFetcher class. It's SPI that nobody uses.
+
+ * Misc/WebIconFetcher.h: Removed.
+ * Misc/WebIconFetcher.mm: Removed.
+ * Misc/WebIconFetcherInternal.h: Removed.
+ * WebView/WebFrame.mm:
+ * WebView/WebFramePrivate.h:
+
+2010-10-11 Jessie Berlin <jberlin@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Add Private API for creating a WebKit2 WebSerializedScriptValue from the internal
+ representation of a WebKit1 WebSerializedJSValue.
+ https://bugs.webkit.org/show_bug.cgi?id=47439
+
+ * WebView/WebSerializedJSValue.mm:
+ (-[WebSerializedJSValue internalRepresentation]):
+ * WebView/WebSerializedJSValuePrivate.h:
+
+2010-10-07 Jessie Berlin <jberlin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add Private API for creating a WebKit1 WebSerializedJSValue from the internal
+ representation of a WebKit2 WebSerializedScriptValue.
+ https://bugs.webkit.org/show_bug.cgi?id=47390
+
+ * WebView/WebSerializedJSValue.mm:
+ (-[WebSerializedJSValue initWithInternalRepresentation:]):
+ Set the WebSerializedJSValuePrivate's WebCore::SerializedScriptValue to be the passed in
+ internal representation.
+ * WebView/WebSerializedJSValuePrivate.h: Added.
+
+2010-10-07 Antonio Gomes <agomes@rim.com>
+
+ Reviewed by Simon Fraser.
+
+ [Mac] [DRT] implement setSpatialNavigationEnabled
+ https://bugs.webkit.org/show_bug.cgi?id=47291
+
+ Added the needed bits to make it possible to enabled spatial navigation
+ for the Mac port. For now it is being only used by DRT.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences isSpatialNavigationEnabled]):
+ (-[WebPreferences setSpatialNavigationEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-10-07 Jer Noble <jer.noble@apple.com>
+
+ Fix the Leopard 64-bit build.
+
+ * Configurations/WebKit.xcconfig: Add CoreServices.framework/Frameworks to the
+ framework search path.
+ * WebView/WebVideoFullscreenController.mm: Explicitly import <OSStatus/Power.h>.
+
+2010-10-06 Jer Noble <jer.noble@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Screensaver starts while watching fullscreen playback.
+ https://bugs.webkit.org/show_bug.cgi?id=47299
+ <rdar://problem/8478956>
+
+ To disable the Screen Saver, we need to periodically call UpdateSystemActivity().
+
+ * WebView/WebVideoFullscreenController.h: Added _tickleTimer.
+ * WebView/WebVideoFullscreenController.mm:
+ (-[WebVideoFullscreenController dealloc]): Invalidate _tickleTimer.
+ (-[WebVideoFullscreenController _enableTickleTimer]): Create _tickleTimer.
+ (-[WebVideoFullscreenController _disableTickleTimer]): Invalidate _tickleTimer.
+ (-[WebVideoFullscreenController _tickleTimerFired]): Call UpdateSystemActivity().
+ (-[WebVideoFullscreenController updatePowerAssertions]): Call _enableTickleTimer
+ or _disableTickleTimer.
+
+2010-10-05 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ check for ENABLE(GLIB_SUPPORT) in WebView
+ https://bugs.webkit.org/show_bug.cgi?id=46788
+
+ Use ENABLE(GLIB_SUPPORT) in WebView to guard the glib runloop observer.
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+ (-[WebView _close]):
+ * WebView/WebViewData.h:
+ * WebView/WebViewInternal.h:
+
+2010-10-01 Anders Carlsson <andersca@apple.com>
+
+ Fix Snow Leopard build.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::getProxy):
+
+2010-10-01 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Add proxy server query function proxyServersForURL and change the Mac plug-in code to use it
+ https://bugs.webkit.org/show_bug.cgi?id=47022
+ <rdar://problem/8504712>
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::getProxy):
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView getVariable:forURL:value:length:]):
+
+2010-09-30 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Remove remaining calls to deprecatedParseURL
+ https://bugs.webkit.org/show_bug.cgi?id=26599
+
+ * DOM/WebDOMOperations.mm:
+ (-[DOMDocument URLWithAttributeString:]):
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createPlugin):
+ Call stripLeadingAndTrailingHTMLSpaces instead of deprecatedParseURL.
+
+2010-09-30 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ -[DOMDocument _documentRange] throws an exception if there is no document element
+ https://bugs.webkit.org/show_bug.cgi?id=46934
+ <rdar://problem/8169260>
+
+ If there is no document element, just return an empty range. Otherwise we'll try to call
+ Range::selectNode with a null Node which will throw a NOT_FOUND exception.
+
+ * DOM/WebDOMOperations.mm:
+ (-[DOMDocument _documentRange]):
+
+2010-09-30 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Make 2D accelerated canvas rendering build on Mac
+ https://bugs.webkit.org/show_bug.cgi?id=46007
+
+ Added ACCELERATED_2D_CANVAS to FeatureDefines
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-09-30 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Add printing SPI allowing full control over shrink-to-fit
+ https://bugs.webkit.org/show_bug.cgi?id=46877
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _beginPrintModeWithMinimumPageWidth:height:maximumPageWidth:]): Added.
+ * WebView/WebHTMLViewPrivate.h:
+
+2010-09-28 Johnny Ding <jnd@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=41292
+ Some windowed plugins did not handle events through EventHandler, so we
+ never set right gesture state for those events.
+ This change is to set right allowPopupsFromPlugin flag to current
+ execution frame, so WeKit can always get right gesture state on Mac.
+ From Mac Snow Leopard, the plugin is run under "WebKitPluginHost,app"
+ process, that process passes the allowPopupsFromPlugin flag to
+ WKPCEvaluate(in NetscapePluginHostProxy.mm), then flag is set in
+ NetscapePluginInstanceProxy::evaluate.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView sendEvent:isDrawRect:]):
+
+2010-09-28 Jenn Braithwaite <jennb@chromium.org>
+
+ Reviewed by Dmitry Titov.
+
+ Added oldPage param to FrameLoaderClient::didTransferChildFrameToNewDocument.
+ https://bugs.webkit.org/show_bug.cgi?id=46663
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::didTransferChildFrameToNewDocument):
+
+2010-09-26 Antonio Gomes <agomes@rim.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ DRT/Mac nodesFromRect support
+
+ [Mac][DRT] Implement LayoutTestController::nodesFromRect
+ https://bugs.webkit.org/show_bug.cgi?id=46580
+
+ Implement nodesFromRect as a private method to access non-exposed Document
+ methods, similarly to computedStyleIncludingVisitedInfo.
+
+ * WebView/WebView.mm: Added JSDocument.h and JSNodeList.h to the include list.
+ These headers makes it possible to:
+ 1) Get a Document off of a JSDocument;
+ 2) Call toJS function, defined in JSNodeList.cpp|h so we can convert RefPtr<NodeList>
+ gotten from Document::nodesFromRect to JS bindings.
+ (-[WebView _nodesFromRect:forDocument:x:y:hPadding:vPadding:ignoreClipping:]):
+ * WebView/WebViewPrivate.h: Added nodesFromRect method to access methods of the
+ Document class not exposed to JavaScript. It works similarly to computedStyleIncludingVisitedInfo.
+
+2010-09-24 Jia Pu <jpu@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ automaticSpellingCorrectionEnabled isn't updated.
+ https://bugs.webkit.org/show_bug.cgi?id=46486
+ <rdar://problem/8475212>
+
+ * WebView/WebView.mm:
+ (+[WebView initialize]): Should update "automaticSpellingCorrectionEnabled"
+ instead of "automaticTextReplacementEnabled".
+
+2010-09-23 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=46380
+ REGRESSION: Crash when downloading a file
+
+ Downloading cannot be tested in DRT.
+
+ * Misc/WebNSFileManagerExtras.m: (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]):
+ Don't copy null strings.
+
+2010-09-24 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: CRASH at node highlight on MAC Safari.
+ 1) run-safari --debug
+ 2) open inspector
+ 3) open elements panel
+ 4) hover mouse over elements panel items multiple times
+ 5) CRASH
+ Looks like it is a race condition. WebNodeHighlightView doesn't check
+ the pointer to WebNodeHighligh object and it can be nil.
+
+ https://bugs.webkit.org/show_bug.cgi?id=46261
+
+ * WebInspector/WebNodeHighlightView.mm:
+ (-[WebNodeHighlightView drawRect:]):
+
+2010-09-23 Andy Estes <aestes@apple.com>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION (r61285): some Dashboard widgets are always invisible due to
+ HTML parser changes.
+ https://bugs.webkit.org/show_bug.cgi?id=46435
+
+ Enable pre-HTML5 parser quirks if Dashboard is in backward compatibility
+ mode.
+
+ * WebView/WebView.mm:
+ (-[WebView _needsPreHTML5ParserQuirks]): Renamed from
+ shouldUsePreHTML5ParserQuirks(). Return true if
+ WebCore::Settings::usesDashboardCompatibilityMode() is true.
+ (-[WebView _preferencesChangedNotification:]):
+ (-[WebView _setDashboardBehavior:to:]): Enable pre-HTML5 parser quirks
+ if Dashboard behavior is set to backward compatibility mode.
+
+2010-09-23 Matthew Delaney <mdelaney@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Reduce minimum DOMTimer interval
+ https://bugs.webkit.org/show_bug.cgi?id=45362
+
+ * WebView/WebView.mm:
+ Updating set interval call to use Settings' static version inside
+ one time init block.
+
+2010-09-22 Andy Estes <aestes@apple.com>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION (r61285): Microsoft Entourage 2008 does not invoke My Day window
+ https://bugs.webkit.org/show_bug.cgi?id=46334
+
+ Microsoft My Day loads scripts using self-closing script tags, markup
+ which is incompatible with the HTML5 parser. Enable parser quirks for
+ this application.
+
+ * WebView/WebView.mm:
+ (shouldUsePreHTML5ParserQuirks): Return true if the application is
+ Microsoft My Day and was linked against a version of WebKit prior to the
+ introduction of the HTML5 parser.
+
+2010-09-23 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Add hyperlink auditing settings (i.e., <a ping>).
+ https://bugs.webkit.org/show_bug.cgi?id=30458
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences setMemoryInfoEnabled:]):
+ (-[WebPreferences hyperlinkAuditingEnabled]):
+ (-[WebPreferences setHyperlinkAuditingEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-09-22 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=43667
+ ASSERT failure in NetscapePluginInstanceProxy::disconnectStream
+
+ Test: plugins/get-javascript-url.html
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::evaluateJavaScript): Add the stream to m_streams, just
+ like any other one.
+
+2010-09-21 Darin Adler <darin@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Fix some Objective-C GC problems and use RetainPtr instead of HardRetain/Release
+ https://bugs.webkit.org/show_bug.cgi?id=46220
+
+ * Misc/WebNSFileManagerExtras.m:
+ (setMetaData): Use CFRelease instead of HardRelease.
+ (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]): Use CFStringCreateCopy
+ instead of -[NSObject copy] combined with HardRetainWithNSRelease.
+
+2010-09-22 Balazs Kelemen <kb@inf.u-szeged.hu>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ PluginStrategy should satisfy the needs of Qt
+ https://bugs.webkit.org/show_bug.cgi?id=45857
+ No new functionality so no new tests.
+
+ * WebCoreSupport/WebPlatformStrategies.h:
+ * WebCoreSupport/WebPlatformStrategies.mm:
+ (WebPlatformStrategies::getPluginInfo):
+
+2010-09-22 Paul Knight <pknight@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ -[WebView _scheduleCompositingLayerSync] should wake the run loop
+ https://bugs.webkit.org/show_bug.cgi?id=46226
+
+ Call CFRunLoopWakeUp to make sure the run loop is not sleeping, which could delay layer painting.
+
+ * WebView/WebView.mm:
+ (-[WebView _scheduleCompositingLayerSync]):
+
+2010-09-21 Andy Estes <aestes@apple.com>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION (r61285): AIM 2.1.296: Code rendered as text in Welcome screen
+ https://bugs.webkit.org/show_bug.cgi?id=46134
+
+ AIM clients linked against versions of WebKit prior to the introduction
+ of the HTML5 parser contain markup incompatible with the new parser.
+ Enable parser quirks in this case to remain compatible with these
+ clients.
+
+ * WebView/WebView.mm:
+ (shouldUsePreHTML5ParserQuirks): Returns true if the embedding
+ application is AIM and was linked against a version of WebKit prior to
+ the introduction of the HTML5 parser, or if the
+ WebKitPreHTML5ParserQuirks WebPreference is enabled.
+ (-[WebView _preferencesChangedNotification:]): Call
+ WebCore::Settings::setUsePreHTML5ParserQuirks().
+
+2010-09-21 Steve Block <steveblock@google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ DeviceOrientationClient and DeviceMotionClient should have controllerDestroyed() methods
+ https://bugs.webkit.org/show_bug.cgi?id=45891
+
+ Implements WebDeviceOrientationClient::deviceOrientationControllerDestroyed to delete the client.
+
+ * WebCoreSupport/WebDeviceOrientationClient.h:
+ * WebCoreSupport/WebDeviceOrientationClient.mm:
+ (WebDeviceOrientationClient::deviceOrientationControllerDestroyed):
+
+2010-09-20 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Eric Carlson.
+
+ [GTK] enhanced context menu for media elements
+ https://bugs.webkit.org/show_bug.cgi?id=45021
+
+ New localized strings for the media element context-menu.
+
+ * WebCoreSupport/WebPlatformStrategies.h:
+ * WebCoreSupport/WebPlatformStrategies.mm:
+ (WebPlatformStrategies::contextMenuItemTagOpenVideoInNewWindow):
+ (WebPlatformStrategies::contextMenuItemTagOpenAudioInNewWindow):
+ (WebPlatformStrategies::contextMenuItemTagCopyVideoLinkToClipboard):
+ (WebPlatformStrategies::contextMenuItemTagCopyAudioLinkToClipboard):
+ (WebPlatformStrategies::contextMenuItemTagToggleMediaControls):
+ (WebPlatformStrategies::contextMenuItemTagToggleMediaLoop):
+ (WebPlatformStrategies::contextMenuItemTagEnterVideoFullscreen):
+ (WebPlatformStrategies::contextMenuItemTagMediaPlay):
+ (WebPlatformStrategies::contextMenuItemTagMediaPause):
+ (WebPlatformStrategies::contextMenuItemTagMediaMute):
+
+2010-09-20 Andy Estes <aestes@apple.com>
+
+ Reviewed by Adam Barth.
+
+ REGRESSION (HTML5 Parser): Pages broken due to <tag<tag> parsing changes
+ https://bugs.webkit.org/show_bug.cgi?id=40961
+
+ Implement WebKitUsePreHTML5ParserQuirks preference.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]): Default WebKitUsePreHTML5ParserQuirks to
+ false.
+ (-[WebPreferences usePreHTML5ParserQuirks]):
+ (-[WebPreferences setUsePreHTML5ParserQuirks:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]): Update WebCore::Settings
+ with the value of WebKitUsePreHTML5ParserQuirks when a preference
+ changes.
+
+2010-09-20 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Pasteboard doesn't work in WebKit2.
+ https://bugs.webkit.org/show_bug.cgi?id=42317
+ <rdar://problem/7660537>
+
+ Some changes to fix style inconsistencies.
+ Added OBJC 2.0 style enumeration.
+
+ * WebCoreSupport/WebEditorClient.h:
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::userVisibleString):
+ (createExcludedElementsForAttributedStringConversion):
+ (WebEditorClient::documentFragmentFromAttributedString): Changed parameter to be
+ a Vector of RefPtr.
+ (WebEditorClient::setInsertionPasteboard):
+ (WebEditorClient::pasteboardTypesForSelection):
+
+2010-09-17 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=45993, convert printing to the new pagination model.
+
+ Make printing store the page height in the RenderView and push that into the layout state to
+ use the new pagination model. The old pagination model is retained because it is still used
+ for embedded WebViews.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _adjustedBottomOfPageWithTop:bottom:limit:]):
+
+2010-09-17 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ REGRESSION (r60104): Zoom level is unexpectedly reset on page reload
+ https://bugs.webkit.org/show_bug.cgi?id=42863
+
+ * WebView/WebView.mm:
+ (-[WebView _setZoomMultiplier:isTextOnly:]):
+ Call functions on Frame instead of FrameView.
+
+2010-09-17 Matthew Delaney <mdelaney@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Reduce minimum DOMTimer interval
+ https://bugs.webkit.org/show_bug.cgi?id=45362
+
+ * WebView/WebView.mm: Added in a call to set the mimimum allowed DOMTimer to 4ms.
+
+2010-09-17 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Add WebKitAccelerated2dCanvasEnabled flag to WebKit for Mac
+ https://bugs.webkit.org/show_bug.cgi?id=45911
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences accelerated2dCanvasEnabled]):
+ (-[WebPreferences setAccelerated2dCanvasEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-09-17 Jia Pu <jpu@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ WebKit should use system wide spell checking preference when application specific one isn't set.
+ https://bugs.webkit.org/show_bug.cgi?id=45789
+ <rdar://problem/8416041>
+
+ * WebView/WebView.mm:
+ (+[WebView initialize]): Use system wide autocorrection and text substitution preferences
+ when the application level preferences are not set.
+
+2010-09-16 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/8395558>
+ https://bugs.webkit.org/show_bug.cgi?id=45938
+ _web_makePluginViewsPerformSelector:: mutates subviews array while iterating it
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _web_makePluginSubviewsPerformSelector:withObject:]):
+ Converted from -[NSArray _web_makePluginViewsPerformSelector:withObject:]. The old method
+ was only ever called on the result of -[WebHTMLView subviews]. By moving that knowledge into
+ this helper method, it can't be used incorrectly. Now it makes a copy of [WebHTMLView subviews]
+ before enumerating it, to ensure that the selector can't mutate the array being enumerated.
+ (-[WebHTMLView viewWillMoveToHostWindow:]):
+ Updated for _web_makePluginSubviewsPerformSelector:: signature change.
+ (-[WebHTMLView viewDidMoveToHostWindow]):
+ Ditto.
+
+2010-09-16 Darin Adler <darin@apple.com>
+
+ Reviewed by Andreas Kling.
+
+ Reduce use of HTMLInputElement::inputType so we can remove it later
+ https://bugs.webkit.org/show_bug.cgi?id=45903
+
+ * WebView/WebHTMLRepresentation.mm:
+ (-[WebHTMLRepresentation elementDoesAutoComplete:]): Use isPasswordField.
+ (-[WebHTMLRepresentation elementIsPassword:]): Use isPasswordField.
+
+2010-09-16 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Darin Adler.
+
+ Always use a valid string when setting WebKitUserStyleSheetLocationPreferenceKey.
+ https://bugs.webkit.org/show_bug.cgi?id=41510
+
+ This prevents usage of nil value, which would cause an uncaught exception.
+
+ * WebView/WebPreferences.mm:
+ (-[WebPreferences setUserStyleSheetLocation:]):
+
+2010-09-16 Dan Bernstein <mitz@apple.com>
+
+ Reverted the previous change because r67628 has been reverted.
+
+ * WebCoreSupport/WebPlatformStrategies.h:
+ * WebCoreSupport/WebPlatformStrategies.mm:
+
+2010-09-16 Dan Bernstein <mitz@apple.com>
+
+ Build fix after r67628. Added context menu item localizable strings for the items
+ added in r67628, following equivalent menu items in Mac OS X when possible. However,
+ this set of menu items does not make much sense for Mac OS X, and this should be
+ addressed separately.
+
+ * WebCoreSupport/WebPlatformStrategies.h:
+ * WebCoreSupport/WebPlatformStrategies.mm:
+ (WebPlatformStrategies::contextMenuItemTagOpenMediaInNewWindow):
+ (WebPlatformStrategies::contextMenuItemTagCopyMediaLinkToClipboard):
+ (WebPlatformStrategies::contextMenuItemTagToggleMediaControls):
+ (WebPlatformStrategies::contextMenuItemTagToggleMediaLoop):
+ (WebPlatformStrategies::contextMenuItemTagEnterVideoFullscreen):
+ (WebPlatformStrategies::contextMenuItemTagMediaPlay):
+ (WebPlatformStrategies::contextMenuItemTagMediaPause):
+ (WebPlatformStrategies::contextMenuItemTagMediaMute):
+ (WebPlatformStrategies::contextMenuItemTagMediaUnMute):
+
+2010-09-16 Eric Uhrhane <ericu@chromium.org>
+
+ Reviewed by Jian Li.
+
+ Unify FILE_SYSTEM and FILE_WRITER enables under the name FILE_SYSTEM.
+ https://bugs.webkit.org/show_bug.cgi?id=45798
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-09-15 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Adam Roben.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44715
+ maps.google.com flips upside down when zooming map using trackpad in WebKit2 on Mac
+
+ Move geometry flipping to platform-specific code.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView attachRootLayer:]):
+
+2010-09-14 Jia Pu <jpu@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Only intercept ESC key press when autocorrection UI is visible.
+ https://bugs.webkit.org/show_bug.cgi?id=45071
+
+ * WebCoreSupport/WebEditorClient.h: Added declaration of isShowingCorrectionPanel(),
+ which provides an inteface to query whether autocorrection panel is shown.
+
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::WebEditorClient): Defined a constant, InvalidCorrectionPanelTag,
+ for invalid correction panel tag. Replaced -1 with this constant.
+ (WebEditorClient::dismissCorrectionPanel): Ditto
+ (WebEditorClient::isShowingCorrectionPanel): Query whether autocorrection panel is shown.
+
+2010-09-14 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Part of <rdar://problem/8420003>. Make it possible to override the version number used in linked-in-or-after checks.
+
+ * Misc/WebKitVersionChecks.h: Remove two unused functions from the header and add a method to set the overriden version.
+ * Misc/WebKitVersionChecks.m:
+ (WebKitLinkedOnOrAfter):
+ (setWebKitLinkTimeVersion): Set the overridden version.
+ (WebKitLinkTimeVersion): Return the overridden version if set, otherwise do the old thing.
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences setWebKitLinkTimeVersion:]): Call through to set the overridden version.
+ * WebView/WebPreferencesPrivate.h:
+
+2010-09-14 Eric Seidel <eric@webkit.org>
+
+ Unreviewed, reverting changes r67451 and r67451.
+ Broke lots of builders.
+
+ Only intercept ESC key press when autocorrection UI is visible.
+ https://bugs.webkit.org/show_bug.cgi?id=45071
+
+ * WebCoreSupport/WebEditorClient.h:
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::WebEditorClient):
+ (WebEditorClient::dismissCorrectionPanel):
+
+2010-09-14 Jia Pu <jpu@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Only intercept ESC key press when autocorrection UI is visible.
+ https://bugs.webkit.org/show_bug.cgi?id=45071
+
+ * WebCoreSupport/WebEditorClient.h: Added declaration of isShowingCorrectionPanel(),
+ which provides an inteface to query whether autocorrection panel is shown.
+
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::WebEditorClient): Defined a constant, InvalidCorrectionPanelTag,
+ for invalid correction panel tag. Replaced -1 with this constant.
+ (WebEditorClient::dismissCorrectionPanel): Ditto
+ (WebEditorClient::isShowingCorrectionPanel): Query whether autocorrection panel is shown.
+
+2010-09-13 Darin Adler <darin@apple.com>
+
+ Reviewed by Adam Barth.
+
+ Preparation for eliminating deprecatedParseURL
+ https://bugs.webkit.org/show_bug.cgi?id=45695
+
+ * DOM/WebDOMOperations.mm:
+ (-[DOMDocument webFrame]): Get rid of unneeded local variable.
+ (-[DOMDocument URLWithAttributeString:]): Remove unhelpful comment.
+
+2010-09-13 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Paste should be implemented in WebCore like Copy and Cut for Mac also.
+ https://bugs.webkit.org/show_bug.cgi?id=45494
+ <rdar://problem/7660537>
+
+ On the Mac platform, the implementation of the paste operation is all done
+ at the WebKit level. In order to support it on WebKit2 it is necessary to
+ refactor the code and move this functionality at the level of WebCore like
+ we already have on Windows.
+ The original code relies on some in AppKit functions that call back into
+ WebKit causing problems in WebKit2. All this functionality has been moved
+ at the level of the editor client where it can be dealt with appropriately.
+
+ * WebCoreSupport/WebEditorClient.h:
+ * WebCoreSupport/WebEditorClient.mm:
+ (excludedElementsForAttributedStringConversion):
+ (WebEditorClient::documentFragmentFromAttributedString): Added.
+ (WebEditorClient::setInsertionPasteboard):
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::canShowMIMETypeAsHTML): Re-implemented at the level
+ of the editor client.
+ * WebView/WebHTMLView.mm: Removed paste method.
+
+2010-09-13 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Adam Roben.
+
+ https://bugs.webkit.org/show_bug.cgi?id=45677
+ [WebView canMarkAllTextMatches] can crash if called after [WebView close]
+
+ <rdar://problem/8404890>
+
+ * WebView/WebView.mm:
+ (-[WebView canMarkAllTextMatches]):
+ Return NO immediately if the webview has already been closed. This was an overlooked
+ case from the fix for 45175.
+
+2010-09-10 MORITA Hajime <morrita@google.com>
+
+ Reviewed by Tony Chang.
+
+ [Chromium] Implement textInputController.hasSpellingMarker() for Chromium
+ https://bugs.webkit.org/show_bug.cgi?id=45441
+
+ Moved the actual logic of hasSpellingMarker into WebCore to share
+ it with other ports.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame hasSpellingMarker:length:]):
+
+2010-09-11 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Sam Weinig.
+
+ Make SecurityOrigin::canDisplay an instance function
+ https://bugs.webkit.org/show_bug.cgi?id=45219
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::loadRequest):
+ * Plugins/WebNetscapePluginStream.mm:
+ (WebNetscapePluginStream::WebNetscapePluginStream):
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
+ * Plugins/WebPluginContainerCheck.mm:
+ (-[WebPluginContainerCheck _isForbiddenFileLoad]):
+ * WebView/WebFrame.mm:
+ (-[WebFrame _allowsFollowingLink:]):
+
+2010-09-10 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Remove unnecessary constraint in WebCore of choosing either text zoom or full page zoom.
+ Precursor to <rdar://problem/7660657>
+ https://bugs.webkit.org/show_bug.cgi?id=45522
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+ (-[WebView _setZoomMultiplier:isTextOnly:]):
+ (-[WebView _realZoomMultiplierIsTextOnly]):
+ * WebView/WebViewData.h:
+ * WebView/WebViewData.mm:
+ (-[WebViewPrivate init]):
+ Move tracking of text only zoom here from WebCore.
+
+2010-09-10 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Refactor JavaScriptCore memory statistics so that WebKit doesn't need to know about the JIT and
+ other implementation details of JavaScriptCore. Necessary to fix PPC build.
+
+ https://bugs.webkit.org/show_bug.cgi?id=45528
+
+ * Misc/WebCoreStatistics.mm:
+ (+[WebCoreStatistics memoryStatistics]):
+
+2010-09-10 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Move some Dashboard stuff from WebCore to WebKit along with a bit more FrameMac cleanup
+ https://bugs.webkit.org/show_bug.cgi?id=45582
+
+ * MigrateHeaders.make: Removed WebDashboardRegion.h from the set of header to copy.
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::dashboardRegionsChanged): Changed this to call
+ -[WebView _dashboardRegions] so we don't have two copies of that code.
+
+ * WebView/WebDashboardRegion.h: Copied from WebCore/page/mac/WebDashboardRegion.h.
+ * WebView/WebDashboardRegion.mm: Copied from WebCore/page/mac/WebDashboardRegion.m.
+
+ * WebView/WebView.mm:
+ (-[WebView _dashboardRegions]): Moved the code from Frame::dashboardRegions here.
+
+2010-09-10 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Fisher.
+
+ Move code from WebKit-layer to DocumentLoader
+ https://bugs.webkit.org/show_bug.cgi?id=45569
+
+ This code is the most confused, but now should be a bit cleaner.
+ There's still a magical fake-setting for creating renderers that needs
+ to be cleaned up, but we can do that in a separate patch.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _commitData:]):
+ * WebView/WebFrameInternal.h:
+ * WebView/WebHTMLRepresentation.mm:
+ (-[WebHTMLRepresentation receivedData:withDataSource:]):
+ (-[WebHTMLRepresentation finishedLoadingWithDataSource:]):
+
+2010-09-09 Darin Adler <darin@apple.com>
+
+ Reviewed by Adam Barth.
+
+ Move functions from Frame to SelectionController as planned
+ https://bugs.webkit.org/show_bug.cgi?id=45508
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _selectionGranularity]):
+ (-[WebFrame _insertParagraphSeparatorInQuotedContent]):
+ (-[WebFrame _typingStyle]):
+ (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
+ * WebView/WebHTMLRepresentation.mm:
+ (-[WebHTMLRepresentation currentForm]):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView jumpToSelection:]):
+ (-[WebHTMLView centerSelectionInVisibleArea:]):
+ (-[WebHTMLView _canSmartCopyOrDelete]):
+ (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
+ (-[WebHTMLView selectionRect]):
+ (-[WebHTMLView selectionTextRects]):
+ (-[WebHTMLView selectionImageRect]):
+ * WebView/WebView.mm:
+ (-[WebView setEditable:]):
+ Call functions on selection().
+
+2010-09-10 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Main resource bytes shouldn't bounce through FrameLoader
+ https://bugs.webkit.org/show_bug.cgi?id=45496
+
+ Now return the bytes to the DocumentLoader.
+
+ Previously, we were checking the document for null. However, Frame can
+ never have a null document, so this check is no longer needed.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _addData:]):
+
+2010-09-09 John Therrell <jtherrell@apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Added statistics sampling and reporting for JavaScriptCore's RegisterFile and ExecutableAllocator classes
+ https://bugs.webkit.org/show_bug.cgi?id=45134
+
+ Added ability to enable new JavaScriptCore statistics sampling and reporting for RegisterFile
+ and ExecutableAllocator classes. Added reporting of JavaScriptCore's stack committed memory
+ and JIT code committed memory statistics to WebCoreStatistics memoryStatistics.
+
+ * Misc/WebCoreStatistics.mm:
+ (+[WebCoreStatistics memoryStatistics]):
+ Added statistics reporting for JSC RegisterFile and ExecutableAllocator.
+
+2010-09-09 Jer Noble <jer.noble@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Use of ENABLE macro in WebUIDelegatePrivate.h breaks use from outside WebKit
+ <rdar://problem/8412657>
+
+ * WebView/WebUIDelegatePrivate.h: Use ENABLE_FULLSCREEN_API instead of ENABLE(FULLSCREEN_API)
+
+2010-09-08 Darin Adler <darin@apple.com>
+
+ Reviewed by Adam Barth.
+
+ Move functions from Frame to Editor as planned
+ https://bugs.webkit.org/show_bug.cgi?id=45218
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _selectedString]):
+ (-[WebFrame _firstRectForDOMRange:]):
+ (-[WebFrame _markDOMRange]):
+ (-[WebFrame _setTypingStyle:withUndoAction:]):
+ * WebView/WebHTMLRepresentation.mm:
+ (-[WebHTMLRepresentation finishedLoadingWithDataSource:]):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _selectionStartFontAttributesAsRTF]):
+ (-[WebHTMLView toggleBaseWritingDirection:]):
+ (-[WebHTMLView searchFor:direction:caseSensitive:wrap:startInSelection:]):
+ (-[WebHTMLView countMatchesForText:caseSensitive:limit:markMatches:]):
+ (-[WebHTMLView setMarkedTextMatchesAreHighlighted:]):
+ (-[WebHTMLView markedTextMatchesAreHighlighted]):
+ * WebView/WebView.mm:
+ (-[WebView setEditable:]):
+ Changed call sites to use editor().
+
+2010-09-08 MORITA Hajime <morrita@google.com>
+
+ Reviewed by Tony Chang.
+
+ spelling underline gets lost on backspace
+ https://bugs.webkit.org/show_bug.cgi?id=41423
+
+ Switched to use a anchorNode of the selection instead of a focused
+ node for finer control of node selection in spellingNode():
+ With the focused node, we cannot select other nodes but the first
+ child of that node. In some case, we need to inspect these.
+
+ The API is only for LayoutTests, and the change is compatible for
+ existing test cases.
+
+ * WebView/WebFrame.mm:
+ (spellingNode):
+
+2010-09-08 Adam Barth <abarth@webkit.org>
+
+ Rubber-stamped by Eric Seidel.
+
+ Rename DocLoader to CachedResourceLoader because that's what it does.
+
+ * WebView/WebFrame.mm:
+
+2010-09-07 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Fix clang++ build.
+
+ * Misc/WebLocalizableStrings.h:
+ Fix a struct/tag mismatch.
+
+ * WebView/WebDeviceOrientationProviderMock.mm:
+ (-[WebDeviceOrientationProviderMock init]):
+ Remove stray semicolon.
+
+ * WebView/WebViewData.h:
+ Remove unused class forward declaration.
+
+2010-09-07 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/8381749> -Wcast-align warning emitted when building with clang
+
+ Remove the -Wcast-align-warning since it isn't really useful, and clang is more aggressive about warning than gcc.
+
+ * Configurations/Base.xcconfig:
+
+2010-09-06 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Rename SecurityOrigin::canLoad to canDisplay
+ https://bugs.webkit.org/show_bug.cgi?id=45214
+
+ Propagate name change.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::loadRequest):
+ * Plugins/WebNetscapePluginStream.mm:
+ (WebNetscapePluginStream::WebNetscapePluginStream):
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
+ * Plugins/WebPluginContainerCheck.mm:
+ (-[WebPluginContainerCheck _isForbiddenFileLoad]):
+ * WebView/WebFrame.mm:
+ (-[WebFrame _allowsFollowingLink:]):
+
+2010-09-03 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
+
+ Reviewed by Darin Adler.
+
+ Add NetworkingContext to avoid layer violations
+ https://bugs.webkit.org/show_bug.cgi?id=42292
+
+ Add Mac's specific implementation of FrameNetworkingContext.
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ * WebCoreSupport/WebFrameNetworkingContext.mm:
+ (WebFrameNetworkingContext::needsSiteSpecificQuirks):
+ (WebFrameNetworkingContext::localFileContentSniffingEnabled):
+ (WebFrameNetworkingContext::scheduledRunLoopPairs):
+ (WebFrameNetworkingContext::blockedError):
+
+2010-09-03 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=45175
+ [WebView unmarkAllTextMatches] will crash if the webview is already closed
+
+ Made this and related methods robust against being called when the WebView is closed.
+
+ * WebView/WebView.mm:
+ (-[WebView markAllMatchesForText:caseSensitive:highlight:limit:]):
+ Bail out if the WebView is closed.
+ (-[WebView countMatchesForText:caseSensitive:highlight:limit:markMatches:]):
+ Ditto.
+ (-[WebView unmarkAllTextMatches]):
+ Ditto.
+ (-[WebView rectsForTextMatches]):
+ Ditto.
+
+2010-09-03 Hironori Bono <hbono@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ Adds textInputController.hasSpellingMarker() to avoid using pixel tests for spellchecking tests
+ and implements it for Mac.
+ https://bugs.webkit.org/show_bug.cgi?id=41832
+
+ * WebView/WebFrame.mm: Implemented [WebFrame hasSpellingMarker:length:].
+ (spellingNode):
+ (-[WebFrame hasSpellingMarker:length:]):
+ * WebView/WebFramePrivate.h: Added [WebFrame hasSpellingMarker:length:] so TextInputController can use it.
+
+2010-09-02 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+ https://bugs.webkit.org/show_bug.cgi?id=44230
+
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorFrontendClient::closeWindow):
+ (WebInspectorFrontendClient::disconnectFromBackend):
+ (-[WebInspectorWindowController windowShouldClose:]):
+ (-[WebInspectorWindowController destroyInspectorView:]):
+
+2010-09-02 Steve Block <steveblock@google.com>
+
+ Reviewed by Adam Barth.
+
+ Hook up LayoutTestController.setMockDeviceOrientation() on Mac.
+ https://bugs.webkit.org/show_bug.cgi?id=43181
+
+ This patch hooks up the mock device orientation client on Mac for use
+ in DumpRenderTree.
+
+ The patch adds a new WebDeviceOrientationClient for Mac. This client acts
+ as a proxy to either a real or mock device orientation provider, both of
+ which implement a new WebDeviceOrientationProvider interface.
+
+ The provider is created by the embedder and passed to the WebView, from
+ where WebDeviceOrientationClient can access it.
+
+ The mock provider, WebDeviceOrientationProviderMock, is a wrapper around
+ the existing WebCore mock.
+
+ * WebCoreSupport/WebDeviceOrientationClient.h: Added.
+ * WebCoreSupport/WebDeviceOrientationClient.mm: Added.
+ (WebDeviceOrientationClient::WebDeviceOrientationClient):
+ (WebDeviceOrientationClient::setController):
+ (WebDeviceOrientationClient::startUpdating):
+ (WebDeviceOrientationClient::stopUpdating):
+ (WebDeviceOrientationClient::lastOrientation):
+ * WebKit.exp:
+ * WebView/WebDeviceOrientation.h: Added.
+ * WebView/WebDeviceOrientation.mm: Added.
+ (-[WebDeviceOrientation initWithCoreDeviceOrientation:WebCore::]):
+ (core):
+ (-[WebDeviceOrientation initWithCanProvideAlpha:alpha:canProvideBeta:beta:canProvideGamma:gamma:]):
+ (-[WebDeviceOrientation dealloc]):
+ * WebView/WebDeviceOrientationInternal.h: Added.
+ * WebView/WebDeviceOrientationProvider.h: Added.
+ * WebView/WebDeviceOrientationProviderMock.h: Added.
+ * WebView/WebDeviceOrientationProviderMock.mm: Added.
+ (-[WebDeviceOrientationProviderMockInternal setOrientation:]):
+ (-[WebDeviceOrientationProviderMockInternal setController:]):
+ (-[WebDeviceOrientationProviderMockInternal startUpdating]):
+ (-[WebDeviceOrientationProviderMockInternal stopUpdating]):
+ (-[WebDeviceOrientationProviderMockInternal lastOrientation]):
+ (-[WebDeviceOrientationProviderMock init]):
+ (-[WebDeviceOrientationProviderMock dealloc]):
+ (-[WebDeviceOrientationProviderMock setOrientation:]):
+ (-[WebDeviceOrientationProviderMock setController:]):
+ (-[WebDeviceOrientationProviderMock startUpdating]):
+ (-[WebDeviceOrientationProviderMock stopUpdating]):
+ (-[WebDeviceOrientationProviderMock lastOrientation]):
+ * WebView/WebDeviceOrientationProviderMockInternal.h: Added.
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+ (-[WebView _setDeviceOrientationProvider:]):
+ (-[WebView _deviceOrientationProvider]):
+ * WebView/WebViewData.h:
+ * WebView/WebViewPrivate.h:
+
+2010-09-01 Jia Pu <jpu@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Add support for autocorrection UI on Mac OS X.
+ https://bugs.webkit.org/show_bug.cgi?id=44958
+ <rdar://problem/7326847>
+
+ See detailed high level description in WebCore/ChangeLog.
+
+ * WebCoreSupport/WebEditorClient.h: Added new member methods declared in
+ EditorClient. Added m_correctionPanelTag to store the ID of current autocorrection UI object.
+
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::WebEditorClient): Initialize m_correctionPanelTag.
+ (WebEditorClient::~WebEditorClient): Make sure the autocorrection UI is
+ dismissed before destroying the object.
+ (WebEditorClient::respondToChangedSelection): Dismiss autocorrection UI whenever the selection changes.
+ (WebEditorClient::showCorrectionPanel): Show autocorrection UI.
+ (WebEditorClient::dismissCorrectionPanel): Dismiss autocorrection UI.
+
+2010-09-01 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Adam Roben.
+
+ <rdar://problem/8374711> WebKit needs to compile without access to QuickDraw private headers.
+
+ * Carbon/HIViewAdapter.m:
+ * Carbon/HIWebView.mm:
+ * Misc/QuickDrawCompatibility.h: Added.
+ * Plugins/WebNetscapePluginView.mm:
+
+2010-08-31 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44863, disentangle style recalc from layout, so that
+ the former can occur in more places without having to do the latter.
+
+ Eliminate Mac-specific code for style re-application and recursive layout/style updating in
+ favor of the cross-platform code that all the other ports use.
+
+ * Carbon/HIWebView.mm:
+ (Draw):
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::forceLayout):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _propagateDirtyRectsToOpaqueAncestors]):
+ (-[WebHTMLView viewWillDraw]):
+ (-[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
+ (-[WebHTMLView _recursiveDisplayAllDirtyWithLockFocus:visRect:]):
+ (-[WebHTMLView _recursive:displayRectIgnoringOpacity:inContext:topView:]):
+ (-[WebHTMLView reapplyStyles]):
+ (-[WebHTMLView layoutToMinimumPageWidth:height:maximumPageWidth:adjustingViewSize:]):
+ (-[WebHTMLView setNeedsToApplyStyles:]):
+ (-[WebHTMLView _setPrinting:minimumPageWidth:height:maximumPageWidth:adjustViewSize:paginateScreenContent:]):
+ (-[WebHTMLView _layoutIfNeeded]):
+ (-[WebHTMLView _web_updateLayoutAndStyleIfNeededRecursive]):
+ * WebView/WebHTMLViewInternal.h:
+ * WebView/WebView.mm:
+ (-[WebView _viewWillDrawInternal]):
+
+2010-08-31 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Add ability to count text matches without marking
+ https://bugs.webkit.org/show_bug.cgi?id=43996
+
+ Safari needs to be able to count text matches without triggering lots of repainting.
+ Rename markAllMatchesForText: to countMatchesForText: and add a markMatches:
+ parameter. For backwards compatibility markAllMatchesForText: calls
+ countMatchesForText: and passes YES for markMatches:.
+
+ * WebView/WebDocumentInternal.h:
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView markAllMatchesForText:caseSensitive:limit:]):
+ (-[WebHTMLView countMatchesForText:caseSensitive:limit:markMatches:]):
+ * WebView/WebPDFView.mm:
+ (-[WebPDFView markAllMatchesForText:caseSensitive:limit:]):
+ (-[WebPDFView countMatchesForText:caseSensitive:limit:markMatches:]):
+ * WebView/WebView.mm:
+ (-[WebView markAllMatchesForText:caseSensitive:highlight:limit:]):
+ (-[WebView countMatchesForText:caseSensitive:highlight:limit:markMatches:]):
+ * WebView/WebViewPrivate.h:
+
+2010-08-31 Darin Adler <darin@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ * WebInspector/WebInspectorFrontend.mm:
+ (-[WebInspectorFrontend initWithFrontendClient:]): Remove a stray semicolon.
+
+2010-08-30 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/8369736> WebKit build fails.
+
+ Temporarily add some extra includes in order to get things building again until <rdar://problem/8374711> is addressed.
+
+ * Carbon/HIViewAdapter.m:
+ * Carbon/HIWebView.mm:
+ * Plugins/WebNetscapePluginView.mm:
+
+2010-08-30 Andy Estes <aestes@apple.com>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION (r66156): Sites using AppleConnect for authentication fail to log in.
+ https://bugs.webkit.org/show_bug.cgi?id=44865
+
+ After http://trac.webkit.org/changeset/66156, sites using the AppleConnect plug-in
+ for authentication fail to log in. This is due to a bug in AppleConnect that r66156
+ exposed, but since this will have a significant impact on users of WebKit nightly
+ builds, a plugin-specific hack should be added while the underlying issue is being
+ addressed.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createPlugin): Convert plug-in parameter names to lowercase
+ if the plugin is of type 'application/x-snkp'.
+
+2010-08-27 Jer Noble <jer.noble@apple.com>
+
+ Reviewed by Eric Carlson.
+
+ text/plain non-video files cause <video> to hang (while reading them?)
+ https://bugs.webkit.org/show_bug.cgi?id=44212
+
+ Add the new WebKitSystemInterface function WKQTMovieDisableComponent to
+ the initialization routine.
+
+ * WebCoreSupport/WebSystemInterface.mm:
+ (InitWebCoreSystemInterface): Initialize WKQTMovieDisableComponent.
+
+2010-08-30 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r66198.
+ http://trac.webkit.org/changeset/66198
+ https://bugs.webkit.org/show_bug.cgi?id=44856
+
+ It made tests crash on Qt bot (Requested by Ossy_ on #webkit).
+
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorFrontendClient::closeWindow):
+ (-[WebInspectorWindowController windowShouldClose:]):
+ (-[WebInspectorWindowController destroyInspectorView]):
+
+2010-08-28 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Make an internal method used by Apple Mail into SPI
+ https://bugs.webkit.org/show_bug.cgi?id=44832
+ rdar://problem/5748951
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _smartInsertForString:replacingRange:beforeString:afterString:]): Moved this method
+ from the internal section to the private section.
+ * WebView/WebFrameInternal.h: Moved the method declaration out of here.
+ * WebView/WebFramePrivate.h: Moved the method declaration in here.
+
+2010-08-27 Jer Noble <jer.noble@apple.com>
+
+ Reviewed by Eric Carlson.
+
+ Add JavaScript API to allow a page to go fullscreen.
+ rdar://problem/6867795
+
+ Added chrome client overrides which support entering and exiting full screen. A new preference has
+ been added (setFullScreenEnabled:) to control at runtime whether full screen support is enabled
+ (defaults to disabled). Added a new WebKitFullScreenListener callback object which notifies WebCore
+ when the chrome has started/finished its full screen animation.
+
+ * Configurations/FeatureDefines.xcconfig:
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::supportsFullscreenForElement):
+ (WebChromeClient::enterFullscreenForElement):
+ (WebChromeClient::exitFullscreenForElement):
+ (-[WebKitFullScreenListener initWithElement:]):
+ (-[WebKitFullScreenListener webkitWillEnterFullScreen]):
+ (-[WebKitFullScreenListener webkitDidEnterFullScreen]):
+ (-[WebKitFullScreenListener webkitWillExitFullScreen]):
+ (-[WebKitFullScreenListener webkitDidExitFullScreen]):
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences setFullScreenEnabled:]):
+ (-[WebPreferences fullScreenEnabled]):
+ * WebView/WebUIDelegatePrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-08-27 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44788, implement HTML5-compliant doctype switching.
+
+ Rename the various modes to match the HTML5 specification:
+ ParseMode -> CompatibilityMode
+ CompatMode -> QuirksMode
+ AlmostStrictMode -> LimitedQuirksMode
+ StrictMode -> NoQuirksMode
+
+ Remove the htmlHacks() accessor from RenderStyle and make rendering code just go to the document
+ instead. This makes switching modes avoid forcing all RenderStyles to detect as changed.
+
+ Clean up user stylesheets to minimize style recalculation when the mode is switched.
+
+ Fix bugs with the propagation of correct modes in the HTML5 parser. Make sure the
+ dummy document created for fragment parsing properly inherits the real document's CompatibilityMode.
+ Make sure the tree builder properly changes the insertion mode to "BeforeHTML" after handling
+ a doctype token.
+
+ determineParseMode -> setCompatibilityModeFromDoctype, and it now implements the HTML5 algorithm
+ precisely.
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-08-27 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+ https://bugs.webkit.org/show_bug.cgi?id=44230
+
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorFrontendClient::closeWindow):
+ (WebInspectorFrontendClient::disconnectFromBackend):
+ (-[WebInspectorWindowController windowShouldClose:]):
+ (-[WebInspectorWindowController destroyInspectorView:]):
+
+2010-08-26 Yury Semikhatsky <yurys@chromium.org>
+
+ Unreviewed. Revert r66103 since Qt tests are failing.
+
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorFrontendClient::closeWindow):
+ (-[WebInspectorWindowController windowShouldClose:]):
+ (-[WebInspectorWindowController destroyInspectorView]):
+
+2010-08-26 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+ https://bugs.webkit.org/show_bug.cgi?id=44230
+
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorFrontendClient::closeWindow):
+ (WebInspectorFrontendClient::disconnectFromBackend):
+ (-[WebInspectorWindowController windowShouldClose:]):
+ (-[WebInspectorWindowController destroyInspectorView:]):
+
+2010-08-24 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Remove HTML5 parser testing infrastructure now that we don't need it
+ https://bugs.webkit.org/show_bug.cgi?id=44581
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-08-24 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ Paste event fires twice for mac WebKit
+ <rdar://problem/8094611>
+ https://bugs.webkit.org/show_bug.cgi?id=44535
+
+ The mac implementation of paste in WebKit was accidentally calling
+ Editor::tryDHTMLPaste twice, once in -[WebHTMLView paste:] and once
+ in Editor::pasteAsPlainText (which is called -[WebHTMLView paste:]).
+ Use the new pasteAsPlainTextBypassingDHTML function to bypass the
+ second call.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView paste:]):
+
+2010-08-24 Daniel Cheng <dcheng@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ [chromium] Generate drag images for HTML elements and selections.
+ https://bugs.webkit.org/show_bug.cgi?id=43449
+
+ Fix up calls to Frame::nodeImage, which has a new signature.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView halt]):
+
+2010-08-23 Mike Thole <mthole@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ WebPDFView should remove itself as the delegate of its PDFView before being dealloced
+ https://bugs.webkit.org/show_bug.cgi?id=44441
+
+ * WebView/WebPDFView.mm:
+ (-[WebPDFView dealloc]): Set the PDFView's delegate to nil.
+
+2010-08-22 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Eric Seidel.
+
+ Encapsulate document marker management into DocumentMarkerController
+ https://bugs.webkit.org/show_bug.cgi?id=44383
+
+ Modify call sites in the Apple Mac port to use DocumentMarkerController.
+
+ No functionality was changed, so no new tests.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _unmarkAllBadGrammar]):
+ (-[WebFrame _unmarkAllMisspellings]):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView unmarkAllTextMatches]):
+ (-[WebHTMLView rectsForTextMatches]):
+
+2010-08-19 David Kilzer <ddkilzer@apple.com>
+
+ <http://webkit.org/b/44285> Fix compilation with NETSCAPE_PLUGIN_API disabled
+
+ Reviewed by Joseph Pecoraro.
+
+ * Plugins/Hosted/HostedNetscapePluginStream.mm: Changed
+ USE(PLUGIN_HOST_PROCESS) to
+ USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API).
+ * Plugins/Hosted/NetscapePluginHostManager.mm: Ditto.
+ * Plugins/Hosted/NetscapePluginHostProxy.mm: Ditto.
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm: Ditto.
+ * Plugins/Hosted/ProxyInstance.mm: Ditto.
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm: Ditto.
+ * WebCoreSupport/WebChromeClient.mm: Ditto.
+ (WebChromeClient::createWindow):
+ * WebCoreSupport/WebFrameLoaderClient.mm: Ditto.
+ (WebFrameLoaderClient::dispatchCreatePage):
+ * WebView/WebHTMLView.mm:
+ (needsCursorRectsSupportAtPoint): Added #if
+ ENABLE(NETSCAPE_PLUGIN_API) and #endif macros as needed.
+ * WebView/WebView.mm:
+ (+[WebView _isNodeHaltedPlugin:]): Ditto.
+ (+[WebView _hasPluginForNodeBeenHalted:]): Ditto.
+ (+[WebView _restartHaltedPluginForNode:]): Ditto.
+
+2010-08-17 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
+
+ Reviewed by Darin Adler.
+
+ Add NetworkingContext to avoid layer violations
+ https://bugs.webkit.org/show_bug.cgi?id=42292
+
+ Preparation: Just add the files to the build system.
+
+ * WebCoreSupport/WebFrameNetworkingContext.h: Added.
+ Placeholder with tentative code that might be changed when landing
+ the rest of it.
+ * WebCoreSupport/WebFrameNetworkingContext.mm: Added.
+ Empty placeholder for now.
+
+2010-08-17 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Navigating back/forward during a modal dialog causes a crash when the modal dialog is dismissed.
+ <rdar://problem/8313579> and https://bugs.webkit.org/show_bug.cgi?id=44131
+
+ * WebView/WebView.mm:
+ (-[WebView canGoBack]): Return false if loads are deferred.
+ (-[WebView canGoForward]): Ditto.
+
+2010-08-14 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: -[WebInspector attach] and detach should work
+ https://bugs.webkit.org/show_bug.cgi?id=43924
+
+ For actions that relate only to the Web Inspector's Frontend
+ window (actions on the InspectorFrontendClient) the new Obj-C
+ wrapper class WebInspectorFrontend can be used. For now, this
+ is just attach and detach.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorClient::openInspectorFrontend): setup and attach the WebInspectorFrontend to the WebInspector.
+ * WebInspector/WebInspector.h:
+ * WebInspector/WebInspector.mm:
+ (-[WebInspector dealloc]):
+ (-[WebInspector attach:]): delegate to the frontend.
+ (-[WebInspector detach:]): delegate to the frontend.
+ (-[WebInspector setFrontend:]):
+ * WebInspector/WebInspectorFrontend.h: Added.
+ * WebInspector/WebInspectorFrontend.mm: Added.
+ (-[WebInspectorFrontend initWithFrontendClient:]):
+ (-[WebInspectorFrontend attach]):
+ (-[WebInspectorFrontend detach]):
+ * WebInspector/WebInspectorPrivate.h:
+
+2010-08-13 Gavin Barraclough <barraclough@apple.com>
+
+ Rubber stamped by Sam Weinig.
+ Switch String::/UString::ascii() to return a CString.
+
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyInstance::methodsNamed):
+ (WebKit::ProxyInstance::fieldNamed):
+
+2010-08-13 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Sam Weinig
+
+ Unify UString::UTF8String() & String::utf8() methods,
+ remove UString::cost() & make atArrayIndex a free function.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::enumerate):
+
+2010-08-12 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r65295.
+ http://trac.webkit.org/changeset/65295
+ https://bugs.webkit.org/show_bug.cgi?id=43950
+
+ It broke 4 sputnik tests (Requested by Ossy on #webkit).
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::enumerate):
+
+2010-08-12 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Sam Weinig
+
+ Unify UString::UTF8String() & String::utf8() methods,
+ remove UString::cost() & make atArrayIndex a free function.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::enumerate):
+
+2010-08-12 Jeremy Orlow <jorlow@chromium.org>
+
+ Revert for now
+ https://bugs.webkit.org/show_bug.cgi?id=43794
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-08-10 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Some settings are linked to the PageGroup not the Page. Create a new class for those.
+ https://bugs.webkit.org/show_bug.cgi?id=43794
+
+ Change WebView to use the new GroupSettings class rather than Settings for the
+ settings that moved. This is sub-optimal since the settings aren't really
+ per-view, but we can't really change the API at this point.
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-08-11 Gavin Barraclough <barraclough@apple.com>
+
+ Rubber stamps by Darin Adler & Sam Weinig.
+
+ Bug 43867 - Some UString cleanup
+
+ Change JSC::UString data(), size(), and from(), to characters(), length(), and number() to match WTF::String.
+ Move string concatenation methods to a new header to simplify down UString.h. Remove is8Bit().
+
+ * WebView/WebScriptDebugger.mm:
+ (toNSString):
+
+2010-08-10 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=43806, add ability to paginate screen content.
+
+ Add SPI for entering and exiting screen pagination mode. This is similar to printing mode but it can be done for on-screen
+ content.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _web_setPrintingModeRecursive]):
+ (-[WebHTMLView _web_clearPrintingModeRecursive]):
+ (-[WebHTMLView _web_setPrintingModeRecursiveAndAdjustViewSize]):
+ (-[WebHTMLView _beginPrintModeWithPageWidth:height:shrinkToFit:]):
+ (-[WebHTMLView _endPrintMode]):
+ (-[WebHTMLView _isInScreenPaginationMode]):
+ (-[WebHTMLView _beginScreenPaginationModeWithPageSize:shrinkToFit:]):
+ (-[WebHTMLView _endScreenPaginationMode]):
+ (-[WebHTMLView reapplyStyles]):
+ (-[WebHTMLView _setPrinting:minimumPageWidth:height:maximumPageWidth:adjustViewSize:paginateScreenContent:]):
+ (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]):
+ (-[WebHTMLView setPageWidthForPrinting:]):
+ * WebView/WebHTMLViewPrivate.h:
+
+2010-08-10 Gavin Barraclough <barraclough@apple.com>
+
+ Build fix (update more includes)
+
+ * Plugins/Hosted/NetscapePluginHostManager.h:
+
+2010-08-10 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Add suspendAnimations/resumeAnimation API to DRT
+ https://bugs.webkit.org/show_bug.cgi?id=43733
+
+ Mac specific API. Plumbs suspendAnimations/resumeAnimations down to WebCore.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _suspendAnimations]):
+ (-[WebFrame _resumeAnimations]):
+ * WebView/WebFramePrivate.h:
+
+2010-08-10 Gavin Barraclough <barraclough@apple.com>
+
+ Rubber stamped by Sam Weinig
+
+ Bug 43817 - Remove UString::Rep
+ UString::Rep has for a long time been replaced by UStringImpl (Rep
+ remaining as a typedef). UStringImpl has since been removed too
+ (unified with StringImpl). Remove Rep, rename rep() to impl() and
+ m_rep to m_impl. Also add impl() method to Identifier, and rename
+ its UString member from _ustring to m_string.
+
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyInstance::methodsNamed):
+ (WebKit::ProxyInstance::fieldNamed):
+
+2010-08-06 Gavin Barraclough <barraclough@apple.com>
+
+ Rubber stamped by Sam Weinig
+
+ Bug 43594 - Add string forwards to Forward.h
+ This allows us to remove forward declarations for these classes from
+ WebCore/WebKit (a step in moving these class from WebCore:: to WTF::).
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/WebBaseNetscapePluginView.h:
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebIconDatabaseClient.h:
+ * WebCoreSupport/WebPluginHalterClient.h:
+ * WebView/WebViewInternal.h:
+
+2010-08-04 MORITA Hajime <morrita@google.com>
+
+ Reviewed by Tony Chang.
+
+ Pasting should fire textInput event.
+ https://bugs.webkit.org/show_bug.cgi?id=42958
+
+ On paste, invoke Editor instead of direct command invocation,
+ which allows dispatching events before actual paste.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]):
+
+2010-08-06 Yongjun Zhang <yongjun_zhang@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ add "const" to WebChromeClient::webView().
+ https://bugs.webkit.org/show_bug.cgi?id=43631
+
+ Change WebChromeClient::webView() to be const because ChromeClient::didReceiveViewportArguments
+ is const method now, and calling webView() inside port-specific didReceiveViewportArguments
+ implementation fails compiling if webView() is not const.
+
+ * WebCoreSupport/WebChromeClient.h:
+ (WebChromeClient::webView):
+
+2010-08-06 Jessie Berlin <jberlin@apple.com>
+
+ Roll out http://trac.webkit.org/changeset/64801, which broke the Safari Windows Build.
+ Unreviewed.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/WebBaseNetscapePluginView.h:
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebIconDatabaseClient.h:
+ * WebCoreSupport/WebPluginHalterClient.h:
+ * WebView/WebViewInternal.h:
+
+2010-08-05 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by David Kilzer.
+
+ Remove Invalid Asserts for Application Cache Quotas
+ https://bugs.webkit.org/show_bug.cgi?id=43585
+
+ Removed Invalid ASSERTs that would always happen for quotas
+ that were not noQuota().
+
+ * WebView/WebPreferences.mm:
+ (-[WebPreferences applicationCacheTotalQuota]):
+ (-[WebPreferences applicationCacheDefaultOriginQuota]):
+
+2010-08-05 Gavin Barraclough <barraclough@apple.com>
+
+ Rubber stamped by Sam Weinig
+
+ Bug 43594 - Add string forwards to Forward.h
+ This allows us to remove forward declarations for these classes from
+ WebCore/WebKit (a step in moving these class from WebCore:: to WTF::).
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/WebBaseNetscapePluginView.h:
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebIconDatabaseClient.h:
+ * WebCoreSupport/WebPluginHalterClient.h:
+ * WebView/WebViewInternal.h:
+
+2010-08-05 Jian Li <jianli@chromium.org>
+
+ Reviewed by David Levin.
+
+ Unify blob related feature defines to ENABLE(BLOB).
+ https://bugs.webkit.org/show_bug.cgi?id=43081
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-08-03 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by David Kilzer.
+
+ Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas)
+ https://bugs.webkit.org/show_bug.cgi?id=40627
+
+ Part 6 - LayoutTest and Cleanup
+
+ * WebCoreSupport/WebApplicationCache.h:
+ * WebCoreSupport/WebApplicationCache.mm:
+ (+[WebApplicationCache setMaximumSize:]): refactor out deleting the application caches.
+ (+[WebApplicationCache deleteAllApplicationCaches]): delete application caches.
+
+2010-08-03 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by David Kilzer.
+
+ Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas)
+ https://bugs.webkit.org/show_bug.cgi?id=40627
+
+ Part 5 - Refactor Quota Management in WebSecurityOrigin into Managers
+
+ Per-Origin quotas exist for Databases and Application Caches. Clients
+ given a WebSecurityOrigin have the ability to set the quota for any
+ per-origin quota type. This puts quota management into an interface
+ and WebSecurityOrigin allows access to quota managers for the
+ different types of quotas.
+
+ This also deprecates the old methods on WebSecurityOrigin. They are
+ left in for now to prevent breaking older clients.
+
+ The WebQuotaManager interface allows querying and modifying a
+ per-origin quota. This is implemented for both Databases and
+ Application Caches.
+
+ * Misc/WebQuotaManager.h: Added. Interface for quota management (usage, quota, setQuota).
+ * Storage/WebDatabaseQuotaManager.h: Added.
+ * Storage/WebDatabaseQuotaManager.mm: Added.
+ (-[WebDatabaseQuotaManager origin]):
+ (-[WebDatabaseQuotaManager usage]):
+ (-[WebDatabaseQuotaManager quota]):
+ (-[WebDatabaseQuotaManager setQuota:]):
+ * Storage/WebDatabaseSecurityOrigin.h: Removed.
+ * Storage/WebDatabaseSecurityOrigin.mm: Removed.
+ * WebCoreSupport/WebApplicationCacheQuotaManager.h: Added.
+ * WebCoreSupport/WebApplicationCacheQuotaManager.mm: Added.
+ (-[WebApplicationCacheQuotaManager origin]):
+ (-[WebApplicationCacheQuotaManager usage]):
+ (-[WebApplicationCacheQuotaManager quota]):
+ (-[WebApplicationCacheQuotaManager setQuota:]):
+ * WebCoreSupport/WebSecurityOriginPrivate.h: Added a category to access managers. Deprecated old methods.
+
+ Remove the WebSecurityOrigin sub-classes. Managers are better.
+
+ * WebCoreSupport/WebApplicationCacheSecurityOrigin.h: Removed.
+ * WebCoreSupport/WebApplicationCacheSecurityOrigin.mm: Removed.
+
+ Create the managers lazily. Change old style calls to make use
+ of the managers.
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::exceededDatabaseQuota):
+ (WebChromeClient::reachedApplicationCacheOriginQuota):
+ * WebCoreSupport/WebSecurityOrigin.mm:
+ (-[WebSecurityOrigin applicationCacheQuotaManager]):
+ (-[WebSecurityOrigin databaseQuotaManager]):
+ (-[WebSecurityOrigin dealloc]): release the managers if they exist.
+
+2010-08-03 Alex Milowski <alex@milowski.com>
+
+ Reviewed by Beth Dakin.
+
+ Changed the ENABLE_MATHML value to enable MathML by default.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-08-02 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Add VisitedLinkStrategy for each platform to implement
+ https://bugs.webkit.org/show_bug.cgi?id=43393
+
+ * WebCoreSupport/WebPlatformStrategies.h:
+ * WebCoreSupport/WebPlatformStrategies.mm:
+ (WebPlatformStrategies::createVisitedLinkStrategy):
+ (WebPlatformStrategies::isLinkVisited): Call back into PageGroup's visited links.
+ (WebPlatformStrategies::addVisitedLink): Ditto.
+
+2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Darin Fisher.
+
+ PopupMenu refactoring in preparation to WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=42592
+
+ As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu
+ instances, concrete classes that inherit from ChromeClient needed to be changed to
+ implement the new methods.
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::selectItemWritingDirectionIsNatural):
+ (WebChromeClient::createPopupMenu):
+ (WebChromeClient::createSearchPopupMenu):
+
+2010-08-02 Jeremy Orlow <jorlow@chromium.org>
+
+ Speculative revert of 64425 due to Chromium instability
+ https://bugs.webkit.org/show_bug.cgi?id=43347
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+
+2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Darin Fisher.
+
+ PopupMenu refactoring in preparation to WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=42592
+
+ As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu
+ instances, concrete classes that inherit from ChromeClient needed to be changed to
+ implement the new methods.
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::selectItemWritingDirectionIsNatural):
+ (WebChromeClient::createPopupMenu):
+ (WebChromeClient::createSearchPopupMenu):
+
+2010-07-31 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r64422.
+ http://trac.webkit.org/changeset/64422
+ https://bugs.webkit.org/show_bug.cgi?id=43304
+
+ Build fixes are needed for Snow Leopard and Windows.
+ (Requested by lca on #webkit).
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+
+2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Darin Fisher.
+
+ PopupMenu refactoring in preparation to WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=42592
+
+ As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu
+ instances, concrete classes that inherit from ChromeClient needed to be changed to
+ implement the new methods.
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::selectItemWritingDirectionIsNatural):
+ (WebChromeClient::createPopupMenu):
+ (WebChromeClient::createSearchPopupMenu):
+
+2010-07-31 David Kilzer <ddkilzer@apple.com>
+
+ <http://webkit.org/b/43300> Simplify variables in *.xcconfig files after adding iOS support
+
+ Reviewed by Darin Adler.
+
+ * Configurations/WebKit.xcconfig: Extracted
+ PRODUCTION_FRAMEWORKS_DIR and PRODUCTION_ROOT variables.
+
+2010-07-30 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/8257783> Short documents may print a second blank page
+ https://bugs.webkit.org/show_bug.cgi?id=43271
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _web_setPrintingModeRecursive]): Updated for additional height parameter
+ to _setPrinting:minimumPageWidth:height:maximumPageWidth:adjustViewSize:.
+ (-[WebHTMLView _web_clearPrintingModeRecursive]): Ditto.
+ (-[WebHTMLView _web_setPrintingModeRecursiveAndAdjustViewSize]): Ditto.
+ (-[WebHTMLView _beginPrintModeWithPageWidth:height:shrinkToFit:]): Added height parameter,
+ which is scaled and passed on to _setPrinting:minimumPageWidth:height:maximumPageWidth:adjustViewSize:.
+ (-[WebHTMLView _endPrintMode]): Updated for additional height parameter to
+ _setPrinting:minimumPageWidth:height:maximumPageWidth:adjustViewSize:.
+ (-[WebHTMLView layoutToMinimumPageWidth:height:maximumPageWidth:adjustingViewSize:]): Added
+ height parameter, which is passed on to FrameView::forceLayoutForPagination().
+ (-[WebHTMLView layout]): Updated for additional height parameter.
+ (-[WebHTMLView _setPrinting:minimumPageWidth:height:maximumPageWidth:adjustViewSize:]): Added height
+ parameter, which is passed on to -layoutToMinimumPageWidth:height:maximumPageWidth:adjustViewSize:.
+ (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Updated for additional height
+ parameter.
+ (-[WebHTMLView setPageWidthForPrinting:]): Ditto.
+ (-[WebHTMLView knowsPageRange:]): Pass the available height on the page on to
+ _setPrinting:minimumPageWidth:height:maximumPageWidth:adjustViewSize.
+ * WebView/WebHTMLViewPrivate.h:
+
+2010-07-30 Joseph Pecoraro <joepeck@webkit.org>
+
+ Fix for tests that broke after r64400. Tracking a more
+ ideal solution in https://bugs.webkit.org/show_bug.cgi?id=40627
+
+ Switch the interface back to (unsigned long long), and move
+ the WebDatabaseSecurityOrigin implementation up into WebSecurityOrigin.
+ The subclasses' implementations were not getting called.
+
+ * Storage/WebDatabaseSecurityOrigin.mm:
+ * WebCoreSupport/WebApplicationCacheSecurityOrigin.mm:
+ (-[WebApplicationCacheSecurityOrigin quota]):
+ (-[WebApplicationCacheSecurityOrigin setQuota:]):
+ * WebCoreSupport/WebSecurityOrigin.mm:
+ (-[WebSecurityOrigin usage]):
+ (-[WebSecurityOrigin quota]):
+ (-[WebSecurityOrigin setQuota:]):
+ * WebCoreSupport/WebSecurityOriginPrivate.h:
+
+2010-07-30 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by David Kilzer.
+
+ Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas)
+ https://bugs.webkit.org/show_bug.cgi?id=40627
+
+ Part 4 - Client Notification when the Quota is Reached
+
+ Notify the WebKit client when the per-origin quota is reached
+ via a delegate method reachedApplicationCacheOriginQuota.
+
+ Refactor the WebSecurityOrigin class to be generic enough to
+ allow quota management of both Databases or Application Caches
+ via subclasses.
+
+ * Storage/WebDatabaseSecurityOrigin.h: Added.
+ * Storage/WebDatabaseSecurityOrigin.mm: Added.
+ (-[WebDatabaseSecurityOrigin quota]):
+ (-[WebDatabaseSecurityOrigin setQuota:]):
+ * WebCoreSupport/WebApplicationCacheSecurityOrigin.h: Added.
+ * WebCoreSupport/WebApplicationCacheSecurityOrigin.mm: Added.
+ (-[WebApplicationCacheSecurityOrigin quota]):
+ (-[WebApplicationCacheSecurityOrigin setQuota:]):
+ * Storage/WebSecurityOrigin.mm: Removed. (Moved to WebCoreSupport)
+ * Storage/WebSecurityOriginPrivate.h: Removed. (Moved to WebCoreSupport)
+ * WebCoreSupport/WebSecurityOrigin.mm: Added.
+ (-[WebSecurityOrigin usage]): to be implemented by subclasses.
+ (-[WebSecurityOrigin quota]): to be implemented by subclasses.
+ (-[WebSecurityOrigin setQuota:]): to be implemented by subclasses.
+ * WebCoreSupport/WebSecurityOriginInternal.h: Renamed from WebKit/mac/Storage/WebSecurityOriginInternal.h.
+ * WebCoreSupport/WebSecurityOriginPrivate.h: Added.
+
+ Turn the notification into a WebUI Delegate to call. Following
+ the example of Databases.
+
+ * DefaultDelegates/WebDefaultUIDelegate.m:
+ (-[WebDefaultUIDelegate webView:exceededApplicationCacheOriginQuotaForSecurityOrigin:]):
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::exceededDatabaseQuota): use the Databases Security Origin subclass.
+ (WebChromeClient::reachedApplicationCacheOriginQuota): use the Application Cache Security Origin subclass.
+ * WebView/WebUIDelegatePrivate.h:
+
+2010-07-30 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by David Kilzer.
+
+ Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas)
+ https://bugs.webkit.org/show_bug.cgi?id=40627
+
+ Part 1 - Add Total and Per-Origin Quota Preferences.
+
+ Allow the application cache total size to be a preference, and
+ add a new preference for the default per-origin quota.
+
+ Storage quotas were int64_t (long long). Boilerplate for
+ these types added for consistency.
+
+ * Misc/WebNSDictionaryExtras.h:
+ * Misc/WebNSDictionaryExtras.m:
+ (-[NSMutableDictionary _webkit_setLongLong:forKey:]):
+ * WebCoreSupport/WebApplicationCache.h: setters and accessors for WebCore's cacheStorage.
+ * WebCoreSupport/WebApplicationCache.mm:
+ (+[WebApplicationCache maximumSize:]):
+ (+[WebApplicationCache setMaximumSize:]):
+ (+[WebApplicationCache defaultOriginQuota]):
+ (+[WebApplicationCache setDefaultOriginQuota:]):
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]): defaults to noQuota for both preferences.
+ (-[WebPreferences _longLongValueForKey:]):
+ (-[WebPreferences _setLongLongValue:forKey:]):
+ (-[WebPreferences applicationCacheTotalQuota]):
+ (-[WebPreferences setApplicationCacheTotalQuota:]):
+ (-[WebPreferences applicationCacheDefaultOriginQuota]):
+ (-[WebPreferences setApplicationCacheDefaultOriginQuota:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]): respect updates to the preferences.
+
+2010-07-30 Andy Estes <aestes@apple.com>
+
+ Reviewed by David Kilzer.
+
+ Add Xcode support for compiling WebKit against iOS SDKs.
+ https://bugs.webkit.org/show_bug.cgi?id=42796
+
+ * Configurations/Base.xcconfig:
+ * Configurations/DebugRelease.xcconfig:
+ * Configurations/FeatureDefines.xcconfig:
+ * Configurations/Version.xcconfig:
+ * Configurations/WebKit.xcconfig:
+
+2010-07-26 Steve Block <steveblock@google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ Page clients should be passed to Page constructor via structure of pointers
+ https://bugs.webkit.org/show_bug.cgi?id=42834
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+
+2010-07-27 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by Ojan Vafai.
+
+ Add FILE_SYSTEM build flag for FileSystem API
+ https://bugs.webkit.org/show_bug.cgi?id=42915
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-07-27 Steve Block <steveblock@google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ Client-based Geolocation does not pass enableHighAccuracy option to controller and client
+ https://bugs.webkit.org/show_bug.cgi?id=40374
+
+ Stub out setEnableHighAccuracy method for the Mac port.
+
+ * WebCoreSupport/WebGeolocationControllerClient.h:
+ (WebGeolocationControllerClient::setEnableHighAccuracy):
+
+2010-07-22 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Fix for <rdar://problem/8222626>
+ Send textDidChangeInTextField delegate callback only in response to typing or other forms of user text input.
+
+ The function name no longer perfectly matches the behavior, but I didn't want to break any existing clients. Maybe we
+ should migrate to a new function name eventually
+
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::textDidChangeInTextField):
+
+2010-07-22 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Patch for https://bugs.webkit.org/show_bug.cgi?id=42836
+ Add localized strings stubs for WebKit2.
+
+ - Convert WebKit (mac) to use a LocalizationStrategy rather than the WebCoreViewFactory
+ for localized strings.
+
+ Gets us below 200 tests failing in WebKitTestRunner.
+
+ * WebCoreSupport/WebContextMenuClient.mm:
+ (fixMenusReceivedFromOldClients): Use LocalizedStrings rather than the factory.
+ * WebCoreSupport/WebPlatformStrategies.h:
+ * WebCoreSupport/WebPlatformStrategies.mm:
+ * WebCoreSupport/WebViewFactory.mm:
+
+2010-07-21 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Geoffrey Garen.
+
+ Break out "scheme registration" functionality from SecurityOrigin to a SchemeRegistry
+ https://bugs.webkit.org/show_bug.cgi?id=42783
+
+ * WebView/WebView.mm:
+ (+[WebView _registerURLSchemeAsSecure:]):
+ (+[WebView registerURLSchemeAsLocal:]):
+
+2010-07-21 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Composited layers don't scroll in WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=42771
+
+ Prep work: FrameView::scrollPositionChanged() sounds like a generic "did scroll" bottleneck,
+ but this is deceiving. It's only every called on one platform (Mac) when the NSScrollView gets
+ scrolled, so rename it to FrameView::scrollPositionChangedViaPlatformWidget().
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _frameOrBoundsChanged]):
+
+2010-07-21 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Update plug-in proxy backed <video> and <audio> elements.
+ https://bugs.webkit.org/show_bug.cgi?id=42770
+ <rdar://problem/7963467>
+
+ * Plugins/WebPluginController.h:
+ * Plugins/WebPluginController.mm:
+ (-[WebPluginController dealloc]): Release _viewsNotInDocument.
+ (-[WebPluginController stopAllPlugins]): Stop plug-ins not in the document.
+ (-[WebPluginController pluginViewCreated:]): New, add a View (plug-in) to _viewsNotInDocument.
+ (+[WebPluginController pluginViewHidden:]): New, remove the view (plug-in) from pluginViews.
+ (-[WebPluginController addPlugin:]): Remove the new plug-in from _viewsNotInDocument.
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createPlugin): Remove PLUGIN_PROXY_FOR_VIDEO code, the media
+ player proxy plug-in should never be allocated by this method.
+ (WebFrameLoaderClient::createMediaPlayerProxyPlugin): New, allocate a media player proxy.
+
+ * WebView/WebView.mm:
+ (-[WebView _videoProxyPluginForMIMEType:]): New. Identical to _pluginForMIMEType except it doesn't
+ consider the arePlugInsEnabled preference.
+ * WebView/WebViewInternal.h:
+
+
+2010-07-19 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42118
+ Disable WebGL on Leopard for now.
+
+ LayoutTests fail on some graphics hardware on Leopard because one of the features we use,
+ GL_ARB_framebuffer_object, is not universally available in Leopard like it is in
+ SnowLeopard. This will allow LayoutTests to pass on Leopard until we add logic to use a
+ software OpenGL driver on machines without this support.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-07-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Move PluginWidget to WebKit
+ https://bugs.webkit.org/show_bug.cgi?id=42530
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView pluginLayer]):
+ Add default pluginLayer implementation.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (PluginWidget::PluginWidget):
+ (PluginWidget::invalidateRect):
+ Move the guts of PluginWidget here from WebCore.
+
+ (NetscapePluginWidget::platformLayer):
+ Get the layer from the plug-in view.
+
+2010-07-18 David Kilzer <ddkilzer@apple.com>
+
+ <http://webkit.org/b/42522> Add missing (id) return type to Obj-C methods
+
+ Reviewed by Dan Bernstein.
+
+ * Carbon/CarbonWindowAdapter.mm:
+ (-[NSWindow(HIWebFrameView) _initContent:styleMask:backing:defer:contentView:]):
+ (-[CarbonWindowAdapter _destroyRealWindow:]):
+ (-[CarbonWindowAdapter _clearModalWindowLevel]):
+ * Misc/WebIconDatabase.mm:
+ (-[WebIconDatabase init]):
+ * Misc/WebNSPasteboardExtras.mm:
+ (-[NSFilePromiseDragSource initWithSource:]):
+ * WebView/WebHTMLRepresentation.mm:
+ (-[WebHTMLRepresentation init]):
+ * WebView/WebPreferences.mm:
+ (-[WebPreferences init]):
+ * WebView/WebView.mm:
+ (-[WebView UIDelegate]):
+ (-[WebView resourceLoadDelegate]):
+ (-[WebView downloadDelegate]):
+ (-[WebView policyDelegate]):
+ (-[WebView frameLoadDelegate]):
+
+2010-07-16 Zhe Su <suzhe@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION(r61484): Broke focus behaviour on Qt and probably other platforms
+ https://bugs.webkit.org/show_bug.cgi?id=42253
+
+ Dummy implementation of EditorClient::willSetInputMethodState.
+
+ * WebCoreSupport/WebEditorClient.h:
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::willSetInputMethodState):
+
+2010-07-16 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Part of <rdar://problem/7233974> Deprecate +[WebView _setShouldUseFontSmoothing:]
+ https://bugs.webkit.org/show_bug.cgi?id=29355
+
+ * Misc/WebKitNSStringExtras.h:
+ * Misc/WebKitNSStringExtras.mm:
+ (-[NSString _web_drawAtPoint:font:textColor:]): Now calls through to
+ -_web_drawAtPoint:font:textColor:allowingFontSmoothing: passing YES for the last
+ parameter.
+ (-[NSString _web_drawAtPoint:font:textColor:allowingFontSmoothing:]): Added
+ allowingFontSmoothing:. If font smoothing is not allowed, sets the font smoothing
+ mode to antialiased. Otherwise, sets it to auto.
+ (-[NSString _web_drawDoubledAtPoint:withTopColor:bottomColor:font:]): Instead of
+ changing the font smoothing setting in the graphics context, call
+ -_web_drawAtPoint:font:textColor:allowingFontSmoothing: passing NO for the last
+ parameter.
+
+2010-07-16 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Remove semicolons from Objective-C method declarations.
+
+ * WebView/WebRenderLayer.mm:
+ (+[WebRenderLayer nameForLayer:]):
+ (+[WebRenderLayer compositingInfoForLayer:]):
+
+2010-07-16 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Make JS memory stats available via 'Performance' object (Web Timing).
+ This statistics is populated only if 'WebKitMemoryInfoEnabled'
+ preference is set.
+
+ 'console.memory' is kept until Web Timing object becomes visible by
+ default (currently it is hidden under compile-time flag). These stats
+ are guarded with the same preference.
+
+ https://bugs.webkit.org/show_bug.cgi?id=41617
+
+ * WebKit.order:
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences memoryInfoEnabled]):
+ (-[WebPreferences setMemoryInfoEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-07-15 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Printing test results differ between machines, we should use ImageDiff instead
+ https://bugs.webkit.org/show_bug.cgi?id=20011
+
+ * Misc/WebCoreStatistics.h:
+ * Misc/WebCoreStatistics.mm:
+ (-[WebFrame printToCGContext:cgContext:pageWidthInPixels:]):
+
+2010-07-15 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Darin Adler.
+
+ [Mac] Implement LayoutTestController::markerTextForListItem()
+ https://bugs.webkit.org/show_bug.cgi?id=37929
+
+ Implements support for markerTextForListItem in the Mac port.
+
+ * DOM/WebDOMOperations.mm:
+ (+[DOMElement _DOMElementFromJSContext]): Added.
+ (-[DOMElement _markerTextForListItem]): Added.
+ * DOM/WebDOMOperationsPrivate.h:
+
+2010-07-14 Simon Fraser <simon.fraser@apple.com>
+
+ Fix non-ACCELERATED_COMPOSITING build.
+
+ * WebView/WebRenderLayer.mm:
+ (+[WebRenderLayer compositingInfoForLayer:]):
+
+2010-07-14 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by John Sullivan.
+
+ <rdar://problem/8186963> Expose information about compositing layers.
+
+ Use RenderLayerBacking::compositingLayerType() to add more information about compositing to
+ WebRenderLayer, via a compositingInfo property. Also show element classnames.
+
+ Also add separator items between the various z-order lists.
+
+ * WebView/WebRenderLayer.h:
+ * WebView/WebRenderLayer.mm:
+ (+[WebRenderLayer nameForLayer:]):
+ (+[WebRenderLayer compositingInfoForLayer:]):
+ (-[WebRenderLayer initWithRenderLayer:]):
+ (-[WebRenderLayer initWithName:]):
+ (-[WebRenderLayer initWithWebFrame:]):
+ (-[WebRenderLayer dealloc]):
+ (-[WebRenderLayer buildDescendantLayers:]):
+ (-[WebRenderLayer compositingInfo]):
+ (-[WebRenderLayer isComposited]):
+ (-[WebRenderLayer isSeparator]):
+
+2010-07-14 Darin Adler <darin@apple.com>
+
+ Another try at fixing the Tiger build.
+
+ Avoid non-ASCII in source files to keep Tiger compiler happy.
+
+ * WebView/WebRenderLayer.mm:
+ (+[WebRenderLayer nameForLayer:]): Use %C for the non-ASCII characters.
+
+2010-07-14 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Patch for https://bugs.webkit.org/show_bug.cgi?id=42232
+ Make changing Cursors work in WebKit2.
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::setCursor):
+ * WebView/WebView.mm:
+ Implement cursor changing at the WebKit level for the sake of WebKit2.
+ This functionality is being moved from WidgetMac.mm.
+ (+[WebView _pointingHandCursor]):
+ Update to use platformCursor() instead of impl().
+
+2010-07-13 Simon Fraser <simon.fraser@apple.com>
+
+ Fix Tiger build.
+
+ Avoid non-ASCII in souce files to keep Tiger compiler happy.
+
+ * WebView/WebRenderLayer.mm:
+ (+[WebRenderLayer nameForLayer:]):
+
+2010-07-13 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/8186963> Expose RenderLayer hierarchy via Obj-C for debugging.
+
+ Add a WebRenderLayer class that reflects the RenderLayer tree into a hierarchy
+ of Objective-C objects suitable for display in an outline view.
+
+ * WebKit.exp: Export the WebRenderLayer Objective-C class.
+ * WebView/WebRenderLayer.h: Added.
+ * WebView/WebRenderLayer.mm: Added.
+
+2010-07-07 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Prevent assertion/duplicate loads for non-deferred subtitute-data loads
+
+ https://bugs.webkit.org/show_bug.cgi?id=30879
+
+ MainResourceLoader uses the member m_initialRequest to store requests for future
+ deferred loads. When doing the actual load in handleDataLoadNow(), we therefore
+ have to clear this request so that subsequent entries into the loader will not
+ start yet another load.
+
+ This can happen as a result of a PageGroupLoadDeferrer going out of scope when
+ returning from Chrome::runJavaScriptAlert(), which calls setDeferredLoading(false),
+ but only in the case of using both substitute-data and non-deferred main resource
+ load together. That's why two new DRT functions were added:
+
+ * queueLoadHTMLString()
+ * setDeferMainResourceLoad()
+
+ The change adds DRT hooks for Mac, Win and Qt for these two functions. For Mac
+ and Win the hook uses new SPI in WebDataSource. For Qt a new static member was
+ added to the FrameLoaderClientQt and accessed though DumpRenderTreeSupportQt.
+
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource _setDeferMainResourceDataLoad:]):
+ * WebView/WebDataSourcePrivate.h:
+
+2010-07-13 Philippe Normand <pnormand@igalia.com>
+
+ Rubber-stamped by Xan Lopez.
+
+ Updated the copyright headers of the files modified in r62476.
+
+ * WebView/WebView.mm:
+ * WebView/WebViewData.h:
+ * WebView/WebViewInternal.h:
+
+2010-07-09 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=13075
+ XMLHttpRequest with failed authentication should set status to 401
+
+ https://bugs.webkit.org/show_bug.cgi?id=6871
+ <rdar://problem/3363403> 401 error page is never shown
+
+ * Panels/WebPanelAuthenticationHandler.m:
+ (-[WebPanelAuthenticationHandler startAuthentication:window:]): Updated a comment - this
+ code cancels loading, not authentication (canceling authentication means telling to
+ continue without credentials).
+ (-[WebPanelAuthenticationHandler _authenticationDoneWithChallenge:result:]): If there were
+ no credentials provided, tell to continue without any. There may be alternative content
+ returned with 401.
+
+2010-07-09 Leon Clarke <leonclarke@google.com>
+
+ Reviewed by Adam Barth.
+
+ add support for link prefetching
+ https://bugs.webkit.org/show_bug.cgi?id=3652
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-07-08 Aaron Boodman <aa@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Add the ability for user scripts and user styles to affect just the top frame.
+
+ https://bugs.webkit.org/show_bug.cgi?id=41529
+
+ * WebView/WebView.mm:
+ (+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:]):
+ (+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:injectedFrames:]):
+ (+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:]):
+ (+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:injectedFrames:]):
+ * WebView/WebViewPrivate.h:
+
+2010-07-08 Adele Peterson <adele@apple.com>
+
+ Reviewed by Jon Honeycutt, Adam Roben, and Darin Adler.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=41721
+ <rdar://problem/8158561> Missing plug-in indicator should have a pressed state
+
+ Implement shouldMissingPluginMessageBeButton.
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::shouldMissingPluginMessageBeButton):
+
+2010-07-08 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ <rdar://problem/8136327> - Crash in Entourage calling WebCache method from background thread
+
+ * Misc/WebCache.mm:
+ (+[WebCache setDisabled:]): Forward the call to the main thread if called from a background thread.
+
+ * Misc/WebNSObjectExtras.h:
+ * Misc/WebNSObjectExtras.mm:
+ (+[NSObject _webkit_invokeOnMainThread]): Add a class version of the main thread invoker.
+
+2010-07-08 Mike Thole <mthole@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Patch for https://bugs.webkit.org/show_bug.cgi?id=41896
+ Crash under allScriptsInPDFDocument() in WebPDFDocumentExtras.mm for certain PDFs
+
+ * WebView/WebPDFDocumentExtras.mm:
+ (allScriptsInPDFDocument): Null-check 'data', as CGPDFStreamCopyData() may have returned 0.
+
+2010-07-08 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Patch for https://bugs.webkit.org/show_bug.cgi?id=41826
+ Convert BackForwardList to an abstract base class and add BackForwardListImpl
+ as the concrete implementation of it.
+
+ * History/WebBackForwardList.mm:
+ (-[WebBackForwardList init]):
+ (-[WebBackForwardList setPageCacheSize:]):
+ (-[WebBackForwardList pageCacheSize]):
+
+2010-07-07 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Patch for https://bugs.webkit.org/show_bug.cgi?id=41772
+ Add basic piping for BackForwardControllerClient.
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+
+2010-07-07 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Change requestURL to a KURL.
+ https://bugs.webkit.org/show_bug.cgi?id=41775
+
+ * Plugins/WebNetscapePluginStream.h:
+ (WebNetscapePluginStream::setRequestURL):
+ * Plugins/WebNetscapePluginStream.mm:
+ (WebNetscapePluginStream::pluginCancelledConnectionError):
+ (WebNetscapePluginStream::errorForReason):
+ (WebNetscapePluginStream::startStream):
+ (WebNetscapePluginStream::didReceiveResponse):
+ (WebNetscapePluginStream::destroyStream):
+
+2010-07-07 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Rename the WebBaseNetscapePluginStream.cpp and .h files to WebNetscapePluginStream.cpp and .h to match the class name.
+
+ * Plugins/WebNetscapePluginStream.h: Renamed from WebKit/mac/Plugins/WebBaseNetscapePluginStream.h.
+ * Plugins/WebNetscapePluginStream.mm: Renamed from WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm.
+
+2010-07-06 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Expose URL matching from WebUserContentURLPattern
+ https://bugs.webkit.org/show_bug.cgi?id=41726
+ <rdar://problem/7910144>
+
+ We previously had a way to construct WebUserContentURLPattern
+ instances via WebKit, but no way for callers to perform matching.
+ This patch adds the matchesURL functionality to allow for this.
+
+ * Misc/WebUserContentURLPattern.h: Added matchesURL.
+ * Misc/WebUserContentURLPattern.mm:
+ (-[WebUserContentURLPattern matchesURL:]): Added. Calls through to WebCore::UserContentURLPattern::matches.
+
+2010-06-23 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Eric Carlson.
+
+ [GStreamer] on Mac OS use a runloop observer to process the glib context iterations
+ https://bugs.webkit.org/show_bug.cgi?id=35747
+
+ If VIDEO and GSTREAMER are enabled, make the WebView start a
+ runloop observer that will trigger the glib main context
+ iterations. Those are needed by the GStreamer player only at the
+ moment but could later be used for other GLib-dependant components
+ if required.
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+ (-[WebView _close]):
+ (-[WebView _clearGlibLoopObserver]):
+ (glibContextIterationCallback):
+ (-[WebView _scheduleGlibContextIterations]):
+ * WebView/WebViewData.h:
+ * WebView/WebViewInternal.h:
+
+2010-07-03 Jon Honeycutt <jhoneycutt@apple.com>
+
+ The missing plug-in indicator should be clickable
+
+ https://bugs.webkit.org/show_bug.cgi?id=41550
+ <rdar://problem/8132162>
+
+ From an original patch by Kevin Decker.
+
+ Reviewed by Darin Adler.
+
+ * WebCoreSupport/WebChromeClient.h:
+ Declare an override of missingPluginButtonClicked().
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::missingPluginButtonClicked):
+ Call the UIDelegate's method.
+
+ * WebView/WebUIDelegatePrivate.h:
+ Declare didPressMissingPluginButton.
+
+2010-07-01 Timothy Hatcher <timothy@apple.com>
+
+ Provide a WebView preference to disable DNS prefetching.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28825
+ rdar://problem/7181249
+
+ Reviewed by Darin Adler.
+
+ * WebView/WebPreferenceKeysPrivate.h: Added WebKitDNSPrefetchingEnabledPreferenceKey.
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]): Set WebKitDNSPrefetchingEnabledPreferenceKey to YES.
+ (-[WebPreferences isDNSPrefetchingEnabled]): Added. Return WebKitDNSPrefetchingEnabledPreferenceKey's value.
+ (-[WebPreferences setDNSPrefetchingEnabled:]): Added. Set WebKitDNSPrefetchingEnabledPreferenceKey's value.
+ * WebView/WebPreferencesPrivate.h: Added isDNSPrefetchingEnabled and setDNSPrefetchingEnabled:.
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]): Call WebCore::Settings::setDNSPrefetchingEnabled.
+
+2010-07-01 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ <rdar://problem/8148656> <https://bugs.webkit.org/show_bug.cgi?id=41431>
+ REGRESSION (r49411): Various crashes due to JavaScript execution during plug-in destruction
+
+ Strengthen m_inDestroy "swipe under the carpet" fix.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h: Added a long comment about m_inDestroy, and
+ changed it to static.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy): m_inDestroy is now
+ static, so we don't initialize it in constructor.
+ (WebKit::NetscapePluginInstanceProxy::destroy): Assert that we aren't already destroying
+ some plug-in.
+ (WebKit::NetscapePluginInstanceProxy::evaluate): This function accidentally lacked an
+ m_inDestroy check in r42789.
+
+2010-06-29 Zoltan Herczeg <zherczeg@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Add ConvolveMatrixElement to MigrateHeaders.make
+ https://bugs.webkit.org/show_bug.cgi?id=5861
+
+ * MigrateHeaders.make:
+
+2010-06-23 John Gregg <johnnyg@google.com>
+
+ Reviewed by Kent Tamura.
+
+ add ENABLE_DIRECTORY_UPLOAD build support
+ https://bugs.webkit.org/show_bug.cgi?id=41100
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-06-28 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Make it possible to test the new HTML5 TreeBuilder
+ https://bugs.webkit.org/show_bug.cgi?id=41276
+
+ Adam was concerned that someone might make their port
+ depend on this setting (I guess we had some trouble with that
+ with the HTML5Parser setting), so I littered the code with warnings.
+
+ test-html5-parser now tests this code path.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences html5TreeBuilderEnabled]):
+ (-[WebPreferences setHTML5TreeBuilderEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-06-25 Yuzo Fujishima <yuzo@google.com>
+
+ Reviewed by Shinichiro Hamaji.
+
+ Improve default value handling for page format properties.
+ https://bugs.webkit.org/show_bug.cgi?id=41150
+
+ * Misc/WebCoreStatistics.h:
+ * Misc/WebCoreStatistics.mm:
+ (-[WebFrame pageSizeAndMarginsInPixels:pageNumber:width:height:marginTop:marginRight:marginBottom:]):
+
+2010-06-26 Tony Gentilcore <tonyg@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Add an ENABLE_WEB_TIMING option for enabling Web Timing support.
+ https://bugs.webkit.org/show_bug.cgi?id=38924
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-06-24 Jer Noble <jer.noble@apple.com>
+
+ Reviewed by Eric Carlson.
+
+ Full-screened content doesn't keep the display on: Safari not grabbing a power assertion?
+ https://bugs.webkit.org/show_bug.cgi?id=40939
+ rdar://problem/7996172
+
+ Take a IOKit power assertion when playing video in fullscreen mode. Release the
+ assertion when paused in fullscreen mode, and when exiting fullscreen mode.
+
+ * WebView/WebVideoFullscreenController.h:
+ * WebView/WebVideoFullscreenController.mm:
+ (-[WebVideoFullscreenController windowDidExitFullscreen]): Call updatePowerAssertions.
+ (-[WebVideoFullscreenController windowDidEnterFullscreen]): Call updatePowerAssertions.
+ (-[WebVideoFullscreenController _disableIdleDisplaySleep]):
+ (-[WebVideoFullscreenController _enableIdleDisplaySleep]):
+ (-[WebVideoFullscreenController _disableIdleSystemSleep]):
+ (-[WebVideoFullscreenController _enableIdleSystemSleep]):
+ (-[WebVideoFullscreenController updatePowerAssertions]): Call _(enable|disable)Idle(System|Display)sleep depending on current playback rate and fullscreen status.
+ (-[WebVideoFullscreenController rateChanged:]): Call updatePowerAssertions.
+
+2010-06-24 Jer Noble <jer.noble@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Playing movie full screen on second monitor hides menu bar and title bar on main monitor
+ https://bugs.webkit.org/show_bug.cgi?id=40933
+ rdar://problem/7858452
+
+ Remove all references to GetSystemUIMode and SetSystemUIMode. Replace these calls with
+ [NSApplication setPresentationOptions:]. Do not auto-hide the menu bar if the fullscreen
+ screen is does not contain the menu-bar. Do not auto-hide the dock if the fullscreen screen
+ is both not the menu-bar screen and not the dock screen.
+
+ * WebView/WebVideoFullscreenController.mm:
+ (-[WebVideoFullscreenController windowDidLoad]): Register the applicationDidChangeScreenParameters: listener.
+ (-[WebVideoFullscreenController windowDidExitFullscreen]): Calls updateMenuAndDockForFullscreen.
+ (-[WebVideoFullscreenController windowDidEnterFullscreen]): Calls updateMenuAndDockForFullscreen.
+ (-[WebVideoFullscreenController applicationDidChangeScreenParameters:]): New notification handler; catches NSApplicationDidChangeScreenParameters.
+ (-[WebVideoFullscreenController updateMenuAndDockForFullscreen]): Hide/show the menu-bar and dock according to the fullscreen window's screen.
+
+2010-06-24 Jer Noble <jer.noble@apple.com>
+
+ Reviewed by Eric Carlson.
+
+ Full screen video in Safari exits full-screen if you switch to another app
+ https://bugs.webkit.org/show_bug.cgi?id=40635
+ rdar://problem/7885101
+
+ Implement the following rules for exiting full screen when switching apps:
+ 1. If the system has a single screen, switching apps will cause Safari to exit full-screen.
+ 2. Otherwise, if the full-screen screen is the "main screen" (the one with the title bar),
+ switching apps will cause Safari to exit full-screen.
+ 3. Overriding rules 1 & 2, if the full-screen screen is not on the "current space",
+ switching apps will NOT cause Safari to exit full-screen.
+
+ * WebView/WebVideoFullscreenController.mm:
+ (-[WebVideoFullscreenController windowDidLoad]):
+ (-[WebVideoFullscreenController applicationDidResignActive:]):
+
+2010-06-24 Adele Peterson <adele@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Updated fix for <rdar://problem/8093680> "Paste and Match Style" should fire paste events
+ https://bugs.webkit.org/show_bug.cgi?id=41085
+
+ * WebView/WebHTMLView.mm: Use the WebCore command system for the pasteAsPlainText selector.
+ Also remove internal methods that no one is using.
+
+2010-06-24 Damian Kaleta <dkaleta@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Added an ObjC wrapper to Node::renderRect(bool&).
+
+ * DOM/WebDOMOperations.mm:
+ (-[DOMNode _renderRect:]):
+ * DOM/WebDOMOperationsPrivate.h:
+
+2010-06-24 Adele Peterson <adele@apple.com>
+
+ Reviewed by Eric Carlson.
+
+ Fix for <rdar://problem/8093680> "Paste and Match Style" should fire paste events
+ https://bugs.webkit.org/show_bug.cgi?id=41085
+
+ * WebView/WebHTMLView.mm: (-[WebHTMLView pasteAsPlainText:]): Reuse code in WebCore
+ which does everything done here and also fires paste events.
+
+2010-06-23 Yuzo Fujishima <yuzo@google.com>
+
+ Reviewed by Shinichiro Hamaji.
+
+ Implement page format data programming interface.
+ Add methods for testing.
+ https://bugs.webkit.org/show_bug.cgi?id=37538
+
+ * Misc/WebCoreStatistics.h:
+ * Misc/WebCoreStatistics.mm:
+ (-[WebFrame isPageBoxVisible:]):
+ (-[WebFrame pageAreaRectInPixels:]):
+ (-[WebFrame preferredPageSizeInPixels:]):
+
+2010-06-22 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Get rid of more USE_LIBDISPATCH code.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.h:
+
+2010-06-22 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Get rid of the USE_LIBDISPATCH code.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
+ (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
+
+2010-06-22 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Wean NetscapePluginHostManager of any knowledge about WebNetscapePluginPackage
+ https://bugs.webkit.org/show_bug.cgi?id=41006
+
+ * Plugins/Hosted/NetscapePluginHostManager.h:
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::hostForPlugin):
+ (WebKit::NetscapePluginHostManager::spawnPluginHost):
+ (WebKit::NetscapePluginHostManager::instantiatePlugin):
+ (WebKit::NetscapePluginHostManager::createPropertyListFile):
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView createPlugin]):
+ * Plugins/WebNetscapePluginPackage.mm:
+ (-[WebNetscapePluginPackage createPropertyListFile]):
+
+2010-06-21 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Fix an off-by-one bug I introduced.
+
+ * Plugins/WebNetscapePluginPackage.mm:
+ (-[WebNetscapePluginPackage getPluginInfoFromResources]):
+
+2010-06-21 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ FrameLoader cleanup: Split high level subframe and plugin
+ loading functions into a separate class.
+ https://bugs.webkit.org/show_bug.cgi?id=40453
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _cacheabilityDictionary]):
+
+2010-06-21 Anders Carlsson <andersca@apple.com>
+
+ Another Tiger build fix.
+
+ * Plugins/WebNetscapePluginPackage.mm:
+ (-[WebNetscapePluginPackage _tryLoad]):
+
+2010-06-21 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ More WebBasePluginPackage cleanup
+ https://bugs.webkit.org/show_bug.cgi?id=40944
+
+ * Plugins/Hosted/HostedNetscapePluginStream.mm:
+ (WebKit::HostedNetscapePluginStream::pluginCancelledConnectionError):
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::spawnPluginHost):
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (WebNetscapePluginStream::pluginCancelledConnectionError):
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (WebHaltablePlugin::pluginName):
+ * Plugins/WebBasePluginPackage.h:
+ * Plugins/WebBasePluginPackage.mm:
+ (-[WebBasePluginPackage initWithPath:]):
+ (-[WebBasePluginPackage _objectForInfoDictionaryKey:]):
+ (-[WebBasePluginPackage getPluginInfoFromPLists]):
+ (-[WebBasePluginPackage load]):
+ (-[WebBasePluginPackage dealloc]):
+ (-[WebBasePluginPackage finalize]):
+ (-[WebBasePluginPackage pluginInfo]):
+ (-[WebBasePluginPackage supportsExtension:]):
+ (-[WebBasePluginPackage supportsMIMEType:WebCore::]):
+ (-[WebBasePluginPackage MIMETypeForExtension:]):
+ (-[WebBasePluginPackage isJavaPlugIn]):
+ (-[WebBasePluginPackage versionNumber]):
+ (-[WebBasePluginPackage WebCore::]):
+ * Plugins/WebNetscapePluginPackage.mm:
+ (-[WebNetscapePluginPackage openResourceFile]):
+ (-[WebNetscapePluginPackage closeResourceFile:]):
+ (-[WebNetscapePluginPackage getPluginInfoFromResources]):
+ (-[WebNetscapePluginPackage _initWithPath:]):
+ (-[WebNetscapePluginPackage _applyDjVuWorkaround]):
+ (-[WebNetscapePluginPackage _tryLoad]):
+ (-[WebNetscapePluginPackage supportsSnapshotting]):
+ (-[WebNetscapePluginPackage _unloadWithShutdown:]):
+ * Plugins/WebPluginDatabase.mm:
+ (-[WebPluginDatabase refresh]):
+ (-[WebPluginDatabase _removePlugin:]):
+ * Plugins/WebPluginPackage.mm:
+ (-[WebPluginPackage initWithPath:]):
+ (-[WebPluginPackage load]):
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createPlugin):
+ * WebCoreSupport/WebPlatformStrategies.mm:
+ (WebPlatformStrategies::getPluginInfo):
+
+2010-06-21 Anders Carlsson <andersca@apple.com>
+
+ Another PowerPC build fix.
+
+ * Plugins/WebNetscapePluginPackage.mm:
+ (-[WebNetscapePluginPackage openResourceFile]):
+ (-[WebNetscapePluginPackage _tryLoad]):
+
+2010-06-21 Anders Carlsson <andersca@apple.com>
+
+ Try to fix the PowerPC build.
+
+ * Plugins/WebNetscapePluginPackage.mm:
+ (-[WebNetscapePluginPackage _tryLoad]):
+
+2010-06-21 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Update relevant calls into FrameLoader to make use of
+ FrameLoaderStateMachine.
+ https://bugs.webkit.org/show_bug.cgi?id=39695
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::transitionToCommittedForNewPage):
+ * WebView/WebFrame.mm:
+ (-[WebFrame _firstLayoutDone]):
+
+2010-06-21 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Dan Bernstein.
+
+ Chromium/Mac build fix.
+
+ * WebCoreSupport/WebSystemInterface.mm: Change the order of wtf/Platform.h include to let other
+ headers smell it.
+
+2010-06-21 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Make all of WebKit build with clang++
+
+ * DefaultDelegates/WebDefaultPolicyDelegate.m:
+ (-[WebDefaultPolicyDelegate webView:decidePolicyForMIMEType:request:frame:decisionListener:]):
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView resolvedURLStringForURL:target:]):
+ * WebView/WebDynamicScrollBarsView.mm:
+ (-[WebDynamicScrollBarsView setSuppressLayout:]):
+ * WebView/WebHTMLRepresentation.mm:
+ * WebView/WebNavigationData.mm:
+ (-[WebNavigationData initWithURLString:title:originalRequest:response:hasSubstituteData:clientRedirectSource:]):
+ * WebView/WebPDFRepresentation.mm:
+ (-[WebPDFRepresentation setDataSource:]):
+ (-[WebPDFRepresentation receivedData:withDataSource:]):
+ (-[WebPDFRepresentation receivedError:withDataSource:]):
+ * WebView/WebResource.mm:
+ (-[WebResource description]):
+ * WebView/WebSerializedJSValue.mm:
+ (-[WebSerializedJSValue initWithValue:context:exception:]):
+ * WebView/WebVideoFullscreenController.mm:
+ (-[WebVideoFullscreenController WebCore::]):
+ (-[WebVideoFullscreenController setMediaElement:WebCore::]):
+ (-[WebVideoFullscreenController setDelegate:]):
+ (-[WebVideoFullscreenController enterFullscreen:]):
+ * WebView/WebView.mm:
+ (-[WebView _openFrameInNewWindowFromMenu:]):
+ (-[WebView _geolocationDidChangePosition:]):
+
+2010-06-21 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Remove unused dictionary ivars from WebBasePluginPackage
+ https://bugs.webkit.org/show_bug.cgi?id=40928
+
+ * Plugins/WebBasePluginPackage.h:
+ * Plugins/WebBasePluginPackage.mm:
+ (-[WebBasePluginPackage getPluginInfoFromPLists]):
+ (-[WebBasePluginPackage dealloc]):
+ * Plugins/WebNetscapePluginPackage.mm:
+ (-[WebNetscapePluginPackage getPluginInfoFromResources]):
+
+2010-06-21 Dan Bernstein <mitz@apple.com>
+
+ Build fix
+
+ * WebCoreSupport/WebSystemInterface.mm:
+ (InitWebCoreSystemInterface):
+
+2010-06-21 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ WebKit part of implementing the 'hyphens' and 'hyphenate-character' properties
+ https://bugs.webkit.org/show_bug.cgi?id=10228
+
+ * WebCoreSupport/WebSystemInterface.mm:
+ (InitWebCoreSystemInterface): Initialize wkGetHyphenationLocationBeforeIndex.
+
+2010-06-21 Satish Sampath <satish@chromium.org>
+
+ Reviewed by Steve Block.
+
+ Speech Input Patch 0: Added compilation argument to conditionally compile pending patches.
+ https://bugs.webkit.org/show_bug.cgi?id=40878
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-06-20 Anders Carlsson <andersca@apple.com>
+
+ Fix Tiger build.
+
+ * Plugins/WebNetscapePluginPackage.mm:
+
+2010-06-20 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Get rid of the old MIMETypes getter method
+ https://bugs.webkit.org/show_bug.cgi?id=40898
+
+ * Plugins/WebBasePluginPackage.h:
+ * Plugins/WebBasePluginPackage.mm:
+ (-[WebBasePluginPackage supportsExtension:]):
+ (-[WebBasePluginPackage supportsMIMEType:WebCore::]):
+ (-[WebBasePluginPackage MIMETypeForExtension:]):
+ * Plugins/WebPluginDatabase.mm:
+ (-[WebPluginDatabase refresh]):
+ (-[WebPluginDatabase _removePlugin:]):
+
+2010-06-20 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Remove bogus const qualifiers.
+
+ * WebCoreSupport/WebPasteboardHelper.h:
+ * WebCoreSupport/WebPasteboardHelper.mm:
+ (WebPasteboardHelper::urlFromPasteboard):
+ (WebPasteboardHelper::plainTextFromPasteboard):
+ (WebPasteboardHelper::fragmentFromPasteboard):
+
+2010-06-20 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Get rid of the extensionToMIME mapping in WebBasePluginPackage
+ https://bugs.webkit.org/show_bug.cgi?id=40897
+
+ Instead of using the extensionToMIME mutable dictionary, use the MIME types vector.
+ While this makes lookup of MIME types based on extensions linear instead of constant,
+ the number of extensions per plug-in is too small for it to matter.
+
+ * Plugins/WebBasePluginPackage.h:
+ * Plugins/WebBasePluginPackage.mm:
+ (-[WebBasePluginPackage initWithPath:]):
+ (-[WebBasePluginPackage dealloc]):
+ (-[WebBasePluginPackage supportsExtension:]):
+ (-[WebBasePluginPackage MIMETypeForExtension:]):
+ (-[WebBasePluginPackage setMIMEToExtensionsDictionary:]):
+
+2010-06-20 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Add a MimeClassInfo Vector to WebBasePluginPackage
+ https://bugs.webkit.org/show_bug.cgi?id=40896
+
+ * Plugins/WebBasePluginPackage.h:
+ * Plugins/WebBasePluginPackage.mm:
+ (-[WebBasePluginPackage getPluginInfoFromPLists]):
+ (-[WebBasePluginPackage WebCore::]):
+ * Plugins/WebNetscapePluginPackage.mm:
+ (-[WebNetscapePluginPackage getPluginInfoFromResources]):
+ * WebCoreSupport/WebPlatformStrategies.mm:
+ (WebPlatformStrategies::getPluginInfo):
+
+2010-06-20 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Move the NSBundle ivar to WebPluginPackage
+ https://bugs.webkit.org/show_bug.cgi?id=40894
+
+ * Plugins/WebBasePluginPackage.h:
+ * Plugins/WebBasePluginPackage.mm:
+ (-[WebBasePluginPackage initWithPath:]):
+ (-[WebBasePluginPackage _objectForInfoDictionaryKey:]):
+ (-[WebBasePluginPackage getPluginInfoFromPLists]):
+ (-[WebBasePluginPackage load]):
+ (-[WebBasePluginPackage dealloc]):
+ * Plugins/WebNetscapePluginPackage.mm:
+ (-[WebNetscapePluginPackage _initWithPath:]):
+ * Plugins/WebPluginPackage.h:
+ * Plugins/WebPluginPackage.mm:
+ (-[WebPluginPackage initWithPath:]):
+ (-[WebPluginPackage dealloc]):
+ (-[WebPluginPackage viewFactory]):
+ (-[WebPluginPackage load]):
+
+2010-06-20 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Remove -[WebBasePluginPackage bundle]
+ https://bugs.webkit.org/show_bug.cgi?id=40892
+
+ Add -[WebBasePluginPackage bundleIdentifier] and switch clients over to it.
+
+ Move the supportsSnapshotting method over to the plug-in package.
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::hostForPackage):
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
+ (-[WebBaseNetscapePluginView supportsSnapshotting]):
+ * Plugins/WebBasePluginPackage.h:
+ * Plugins/WebBasePluginPackage.mm:
+ (-[WebBasePluginPackage isQuickTimePlugIn]):
+ (-[WebBasePluginPackage isJavaPlugIn]):
+ (-[WebBasePluginPackage WebCore::]):
+ Call bundleIdentifier directly instead of asking the bundle
+ * Plugins/WebNetscapePluginPackage.h:
+ * Plugins/WebNetscapePluginPackage.mm:
+ (-[WebNetscapePluginPackage supportsSnapshotting]):
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView setAttributeKeys:andValues:]):
+ (-[WebNetscapePluginView _createPlugin]):
+ * Plugins/WebPluginDatabase.mm:
+ (checkCandidate):
+
+2010-06-20 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Change some WebPluginDabase ivars to use WebCore::String instead of NSString.
+ https://bugs.webkit.org/show_bug.cgi?id=40869
+
+ Re-land r61459, with extra null-checks in WebFrameLoaderClient.
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::spawnPluginHost):
+ * Plugins/WebBasePluginPackage.h:
+ * Plugins/WebBasePluginPackage.mm:
+ (-[WebBasePluginPackage initWithPath:]):
+ (-[WebBasePluginPackage getPluginInfoFromPLists]):
+ (-[WebBasePluginPackage dealloc]):
+ (-[WebBasePluginPackage name]):
+ (-[WebBasePluginPackage path]):
+ (-[WebBasePluginPackage filename]):
+ (-[WebBasePluginPackage pluginDescription]):
+ (-[WebBasePluginPackage description]):
+ (-[WebBasePluginPackage isJavaPlugIn]):
+ * Plugins/WebNetscapePluginPackage.mm:
+ (-[WebNetscapePluginPackage getPluginInfoFromResources]):
+ (-[WebNetscapePluginPackage _tryLoad]):
+ (-[WebNetscapePluginPackage _unloadWithShutdown:]):
+ * Plugins/WebPluginPackage.mm:
+ (-[WebPluginPackage load]):
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createPlugin):
+
+2010-06-18 Adam Barth <abarth@webkit.org>
+
+ Unreviewed, rolling out r61459.
+ http://trac.webkit.org/changeset/61459
+ https://bugs.webkit.org/show_bug.cgi?id=40869
+
+ Seems to have broken two tests on the Tiger buildbot:
+
+ dom/html/level2/html/AppletsCollection.html
+ plugins/qt-qwidget-plugin.html
+
+ Anders wasn't on #webkit...
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::spawnPluginHost):
+ * Plugins/WebBasePluginPackage.h:
+ * Plugins/WebBasePluginPackage.mm:
+ (-[WebBasePluginPackage initWithPath:]):
+ (-[WebBasePluginPackage getPluginInfoFromPLists]):
+ (-[WebBasePluginPackage dealloc]):
+ (-[WebBasePluginPackage name]):
+ (-[WebBasePluginPackage path]):
+ (-[WebBasePluginPackage filename]):
+ (-[WebBasePluginPackage pluginDescription]):
+ (-[WebBasePluginPackage setName:]):
+ (-[WebBasePluginPackage setPath:]):
+ (-[WebBasePluginPackage setPluginDescription:]):
+ (-[WebBasePluginPackage description]):
+ (-[WebBasePluginPackage isJavaPlugIn]):
+ * Plugins/WebNetscapePluginPackage.mm:
+ (-[WebNetscapePluginPackage getPluginInfoFromResources]):
+ (-[WebNetscapePluginPackage _tryLoad]):
+ (-[WebNetscapePluginPackage _unloadWithShutdown:]):
+ * Plugins/WebPluginPackage.mm:
+ (-[WebPluginPackage load]):
+
+2010-06-18 Anders Carlsson <andersca@apple.com>
+
+ Fix Tiger build.
+
+ * Plugins/WebBasePluginPackage.mm:
+ (-[WebBasePluginPackage isJavaPlugIn]):
+
+2010-06-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Change some WebPluginDabase ivars to use WebCore::String instead of NSString.
+ https://bugs.webkit.org/show_bug.cgi?id=40869
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::spawnPluginHost):
+ * Plugins/WebBasePluginPackage.h:
+ * Plugins/WebBasePluginPackage.mm:
+ (-[WebBasePluginPackage initWithPath:]):
+ (-[WebBasePluginPackage getPluginInfoFromPLists]):
+ (-[WebBasePluginPackage dealloc]):
+ (-[WebBasePluginPackage name]):
+ (-[WebBasePluginPackage path]):
+ (-[WebBasePluginPackage filename]):
+ (-[WebBasePluginPackage pluginDescription]):
+ (-[WebBasePluginPackage description]):
+ (-[WebBasePluginPackage isJavaPlugIn]):
+ * Plugins/WebNetscapePluginPackage.mm:
+ (-[WebNetscapePluginPackage getPluginInfoFromResources]):
+ (-[WebNetscapePluginPackage _tryLoad]):
+ (-[WebNetscapePluginPackage _unloadWithShutdown:]):
+ * Plugins/WebPluginPackage.mm:
+ (-[WebPluginPackage load]):
+
+2010-06-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Rename WebPluginPackage.m to make it an Objective-C++ file.
+
+ * Plugins/WebPluginPackage.m: Removed.
+ * Plugins/WebPluginPackage.mm: Copied from Plugins/WebPluginPackage.m.
+
+2010-06-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Get rid of the NSEnumerators from WebBasePluginPackage
+ https://bugs.webkit.org/show_bug.cgi?id=40868
+
+ * Plugins/WebBasePluginPackage.h:
+ * Plugins/WebBasePluginPackage.mm:
+ (-[WebBasePluginPackage MIMETypes]):
+ (-[WebBasePluginPackage supportsExtension:]):
+ (-[WebBasePluginPackage supportsMIMEType:]):
+ * Plugins/WebPluginDatabase.mm:
+ (-[WebPluginDatabase pluginForMIMEType:]):
+ (-[WebPluginDatabase pluginForExtension:]):
+ (-[WebPluginDatabase refresh]):
+ (-[WebPluginDatabase _removePlugin:]):
+ * WebCoreSupport/WebPlatformStrategies.mm:
+ (WebPlatformStrategies::getPluginInfo):
+
+2010-06-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Make WebCoreSystemInterface.h a C++ only header
+ https://bugs.webkit.org/show_bug.cgi?id=40867
+
+ * WebCoreSupport/WebSystemInterface.h:
+ * WebCoreSupport/WebSystemInterface.m: Removed.
+ * WebCoreSupport/WebSystemInterface.mm: Copied from WebKit/mac/WebCoreSupport/WebSystemInterface.m.
+
+2010-06-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Clean up WebPluginDatabase.mm
+ https://bugs.webkit.org/show_bug.cgi?id=40866
+
+ * Plugins/WebBasePluginPackage.h:
+ * Plugins/WebBasePluginPackage.mm:
+ (pathByResolvingSymlinksAndAliases):
+ (-[WebBasePluginPackage initWithPath:]):
+ Change an instance method into a static function.
+
+ * Plugins/WebPluginDatabase.mm:
+ (PluginPackageCandidates::PluginPackageCandidates):
+ (PluginPackageCandidates::update):
+ (PluginPackageCandidates::bestCandidate):
+ Add a new PluginPackageCandidates class.
+
+ (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]):
+ Use PluginPackageCandidates here.
+
+2010-06-18 Anders Carlsson <andersca@apple.com>
+
+ Fix Tiger build.
+
+ * WebCoreSupport/WebPlatformStrategies.mm:
+
+2010-06-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Get rid of PluginDataMac.mm and use the plug-in strategy instead
+ https://bugs.webkit.org/show_bug.cgi?id=40860
+
+ * Plugins/WebBasePluginPackage.h:
+ * WebCoreSupport/WebPlatformStrategies.h:
+ * WebCoreSupport/WebPlatformStrategies.mm:
+ (WebPlatformStrategies::createPluginStrategy):
+ (WebPlatformStrategies::refreshPlugins):
+ (WebPlatformStrategies::getPluginInfo):
+ * WebCoreSupport/WebViewFactory.mm:
+
+2010-06-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Add stubbed out WebPlatformStrategies class to WebKit.
+ https://bugs.webkit.org/show_bug.cgi?id=40851
+
+ * WebCoreSupport/WebPlatformStrategies.h: Added.
+ * WebCoreSupport/WebPlatformStrategies.mm: Added.
+ (WebPlatformStrategies::initialize):
+ (WebPlatformStrategies::WebPlatformStrategies):
+ (WebPlatformStrategies::createPluginStrategy):
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+
+2010-06-15 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Move isAvailable()/setIsAvailable() from Database/DatabaseSync to AbstractDatabase.
+ https://bugs.webkit.org/show_bug.cgi?id=39041
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-06-17 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Use adoptRef and create functions in more code paths
+ https://bugs.webkit.org/show_bug.cgi?id=40760
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h: Made create no longer
+ be an inline function.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
+ Moved the call to addPluginInstance out of here.
+ (WebKit::NetscapePluginInstanceProxy::create): Move it in here.
+ This makes sure we call adoptRef on the new proxy before any caller
+ calls ref on it.
+
+2010-06-16 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Enable HTML5 Parser in Safari on Mac
+ https://bugs.webkit.org/show_bug.cgi?id=40739
+
+ The HTML5 parser is probably off on all webkit ports.
+ We should either flip the meaning of the default so that
+ "false" means HTML5 on all ports, or we'll have to write
+ more code like this for all the other ports.
+
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+
+2010-06-15 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Don't leak WebGeolocationPositionInternal and GeolocationPosition instances for every WebGeolocationPosition created.
+
+ * WebView/WebGeolocationPosition.mm:
+ (-[WebGeolocationPosition dealloc]): Implement -dealloc and release our WebGeolocationPositionInternal instance.
+
+2010-06-10 Yuzo Fujishima <yuzo@google.com>
+
+ Reviewed by Shinichiro Hamaji.
+
+ Implement render style selection for pages to support CSS3 Paged Media.
+ https://bugs.webkit.org/show_bug.cgi?id=35961
+
+ * Misc/WebCoreStatistics.h:
+ * Misc/WebCoreStatistics.mm:
+ (-[WebFrame pageProperty:propertyName:]):
+
+2010-06-15 Darin Adler <darin@apple.com>
+
+ Reviewed by Adam Barth.
+
+ Move functions out of Frame class that were marked "move to Chrome"
+ https://bugs.webkit.org/show_bug.cgi?id=39636
+
+ * WebView/WebView.mm:
+ (-[WebView shouldClose]): Call shouldClose on FrameLoader instead of
+ going through Frame.
+
+2010-06-15 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Remove getPluginInfoFromBundleAndMIMEDictionary:
+
+ * Plugins/WebBasePluginPackage.mm:
+
+2010-06-15 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fold getPluginInfoFromBundleAndMIMEDictionary: into its sole caller.
+
+ * Plugins/WebBasePluginPackage.mm:
+ (-[WebBasePluginPackage getPluginInfoFromPLists]):
+
+2010-06-11 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/8084721> Pages using accelerated compositing fail to update correctly in Carbon apps
+
+ The run loop observer used to commit compositing layer changes does not do
+ updates if [window viewsNeedDisplay] is true, because this indicates that a delayed window
+ update is pending (added in r58623).
+
+ However, Carbon apps don't use the NSWindow updating mechanism, so [window viewsNeedDisplay] always returns YES.
+ This caused us to never sync compositing layers.
+
+ So detect if the current window is wrapping a carbon window, and in that case consult the root
+ HIView to detect if display is pending.
+
+ * WebView/WebView.mm:
+ (layerSyncRunLoopObserverCallBack):
+
+2010-06-15 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by John Sullivan.
+
+ <rdar://problem/8077032> REGRESSION (r50796): Black background on AppleScript generated email
+
+ Test: platform/mac/editing/input/NSBackgroundColor-transparent.html
+
+ r50796 changed the initial background color from invalid to transparent. As a result,
+ NSAttributedStrings returned from +_web_attributedStringFromRange started including the
+ NSBackgroundColor attribute, with a transparent color as the value. This caused problems for
+ components in the system that ignore the alpha component, turning the color into opaque black.
+
+ * Misc/WebNSAttributedStringExtras.mm:
+ (+[NSAttributedString _web_attributedStringFromRange:]): Change to not include the background
+ and foreground color attributes if the color are transparent.
+
+2010-06-14 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc
+ data from inspected page to WebInspector as JSON string via http. The native
+ serialization to JSON string is supported by InspectorValue's classes. This patch
+ has the implementation of sendMessageToFrontend function. WebKit version of it still
+ uses ScriptFunctionCall and will be switched to another transport a little bit later.
+ https://bugs.webkit.org/show_bug.cgi?id=40134
+
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorClient::WebInspectorClient):
+ (WebInspectorClient::openInspectorFrontend):
+
+2010-06-10 David Hyatt <hyatt@apple.com>
+
+ Reviewed by John Sullivan.
+
+ https://bugs.webkit.org/show_bug.cgi?id=40441, back out the original fix for 29601, since it has broken continuous
+ wheel delta values.
+
+ * WebView/WebDynamicScrollBarsView.mm:
+ (-[WebDynamicScrollBarsView scrollWheel:]):
+
+2010-06-09 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r60889.
+ http://trac.webkit.org/changeset/60889
+ https://bugs.webkit.org/show_bug.cgi?id=40365
+
+ gtk bot has some kind of memory corruption (Requested by
+ loislo on #webkit).
+
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorClient::WebInspectorClient):
+ (WebInspectorClient::openInspectorFrontend):
+ (-[WebInspectorWindowController destroyInspectorView]):
+
+2010-06-07 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc
+ data from inspected page to WebInspector as JSON string via http. The native
+ serialization to JSON string is supported by InspectorValue's classes. This patch
+ has the implementation of sendMessageToFrontend function. WebKit version of it still
+ uses ScriptFunctionCall and will be switched to another transport a little bit later.
+ https://bugs.webkit.org/show_bug.cgi?id=40134
+
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorClient::WebInspectorClient):
+ (WebInspectorClient::openInspectorFrontend):
+
+2010-06-08 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ <rdar://problem/8072136> REGRESSION (r56051): Inspect Element context menu does nothing in applications linked against 10.4 SDK
+
+ * WebCoreSupport/WebContextMenuClient.mm:
+ (fixMenusReceivedFromOldClients): Fix up the tag on the Inspect Element menu item. This ensures that even if the
+ context menu layout doesn't match our expectations that the menu item will continue to trigger the web inspector.
+
+2010-06-08 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Ojan Vafai and Darin Adler.
+
+ Refactor platform dependent editing behavior code out of Settings
+ https://bugs.webkit.org/show_bug.cgi?id=39854
+
+ EditingBehavior enum was renamed to EditingBehaviorTypes and moved out from Settings.h to
+ EditingBehaviorTypes.h . Call sites in WebKit/ adjusted accordingly.
+
+ * WebView/WebFrame.mm:
+ (core):
+ * WebView/WebFrameInternal.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-06-06 MORITA Hajime <morrita@google.com>
+
+ Unreviewd, follow up to r60820
+
+ https://bugs.webkit.org/show_bug.cgi?id=40219
+ [Mac] ENABLE_METER_TAG should be enabled
+
+ Added ENABLE_METER_TAG.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-06-06 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Bug 40214 - Clean up error construction / throwing in JSC.
+
+ The one egregious insanity here is that creating an error requires
+ a VM-entry-esqe-host call (the string argument is wrapped as a JS
+ object & pushed on the RegisterFile, then unwrapped back to a
+ UString). Changing this also means you only require a global
+ object, not an ExecState, to create an error.
+
+ The methods to create error objects are also parameterized
+ requiring a switch on the type, which can be made cleaner and
+ faster by moving to a separate method per error type. Code to add
+ divot information to error had been duplicated, and is coalesced
+ back into a single function.
+
+ Convenience methods added to create & throw type & syntax error
+ with a default error message, since this is a common case.
+
+ Also, errors are currently thrown either using
+ "throwError(exec, error)" or "exec->setException(error)" - unify
+ on the former, since this is more commonly used. Add
+ "throwVMError(exec, error)" equivalents, as a convenience for
+ cases where the result was being wrapped in "JSValue::encode(...)".
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::moveGlobalExceptionToExecState):
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyInstance::invokeMethod):
+
+2010-06-02 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Bug 40094 - The return type of NativeFunction should be EncodedJSValue
+ On Windows & Linux, using JSVALUE32_64, EncodedJSValue is returned in registers, but JSValue is not.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::invoke):
+
+2010-06-02 Sterling Swigart <sswigart@google.com>
+
+ Reviewed by David Levin.
+
+ Image Resizer Patch 0: Added compilation argument to conditionally compile pending patches.
+ https://bugs.webkit.org/show_bug.cgi?id=39906
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-06-01 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Add a preference for paginating during layout (the new model for computing page breaks).
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (-[WebPreferences paginateDuringLayoutEnabled]):
+ (-[WebPreferences setPaginateDuringLayoutEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-06-01 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=40025
+ <rdar://problem/8046273> All Flash content crashes after installing CS5 Design Premium.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView supportsSnapshotting]): Do not support snapshotting Flash 10.1 if
+ the version is less than 10.1.53.60.
+
+2010-06-01 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=39434
+ REGRESSION (r59811): Geolocation callbacks cannot be created
+
+ Removing unused WebGeolocationMock.
+
+ * WebCoreSupport/WebGeolocationMock.mm: Removed.
+ * WebCoreSupport/WebGeolocationMockPrivate.h: Removed.
+ * WebKit.exp:
+
+2010-05-30 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Make more HTML DOM members private, especially constructors, third and final batch
+ https://bugs.webkit.org/show_bug.cgi?id=39916
+
+ * WebView/WebHTMLRepresentation.mm:
+ (-[WebHTMLRepresentation elementWithName:inForm:]): Use the new HTMLFormElement
+ function, associatedElements, rather than getting directly at a data member
+ named formElements.
+ (-[WebHTMLRepresentation controlsInForm:]): Ditto.
+
+2010-05-28 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig, Gavin Barraclough, Oliver Hunt.
+
+ Simplified the host calling convention.
+
+ PART ONE: Functional code changes.
+
+ [ None in WebKit ]
+
+ PART TWO: Global search and replace.
+
+ In the areas below, I used global search-and-replace to change
+ (ExecState*, JSObject*, JSValue, const ArgList&) => (ExecState*)
+ args.size() => exec->argumentCount()
+ args.at(i) => exec->argument(i)
+
+ * Plugins/Hosted/ProxyInstance.h:
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyInstance::invoke):
+ (WebKit::ProxyInstance::invokeMethod):
+ (WebKit::ProxyInstance::invokeDefaultMethod):
+
+2010-05-27 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Change z-component to 1.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView viewDidMoveToWindow]):
+ (-[WebHTMLView attachRootLayer:]):
+
+2010-05-26 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Beth Dakin and Darin Adler.
+
+ Fix for <rdar://problem/7464703> HiDPI: [Layers] Compositing layers
+ do not scale properly when running with a resolution independent
+ scale
+
+ Apply the userSpaceScaleFactor as a scale on the layerHostingView.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView viewDidMoveToWindow]):
+ (-[WebHTMLView attachRootLayer:]):
+
+2010-05-25 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=39621
+ <rdar://problem/8009738> Extreme memory growth on DOM Hanoi test
+
+ Removed formStateDidChange support, which is not needed by any client.
+
+ * WebCoreSupport/WebChromeClient.h:
+ (WebChromeClient::formStateDidChange):
+ * WebCoreSupport/WebChromeClient.mm:
+ * WebView/WebUIDelegatePrivate.h:
+
+2010-05-25 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Database origins aren't populated at launch (missing db in prefs sheet, possible other symptoms)
+ <rdar://problem/8013233> and https://bugs.webkit.org/show_bug.cgi?id=39486
+
+ * Storage/WebDatabaseManager.mm:
+ (WebKitInitializeDatabasesIfNecessary): Call initializeTracker() instead of trying to set the path on
+ an already created tracker that already has its origins populated.
+
+2010-05-24 Darin Adler <darin@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ Move view-related functions from Frame to FrameView
+ https://bugs.webkit.org/show_bug.cgi?id=39366
+
+ * WebView/WebView.mm:
+ (-[WebView _setZoomMultiplier:isTextOnly:]): Call function on FrameView.
+ (-[WebView setEditable:]): Get rid of call to empty function,
+ removeEditingStyleFromBodyElement.
+
+2010-05-21 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=39420
+
+ Make sure everyone who needs to is using visitedDependentColor rather than accessing styles
+ directly.
+
+ * Misc/WebNSAttributedStringExtras.mm:
+ (+[NSAttributedString _web_attributedStringFromRange:]):
+ * WebView/WebFrame.mm:
+ (-[WebFrame _bodyBackgroundColor]):
+
+2010-05-21 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Geoffrey Garen.
+
+ All callable objects should have a global object reference
+ https://bugs.webkit.org/show_bug.cgi?id=39495
+
+ Update the plugin proxy to handle the need for global object.
+
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyInstance::newRuntimeObject):
+ (WebKit::ProxyRuntimeMethod::ProxyRuntimeMethod):
+ (WebKit::ProxyInstance::getMethod):
+ * Plugins/Hosted/ProxyRuntimeObject.h:
+ * Plugins/Hosted/ProxyRuntimeObject.mm:
+ (WebKit::ProxyRuntimeObject::ProxyRuntimeObject):
+
+2010-05-21 Steve Block <steveblock@google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ Add DeviceOrientation and DeviceOrientationClient
+ https://bugs.webkit.org/show_bug.cgi?id=39479
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+
+2010-05-20 Mike Thole <mthole@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ When using a scale factor > 1, scrollbars sometimes appear when not necessary
+ https://bugs.webkit.org/show_bug.cgi?id=39458
+
+ * WebView/WebDynamicScrollBarsView.mm:
+ (-[WebDynamicScrollBarsView updateScrollers]): Round up non-integral sizes from AppKit
+ so that they can be compared against the integral document size.
+
+2010-05-20 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=39441
+ <rdar://problem/7985715> Flash context menu is both horizontally and vertically offset from point of click
+ <rdar://problem/7986109> Youtube video controller UI entirely missing
+ <rdar://problem/7986154> Flash content paints at horizontally and vertically shifted locations (within the plug-in region)
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView updateAndSetWindow]): The base coordinates of a window and
+ it's contentView happen to be the equal at a userSpaceScaleFactor of 1. For non-1.0 scale
+ factors this assumption is false. Accordingly we now convert to the window contentView
+ coordinate system when computing bounds in "window" and the visible rect.
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]): Ditto.
+
+2010-05-20 Steve Block <steveblock@google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ Provide bindings for DeviceOrientation
+ https://bugs.webkit.org/show_bug.cgi?id=39210
+
+ Adds ENABLE_DEVICE_ORIENTATION to XCode project file, always disabled.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-05-20 Martin Robinson <mrobinson@webkit.org>
+
+ Reviewed by Ojan Vafai.
+
+ Expose the editing behavior setting in DRT to test all editing code paths
+ https://bugs.webkit.org/show_bug.cgi?id=38603
+
+ * WebView/WebFrame.mm:
+ (core):
+ * WebView/WebFrameInternal.h: Added a conversion method from the API enum to the WebCore enum.
+ * WebView/WebPreferenceKeysPrivate.h: Added a preference key for the new setting.
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]): Initialize the EditingBehavior to Mac style.
+ (-[WebPreferences editingBehavior]): Added.
+ (-[WebPreferences setEditingBehavior:]): Added.
+ * WebView/WebPreferencesPrivate.h: Added the new API points to the private API.
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]): Set the editing behavior via the WebPreferences setting.
+
+2010-05-19 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker and Simon Fraser.
+
+ <rdar://problem/8004528>
+ REGRESSION: Coordinate system for Core Animation NPAPI plug-ins is flipped with accelerated compositing turned on
+
+ When needed, create a new CALayer and set it's geometry to be flipped. Add the plug-in layer as a sublayer and then return
+ the newly created layer.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView createPlugin]):
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView createPlugin]):
+
+2010-05-18 Tony Chang <tony@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24943
+ Command-B and Command-I do not generate keydown events in contentEditable regions.
+
+ Manual test because performKeyEquivalent is not called by DRT.
+
+ Test: manual-tests/style-keypress-events.html
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView performKeyEquivalent:]): Move style key handling until after webcore gets a chance to handle the event
+
+2010-05-18 Daniel Cheng <dcheng@chromium.org>
+
+ Reviewed by Darin Adler, Jian Li.
+
+ DragData::asURL() shouldn't do file validity checks
+ https://bugs.webkit.org/show_bug.cgi?id=38711
+
+ Change [NSPasteboard _web_bestURL] to still return a file URL for paths
+ that don't exist. Callers who care about the existence of the file or
+ whether or not it is a directory should check themselves when they
+ want to use the file. The directory check has been left in for now,
+ since the Mac implementation of ResourceHandle, which uses this function
+ indirectly via DragController::performDrag) handles directories somewhat
+ non-intuitively: it opens the parent directory in the Finder, rather
+ than opening the directory itself.
+
+ * Misc/WebNSPasteboardExtras.mm:
+ (-[NSPasteboard _web_bestURL]):
+
+2010-05-18 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth (and Maciej Stachowiak).
+
+ Make it possible to enable the new HTML5Tokenizer for testing
+ https://bugs.webkit.org/show_bug.cgi?id=39275
+
+ Expose the WebCore::Settings::html5ParserEnabled as a private WebKit setting.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (-[WebPreferences html5ParserEnabled]):
+ (-[WebPreferences setHTML5ParserEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-05-17 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r59652.
+ http://trac.webkit.org/changeset/59652
+ https://bugs.webkit.org/show_bug.cgi?id=39268
+
+ file-input-files-access test is broken on Mac (Requested by
+ dcheng on #webkit).
+
+ * Misc/WebNSPasteboardExtras.mm:
+ (-[NSPasteboard _web_bestURL]):
+
+2010-05-17 Daniel Cheng <dcheng@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ DragData::asURL() shouldn't do file validity checks
+ https://bugs.webkit.org/show_bug.cgi?id=38711
+
+ Change [NSPasteboard _web_bestURL] to still return a file URL for paths
+ that don't exist. Callers who care about the existence of the file or
+ whether or not it is a directory should check themselves when they
+ want to use the file. The directory check has been left in for now,
+ since the Mac implementation of ResourceHandle, which uses this function
+ indirectly via DragController::performDrag) handles directories somewhat
+ non-intuitively: it opens the parent directory in the Finder, rather
+ than opening the directory itself.
+
+ * Misc/WebNSPasteboardExtras.mm:
+ (-[NSPasteboard _web_bestURL]):
+
+2010-05-14 Stephanie Lewis <slewis@apple.com>
+
+ Rubber-stamped by Mark Rowe.
+
+ Update order files.
+
+ * WebKit.order:
+
+2010-05-13 Timothy Hatcher <timothy@apple.com>
+
+ Allow reporting exceptions that occur when using JavaScriptCore APIs
+ to the Web Inspector.
+
+ <rdar://problem/7975410>
+
+ Reviewed by Sam Weinig.
+
+ * WebView/WebView.mm:
+ (+[WebView _reportException:inContext:]): Call WebCore::reportException after checking
+ that the global object is a DOMWindow.
+ * WebView/WebViewPrivate.h: Added _reportException:inContext:.
+
+2010-05-13 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=39089
+ <rdar://problem/7974044> Domain names in Russian '.рф' domain are displayed as punycode
+
+ Add a custom check for this domain. Currently, this is the only non-ASCII TLD, we'll
+ investigate a more extensible solution when there are more, and we know what the
+ typical restictions are.
+
+ * Misc/WebNSURLExtras.mm:
+ (allCharactersAllowedByTLDRules):
+ (-[NSString _web_mapHostNameWithRange:encode:makeString:]):
+
+2010-05-12 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by David Hyatt.
+
+ Composited plug-ins can cause missed painting
+ https://bugs.webkit.org/show_bug.cgi?id=39033
+ <rdar://problem/7972478>
+
+ Eagerly enable compositing mode via the enclosing FrameView when the plug-in tells us it wants
+ to do compositing.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView createPlugin]):
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView createPlugin]):
+
+2010-05-12 Jer Noble <jer.noble@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Bug 38689: #34005 will break fullscreen video playback
+ https://bugs.webkit.org/show_bug.cgi?id=38689
+
+ Use the new definition of PlatformMedia to check the actual type
+ returned by MediaPlayer.
+
+ * WebView/WebVideoFullscreenController.mm:
+ (-[WebVideoFullscreenController windowDidLoad]):
+
+2010-05-11 Mark Rowe <mrowe@apple.com>
+
+ Fix the world.
+
+ In r59162 a change was made to WebCore's FeatureDefines.xcconfig that enabled FILE_READER and FILE_WRITER.
+ The author and reviewer of that patch ignored the carefully-worded warning at the top of that file asking
+ that changes to the file be kept in sync across JavaScriptCore, WebCore and WebKit, as well as being kept
+ in sync with build-webkit. This led to WebCore and WebKit having different views of Document's vtable
+ and results in crashes in Safari shortly after launch when virtual function calls resulted in the wrong
+ function in WebCore being called.
+
+ We fix this by bringing the FeatureDefines.xcconfig files in to sync. Based on the ChangeLog message and
+ other changes in r59162 it appears that enabling FILE_WRITER was unintentional so that particular change
+ has been reverted.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-05-10 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Allow compositing layers to be connected across iframe boundaries on Mac
+ https://bugs.webkit.org/show_bug.cgi?id=38856
+
+ When painting an iframe into a compositing layer, the "PaintBehaviorFlattenCompositingLayers"
+ flag was mistakenly set, because we'd detect that we were drawing into a bitmap. This caused
+ content to show up in both compositing layers, and the painted background inside the iframe.
+
+ Fix by taking the flattening state from the parent frame, if there is one. For the root
+ frame, we continue to look to see if we're painting into a bitmap.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _drawRect:contentsOnly:]):
+
+2010-05-10 Timothy Hatcher <timothy@apple.com>
+
+ Fix a crash when closing a WebView while the Web Inspector is open.
+
+ <rdar://problem/7966830>
+
+ Reviewed by Mark Rowe.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController destroyInspectorView]): Null check Page since it can be null.
+ * WebView/WebView.mm:
+ (-[WebView _close]): Null out _private->page before deleting the page, so code called
+ during destruction don't access a half deleted Page object.
+
+2010-05-10 Anders Carlsson <andersca@apple.com>
+
+ Unbreak the world. (Fix Mac builds).
+
+ * Plugins/Hosted/WebKitPluginHostTypes.h:
+
+2010-05-10 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Change the order of the RendererType enum values, so that old versions of WebKitPluginHost will
+ use accelerated compositing and not layer backed views.
+
+ * Plugins/Hosted/WebKitPluginHostTypes.h:
+
+2010-05-07 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig and Simon Fraser.
+
+ <rdar://problem/7947356>
+ QT Plug-in in hardware-accelerated WebKit is missing the controller
+
+ Replace the useSoftwareRenderer boolean with an enum that lets the plug-in host opt into using a layer
+ backed NSView instead of inserting the layer into the WebCore layer hierarchy.
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::instantiatePlugin):
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCInstantiatePluginReply):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ (WebKit::NetscapePluginInstanceProxy::rendererType):
+ (WebKit::NetscapePluginInstanceProxy::setRendererType):
+ (WebKit::NetscapePluginInstanceProxy::InstantiatePluginReply::InstantiatePluginReply):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
+ Replace the useSoftwareRenderer boolean everywhere with the RendererType enum.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView createPlugin]):
+ Only go into full compositing mode when the renderer type returned is UseAcceleratedCompositing.
+ Otherwise, use a layer backed NSView.
+
+ * Plugins/Hosted/WebKitPluginHostTypes.h:
+ Add a RendererType enum.
+
+2010-05-06 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler and Dan Bernstein..
+
+ REGRESSION (r51617): when plugins are disabled, plugins show up as garbage characters
+ https://bugs.webkit.org/show_bug.cgi?id=38698
+ <rdar://problem/7942075>
+
+ When the plug-in database is initialized, we will register all the MIME types it supports with the global
+ WebView dictionary. When plug-ins are disabled for a single web view, the MIME types still need to be
+ in the global mapping (because other web views might still have plug-ins enabled).
+
+ Prior to r51617 we would always look at the plug-in database to determine that the MIME type belongs to a
+ plug-in, but now we won't even touch the plug-in database when plug-ins are disabled.
+
+ In order to fix this, a new set of registered MIME types that are known to be plug-ins is added. When
+ +[WebView _viewClass:andRepresentationClass:forMIMEType:allowingPlugins:] is called and allowingPlugins is FALSE
+ we check if the MIME type is a known plug-in MIME type and return false in that case.
+
+ * Plugins/WebPluginDatabase.mm:
+ (-[WebPluginDatabase refresh]):
+ (-[WebPluginDatabase _removePlugin:]):
+ * WebView/WebView.mm:
+ (knownPluginMIMETypes):
+ (+[WebView _registerPluginMIMEType:]):
+ (+[WebView _unregisterPluginMIMEType:]):
+ (+[WebView _viewClass:andRepresentationClass:forMIMEType:allowingPlugins:]):
+ * WebView/WebViewInternal.h:
+
+2010-05-06 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7951285> REGRESSION (r58847): Composited iframe content obscures Safari's application chrome
+
+ Fixed this other regression from r58847. The regression was caused by overriding -visibleRect to
+ return the WebClipView’s full bounds. AppKit uses -visibleRect to determine the geometry
+ of the surface for the child WebFrameView. The fix is to restrict the special behavior of
+ -[WebClipView visibleRect] to when AppKit is consulting it for the purpose of invalidating
+ areas while scrolling.
+
+ * WebView/WebClipView.h:
+ * WebView/WebClipView.mm:
+ (-[WebClipView visibleRect]): If the WebClipView is not scrolling, always return
+ [super visibleRect].
+ (-[WebClipView _immediateScrollToPoint:]): Override this internal NSClipView method
+ to set a flag telling -visibleRect that the view is scrolling.
+ * WebView/WebView.mm:
+ (layerSyncRunLoopObserverCallBack): Ensure that screen updates, disabled by AppKit
+ when it thinks an upcoming window flush will re-enable them, are enabled here in
+ case the -setNeedsDisplayInRect: override has prevented the window from needing to be
+ flushed.
+
+2010-05-06 Steve Block <steveblock@google.com>
+
+ Reviewed by Eric Seidel.
+
+ MAC_JAVA_BRIDGE should be renamed JAVA_BRIDGE
+ https://bugs.webkit.org/show_bug.cgi?id=38544
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+
+2010-05-05 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Fixed a crash when closing Top Sites after r58847.
+
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView webFrame]): Null-check _private.
+
+2010-05-05 Dan Bernstein <mitz@apple.com>
+
+ Rubber-stamped by Mark Rowe.
+
+ Fixed test crashes after r58847.
+
+ * WebView/WebHTMLView.mm:
+ (setNeedsDisplayInRect): Null-check the frame.
+
+2010-05-05 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7932072> Iframes in composited layers don’t repaint correctly (affects Yahoo! Mail with Flash Player 10.1)
+ https://bugs.webkit.org/show_bug.cgi?id=38427
+
+ * WebView/WebClipView.m: Renamed to WebClipView.mm.
+ * WebView/WebClipView.mm:
+ (-[WebClipView visibleRect]): Added this override, which for instances used for WebFrameViews in
+ composited layers, returns the clip view’s entire bounds. This prevents drawing from being clipped to
+ AppKit’s idea of what part of the view would be visible if it was drawn as part of the view hierarchy.
+ Since it is drawn into a compositing layer, that’s irrelevant, and we should not be clipping.
+ * WebView/WebHTMLView.mm:
+ (setCursor): Style tweak.
+ (setNeedsDisplayInRect): Added. Replaces the default implementation of -[NSView setNeedsDisplayInRect:],
+ so that if the receiver is a descendant of a WebFrameView that draws into a composited layer, the invalidation
+ is routed back through the WebCore FrameView, which propagates it to the layer.
+ (+[WebHTMLViewPrivate initialize]): Swizzle the setNeedsDisplayInRect: override in.
+ (-[WebHTMLView visibleRect]): Removed whitespace.
+ * WebView/WebView.mm:
+ (layerSyncRunLoopObserverCallBack): If we bailed out on syncing, due to pending layout, do an eager layout
+ in preparation for the displaying of compositing layers.
+
+2010-05-05 John Sullivan <sullivan@apple.com>
+
+ <rdar://problem/7942606> Output appears in Console when exiting Safari with multiple windows opened
+
+ Reviewed by Mark Rowe.
+
+ * WebView/WebView.mm:
+ (+[WebView closeAllWebViews]):
+ Make copy of allWebViewsSet to avoid mutating it while iterating through it.
+
+2010-05-04 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Improve check for drawing into the window that was added in r58623
+ https://bugs.webkit.org/show_bug.cgi?id=38562
+
+ Rather than assuming that any non-bitmap context is the window's context,
+ compare the current graphics context with -[NSWindow graphicsContext] to
+ determine that we're drawing into the window.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView drawRect:]):
+
+2010-05-04 Ada Chan <adachan@apple.com>
+
+ Reviewed by David Kilzer.
+
+ https://bugs.webkit.org/show_bug.cgi?id=38555
+
+ Small code refactoring: move the logic to figure out the path to the
+ databases directory to another method.
+
+ * Storage/WebDatabaseManager.mm:
+ (databasesDirectoryPath):
+ (WebKitInitializeDatabasesIfNecessary):
+
+2010-05-04 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Mike Thole.
+
+ Fix for <rdar://problem/7818509> Crash occurs when exiting Safari
+
+ We can avoid this crash if we call [self _removeFromAllWebViewsSet]
+ even in the case when we are doing a fastDocumentTeardown. This is
+ a much safer approach.
+ * WebView/WebView.mm:
+ (-[WebView _close]):
+
+2010-05-03 Abhishek Arya <inferno@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Add support for controlling clipboard access from javascript.
+ Clipboard access from javascript is disabled by default.
+ https://bugs.webkit.org/show_bug.cgi?id=27751
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences javaScriptCanAccessClipboard]):
+ (-[WebPreferences setJavaScriptCanAccessClipboard:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-05-03 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Add "willSendSubmitEvent" hook to WebFrameClient and FrameLoaderClient
+ https://bugs.webkit.org/show_bug.cgi?id=38397
+
+ No tests (functionality is exposed only through native WebKit API.)
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ (WebFrameLoaderClient::dispatchWillSendSubmitEvent):
+
+2010-04-30 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/7477071> REGRESSION: Bad flicker when wheel-scrolling Google Maps, iPad gallery and other sites
+
+ Sites that frequently toggle content in and out of compositing layers (like http://www.tumblr.com/boothed)
+ can cause flickering because of unsychronized compositing layer and view-based updates. There were two
+ underlying issues:
+
+ 1. On SnowLeopard, AppKit can throttle window updates, thus breaking an assumption that
+ NSView drawing will happen on the runloop cycle after a repaint. This provided a window
+ for the layerSyncRunLoopObserver to fire and commit layer changes too early.
+
+ Fix this by having the layerSyncRunLoopObserver in WebView check to see if a display is pending,
+ and not commit layer changes in that case. We'll commit layer changes later when we
+ finally draw.
+
+ 2. The change in r49269 was wrong; it was attempting to fix an issue that was actually caused
+ by -drawRects: coming in for page snapshots. The correct approach is to avoid hitting the
+ synchronization and update disabling code in WebHTMLView for draws that are not to the screen.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView drawRect:]):
+ * WebView/WebView.mm:
+ (layerSyncRunLoopObserverCallBack):
+ (-[WebView _scheduleCompositingLayerSync]):
+
+2010-04-30 Anders Carlsson <andersca@apple.com>
+
+ Part of the previous part (forgot to save).
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView stopTimers]):
+ (-[WebNetscapePluginView startTimers]):
+ (-[WebNetscapePluginView checkIfAllowedToLoadURL:frame:callbackFunc:context:]):
+ (-[WebNetscapePluginView _containerCheckResult:contextInfo:]):
+ (-[WebNetscapePluginView cancelCheckIfAllowedToLoadURL:]):
+ (-[WebNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]):
+ (-[WebNetscapePluginView unscheduleTimer:]):
+ (-[WebNetscapePluginView getVariable:forURL:value:length:]):
+ (-[WebNetscapePluginView setVariable:forURL:value:length:]):
+
+2010-04-30 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Use C99 integer types in more places.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (getNPRect):
+
+2010-04-30 Anders Carlsson <andersca@apple.com>
+
+ Fix Tiger build.
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (WebNetscapePluginStream::startStream):
+
+2010-04-30 Anders Carlsson <andersca@apple.com>
+
+ Another 32-bit build fix.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
+
+2010-04-30 Anders Carlsson <andersca@apple.com>
+
+ Fix 32-bit build (again).
+
+ * Plugins/WebNetscapeContainerCheckContextInfo.h:
+ * Plugins/WebNetscapeContainerCheckContextInfo.mm:
+ (-[WebNetscapeContainerCheckContextInfo initWithCheckRequestID:callbackFunc:context:]):
+ (-[WebNetscapeContainerCheckContextInfo checkRequestID]):
+ (-[WebNetscapeContainerCheckContextInfo callback]):
+ * Plugins/WebNetscapePluginPackage.h:
+
+2010-04-30 Anders Carlsson <andersca@apple.com>
+
+ Fix 32-bit build.
+
+ * Plugins/WebNetscapeContainerCheckContextInfo.h:
+ * Plugins/WebNetscapeContainerCheckContextInfo.mm:
+ (-[WebNetscapeContainerCheckContextInfo initWithCheckRequestID:callbackFunc:context:]):
+ * Plugins/WebNetscapeContainerCheckPrivate.h:
+ * Plugins/WebNetscapePluginPackage.mm:
+ (functionPointerForTVector):
+ * Plugins/WebNetscapePluginView.mm:
+ (PluginTimer::PluginTimer):
+ (-[WebNetscapePluginView checkIfAllowedToLoadURL:frame:callbackFunc:context:]):
+ (-[WebNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]):
+
+2010-04-30 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Next step towards fixing
+
+ https://bugs.webkit.org/show_bug.cgi?id=20784
+ move npapi.h to C99 integer types
+
+ Use the C99 types everywhere. The "old" types are still around but will be removed
+ in a subsequent commit.
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (WebNetscapePluginStream::deliverData):
+ * Plugins/WebNetscapePluginView.h:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
+ (-[WebNetscapePluginView getAuthenticationInfoWithProtocol:host:port:scheme:realm:username:usernameLength:password:passwordLength:]):
+ * Plugins/npapi.mm:
+ (NPN_MemAlloc):
+ (NPN_MemFlush):
+ (NPN_PostURLNotify):
+ (NPN_PostURL):
+ (NPN_Write):
+ (NPN_ScheduleTimer):
+ (NPN_UnscheduleTimer):
+ (NPN_GetValueForURL):
+ (NPN_SetValueForURL):
+ (NPN_GetAuthenticationInfo):
+ (WKN_CheckIfAllowedToLoadURL):
+ (WKN_CancelCheckIfAllowedToLoadURL):
+
+2010-04-29 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ First part of
+ https://bugs.webkit.org/show_bug.cgi?id=20784
+ move npapi.h to C99 integer types.
+
+ * MigrateHeaders.make:
+
+2010-04-28 Mike Thole <mthole@apple.com>
+
+ Reviewed by David Kilzer.
+
+ Add canAuthenticateAgainstProtectionSpace() to frame loader so that a protection space
+ can be inspected before attempting to authenticate against it
+ https://bugs.webkit.org/show_bug.cgi?id=38271
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::canAuthenticateAgainstProtectionSpace):
+ Added. If the resource load delegate implements the callback, use its answer. If it does
+ not, then only send authentication challenges for pre-10.6 protection spaces, which matches
+ CFNetwork's default behavior.
+ * WebView/WebDelegateImplementationCaching.h:
+ * WebView/WebDelegateImplementationCaching.mm:
+ (CallResourceLoadDelegateReturningBoolean): Added case for passing three objects.
+ * WebView/WebResourceLoadDelegatePrivate.h:
+ Added private SPI definition: webView:resource:canAuthenticateAgainstProtectionSpace:forDataSource:
+ * WebView/WebView.mm:
+ (-[WebView _cacheResourceLoadDelegateImplementations]):
+
+2010-04-28 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/7918719> ASSERT(isMainThread()) from Font::setShouldUseSmoothing()
+
+ Ensure that the WebView +initialize method initializes threading, so that things are correctly
+ initialized when the first call into the WebKit framework is via a WebView class method.
+
+ * WebView/WebView.mm:
+ (+[WebView initialize]):
+
+2010-04-28 Darin Adler <darin@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ REGRESSION: Autoscroll does not work in Mail messages
+ https://bugs.webkit.org/show_bug.cgi?id=38267
+ rdar://problem/7559799
+
+ The machinery to make autoscrolling work on Mac OS X when a WebView is embedded in another
+ view had gotten broken in multiple ways. For some reason, a combination of bugs made it
+ partly work until around r48064. This brings it back.
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::scrollRectIntoView): When converting coordinates, use the document view
+ rather than the WebView itself. This logic may not be correct for the case where
+ usesDocumentViews is NO, but that is currently an experimental mode and can be fixed later.
+
+2010-04-27 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Darin Adler and Eric Seidel.
+
+ Add layoutTestController.setPrinting()
+ https://bugs.webkit.org/show_bug.cgi?id=37203
+
+ * Misc/WebCoreStatistics.h:
+ * Misc/WebCoreStatistics.mm:
+ (-[WebFrame renderTreeAsExternalRepresentationForPrinting:]):
+
+2010-04-25 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=38097
+ Disentangle initializing the main thread from initializing threading
+
+ Calls initializeMainThreadToProcessMainThread since there is no way to ensure
+ that the initialize method will be called on the main thread.
+
+ * Carbon/CarbonWindowAdapter.mm:
+ (+[CarbonWindowAdapter initialize]): Add call to initializeMainThreadToProcessMainThread.
+ * History/WebBackForwardList.mm:
+ (+[WebBackForwardList initialize]): Ditto.
+ * History/WebHistoryItem.mm:
+ (+[WebHistoryItem initialize]): Ditto.
+ * Misc/WebElementDictionary.mm:
+ (+[WebElementDictionary initialize]): Ditto.
+ * Misc/WebIconDatabase.mm:
+ (+[WebIconDatabase initialize]): Ditto.
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (+[WebHostedNetscapePluginView initialize]): Ditto.
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (+[WebBaseNetscapePluginView initialize]): Ditto.
+ * Plugins/WebBasePluginPackage.mm:
+ (+[WebBasePluginPackage initialize]): Ditto.
+ * Plugins/WebNetscapePluginView.mm:
+ (+[WebNetscapePluginView initialize]): Ditto.
+ * WebCoreSupport/WebEditorClient.mm:
+ (+[WebEditCommand initialize]): Ditto.
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (+[WebFramePolicyListener initialize]): Ditto.
+ * WebView/WebArchive.mm:
+ (+[WebArchivePrivate initialize]): Ditto.
+ * WebView/WebDataSource.mm:
+ (+[WebDataSourcePrivate initialize]): Ditto.
+ * WebView/WebHTMLView.mm:
+ (+[WebHTMLViewPrivate initialize]): Ditto.
+ (+[WebHTMLView initialize]): Ditto.
+ * WebView/WebResource.mm:
+ (+[WebResourcePrivate initialize]): Ditto.
+ * WebView/WebTextIterator.mm:
+ (+[WebTextIteratorPrivate initialize]): Ditto.
+ * WebView/WebView.mm:
+ * WebView/WebViewData.mm: Ditto.
+ (+[WebViewPrivate initialize]): Ditto.
+
+2010-04-24 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7903728> REGRESSION (r51617): WebView fails to load plug-in MIME types
+ https://bugs.webkit.org/show_bug.cgi?id=38085
+
+ WebView was calling -_webView in a few places where it should have just used itself. It never
+ makes sense for WebView to call -_webView on itself, and these calls look like they were copied
+ from similar code in WebHTMLView, WebFrameView and WebDataSource, where -_webView has a different,
+ useful meaning.
+
+ * WebView/WebView.mm:
+ (-[WebView drawSingleRect:]): Replaced [self _webView] with self.
+ (-[WebView _viewClass:andRepresentationClass:forMIMEType:]): Replaced [[self _webView] preferences]
+ with _private->preferences.
+ (-[WebView _canShowMIMEType:]): Ditto.
+
+2010-04-23 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ <rdar://problem/7894489> When printing Flash, send a drawRect event, rather than NPPrint
+
+ When printing Flash plug-ins in 32-bit, send a drawRect event with a CGContextRef, rather than calling
+ NPPrint with a GWorldPtr, since Flash prefers the CGContext path.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView drawRect:]):
+
+2010-04-22 David Kilzer <ddkilzer@apple.com>
+
+ <http://webkit.org/b/38029> +[WebTextIteratorPrivate initialize] is missing call to JSC::initializeThreading()
+
+ Reviewed by Timothy Hatcher.
+
+ Every other Objective-C class that calls
+ WebCoreObjCFinalizeOnMainThread(self) in +initialize also calls
+ JSC::initializeThreading(). The WebTextIteratorPrivate class
+ was the only one missing this call.
+
+ * WebView/WebTextIterator.mm:
+ (+[WebTextIteratorPrivate initialize]): Added call to
+ JSC::initializeThreading().
+
+2010-04-22 Alexey Proskuryakov <ap@apple.com>
+
+ Rubber-stamped by Mark Rowe.
+
+ <rdar://problem/7805969> REGRESSION: iTunes unable to play trailers
+
+ Undo the changes made for https://bugs.webkit.org/show_bug.cgi?id=35215 (<rdar://problem/7673157>)
+ for now. Clients rely on the old behavior, so a fix that changes it will need to account for
+ those.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::createPlugin): Pass pluginURL
+ instead of baseURL again.
+
+2010-04-22 Dave Moore <davemoore@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Added notification when the favicons for a page are changed
+ from a script.
+ The Document object will notify the frame loader, which will
+ notify the client. Implementations of FrameLoaderClient will
+ have to add one method; dispatchDidChangeIcons().
+
+ https://bugs.webkit.org/show_bug.cgi?id=33812
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::dispatchDidChangeIcons):
+
+2010-04-22 Adam Barth <abarth@webkit.org>
+
+ Unreviewed, rolling out r58069.
+ http://trac.webkit.org/changeset/58069
+ https://bugs.webkit.org/show_bug.cgi?id=27751
+
+ Broke compile on Windows.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-04-22 Abhishek Arya <inferno@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Add support for controlling clipboard access from javascript.
+ Clipboard access from javascript is disabled by default.
+ https://bugs.webkit.org/show_bug.cgi?id=27751
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences javaScriptCanAccessClipboard]):
+ (-[WebPreferences setJavaScriptCanAccessClipboard:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-04-21 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Shinichiro Hamaji.
+
+ https://bugs.webkit.org/show_bug.cgi?id=37964
+ Fix a typo in comments - Korean encoding name is windows-949, not windows-939
+
+ * WebView/WebPreferences.mm: (+[WebPreferences _setInitialDefaultTextEncodingToSystemEncoding]):
+
+2010-04-21 Mark Rowe <mrowe@apple.com>
+
+ Tiger build fix.
+
+ * Plugins/WebPluginController.mm: Add an #import that is necessary on Tiger.
+
+2010-04-21 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Eric Carlson.
+
+ <rdar://problem/7313430> Many crashes in Safari inside Flip4Mac below -[NSAlert didEndAlert:returnCode:contextInfo:]
+
+ Existing versions of the Flip4Mac WebKit plug-in have an object lifetime bug related to an NSAlert that is
+ used to notify the user about updates to the plug-in. This bug can result in Safari crashing if the page
+ containing the plug-in navigates while the alert is displayed (<rdar://problem/7313430>).
+
+ The gist of the bug is thus: Flip4Mac sets an instance of the TSUpdateCheck class as the modal delegate of the
+ NSAlert instance. This TSUpdateCheck instance itself has a delegate. The delegate is set to the WmvPlugin
+ instance which is the NSView subclass that is exposed to WebKit as the plug-in view. Since this relationship
+ is that of delegates the TSUpdateCheck does not retain the WmvPlugin. This leads to a bug if the WmvPlugin
+ instance is destroyed before the TSUpdateCheck instance as the TSUpdateCheck instance will be left with a
+ pointer to a stale object. This will happen if a page containing the Flip4Mac plug-in triggers a navigation
+ while the update sheet is visible as the WmvPlugin instance is removed from the view hierarchy and there are
+ no other references to keep the object alive.
+
+ We work around this bug by patching the following two messages:
+
+ 1) -[NSAlert beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:]
+ 2) -[TSUpdateCheck alertDidEnd:returnCode:contextInfo:]
+
+ Our override of 1) detects whether it is Flip4Mac's update sheet triggering the alert by checking whether the
+ modal delegate is an instance of TSUpdateCheck. If it is, it retains the modal delegate's delegate.
+
+ Our override of 2) then autoreleases the delegate, balancing the retain we added in 1).
+
+ These two overrides have the effect of ensuring that the WmvPlugin instance will always outlive the TSUpdateCheck
+ instance, preventing the TSUpdateCheck instance from accessing a stale delegate pointer and crashing the application.
+
+ * Plugins/WebPluginController.mm:
+ (-[WebPluginController addPlugin:]): Check whether the plug-in being instantiated is the Flip4Mac plug-in and
+ install our workaround if it is.
+ (isKindOfClass): Helper function that checks whether the given object is an instance of the named class.
+ (WebKit_TSUpdateCheck_alertDidEnd_returnCode_contextInfo_): Autorelease the delegate.
+ (WebKit_NSAlert_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_): Retain the modal delegate's
+ delegate if this NSAlert belongs to the Flip4Mac plug-in.
+ (installFlip4MacPlugInWorkaroundIfNecessary): Swizzle the necessary methods. We swizzle the TSUpdateCheck methods
+ first since it is possible that in some versions of Flip4Mac the TSUpdateCheck class may not exist or may not have
+ the method we're interested in. In that case we want to bail out before patching any methods.
+
+2010-04-20 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ <rdar://problem/7856151> REGRESSION: NPP_Destroy is not called when page navigates when plug-in is displaying modal dialog
+
+ An interaction between the plug-in host and WebKit was resulting in WKPCSetModal being called while
+ NetscapePluginInstanceProxy was waiting on a reply to the GetScriptableNPObject message. This resulted
+ in calls to stop the plug-in being deferred due to the presence of plug-in code up the stack. This
+ could lead to crashes as it was possible for the plug-in view to be deallocated during the modal runloop.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCInvalidateRect):
+ (WKPCSetModal): Defer the handling of setModal until the next runloop iteration if the host proxy
+ is already processing requests. This ensures that there will be no plug-in code on the stack when
+ the modal runloop is entered, which allows the plug-in to be stopped when the page is navigated while
+ a modal dialog is displayed.
+
+2010-04-20 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Factor DocumentWriter out of FrameLoader
+ https://bugs.webkit.org/show_bug.cgi?id=37175
+
+ Update these callsites because the method moved to DocumentWriter.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _canProvideDocumentSource]):
+ (-[WebFrame _receivedData:textEncodingName:]):
+
+2010-04-20 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Change a parameter type of chooseIconForFiles()
+ https://bugs.webkit.org/show_bug.cgi?id=37504
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::chooseIconForFiles):
+
+2010-04-20 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r57892.
+ http://trac.webkit.org/changeset/57892
+ https://bugs.webkit.org/show_bug.cgi?id=37864
+
+ Caused an assertion in Mac builds (Requested by smfr on
+ #webkit).
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _getVisibleRect:]):
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView _install]):
+
+2010-04-20 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Clean up RenderPart/RenderPartObject/RenderFrame/RenderEmbeddedObject
+ https://bugs.webkit.org/show_bug.cgi?id=37741
+
+ Make Frame::ownerRenderer() return a RenderFrameBase* rather than a
+ RenderPart*, and add the necessary toRenderFrameBase() and isRenderFrameBase().
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _getVisibleRect:]):
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView _install]):
+
+2010-04-19 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Finish exposing extremal shrink factors WebHTMLView uses when shrinking pages to fit in the
+ printing width as SPI.
+
+ * WebKit.exp: Export _WebHTMLViewPrintingMinimumShrinkFactor and _WebHTMLViewPrintingMaximumShrinkFactor.
+
+2010-04-15 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Sam Weinig & Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=37675
+ Remove casts/constructors to/from JSC::UString type from WebCore::String
+
+ WebCore's strings should not know about JSC::UString, this should be abstracted
+ away in the bindings. Add explicit conversion methods rather than relying on
+ overloaded cast operators / constructors being implicitly called.
+
+ This patch only changes the class String, once this has landed StringImpl, and
+ hopefully AtomicString too, should follow suit.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (identifierFromIdentifierRep):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::addValueToArray):
+ (WebKit::NetscapePluginInstanceProxy::moveGlobalExceptionToExecState):
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyInstance::getPropertyNames):
+ * WebView/WebFrame.mm:
+ (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
+ (-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]):
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame evaluateWebScript:]):
+ * WebView/WebScriptDebugger.mm:
+ (toNSURL):
+ * WebView/WebView.mm:
+ (aeDescFromJSValue):
+
+2010-04-16 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Expose the extremal shrink factors WebHTMLView uses when shrinking pages to fit in the
+ printing width as SPI.
+
+ * WebView/WebHTMLView.mm:
+ Replaced two macros with constants.
+ (-[WebHTMLView _beginPrintModeWithPageWidth:shrinkToFit:]): Changed to use the constants.
+ (-[WebHTMLView _scaleFactorForPrintOperation:]): Ditto.
+ * WebView/WebHTMLViewPrivate.h: Declared _WebHTMLViewPrintingMinimumShrinkFactor and
+ _WebHTMLViewPrintingMaximumShrinkFactor.
+
+2010-04-15 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/7870651> WebDynamicScrollBarsView.h generates compile errors when included in plain Objective-C files.
+
+ * WebView/WebDynamicScrollBarsView.h:
+
+2010-04-15 Adam Roben <aroben@apple.com>
+
+ Export WebUserContentURLPattern from WebKit
+
+ Rubber-stamped by Mark Rowe.
+
+ * WebKit.exp:
+
+2010-04-15 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Made consecutive calls to -[WebHTMLView _beginPrintModeWithPageWidth:shrinkToFit:] work
+ without intermediate calls -[WebHTMLView _endPrintMode].
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _setPrinting:minimumPageWidth:maximumPageWidth:adjustViewSize:]):
+
+2010-04-15 Adam Roben <aroben@apple.com>
+
+ Expose UserContentURLPattern as WebKit SPI
+
+ Fixes <http://webkit.org/b/37354>.
+
+ Reviewed by Tim Hatcher.
+
+ * Misc/WebUserContentURLPattern.h: Added.
+
+ * Misc/WebUserContentURLPattern.mm: Added.
+ (-[WebUserContentURLPattern initWithPatternString:]): Initialize
+ _private and then parse the passed-in string into a
+ UserContentURLPattern.
+ (-[WebUserContentURLPattern dealloc]): Release _private.
+
+ (-[WebUserContentURLPattern isValid]):
+ (-[WebUserContentURLPattern scheme]):
+ (-[WebUserContentURLPattern host]):
+ (-[WebUserContentURLPattern matchesSubdomains]):
+ Call through to UserContentURLPattern.
+
+2010-04-13 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Separated a DOMWrapperWorld's behavior of keeping wrappers alive from
+ its own lifetime, so a DOMWrapperWorld's controller can throw away
+ its wrappers even before its refcount reaches 0.
+
+ * WebView/WebScriptWorld.h:
+ * WebView/WebScriptWorld.mm:
+ (-[WebScriptWorld unregisterWorld]): Exported this function through WebKit.
+
+2010-04-12 Timothy Hatcher <timothy@apple.com>
+
+ SecurityOrigin needs a way to remove individual OriginAccessEntries
+ https://bugs.webkit.org/show_bug.cgi?id=37449
+
+ Reviewed by Dave Hyatt.
+
+ * WebView/WebView.mm:
+ (+[WebView _removeOriginAccessWhitelistEntryWithSourceOrigin:destinationProtocol:destinationHost:allowDestinationSubdomains:]):
+ Call SecurityOrigin::removeOriginAccessWhitelistEntry.
+ * WebView/WebViewPrivate.h: Added _removeOriginAccessWhitelistEntryWithSourceOrigin.
+
+2010-04-13 Timothy Hatcher <timothy@apple.com>
+
+ Rename SecurityOrigin::whiteListAccessFromOrigin to addOriginAccessWhitelistEntry.
+ And SecurityOrigin::resetOriginAccessWhiteLists to resetOriginAccessWhitelists.
+
+ SecurityOrigin needs a way to remove individual OriginAccessEntries
+ https://bugs.webkit.org/show_bug.cgi?id=37449
+
+ Reviewed by Dave Hyatt.
+
+ * WebView/WebView.mm:
+ (+[WebView _addOriginAccessWhitelistEntryWithSourceOrigin:destinationProtocol:destinationHost:allowDestinationSubdomains:]):
+ (+[WebView _resetOriginAccessWhitelists]):
+ * WebView/WebViewPrivate.h:
+
+2010-04-11 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r57468.
+ http://trac.webkit.org/changeset/57468
+ https://bugs.webkit.org/show_bug.cgi?id=37433
+
+ Broke the world... Must have applied the patch wrong
+ (Requested by abarth on #webkit).
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _canProvideDocumentSource]):
+ (-[WebFrame _receivedData:textEncodingName:]):
+
+2010-04-11 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Factor DocumentWriter out of FrameLoader
+ https://bugs.webkit.org/show_bug.cgi?id=37175
+
+ Update these callsites because the method moved to DocumentWriter.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _canProvideDocumentSource]):
+ (-[WebFrame _receivedData:textEncodingName:]):
+
+2010-04-10 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/7845305> Further adoption of formal protocols for delegates.
+
+ Move EmptyProtocolDefinitions.h down in to WebCore, and add the new protocols. Adopt the protocols in the appropriate places.
+
+ * Misc/EmptyProtocolDefinitions.h: Removed.
+ * Misc/WebDownload.mm:
+ * WebKitPrefix.h:
+
+2010-04-09 Jer Noble <jer.noble@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Work around QTMovieView bug (<rdar://problem/7712713>) by using a QTMovieLayer instead.
+ https://bugs.webkit.org/show_bug.cgi?id=37311 / <rdar://problem/7749993>
+
+ * WebView/WebVideoFullscreenController.mm:
+ (-[WebVideoFullscreenController windowDidLoad]):
+ (-[WebVideoFullscreenController setMediaElement:WebCore::]):
+
+2010-04-09 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24572
+ XMLHttpRequest.statusText returns always "OK" on Mac
+
+ * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface):
+
+2010-04-09 Eric Seidel <eric@webkit.org>
+
+ Unreviewed, rolling out r57343.
+ http://trac.webkit.org/changeset/57343
+ https://bugs.webkit.org/show_bug.cgi?id=37311
+
+ Broke Tiger compile.
+
+ * WebView/WebVideoFullscreenController.mm:
+ (-[WebVideoFullscreenController windowDidLoad]):
+ (-[WebVideoFullscreenController setMediaElement:WebCore::]):
+
+2010-04-09 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7846015> REGRESSION (r57332) - Crash in [WebDynamicScrollBarsView(WebInternal) reflectScrolledClipView:] when opening the Downloads window
+
+ * WebView/WebDynamicScrollBarsView.mm:
+ (-[WebDynamicScrollBarsView initWithCoder:]): Added. Calls super and then initializes _private.
+
+2010-04-09 Jer Noble <jer.noble@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Work around QTMovieView bug (<rdar://problem/7712713>) by using a QTMovieLayer instead.
+ https://bugs.webkit.org/show_bug.cgi?id=37311 / <rdar://problem/7749993>
+
+ * WebView/WebVideoFullscreenController.mm:
+ (-[WebVideoFullscreenController windowDidLoad]):
+ (-[WebVideoFullscreenController setMediaElement:WebCore::]):
+
+2010-04-08 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by John Sullivan.
+
+ <rdar://problem/7814899> REGRESSION(r56008): iTunes crashes on quit inside -[NSScrollView dealloc]
+
+ In r56008 new instance variables were added to WebDynamicScrollBarsView, increasing its size.
+ This causes problems for 32-bit applications that derive from WebDynamicScrollBarsView, as the
+ size and layout of their subclasses is baked in at compile time. This results in instances
+ being allocated that are smaller than the new code expects, and may result in the new instance
+ variables sharing the same memory space as any instance variables that the subclass defines.
+
+ We can avoid this problem by having the class contain only a single member that acts as a pointer
+ to a heap-allocated structure that acts as storage for the real instance variables. This makes
+ us free to add instance variables in the future without risk of changing the size of the class.
+ To ensure that 32-bit applications that are built against this new WebDynamicScrollBarsView header
+ are able to run against older versions of WebKit we pad the class out to its previous size. This
+ results in any subclasses of WebDynamicScrollBarsView being created with a layout that is compatible
+ with both versions of the code.
+
+ This change could potentially break a subclass of WebDynamicScrollBarsView that directly accesses
+ instance variables of its superclass. However, this is a private header and no known subclasses
+ of WebDynamicScrollBarsView access superclass instance variables in this fashion.
+
+ * WebView/WebDynamicScrollBarsView.h:
+ * WebView/WebDynamicScrollBarsView.mm:
+ (-[WebDynamicScrollBarsView initWithFrame:]):
+ (-[WebDynamicScrollBarsView dealloc]):
+ (-[WebDynamicScrollBarsView finalize]):
+ (-[WebDynamicScrollBarsView setAllowsHorizontalScrolling:]):
+ (-[WebDynamicScrollBarsView setAllowsScrollersToOverlapContent:]):
+ (-[WebDynamicScrollBarsView setAlwaysHideHorizontalScroller:]):
+ (-[WebDynamicScrollBarsView setAlwaysHideVerticalScroller:]):
+ (-[WebDynamicScrollBarsView horizontalScrollingAllowed]):
+ (-[WebDynamicScrollBarsView verticalScrollingAllowed]):
+ (-[WebDynamicScrollBarsView contentViewFrame]):
+ (-[WebDynamicScrollBarsView tile]):
+ (-[WebDynamicScrollBarsView setSuppressLayout:]):
+ (-[WebDynamicScrollBarsView setScrollBarsSuppressed:repaintOnUnsuppress:]):
+ (-[WebDynamicScrollBarsView updateScrollers]):
+ (-[WebDynamicScrollBarsView reflectScrolledClipView:]):
+ (-[WebDynamicScrollBarsView allowsHorizontalScrolling]):
+ (-[WebDynamicScrollBarsView allowsVerticalScrolling]):
+ (-[WebDynamicScrollBarsView scrollingModes:WebCore::vertical:WebCore::]):
+ (-[WebDynamicScrollBarsView horizontalScrollingMode]):
+ (-[WebDynamicScrollBarsView verticalScrollingMode]):
+ (-[WebDynamicScrollBarsView setScrollingModes:vertical:andLock:]):
+ (-[WebDynamicScrollBarsView setHorizontalScrollingModeLocked:]):
+ (-[WebDynamicScrollBarsView setVerticalScrollingModeLocked:]):
+ (-[WebDynamicScrollBarsView setScrollingModesLocked:]):
+ (-[WebDynamicScrollBarsView horizontalScrollingModeLocked]):
+ (-[WebDynamicScrollBarsView verticalScrollingModeLocked]):
+ (-[WebDynamicScrollBarsView scrollWheel:]):
+
+2010-04-07 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24300, don't expose history info via CSS
+
+ Add SPI so that layout tests can access computed style including :visited information.
+
+ * WebView/WebRenderNode.mm:
+ (copyRenderNode):
+ * WebView/WebView.mm:
+ (-[WebView _computedStyleIncludingVisitedInfo:forElement:]):
+ * WebView/WebViewInternal.h:
+ * WebView/WebViewPrivate.h:
+
+2010-04-07 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Refactor WebHTMLView printing code and add private methods to enter and exit printing mode.
+ https://bugs.webkit.org/show_bug.cgi?id=37246
+
+ * Misc/WebNSPrintOperationExtras.h: Declared -_web_availablePaperWidth and -_web_availablePaperHeight.
+ * Misc/WebNSPrintOperationExtras.m:
+ (-[NSPrintOperation _web_availablePaperWidth]): Turned -[WebHTMLView _availablePaperWidthForPrintOperation:]
+ into this method.
+ (-[NSPrintOperation _web_availablePaperHeight]): Turned -[WebHTMLView _calculatePrintHeight] into this
+ method.
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _isInPrintMode]): Added this accessor.
+ (-[WebHTMLView _beginPrintModeWithPageWidth:shrinkToFit:]): Added. Moved the code from -knowsPageRange: that
+ computes the layout widths and enters printing mode into this private method.
+ (-[WebHTMLView _endPrintMode]): New private method (the old -_endPrintMode has been renamed).
+ (-[WebHTMLView _scaleFactorForPrintOperation:]): Use -[NSPrintOperation _web_availablePaperWidth].
+ (-[WebHTMLView _endPrintModeAndRestoreWindowAutodisplay]): Renamed -_endPrintMode to this, changed it to call
+ _endPrintMode.
+ (-[WebHTMLView _delayedEndPrintMode:]): Updated for rename.
+ (-[WebHTMLView knowsPageRange:]): Use -_beginPrintModeWithPageWidth:shrintToFit:,
+ -[NSPrintOperation _web_availablePaperWidth], and -[NSPrintOperation _web_availablePaperHeight]. Updated for
+ rename.
+ (-[WebHTMLView beginDocument]): Updated for rename.
+ (-[WebHTMLView endDocument]): Ditto.
+ * WebView/WebHTMLViewPrivate.h: Declared new private methods -_isInPrintMode,
+ -_beginPrintModeWithPageWidth:shrinkToFit: and -_endPrintMode.
+
+2010-04-07 Andrey Kosyakov <caseq@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Removed redundant FrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest()
+ https://bugs.webkit.org/show_bug.cgi?id=36949
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+
+2010-04-06 Dan Bernstein <mitz@apple.com>
+
+ Tiger build fix after r57184.
+
+ * WebView/WebHTMLViewPrivate.h:
+
+2010-04-06 Dan Bernstein <mitz@apple.com>
+
+ Tiger build fix after r57184.
+
+ * WebView/WebHTMLViewPrivate.h:
+
+2010-04-06 Adam Barth <abarth@webkit.org>
+
+ Unreviewed.
+
+ Speculative build fix for Tiger.
+
+ * WebView/WebHTMLViewPrivate.h:
+
+2010-04-06 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig and Anders Carlsson.
+
+ Expose WebHTMLView’s page breaking logic as SPI.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _adjustedBottomOfPageWithTop:bottom:limit:]): Factored out of -adjustPageHeightNew:top:bottom:limit:
+ (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Call -_adjustedBottomOfPageWithTop:bottom:limit:
+ * WebView/WebHTMLViewPrivate.h: Declared -_adjustedBottomOfPageWithTop:bottom:limit:
+
+2010-04-06 Mark Rowe <mrowe@apple.com>
+
+ Add an #if in order to make Tiger happy.
+
+ * WebView/WebViewData.mm:
+ (-[WebViewPrivate init]):
+
+2010-04-06 Mark Rowe <mrowe@apple.com>
+
+ Build fix.
+
+ * WebView/WebViewData.mm:
+ (-[WebViewPrivate init]): Use objc_collectingEnabled like we do elsewhere in WebKit.
+
+2010-04-05 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Test case for <http://webkit.org/b/37115> / <rdar://problem/7829331>.
+ REGRESSION(r56989): Crash in Mail in WebCore::Position::isCandidate when deleting block using block deletion UI
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _updateFontPanel]): Ask the window whether it is the key window rather than doing the comparison
+ manually. This allows DumpRenderTree's override of isKeyWindow to force this code path to be taken during tests.
+
+2010-04-05 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=37111
+ <rdar://problem/7790327> Draw replacement text when plug-in host crashes
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.h: Removed _pluginDied - it was only used
+ for drawing replacement icon, and this information is now in WebCore.
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView pluginHostDied]): Tell RenderEmbeddedObject that the plug-in
+ has crashed.
+ (-[WebHostedNetscapePluginView drawRect:]): Removed the case for crashed plug-in host. It is
+ handled by WebCore now.
+
+ * WebCoreSupport/WebViewFactory.mm: (-[WebViewFactory crashedPluginText]): Added a string
+ for plug-in failure.
+
+2010-04-03 yael aharon <yael.aharon@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Enable HTMLProgressElement for Safari on OSX
+ https://bugs.webkit.org/show_bug.cgi?id=36961
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-04-02 Jer Noble <jer.noble@apple.com>
+
+ Reviewed by Eric Carlson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=36624
+ Add an INIT macro for the WebKitSystemInterface function wkQTMovieSelectPreferredAlternates.
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface):
+
+2010-04-02 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=37043
+ Java regression tests spam stderr about being unable to set status message
+
+ With this change, there is still spam about "Attempt to access JavaScript from destroyed
+ applet, type 9." I haven't investigated if that indicates a problem or not.
+
+ * Plugins/WebPluginController.mm: (-[WebPluginController webPlugInContainerShowStatus:]):
+ Removed check for _documentView. We don't seem to care.
+
+2010-04-01 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by Dmitry Titov.
+
+ Add FileThread for async file operation support in FileReader and FileWriter
+ https://bugs.webkit.org/show_bug.cgi?id=36896
+
+ Add FILE_READER or FILE_WRITER feature defines.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-04-01 Ada Chan <adachan@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Change WebDatabaseManager::deleteOrigin() to return true if there are no errors in deleting the origin.
+ Ditto for WebDatabaseManager::deleteDatabase().
+
+ https://bugs.webkit.org/show_bug.cgi?id=36988
+
+ * Storage/WebDatabaseManager.mm:
+ (-[WebDatabaseManager deleteOrigin:]):
+ (-[WebDatabaseManager deleteDatabase:withOrigin:]):
+ * Storage/WebDatabaseManagerPrivate.h:
+
+2010-04-01 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=36976
+ <rdar://problem/7817498>
+ REGRESSION(r54783): Silverlight plug-in causes Safari to crash if JavaScript is disabled
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::get): The HashTable assertions aren't
+ there to catch potential future attempts to store empty/deleted values before these happen -
+ it's actually wrong to try to look up these values. Added an early return.
+ (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::forget): Ditto.
+
+2010-04-01 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Added layerTreeAsText function to DRT (for Mac)
+ https://bugs.webkit.org/show_bug.cgi?id=36782
+
+ This is the WebKit side for Mac. It plumbs the
+ call from WebCore to DRT.
+
+ * WebView/WebFrame.mm:WebKit (Mac) side of plumbing
+ (-[WebFrame _layerTreeAsText]):
+ * WebView/WebFramePrivate.h:
+
+2010-04-01 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=36976
+ <rdar://problem/7817498>
+ REGRESSION(r54783): Silverlight plug-in causes Safari to crash if JavaScript is disabled
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::get): Use find() instead of get(),
+ because the latter fails with an assertion when looking up 0 or -1.
+ (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::forget): Be prepared for unexpected
+ object IDs coming from plug-in host.
+
+2010-03-31 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Bug 36845 - AX: need a way to set the label of a AXWebArea through WebKit
+ https://bugs.webkit.org/show_bug.cgi?id=36845
+
+ Provide a way through WebKit to set an accessible label that describes the web area.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame setAccessibleName:]):
+ * WebView/WebFramePrivate.h:
+
+2010-03-31 Marcus Bulach <bulach@chromium.org>
+
+ Reviewed by Jeremy Orlow.
+
+ Adds Geolocation param for cancelGeolocationPermissionRequestForFrame.
+ https://bugs.webkit.org/show_bug.cgi?id=35031
+
+ * WebCoreSupport/WebChromeClient.h:
+ (WebChromeClient::cancelGeolocationPermissionRequestForFrame):
+
+2010-03-30 Gavin Barraclough <barraclough@apple.com>
+
+ Rubber stamped by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=36866
+ Move CString to WTF
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::getCookies):
+ (WebKit::NetscapePluginInstanceProxy::getProxy):
+ (WebKit::NetscapePluginInstanceProxy::getAuthenticationInfo):
+ (WebKit::NetscapePluginInstanceProxy::resolveURL):
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView resolveURL:forTarget:]):
+
+2010-03-30 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=36848
+ <rdar://problem/7362913>
+ Menu items appropriate only for rich-content editing can appear in plain-text contexts
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView validRequestorForSendType:returnType:]):
+ Don't return self for non-string content if _canEditRichly is false.
+
+2010-03-29 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=36791
+ Add assertions for instance proxy validity
+
+ Add some assertions that the instance proxy hasn't been deleted. We sometimes keep a raw
+ pointer to one across complicated function calls, relying on the caller to protect the
+ reference.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ (WebKit::NetscapePluginInstanceProxy::renderContextID):
+ (WebKit::NetscapePluginInstanceProxy::pluginView):
+ (WebKit::NetscapePluginInstanceProxy::hostProxy):
+
+2010-03-30 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by David Kilzer.
+
+ Explicit guards for ENABLE_GEOLOCATION
+ https://bugs.webkit.org/show_bug.cgi?id=25756
+
+ * WebCoreSupport/WebGeolocationMock.mm:
+ (-[WebGeolocationMock setError:code:]): Make the body conditional on
+ ENABLE(GEOLOCATION)
+ (-[WebGeolocationMock setPosition:]): Ditto.
+
+2010-03-26 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Antti Koivisto.
+
+ Change method name due to it dealing with both flattening
+ of frame sets and inner frames.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences isFrameFlatteningEnabled]):
+ (-[WebPreferences setFrameFlatteningEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-03-27 Darin Adler <darin@apple.com>
+
+ * Misc/WebNSFileManagerExtras.m:
+ (-[NSFileManager _webkit_pathWithUniqueFilenameForPath:]):
+ Removed stray "!". How did that get in there?
+
+2010-03-27 Darin Adler <darin@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ WebKit NSFileManager methods don't handle broken symlinks correctly.
+ Part of <rdar://problem/7574046>.
+
+ * Misc/WebNSFileManagerExtras.h: Removed unused defines and methods.
+ * Misc/WebNSFileManagerExtras.m: Removed unused methods.
+ (fileExists): Added. For use instead of fileExistsAtPath: for cases where we'd like
+ to treat a broken symlink as a file that does indeed exist.
+ (-[NSFileManager _webkit_pathWithUniqueFilenameForPath:]): Use fileExists.
+
+2010-03-25 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm: (WKPCRunSyncOpenPanel): Re-fetch host proxy in
+ a way that works in a function that doesn't have a pluginID argument for some reason.
+
+2010-03-25 Simon Fraser <simon.fraser@apple.com>
+
+ Build fix: no review.
+
+ Another c_str() -> data().
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::enumerate):
+
+2010-03-25 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Correctness fix after r56493.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm: (WKPCRunSyncOpenPanel): We still need to update
+ our hostProxy reference, even though we didn't use to have instanceProxy. Nothing guarantees
+ that the host proxy won't go away while the open panel is up.
+
+2010-03-24 Mark Rowe <mrowe@apple.com>
+
+ Build fix after r56474.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCRunSyncOpenPanel):
+
+2010-03-24 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=36563
+ A plug-in makes Safari crash on http://www.itscodingtime.com/
+
+ * Plugins/Hosted/NetscapePluginHostProxy.h:
+ (WebKit::NetscapePluginHostProxy::port): Assert that the object is still alive. This isn't
+ beautifully systemic, but helped catch a bug, and may help catch more.
+ (WebKit::NetscapePluginHostProxy::clientPort): Ditto.
+ (WebKit::NetscapePluginHostProxy::isProcessingRequests): Changed m_processingRequests to a
+ static. This doesn't change behavior much, but helps avoid writing into deallocated memory.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy): Changed m_processingRequests
+ to a static.
+ (WebKit::NetscapePluginHostProxy::processRequests): Ditto. Changing m_processingRequests
+ after destroying the object in pluginHostDied() was wrong, but reasonably harmless, as there
+ wasn't much time for some other object to be allocated at this address.
+ (WKPCEvaluate): Refetch host proxy, as it may have been destroyed.
+ (WKPCInvoke): Ditto.
+ (WKPCInvokeDefault): Ditto.
+ (WKPCGetProperty): Ditto.
+ (WKPCSetProperty): Ditto.
+ (WKPCRemoveProperty): Ditto.
+ (WKPCHasProperty): Ditto.
+ (WKPCHasMethod): Ditto.
+ (WKPCEnumerate): Ditto.
+ (WKPCRunSyncOpenPanel): Ditto.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply): Bail out of the
+ "event loop" if host proxy went away while processing a request.
+
+2010-03-24 Hayato Ito <hayato@chromium.org>
+
+ Reviewed by Shinichiro Hamaji.
+
+ Refactor computePageRects so that Mac can make use of it.
+ https://bugs.webkit.org/show_bug.cgi?id=36159
+
+ Refactoring only, so no new tests.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _computePageRectsWithPrintWidthScaleFactor:printHeight:]):
+
+2010-03-24 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Make Icon::createIconForFiles() optional.
+ https://bugs.webkit.org/show_bug.cgi?id=35072
+
+ - Rename iconForFiles() to chooseIconForFiles().
+ - Call Icon::createIconForFiles() from chooseIconForFiles().
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::chooseIconForFiles):
+
+2010-03-23 Dan Bernstein <mitz@apple.com>
+
+ Reverted accidental change from r56429.
+
+ * WebCoreSupport/WebContextMenuClient.mm:
+ (WebContextMenuClient::getCustomMenuFromDefaultItems):
+
+2010-03-23 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by John Sullivan.
+
+ WebKit part of
+ <rdar://problem/7197736> Plug-in clip rect does not update when overflow
+ clip changes
+ https://bugs.webkit.org/show_bug.cgi?id=36479.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView visibleRectDidChange]): Added. Calls
+ WKSyncSurfaceToView().
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView _windowClipRect]): Changed to use Widget::windowClipRect().
+ (-[WebBaseNetscapePluginView visibleRectDidChange]): Added. Invokes -renewGState.
+
+2010-03-22 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=36328
+
+ This patch entirely WebNullPluginView.
+
+ * Plugins/WebNetscapePluginView.mm:
+ * Plugins/WebNullPluginView.h: Removed.
+ * Plugins/WebNullPluginView.mm: Removed.
+ * Resources/nullplugin.tiff: Removed.
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createPlugin): Invoke the resource load delegate if the plug-in failed to load.
+
+2010-03-22 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by John Sullivan.
+
+ https://bugs.webkit.org/show_bug.cgi?id=36455
+ Make WebKit more resistant against plug-in crashes
+
+ No tests, because crashing on build bots isn't good, even if it's only helper processes
+ that crash.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ (WebKit::NetscapePluginInstanceProxy::waitForReply): Protect "this", because this function
+ needs it after waiting for reply. Some callers used to do this, but not all, and we really
+ shouldn't depend on callers here.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::wheelEvent): Don't protect the plug-in instance proxy,
+ because this function doesn't use it after waiting for reply.
+ (WebKit::NetscapePluginInstanceProxy::createBindingsInstance): Ditto.
+
+ * Plugins/Hosted/ProxyInstance.mm: (WebKit::ProxyInstance::invoke): Added an m_instanceProxy
+ null check for another code path.
+
+2010-03-22 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by John Sullivan.
+
+ https://bugs.webkit.org/show_bug.cgi?id=36328
+
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory missingPluginText]): Added.
+
+2010-03-18 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=36337
+ Log an error when an OOP plug-in sends an unknown object id
+
+ Making these LOG_ERROR and not ASSERTs, because I don't want early returns to look
+ temporary or redundant.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::evaluate):
+ (WebKit::NetscapePluginInstanceProxy::invoke):
+ (WebKit::NetscapePluginInstanceProxy::invokeDefault):
+ (WebKit::NetscapePluginInstanceProxy::construct):
+ (WebKit::NetscapePluginInstanceProxy::getProperty):
+ (WebKit::NetscapePluginInstanceProxy::setProperty):
+ (WebKit::NetscapePluginInstanceProxy::removeProperty):
+ (WebKit::NetscapePluginInstanceProxy::hasProperty):
+ (WebKit::NetscapePluginInstanceProxy::hasMethod):
+ (WebKit::NetscapePluginInstanceProxy::enumerate):
+
+2010-03-16 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=36184
+ YouTube video resizing doesn't work with OOP plug-ins
+
+ Test: plugins/resize-from-plugin.html
+
+ We were calling _WKPHResizePluginInstance synchronously or asynchronously, depending on
+ whether the size has changed. But sync and async messages are not necessarily delivered in
+ order - plug-in host listens only to the former while waiting for a response to a message it
+ sent (a call to invoke() in this case).
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::resize):
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView updateAndSetWindow]):
+
+2010-03-16 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Introduce InspectorFrontendClient that provides InspectorFrontend with an interface to the embedder. InspectorClient now serves as a delegate for InspectorController and does not contain methods for managing inspector frontend window. That allows to create remote InspectorFrontendHost.
+
+ Introduce InspectorFrontendClient that would provide InspectorFrontend with an interface to the embedder
+ https://bugs.webkit.org/show_bug.cgi?id=35036
+
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorClient::WebInspectorClient):
+ (WebInspectorClient::inspectorDestroyed):
+ (WebInspectorClient::openInspectorFrontend):
+ (WebInspectorClient::highlight):
+ (WebInspectorClient::hideHighlight):
+ (WebInspectorFrontendClient::WebInspectorFrontendClient):
+ (WebInspectorFrontendClient::frontendLoaded):
+ (WebInspectorFrontendClient::localizedStringsURL):
+ (WebInspectorFrontendClient::hiddenPanels):
+ (WebInspectorFrontendClient::bringToFront):
+ (WebInspectorFrontendClient::closeWindow):
+ (WebInspectorFrontendClient::attachWindow):
+ (WebInspectorFrontendClient::detachWindow):
+ (WebInspectorFrontendClient::setAttachedWindowHeight):
+ (WebInspectorFrontendClient::inspectedURLChanged):
+ (WebInspectorFrontendClient::updateWindowTitle):
+ (-[WebInspectorWindowController dealloc]):
+ (-[WebInspectorWindowController windowShouldClose:]):
+ (-[WebInspectorWindowController close]):
+ (-[WebInspectorWindowController showWindow:]):
+ (-[WebInspectorWindowController attach]):
+ (-[WebInspectorWindowController detach]):
+ (-[WebInspectorWindowController attached]):
+ (-[WebInspectorWindowController setFrontendClient:]):
+ (-[WebInspectorWindowController destroyInspectorView]):
+ (-[WebNodeHighlighter initWithInspectedWebView:]):
+ (-[WebNodeHighlighter dealloc]):
+ (-[WebNodeHighlighter highlightNode:]):
+ (-[WebNodeHighlighter hideHighlight]):
+ (-[WebNodeHighlighter didAttachWebNodeHighlight:]):
+ (-[WebNodeHighlighter willDetachWebNodeHighlight:]):
+ * WebInspector/WebInspector.mm:
+ (-[WebInspector attach:]):
+ (-[WebInspector detach:]):
+
+2010-03-15 Andy Estes <aestes@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Updated call to WKGetWheelEventDeltas() to match new method signature.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29601
+ <rdar://problem/7453254>
+
+ * WebView/WebDynamicScrollBarsView.mm:
+ (-[WebDynamicScrollBarsView scrollWheel:]):
+
+2010-03-15 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Adam Roben.
+
+ -[WebFrame setAlwaysHideHorizontal/VerticalScroller:] prevents keyboard scrolling
+ <https://bugs.webkit.org/show_bug.cgi?id=36125>
+
+ * WebView/WebDynamicScrollBarsView.h:
+ Added instance variables horizontalScrollingAllowedButScrollerHidden and
+ verticalScrollingAllowedButScrollerHidden. Renamed instance variables
+ hideHorizontal/VerticalScroller to alwaysHideHorizontal/VerticalScroller for clarity.
+ Declared methods -horizontalScrollingAllowed and -verticalScrollingAllowed.
+ Added comments.
+
+ * WebView/WebDynamicScrollBarsView.mm:
+ (-[WebDynamicScrollBarsView setAlwaysHideHorizontalScroller:]):
+ Updated for instance variable renaming.
+ (-[WebDynamicScrollBarsView setAlwaysHideVerticalScroller:]):
+ Ditto.
+ (-[WebDynamicScrollBarsView horizontalScrollingAllowed]):
+ New method, returns YES if the scroller is showing or the only reason that the scroller
+ is not showing is that setAlwaysHideHorizontalScrolling has been called.
+ (-[WebDynamicScrollBarsView verticalScrollingAllowed]):
+ New method, returns YES if the scroller is showing or the only reason that the scroller
+ is not showing is that setAlwaysHideVerticalScrolling has been called.
+ (-[WebDynamicScrollBarsView updateScrollers]):
+ Updated for instance variable renamings. Now updates horizontalScrollingAllowedButScrollerHidden
+ and verticalScrollingAllowedButScrollerHidden. Now takes the always-hidden state into account
+ in the early-return code path, to avoid taking it into account twice in the regular code path.
+
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView _scrollToBeginningOfDocument]):
+ Use _isScrollable instead of _hasScrollBars.
+ (-[WebFrameView _scrollToEndOfDocument]):
+ Ditto.
+ (-[WebFrameView scrollToBeginningOfDocument:]):
+ Use _largestScrollableChild instead of _largestChildWithScrollBars.
+ (-[WebFrameView scrollToEndOfDocument:]):
+ Ditto.
+ (-[WebFrameView _pageVertically:]):
+ Use _isScrollable and _largestScrollableChild instead of _hasScrollBars
+ and _largestChildWithScrollBars.
+ (-[WebFrameView _pageHorizontally:]):
+ Ditto.
+ (-[WebFrameView _scrollLineVertically:]):
+ Ditto.
+ (-[WebFrameView _scrollLineHorizontally:]):
+ Ditto.
+ (-[WebFrameView keyDown:]):
+ Use _largestScrollableChild instead of _largestChildWithScrollBars.
+ (-[WebFrameView _isScrollable]):
+ New method, calls -[WebDynamicScrollBarsView horizontalScrollingAllowed] and
+ -[WebDynamicScrollBarsView verticalScrollingAllowed]
+ (-[WebFrameView _largestScrollableChild]):
+ New method, like _largestChildWithScrollBars but uses _isScrollable.
+ (-[WebFrameView _hasScrollBars]):
+ Added a comment that this is no longer used by Safari, and can thus probably be
+ deleted once we no longer want to support it for nightly build compatibility with
+ old versions of Safari.
+ (-[WebFrameView _largestChildWithScrollBars]):
+ Ditto.
+
+ * WebView/WebFrameViewPrivate.h:
+ Declared -_isScrollable and -_largestScrollableChild. Added comments to
+ _hasScrollBars and _largestChildWithScrollBars saying that they are no longer
+ used by Safari, and can thus probably be deleted once we no longer want to
+ support them for nightly build compatibility with old versions of Safari.
+
+2010-03-15 John Sullivan <sullivan@apple.com>
+
+ Method name and parameter name mistakes from recent SPI addition
+ <https://bugs.webkit.org/show_bug.cgi?id=36119>
+
+ Reviewed by Dan Bernstein.
+
+ * WebView/WebDynamicScrollBarsView.h:
+ Renamed instance variable and method name from "setAllowXXX" to "setAllowsXXX".
+
+ * WebView/WebDynamicScrollBarsView.mm:
+ (-[WebDynamicScrollBarsView setAllowsScrollersToOverlapContent:]):
+ Updated for renamed instance variable and method.
+ (-[WebDynamicScrollBarsView setAlwaysHideHorizontalScroller:]):
+ Changed parameter name from shouldBeVisible to shouldBeHidden.
+ (-[WebDynamicScrollBarsView setAlwaysHideVerticalScroller:]):
+ Ditto.
+ (-[WebDynamicScrollBarsView contentViewFrame]):
+ Updated for renamed instance variable.
+ (-[WebDynamicScrollBarsView tile]):
+ Ditto.
+ (-[WebDynamicScrollBarsView reflectScrolledClipView:]):
+ Ditto.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame setAllowsScrollersToOverlapContent:]):
+ Renamed method from setAllowXXX, and updated for same change in WebDynamicScrollBarsView.
+
+ * WebView/WebFramePrivate.h:
+ Renamed method name from "setAllowXXX" to "setAllowsXXX".
+
+2010-03-14 Darin Adler <darin@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Remove unneeded dependency on non-string identifier for an NSTableColumn
+ https://bugs.webkit.org/show_bug.cgi?id=36106
+
+ * WebView/WebTextCompletionController.mm:
+ (-[WebTextCompletionController _buildUI]): Use init instead of initWithIdentifier:
+ because the table has only one column and that column does not need an identifier.
+
+2010-03-12 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=34942 Fullscreen
+ API naming is inconsistent
+ -and corresponding-
+ <rdar://problem/7729165>
+
+ This patch changes all occurrences of "fullScreen" to the more
+ popular "fullscreen."
+
+ * Plugins/Hosted/NetscapePluginHostProxy.h:
+ (WebKit::NetscapePluginHostProxy::isFullscreenWindowShowing):
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
+ (WebKit::NetscapePluginHostProxy::didEnterFullscreen):
+ (WebKit::NetscapePluginHostProxy::didExitFullscreen):
+ (WebKit::NetscapePluginHostProxy::setFullscreenWindowIsShowing):
+ (WKPCSetFullscreenWindowIsShowing):
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView _workaroundSilverlightFullscreenBug:]):
+ (-[WebNetscapePluginView _createPlugin]):
+ (-[WebNetscapePluginView _destroyPlugin]):
+ * WebView/WebVideoFullscreenHUDWindowController.mm:
+ (-[WebVideoFullscreenHUDWindowController windowDidLoad]):
+
+2010-03-12 Andy Estes <aestes@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ Expose WebPDFView's underlying PDFDocument.
+
+ https://bugs.webkit.org/show_bug.cgi?id=36045
+
+ * WebView/WebDocumentPrivate.h: Create a new protocol called
+ WebDocumentPDF.
+ * WebView/WebPDFView.h: Have WebPDFView implement said protocol.
+ * WebView/WebPDFView.mm:
+ (-[WebPDFView PDFDocument]): Expose WebPDFView's underlying
+ PDFDocument by implementing -(PDFDocument*)PDFDocument from
+ WebDocumentPDF.
+
+2010-03-12 Andy Estes <aestes@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ Remove an unused method.
+
+ https://bugs.webkit.org/show_bug.cgi?id=35940
+
+ * Plugins/WebPluginController.mm:
+ removed - (void)showURL:(NSURL *) inFrame:(NSString *)
+
+2010-03-11 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by David Kilzer.
+
+ <rdar://problem/7745082> Make it possible to build WebKit for older Mac OS X versions from the current Mac OS X version
+
+ Default to using the appropriate SDK if the target Mac OS X version is not the current Mac OS X version.
+
+ * Configurations/Base.xcconfig:
+
+2010-03-11 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ <rdar://problem/7745082> Make it possible to build WebKit for older Mac OS X versions from the current Mac OS X version
+
+ Introduce TARGET_MAC_OS_X_VERSION_MAJOR to represent the Mac OS X version that is being targeted. It defaults to the
+ current Mac OS X version unless otherwise specified.
+
+ Key off TARGET_MAC_OS_X_VERSION_MAJOR where we'd previously been keying off MAC_OS_X_VERSION_MAJOR.
+
+ Explicitly map from the target Mac OS X version to the preferred compiler since Xcode's default compiler choice
+ may not be usable when targetting a different Mac OS X version.
+
+ Key off TARGET_GCC_VERSION rather than MAC_OS_X_VERSION_MAJOR in locations where we'd previously been keying off
+ MAC_OS_X_VERSION_MAJOR but the decision is really related to the compiler version being used.
+
+ * Configurations/Base.xcconfig:
+ * Configurations/DebugRelease.xcconfig:
+ * Configurations/FeatureDefines.xcconfig:
+ * Configurations/Version.xcconfig:
+
+2010-03-11 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by David Hyatt.
+
+ Remove invalidateContents, it isn't used and it never makes sense to only invalidate the contents.
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+
+2010-03-11 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=35965
+ <rdar://problem/7742771> Crash when passing an object returned from plug-in back to the plug-in
+
+ Test: plugins/round-trip-npobject.html
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::retainLocalObject): Corrected the check - there is
+ now a separate ProxyRuntimeObject class for proxy pbjects.
+ (WebKit::NetscapePluginInstanceProxy::releaseLocalObject): Ditto.
+
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyInstance::invoke): Check if m_instanceProxy is still non-zero. The plug-in
+ could have crashed while we were waiting for response.
+ (WebKit::ProxyInstance::setFieldValue): Ditto.
+
+2010-03-10 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=35975
+ <rdar://problem/7739922> Flash 10.1b crashes when generating snapshots
+
+ Do a version check before sending a drawRect event to a Flash plugin,
+ since 10.1.d51 has a bug that crashes when called this way.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView drawRect:]):
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView supportsSnapshotting]):
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView drawRect:]):
+
+2010-03-10 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ <rdar://problem/7735387> input type other than text won't work with autofill
+ <https://bugs.webkit.org/show_bug.cgi?id=35963>
+
+ * WebView/WebHTMLRepresentation.mm:
+ (-[WebHTMLRepresentation elementDoesAutoComplete:]):
+ Return true for any text field that's not a password, rather than only
+ for TEXT type.
+
+2010-03-09 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ REGRESSION: WebInspector docking busted on Windows
+ <rdar://problem/7728433> and https://bugs.webkit.org/show_bug.cgi?id=35953
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController showWindow:]): Use the InspectorController:: copy of the should attach settings key.
+ (-[WebInspectorWindowController attach]): Ditto.
+ (-[WebInspectorWindowController detach]): Ditto.
+
+2010-03-09 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Updated for FastMalloc reporting changes.
+
+ * Misc/WebCoreStatistics.mm:
+ (+[WebCoreStatistics memoryStatistics]):
+
+2010-03-08 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Move the new method to the end of the MIG definitions file, to avoid breaking
+ compatibility between WebKit and older versions of WebKitPluginHost.
+
+ * Plugins/Hosted/WebKitPluginHost.defs:
+
+2010-03-08 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ <rdar://problem/7714340> Need to grab image snapshot of Core Animation plugins
+
+ Allow plug-ins using the Core Animation drawing model to be captured when doing a flattening paint,
+ by sending them a drawRect event as if they were software-painting.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::snapshot):
+ New snapshot() method that calls over to the plugin host, and then draws the image that comes back.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView drawRect:]): If we don't have a software renderer, but we're doing
+ a flattening paint, then call the snapshot method.
+
+ * Plugins/Hosted/WebKitPluginHost.defs: Added snapshot method.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView inFlatteningPaint]):
+ New utility method that asks the FrameView whether the current paint behavior is
+ flattening.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView drawRect:]): If the plug-in is using CA but this is a flattening
+ paint, go ahead and send a drawRect event to the plug-in.
+
+2010-03-08 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix crash when you quit inside an unload handler.
+ rdar://problem/6958347
+
+ Test: manual-tests/quit-inside-unload.html
+
+ * WebView/WebView.mm:
+ (-[WebView _closeWithFastTeardown]): Removed code to set
+ _private->closed since _close now does this earlier, before
+ calling this method.
+ (-[WebView _close]): Moved code to set _private->closed to the
+ top of this method.
+ (-[WebView setHostWindow:]): Rewrote the code that forbade
+ setting the host window after closing so that it only forbids
+ non-nil host windows. That way, the code to clear away the host
+ window can run safely after setting _private->closed, yet client
+ code cannot set a new host window after closing.
+
+2010-03-08 Darin Adler <darin@apple.com>
+
+ Roll out a file I checked in by accident.
+
+ * WebView/WebView.mm: Back to previous version.
+
+2010-03-08 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Turn on HW accel on Leopard even if coreVideoHas7228836Fix() is false, when WebGL is enabled
+ https://bugs.webkit.org/show_bug.cgi?id=35759
+
+ This allows WebGL to work on Leopard without the fix. It exposes these users to the crash
+ that happens because of the CoreVideo bug, but it limits the exposure to those who have
+ chosen to enable WebGL.
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-03-02 Adam Treat <atreat@rim.com>
+
+ Reviewed by Dave Hyatt.
+
+ Adapt the mac port to the refactoring of repaint methods.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34214
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::invalidateContents):
+ (WebChromeClient::invalidateWindow):
+ (WebChromeClient::invalidateContentsAndWindow):
+ (WebChromeClient::invalidateContentsForSlowScroll):
+
+2010-03-08 Jian Li <jianli@chromium.org>
+
+ Reviewed by Dmitry Titov.
+
+ Blob.slice support.
+ https://bugs.webkit.org/show_bug.cgi?id=32993
+
+ Add ENABLE_BLOB_SLICE feature define.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-03-08 Eric Uhrhane <ericu@chromium.org>
+
+ Reviewed by David Levin.
+
+ Remove the now-redundant Settings fields for the Database
+ https://bugs.webkit.org/show_bug.cgi?id=35763
+
+ No new tests; this code isn't called.
+
+ * WebView/WebView.mm: Remove the call into Settings.
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-03-07 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Cameron Zwarich.
+
+ Remove unnecessary includes from header files, adding them to the handful of implementation files that need them.
+
+ * Misc/WebIconDatabase.mm:
+
+2010-03-07 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Cameron Zwarich.
+
+ Remove unnecessary includes from header files, adding them to the handful of implementation files that need them.
+
+ * Misc/WebNSPasteboardExtras.mm:
+
+2010-03-04 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/7717249> DOMSVG.h includes a non-existent DOMSVGFEMorphologyElement.h
+
+ * MigrateHeaders.make: Migrate DOMSVGFEMorphologyElement.h and DOMSVGFEMorphologyElementInternal.h.
+
+2010-03-04 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Use a framework-style include to pull in WebInspector.h for consistency
+ with other parts of WebKit.
+
+ * WebInspector/WebInspectorPrivate.h:
+
+2010-03-04 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ REGRESSION (31281): -[WebArchive initWithCoder:] leaks
+ <rdar://problem/7702420> and https://bugs.webkit.org/show_bug.cgi?id=35534
+
+ * WebView/WebArchive.mm:
+ (-[WebArchive initWithCoder:]): Don't retain objects we don't own.
+
+2010-03-03 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=35692
+ <rdar://problem/7703622> Crash when calling abort() on an XHR while in a windowless WebView
+
+ * Panels/WebAuthenticationPanel.m: (-[WebAuthenticationPanel runAsModalDialogWithChallenge:]):
+ Retain the challenge, just like it's done for sheet.
+
+2010-03-02 Eric Uhrhane <ericu@chromium.org>
+
+ Reviewed by David Levin.
+
+ Move database enable bit fully out of settings
+ This is stage one of a three-stage commit [webkit, then chromium, then
+ webkit again]. In this change I'm adding calls to
+ Database::setIsAvailable inside Settings::setDatabaseEnabled and
+ anywhere else that called it, and switching webkit fully over to using
+ that flag [added in a previous checkin]. Phase two will remove
+ Chromium's use of Settings for the Database, and phase three will remove
+ the Setting for the Database enable entirely, leaving only
+ Database::isAvailable/setIsAvailable.
+
+ No new tests; tested by existing storage tests.
+
+ https://bugs.webkit.org/show_bug.cgi?id=35310
+
+ * WebView/WebView.mm: Added a call to Database::setIsAvailable.
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-03-02 Adam Roben <aroben@apple.com>
+
+ Add -[WebView _registerURLSchemeAsSecure:]
+
+ Fixes <http://webkit.org/b/35580> <rdar://problem/7706407> Expose
+ SecurityOrigin::registerURLSchemeAsSecure as WebKit SPI
+
+ Reviewed by Tim Hatcher.
+
+ * WebView/WebView.mm:
+ (+[WebView _registerURLSchemeAsSecure:]):
+ * WebView/WebViewPrivate.h:
+ Added. Calls through to SecurityOrigin::registerURLSchemeAsSecure.
+
+2010-03-01 Jakob Petsovits <jpetsovits@rim.com>
+
+ Reviewed by Adam Barth.
+
+ Adapt to the new ZoomMode enum.
+ https://bugs.webkit.org/show_bug.cgi?id=35347
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+ (-[WebView _setZoomMultiplier:isTextOnly:]):
+ (-[WebView _realZoomMultiplierIsTextOnly]):
+
+2010-02-27 Jing Jin <jjin@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Move implementation of Bug 35449 into WebFramePrivate.
+
+ * WebView/WebFrame.h:
+ * WebView/WebFrame.mm:
+ (-[WebFrame setAllowScrollersToOverlapContent:]):
+ (-[WebFrame setAlwaysHideHorizontalScroller:]):
+ (-[WebFrame setAlwaysHideVerticalScroller:]):
+ * WebView/WebFramePrivate.h:
+
+2010-02-26 Jing Jin <jjin@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=35449
+ Add ability to hide WebFrame scrollbars and to allow scrollbars to overlap with content.
+
+ * WebView/WebDynamicScrollBarsView.h:
+ * WebView/WebDynamicScrollBarsView.mm:
+ (-[WebDynamicScrollBarsView setAllowScrollersToOverlapContent:]): Allows scrollbars to
+ overlap with the document and re-layouts the document.
+ (-[WebDynamicScrollBarsView setAlwaysHideHorizontalScroller:]): Hides the horizontal scrollbar.
+ (-[WebDynamicScrollBarsView setAlwaysHideVerticalScroller:]): Hides the vertical scrollbar.
+ (-[WebDynamicScrollBarsView contentViewFrame]): Calculates the appropriate frame based
+ on allowScrollersToOverlapContent.
+ (-[WebDynamicScrollBarsView tile]): If allowScrollersToOverlapContent is YES, set the
+ contentView's frame so it overlaps with the scrollbar.
+ (-[WebDynamicScrollBarsView updateScrollers]): Take into account hideHorizontalScroller
+ and hideVerticalScroller.
+ (-[WebDynamicScrollBarsView reflectScrolledClipView:]): set drawsBackground to NO when
+ scrollbars are overlapping with content, so we don't get trails during scrollbar draw updates.
+ * WebView/WebDynamicScrollBarsViewInternal.h:
+ * WebView/WebFrame.h:
+ * WebView/WebFrame.mm:
+ (-[WebFrame setAllowScrollersToOverlapContent:]): Hook for [WebDynamicScrollBarsView setAllowScrollersToOverlapContent:]
+ (-[WebFrame setAlwaysHideHorizontalScroller:]): Hook for [WebDynamicScrollBarsView setAlwaysHideHorizontalScroller:]
+ (-[WebFrame setAlwaysHideVerticalScroller:]): Hook for [WebDynamicScrollBarsView setAlwaysHideVerticalScroller:]
+
+2010-02-26 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Bug 35401 - Fix handling of errors in handling calls over bridge,
+ where base object bridge-type does not match method bridge-type.
+
+ The code assumes users will only attempt to invoke a Java method
+ on a Java base object, etc.
+ Add language specific subclasses of RuntimeMethod, and pass the
+ RuntimeMethod into invokeMethod, so we can typecheck before
+ casting. Throw an exception on type mismatch.
+
+ * Plugins/Hosted/ProxyInstance.h:
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::PluginRuntimeMethod::PluginRuntimeMethod): new class to distinguish this type of RuntimeMethod.
+ (WebKit::ProxyInstance::getMethod): create an appropriate sublclass of RuntimeMethod.
+ (WebKit::ProxyInstance::invokeMethod): dynamically check the type of the RuntimeMethod.
+
+2010-02-25 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Geoffrey Garen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=35394
+ <rdar://problem/7685262> Make passing objects between Java and plug-ins work
+
+ Added a ProxyInstance implementation of RuntimeObject.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::addValueToArray):
+ * Plugins/Hosted/ProxyInstance.h:
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyInstance::newRuntimeObject):
+ (WebKit::ProxyInstance::getClass):
+ * Plugins/Hosted/ProxyRuntimeObject.h: Added.
+ (WebKit::ProxyRuntimeObject::classInfo):
+ * Plugins/Hosted/ProxyRuntimeObject.mm: Added.
+ (WebKit::ProxyRuntimeObject::ProxyRuntimeObject):
+ (WebKit::ProxyRuntimeObject::~ProxyRuntimeObject):
+ (WebKit::ProxyRuntimeObject::getInternalProxyInstance):
+
+2010-02-24 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium API] Disambiguate allowJavaScript from didNotAllowScript
+ https://bugs.webkit.org/show_bug.cgi?id=35205
+
+ Make these two callsites explicit about not running script immediately.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
+ (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
+
+2010-02-23 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Tim Hatcher and Pavel Feldman.
+
+ Regression (r55107) - WebInspector docking is busted.
+ https://bugs.webkit.org/show_bug.cgi?id=35274
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController showWindow:]): Swap the order of the "should attach?" check
+ to get the expected behavior.
+
+2010-02-23 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7611158> Incomplete repaint of YouTube timeline thumb while scrolling
+ https://bugs.webkit.org/show_bug.cgi?id=34381
+
+ Test: fast/repaint/repaint-during-scroll.html
+
+ NSClipView offsets any rects marked as needing display during scrolling
+ by the scroll offset. Compensate for this when -setNeedsDisplay: is called
+ during scrolling.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _frameOrBoundsChanged]): Set inScrollPositionChanged to YES
+ around to call to FrameView::scrollPositionChanged().
+ (-[WebHTMLView setNeedsDisplayInRect:]): When called beneath
+ scrollPositionChanged(), adjust the rect by the inverse of the scroll offset.
+
+2010-02-23 Steve Block <steveblock@google.com>
+
+ Reviewed by Darin Adler.
+
+ Adds ChromeClient::cancelGeolocationPermissionRequestForFrame
+ https://bugs.webkit.org/show_bug.cgi?id=34962
+
+ This method is required so that a Geolocation object can cancel an
+ asynchronous permission request. This allows the chrome client to cancel
+ any UI it is showing for the permission request.
+
+ * WebCoreSupport/WebChromeClient.h:
+ (WebChromeClient::cancelGeolocationPermissionRequestForFrame):
+
+2010-02-22 Alexey Proskuryakov <ap@apple.com>
+
+ Rubber-stamped by Geoff Garen.
+
+ Rename RuntimeObjectImp to RuntimeObject.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::addValueToArray):
+ (WebKit::NetscapePluginInstanceProxy::retainLocalObject):
+ (WebKit::NetscapePluginInstanceProxy::releaseLocalObject):
+
+2010-02-22 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Disable WebView docking to views that are too small.
+ <rdar://problem/7248409> and https://bugs.webkit.org/show_bug.cgi?id=35254
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController showWindow:]): No matter the preference, don't open the inspector
+ window attached if WebCore says it shouldn't be attached.
+
+2010-02-22 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by John Sullivan.
+
+ <rdar://problem/7285392>
+ On Leopard, we have to disable hardware acceleration if we detect that the
+ installed Core Video framework has bug <rdar://problem/7228836>.
+
+ * WebView/WebView.mm:
+ (coreVideoHas7228836Fix):
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-02-21 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ False warnings about needing layout in
+ -[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
+ https://bugs.webkit.org/show_bug.cgi?id=35218
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
+ Suppress the warning and the forced layout if the view is not being drawn
+ in this display operation.
+
+2010-02-21 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ plugInViewWithArguments: API sends wrong parameter for WebPlugInBaseURLKey
+ https://bugs.webkit.org/show_bug.cgi?id=35215
+ <rdar://problem/7673157>
+
+ The plugInViewWithArguments: API passes a dictionary of plugin arguments. One of the parameters
+ is WebPlugInBaseURLKey, which is a key that represents the base URL of the document containing
+ the plug-in's view. Instead of sending the base URL, code in WebFrameLoaderClient::createPlugin
+ would incorrectly pass the source URL of the plug-in resource.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createPlugin): When building the plug-in arguments dictionary, pass the
+ real base URL for the WebPlugInBaseURLKey key.
+
+2010-02-19 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by David Levin.
+
+ Add an ENABLE flag for sandboxed iframes to make it possible to disable it in releases
+ https://bugs.webkit.org/show_bug.cgi?id=35147
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-02-19 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ https://bugs.webkit.org/show_bug.cgi?id=35132
+ <rdar://problem/7664353> Mouse cursor sometimes flickers over Flash content (35132)
+
+ * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
+ (WebNetscapePluginEventHandlerCarbon::mouseMoved): Send adjustCursor events on every mouse
+ move. This matches Firefox, and is actually required for plug-ins to manipulate cursor wihout
+ resorting to techniques such as fast firing timers.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView handleMouseEntered:]): Some plug-ins handle mouse cursor internally,
+ but those that don't just need to get an arrow cursor (matching Firefox). This means that
+ e.g. a plugin inside <A> won't get a finger mouse pointer.
+
+ * Plugins/WebHostedNetscapePluginView.mm:
+ (-[WebNetscapePluginView handleMouseEntered:]):
+ (-[WebNetscapePluginView handleMouseExited:]):
+ Implement this behavior here, too. Also, out of process code didn't reset mouse pointer on
+ mouse exit, which it needed to do.
+
+ * WebView/WebHTMLView.mm:
+ (needsCursorRectsSupportAtPoint):
+ (setCursor):
+ (resetCursorRects):
+ Make sure that the same workaround we have for Web content also applies to Netscape plug-ins,
+ as AppKit would reset the mouse pointer to arrow if given a chance.
+ (+[WebHTMLViewPrivate initialize]): Renamed setCursorIMP on Leopard and higher to prevent
+ confusion - the method we override is completely different.
+ (-[WebHTMLView hitTest:]): Added a FIXME about a likely bug.
+
+2010-02-19 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/7535894> Page contents missing from snapshot on Newsweek.com article
+
+ Followup to avoid capturing compositing layers twice in snapshots. Add private
+ methods to WebView to specify whether drawing the WebView into an image will
+ include flattened compositing layers (the default behavior) or not.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _drawRect:contentsOnly:]): Consult the WebView flag to see if we
+ want flattening.
+
+ * WebView/WebViewPrivate.h: New methods.
+ * WebView/WebView.mm: Ditto.
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+ (-[WebView _setIncludesFlattenedCompositingLayersWhenDrawingToBitmap:]):
+ (-[WebView _includesFlattenedCompositingLayersWhenDrawingToBitmap]):
+
+ * WebView/WebViewData.h: New member variable.
+
+2010-02-19 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=35165
+ plugins/set-status.html fails on Windows bot
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::status):
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView status:]):
+ Match Windows port behavior (and also Firefox one, in a way) - pass null status messages as
+ empty ones to chrome.
+
+2010-02-18 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/7535894> Page contents missing from snapshot on Newsweek.com article
+
+ Add logic to determine when painting via the software rendering path will give an equivalent
+ result to the accelerated compositing presentation. This tests for the presence of 3D transforms.
+
+ Also have -[WebFrame _drawRect:contentsOnly:] set the PaintBehaviorFlattenCompositingLayers
+ paint behavior when painting into a bitmap context, so that snapshots contain composited layers.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _drawRect:contentsOnly:]): Set the PaintBehaviorFlattenCompositingLayers flag
+ when painting into a bitmap context.
+ * WebView/WebView.mm:
+ (-[WebView _isSoftwareRenderable]): Returns YES if all frames can be software-rendered.
+ * WebView/WebViewPrivate.h: New _isSoftwareRenderable method.
+
+2010-02-18 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=35134
+ <rdar://problem/7246280> Crash when a plugin calls NPN_SetStatus(0)
+
+ Test: plugins/set-status.html
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::status):
+ (WebKit::NetscapePluginInstanceProxy::loadURL):
+ Added null checks for CFStringCreateWithCString arguments.
+
+2010-02-17 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by David Levin, Darin Fisher, Simon Hausmann.
+
+ When a live iframe element is moved between pages, it still depends on the old page.
+ https://bugs.webkit.org/show_bug.cgi?id=34382
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ Added empty implementation of a new virtual method.
+
+ (WebFrameLoaderClient::didTransferChildFrameToNewDocument):
+
+2010-02-17 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Introduces new Icon loading interface in order to support
+ asynchronous loading.
+ https://bugs.webkit.org/show_bug.cgi?id=32054
+
+ Add an empty implementation of ChromeClient::iconForFiles().
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::iconForFiles):
+
+2010-02-17 Timothy Hatcher <timothy@apple.com>
+
+ Add a way for WebView and its dependancies to be selectively included
+ in WebKitStatistics leak tracking. By default WebView is not included and
+ you need to subclass WebView and implement +isIncludedInWebKitStatistics
+ to be included.
+
+ rdar://problem/7567677&7572900
+ https://webkit.org/b/35045
+
+ Reviewed by Adam Roben.
+
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource _initWithDocumentLoader:]): Increment WebDataSourceCount if the WebFrame is included in statistics.
+ (-[WebDataSource dealloc]): Only --WebDataSourceCount if _private->includedInWebKitStatistics is YES.
+ (-[WebDataSource finalize]): Ditto.
+ * WebView/WebFrame.mm:
+ (-[WebFrame _isIncludedInWebKitStatistics]): Return _private->includedInWebKitStatistics.
+ (-[WebFrame _initWithWebFrameView:webView:]): Increment WebFrameCount if the WebView's class is included in statistics.
+ (-[WebFrame dealloc]): Only --WebFrameCount if _private->includedInWebKitStatistics is YES.
+ (-[WebFrame finalize]): Ditto.
+ * WebView/WebFrameInternal.h:
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView _setWebFrame:]): Increment WebFrameViewCount if the WebFrame is included in statistics.
+ (-[WebFrameView initWithFrame:]): Move ++WebFrameViewCount from here since we don't
+ know what WebFrame we belong to yet.
+ (-[WebFrameView dealloc]): Only --WebFrameViewCount if _private->includedInWebKitStatistics is YES.
+ (-[WebFrameView finalize]): Ditto.
+ * WebView/WebHTMLRepresentation.mm:
+ (-[WebHTMLRepresentation init]): Move ++WebHTMLRepresentationCount from here since we don't
+ know what WebFrame we belong to yet.
+ (-[WebHTMLRepresentation dealloc]): Only --WebHTMLRepresentationCount if _private->includedInWebKitStatistics is YES.
+ (-[WebHTMLRepresentation finalize]): Ditto.
+ (-[WebHTMLRepresentation setDataSource:]): Increment WebHTMLRepresentationCount if the WebFrame of the dataSource is
+ included in statistics.
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+ (-[WebView dealloc]):
+ (+[WebView shouldIncludeInWebKitStatistics]): Return NO, so any WebView wont be included.
+ Subclasses that care can return YES to be included.
+ * WebView/WebViewInternal.h:
+
+2010-02-16 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Generalize delayed plug-in start for background tabs for use for other media
+ https://bugs.webkit.org/show_bug.cgi?id=34981
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView viewWillMoveToWindow:]): Added comment.
+ (-[WebHTMLView viewDidMoveToWindow]): Ditto.
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+ Call setCanStartMedia right away so that if this view is not in a window, it
+ will not start any media.
+ (-[WebView viewWillMoveToWindow:]): Call setCanStartMedia(false) when moving
+ to a window of nil.
+ (-[WebView viewDidMoveToWindow]): Call setCanStartMedia(true) when moved to
+ a window that is non-nil.
+
+2010-02-16 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34988
+ WebHTMLView.mm has two -willRemoveSubview: methods
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView willRemoveSubview:]): Consolidate the two copies of this method.
+
+2010-02-16 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Geoffrey Garen and Kevin Decker.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34989
+ <rdar://problem/7417965> Cursor disappears on scroll bars that are over plugin content
+
+ This fixes event dispatch for both Cocoa and Carbon event models (mouseEntered/mouseExited
+ in the former case, and adjustCursor in the latter).
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView handleMouseEntered:]):
+ (-[WebHostedNetscapePluginView handleMouseExited:]):
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView handleMouseEntered:]):
+ (-[WebBaseNetscapePluginView handleMouseExited:]):
+ * Plugins/WebNetscapePluginView.h:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView handleMouseEntered:]):
+ (-[WebNetscapePluginView handleMouseExited:]):
+ AppKit cannot reliably dispatch events for overlapping views. We are now asking WebCore to
+ notify plug-in views of mouse entered/exited as part of DOM event dispatch.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm: (NetscapePluginWidget::handleEvent): Besides
+ mouse moved, dispatch plugin mouse entered/exit events in HTMLPlugInElement default event
+ handler. Other mouse events are passed down by EventHandler.
+
+2010-02-15 Alexey Proskuryakov <ap@apple.com>
+
+ More build fixing (for what is actually a 64-bit failure, as 32-bit apparently includes
+ headers that aren't included in 64-bit).
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::contains):
+ (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::get):
+ Move inline functions to .cpp; also made the class Noncopyable.
+
+2010-02-15 Alexey Proskuryakov <ap@apple.com>
+
+ Mac release build fix attempt.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::~LocalObjectMap):
+ Implement destructor in .cpp file, where necessary headers are already included.
+
+2010-02-12 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ <rdar://problem/7130641> Browser objects identity is not preserved by Safari
+
+ Out of process part.
+
+ To avoid excessive IPC, plugin process doesn't send each NPObject release/retain call to
+ Safari. It only sends one when the last one is removed, and it can destroy the proxy
+ NPObject.
+
+ However, the browser may be sending the same object out to plug-in as a function call
+ argument at the same time - neither side can know what the other one is up to. The solution
+ is to make the "destroying object" call return a boolean result, making it possible for
+ the browser to make plugin host keep the proxy with zero refcount for a little longer.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCForgetBrowserObject): This function (that used to be named ReleaseObject) is only
+ called when plug-in releases all of its references, so renamed it. Its boolean result
+ is returned as call success or failure.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ (WebKit::NetscapePluginInstanceProxy::LocalObjectMap): Made the numeric ID to JSObject map
+ two-way.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::idForObject): This method is tricky
+ in that it creates objects with refcount of 1, but doesn't increase refcount when returning
+ found objects. This extra count accounts for the "reference" kept by plugin process.
+ (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::retain): Only retaining for the
+ duration of calls out to plug-in, which means that refcount is almost always equal to 1.
+ Note that we can't use "++" here, due to how std::pair works!
+ (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::release): Ditto.
+ (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::clear): Clear all references when
+ stopping plug-in.
+ (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::forget): Like release(), but only
+ functional when recount is 1 (meaning that the object is not being sent out to plug-in at
+ the moment).
+ (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy): Updated for other changes.
+ (WebKit::NetscapePluginInstanceProxy::cleanup): Ditto.
+ (WebKit::NetscapePluginInstanceProxy::getWindowNPObject): Ditto.
+ (WebKit::NetscapePluginInstanceProxy::getPluginElementNPObject): Ditto.
+ (WebKit::NetscapePluginInstanceProxy::forgetBrowserObjectID): Ditto.
+ (WebKit::NetscapePluginInstanceProxy::evaluate): Ditto.
+ (WebKit::NetscapePluginInstanceProxy::invoke): Ditto.
+ (WebKit::NetscapePluginInstanceProxy::invokeDefault): Ditto.
+ (WebKit::NetscapePluginInstanceProxy::construct): Ditto.
+ (WebKit::NetscapePluginInstanceProxy::getProperty): Ditto.
+ (WebKit::NetscapePluginInstanceProxy::setProperty): Ditto.
+ (WebKit::NetscapePluginInstanceProxy::removeProperty): Ditto.
+ (WebKit::NetscapePluginInstanceProxy::hasProperty): Ditto.
+ (WebKit::NetscapePluginInstanceProxy::hasMethod): Ditto.
+ (WebKit::NetscapePluginInstanceProxy::enumerate): Ditto.
+ (WebKit::NetscapePluginInstanceProxy::addValueToArray): Ditto.
+ (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray): Ditto.
+ (WebKit::NetscapePluginInstanceProxy::retainLocalObject): Helper for calling retain when
+ making calls out to plug-in. No-op for objects that aren't wrapped to be sent (i.e. for
+ objects wrapping ProxyInstance wrappers for plug-in objects being sent bak).
+ (WebKit::NetscapePluginInstanceProxy::releaseLocalObject): Ditto.
+
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyInstance::invoke): Retain/release arguments during call.
+ (WebKit::ProxyInstance::setFieldValue): Ditto.
+
+ * Plugins/Hosted/WebKitPluginClient.defs: Renamed PCReleaseObject to PCForgetBrowserObject.
+
+2010-02-12 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Removed unneeded custom implementation of isDescendantOf.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView shouldClipOutPlugin]): Use the
+ -[NSView isDescendantOf:] method instead of our own method
+ named superviewsHaveSuperviews.
+
2010-02-12 Dan Bernstein <mitz@apple.com>
Reviewed by Darin Adler.
diff --git a/WebKit/mac/Configurations/Base.xcconfig b/WebKit/mac/Configurations/Base.xcconfig
index eb16d36..0e84791 100644
--- a/WebKit/mac/Configurations/Base.xcconfig
+++ b/WebKit/mac/Configurations/Base.xcconfig
@@ -1,4 +1,4 @@
-// Copyright (C) 2009 Apple Inc. All rights reserved.
+// Copyright (C) 2009, 2010 Apple Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
@@ -28,11 +28,15 @@ GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_CPP_EXCEPTIONS = NO;
GCC_ENABLE_CPP_RTTI = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
-GCC_ENABLE_OBJC_GC = supported;
+GCC_ENABLE_OBJC_GC = $(GCC_ENABLE_OBJC_GC_$(REAL_PLATFORM_NAME));
+GCC_ENABLE_OBJC_GC_iphoneos = NO;
+GCC_ENABLE_OBJC_GC_iphonesimulator = NO;
+GCC_ENABLE_OBJC_GC_macosx = supported;
GCC_ENABLE_SYMBOL_SEPARATION = NO;
GCC_FAST_OBJC_DISPATCH = YES;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-GCC_MODEL_TUNING = G5;
+GCC_MODEL_TUNING = $(GCC_MODEL_TUNING_$(REAL_PLATFORM_NAME));
+GCC_MODEL_TUNING_macosx = G5;
GCC_OBJC_CALL_CXX_CDTORS = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_THREADSAFE_STATICS = NO;
@@ -44,15 +48,26 @@ GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
LINKER_DISPLAYS_MANGLED_NAMES = YES;
OTHER_MIGFLAGS = -F$(BUILT_PRODUCTS_DIR);
PREBINDING = NO;
-VALID_ARCHS = i386 ppc x86_64 ppc64;
+VALID_ARCHS = $(VALID_ARCHS_$(REAL_PLATFORM_NAME));
+VALID_ARCHS_iphoneos = $(ARCHS_STANDARD_32_BIT);
+VALID_ARCHS_iphonesimulator = $(ARCHS_STANDARD_32_BIT);
+VALID_ARCHS_macosx = i386 ppc x86_64 ppc64;
// FIXME: <rdar://problem/5070292> WebKit should build with -Wshorten-64-to-32
-WARNING_CFLAGS = -Wall -Wextra -Wcast-align -Wchar-subscripts -Wextra-tokens -Wformat-security -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings;
+WARNING_CFLAGS_BASE = -Wall -Wextra -Wchar-subscripts -Wextra-tokens -Wformat-security -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings;
+WARNING_CFLAGS = $(WARNING_CFLAGS_$(REAL_PLATFORM_NAME));
+WARNING_CFLAGS_iphoneos = $(WARNING_CFLAGS_BASE);
+WARNING_CFLAGS_iphonesimulator = $(WARNING_CFLAGS_BASE);
+WARNING_CFLAGS_macosx = $(WARNING_CFLAGS_BASE);
REAL_PLATFORM_NAME = $(REAL_PLATFORM_NAME_$(PLATFORM_NAME));
REAL_PLATFORM_NAME_ = $(REAL_PLATFORM_NAME_macosx);
+REAL_PLATFORM_NAME_iphoneos = iphoneos;
+REAL_PLATFORM_NAME_iphonesimulator = iphonesimulator;
REAL_PLATFORM_NAME_macosx = macosx;
+TARGET_MAC_OS_X_VERSION_MAJOR = $(MAC_OS_X_VERSION_MAJOR);
+
// DEBUG_DEFINES, GCC_OPTIMIZATION_LEVEL, STRIP_INSTALLED_PRODUCT and DEAD_CODE_STRIPPING vary between the debug and normal variants.
// We set up the values for each variant here, and have the Debug configuration in the Xcode project use the _debug variant.
@@ -78,6 +93,29 @@ SECTORDER_FLAGS = -sectorder __TEXT __text mac/WebKit.order;
// Note that Xcode versions as new as 3.1.2 use XCODE_VERSION_ACTUAL for the minor version
// number. Newer versions of Xcode use XCODE_VERSION_MINOR for the minor version, and
// XCODE_VERSION_ACTUAL for the full version number.
-GCC_VERSION = $(GCC_VERSION_$(XCODE_VERSION_MINOR));
-GCC_VERSION_ = $(GCC_VERSION_$(XCODE_VERSION_ACTUAL));
-GCC_VERSION_0310 = 4.2;
+TARGET_GCC_VERSION = $(TARGET_GCC_VERSION_$(REAL_PLATFORM_NAME));
+TARGET_GCC_VERSION_iphoneos = LLVM_GCC_42;
+TARGET_GCC_VERSION_iphonesimulator = GCC_42;
+TARGET_GCC_VERSION_macosx = $(TARGET_GCC_VERSION_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+TARGET_GCC_VERSION_macosx_ = $(TARGET_GCC_VERSION_macosx_1040);
+TARGET_GCC_VERSION_macosx_1040 = GCC_40;
+TARGET_GCC_VERSION_macosx_1050 = $(TARGET_GCC_VERSION_macosx_1050_$(XCODE_VERSION_MINOR));
+TARGET_GCC_VERSION_macosx_1050_ = $(TARGET_GCC_VERSION_macosx_1050_$(XCODE_VERSION_ACTUAL));
+TARGET_GCC_VERSION_macosx_1050_0310 = GCC_42;
+TARGET_GCC_VERSION_macosx_1050_0320 = GCC_42;
+TARGET_GCC_VERSION_macosx_1060 = GCC_42;
+TARGET_GCC_VERSION_macosx_1070 = LLVM_GCC_42;
+
+GCC_VERSION = $(GCC_VERSION_$(TARGET_GCC_VERSION));
+GCC_VERSION_GCC_40 = 4.0;
+GCC_VERSION_GCC_42 = 4.2;
+GCC_VERSION_LLVM_GCC_42 = com.apple.compilers.llvmgcc42;
+
+// If the target Mac OS X version does not match the current Mac OS X version then we'll want to build using the target version's SDK.
+SDKROOT = $(SDKROOT_$(MAC_OS_X_VERSION_MAJOR)_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+SDKROOT_1050_1040 = macosx10.4;
+SDKROOT_1060_1040 = macosx10.4;
+SDKROOT_1060_1050 = macosx10.5;
+SDKROOT_1070_1040 = macosx10.4;
+SDKROOT_1070_1050 = macosx10.5;
+SDKROOT_1070_1060 = macosx10.6;
diff --git a/WebKit/mac/Configurations/DebugRelease.xcconfig b/WebKit/mac/Configurations/DebugRelease.xcconfig
index 11a94ca..5a86e25 100644
--- a/WebKit/mac/Configurations/DebugRelease.xcconfig
+++ b/WebKit/mac/Configurations/DebugRelease.xcconfig
@@ -1,4 +1,4 @@
-// Copyright (C) 2009 Apple Inc. All rights reserved.
+// Copyright (C) 2009, 2010 Apple Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
@@ -23,29 +23,38 @@
#include "Base.xcconfig"
-ARCHS = $(ARCHS_$(MAC_OS_X_VERSION_MAJOR));
-ARCHS_ = $(ARCHS_1040);
-ARCHS_1040 = $(NATIVE_ARCH);
-ARCHS_1050 = $(NATIVE_ARCH);
-ARCHS_1060 = $(ARCHS_STANDARD_32_64_BIT);
-ARCHS_1070 = $(ARCHS_STANDARD_32_64_BIT);
+ARCHS = $(ARCHS_$(REAL_PLATFORM_NAME));
+ARCHS_iphoneos = $(ARCHS_STANDARD_32_BIT);
+ARCHS_iphonesimulator = $(ARCHS_STANDARD_32_BIT);
+ARCHS_macosx = $(ARCHS_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+ARCHS_macosx_ = $(ARCHS_macosx_1040);
+ARCHS_macosx_1040 = $(NATIVE_ARCH);
+ARCHS_macosx_1050 = $(NATIVE_ARCH);
+ARCHS_macosx_1060 = $(ARCHS_STANDARD_32_64_BIT);
+ARCHS_macosx_1070 = $(ARCHS_STANDARD_32_64_BIT);
ONLY_ACTIVE_ARCH = YES;
-MACOSX_DEPLOYMENT_TARGET = $(MACOSX_DEPLOYMENT_TARGET_$(MAC_OS_X_VERSION_MAJOR));
-MACOSX_DEPLOYMENT_TARGET_ = 10.4;
-MACOSX_DEPLOYMENT_TARGET_1040 = 10.4;
-MACOSX_DEPLOYMENT_TARGET_1050 = 10.5;
-MACOSX_DEPLOYMENT_TARGET_1060 = 10.6;
-MACOSX_DEPLOYMENT_TARGET_1070 = 10.7;
+MACOSX_DEPLOYMENT_TARGET = $(MACOSX_DEPLOYMENT_TARGET_$(REAL_PLATFORM_NAME));
+MACOSX_DEPLOYMENT_TARGET_iphoneos = 10.5;
+MACOSX_DEPLOYMENT_TARGET_iphonesimulator = 10.5;
+MACOSX_DEPLOYMENT_TARGET_macosx = $(MACOSX_DEPLOYMENT_TARGET_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+MACOSX_DEPLOYMENT_TARGET_macosx_ = 10.4;
+MACOSX_DEPLOYMENT_TARGET_macosx_1040 = 10.4;
+MACOSX_DEPLOYMENT_TARGET_macosx_1050 = 10.5;
+MACOSX_DEPLOYMENT_TARGET_macosx_1060 = 10.6;
+MACOSX_DEPLOYMENT_TARGET_macosx_1070 = 10.7;
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES;
SECTORDER_FLAGS = ;
-WEBKIT_SYSTEM_INTERFACE_LIBRARY = $(WEBKIT_SYSTEM_INTERFACE_LIBRARY_$(MAC_OS_X_VERSION_MAJOR));
-WEBKIT_SYSTEM_INTERFACE_LIBRARY_ = WebKitSystemInterfaceTiger;
-WEBKIT_SYSTEM_INTERFACE_LIBRARY_1040 = WebKitSystemInterfaceTiger;
-WEBKIT_SYSTEM_INTERFACE_LIBRARY_1050 = WebKitSystemInterfaceLeopard;
-WEBKIT_SYSTEM_INTERFACE_LIBRARY_1060 = WebKitSystemInterfaceSnowLeopard;
-WEBKIT_SYSTEM_INTERFACE_LIBRARY_1070 = WebKitSystemInterfaceSnowLeopard;
+WEBKIT_SYSTEM_INTERFACE_LIBRARY = $(WEBKIT_SYSTEM_INTERFACE_LIBRARY_$(REAL_PLATFORM_NAME));
+WEBKIT_SYSTEM_INTERFACE_LIBRARY_iphoneos = WebKitSystemInterface;
+WEBKIT_SYSTEM_INTERFACE_LIBRARY_iphonesimulator = $(WEBKIT_SYSTEM_INTERFACE_LIBRARY_iphoneos);
+WEBKIT_SYSTEM_INTERFACE_LIBRARY_macosx = $(WEBKIT_SYSTEM_INTERFACE_LIBRARY_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+WEBKIT_SYSTEM_INTERFACE_LIBRARY_macosx_ = WebKitSystemInterfaceTiger;
+WEBKIT_SYSTEM_INTERFACE_LIBRARY_macosx_1040 = WebKitSystemInterfaceTiger;
+WEBKIT_SYSTEM_INTERFACE_LIBRARY_macosx_1050 = WebKitSystemInterfaceLeopard;
+WEBKIT_SYSTEM_INTERFACE_LIBRARY_macosx_1060 = WebKitSystemInterfaceSnowLeopard;
+WEBKIT_SYSTEM_INTERFACE_LIBRARY_macosx_1070 = WebKitSystemInterfaceSnowLeopard;
diff --git a/WebKit/mac/Configurations/FeatureDefines.xcconfig b/WebKit/mac/Configurations/FeatureDefines.xcconfig
index 8343ce7..d08fadf 100644
--- a/WebKit/mac/Configurations/FeatureDefines.xcconfig
+++ b/WebKit/mac/Configurations/FeatureDefines.xcconfig
@@ -1,4 +1,4 @@
-// Copyright (C) 2009 Apple Inc. All rights reserved.
+// Copyright (C) 2009, 2010 Apple Inc. All rights reserved.
// Copyright (C) 2009 Google Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -31,46 +31,97 @@
// Set any ENABLE_FEATURE_NAME macro to an empty string to disable that feature.
-ENABLE_3D_CANVAS = $(ENABLE_3D_CANVAS_$(MAC_OS_X_VERSION_MAJOR));
-ENABLE_3D_CANVAS_1050 = ENABLE_3D_CANVAS;
-ENABLE_3D_CANVAS_1060 = ENABLE_3D_CANVAS;
-ENABLE_3D_CANVAS_1070 = ENABLE_3D_CANVAS;
+ENABLE_LINK_PREFETCH = ;
-ENABLE_3D_RENDERING = $(ENABLE_3D_RENDERING_$(MAC_OS_X_VERSION_MAJOR));
-ENABLE_3D_RENDERING_1050 = ENABLE_3D_RENDERING;
-ENABLE_3D_RENDERING_1060 = ENABLE_3D_RENDERING;
-ENABLE_3D_RENDERING_1070 = ENABLE_3D_RENDERING;
+ENABLE_ACCELERATED_2D_CANVAS = $(ENABLE_ACCELERATED_2D_CANVAS_$(REAL_PLATFORM_NAME));
+ENABLE_ACCELERATED_2D_CANVAS_macosx = $(ENABLE_ACCELERATED_2D_CANVAS_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+ENABLE_ACCELERATED_2D_CANVAS_macosx_1060 = ;
+ENABLE_ACCELERATED_2D_CANVAS_macosx_1070 = ;
+
+ENABLE_3D_CANVAS = $(ENABLE_3D_CANVAS_$(REAL_PLATFORM_NAME));
+ENABLE_3D_CANVAS_macosx = $(ENABLE_3D_CANVAS_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+ENABLE_3D_CANVAS_macosx_1060 = ENABLE_3D_CANVAS;
+ENABLE_3D_CANVAS_macosx_1070 = ENABLE_3D_CANVAS;
+
+ENABLE_3D_RENDERING = $(ENABLE_3D_RENDERING_$(REAL_PLATFORM_NAME));
+ENABLE_3D_RENDERING_iphoneos = ENABLE_3D_RENDERING;
+ENABLE_3D_RENDERING_iphonesimulator = $(ENABLE_3D_RENDERING_iphoneos);
+ENABLE_3D_RENDERING_macosx = $(ENABLE_3D_RENDERING_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+ENABLE_3D_RENDERING_macosx_1050 = ENABLE_3D_RENDERING;
+ENABLE_3D_RENDERING_macosx_1060 = ENABLE_3D_RENDERING;
+ENABLE_3D_RENDERING_macosx_1070 = ENABLE_3D_RENDERING;
+
+ENABLE_BLOB = $(ENABLE_BLOB_$(REAL_PLATFORM_NAME));
+ENABLE_BLOB_macosx = ENABLE_BLOB;
+
+ENABLE_CHANNEL_MESSAGING = $(ENABLE_CHANNEL_MESSAGING_$(REAL_PLATFORM_NAME));
+ENABLE_CHANNEL_MESSAGING_macosx = ENABLE_CHANNEL_MESSAGING;
+
+ENABLE_CLIENT_BASED_GEOLOCATION = $(ENABLE_CLIENT_BASED_GEOLOCATION_$(REAL_PLATFORM_NAME));
+ENABLE_CLIENT_BASED_GEOLOCATION_macosx = ENABLE_CLIENT_BASED_GEOLOCATION;
-ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING;
-ENABLE_CLIENT_BASED_GEOLOCATION = ENABLE_CLIENT_BASED_GEOLOCATION;
ENABLE_DATABASE = ENABLE_DATABASE;
ENABLE_DATAGRID = ;
-ENABLE_DATALIST = ENABLE_DATALIST;
+
+ENABLE_DATALIST = $(ENABLE_DATALIST_$(REAL_PLATFORM_NAME));
+ENABLE_DATALIST_macosx = ENABLE_DATALIST;
+
+ENABLE_DEVICE_ORIENTATION = ;
+ENABLE_DIRECTORY_UPLOAD = ;
ENABLE_DOM_STORAGE = ENABLE_DOM_STORAGE;
ENABLE_EVENTSOURCE = ENABLE_EVENTSOURCE;
-ENABLE_FILTERS = ENABLE_FILTERS;
+
+ENABLE_FILTERS = $(ENABLE_FILTERS_$(REAL_PLATFORM_NAME));
+ENABLE_FILTERS_macosx = ENABLE_FILTERS;
+
+ENABLE_FILE_SYSTEM = ;
+ENABLE_FULLSCREEN_API = ENABLE_FULLSCREEN_API;
ENABLE_GEOLOCATION = ENABLE_GEOLOCATION;
-ENABLE_ICONDATABASE = ENABLE_ICONDATABASE;
+
+ENABLE_ICONDATABASE = $(ENABLE_ICONDATABASE_$(REAL_PLATFORM_NAME));
+ENABLE_ICONDATABASE_macosx = ENABLE_ICONDATABASE;
+
+ENABLE_IMAGE_RESIZER = ;
ENABLE_INDEXED_DATABASE = ;
+ENABLE_INPUT_SPEECH = ;
ENABLE_JAVASCRIPT_DEBUGGER = ENABLE_JAVASCRIPT_DEBUGGER;
-ENABLE_MATHML = ;
+ENABLE_MATHML = ENABLE_MATHML;
+ENABLE_METER_TAG = ENABLE_METER_TAG;
ENABLE_NOTIFICATIONS = ;
ENABLE_OFFLINE_WEB_APPLICATIONS = ENABLE_OFFLINE_WEB_APPLICATIONS;
-ENABLE_RUBY = ENABLE_RUBY;
-ENABLE_SHARED_WORKERS = ENABLE_SHARED_WORKERS;
+ENABLE_PROGRESS_TAG = ENABLE_PROGRESS_TAG;
+
+ENABLE_RUBY = $(ENABLE_RUBY_$(REAL_PLATFORM_NAME));
+ENABLE_RUBY_macosx = ENABLE_RUBY;
+
+ENABLE_SHARED_WORKERS = $(ENABLE_SHARED_WORKERS_$(REAL_PLATFORM_NAME));
+ENABLE_SHARED_WORKERS_macosx = ENABLE_SHARED_WORKERS;
+
ENABLE_SVG = ENABLE_SVG;
ENABLE_SVG_ANIMATION = ENABLE_SVG_ANIMATION;
ENABLE_SVG_AS_IMAGE = ENABLE_SVG_AS_IMAGE;
-ENABLE_SVG_DOM_OBJC_BINDINGS = ENABLE_SVG_DOM_OBJC_BINDINGS;
+
+ENABLE_SVG_DOM_OBJC_BINDINGS = $(ENABLE_SVG_DOM_OBJC_BINDINGS_$(REAL_PLATFORM_NAME));
+ENABLE_SVG_DOM_OBJC_BINDINGS_macosx = ENABLE_SVG_DOM_OBJC_BINDINGS;
+
ENABLE_SVG_FONTS = ENABLE_SVG_FONTS;
ENABLE_SVG_FOREIGN_OBJECT = ENABLE_SVG_FOREIGN_OBJECT;
ENABLE_SVG_USE = ENABLE_SVG_USE;
ENABLE_VIDEO = ENABLE_VIDEO;
-ENABLE_WEB_SOCKETS = ENABLE_WEB_SOCKETS;
+
+ENABLE_WEB_AUDIO = ;
+
+ENABLE_WEB_SOCKETS = $(ENABLE_WEB_SOCKETS_$(REAL_PLATFORM_NAME));
+ENABLE_WEB_SOCKETS_macosx = ENABLE_WEB_SOCKETS;
+
+ENABLE_WEB_TIMING = ;
ENABLE_WML = ;
-ENABLE_WORKERS = ENABLE_WORKERS;
+
+ENABLE_WORKERS = $(ENABLE_WORKERS_$(REAL_PLATFORM_NAME));
+ENABLE_WORKERS_macosx = ENABLE_WORKERS;
+
ENABLE_XHTMLMP = ;
ENABLE_XPATH = ENABLE_XPATH;
ENABLE_XSLT = ENABLE_XSLT;
-FEATURE_DEFINES = $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_RUBY) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_LINK_PREFETCH) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_SYSTEM) $(ENABLE_FULLSCREEN_API) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_IMAGE_RESIZER) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PROGRESS_TAG) $(ENABLE_RUBY) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
diff --git a/WebKit/mac/Configurations/Version.xcconfig b/WebKit/mac/Configurations/Version.xcconfig
index 0e289b1..56baf78 100644
--- a/WebKit/mac/Configurations/Version.xcconfig
+++ b/WebKit/mac/Configurations/Version.xcconfig
@@ -1,4 +1,4 @@
-// Copyright (C) 2009 Apple Inc. All rights reserved.
+// Copyright (C) 2009, 2010 Apple Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
@@ -21,8 +21,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-MAJOR_VERSION = 533;
-MINOR_VERSION = 1;
+MAJOR_VERSION = 534;
+MINOR_VERSION = 12;
TINY_VERSION = 0;
FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION);
@@ -31,12 +31,15 @@ BUNDLE_VERSION = $(BUNDLE_VERSION_$(CONFIGURATION));
SHORT_VERSION_STRING = $(SHORT_VERSION_STRING_$(CONFIGURATION))
// The system version prefix is based on the current system version.
-SYSTEM_VERSION_PREFIX = $(SYSTEM_VERSION_PREFIX_$(MAC_OS_X_VERSION_MAJOR));
-SYSTEM_VERSION_PREFIX_ = 4; // Some Tiger versions of Xcode don't set MAC_OS_X_VERSION_MAJOR.
-SYSTEM_VERSION_PREFIX_1040 = 4;
-SYSTEM_VERSION_PREFIX_1050 = 5;
-SYSTEM_VERSION_PREFIX_1060 = 6;
-SYSTEM_VERSION_PREFIX_1070 = 7;
+SYSTEM_VERSION_PREFIX = $(SYSTEM_VERSION_PREFIX_$(REAL_PLATFORM_NAME));
+SYSTEM_VERSION_PREFIX_iphoneos = 6; // iPhone OS is most like SnowLeopard currently.
+SYSTEM_VERSION_PREFIX_iphonesimulator = $(SYSTEM_VERSION_PREFIX_iphoneos);
+SYSTEM_VERSION_PREFIX_macosx = $(SYSTEM_VERSION_PREFIX_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+SYSTEM_VERSION_PREFIX_macosx_ = 4; // Some Tiger versions of Xcode don't set MAC_OS_X_VERSION_MAJOR.
+SYSTEM_VERSION_PREFIX_macosx_1040 = 4;
+SYSTEM_VERSION_PREFIX_macosx_1050 = 5;
+SYSTEM_VERSION_PREFIX_macosx_1060 = 6;
+SYSTEM_VERSION_PREFIX_macosx_1070 = 7;
// The production build always uses the full version with a system version prefix.
BUNDLE_VERSION_Production = $(SYSTEM_VERSION_PREFIX)$(FULL_VERSION);
diff --git a/WebKit/mac/Configurations/WebKit.xcconfig b/WebKit/mac/Configurations/WebKit.xcconfig
index b9dbc87..6b8ae6f 100644
--- a/WebKit/mac/Configurations/WebKit.xcconfig
+++ b/WebKit/mac/Configurations/WebKit.xcconfig
@@ -1,4 +1,4 @@
-// Copyright (C) 2009 Apple Inc. All rights reserved.
+// Copyright (C) 2009, 2010 Apple Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
@@ -24,26 +24,66 @@
#include "FeatureDefines.xcconfig"
#include "Version.xcconfig"
+EXCLUDED_SOURCE_FILE_NAMES = $(EXCLUDED_SOURCE_FILE_NAMES_$(REAL_PLATFORM_NAME));
+EXCLUDED_SOURCE_FILE_NAMES_iphoneos = *.nib *.tiff;
+EXCLUDED_SOURCE_FILE_NAMES_iphonesimulator = $(EXCLUDED_SOURCE_FILE_NAMES_iphoneos);
+
EXPORTED_SYMBOLS_FILE = $(EXPORTED_SYMBOLS_FILE_$(CURRENT_ARCH));
EXPORTED_SYMBOLS_FILE_ = mac/WebKit.exp;
+EXPORTED_SYMBOLS_FILE_armv5 = mac/WebKit.exp;
+EXPORTED_SYMBOLS_FILE_armv6 = mac/WebKit.exp;
+EXPORTED_SYMBOLS_FILE_armv7 = mac/WebKit.exp;
EXPORTED_SYMBOLS_FILE_i386 = mac/WebKit.exp;
EXPORTED_SYMBOLS_FILE_ppc = mac/WebKit.exp;
EXPORTED_SYMBOLS_FILE_ppc64 = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit/WebKit.LP64.exp;
EXPORTED_SYMBOLS_FILE_x86_64 = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit/WebKit.LP64.exp;
-FRAMEWORK_SEARCH_PATHS = $(UMBRELLA_FRAMEWORKS_DIR) $(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/Quartz.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks $(FRAMEWORK_SEARCH_PATHS);
+
+FRAMEWORK_SEARCH_PATHS = $(FRAMEWORK_SEARCH_PATHS_$(REAL_PLATFORM_NAME));
+FRAMEWORK_SEARCH_PATHS_iphoneos = $(FRAMEWORK_SEARCH_PATHS_iphoneos_$(CONFIGURATION));
+FRAMEWORK_SEARCH_PATHS_iphoneos_Debug = $(BUILT_PRODUCTS_DIR) $(PRODUCTION_FRAMEWORKS_DIR);
+FRAMEWORK_SEARCH_PATHS_iphoneos_Release = $(FRAMEWORK_SEARCH_PATHS_iphoneos_Debug);
+FRAMEWORK_SEARCH_PATHS_iphoneos_Production = $(PRODUCTION_FRAMEWORKS_DIR);
+FRAMEWORK_SEARCH_PATHS_iphonesimulator = $(FRAMEWORK_SEARCH_PATHS_iphoneos_$(CONFIGURATION));
+FRAMEWORK_SEARCH_PATHS_macosx = $(UMBRELLA_FRAMEWORKS_DIR) $(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/Quartz.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks $(FRAMEWORK_SEARCH_PATHS);
+
GCC_PREFIX_HEADER = mac/WebKitPrefix.h;
GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) $(FEATURE_DEFINES) FRAMEWORK_NAME=WebKit WEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST $(GCC_PREPROCESSOR_DEFINITIONS);
-HEADER_SEARCH_PATHS = $(WEBCORE_PRIVATE_HEADERS_DIR)/ForwardingHeaders $(WEBCORE_PRIVATE_HEADERS_DIR)/icu "${BUILT_PRODUCTS_DIR}/usr/local/include" "${BUILT_PRODUCTS_DIR}/DerivedSources/WebKit" $(HEADER_SEARCH_PATHS);
+HEADER_SEARCH_PATHS = $(WEBCORE_PRIVATE_HEADERS_DIR)/ForwardingHeaders $(WEBCORE_PRIVATE_HEADERS_DIR)/icu $(WEBKITSYSTEMINTERFACE_STATIC_LIBRARY_HEADERS_FOLDER_PATH) "${BUILT_PRODUCTS_DIR}/DerivedSources/WebKit" $(HEADER_SEARCH_PATHS);
INFOPLIST_FILE = mac/Info.plist;
-INSTALL_PATH = $(SYSTEM_LIBRARY_DIR)/Frameworks;
+INSTALL_PATH = $(INSTALL_PATH_$(REAL_PLATFORM_NAME));
+INSTALL_PATH_macosx = $(SYSTEM_LIBRARY_DIR)/Frameworks;
INSTALLHDRS_COPY_PHASE = YES;
INSTALLHDRS_SCRIPT_PHASE = YES;
PRODUCT_NAME = WebKit;
-UMBRELLA_FRAMEWORKS_DIR = $(NEXT_ROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Versions/A/Frameworks;
-OTHER_LDFLAGS = -sub_umbrella WebCore $(OTHER_LDFLAGS);
+UMBRELLA_FRAMEWORKS_DIR = $(PRODUCTION_FRAMEWORKS_DIR)/WebKit.framework/Versions/A/Frameworks;
+
+OTHER_LDFLAGS = $(OTHER_LDFLAGS_$(REAL_PLATFORM_NAME));
+OTHER_LDFLAGS_iphoneos = -lobjc -framework CFNetwork -framework CoreFoundation -framework CoreGraphics -framework Foundation -framework GraphicsServices -framework ImageIO -framework WebCore;
+OTHER_LDFLAGS_iphonesimulator = $(OTHER_LDFLAGS_iphoneos);
+OTHER_LDFLAGS_macosx = -sub_umbrella WebCore $(OTHER_LDFLAGS);
-WEBCORE_PRIVATE_HEADERS_DIR = $(WEBCORE_PRIVATE_HEADERS_DIR_$(REAL_PLATFORM_NAME)_$(CONFIGURATION));
-WEBCORE_PRIVATE_HEADERS_DIR_macosx_Release = $(WEBCORE_PRIVATE_HEADERS_engineering);
-WEBCORE_PRIVATE_HEADERS_DIR_macosx_Debug = $(WEBCORE_PRIVATE_HEADERS_engineering);
-WEBCORE_PRIVATE_HEADERS_DIR_macosx_Production = $(UMBRELLA_FRAMEWORKS_DIR)/WebCore.framework/PrivateHeaders;
+PRODUCTION_FRAMEWORKS_DIR = $(PRODUCTION_FRAMEWORKS_DIR_$(REAL_PLATFORM_NAME));
+PRODUCTION_FRAMEWORKS_DIR_iphoneos = $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
+PRODUCTION_FRAMEWORKS_DIR_iphonesimulator = $(PRODUCTION_FRAMEWORKS_DIR_iphoneos);
+PRODUCTION_FRAMEWORKS_DIR_macosx = $(NEXT_ROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks;
+
+PRODUCTION_ROOT = $(PRODUCTION_ROOT_$(REAL_PLATORM_NAME));
+PRODUCTION_ROOT_iphoneos = $(SDKROOT);
+PRODUCTION_ROOT_iphonesimulator = $(SDKROOT);
+PRODUCTION_ROOT_macosx = $(NEXT_ROOT);
+
+WEBCORE_PRIVATE_HEADERS_DIR = $(WEBCORE_PRIVATE_HEADERS_DIR_$(CONFIGURATION));
+WEBCORE_PRIVATE_HEADERS_DIR_Release = $(WEBCORE_PRIVATE_HEADERS_engineering);
+WEBCORE_PRIVATE_HEADERS_DIR_Debug = $(WEBCORE_PRIVATE_HEADERS_engineering);
+WEBCORE_PRIVATE_HEADERS_DIR_Production = $(WEBCORE_PRIVATE_HEADERS_DIR_Production_$(REAL_PLATFORM_NAME));
+WEBCORE_PRIVATE_HEADERS_DIR_Production_iphoneos = $(PRODUCTION_FRAMEWORKS_DIR)/WebCore.framework/PrivateHeaders;
+WEBCORE_PRIVATE_HEADERS_DIR_Production_iphonesimulator = $(WEBCORE_PRIVATE_HEADERS_DIR_Production_iphoneos);
+WEBCORE_PRIVATE_HEADERS_DIR_Production_macosx = $(UMBRELLA_FRAMEWORKS_DIR)/WebCore.framework/PrivateHeaders;
WEBCORE_PRIVATE_HEADERS_engineering = $(BUILT_PRODUCTS_DIR)/WebCore.framework/PrivateHeaders;
+
+WEBKITSYSTEMINTERFACE_STATIC_LIBRARY_HEADERS_FOLDER_PATH = $(WEBKITSYSTEMINTERFACE_STATIC_LIBRARY_HEADERS_FOLDER_PATH_$(CONFIGURATION));
+WEBKITSYSTEMINTERFACE_STATIC_LIBRARY_HEADERS_FOLDER_PATH_Debug = $(WEBKITSYSTEMINTERFACE_STATIC_LIBRARY_HEADERS_FOLDER_PATH_engineering);
+WEBKITSYSTEMINTERFACE_STATIC_LIBRARY_HEADERS_FOLDER_PATH_Release = $(WEBKITSYSTEMINTERFACE_STATIC_LIBRARY_HEADERS_FOLDER_PATH_engineering);
+WEBKITSYSTEMINTERFACE_STATIC_LIBRARY_HEADERS_FOLDER_PATH_Production = $(PRODUCTION_ROOT)/usr/local/include;
+WEBKITSYSTEMINTERFACE_STATIC_LIBRARY_HEADERS_FOLDER_PATH_engineering = $(BUILT_PRODUCTS_DIR)/usr/local/include;
+
diff --git a/WebKit/mac/DOM/WebDOMOperations.mm b/WebKit/mac/DOM/WebDOMOperations.mm
index 2bda67a..5e09308 100644
--- a/WebKit/mac/DOM/WebDOMOperations.mm
+++ b/WebKit/mac/DOM/WebDOMOperations.mm
@@ -29,6 +29,7 @@
#import "WebDOMOperationsPrivate.h"
#import "DOMDocumentInternal.h"
+#import "DOMElementInternal.h"
#import "DOMNodeInternal.h"
#import "DOMRangeInternal.h"
#import "WebArchiveInternal.h"
@@ -36,15 +37,42 @@
#import "WebFrameInternal.h"
#import "WebFramePrivate.h"
#import "WebKitNSStringExtras.h"
-#import <WebCore/CSSHelper.h>
+#import <JavaScriptCore/APICast.h>
#import <WebCore/Document.h>
+#import <WebCore/HTMLParserIdioms.h>
+#import <WebCore/JSElement.h>
#import <WebCore/LegacyWebArchive.h>
#import <WebCore/markup.h>
+#import <WebCore/RenderTreeAsText.h>
#import <WebKit/DOMExtensions.h>
#import <WebKit/DOMHTML.h>
+#import <runtime/JSLock.h>
+#import <runtime/JSValue.h>
#import <wtf/Assertions.h>
using namespace WebCore;
+using namespace JSC;
+
+@implementation DOMElement (WebDOMElementOperationsPrivate)
+
++ (DOMElement *)_DOMElementFromJSContext:(JSContextRef)context value:(JSValueRef)value
+{
+ if (!context)
+ return 0;
+
+ if (!value)
+ return 0;
+
+ JSLock lock(SilenceAssertionsOnly);
+ return kit(toElement(toJS(toJS(context), value)));
+}
+
+- (NSString *)_markerTextForListItem
+{
+ return WebCore::markerTextForListItem(core(self));
+}
+
+@end
@implementation DOMNode (WebDOMNodeOperations)
@@ -53,11 +81,20 @@ using namespace WebCore;
return [[[WebArchive alloc] _initWithCoreLegacyWebArchive:LegacyWebArchive::create(core(self))] autorelease];
}
+@end
+
+@implementation DOMNode (WebDOMNodeOperationsPendingPublic)
+
- (NSString *)markupString
{
return createFullMarkup(core(self));
}
+- (NSRect)_renderRect:(bool *)isReplaced
+{
+ return NSRect(core(self)->renderRect(isReplaced));
+}
+
@end
/* This doesn't appear to be used by anyone. We should consider removing this. */
@@ -84,8 +121,7 @@ using namespace WebCore;
- (WebFrame *)webFrame
{
- Document* document = core(self);
- Frame* frame = document->frame();
+ Frame* frame = core(self)->frame();
if (!frame)
return nil;
return kit(frame);
@@ -93,25 +129,21 @@ using namespace WebCore;
- (NSURL *)URLWithAttributeString:(NSString *)string
{
- // FIXME: Is deprecatedParseURL appropriate here?
- return core(self)->completeURL(deprecatedParseURL(string));
+ return core(self)->completeURL(stripLeadingAndTrailingHTMLSpaces(string));
}
@end
@implementation DOMDocument (WebDOMDocumentOperationsInternal)
-/* This doesn't appear to be used by anyone. We should consider removing this. */
-- (DOMRange *)_createRangeWithNode:(DOMNode *)node
+- (DOMRange *)_documentRange
{
DOMRange *range = [self createRange];
- [range selectNode:node];
- return range;
-}
-- (DOMRange *)_documentRange
-{
- return [self _createRangeWithNode:[self documentElement]];
+ if (DOMNode* documentElement = [self documentElement])
+ [range selectNode:documentElement];
+
+ return range;
}
@end
diff --git a/WebKit/mac/DOM/WebDOMOperationsPrivate.h b/WebKit/mac/DOM/WebDOMOperationsPrivate.h
index 013a687..1c22e82 100644
--- a/WebKit/mac/DOM/WebDOMOperationsPrivate.h
+++ b/WebKit/mac/DOM/WebDOMOperationsPrivate.h
@@ -27,6 +27,12 @@
*/
#import <WebKit/WebDOMOperations.h>
+#import <JavaScriptCore/JSBase.h>
+
+@interface DOMElement (WebDOMElementOperationsPrivate)
++ (DOMElement *)_DOMElementFromJSContext:(JSContextRef)context value:(JSValueRef)value;
+- (NSString *)_markerTextForListItem;
+@end
@interface DOMDocument (WebDOMDocumentOperationsPrivate)
- (NSArray *)_focusableNodes;
@@ -34,4 +40,5 @@
@interface DOMNode (WebDOMNodeOperationsPendingPublic)
- (NSString *)markupString;
+- (NSRect)_renderRect:(bool *)isReplaced;
@end
diff --git a/WebKit/mac/DefaultDelegates/WebDefaultPolicyDelegate.m b/WebKit/mac/DefaultDelegates/WebDefaultPolicyDelegate.m
index 6de2792..bad87d5 100644
--- a/WebKit/mac/DefaultDelegates/WebDefaultPolicyDelegate.m
+++ b/WebKit/mac/DefaultDelegates/WebDefaultPolicyDelegate.m
@@ -60,7 +60,7 @@ static WebDefaultPolicyDelegate *sharedDelegate = nil;
- (void)webView: (WebView *)wv decidePolicyForMIMEType:(NSString *)type
request:(NSURLRequest *)request
frame:(WebFrame *)frame
- decisionListener:(id <WebPolicyDecisionListener>)listener;
+ decisionListener:(id <WebPolicyDecisionListener>)listener
{
if ([[request URL] isFileURL]) {
BOOL isDirectory = NO;
diff --git a/WebKit/mac/DefaultDelegates/WebDefaultUIDelegate.m b/WebKit/mac/DefaultDelegates/WebDefaultUIDelegate.m
index 68fa05e..a327fd4 100644
--- a/WebKit/mac/DefaultDelegates/WebDefaultUIDelegate.m
+++ b/WebKit/mac/DefaultDelegates/WebDefaultUIDelegate.m
@@ -227,6 +227,10 @@ static WebDefaultUIDelegate *sharedDelegate = nil;
{
}
+- (void)webView:(WebView *)sender exceededApplicationCacheOriginQuotaForSecurityOrigin:(WebSecurityOrigin *)origin
+{
+}
+
- (BOOL)webView:(WebView *)sender shouldReplaceUploadFile:(NSString *)path usingGeneratedFilename:(NSString **)filename
{
return NO;
diff --git a/WebKit/mac/ForwardingHeaders/runtime/Error.h b/WebKit/mac/ForwardingHeaders/runtime/Error.h
new file mode 100644
index 0000000..05d7752
--- /dev/null
+++ b/WebKit/mac/ForwardingHeaders/runtime/Error.h
@@ -0,0 +1 @@
+#import <JavaScriptCore/Error.h>
diff --git a/WebKit/mac/History/WebBackForwardList.mm b/WebKit/mac/History/WebBackForwardList.mm
index f206fda..e794c2f 100644
--- a/WebKit/mac/History/WebBackForwardList.mm
+++ b/WebKit/mac/History/WebBackForwardList.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2007 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -38,7 +38,7 @@
#import "WebPreferencesPrivate.h"
#import "WebTypesInternal.h"
#import "WebViewPrivate.h"
-#import <WebCore/BackForwardList.h>
+#import <WebCore/BackForwardListImpl.h>
#import <WebCore/HistoryItem.h>
#import <WebCore/Page.h>
#import <WebCore/PageCache.h>
@@ -49,11 +49,14 @@
#import <wtf/Assertions.h>
#import <wtf/RetainPtr.h>
#import <wtf/StdLibExtras.h>
+#import <wtf/Threading.h>
using namespace WebCore;
-typedef HashMap<BackForwardList*, WebBackForwardList*> BackForwardListMap;
+typedef HashMap<BackForwardListImpl*, WebBackForwardList*> BackForwardListMap;
+// FIXME: Instead of this we could just create a class derived from BackForwardListImpl
+// with a pointer to a WebBackForwardList in it.
static BackForwardListMap& backForwardLists()
{
DEFINE_STATIC_LOCAL(BackForwardListMap, staticBackForwardLists, ());
@@ -62,15 +65,15 @@ static BackForwardListMap& backForwardLists()
@implementation WebBackForwardList (WebBackForwardListInternal)
-BackForwardList* core(WebBackForwardList *webBackForwardList)
+BackForwardListImpl* core(WebBackForwardList *webBackForwardList)
{
if (!webBackForwardList)
return 0;
- return reinterpret_cast<BackForwardList*>(webBackForwardList->_private);
+ return reinterpret_cast<BackForwardListImpl*>(webBackForwardList->_private);
}
-WebBackForwardList *kit(BackForwardList* backForwardList)
+WebBackForwardList *kit(BackForwardListImpl* backForwardList)
{
if (!backForwardList)
return nil;
@@ -81,7 +84,7 @@ WebBackForwardList *kit(BackForwardList* backForwardList)
return [[[WebBackForwardList alloc] initWithBackForwardList:backForwardList] autorelease];
}
-- (id)initWithBackForwardList:(PassRefPtr<BackForwardList>)backForwardList
+- (id)initWithBackForwardList:(PassRefPtr<BackForwardListImpl>)backForwardList
{
WebCoreThreadViolationCheckRoundOne();
self = [super init];
@@ -100,6 +103,7 @@ WebBackForwardList *kit(BackForwardList* backForwardList)
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
@@ -107,7 +111,7 @@ WebBackForwardList *kit(BackForwardList* backForwardList)
- (id)init
{
- return [self initWithBackForwardList:BackForwardList::create(0)];
+ return [self initWithBackForwardList:BackForwardListImpl::create(0)];
}
- (void)dealloc
@@ -115,7 +119,7 @@ WebBackForwardList *kit(BackForwardList* backForwardList)
if (WebCoreObjCScheduleDeallocateOnMainThread([WebBackForwardList class], self))
return;
- BackForwardList* backForwardList = core(self);
+ BackForwardListImpl* backForwardList = core(self);
ASSERT(backForwardList);
if (backForwardList) {
ASSERT(backForwardList->closed());
@@ -129,7 +133,7 @@ WebBackForwardList *kit(BackForwardList* backForwardList)
- (void)finalize
{
WebCoreThreadViolationCheckRoundOne();
- BackForwardList* backForwardList = core(self);
+ BackForwardListImpl* backForwardList = core(self);
ASSERT(backForwardList);
if (backForwardList) {
ASSERT(backForwardList->closed());
@@ -263,7 +267,7 @@ static bool bumperCarBackForwardHackNeeded()
[result appendString:@"\n--------------------------------------------\n"];
[result appendString:@"WebBackForwardList:\n"];
- BackForwardList* backForwardList = core(self);
+ BackForwardListImpl* backForwardList = core(self);
HistoryItemVector& entries = backForwardList->entries();
unsigned size = entries.size();
diff --git a/WebKit/mac/History/WebBackForwardListInternal.h b/WebKit/mac/History/WebBackForwardListInternal.h
index 3448647..1afb833 100644
--- a/WebKit/mac/History/WebBackForwardListInternal.h
+++ b/WebKit/mac/History/WebBackForwardListInternal.h
@@ -30,12 +30,12 @@
#import <wtf/PassRefPtr.h>
namespace WebCore {
- class BackForwardList;
+ class BackForwardListImpl;
}
-WebCore::BackForwardList* core(WebBackForwardList *);
-WebBackForwardList *kit(WebCore::BackForwardList*);
+WebCore::BackForwardListImpl* core(WebBackForwardList *);
+WebBackForwardList *kit(WebCore::BackForwardListImpl*);
@interface WebBackForwardList (WebBackForwardListInternal)
-- (id)initWithBackForwardList:(PassRefPtr<WebCore::BackForwardList>)backForwardList;
+- (id)initWithBackForwardList:(PassRefPtr<WebCore::BackForwardListImpl>)backForwardList;
@end
diff --git a/WebKit/mac/History/WebHistoryItem.mm b/WebKit/mac/History/WebHistoryItem.mm
index 91bc610..48baa7c 100644
--- a/WebKit/mac/History/WebHistoryItem.mm
+++ b/WebKit/mac/History/WebHistoryItem.mm
@@ -53,6 +53,7 @@
#import <runtime/InitializeThreading.h>
#import <wtf/Assertions.h>
#import <wtf/StdLibExtras.h>
+#import <wtf/Threading.h>
// Private keys used in the WebHistoryItem's dictionary representation.
// see 3245793 for explanation of "lastVisitedDate"
@@ -95,6 +96,7 @@ void WKNotifyHistoryItemChanged(HistoryItem*)
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
diff --git a/WebKit/mac/MigrateHeaders.make b/WebKit/mac/MigrateHeaders.make
index f4bf744..d674d4d 100644
--- a/WebKit/mac/MigrateHeaders.make
+++ b/WebKit/mac/MigrateHeaders.make
@@ -180,11 +180,11 @@ all : \
$(PUBLIC_HEADERS_DIR)/DOMXPathExpression.h \
$(PUBLIC_HEADERS_DIR)/DOMXPathNSResolver.h \
$(PUBLIC_HEADERS_DIR)/DOMXPathResult.h \
- $(PRIVATE_HEADERS_DIR)/WebDashboardRegion.h \
$(PUBLIC_HEADERS_DIR)/WebScriptObject.h \
$(PUBLIC_HEADERS_DIR)/npapi.h \
$(PUBLIC_HEADERS_DIR)/npfunctions.h \
$(PUBLIC_HEADERS_DIR)/npruntime.h \
+ $(PUBLIC_HEADERS_DIR)/nptypes.h \
#
ifeq ($(findstring ENABLE_SVG_DOM_OBJC_BINDINGS,$(FEATURE_DEFINES)), ENABLE_SVG_DOM_OBJC_BINDINGS)
@@ -222,7 +222,6 @@ all : \
$(PRIVATE_HEADERS_DIR)/DOMSVGAnimatedNumberList.h \
$(INTERNAL_HEADERS_DIR)/DOMSVGAnimatedNumberListInternal.h \
$(PRIVATE_HEADERS_DIR)/DOMSVGAnimatedPathData.h \
- $(PRIVATE_HEADERS_DIR)/DOMSVGAnimatedPoints.h \
$(PRIVATE_HEADERS_DIR)/DOMSVGAnimatedPreserveAspectRatio.h \
$(INTERNAL_HEADERS_DIR)/DOMSVGAnimatedPreserveAspectRatioInternal.h \
$(PRIVATE_HEADERS_DIR)/DOMSVGAnimatedRect.h \
@@ -267,6 +266,8 @@ all : \
$(INTERNAL_HEADERS_DIR)/DOMSVGFEComponentTransferElementInternal.h \
$(PRIVATE_HEADERS_DIR)/DOMSVGFECompositeElement.h \
$(INTERNAL_HEADERS_DIR)/DOMSVGFECompositeElementInternal.h \
+ $(PRIVATE_HEADERS_DIR)/DOMSVGFEConvolveMatrixElement.h \
+ $(INTERNAL_HEADERS_DIR)/DOMSVGFEConvolveMatrixElementInternal.h \
$(PRIVATE_HEADERS_DIR)/DOMSVGFEDiffuseLightingElement.h \
$(INTERNAL_HEADERS_DIR)/DOMSVGFEDiffuseLightingElementInternal.h \
$(PRIVATE_HEADERS_DIR)/DOMSVGFEDisplacementMapElement.h \
@@ -291,6 +292,8 @@ all : \
$(INTERNAL_HEADERS_DIR)/DOMSVGFEMergeElementInternal.h \
$(PRIVATE_HEADERS_DIR)/DOMSVGFEMergeNodeElement.h \
$(INTERNAL_HEADERS_DIR)/DOMSVGFEMergeNodeElementInternal.h \
+ $(PRIVATE_HEADERS_DIR)/DOMSVGFEMorphologyElement.h \
+ $(INTERNAL_HEADERS_DIR)/DOMSVGFEMorphologyElementInternal.h \
$(PRIVATE_HEADERS_DIR)/DOMSVGFEOffsetElement.h \
$(INTERNAL_HEADERS_DIR)/DOMSVGFEOffsetElementInternal.h \
$(PRIVATE_HEADERS_DIR)/DOMSVGFEPointLightElement.h \
diff --git a/WebKit/mac/Misc/MailQuirksUserScript.js b/WebKit/mac/Misc/MailQuirksUserScript.js
new file mode 100644
index 0000000..e36c21b
--- /dev/null
+++ b/WebKit/mac/Misc/MailQuirksUserScript.js
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+(function() {
+ function childrenBefore(parent, stopAt)
+ {
+ var children = [];
+ for (var child = parent.firstChild; child != stopAt; child = child.nextSibling)
+ children.push(child);
+ return children;
+ }
+
+ // If html or body is missing, Mail.app's assumption that
+ // document.firstChild.firstChild == document.body is wrong anyway,
+ // so return null to not move anything.
+ if (!document.documentElement || !document.body)
+ return;
+
+ var children = childrenBefore(document, document.documentElement);
+ children = children.concat(childrenBefore(document.documentElement, document.body));
+
+ for (var i = children.length - 1; i >= 0; i--) {
+ var child = children[i];
+ // It's not possible to move doctype nodes into the body, so just remove them.
+ if (child.nodeType == child.DOCUMENT_TYPE_NODE)
+ child.parentNode.removeChild(child);
+ else
+ document.body.insertBefore(child, document.body.firstChild);
+ }
+})();
diff --git a/WebKit/mac/Misc/QuickDrawCompatibility.h b/WebKit/mac/Misc/QuickDrawCompatibility.h
new file mode 100644
index 0000000..1a4ff99
--- /dev/null
+++ b/WebKit/mac/Misc/QuickDrawCompatibility.h
@@ -0,0 +1,96 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef QuickDrawCompatibility_h
+#define QuickDrawCompatibility_h
+
+#ifndef __LP64__
+
+#import <Carbon/Carbon.h>
+
+#if defined(QD_HEADERS_ARE_PRIVATE) && QD_HEADERS_ARE_PRIVATE
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define MacSetRect SetRect
+#define MacSetRectRgn SetRectRgn
+#define MacUnionRgn UnionRgn
+
+extern Boolean EmptyRgn(RgnHandle);
+extern OSStatus CreateCGContextForPort(CGrafPtr, CGContextRef*);
+extern OSStatus SyncCGContextOriginWithPort(CGContextRef, CGrafPtr);
+extern PixMapHandle GetPortPixMap(CGrafPtr);
+extern QDErr NewGWorldFromPtr(GWorldPtr*, UInt32, const Rect*, CTabHandle, GDHandle, GWorldFlags, Ptr, SInt32);
+extern Rect* GetPortBounds(CGrafPtr, Rect*);
+extern Rect* GetRegionBounds(RgnHandle, Rect*);
+extern RgnHandle GetPortClipRegion(CGrafPtr, RgnHandle);
+extern RgnHandle GetPortVisibleRegion(CGrafPtr, RgnHandle);
+extern RgnHandle NewRgn();
+extern void BackColor(long);
+extern void DisposeGWorld(GWorldPtr);
+extern void DisposeRgn(RgnHandle);
+extern void ForeColor(long);
+extern void GetGWorld(CGrafPtr*, GDHandle*);
+extern void GetPort(GrafPtr*);
+extern void GlobalToLocal(Point*);
+extern void MacSetRect(Rect*, short, short, short, short);
+extern void MacSetRectRgn(RgnHandle, short, short, short, short);
+extern void MacUnionRgn(RgnHandle, RgnHandle, RgnHandle);
+extern void MovePortTo(short, short);
+extern void OffsetRect(Rect*, short, short);
+extern void OffsetRgn(RgnHandle, short, short);
+extern void PaintRect(const Rect*);
+extern void PenNormal();
+extern void PortSize(short, short);
+extern void RectRgn(RgnHandle, const Rect*);
+extern void SectRgn(RgnHandle, RgnHandle, RgnHandle);
+extern void SetGWorld(CGrafPtr, GDHandle);
+extern void SetOrigin(short, short);
+extern void SetPort(GrafPtr);
+extern void SetPortClipRegion(CGrafPtr, RgnHandle);
+extern void SetPortVisibleRegion(CGrafPtr, RgnHandle);
+
+enum {
+ k16BE555PixelFormat = 0x00000010,
+ k32ARGBPixelFormat = 0x00000020,
+ k16LE555PixelFormat = 'L555',
+ k32BGRAPixelFormat = 'BGRA',
+
+ blackColor = 33,
+ whiteColor = 30,
+ greenColor = 341,
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // defined(QD_HEADERS_ARE_PRIVATE) && QD_HEADERS_ARE_PRIVATE
+
+#endif // __LP64__
+
+#endif // QuickDrawCompatibility_h
diff --git a/WebKit/mac/Misc/WebCache.mm b/WebKit/mac/Misc/WebCache.mm
index b29f720..0517bc4 100644
--- a/WebKit/mac/Misc/WebCache.mm
+++ b/WebKit/mac/Misc/WebCache.mm
@@ -25,12 +25,13 @@
#import "WebCache.h"
+#import "WebNSObjectExtras.h"
#import "WebPreferences.h"
#import "WebSystemInterface.h"
#import "WebView.h"
#import "WebViewInternal.h"
#import <WebCore/ApplicationCacheStorage.h>
-#import <WebCore/Cache.h>
+#import <WebCore/MemoryCache.h>
#import <WebCore/CrossOriginPreflightResultCache.h>
@implementation WebCache
@@ -42,7 +43,7 @@
+ (NSArray *)statistics
{
- WebCore::Cache::Statistics s = WebCore::cache()->getStatistics();
+ WebCore::MemoryCache::Statistics s = WebCore::cache()->getStatistics();
return [NSArray arrayWithObjects:
[NSDictionary dictionaryWithObjectsAndKeys:
@@ -126,6 +127,9 @@
+ (void)setDisabled:(BOOL)disabled
{
+ if (!pthread_main_np())
+ return [[self _webkit_invokeOnMainThread] setDisabled:disabled];
+
WebCore::cache()->setDisabled(disabled);
}
diff --git a/WebKit/mac/Misc/WebCoreStatistics.h b/WebKit/mac/Misc/WebCoreStatistics.h
index d205083..1565c26 100644
--- a/WebKit/mac/Misc/WebCoreStatistics.h
+++ b/WebKit/mac/Misc/WebCoreStatistics.h
@@ -83,8 +83,12 @@
@end
@interface WebFrame (WebKitDebug)
-- (NSString *)renderTreeAsExternalRepresentation;
+- (NSString *)renderTreeAsExternalRepresentationForPrinting:(BOOL)forPrinting;
- (NSString *)counterValueForElement:(DOMElement*)element;
- (int)pageNumberForElement:(DOMElement*)element:(float)pageWidthInPixels:(float)pageHeightInPixels;
- (int)numberOfPages:(float)pageWidthInPixels:(float)pageHeightInPixels;
+- (NSString *)pageProperty:(const char*)propertyName:(int)pageNumber;
+- (bool)isPageBoxVisible:(int)pageNumber;
+- (NSString *)pageSizeAndMarginsInPixels:(int)pageNumber:(int)width:(int)height:(int)marginTop:(int)marginRight:(int)marginBottom:(int)marginLeft;
+- (void)printToCGContext:(CGContextRef)cgContext:(float)pageWidthInPixels:(float)pageHeightInPixels;
@end
diff --git a/WebKit/mac/Misc/WebCoreStatistics.mm b/WebKit/mac/Misc/WebCoreStatistics.mm
index 9e8ae05..5b5a1bc 100644
--- a/WebKit/mac/Misc/WebCoreStatistics.mm
+++ b/WebKit/mac/Misc/WebCoreStatistics.mm
@@ -31,12 +31,14 @@
#import "DOMElementInternal.h"
#import "WebCache.h"
#import "WebFrameInternal.h"
-#import <runtime/JSLock.h>
+#import <JavaScriptCore/JSLock.h>
+#import <JavaScriptCore/MemoryStatistics.h>
#import <WebCore/Console.h>
#import <WebCore/FontCache.h>
#import <WebCore/Frame.h>
#import <WebCore/GCController.h>
#import <WebCore/GlyphPageTreeNode.h>
+#import <WebCore/GraphicsContext.h>
#import <WebCore/IconDatabase.h>
#import <WebCore/JSDOMWindow.h>
#import <WebCore/PageCache.h>
@@ -193,15 +195,19 @@ using namespace WebCore;
+ (NSDictionary *)memoryStatistics
{
WTF::FastMallocStatistics fastMallocStatistics = WTF::fastMallocStatistics();
+
JSLock lock(SilenceAssertionsOnly);
- Heap::Statistics jsHeapStatistics = JSDOMWindow::commonJSGlobalData()->heap.statistics();
+ Heap::Statistics heapMemoryStats = heapStatistics(JSDOMWindow::commonJSGlobalData());
+ GlobalMemoryStatistics globalMemoryStats = globalMemoryStatistics();
+
return [NSDictionary dictionaryWithObjectsAndKeys:
- [NSNumber numberWithInt:fastMallocStatistics.heapSize], @"FastMallocHeapSize",
- [NSNumber numberWithInt:fastMallocStatistics.freeSizeInHeap], @"FastMallocFreeSizeInHeap",
- [NSNumber numberWithInt:fastMallocStatistics.freeSizeInCaches], @"FastMallocFreeSizeInCaches",
- [NSNumber numberWithInt:fastMallocStatistics.returnedSize], @"FastMallocReturnedSize",
- [NSNumber numberWithInt:jsHeapStatistics.size], @"JavaScriptHeapSize",
- [NSNumber numberWithInt:jsHeapStatistics.free], @"JavaScriptFreeSize",
+ [NSNumber numberWithInt:fastMallocStatistics.reservedVMBytes], @"FastMallocReservedVMBytes",
+ [NSNumber numberWithInt:fastMallocStatistics.committedVMBytes], @"FastMallocCommittedVMBytes",
+ [NSNumber numberWithInt:fastMallocStatistics.freeListBytes], @"FastMallocFreeListBytes",
+ [NSNumber numberWithInt:heapMemoryStats.size], @"JavaScriptHeapSize",
+ [NSNumber numberWithInt:heapMemoryStats.free], @"JavaScriptFreeSize",
+ [NSNumber numberWithUnsignedInt:(unsigned int)globalMemoryStats.stackBytes], @"JavaScriptStackSize",
+ [NSNumber numberWithUnsignedInt:(unsigned int)globalMemoryStats.JITBytes], @"JavaScriptJITSize",
nil];
}
@@ -256,9 +262,9 @@ using namespace WebCore;
@implementation WebFrame (WebKitDebug)
-- (NSString *)renderTreeAsExternalRepresentation
+- (NSString *)renderTreeAsExternalRepresentationForPrinting:(BOOL)forPrinting
{
- return externalRepresentation(_private->coreFrame);
+ return externalRepresentation(_private->coreFrame, forPrinting ? RenderAsTextPrintingMode : RenderAsTextBehaviorNormal);
}
- (NSString *)counterValueForElement:(DOMElement*)element
@@ -276,4 +282,29 @@ using namespace WebCore;
return PrintContext::numberOfPages(_private->coreFrame, FloatSize(pageWidthInPixels, pageHeightInPixels));
}
+- (NSString *)pageProperty:(const char *)propertyName:(int)pageNumber
+{
+ return PrintContext::pageProperty(_private->coreFrame, propertyName, pageNumber);
+}
+
+- (bool)isPageBoxVisible:(int)pageNumber
+{
+ return PrintContext::isPageBoxVisible(_private->coreFrame, pageNumber);
+}
+
+- (NSString *)pageSizeAndMarginsInPixels:(int)pageNumber:(int)width:(int)height:(int)marginTop:(int)marginRight:(int)marginBottom:(int)marginLeft
+{
+ return PrintContext::pageSizeAndMarginsInPixels(_private->coreFrame, pageNumber, width, height, marginTop, marginRight, marginBottom, marginLeft);
+}
+
+- (void)printToCGContext:(CGContextRef)cgContext:(float)pageWidthInPixels:(float)pageHeightInPixels
+{
+ Frame* coreFrame = _private->coreFrame;
+ if (!coreFrame)
+ return;
+
+ GraphicsContext graphicsContext(cgContext);
+ PrintContext::spoolAllPagesWithBoundaries(coreFrame, graphicsContext, FloatSize(pageWidthInPixels, pageHeightInPixels));
+}
+
@end
diff --git a/WebKit/mac/Misc/WebDownload.mm b/WebKit/mac/Misc/WebDownload.mm
index 01ed767..a4d919a 100644
--- a/WebKit/mac/Misc/WebDownload.mm
+++ b/WebKit/mac/Misc/WebDownload.mm
@@ -56,7 +56,7 @@ using namespace WebCore;
directory:(NSString *)directory;
@end
-@interface WebDownloadInternal : NSObject
+@interface WebDownloadInternal : NSObject <NSURLDownloadDelegate>
{
@public
id realDelegate;
@@ -219,7 +219,7 @@ using namespace WebCore;
[super dealloc];
}
-- (id)initWithRequest:(NSURLRequest *)request delegate:(id)delegate
+- (id)initWithRequest:(NSURLRequest *)request delegate:(id<NSURLDownloadDelegate>)delegate
{
[self _setRealDelegate:delegate];
return [super initWithRequest:request delegate:_webInternal];
diff --git a/WebKit/mac/Misc/WebElementDictionary.mm b/WebKit/mac/Misc/WebElementDictionary.mm
index 7779392..71c4cc7 100644
--- a/WebKit/mac/Misc/WebElementDictionary.mm
+++ b/WebKit/mac/Misc/WebElementDictionary.mm
@@ -43,6 +43,7 @@
#import <WebKit/DOMCore.h>
#import <WebKit/DOMExtensions.h>
#import <runtime/InitializeThreading.h>
+#import <wtf/Threading.h>
using namespace WebCore;
@@ -64,6 +65,7 @@ static void cacheValueForKey(const void *key, const void *value, void *self)
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
@@ -83,6 +85,7 @@ static void cacheValueForKey(const void *key, const void *value, void *self)
addLookupKey(WebElementImageRectKey, @selector(_imageRect));
addLookupKey(WebElementImageURLKey, @selector(_absoluteImageURL));
addLookupKey(WebElementIsSelectedKey, @selector(_isSelected));
+ addLookupKey(WebElementMediaURLKey, @selector(_absoluteMediaURL));
addLookupKey(WebElementSpellingToolTipKey, @selector(_spellingToolTip));
addLookupKey(WebElementTitleKey, @selector(_title));
addLookupKey(WebElementLinkURLKey, @selector(_absoluteLinkURL));
@@ -214,6 +217,11 @@ static NSString* NSStringOrNil(String coreString)
return _result->absoluteImageURL();
}
+- (NSURL *)_absoluteMediaURL
+{
+ return _result->absoluteMediaURL();
+}
+
- (NSNumber *)_isSelected
{
return [NSNumber numberWithBool:_result->isSelected()];
diff --git a/WebKit/mac/Misc/WebIconDatabase.mm b/WebKit/mac/Misc/WebIconDatabase.mm
index 62c8e2f..7d0a350 100644
--- a/WebKit/mac/Misc/WebIconDatabase.mm
+++ b/WebKit/mac/Misc/WebIconDatabase.mm
@@ -40,7 +40,10 @@
#import <WebCore/IconDatabase.h>
#import <WebCore/Image.h>
#import <WebCore/IntSize.h>
+#import <WebCore/SharedBuffer.h>
#import <WebCore/ThreadCheck.h>
+#import <runtime/InitializeThreading.h>
+#import <wtf/Threading.h>
using namespace WebCore;
@@ -87,6 +90,12 @@ static WebIconDatabaseClient* defaultClient()
@implementation WebIconDatabase
++ (void)initialize
+{
+ JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
+}
+
+ (WebIconDatabase *)sharedIconDatabase
{
static WebIconDatabase *database = nil;
@@ -95,7 +104,7 @@ static WebIconDatabaseClient* defaultClient()
return database;
}
-- init
+- (id)init
{
[super init];
WebCoreThreadViolationCheckRoundOne();
diff --git a/WebKit/mac/Misc/WebIconFetcher.mm b/WebKit/mac/Misc/WebIconFetcher.mm
deleted file mode 100644
index a31ab7d..0000000
--- a/WebKit/mac/Misc/WebIconFetcher.mm
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "WebIconFetcher.h"
-
-#import "WebFrameInternal.h"
-#import "WebIconFetcherInternal.h"
-
-#import <WebCore/Frame.h>
-#import <WebCore/IconFetcher.h>
-#import <WebCore/SharedBuffer.h>
-#import <wtf/PassRefPtr.h>
-
-using namespace WebCore;
-
-class WebIconFetcherClient : public IconFetcherClient {
-public:
- WebIconFetcherClient(id target, SEL selector)
- : m_target(target)
- , m_selector(selector)
- {
- }
-
- virtual void finishedFetchingIcon(PassRefPtr<SharedBuffer> iconData)
- {
- RetainPtr<NSData> data;
- if (iconData)
- data = iconData->createNSData();
-
- [m_target performSelector:m_selector withObject:m_fetcher.get() withObject:data.get()];
-
- delete this;
- }
-
- void setFetcher(WebIconFetcher *fetcher) { m_fetcher = fetcher; }
-
-private:
- RetainPtr<WebIconFetcher> m_fetcher;
- id m_target;
- SEL m_selector;
-};
-
-@implementation WebIconFetcher
-
-- (id)init
-{
- return nil;
-}
-
-- (void)dealloc
-{
- if (_private)
- reinterpret_cast<IconFetcher*>(_private)->deref();
-
- [super dealloc];
-}
-
-- (void)finalize
-{
- if (_private)
- reinterpret_cast<IconFetcher*>(_private)->deref();
-
- [super finalize];
-}
-
-- (void)cancel
-{
- reinterpret_cast<IconFetcher*>(_private)->cancel();
-}
-
-@end
-
-@implementation WebIconFetcher (WebInternal)
-
-- (id)_initWithIconFetcher:(PassRefPtr<IconFetcher>)iconFetcher client:(WebIconFetcherClient *)client
-{
- ASSERT(iconFetcher);
-
- self = [super init];
- if (!self)
- return nil;
-
- client->setFetcher(self);
- _private = reinterpret_cast<WebIconFetcherPrivate*>(iconFetcher.releaseRef());
-
- return self;
-}
-
-+ (WebIconFetcher *)_fetchApplicationIconForFrame:(WebFrame *)webFrame
- target:(id)target
- selector:(SEL)selector
-{
- Frame* frame = core(webFrame);
-
- WebIconFetcherClient* client = new WebIconFetcherClient(target, selector);
-
- RefPtr<IconFetcher> fetcher = IconFetcher::create(frame, client);
-
- if (!fetcher)
- return nil;
-
- return [[[WebIconFetcher alloc] _initWithIconFetcher:fetcher.release() client:client] autorelease];
-}
-
-@end
-
diff --git a/WebKit/mac/Misc/WebKitNSStringExtras.h b/WebKit/mac/Misc/WebKitNSStringExtras.h
index f252430..ddc49f0 100644
--- a/WebKit/mac/Misc/WebKitNSStringExtras.h
+++ b/WebKit/mac/Misc/WebKitNSStringExtras.h
@@ -32,6 +32,7 @@ extern NSString *WebKitLocalCacheDefaultsKey;
@interface NSString (WebKitExtras)
+- (void)_web_drawAtPoint:(NSPoint)point font:(NSFont *)font textColor:(NSColor *)textColor allowingFontSmoothing:(BOOL)fontSmoothingIsAllowed;
- (void)_web_drawAtPoint:(NSPoint)point font:(NSFont *)font textColor:(NSColor *)textColor;
- (void)_web_drawDoubledAtPoint:(NSPoint)textPoint withTopColor:(NSColor *)topColor bottomColor:(NSColor *)bottomColor font:(NSFont *)font;
diff --git a/WebKit/mac/Misc/WebKitNSStringExtras.mm b/WebKit/mac/Misc/WebKitNSStringExtras.mm
index da46630..4785de5 100644
--- a/WebKit/mac/Misc/WebKitNSStringExtras.mm
+++ b/WebKit/mac/Misc/WebKitNSStringExtras.mm
@@ -62,12 +62,16 @@ static BOOL canUseFastRenderer(const UniChar *buffer, unsigned length)
- (void)_web_drawAtPoint:(NSPoint)point font:(NSFont *)font textColor:(NSColor *)textColor
{
- // FIXME: Would be more efficient to change this to C++ and use Vector<UChar, 2048>.
+ [self _web_drawAtPoint:point font:font textColor:textColor allowingFontSmoothing:YES];
+}
+
+- (void)_web_drawAtPoint:(NSPoint)point font:(NSFont *)font textColor:(NSColor *)textColor allowingFontSmoothing:(BOOL)fontSmoothingIsAllowed
+{
unsigned length = [self length];
Vector<UniChar, 2048> buffer(length);
[self getCharacters:buffer.data()];
-
+
if (canUseFastRenderer(buffer.data(), length)) {
// The following is a half-assed attempt to match AppKit's rounding rules for drawAtPoint.
// It's probably incorrect for high DPI.
@@ -84,7 +88,7 @@ static BOOL canUseFastRenderer(const UniChar *buffer, unsigned length)
if (!flipped)
CGContextScaleCTM(cgContext, 1, -1);
- Font webCoreFont(FontPlatformData(font), ![nsContext isDrawingToScreen]);
+ Font webCoreFont(FontPlatformData(font), ![nsContext isDrawingToScreen], fontSmoothingIsAllowed ? AutoSmoothing : Antialiased);
TextRun run(buffer.data(), length);
run.disableRoundingHacks();
@@ -93,7 +97,7 @@ static BOOL canUseFastRenderer(const UniChar *buffer, unsigned length)
CGFloat blue;
CGFloat alpha;
[[textColor colorUsingColorSpaceName:NSDeviceRGBColorSpace] getRed:&red green:&green blue:&blue alpha:&alpha];
- graphicsContext.setFillColor(makeRGBA(red * 255, green * 255, blue * 255, alpha * 255), DeviceColorSpace);
+ graphicsContext.setFillColor(makeRGBA(red * 255, green * 255, blue * 255, alpha * 255), ColorSpaceDeviceRGB);
webCoreFont.drawText(&graphicsContext, run, FloatPoint(point.x, (flipped ? point.y : (-1 * point.y))));
@@ -116,17 +120,10 @@ static BOOL canUseFastRenderer(const UniChar *buffer, unsigned length)
font:(NSFont *)font
{
// turn off font smoothing so translucent text draws correctly (Radar 3118455)
- [NSGraphicsContext saveGraphicsState];
- CGContextSetShouldSmoothFonts(static_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]), false);
- [self _web_drawAtPoint:textPoint
- font:font
- textColor:bottomColor];
+ [self _web_drawAtPoint:textPoint font:font textColor:bottomColor allowingFontSmoothing:NO];
textPoint.y += 1;
- [self _web_drawAtPoint:textPoint
- font:font
- textColor:topColor];
- [NSGraphicsContext restoreGraphicsState];
+ [self _web_drawAtPoint:textPoint font:font textColor:topColor allowingFontSmoothing:NO];
}
- (float)_web_widthWithFont:(NSFont *)font
diff --git a/WebKit/mac/Misc/WebKitStatistics.h b/WebKit/mac/Misc/WebKitStatistics.h
index 32241b5..040a40b 100644
--- a/WebKit/mac/Misc/WebKitStatistics.h
+++ b/WebKit/mac/Misc/WebKitStatistics.h
@@ -28,6 +28,9 @@
#import <Foundation/Foundation.h>
+// These values are only incremented and decremented if the WebView is subclassed and
+// +[WebView shouldIncludeInWebKitStatistics] returns YES. By default WebView returns NO.
+
@interface WebKitStatistics : NSObject
+ (int)webViewCount;
diff --git a/WebKit/mac/Misc/WebKitVersionChecks.h b/WebKit/mac/Misc/WebKitVersionChecks.h
index 8b34c94..9d59665 100644
--- a/WebKit/mac/Misc/WebKitVersionChecks.h
+++ b/WebKit/mac/Misc/WebKitVersionChecks.h
@@ -30,9 +30,9 @@
Version numbers are based on the 'current library version' specified in the WebKit build rules.
All of these methods return or take version numbers with each part shifted to the left 2 bytes.
For example the version 1.2.3 is returned as 0x00010203 and version 200.3.5 is returned as 0x00C80305
- A version of -1 is returned if the main executable did not link against WebKit (should never happen).
+ A version of -1 is returned if the main executable did not link against WebKit.
- Please use the current WebKit version number, available in WebKit/Configurations/Version.xcconfig,
+ Please use the current WebKit version number, available in WebKit/mac/Configurations/Version.xcconfig,
when adding a new version constant.
*/
@@ -54,14 +54,15 @@
#define WEBKIT_FIRST_VERSION_WITHOUT_BUMPERCAR_BACK_FORWARD_QUIRK 0x02120700 // 530.7.0
#define WEBKIT_FIRST_VERSION_WITHOUT_CONTENT_SNIFFING_FOR_FILE_URLS 0x02120A00 // 530.10.0
#define WEBKIT_FIRST_VERSION_WITHOUT_LINK_ELEMENT_TEXT_CSS_QUIRK 0x02130200 // 531.2.0
+#define WEBKIT_FIRST_VERSION_WITH_HTML5_PARSER 0x02160900 // 534.9.0
+#define WEBKIT_FIRST_VERSION_WITH_GET_MATCHED_CSS_RULES_RESTRICTIONS 0x02160B00 // 534.11.0
#ifdef __cplusplus
extern "C" {
#endif
BOOL WebKitLinkedOnOrAfter(int version);
-int WebKitLinkTimeVersion(void);
-int WebKitRunTimeVersion(void);
+void setWebKitLinkTimeVersion(int);
#ifdef __cplusplus
}
diff --git a/WebKit/mac/Misc/WebKitVersionChecks.m b/WebKit/mac/Misc/WebKitVersionChecks.m
index 5659273..a63e10b 100644
--- a/WebKit/mac/Misc/WebKitVersionChecks.m
+++ b/WebKit/mac/Misc/WebKitVersionChecks.m
@@ -29,17 +29,23 @@
#import "WebKitVersionChecks.h"
#import <mach-o/dyld.h>
+static int WebKitLinkTimeVersion(void);
+static int overridenWebKitLinkTimeVersion;
+
BOOL WebKitLinkedOnOrAfter(int version)
{
- return (WebKitLinkTimeVersion() >= version);
+ return (WebKitLinkTimeVersion() >= version);
}
-int WebKitLinkTimeVersion(void)
+void setWebKitLinkTimeVersion(int version)
{
- return NSVersionOfLinkTimeLibrary("WebKit");
+ overridenWebKitLinkTimeVersion = version;
}
-int WebKitRunTimeVersion(void)
+static int WebKitLinkTimeVersion(void)
{
- return NSVersionOfRunTimeLibrary("WebKit");
+ if (overridenWebKitLinkTimeVersion)
+ return overridenWebKitLinkTimeVersion;
+
+ return NSVersionOfLinkTimeLibrary("WebKit");
}
diff --git a/WebKit/mac/Misc/WebLocalizableStrings.h b/WebKit/mac/Misc/WebLocalizableStrings.h
index ecad83d..853b601 100644
--- a/WebKit/mac/Misc/WebLocalizableStrings.h
+++ b/WebKit/mac/Misc/WebLocalizableStrings.h
@@ -28,6 +28,8 @@
#if __OBJC__
@class NSBundle;
+#elif __cplusplus
+class NSBundle;
#else
typedef struct NSBundle NSBundle;
#endif
diff --git a/WebKit/mac/Misc/WebNSAttributedStringExtras.mm b/WebKit/mac/Misc/WebNSAttributedStringExtras.mm
index eb422f1..2469da8 100644
--- a/WebKit/mac/Misc/WebNSAttributedStringExtras.mm
+++ b/WebKit/mac/Misc/WebNSAttributedStringExtras.mm
@@ -154,12 +154,12 @@ static NSFileWrapper *fileWrapperForElement(Element* e)
RenderStyle* style = renderer->style();
NSFont *font = style->font().primaryFont()->getNSFont();
[attrs.get() setObject:font forKey:NSFontAttributeName];
- if (style->color().isValid())
- [attrs.get() setObject:nsColor(style->color()) forKey:NSForegroundColorAttributeName];
+ if (style->visitedDependentColor(CSSPropertyColor).alpha())
+ [attrs.get() setObject:nsColor(style->visitedDependentColor(CSSPropertyColor)) forKey:NSForegroundColorAttributeName];
else
[attrs.get() removeObjectForKey:NSForegroundColorAttributeName];
- if (style->backgroundColor().isValid())
- [attrs.get() setObject:nsColor(style->backgroundColor()) forKey:NSBackgroundColorAttributeName];
+ if (style->visitedDependentColor(CSSPropertyBackgroundColor).alpha())
+ [attrs.get() setObject:nsColor(style->visitedDependentColor(CSSPropertyBackgroundColor)) forKey:NSBackgroundColorAttributeName];
else
[attrs.get() removeObjectForKey:NSBackgroundColorAttributeName];
diff --git a/WebKit/mac/Misc/WebNSDictionaryExtras.h b/WebKit/mac/Misc/WebNSDictionaryExtras.h
index 95445f8..0bbc5d5 100644
--- a/WebKit/mac/Misc/WebNSDictionaryExtras.h
+++ b/WebKit/mac/Misc/WebNSDictionaryExtras.h
@@ -43,5 +43,6 @@
- (void)_webkit_setInt:(int)value forKey:(id)key;
- (void)_webkit_setFloat:(float)value forKey:(id)key;
- (void)_webkit_setBool:(BOOL)value forKey:(id)key;
+- (void)_webkit_setLongLong:(long long)value forKey:(id)key;
- (void)_webkit_setUnsignedLongLong:(unsigned long long)value forKey:(id)key;
@end
diff --git a/WebKit/mac/Misc/WebNSDictionaryExtras.m b/WebKit/mac/Misc/WebNSDictionaryExtras.m
index a47fd0b..366f361 100644
--- a/WebKit/mac/Misc/WebNSDictionaryExtras.m
+++ b/WebKit/mac/Misc/WebNSDictionaryExtras.m
@@ -108,6 +108,13 @@
[object release];
}
+- (void)_webkit_setLongLong:(long long)value forKey:(id)key
+{
+ NSNumber *object = [[NSNumber alloc] initWithLongLong:value];
+ [self setObject:object forKey:key];
+ [object release];
+}
+
- (void)_webkit_setUnsignedLongLong:(unsigned long long)value forKey:(id)key
{
NSNumber *object = [[NSNumber alloc] initWithUnsignedLongLong:value];
diff --git a/WebKit/mac/Misc/WebNSFileManagerExtras.h b/WebKit/mac/Misc/WebNSFileManagerExtras.h
index c2287f9..dcf62d0 100644
--- a/WebKit/mac/Misc/WebNSFileManagerExtras.h
+++ b/WebKit/mac/Misc/WebNSFileManagerExtras.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2005, 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -28,19 +28,10 @@
#import <Foundation/Foundation.h>
-#define WEB_UREAD (00400) /* Read by owner */
-#define WEB_UWRITE (00200) /* Write by owner */
-#define WEB_UEXEC (00100) /* Execute/Search by owner */
-
@interface NSFileManager (WebNSFileManagerExtras)
-
-- (void)_webkit_backgroundRemoveFileAtPath:(NSString *)path;
-- (void)_webkit_backgroundRemoveLeftoverFiles:(NSString *)path;
-- (BOOL)_webkit_removeFileOnlyAtPath:(NSString *)path;
- (void)_webkit_setMetadataURL:(NSString *)URLString referrer:(NSString *)referrer atPath:(NSString *)path;
- (NSString *)_webkit_startupVolumeName;
- (NSString *)_webkit_pathWithUniqueFilenameForPath:(NSString *)path;
-
@end
diff --git a/WebKit/mac/Misc/WebNSFileManagerExtras.m b/WebKit/mac/Misc/WebNSFileManagerExtras.m
index fb1286f..ad48fb8 100644
--- a/WebKit/mac/Misc/WebNSFileManagerExtras.m
+++ b/WebKit/mac/Misc/WebNSFileManagerExtras.m
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -30,74 +30,12 @@
#import "WebKitNSStringExtras.h"
#import "WebNSURLExtras.h"
-#import <WebCore/FoundationExtras.h>
-#import <WebKitSystemInterface.h>
-#import <pthread.h>
-#import <sys/mount.h>
#import <JavaScriptCore/Assertions.h>
+#import <WebKitSystemInterface.h>
+#import <sys/stat.h>
@implementation NSFileManager (WebNSFileManagerExtras)
-- (BOOL)_webkit_removeFileOnlyAtPath:(NSString *)path
-{
- struct statfs buf;
- BOOL result = unlink([path fileSystemRepresentation]) == 0;
-
- // For mysterious reasons, MNT_DOVOLFS is the flag for "supports resource fork"
- if ((statfs([path fileSystemRepresentation], &buf) == 0) && !(buf.f_flags & MNT_DOVOLFS)) {
- NSString *lastPathComponent = [path lastPathComponent];
- if ([lastPathComponent length] != 0 && ![lastPathComponent isEqualToString:@"/"]) {
- NSString *resourcePath = [[path stringByDeletingLastPathComponent] stringByAppendingString:[@"._" stringByAppendingString:lastPathComponent]];
- if (unlink([resourcePath fileSystemRepresentation]) != 0) {
- result = NO;
- }
- }
- }
-
- return result;
-}
-
-- (void)_webkit_backgroundRemoveFileAtPath:(NSString *)path
-{
- NSFileManager *manager;
- NSString *moveToSubpath;
- NSString *moveToPath;
- int i;
-
- manager = [NSFileManager defaultManager];
-
- i = 0;
- moveToSubpath = [path stringByDeletingLastPathComponent];
- do {
- moveToPath = [NSString stringWithFormat:@"%@/.tmp%d", moveToSubpath, i];
- i++;
- } while ([manager fileExistsAtPath:moveToPath]);
-
- if ([manager moveItemAtPath:path toPath:moveToPath error:NULL])
- [NSThread detachNewThreadSelector:@selector(_performRemoveFileAtPath:) toTarget:self withObject:moveToPath];
-}
-
-- (void)_webkit_backgroundRemoveLeftoverFiles:(NSString *)path
-{
- NSFileManager *manager;
- NSString *leftoverSubpath;
- NSString *leftoverPath;
- int i;
-
- manager = [NSFileManager defaultManager];
- leftoverSubpath = [path stringByDeletingLastPathComponent];
-
- i = 0;
- while (1) {
- leftoverPath = [NSString stringWithFormat:@"%@/.tmp%d", leftoverSubpath, i];
- if (![manager fileExistsAtPath:leftoverPath]) {
- break;
- }
- [NSThread detachNewThreadSelector:@selector(_performRemoveFileAtPath:) toTarget:self withObject:leftoverPath];
- i++;
- }
-}
-
- (NSString *)_webkit_carbonPathForPath:(NSString *)posixPath
{
OSStatus error;
@@ -148,19 +86,22 @@
typedef struct MetaDataInfo
{
- NSString *URLString;
- NSString *referrer;
- NSString *path;
+ CFStringRef URLString;
+ CFStringRef referrer;
+ CFStringRef path;
} MetaDataInfo;
static void *setMetaData(void* context)
{
MetaDataInfo *info = (MetaDataInfo *)context;
- WKSetMetadataURL(info->URLString, info->referrer, info->path);
-
- HardRelease(info->URLString);
- HardRelease(info->referrer);
- HardRelease(info->path);
+ WKSetMetadataURL((NSString *)info->URLString, (NSString *)info->referrer, (NSString *)info->path);
+
+ if (info->URLString)
+ CFRelease(info->URLString);
+ if (info->referrer)
+ CFRelease(info->referrer);
+ if (info->path)
+ CFRelease(info->path);
free(info);
return 0;
@@ -185,9 +126,9 @@ static void *setMetaData(void* context)
MetaDataInfo *info = malloc(sizeof(MetaDataInfo));
- info->URLString = HardRetainWithNSRelease([URLString copy]);
- info->referrer = HardRetainWithNSRelease([referrer copy]);
- info->path = HardRetainWithNSRelease([path copy]);
+ info->URLString = URLString ? CFStringCreateCopy(0, (CFStringRef)URLString) : 0;
+ info->referrer = referrer ? CFStringCreateCopy(0, (CFStringRef)referrer) : 0;
+ info->path = path ? CFStringCreateCopy(0, (CFStringRef)path) : 0;
pthread_create(&tid, &attr, setMetaData, info);
pthread_attr_destroy(&attr);
@@ -199,14 +140,22 @@ static void *setMetaData(void* context)
return [path substringToIndex:[path length]-1];
}
+// -[NSFileManager fileExistsAtPath:] returns NO if there is a broken symlink at the path.
+// So we use this function instead, which returns YES if there is anything there, including
+// a broken symlink.
+static BOOL fileExists(NSString *path)
+{
+ struct stat statBuffer;
+ return !lstat([path fileSystemRepresentation], &statBuffer);
+}
+
- (NSString *)_webkit_pathWithUniqueFilenameForPath:(NSString *)path
{
// "Fix" the filename of the path.
NSString *filename = [[path lastPathComponent] _webkit_filenameByFixingIllegalCharacters];
path = [[path stringByDeletingLastPathComponent] stringByAppendingPathComponent:filename];
- NSFileManager *fileManager = [NSFileManager defaultManager];
- if ([fileManager fileExistsAtPath:path]) {
+ if (fileExists(path)) {
// Don't overwrite existing file by appending "-n", "-n.ext" or "-n.ext.ext" to the filename.
NSString *extensions = nil;
NSString *pathWithoutExtensions;
@@ -221,15 +170,11 @@ static void *setMetaData(void* context)
pathWithoutExtensions = [[path stringByDeletingLastPathComponent] stringByAppendingPathComponent:lastPathComponent];
}
- NSString *pathWithAppendedNumber;
- unsigned i;
-
- for (i = 1; 1; i++) {
- pathWithAppendedNumber = [NSString stringWithFormat:@"%@-%d", pathWithoutExtensions, i];
+ for (unsigned i = 1; ; i++) {
+ NSString *pathWithAppendedNumber = [NSString stringWithFormat:@"%@-%d", pathWithoutExtensions, i];
path = [extensions length] ? [pathWithAppendedNumber stringByAppendingPathExtension:extensions] : pathWithAppendedNumber;
- if (![fileManager fileExistsAtPath:path]) {
+ if (!fileExists(path))
break;
- }
}
}
@@ -238,8 +183,8 @@ static void *setMetaData(void* context)
@end
-
#ifdef BUILDING_ON_TIGER
+
@implementation NSFileManager (WebNSFileManagerTigerForwardCompatibility)
- (NSArray *)contentsOfDirectoryAtPath:(NSString *)path error:(NSError **)error
@@ -293,4 +238,5 @@ static void *setMetaData(void* context)
}
@end
+
#endif
diff --git a/WebKit/mac/Misc/WebNSObjectExtras.h b/WebKit/mac/Misc/WebNSObjectExtras.h
index f327966..0114bcc 100644
--- a/WebKit/mac/Misc/WebNSObjectExtras.h
+++ b/WebKit/mac/Misc/WebNSObjectExtras.h
@@ -54,5 +54,6 @@ static inline IMP method_setImplementation(Method m, IMP i)
#endif
@interface NSObject (WebNSObjectExtras)
++ (id)_webkit_invokeOnMainThread;
- (id)_webkit_invokeOnMainThread;
@end
diff --git a/WebKit/mac/Misc/WebNSObjectExtras.mm b/WebKit/mac/Misc/WebNSObjectExtras.mm
index 3beb641..d00726b 100644
--- a/WebKit/mac/Misc/WebNSObjectExtras.mm
+++ b/WebKit/mac/Misc/WebNSObjectExtras.mm
@@ -105,6 +105,11 @@ static bool returnTypeIsObject(NSInvocation *invocation)
@implementation NSObject (WebNSObjectExtras)
++ (id)_webkit_invokeOnMainThread
+{
+ return [[[WebMainThreadInvoker alloc] initWithTarget:self] autorelease];
+}
+
- (id)_webkit_invokeOnMainThread
{
return [[[WebMainThreadInvoker alloc] initWithTarget:self] autorelease];
diff --git a/WebKit/mac/Misc/WebNSPasteboardExtras.mm b/WebKit/mac/Misc/WebNSPasteboardExtras.mm
index 3cc1c7c..7caa47a 100644
--- a/WebKit/mac/Misc/WebNSPasteboardExtras.mm
+++ b/WebKit/mac/Misc/WebNSPasteboardExtras.mm
@@ -37,17 +37,18 @@
#import "WebURLsWithTitles.h"
#import "WebViewPrivate.h"
#import <WebCore/Element.h>
+#import <WebCore/Image.h>
#import <WebCore/MIMETypeRegistry.h>
#import <WebCore/RenderImage.h>
#import <WebKit/DOMExtensions.h>
#import <WebKit/DOMPrivate.h>
+#import <WebKitSystemInterface.h>
#import <wtf/Assertions.h>
-#import <wtf/StdLibExtras.h>
#import <wtf/RetainPtr.h>
-#import <WebKitSystemInterface.h>
+#import <wtf/StdLibExtras.h>
@interface NSFilePromiseDragSource : NSObject
-- initWithSource:(id)draggingSource;
+- (id)initWithSource:(id)draggingSource;
- (void)setTypes:(NSArray *)types onPasteboard:(NSPasteboard *)pboard;
@end
@@ -140,12 +141,17 @@ static NSArray *_writableTypesForImageWithArchive (void)
if ([types containsObject:NSFilenamesPboardType]) {
NSArray *files = [self propertyListForType:NSFilenamesPboardType];
+ // FIXME: Maybe it makes more sense to allow multiple files and only use the first one?
if ([files count] == 1) {
NSString *file = [files objectAtIndex:0];
+ // FIXME: We are filtering out directories because that's what the original code used to
+ // do. Without this check, if the URL points to a local directory, Safari will open the
+ // parent directory of the directory in Finder. This check should go away as soon as
+ // possible.
BOOL isDirectory;
- if([[NSFileManager defaultManager] fileExistsAtPath:file isDirectory:&isDirectory] && !isDirectory){
- return [[NSURL fileURLWithPath:file] _webkit_canonicalize];
- }
+ if ([[NSFileManager defaultManager] fileExistsAtPath:file isDirectory:&isDirectory] && isDirectory)
+ return nil;
+ return [[NSURL fileURLWithPath:file] _webkit_canonicalize];
}
}
diff --git a/WebKit/mac/Misc/WebNSPrintOperationExtras.h b/WebKit/mac/Misc/WebNSPrintOperationExtras.h
index 44eb3df..3535369 100644
--- a/WebKit/mac/Misc/WebNSPrintOperationExtras.h
+++ b/WebKit/mac/Misc/WebNSPrintOperationExtras.h
@@ -31,5 +31,7 @@
@interface NSPrintOperation (WebKitExtras)
- (float)_web_pageSetupScaleFactor;
+- (float)_web_availablePaperWidth;
+- (float)_web_availablePaperHeight;
@end
diff --git a/WebKit/mac/Misc/WebNSPrintOperationExtras.m b/WebKit/mac/Misc/WebNSPrintOperationExtras.m
index 4c45f17..0982b96 100644
--- a/WebKit/mac/Misc/WebNSPrintOperationExtras.m
+++ b/WebKit/mac/Misc/WebNSPrintOperationExtras.m
@@ -35,4 +35,16 @@
return [[[[self printInfo] dictionary] objectForKey:NSPrintScalingFactor] floatValue];
}
+- (float)_web_availablePaperWidth
+{
+ NSPrintInfo *printInfo = [self printInfo];
+ return [printInfo paperSize].width - [printInfo leftMargin] - [printInfo rightMargin];
+}
+
+- (float)_web_availablePaperHeight
+{
+ NSPrintInfo *printInfo = [self printInfo];
+ return [printInfo paperSize].height - [printInfo topMargin] - [printInfo bottomMargin];
+}
+
@end
diff --git a/WebKit/mac/Misc/WebNSURLExtras.mm b/WebKit/mac/Misc/WebNSURLExtras.mm
index 2affbed..00819e4 100644
--- a/WebKit/mac/Misc/WebNSURLExtras.mm
+++ b/WebKit/mac/Misc/WebNSURLExtras.mm
@@ -1050,6 +1050,41 @@ static BOOL allCharactersInIDNScriptWhiteList(const UChar *buffer, int32_t lengt
return YES;
}
+static BOOL allCharactersAllowedByTLDRules(const UChar* buffer, int32_t length)
+{
+ // Skip trailing dot for root domain.
+ if (buffer[length - 1] == '.')
+ --length;
+
+ if (length > 3
+ && buffer[length - 3] == '.'
+ && buffer[length - 2] == 0x0440 // CYRILLIC SMALL LETTER ER
+ && buffer[length - 1] == 0x0444) // CYRILLIC SMALL LETTER EF
+ {
+ // Rules defined by <http://www.cctld.ru/ru/docs/rulesrf.php>. This code only checks requirements that matter for presentation purposes.
+ for (int32_t i = length - 4; i; --i) {
+ UChar ch = buffer[i];
+
+ // Only modern Russian letters, digits and dashes are allowed.
+ if ((ch >= 0x0430 && ch <= 0x044f)
+ || ch == 0x0451
+ || (ch >= '0' && ch <= '9')
+ || ch == '-')
+ continue;
+
+ // Only check top level domain. Lower level registrars may have different rules.
+ if (ch == '.')
+ break;
+
+ return NO;
+ }
+ return YES;
+ }
+
+ // Not a known top level domain with special rules.
+ return NO;
+}
+
// Return value of nil means no mapping is necessary.
// If makeString is NO, then return value is either nil or self to indicate mapping is necessary.
// If makeString is YES, then return value is either nil or the mapped string.
@@ -1087,7 +1122,7 @@ static BOOL allCharactersInIDNScriptWhiteList(const UChar *buffer, int32_t lengt
if (numCharactersConverted == length && memcmp(sourceBuffer, destinationBuffer, length * sizeof(UChar)) == 0) {
return nil;
}
- if (!encode && !allCharactersInIDNScriptWhiteList(destinationBuffer, numCharactersConverted)) {
+ if (!encode && !allCharactersInIDNScriptWhiteList(destinationBuffer, numCharactersConverted) && !allCharactersAllowedByTLDRules(destinationBuffer, numCharactersConverted)) {
return nil;
}
return makeString ? (NSString *)[NSString stringWithCharacters:destinationBuffer length:numCharactersConverted] : (NSString *)self;
diff --git a/WebKit/mac/Misc/WebNSUserDefaultsExtras.m b/WebKit/mac/Misc/WebNSUserDefaultsExtras.m
deleted file mode 100644
index 383d202..0000000
--- a/WebKit/mac/Misc/WebNSUserDefaultsExtras.m
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "WebNSUserDefaultsExtras.h"
-
-#import "WebNSObjectExtras.h"
-#import <WebKitSystemInterface.h>
-#import <wtf/Assertions.h>
-
-@implementation NSString (WebNSUserDefaultsPrivate)
-
-- (NSString *)_webkit_HTTPStyleLanguageCode
-{
- // Look up the language code using CFBundle.
- NSString *languageCode = self;
- NSString *preferredLanguageCode = WebCFAutorelease(WKCopyCFLocalizationPreferredName((CFStringRef)self));
-
- if (preferredLanguageCode)
- languageCode = preferredLanguageCode;
-
- // Make the string lowercase.
- NSString *lowercaseLanguageCode = [languageCode lowercaseString];
-
- // Turn a '_' into a '-' if it appears after a 2-letter language code.
- if ([lowercaseLanguageCode length] < 3 || [lowercaseLanguageCode characterAtIndex:2] != '_') {
- return lowercaseLanguageCode;
- }
- NSMutableString *result = [lowercaseLanguageCode mutableCopy];
- [result replaceCharactersInRange:NSMakeRange(2, 1) withString:@"-"];
- return [result autorelease];
-}
-
-@end
-
-@implementation NSUserDefaults (WebNSUserDefaultsExtras)
-
-static NSString *preferredLanguageCode = nil;
-static NSLock *preferredLanguageLock = nil;
-static pthread_once_t preferredLanguageLockOnce = PTHREAD_ONCE_INIT;
-static pthread_once_t addDefaultsChangeObserverOnce = PTHREAD_ONCE_INIT;
-
-static void makeLock(void)
-{
- preferredLanguageLock = [[NSLock alloc] init];
-}
-
-+ (void)_webkit_ensureAndLockPreferredLanguageLock
-{
- pthread_once(&preferredLanguageLockOnce, makeLock);
- [preferredLanguageLock lock];
-}
-
-+ (void)_webkit_defaultsDidChange
-{
- [self _webkit_ensureAndLockPreferredLanguageLock];
-
- [preferredLanguageCode release];
- preferredLanguageCode = nil;
-
- [preferredLanguageLock unlock];
-}
-
-static void addDefaultsChangeObserver(void)
-{
- [[NSNotificationCenter defaultCenter] addObserver:[NSUserDefaults class]
- selector:@selector(_webkit_defaultsDidChange)
- name:NSUserDefaultsDidChangeNotification
- object:[NSUserDefaults standardUserDefaults]];
-}
-
-+ (void)_webkit_addDefaultsChangeObserver
-{
- pthread_once(&addDefaultsChangeObserverOnce, addDefaultsChangeObserver);
-}
-
-+ (NSString *)_webkit_preferredLanguageCode
-{
- // Get this outside the lock since it might block on the defaults lock, while we are inside registerDefaults:.
- NSUserDefaults *standardDefaults = [self standardUserDefaults];
-
- BOOL addObserver = NO;
-
- [self _webkit_ensureAndLockPreferredLanguageLock];
-
- if (!preferredLanguageCode) {
- NSArray *languages = [standardDefaults stringArrayForKey:@"AppleLanguages"];
- if ([languages count] == 0) {
- preferredLanguageCode = [@"en" retain];
- } else {
- preferredLanguageCode = [[[languages objectAtIndex:0] _webkit_HTTPStyleLanguageCode] copy];
- }
- addObserver = YES;
- }
-
- NSString *code = [[preferredLanguageCode retain] autorelease];
-
- [preferredLanguageLock unlock];
-
- if (addObserver) {
- [self _webkit_addDefaultsChangeObserver];
- }
-
- return code;
-}
-
-@end
diff --git a/WebKit/mac/Plugins/WebNullPluginView.h b/WebKit/mac/Misc/WebNSUserDefaultsExtras.mm
index 3ca1532..a255935 100644
--- a/WebKit/mac/Plugins/WebNullPluginView.h
+++ b/WebKit/mac/Misc/WebNSUserDefaultsExtras.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2010 Apple, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,16 +26,18 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import <AppKit/AppKit.h>
+#import "WebNSUserDefaultsExtras.h"
-@class DOMElement;
+#import <WebCore/Language.h>
+#import <wtf/text/WTFString.h>
-@interface WebNullPluginView : NSImageView
+using namespace WebCore;
+
+@implementation NSUserDefaults (WebNSUserDefaultsExtras)
+
++ (NSString *)_webkit_preferredLanguageCode
{
- NSError *error;
- DOMElement *element;
+ return defaultLanguage();
}
-- (id)initWithFrame:(NSRect)frame error:(NSError *)error DOMElement:(DOMElement *)element;
-
@end
diff --git a/WebKit/mac/Misc/WebQuotaManager.h b/WebKit/mac/Misc/WebQuotaManager.h
new file mode 100644
index 0000000..45074e4
--- /dev/null
+++ b/WebKit/mac/Misc/WebQuotaManager.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+@class WebSecurityOrigin;
+
+/*!
+ @protocol WebQuotaManager
+ @discussion This protocol is used to view and manipulate a per-origin storage quota.
+*/
+@protocol WebQuotaManager
+
+/*!
+ @method initWithOrigin:
+ @param The security origin this will manage.
+ @result A new WebQuotaManager object.
+*/
+- (id)initWithOrigin:(WebSecurityOrigin *)origin;
+
+/*!
+ @method origin
+ @result The security origin this manager is managing.
+*/
+- (WebSecurityOrigin *)origin;
+
+/*!
+ @method usage
+ @result The current total usage of all relevant items in this security origin in bytes.
+*/
+- (unsigned long long)usage;
+
+/*!
+ @method quota
+ @result The current quota of security origin in bytes.
+*/
+- (unsigned long long)quota;
+
+/*!
+ @method setQuota:
+ @param Sets a new quota, in bytes, on this security origin.
+*/
+- (void)setQuota:(unsigned long long)quota;
+
+@end
diff --git a/WebKit/mac/Misc/WebUserContentURLPattern.h b/WebKit/mac/Misc/WebUserContentURLPattern.h
new file mode 100644
index 0000000..e7ccac4
--- /dev/null
+++ b/WebKit/mac/Misc/WebUserContentURLPattern.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+@class WebUserContentURLPatternPrivate;
+
+@interface WebUserContentURLPattern : NSObject {
+ WebUserContentURLPatternPrivate *_private;
+}
+
+- (id)initWithPatternString:(NSString *)patternString;
+
+- (BOOL)isValid;
+- (NSString *)scheme;
+- (NSString *)host;
+- (BOOL)matchesSubdomains;
+- (BOOL)matchesURL:(NSURL *)url;
+
+@end
diff --git a/WebKit/mac/Misc/WebUserContentURLPattern.mm b/WebKit/mac/Misc/WebUserContentURLPattern.mm
new file mode 100644
index 0000000..883f2e6
--- /dev/null
+++ b/WebKit/mac/Misc/WebUserContentURLPattern.mm
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "WebUserContentURLPattern.h"
+
+#import <WebCore/KURL.h>
+#import <WebCore/UserContentURLPattern.h>
+
+using namespace WebCore;
+
+@interface WebUserContentURLPatternPrivate : NSObject
+{
+@public
+ UserContentURLPattern pattern;
+}
+@end
+
+@implementation WebUserContentURLPatternPrivate
+@end
+
+@implementation WebUserContentURLPattern
+
+- (id)initWithPatternString:(NSString *)patternString
+{
+ self = [super init];
+ if (!self)
+ return nil;
+
+ _private = [[WebUserContentURLPatternPrivate alloc] init];
+ _private->pattern = UserContentURLPattern(patternString);
+
+ return self;
+}
+
+- (void)dealloc
+{
+ [_private release];
+ _private = nil;
+
+ [super dealloc];
+}
+
+- (BOOL)isValid
+{
+ return _private->pattern.isValid();
+}
+
+- (NSString *)scheme
+{
+ return _private->pattern.scheme();
+}
+
+- (NSString *)host
+{
+ return _private->pattern.host();
+}
+
+- (BOOL)matchesSubdomains
+{
+ return _private->pattern.matchSubdomains();
+}
+
+- (BOOL)matchesURL:(NSURL *)url
+{
+ return _private->pattern.matches(url);
+}
+
+@end
diff --git a/WebKit/mac/Panels/WebAuthenticationPanel.m b/WebKit/mac/Panels/WebAuthenticationPanel.m
index f207d0c..c9442da 100644
--- a/WebKit/mac/Panels/WebAuthenticationPanel.m
+++ b/WebKit/mac/Panels/WebAuthenticationPanel.m
@@ -218,7 +218,9 @@
- (void)runAsModalDialogWithChallenge:(NSURLAuthenticationChallenge *)chall
{
[self setUpForChallenge:chall];
+
usingSheet = FALSE;
+ [chall retain];
NSURLCredential *credential = nil;
if ([[NSApplication sharedApplication] runModalForWindow:panel] == 0) {
@@ -227,6 +229,7 @@
[callback performSelector:selector withObject:chall withObject:credential];
[credential release];
+ [chall release];
}
- (void)runAsSheetOnWindow:(NSWindow *)window withChallenge:(NSURLAuthenticationChallenge *)chall
diff --git a/WebKit/mac/Panels/WebPanelAuthenticationHandler.m b/WebKit/mac/Panels/WebPanelAuthenticationHandler.m
index c4c6e5b..694bba5 100644
--- a/WebKit/mac/Panels/WebPanelAuthenticationHandler.m
+++ b/WebKit/mac/Panels/WebPanelAuthenticationHandler.m
@@ -113,7 +113,7 @@ WebPanelAuthenticationHandler *sharedHandler;
// In this case, we have an attached sheet that's not one of our
// authentication panels, so enqueing is not an option. Just
- // cancel authentication instead, since this case is fairly
+ // cancel loading instead, since this case is fairly
// unlikely (how would you be loading a page if you had an error
// sheet up?)
if ([w attachedSheet] != nil) {
@@ -152,7 +152,7 @@ WebPanelAuthenticationHandler *sharedHandler;
}
if (credential == nil) {
- [[challenge sender] cancelAuthenticationChallenge:challenge];
+ [[challenge sender] continueWithoutCredentialForAuthenticationChallenge:challenge];
} else {
[[challenge sender] useCredential:credential forAuthenticationChallenge:challenge];
}
diff --git a/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm b/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm
index 98b5a7e..876a556 100644
--- a/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm
+++ b/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm
@@ -23,7 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#if USE(PLUGIN_HOST_PROCESS)
+#if USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
#import "HostedNetscapePluginStream.h"
@@ -256,7 +256,7 @@ NSError *HostedNetscapePluginStream::pluginCancelledConnectionError() const
return [[[NSError alloc] _initWithPluginErrorCode:WebKitErrorPlugInCancelledConnection
contentURL:m_responseURL ? m_responseURL.get() : m_requestURL.get()
pluginPageURL:nil
- pluginName:[[m_instance->pluginView() pluginPackage] name]
+ pluginName:[[m_instance->pluginView() pluginPackage] pluginInfo].name
MIMEType:m_mimeType.get()] autorelease];
}
@@ -275,5 +275,5 @@ NSError *HostedNetscapePluginStream::errorForReason(NPReason reason) const
} // namespace WebKit
-#endif // USE(PLUGIN_HOST_PROCESS)
+#endif // USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h b/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h
index e62d87a..4e59456 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h
@@ -28,11 +28,12 @@
#ifndef NetscapePluginHostManager_h
#define NetscapePluginHostManager_h
+#import <WebCore/PlatformString.h>
#import <wtf/HashMap.h>
#import <wtf/PassRefPtr.h>
+#import <wtf/text/StringHash.h>
@class WebHostedNetscapePluginView;
-@class WebNetscapePluginPackage;
namespace WebKit {
@@ -43,28 +44,28 @@ class NetscapePluginHostManager {
public:
static NetscapePluginHostManager& shared();
- PassRefPtr<NetscapePluginInstanceProxy> instantiatePlugin(WebNetscapePluginPackage *, WebHostedNetscapePluginView *, NSString *mimeType, NSArray *attributeKeys, NSArray *attributeValues, NSString *userAgent, NSURL *sourceURL, bool fullFrame, bool isPrivateBrowsingEnabled, bool isAcceleratedCompositingEnabled);
+ PassRefPtr<NetscapePluginInstanceProxy> instantiatePlugin(const WTF::String& pluginPath, cpu_type_t pluginArchitecture, const WTF::String& bundleIdentifier, WebHostedNetscapePluginView *, NSString *mimeType, NSArray *attributeKeys, NSArray *attributeValues, NSString *userAgent, NSURL *sourceURL, bool fullFrame, bool isPrivateBrowsingEnabled, bool isAcceleratedCompositingEnabled);
void pluginHostDied(NetscapePluginHostProxy*);
- static void createPropertyListFile(WebNetscapePluginPackage *);
+ static void createPropertyListFile(const WTF::String& pluginPath, cpu_type_t pluginArchitecture);
void didCreateWindow();
private:
- NetscapePluginHostProxy* hostForPackage(WebNetscapePluginPackage *, bool useProxiedOpenPanel);
+ NetscapePluginHostProxy* hostForPlugin(const WTF::String& pluginPath, cpu_type_t pluginArchitecture, const WTF::String& bundleIdentifier);
NetscapePluginHostManager();
~NetscapePluginHostManager();
- bool spawnPluginHost(WebNetscapePluginPackage *, mach_port_t clientPort, mach_port_t& pluginHostPort, ProcessSerialNumber& pluginHostPSN, bool useProxiedOpenPanel);
+ bool spawnPluginHost(const WTF::String& pluginPath, cpu_type_t pluginArchitecture, mach_port_t clientPort, mach_port_t& pluginHostPort, ProcessSerialNumber& pluginHostPSN);
bool initializeVendorPort();
mach_port_t m_pluginVendorPort;
// FIXME: This should really be a HashMap of RetainPtrs, but that doesn't work right now.
- typedef HashMap<WebNetscapePluginPackage*, NetscapePluginHostProxy*> PluginHostMap;
+ typedef HashMap<WTF::String, NetscapePluginHostProxy*> PluginHostMap;
PluginHostMap m_pluginHosts;
};
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm
index 281d41f..d8cd081 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm
@@ -23,7 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#if USE(PLUGIN_HOST_PROCESS)
+#if USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
#import "NetscapePluginHostManager.h"
@@ -31,10 +31,7 @@
#import "NetscapePluginInstanceProxy.h"
#import "WebLocalizableStrings.h"
#import "WebKitSystemInterface.h"
-#import "WebHostedNetscapePluginView.h"
#import "WebNetscapePluginPackage.h"
-#import "WebPreferencesPrivate.h"
-#import "WebView.h"
#import <mach/mach_port.h>
#import <servers/bootstrap.h>
#import <spawn.h>
@@ -48,6 +45,7 @@ extern "C" {
}
using namespace std;
+using namespace WebCore;
namespace WebKit {
@@ -58,7 +56,7 @@ NetscapePluginHostManager& NetscapePluginHostManager::shared()
return pluginHostManager;
}
-static const NSString *pluginHostAppName = @"WebKitPluginHost.app";
+static NSString * const pluginHostAppName = @"WebKitPluginHost.app";
NetscapePluginHostManager::NetscapePluginHostManager()
: m_pluginVendorPort(MACH_PORT_NULL)
@@ -69,9 +67,9 @@ NetscapePluginHostManager::~NetscapePluginHostManager()
{
}
-NetscapePluginHostProxy* NetscapePluginHostManager::hostForPackage(WebNetscapePluginPackage *package, bool useProxiedOpenPanel)
+NetscapePluginHostProxy* NetscapePluginHostManager::hostForPlugin(const WTF::String& pluginPath, cpu_type_t pluginArchitecture, const String& bundleIdentifier)
{
- pair<PluginHostMap::iterator, bool> result = m_pluginHosts.add(package, 0);
+ pair<PluginHostMap::iterator, bool> result = m_pluginHosts.add(pluginPath, 0);
// The package was already in the map, just return it.
if (!result.second)
@@ -85,7 +83,7 @@ NetscapePluginHostProxy* NetscapePluginHostManager::hostForPackage(WebNetscapePl
mach_port_t pluginHostPort;
ProcessSerialNumber pluginHostPSN;
- if (!spawnPluginHost(package, clientPort, pluginHostPort, pluginHostPSN, useProxiedOpenPanel)) {
+ if (!spawnPluginHost(pluginPath, pluginArchitecture, clientPort, pluginHostPort, pluginHostPSN)) {
mach_port_destroy(mach_task_self(), clientPort);
m_pluginHosts.remove(result.first);
return 0;
@@ -93,17 +91,16 @@ NetscapePluginHostProxy* NetscapePluginHostManager::hostForPackage(WebNetscapePl
// Since Flash NPObjects add methods dynamically, we don't want to cache when a property/method doesn't exist
// on an object because it could be added later.
- bool shouldCacheMissingPropertiesAndMethods = ![[[package bundle] bundleIdentifier] isEqualToString:@"com.macromedia.Flash Player.plugin"];
+ bool shouldCacheMissingPropertiesAndMethods = bundleIdentifier != "com.macromedia.Flash Player.plugin";
NetscapePluginHostProxy* hostProxy = new NetscapePluginHostProxy(clientPort, pluginHostPort, pluginHostPSN, shouldCacheMissingPropertiesAndMethods);
- CFRetain(package);
result.first->second = hostProxy;
return hostProxy;
}
-bool NetscapePluginHostManager::spawnPluginHost(WebNetscapePluginPackage *package, mach_port_t clientPort, mach_port_t& pluginHostPort, ProcessSerialNumber& pluginHostPSN, bool useProxiedOpenPanel)
+bool NetscapePluginHostManager::spawnPluginHost(const String& pluginPath, cpu_type_t pluginArchitecture, mach_port_t clientPort, mach_port_t& pluginHostPort, ProcessSerialNumber& pluginHostPSN)
{
if (m_pluginVendorPort == MACH_PORT_NULL) {
if (!initializeVendorPort())
@@ -121,9 +118,8 @@ bool NetscapePluginHostManager::spawnPluginHost(WebNetscapePluginPackage *packag
NSDictionary *launchProperties = [[NSDictionary alloc] initWithObjectsAndKeys:
pluginHostAppExecutablePath, @"pluginHostPath",
- [NSNumber numberWithInt:[package pluginHostArchitecture]], @"cpuType",
+ [NSNumber numberWithInt:pluginArchitecture], @"cpuType",
localization.get(), @"localization",
- [NSNumber numberWithBool:useProxiedOpenPanel], @"useProxiedOpenPanel",
nil];
NSData *data = [NSPropertyListSerialization dataFromPropertyList:launchProperties format:NSPropertyListBinaryFormat_v1_0 errorDescription:0];
@@ -152,11 +148,11 @@ bool NetscapePluginHostManager::spawnPluginHost(WebNetscapePluginPackage *packag
NSString *visibleName = [NSString stringWithFormat:UI_STRING("%@ (%@ Internet plug-in)",
"visible name of the plug-in host process. The first argument is the plug-in name "
"and the second argument is the application name."),
- [[package filename] stringByDeletingPathExtension], [[NSProcessInfo processInfo] processName]];
+ [[(NSString*)pluginPath lastPathComponent] stringByDeletingPathExtension], [[NSProcessInfo processInfo] processName]];
NSDictionary *hostProperties = [[NSDictionary alloc] initWithObjectsAndKeys:
visibleName, @"visibleName",
- [package path], @"bundlePath",
+ (NSString *)pluginPath, @"bundlePath",
nil];
data = [NSPropertyListSerialization dataFromPropertyList:hostProperties format:NSPropertyListBinaryFormat_v1_0 errorDescription:nil];
@@ -215,10 +211,9 @@ void NetscapePluginHostManager::pluginHostDied(NetscapePluginHostProxy* pluginHo
}
}
-PassRefPtr<NetscapePluginInstanceProxy> NetscapePluginHostManager::instantiatePlugin(WebNetscapePluginPackage *pluginPackage, WebHostedNetscapePluginView *pluginView, NSString *mimeType, NSArray *attributeKeys, NSArray *attributeValues, NSString *userAgent, NSURL *sourceURL, bool fullFrame, bool isPrivateBrowsingEnabled, bool isAcceleratedCompositingEnabled)
+PassRefPtr<NetscapePluginInstanceProxy> NetscapePluginHostManager::instantiatePlugin(const String& pluginPath, cpu_type_t pluginArchitecture, const String& bundleIdentifier, WebHostedNetscapePluginView *pluginView, NSString *mimeType, NSArray *attributeKeys, NSArray *attributeValues, NSString *userAgent, NSURL *sourceURL, bool fullFrame, bool isPrivateBrowsingEnabled, bool isAcceleratedCompositingEnabled)
{
- WebPreferences *preferences = [[pluginView webView] preferences];
- NetscapePluginHostProxy* hostProxy = hostForPackage(pluginPackage, [preferences usesProxiedOpenPanel]);
+ NetscapePluginHostProxy* hostProxy = hostForPlugin(pluginPath, pluginArchitecture, bundleIdentifier);
if (!hostProxy)
return 0;
@@ -257,7 +252,7 @@ PassRefPtr<NetscapePluginInstanceProxy> NetscapePluginHostManager::instantiatePl
pluginHostDied(hostProxy);
// Try to spawn it again.
- hostProxy = hostForPackage(pluginPackage, [preferences usesProxiedOpenPanel]);
+ hostProxy = hostForPlugin(pluginPath, pluginArchitecture, bundleIdentifier);
// Create a new instance.
instance = NetscapePluginInstanceProxy::create(hostProxy, pluginView, fullFrame);
@@ -272,16 +267,16 @@ PassRefPtr<NetscapePluginInstanceProxy> NetscapePluginHostManager::instantiatePl
}
instance->setRenderContextID(reply->m_renderContextID);
- instance->setUseSoftwareRenderer(reply->m_useSoftwareRenderer);
+ instance->setRendererType(reply->m_rendererType);
return instance.release();
}
-void NetscapePluginHostManager::createPropertyListFile(WebNetscapePluginPackage *package)
+void NetscapePluginHostManager::createPropertyListFile(const String& pluginPath, cpu_type_t pluginArchitecture)
{
NSString *pluginHostAppPath = [[NSBundle bundleWithIdentifier:@"com.apple.WebKit"] pathForAuxiliaryExecutable:pluginHostAppName];
NSString *pluginHostAppExecutablePath = [[NSBundle bundleWithPath:pluginHostAppPath] executablePath];
- NSString *bundlePath = [package path];
+ NSString *bundlePath = pluginPath;
pid_t pid;
posix_spawnattr_t attr;
@@ -289,7 +284,7 @@ void NetscapePluginHostManager::createPropertyListFile(WebNetscapePluginPackage
// Set the architecture.
size_t ocount = 0;
- int cpuTypes[1] = { [package pluginHostArchitecture] };
+ int cpuTypes[] = { pluginArchitecture };
posix_spawnattr_setbinpref_np(&attr, 1, cpuTypes, &ocount);
// Spawn the plug-in host and tell it to call the registration function.
@@ -323,4 +318,4 @@ void NetscapePluginHostManager::didCreateWindow()
} // namespace WebKit
-#endif // USE(PLUGIN_HOST_PROCESS)
+#endif // USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.h b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.h
index cd3729f..20db5d2 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.h
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.h
@@ -43,8 +43,8 @@ class NetscapePluginHostProxy {
public:
NetscapePluginHostProxy(mach_port_t clientPort, mach_port_t pluginHostPort, const ProcessSerialNumber& pluginHostPSN, bool shouldCacheMissingPropertiesAndMethods);
- mach_port_t port() const { return m_pluginHostPort; }
- mach_port_t clientPort() const { return m_clientPort; }
+ mach_port_t port() const { ASSERT(fastMallocSize(this)); return m_pluginHostPort; }
+ mach_port_t clientPort() const { ASSERT(fastMallocSize(this)); return m_clientPort; }
void addPluginInstance(NetscapePluginInstanceProxy*);
void removePluginInstance(NetscapePluginInstanceProxy*);
@@ -54,15 +54,15 @@ public:
bool isMenuBarVisible() const { return m_menuBarIsVisible; }
void setMenuBarVisible(bool);
- bool isFullScreenWindowShowing() const { return m_fullScreenWindowIsShowing; }
- void setFullScreenWindowIsShowing(bool);
+ bool isFullscreenWindowShowing() const { return m_fullscreenWindowIsShowing; }
+ void setFullscreenWindowIsShowing(bool);
void setModal(bool);
void applicationDidBecomeActive();
bool processRequests();
- bool isProcessingRequests() const { return m_processingRequests; }
+ static bool isProcessingRequests() { return s_processingRequests; }
bool shouldCacheMissingPropertiesAndMethods() const { return m_shouldCacheMissingPropertiesAndMethods; }
@@ -73,8 +73,8 @@ private:
void beginModal();
void endModal();
- void didEnterFullScreen() const;
- void didExitFullScreen() const;
+ void didEnterFullscreen() const;
+ void didExitFullscreen() const;
static void deadNameNotificationCallback(CFMachPortRef, void *msg, CFIndex size, void *info);
@@ -84,11 +84,7 @@ private:
mach_port_t m_clientPort;
mach_port_t m_portSet;
-#ifdef USE_LIBDISPATCH
- dispatch_source_t m_clientPortSource;
-#else
RetainPtr<CFRunLoopSourceRef> m_clientPortSource;
-#endif
mach_port_t m_pluginHostPort;
RetainPtr<CFMachPortRef> m_deadNameNotificationPort;
@@ -96,10 +92,10 @@ private:
RetainPtr<WebPlaceholderModalWindow *> m_placeholderWindow;
unsigned m_isModal;
bool m_menuBarIsVisible;
- bool m_fullScreenWindowIsShowing;
+ bool m_fullscreenWindowIsShowing;
const ProcessSerialNumber m_pluginHostPSN;
- unsigned m_processingRequests;
+ static unsigned s_processingRequests;
bool m_shouldCacheMissingPropertiesAndMethods;
};
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
index c5beb07..4506f03 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
@@ -23,7 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#if USE(PLUGIN_HOST_PROCESS)
+#if USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
#import "NetscapePluginHostProxy.h"
@@ -74,7 +74,8 @@ public:
~PluginDestroyDeferrer()
{
- m_proxy->didCallPluginFunction();
+ bool stopped;
+ m_proxy->didCallPluginFunction(stopped);
}
private:
@@ -89,15 +90,16 @@ static PluginProxyMap& pluginProxyMap()
return pluginProxyMap;
}
+unsigned NetscapePluginHostProxy::s_processingRequests;
+
NetscapePluginHostProxy::NetscapePluginHostProxy(mach_port_t clientPort, mach_port_t pluginHostPort, const ProcessSerialNumber& pluginHostPSN, bool shouldCacheMissingPropertiesAndMethods)
: m_clientPort(clientPort)
, m_portSet(MACH_PORT_NULL)
, m_pluginHostPort(pluginHostPort)
, m_isModal(false)
, m_menuBarIsVisible(true)
- , m_fullScreenWindowIsShowing(false)
+ , m_fullscreenWindowIsShowing(false)
, m_pluginHostPSN(pluginHostPSN)
- , m_processingRequests(0)
, m_shouldCacheMissingPropertiesAndMethods(shouldCacheMissingPropertiesAndMethods)
{
pluginProxyMap().add(m_clientPort, this);
@@ -115,15 +117,9 @@ NetscapePluginHostProxy::NetscapePluginHostProxy(mach_port_t clientPort, mach_po
CFRunLoopAddSource(CFRunLoopGetCurrent(), deathPortSource.get(), kCFRunLoopDefaultMode);
-#ifdef USE_LIBDISPATCH
- // FIXME: Unfortunately we can't use a dispatch source here until <rdar://problem/6393180> has been resolved.
- m_clientPortSource = dispatch_source_mig_create(m_clientPort, WKWebKitPluginClient_subsystem.maxsize, 0,
- dispatch_get_main_queue(), WebKitPluginClient_server);
-#else
m_clientPortSource.adoptCF(WKCreateMIGServerSource((mig_subsystem_t)&WKWebKitPluginClient_subsystem, m_clientPort));
CFRunLoopAddSource(CFRunLoopGetCurrent(), m_clientPortSource.get(), kCFRunLoopDefaultMode);
CFRunLoopAddSource(CFRunLoopGetCurrent(), m_clientPortSource.get(), (CFStringRef)NSEventTrackingRunLoopMode);
-#endif
}
NetscapePluginHostProxy::~NetscapePluginHostProxy()
@@ -138,12 +134,8 @@ NetscapePluginHostProxy::~NetscapePluginHostProxy()
}
ASSERT(m_clientPortSource);
-#ifdef USE_LIBDISPATCH
- dispatch_release(m_clientPortSource);
-#else
CFRunLoopSourceInvalidate(m_clientPortSource.get());
m_clientPortSource = 0;
-#endif
}
void NetscapePluginHostProxy::pluginHostDied()
@@ -184,7 +176,9 @@ void NetscapePluginHostProxy::removePluginInstance(NetscapePluginInstanceProxy*
NetscapePluginInstanceProxy* NetscapePluginHostProxy::pluginInstance(uint32_t pluginID)
{
- return m_instances.get(pluginID).get();
+ NetscapePluginInstanceProxy* result = m_instances.get(pluginID).get();
+ ASSERT(!result || result->hostProxy() == this);
+ return result;
}
void NetscapePluginHostProxy::deadNameNotificationCallback(CFMachPortRef port, void *msg, CFIndex size, void *info)
@@ -202,12 +196,12 @@ void NetscapePluginHostProxy::setMenuBarVisible(bool visible)
[NSMenu setMenuBarVisible:visible];
}
-void NetscapePluginHostProxy::didEnterFullScreen() const
+void NetscapePluginHostProxy::didEnterFullscreen() const
{
SetFrontProcess(&m_pluginHostPSN);
}
-void NetscapePluginHostProxy::didExitFullScreen() const
+void NetscapePluginHostProxy::didExitFullscreen() const
{
// If the plug-in host is the current application then we should bring ourselves to the front when it exits full-screen mode.
@@ -223,16 +217,16 @@ void NetscapePluginHostProxy::didExitFullScreen() const
SetFrontProcess(&currentProcess);
}
-void NetscapePluginHostProxy::setFullScreenWindowIsShowing(bool isShowing)
+void NetscapePluginHostProxy::setFullscreenWindowIsShowing(bool isShowing)
{
- if (m_fullScreenWindowIsShowing == isShowing)
+ if (m_fullscreenWindowIsShowing == isShowing)
return;
- m_fullScreenWindowIsShowing = isShowing;
- if (m_fullScreenWindowIsShowing)
- didEnterFullScreen();
+ m_fullscreenWindowIsShowing = isShowing;
+ if (m_fullscreenWindowIsShowing)
+ didEnterFullscreen();
else
- didExitFullScreen();
+ didExitFullscreen();
}
@@ -294,7 +288,7 @@ void NetscapePluginHostProxy::setModal(bool modal)
bool NetscapePluginHostProxy::processRequests()
{
- m_processingRequests++;
+ s_processingRequests++;
if (!m_portSet) {
mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_PORT_SET, &m_portSet);
@@ -310,7 +304,7 @@ bool NetscapePluginHostProxy::processRequests()
if (kr != KERN_SUCCESS) {
LOG_ERROR("Could not receive mach message, error %x", kr);
- m_processingRequests--;
+ s_processingRequests--;
return false;
}
@@ -323,24 +317,24 @@ bool NetscapePluginHostProxy::processRequests()
if (kr != KERN_SUCCESS) {
LOG_ERROR("Could not send mach message, error %x", kr);
- m_processingRequests--;
+ s_processingRequests--;
return false;
}
}
- m_processingRequests--;
+ s_processingRequests--;
return true;
}
if (msg->msgh_local_port == CFMachPortGetPort(m_deadNameNotificationPort.get())) {
ASSERT(msg->msgh_id == MACH_NOTIFY_DEAD_NAME);
pluginHostDied();
- m_processingRequests--;
+ s_processingRequests--;
return false;
}
ASSERT_NOT_REACHED();
- m_processingRequests--;
+ s_processingRequests--;
return false;
}
@@ -437,7 +431,7 @@ kern_return_t WKPCInvalidateRect(mach_port_t clientPort, uint32_t pluginID, doub
if (NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID))
instanceProxy->invalidateRect(x, y, width, height);
return KERN_SUCCESS;
- }
+ }
// Defer the work
CFRunLoopPerformBlock(CFRunLoopGetMain(), kCFRunLoopDefaultMode, ^{
@@ -496,7 +490,7 @@ kern_return_t WKPCBooleanAndDataReply(mach_port_t clientPort, uint32_t pluginID,
return KERN_SUCCESS;
}
-kern_return_t WKPCInstantiatePluginReply(mach_port_t clientPort, uint32_t pluginID, uint32_t requestID, kern_return_t result, uint32_t renderContextID, boolean_t useSoftwareRenderer)
+kern_return_t WKPCInstantiatePluginReply(mach_port_t clientPort, uint32_t pluginID, uint32_t requestID, kern_return_t result, uint32_t renderContextID, uint32_t rendererType)
{
NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort);
if (!hostProxy)
@@ -506,7 +500,7 @@ kern_return_t WKPCInstantiatePluginReply(mach_port_t clientPort, uint32_t plugin
if (!instanceProxy)
return KERN_FAILURE;
- instanceProxy->setCurrentReply(requestID, new NetscapePluginInstanceProxy::InstantiatePluginReply(result, renderContextID, useSoftwareRenderer));
+ instanceProxy->setCurrentReply(requestID, new NetscapePluginInstanceProxy::InstantiatePluginReply(result, renderContextID, static_cast<RendererType>(rendererType)));
return KERN_SUCCESS;
}
@@ -546,7 +540,7 @@ kern_return_t WKPCGetPluginElementNPObject(mach_port_t clientPort, uint32_t plug
return KERN_SUCCESS;
}
-kern_return_t WKPCReleaseObject(mach_port_t clientPort, uint32_t pluginID, uint32_t objectID)
+kern_return_t WKPCForgetBrowserObject(mach_port_t clientPort, uint32_t pluginID, uint32_t objectID)
{
NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort);
if (!hostProxy)
@@ -556,8 +550,7 @@ kern_return_t WKPCReleaseObject(mach_port_t clientPort, uint32_t pluginID, uint3
if (!instanceProxy)
return KERN_FAILURE;
- instanceProxy->releaseObject(objectID);
- return KERN_SUCCESS;
+ return instanceProxy->forgetBrowserObjectID(objectID) ? KERN_SUCCESS : KERN_FAILURE;
}
kern_return_t WKPCEvaluate(mach_port_t clientPort, uint32_t pluginID, uint32_t requestID, uint32_t objectID, data_t scriptData, mach_msg_type_number_t scriptLength, boolean_t allowPopups)
@@ -579,7 +572,11 @@ kern_return_t WKPCEvaluate(mach_port_t clientPort, uint32_t pluginID, uint32_t r
data_t resultData = 0;
mach_msg_type_number_t resultLength = 0;
boolean_t returnValue = instanceProxy->evaluate(objectID, script, resultData, resultLength, allowPopups);
-
+
+ hostProxy = instanceProxy->hostProxy();
+ if (!hostProxy)
+ return KERN_FAILURE;
+
_WKPHBooleanAndDataReply(hostProxy->port(), instanceProxy->pluginID(), requestID, returnValue, resultData, resultLength);
if (resultData)
mig_deallocate(reinterpret_cast<vm_address_t>(resultData), resultLength);
@@ -611,7 +608,7 @@ static Identifier identifierFromIdentifierRep(IdentifierRep* identifier)
ASSERT(identifier->isString());
const char* str = identifier->string();
- return Identifier(JSDOMWindow::commonJSGlobalData(), String::fromUTF8WithLatin1Fallback(str, strlen(str)));
+ return Identifier(JSDOMWindow::commonJSGlobalData(), stringToUString(String::fromUTF8WithLatin1Fallback(str, strlen(str))));
}
kern_return_t WKPCInvoke(mach_port_t clientPort, uint32_t pluginID, uint32_t requestID, uint32_t objectID, uint64_t serverIdentifier,
@@ -638,7 +635,11 @@ kern_return_t WKPCInvoke(mach_port_t clientPort, uint32_t pluginID, uint32_t req
data_t resultData = 0;
mach_msg_type_number_t resultLength = 0;
boolean_t returnValue = instanceProxy->invoke(objectID, methodNameIdentifier, argumentsData, argumentsLength, resultData, resultLength);
-
+
+ hostProxy = instanceProxy->hostProxy();
+ if (!hostProxy)
+ return KERN_FAILURE;
+
_WKPHBooleanAndDataReply(hostProxy->port(), instanceProxy->pluginID(), requestID, returnValue, resultData, resultLength);
if (resultData)
mig_deallocate(reinterpret_cast<vm_address_t>(resultData), resultLength);
@@ -664,7 +665,11 @@ kern_return_t WKPCInvokeDefault(mach_port_t clientPort, uint32_t pluginID, uint3
data_t resultData = 0;
mach_msg_type_number_t resultLength = 0;
boolean_t returnValue = instanceProxy->invokeDefault(objectID, argumentsData, argumentsLength, resultData, resultLength);
-
+
+ hostProxy = instanceProxy->hostProxy();
+ if (!hostProxy)
+ return KERN_FAILURE;
+
_WKPHBooleanAndDataReply(hostProxy->port(), instanceProxy->pluginID(), requestID, returnValue, resultData, resultLength);
if (resultData)
mig_deallocate(reinterpret_cast<vm_address_t>(resultData), resultLength);
@@ -702,7 +707,7 @@ kern_return_t WKPCGetProperty(mach_port_t clientPort, uint32_t pluginID, uint32_
NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID);
if (!instanceProxy)
return KERN_FAILURE;
-
+
IdentifierRep* identifier = reinterpret_cast<IdentifierRep*>(serverIdentifier);
if (!IdentifierRep::isValid(identifier))
return KERN_FAILURE;
@@ -718,7 +723,11 @@ kern_return_t WKPCGetProperty(mach_port_t clientPort, uint32_t pluginID, uint32_
returnValue = instanceProxy->getProperty(objectID, propertyNameIdentifier, resultData, resultLength);
} else
returnValue = instanceProxy->setProperty(objectID, identifier->number(), resultData, resultLength);
-
+
+ hostProxy = instanceProxy->hostProxy();
+ if (!hostProxy)
+ return KERN_FAILURE;
+
_WKPHBooleanAndDataReply(hostProxy->port(), instanceProxy->pluginID(), requestID, returnValue, resultData, resultLength);
if (resultData)
mig_deallocate(reinterpret_cast<vm_address_t>(resultData), resultLength);
@@ -751,6 +760,10 @@ kern_return_t WKPCSetProperty(mach_port_t clientPort, uint32_t pluginID, uint32_
} else
result = instanceProxy->setProperty(objectID, identifier->number(), valueData, valueLength);
+ hostProxy = instanceProxy->hostProxy();
+ if (!hostProxy)
+ return KERN_FAILURE;
+
_WKPHBooleanReply(hostProxy->port(), instanceProxy->pluginID(), requestID, result);
return KERN_SUCCESS;
@@ -779,6 +792,10 @@ kern_return_t WKPCRemoveProperty(mach_port_t clientPort, uint32_t pluginID, uint
} else
result = instanceProxy->removeProperty(objectID, identifier->number());
+ hostProxy = instanceProxy->hostProxy();
+ if (!hostProxy)
+ return KERN_FAILURE;
+
_WKPHBooleanReply(hostProxy->port(), instanceProxy->pluginID(), requestID, result);
return KERN_SUCCESS;
@@ -806,7 +823,11 @@ kern_return_t WKPCHasProperty(mach_port_t clientPort, uint32_t pluginID, uint32_
returnValue = instanceProxy->hasProperty(objectID, propertyNameIdentifier);
} else
returnValue = instanceProxy->hasProperty(objectID, identifier->number());
-
+
+ hostProxy = instanceProxy->hostProxy();
+ if (!hostProxy)
+ return KERN_FAILURE;
+
_WKPHBooleanReply(hostProxy->port(), instanceProxy->pluginID(), requestID, returnValue);
return KERN_SUCCESS;
@@ -831,6 +852,10 @@ kern_return_t WKPCHasMethod(mach_port_t clientPort, uint32_t pluginID, uint32_t
Identifier methodNameIdentifier = identifierFromIdentifierRep(identifier);
boolean_t returnValue = instanceProxy->hasMethod(objectID, methodNameIdentifier);
+ hostProxy = instanceProxy->hostProxy();
+ if (!hostProxy)
+ return KERN_FAILURE;
+
_WKPHBooleanReply(hostProxy->port(), instanceProxy->pluginID(), requestID, returnValue);
return KERN_SUCCESS;
@@ -873,7 +898,11 @@ kern_return_t WKPCEnumerate(mach_port_t clientPort, uint32_t pluginID, uint32_t
data_t resultData = 0;
mach_msg_type_number_t resultLength = 0;
boolean_t returnValue = instanceProxy->enumerate(objectID, resultData, resultLength);
-
+
+ hostProxy = instanceProxy->hostProxy();
+ if (!hostProxy)
+ return KERN_FAILURE;
+
_WKPHBooleanAndDataReply(hostProxy->port(), instanceProxy->pluginID(), requestID, returnValue, resultData, resultLength);
if (resultData)
@@ -893,13 +922,13 @@ kern_return_t WKPCSetMenuBarVisible(mach_port_t clientPort, boolean_t menuBarVis
return KERN_SUCCESS;
}
-kern_return_t WKPCSetFullScreenWindowIsShowing(mach_port_t clientPort, boolean_t fullScreenWindowIsShowing)
+kern_return_t WKPCSetFullscreenWindowIsShowing(mach_port_t clientPort, boolean_t fullscreenWindowIsShowing)
{
NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort);
if (!hostProxy)
return KERN_FAILURE;
- hostProxy->setFullScreenWindowIsShowing(fullScreenWindowIsShowing);
+ hostProxy->setFullscreenWindowIsShowing(fullscreenWindowIsShowing);
return KERN_SUCCESS;
}
@@ -909,9 +938,18 @@ kern_return_t WKPCSetModal(mach_port_t clientPort, boolean_t modal)
NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort);
if (!hostProxy)
return KERN_FAILURE;
-
- hostProxy->setModal(modal);
-
+
+ if (!hostProxy->isProcessingRequests()) {
+ hostProxy->setModal(modal);
+ return KERN_SUCCESS;
+ }
+
+ // Defer the work
+ CFRunLoopPerformBlock(CFRunLoopGetMain(), kCFRunLoopDefaultMode, ^{
+ if (NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort))
+ hostProxy->setModal(modal);
+ });
+
return KERN_SUCCESS;
}
@@ -1083,57 +1121,6 @@ kern_return_t WKPCResolveURL(mach_port_t clientPort, uint32_t pluginID, data_t u
return KERN_SUCCESS;
}
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
-kern_return_t WKPCRunSyncOpenPanel(mach_port_t clientPort, data_t panelData, mach_msg_type_number_t panelDataLength)
-{
- DataDeallocator panelDataDeallocator(panelData, panelDataLength);
-
- NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort);
- if (!hostProxy)
- return KERN_FAILURE;
-
- NSOpenPanel *sheet = [NSOpenPanel openPanel];
- NSDictionary *panelState = [NSPropertyListSerialization propertyListFromData:[NSData dataWithBytes:panelData length:panelDataLength]
- mutabilityOption:NSPropertyListImmutable
- format:NULL
- errorDescription:nil];
-
- [sheet setCanChooseFiles:[[panelState objectForKey:@"canChooseFiles"] boolValue]];
- [sheet setCanChooseDirectories:[[panelState objectForKey:@"canChooseDirectories"] boolValue]];
- [sheet setResolvesAliases:[[panelState objectForKey:@"resolvesAliases"] boolValue]];
- [sheet setAllowsMultipleSelection:[[panelState objectForKey:@"allowsMultipleSelection"] boolValue]];
- [sheet setCanCreateDirectories:[[panelState objectForKey:@"canCreateDirectories"] boolValue]];
- [sheet setShowsHiddenFiles:[[panelState objectForKey:@"showsHiddenFiles"] boolValue]];
- [sheet setExtensionHidden:[[panelState objectForKey:@"isExtensionHidden"] boolValue]];
- [sheet setCanSelectHiddenExtension:[[panelState objectForKey:@"canSelectHiddenExtension"] boolValue]];
- [sheet setAllowsOtherFileTypes:[[panelState objectForKey:@"allowsOtherFileTypes"] boolValue]];
- [sheet setTreatsFilePackagesAsDirectories:[[panelState objectForKey:@"treatsFilePackagesAsDirectories"] boolValue]];
- [sheet setPrompt:[panelState objectForKey:@"prompt"]];
- [sheet setNameFieldLabel:[panelState objectForKey:@"nameFieldLabel"]];
- [sheet setMessage:[panelState objectForKey:@"message"]];
- [sheet setAllowedFileTypes:[panelState objectForKey:@"allowedFileTypes"]];
- [sheet setRequiredFileType:[panelState objectForKey:@"requiredFileType"]];
- [sheet setTitle:[panelState objectForKey:@"title"]];
- [sheet runModal];
-
- NSDictionary *ret = [NSDictionary dictionaryWithObjectsAndKeys:
- [sheet filenames], @"filenames",
- WKNoteOpenPanelFiles([sheet filenames]), @"extensions",
- nil];
-
- RetainPtr<NSData*> data = [NSPropertyListSerialization dataFromPropertyList:ret format:NSPropertyListBinaryFormat_v1_0 errorDescription:0];
- ASSERT(data);
-
- _WKPHSyncOpenPanelReply(hostProxy->port(), const_cast<char *>(static_cast<const char*>([data.get() bytes])), [data.get() length]);
- return KERN_SUCCESS;
-}
-#else
-kern_return_t WKPCRunSyncOpenPanel(mach_port_t clientPort, data_t panelData, mach_msg_type_number_t panelDataLength)
-{
- return KERN_FAILURE;
-}
-#endif // !defined(BUILDING_ON_SNOW_LEOPARD)
-
kern_return_t WKPCSetException(mach_port_t clientPort, data_t message, mach_msg_type_number_t messageCnt)
{
DataDeallocator deallocator(message, messageCnt);
@@ -1144,4 +1131,4 @@ kern_return_t WKPCSetException(mach_port_t clientPort, data_t message, mach_msg_
return KERN_SUCCESS;
}
-#endif // USE(PLUGIN_HOST_PROCESS)
+#endif // USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
index 76981a4..f784ade 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
@@ -32,21 +32,19 @@
#include <WebCore/Timer.h>
#include <WebKit/npapi.h>
#include <wtf/Deque.h>
+#include <wtf/Forward.h>
#include <wtf/HashMap.h>
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/RetainPtr.h>
#include "WebKitPluginHostTypes.h"
-namespace WebCore {
- class String;
-}
-
namespace JSC {
namespace Bindings {
class Instance;
class RootObject;
}
+ class ArgList;
}
@class WebHostedNetscapePluginView;
@class WebFrame;
@@ -60,10 +58,7 @@ class ProxyInstance;
class NetscapePluginInstanceProxy : public RefCounted<NetscapePluginInstanceProxy> {
public:
- static PassRefPtr<NetscapePluginInstanceProxy> create(NetscapePluginHostProxy* pluginHostProxy, WebHostedNetscapePluginView *pluginView, bool fullFramePlugin)
- {
- return adoptRef(new NetscapePluginInstanceProxy(pluginHostProxy, pluginView, fullFramePlugin));
- }
+ static PassRefPtr<NetscapePluginInstanceProxy> create(NetscapePluginHostProxy*, WebHostedNetscapePluginView *, bool fullFramePlugin);
~NetscapePluginInstanceProxy();
uint32_t pluginID() const
@@ -72,14 +67,14 @@ public:
return m_pluginID;
}
- uint32_t renderContextID() const { return m_renderContextID; }
+ uint32_t renderContextID() const { ASSERT(fastMallocSize(this)); return m_renderContextID; }
void setRenderContextID(uint32_t renderContextID) { m_renderContextID = renderContextID; }
- bool useSoftwareRenderer() const { return m_useSoftwareRenderer; }
- void setUseSoftwareRenderer(bool useSoftwareRenderer) { m_useSoftwareRenderer = useSoftwareRenderer; }
+ RendererType rendererType() const { return m_rendererType; }
+ void setRendererType(RendererType rendererType) { m_rendererType = rendererType; }
- WebHostedNetscapePluginView *pluginView() const { return m_pluginView; }
- NetscapePluginHostProxy* hostProxy() const { return m_pluginHostProxy; }
+ WebHostedNetscapePluginView *pluginView() const { ASSERT(fastMallocSize(this)); return m_pluginView; }
+ NetscapePluginHostProxy* hostProxy() const { ASSERT(fastMallocSize(this)); return m_pluginHostProxy; }
bool cancelStreamLoad(uint32_t streamID, NPReason);
void disconnectStream(HostedNetscapePluginStream*);
@@ -89,7 +84,7 @@ public:
void pluginHostDied();
- void resize(NSRect size, NSRect clipRect, bool sync);
+ void resize(NSRect size, NSRect clipRect);
void destroy();
void focusChanged(bool hasFocus);
void windowFocusChanged(bool hasFocus);
@@ -102,6 +97,7 @@ public:
void syntheticKeyDownWithCommandModifier(int keyCode, char character);
void flagsChanged(NSEvent *);
void print(CGContextRef, unsigned width, unsigned height);
+ void snapshot(CGContextRef, unsigned width, unsigned height);
void startTimers(bool throttleTimers);
void stopTimers();
@@ -111,9 +107,9 @@ public:
// NPRuntime
bool getWindowNPObject(uint32_t& objectID);
bool getPluginElementNPObject(uint32_t& objectID);
- void releaseObject(uint32_t objectID);
-
- bool evaluate(uint32_t objectID, const WebCore::String& script, data_t& resultData, mach_msg_type_number_t& resultLength, bool allowPopups);
+ bool forgetBrowserObjectID(uint32_t objectID); // Will fail if the ID is being sent to plug-in right now (i.e., retain/release calls aren't balanced).
+
+ bool evaluate(uint32_t objectID, const WTF::String& script, data_t& resultData, mach_msg_type_number_t& resultLength, bool allowPopups);
bool invoke(uint32_t objectID, const JSC::Identifier& methodName, data_t argumentsData, mach_msg_type_number_t argumentsLength, data_t& resultData, mach_msg_type_number_t& resultLength);
bool invokeDefault(uint32_t objectID, data_t argumentsData, mach_msg_type_number_t argumentsLength, data_t& resultData, mach_msg_type_number_t& resultLength);
bool construct(uint32_t objectID, data_t argumentsData, mach_msg_type_number_t argumentsLength, data_t& resultData, mach_msg_type_number_t& resultLength);
@@ -143,9 +139,13 @@ public:
PassRefPtr<JSC::Bindings::Instance> createBindingsInstance(PassRefPtr<JSC::Bindings::RootObject>);
RetainPtr<NSData *> marshalValues(JSC::ExecState*, const JSC::ArgList& args);
- void marshalValue(JSC::ExecState*, JSC::JSValue value, data_t& resultData, mach_msg_type_number_t& resultLength);
+ void marshalValue(JSC::ExecState*, JSC::JSValue, data_t& resultData, mach_msg_type_number_t& resultLength);
JSC::JSValue demarshalValue(JSC::ExecState*, const char* valueData, mach_msg_type_number_t valueLength);
+ // No-op if the value does not contain a local object.
+ void retainLocalObject(JSC::JSValue);
+ void releaseLocalObject(JSC::JSValue);
+
void addInstance(ProxyInstance*);
void removeInstance(ProxyInstance*);
@@ -153,7 +153,7 @@ public:
void invalidate();
void willCallPluginFunction();
- void didCallPluginFunction();
+ void didCallPluginFunction(bool& stopped);
bool shouldStop();
uint32_t nextRequestID();
@@ -167,7 +167,7 @@ public:
void didDraw();
void privateBrowsingModeDidChange(bool isPrivateBrowsingEnabled);
- static void setGlobalException(const WebCore::String&);
+ static void setGlobalException(const WTF::String&);
static void moveGlobalExceptionToExecState(JSC::ExecState*);
// Reply structs
@@ -192,17 +192,17 @@ public:
struct InstantiatePluginReply : public Reply {
static const int ReplyType = InstantiatePlugin;
- InstantiatePluginReply(kern_return_t resultCode, uint32_t renderContextID, boolean_t useSoftwareRenderer)
+ InstantiatePluginReply(kern_return_t resultCode, uint32_t renderContextID, RendererType rendererType)
: Reply(InstantiatePlugin)
, m_resultCode(resultCode)
, m_renderContextID(renderContextID)
- , m_useSoftwareRenderer(useSoftwareRenderer)
+ , m_rendererType(rendererType)
{
}
kern_return_t m_resultCode;
uint32_t m_renderContextID;
- boolean_t m_useSoftwareRenderer;
+ RendererType m_rendererType;
};
struct GetScriptableNPObjectReply : public Reply {
@@ -252,8 +252,9 @@ public:
template <typename T>
std::auto_ptr<T> waitForReply(uint32_t requestID)
{
+ RefPtr<NetscapePluginInstanceProxy> protect(this); // Plug-in host may crash while we are waiting for reply, releasing all instances to the instance proxy.
+
willCallPluginFunction();
-
m_waitingForReply = true;
Reply* reply = processRequestsAndWaitForReply(requestID);
@@ -261,8 +262,14 @@ public:
ASSERT(reply->m_type == T::ReplyType);
m_waitingForReply = false;
-
- didCallPluginFunction();
+
+ bool stopped = false;
+ didCallPluginFunction(stopped);
+ if (stopped) {
+ // The instance proxy may have been deleted from didCallPluginFunction(), so a null reply needs to be returned.
+ delete static_cast<T*>(reply);
+ return std::auto_ptr<T>();
+ }
return std::auto_ptr<T>(static_cast<T*>(reply));
}
@@ -294,23 +301,40 @@ private:
uint32_t m_pluginID;
uint32_t m_renderContextID;
- boolean_t m_useSoftwareRenderer;
+ RendererType m_rendererType;
bool m_waitingForReply;
HashMap<uint32_t, Reply*> m_replies;
// NPRuntime
- uint32_t idForObject(JSC::JSObject*);
-
+
void addValueToArray(NSMutableArray *, JSC::ExecState* exec, JSC::JSValue value);
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);
- uint32_t m_objectIDCounter;
- typedef HashMap<uint32_t, JSC::ProtectedPtr<JSC::JSObject> > ObjectMap;
- ObjectMap m_objects;
-
+ class LocalObjectMap : Noncopyable {
+ public:
+ LocalObjectMap();
+ ~LocalObjectMap();
+ uint32_t idForObject(JSC::JSObject*);
+ void retain(JSC::JSObject*);
+ void release(JSC::JSObject*);
+ void clear();
+ bool forget(uint32_t);
+ bool contains(uint32_t) const;
+ JSC::JSObject* get(uint32_t) const;
+
+ private:
+ HashMap<uint32_t, JSC::ProtectedPtr<JSC::JSObject> > m_idToJSObjectMap;
+ // The pair consists of object ID and a reference count. One reference belongs to remote plug-in,
+ // and the proxy will add transient references for arguments that are being sent out.
+ HashMap<JSC::JSObject*, pair<uint32_t, uint32_t> > m_jsObjectToIDMap;
+ uint32_t m_objectIDCounter;
+ };
+
+ LocalObjectMap m_localObjects;
+
typedef HashSet<ProxyInstance*> ProxyInstanceSet;
ProxyInstanceSet m_instances;
@@ -321,7 +345,19 @@ private:
unsigned m_pluginFunctionCallDepth;
bool m_shouldStopSoon;
uint32_t m_currentRequestID;
- bool m_inDestroy;
+
+ // All NPRuntime functions will return false when destroying a plug-in. This is necessary because there may be unhandled messages waiting,
+ // and spinning in processRequests() will unexpectedly execute them from inside destroy(). That's not a good time to execute arbitrary JavaScript,
+ // since both loading and rendering data structures may be in inconsistent state.
+ // This suppresses calls from all plug-ins, even those in different pages, since JS might affect the frame with plug-in that's being stopped.
+ //
+ // FIXME: Plug-ins can execute arbitrary JS from destroy() in same process case, and other browsers also support that.
+ // A better fix may be to make sure that unrelated messages are postponed until after destroy() returns.
+ // Another possible fix may be to send destroy message at a time when internal structures are consistent.
+ //
+ // FIXME: We lack similar message suppression in other cases - resize() is also triggered by layout, so executing arbitrary JS is also problematic.
+ static bool m_inDestroy;
+
bool m_pluginIsWaitingForDraw;
RefPtr<HostedNetscapePluginStream> m_manualStream;
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
index c09e3ea..ecaa0d6 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
@@ -23,13 +23,14 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#if USE(PLUGIN_HOST_PROCESS)
+#if USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
#import "NetscapePluginInstanceProxy.h"
#import "HostedNetscapePluginStream.h"
#import "NetscapePluginHostProxy.h"
#import "ProxyInstance.h"
+#import "ProxyRuntimeObject.h"
#import "WebDataSourceInternal.h"
#import "WebFrameInternal.h"
#import "WebHostedNetscapePluginView.h"
@@ -43,13 +44,13 @@
#import <JavaScriptCore/Error.h>
#import <JavaScriptCore/JSLock.h>
#import <JavaScriptCore/PropertyNameArray.h>
-#import <WebCore/CString.h>
#import <WebCore/CookieJar.h>
#import <WebCore/DocumentLoader.h>
#import <WebCore/Frame.h>
#import <WebCore/FrameLoader.h>
#import <WebCore/FrameTree.h>
#import <WebCore/KURL.h>
+#import <WebCore/ProxyServer.h>
#import <WebCore/SecurityOrigin.h>
#import <WebCore/ScriptController.h>
#import <WebCore/ScriptValue.h>
@@ -60,6 +61,7 @@
#import <mach/mach.h>
#import <utility>
#import <wtf/RefCountedLeakCounter.h>
+#import <wtf/text/CString.h>
extern "C" {
#import "WebKitPluginClientServer.h"
@@ -100,8 +102,113 @@ private:
bool m_allowPopups;
};
+NetscapePluginInstanceProxy::LocalObjectMap::LocalObjectMap()
+ : m_objectIDCounter(0)
+{
+}
+
+NetscapePluginInstanceProxy::LocalObjectMap::~LocalObjectMap()
+{
+}
+
+inline bool NetscapePluginInstanceProxy::LocalObjectMap::contains(uint32_t objectID) const
+{
+ return m_idToJSObjectMap.contains(objectID);
+}
+
+inline JSC::JSObject* NetscapePluginInstanceProxy::LocalObjectMap::get(uint32_t objectID) const
+{
+ if (objectID == HashTraits<uint32_t>::emptyValue() || HashTraits<uint32_t>::isDeletedValue(objectID))
+ return 0;
+
+ return m_idToJSObjectMap.get(objectID);
+}
+
+uint32_t NetscapePluginInstanceProxy::LocalObjectMap::idForObject(JSObject* object)
+{
+ // This method creates objects with refcount of 1, but doesn't increase refcount when returning
+ // found objects. This extra count accounts for the main "reference" kept by plugin process.
+
+ // To avoid excessive IPC, plugin process doesn't send each NPObject release/retain call to
+ // Safari. It only sends one when the last reference is removed, and it can destroy the proxy
+ // NPObject.
+
+ // However, the browser may be sending the same object out to plug-in as a function call
+ // argument at the same time - neither side can know what the other one is doing. So,
+ // is to make PCForgetBrowserObject call return a boolean result, making it possible for
+ // the browser to make plugin host keep the proxy with zero refcount for a little longer.
+
+ uint32_t objectID = 0;
+
+ HashMap<JSC::JSObject*, pair<uint32_t, uint32_t> >::iterator iter = m_jsObjectToIDMap.find(object);
+ if (iter != m_jsObjectToIDMap.end())
+ return iter->second.first;
+
+ do {
+ objectID = ++m_objectIDCounter;
+ } while (!m_objectIDCounter || m_objectIDCounter == static_cast<uint32_t>(-1) || m_idToJSObjectMap.contains(objectID));
+
+ m_idToJSObjectMap.set(objectID, object);
+ m_jsObjectToIDMap.set(object, make_pair<uint32_t, uint32_t>(objectID, 1));
+
+ return objectID;
+}
+
+void NetscapePluginInstanceProxy::LocalObjectMap::retain(JSC::JSObject* object)
+{
+ HashMap<JSC::JSObject*, pair<uint32_t, uint32_t> >::iterator iter = m_jsObjectToIDMap.find(object);
+ ASSERT(iter != m_jsObjectToIDMap.end());
+
+ iter->second.second = iter->second.second + 1;
+}
+
+void NetscapePluginInstanceProxy::LocalObjectMap::release(JSC::JSObject* object)
+{
+ HashMap<JSC::JSObject*, pair<uint32_t, uint32_t> >::iterator iter = m_jsObjectToIDMap.find(object);
+ ASSERT(iter != m_jsObjectToIDMap.end());
+
+ ASSERT(iter->second.second > 0);
+ iter->second.second = iter->second.second - 1;
+ if (!iter->second.second) {
+ m_idToJSObjectMap.remove(iter->second.first);
+ m_jsObjectToIDMap.remove(iter);
+ }
+}
+
+void NetscapePluginInstanceProxy::LocalObjectMap::clear()
+{
+ m_idToJSObjectMap.clear();
+ m_jsObjectToIDMap.clear();
+}
+
+bool NetscapePluginInstanceProxy::LocalObjectMap::forget(uint32_t objectID)
+{
+ if (objectID == HashTraits<uint32_t>::emptyValue() || HashTraits<uint32_t>::isDeletedValue(objectID)) {
+ LOG_ERROR("NetscapePluginInstanceProxy::LocalObjectMap::forget: local object id %u is not valid.", objectID);
+ return true;
+ }
+
+ HashMap<uint32_t, JSC::ProtectedPtr<JSC::JSObject> >::iterator iter = m_idToJSObjectMap.find(objectID);
+ if (iter == m_idToJSObjectMap.end()) {
+ LOG_ERROR("NetscapePluginInstanceProxy::LocalObjectMap::forget: local object %u doesn't exist.", objectID);
+ return true;
+ }
+
+ HashMap<JSC::JSObject*, pair<uint32_t, uint32_t> >::iterator rIter = m_jsObjectToIDMap.find(iter->second.get());
+
+ // If the object is being sent to plug-in right now, then it's not the time to forget.
+ if (rIter->second.second != 1)
+ return false;
+
+ m_jsObjectToIDMap.remove(rIter);
+ m_idToJSObjectMap.remove(iter);
+ return true;
+}
+
static uint32_t pluginIDCounter;
+bool NetscapePluginInstanceProxy::m_inDestroy;
+
#ifndef NDEBUG
static WTF::RefCountedLeakCounter netscapePluginInstanceProxyCounter("NetscapePluginInstanceProxy");
#endif
@@ -112,14 +219,12 @@ NetscapePluginInstanceProxy::NetscapePluginInstanceProxy(NetscapePluginHostProxy
, m_requestTimer(this, &NetscapePluginInstanceProxy::requestTimerFired)
, m_currentURLRequestID(0)
, m_renderContextID(0)
- , m_useSoftwareRenderer(false)
+ , m_rendererType(UseSoftwareRenderer)
, m_waitingForReply(false)
- , m_objectIDCounter(0)
, m_urlCheckCounter(0)
, m_pluginFunctionCallDepth(0)
, m_shouldStopSoon(false)
, m_currentRequestID(0)
- , m_inDestroy(false)
, m_pluginIsWaitingForDraw(false)
{
ASSERT(m_pluginView);
@@ -134,14 +239,19 @@ NetscapePluginInstanceProxy::NetscapePluginInstanceProxy(NetscapePluginHostProxy
do {
m_pluginID = ++pluginIDCounter;
} while (pluginHostProxy->pluginInstance(m_pluginID) || !m_pluginID);
-
- pluginHostProxy->addPluginInstance(this);
#ifndef NDEBUG
netscapePluginInstanceProxyCounter.increment();
#endif
}
+PassRefPtr<NetscapePluginInstanceProxy> NetscapePluginInstanceProxy::create(NetscapePluginHostProxy* pluginHostProxy, WebHostedNetscapePluginView *pluginView, bool fullFramePlugin)
+{
+ RefPtr<NetscapePluginInstanceProxy> proxy = adoptRef(new NetscapePluginInstanceProxy(pluginHostProxy, pluginView, fullFramePlugin));
+ pluginHostProxy->addPluginInstance(proxy.get());
+ return proxy.release();
+}
+
NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy()
{
ASSERT(!m_pluginHostProxy);
@@ -154,19 +264,17 @@ NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy()
#endif
}
-void NetscapePluginInstanceProxy::resize(NSRect size, NSRect clipRect, bool sync)
+void NetscapePluginInstanceProxy::resize(NSRect size, NSRect clipRect)
{
uint32_t requestID = 0;
- if (sync)
- requestID = nextRequestID();
+ requestID = nextRequestID();
_WKPHResizePluginInstance(m_pluginHostProxy->port(), m_pluginID, requestID,
size.origin.x, size.origin.y, size.size.width, size.size.height,
clipRect.origin.x, clipRect.origin.y, clipRect.size.width, clipRect.size.height);
- if (sync)
- waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
+ waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
}
void NetscapePluginInstanceProxy::stopAllStreams()
@@ -185,7 +293,7 @@ void NetscapePluginInstanceProxy::cleanup()
// Clear the object map, this will cause any outstanding JS objects that the plug-in had a reference to
// to go away when the next garbage collection takes place.
- m_objects.clear();
+ m_localObjects.clear();
if (Frame* frame = core([m_pluginView webFrame]))
frame->script()->cleanupScriptObjectsForPlugin(m_pluginView);
@@ -215,7 +323,8 @@ void NetscapePluginInstanceProxy::invalidate()
void NetscapePluginInstanceProxy::destroy()
{
uint32_t requestID = nextRequestID();
-
+
+ ASSERT(!m_inDestroy);
m_inDestroy = true;
FrameLoadMap::iterator end = m_pendingFrameLoads.end();
@@ -373,9 +482,6 @@ bool NetscapePluginInstanceProxy::wheelEvent(NSView *pluginView, NSEvent *event)
pluginPoint.x, pluginPoint.y, [event buttonNumber],
[event deltaX], [event deltaY], [event deltaZ]);
- // Protect ourselves in case waiting for the reply causes us to be deleted.
- RefPtr<NetscapePluginInstanceProxy> protect(this);
-
auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
if (!reply.get() || !reply->m_result)
return false;
@@ -406,6 +512,22 @@ void NetscapePluginInstanceProxy::print(CGContextRef context, unsigned width, un
CGContextRestoreGState(context);
}
+void NetscapePluginInstanceProxy::snapshot(CGContextRef context, unsigned width, unsigned height)
+{
+ uint32_t requestID = nextRequestID();
+ _WKPHPluginInstanceSnapshot(m_pluginHostProxy->port(), m_pluginID, requestID, width, height);
+
+ auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID);
+ if (!reply.get() || !reply->m_returnValue)
+ return;
+
+ RetainPtr<CGDataProvider> dataProvider(AdoptCF, CGDataProviderCreateWithCFData(reply->m_result.get()));
+ RetainPtr<CGColorSpaceRef> colorSpace(AdoptCF, CGColorSpaceCreateDeviceRGB());
+ RetainPtr<CGImageRef> image(AdoptCF, CGImageCreate(width, height, 8, 32, width * 4, colorSpace.get(), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host, dataProvider.get(), 0, false, kCGRenderingIntentDefault));
+
+ CGContextDrawImage(context, CGRectMake(0, 0, width, height), image.get());
+}
+
void NetscapePluginInstanceProxy::stopTimers()
{
_WKPHPluginInstanceStopTimers(m_pluginHostProxy->port(), m_pluginID);
@@ -413,11 +535,10 @@ void NetscapePluginInstanceProxy::stopTimers()
void NetscapePluginInstanceProxy::status(const char* message)
{
- RetainPtr<CFStringRef> status(AdoptCF, CFStringCreateWithCString(NULL, message, kCFStringEncodingUTF8));
-
+ RetainPtr<CFStringRef> status(AdoptCF, CFStringCreateWithCString(0, message ? message : "", kCFStringEncodingUTF8));
if (!status)
return;
-
+
WebView *wv = [m_pluginView webView];
[[wv _UIDelegateForwarder] webView:wv setStatusText:(NSString *)status.get()];
}
@@ -434,6 +555,8 @@ NPError NetscapePluginInstanceProxy::loadURL(const char* url, const char* target
if (flags & PostDataIsFile) {
// If we're posting a file, buf is either a file URL or a path to the file.
+ if (!postData)
+ return NPERR_INVALID_PARAM;
RetainPtr<CFStringRef> bufString(AdoptCF, CFStringCreateWithCString(kCFAllocatorDefault, postData, kCFStringEncodingWindowsLatin1));
if (!bufString)
return NPERR_INVALID_PARAM;
@@ -582,6 +705,7 @@ void NetscapePluginInstanceProxy::evaluateJavaScript(PluginRequest* pluginReques
NSData *JSData = [result dataUsingEncoding:NSUTF8StringEncoding];
RefPtr<HostedNetscapePluginStream> stream = HostedNetscapePluginStream::create(this, pluginRequest->requestID(), pluginRequest->request());
+ m_streams.add(stream->streamID(), stream);
RetainPtr<NSURLResponse> response(AdoptNS, [[NSURLResponse alloc] initWithURL:URL
MIMEType:@"text/plain"
@@ -640,7 +764,7 @@ NPError NetscapePluginInstanceProxy::loadRequest(NSURLRequest *request, const ch
return NPERR_GENERIC_ERROR;
}
} else {
- if (!SecurityOrigin::canLoad(URL, String(), core([m_pluginView webFrame])->document()))
+ if (!core([m_pluginView webFrame])->document()->securityOrigin()->canDisplay(URL))
return NPERR_GENERIC_ERROR;
}
@@ -673,30 +797,22 @@ NPError NetscapePluginInstanceProxy::loadRequest(NSURLRequest *request, const ch
NetscapePluginInstanceProxy::Reply* NetscapePluginInstanceProxy::processRequestsAndWaitForReply(uint32_t requestID)
{
Reply* reply = 0;
-
+
+ ASSERT(m_pluginHostProxy);
while (!(reply = m_replies.take(requestID))) {
if (!m_pluginHostProxy->processRequests())
return 0;
+
+ // The host proxy can be destroyed while executing a nested processRequests() call, in which case it's normal
+ // to get a success result, but be unable to keep looping.
+ if (!m_pluginHostProxy)
+ return 0;
}
ASSERT(reply);
return reply;
}
-uint32_t NetscapePluginInstanceProxy::idForObject(JSObject* object)
-{
- uint32_t objectID = 0;
-
- // Assign an object ID.
- do {
- objectID = ++m_objectIDCounter;
- } while (!m_objectIDCounter || m_objectIDCounter == static_cast<uint32_t>(-1) || m_objects.contains(objectID));
-
- m_objects.set(objectID, object);
-
- return objectID;
-}
-
// NPRuntime support
bool NetscapePluginInstanceProxy::getWindowNPObject(uint32_t& objectID)
{
@@ -704,10 +820,10 @@ bool NetscapePluginInstanceProxy::getWindowNPObject(uint32_t& objectID)
if (!frame)
return false;
- if (!frame->script()->canExecuteScripts())
+ if (!frame->script()->canExecuteScripts(NotAboutToExecuteScript))
objectID = 0;
else
- objectID = idForObject(frame->script()->windowShell(pluginWorld())->window());
+ objectID = m_localObjects.idForObject(frame->script()->windowShell(pluginWorld())->window());
return true;
}
@@ -719,16 +835,16 @@ bool NetscapePluginInstanceProxy::getPluginElementNPObject(uint32_t& objectID)
return false;
if (JSObject* object = frame->script()->jsObjectForPluginElement([m_pluginView element]))
- objectID = idForObject(object);
+ objectID = m_localObjects.idForObject(object);
else
objectID = 0;
return true;
}
-void NetscapePluginInstanceProxy::releaseObject(uint32_t objectID)
+bool NetscapePluginInstanceProxy::forgetBrowserObjectID(uint32_t objectID)
{
- m_objects.remove(objectID);
+ return m_localObjects.forget(objectID);
}
bool NetscapePluginInstanceProxy::evaluate(uint32_t objectID, const String& script, data_t& resultData, mach_msg_type_number_t& resultLength, bool allowPopups)
@@ -736,8 +852,13 @@ bool NetscapePluginInstanceProxy::evaluate(uint32_t objectID, const String& scri
resultData = 0;
resultLength = 0;
- if (!m_objects.contains(objectID))
+ if (m_inDestroy)
+ return false;
+
+ if (!m_localObjects.contains(objectID)) {
+ LOG_ERROR("NetscapePluginInstanceProxy::evaluate: local object %u doesn't exist.", objectID);
return false;
+ }
Frame* frame = core([m_pluginView webFrame]);
if (!frame)
@@ -751,9 +872,9 @@ bool NetscapePluginInstanceProxy::evaluate(uint32_t objectID, const String& scri
bool oldAllowPopups = frame->script()->allowPopupsFromPlugin();
frame->script()->setAllowPopupsFromPlugin(allowPopups);
- globalObject->globalData()->timeoutChecker.start();
+ globalObject->globalData().timeoutChecker.start();
Completion completion = JSC::evaluate(exec, globalObject->globalScopeChain(), makeSource(script));
- globalObject->globalData()->timeoutChecker.stop();
+ globalObject->globalData().timeoutChecker.stop();
ComplType type = completion.complType();
frame->script()->setAllowPopupsFromPlugin(oldAllowPopups);
@@ -778,9 +899,11 @@ bool NetscapePluginInstanceProxy::invoke(uint32_t objectID, const Identifier& me
if (m_inDestroy)
return false;
- JSObject* object = m_objects.get(objectID);
- if (!object)
+ JSObject* object = m_localObjects.get(objectID);
+ if (!object) {
+ LOG_ERROR("NetscapePluginInstanceProxy::invoke: local object %u doesn't exist.", objectID);
return false;
+ }
Frame* frame = core([m_pluginView webFrame]);
if (!frame)
@@ -790,7 +913,7 @@ bool NetscapePluginInstanceProxy::invoke(uint32_t objectID, const Identifier& me
JSLock lock(SilenceAssertionsOnly);
JSValue function = object->get(exec, methodName);
CallData callData;
- CallType callType = function.getCallData(callData);
+ CallType callType = getCallData(function, callData);
if (callType == CallTypeNone)
return false;
@@ -798,9 +921,9 @@ bool NetscapePluginInstanceProxy::invoke(uint32_t objectID, const Identifier& me
demarshalValues(exec, argumentsData, argumentsLength, argList);
ProtectedPtr<JSGlobalObject> globalObject = frame->script()->globalObject(pluginWorld());
- globalObject->globalData()->timeoutChecker.start();
+ globalObject->globalData().timeoutChecker.start();
JSValue value = call(exec, function, callType, callData, object, argList);
- globalObject->globalData()->timeoutChecker.stop();
+ globalObject->globalData().timeoutChecker.stop();
marshalValue(exec, value, resultData, resultLength);
exec->clearException();
@@ -812,9 +935,11 @@ bool NetscapePluginInstanceProxy::invokeDefault(uint32_t objectID, data_t argume
if (m_inDestroy)
return false;
- JSObject* object = m_objects.get(objectID);
- if (!object)
+ JSObject* object = m_localObjects.get(objectID);
+ if (!object) {
+ LOG_ERROR("NetscapePluginInstanceProxy::invokeDefault: local object %u doesn't exist.", objectID);
return false;
+ }
Frame* frame = core([m_pluginView webFrame]);
if (!frame)
@@ -831,9 +956,9 @@ bool NetscapePluginInstanceProxy::invokeDefault(uint32_t objectID, data_t argume
demarshalValues(exec, argumentsData, argumentsLength, argList);
ProtectedPtr<JSGlobalObject> globalObject = frame->script()->globalObject(pluginWorld());
- globalObject->globalData()->timeoutChecker.start();
+ globalObject->globalData().timeoutChecker.start();
JSValue value = call(exec, object, callType, callData, object, argList);
- globalObject->globalData()->timeoutChecker.stop();
+ globalObject->globalData().timeoutChecker.stop();
marshalValue(exec, value, resultData, resultLength);
exec->clearException();
@@ -845,9 +970,11 @@ bool NetscapePluginInstanceProxy::construct(uint32_t objectID, data_t argumentsD
if (m_inDestroy)
return false;
- JSObject* object = m_objects.get(objectID);
- if (!object)
+ JSObject* object = m_localObjects.get(objectID);
+ if (!object) {
+ LOG_ERROR("NetscapePluginInstanceProxy::construct: local object %u doesn't exist.", objectID);
return false;
+ }
Frame* frame = core([m_pluginView webFrame]);
if (!frame)
@@ -865,9 +992,9 @@ bool NetscapePluginInstanceProxy::construct(uint32_t objectID, data_t argumentsD
demarshalValues(exec, argumentsData, argumentsLength, argList);
ProtectedPtr<JSGlobalObject> globalObject = frame->script()->globalObject(pluginWorld());
- globalObject->globalData()->timeoutChecker.start();
+ globalObject->globalData().timeoutChecker.start();
JSValue value = JSC::construct(exec, object, constructType, constructData, argList);
- globalObject->globalData()->timeoutChecker.stop();
+ globalObject->globalData().timeoutChecker.stop();
marshalValue(exec, value, resultData, resultLength);
exec->clearException();
@@ -879,9 +1006,11 @@ bool NetscapePluginInstanceProxy::getProperty(uint32_t objectID, const Identifie
if (m_inDestroy)
return false;
- JSObject* object = m_objects.get(objectID);
- if (!object)
+ JSObject* object = m_localObjects.get(objectID);
+ if (!object) {
+ LOG_ERROR("NetscapePluginInstanceProxy::getProperty: local object %u doesn't exist.", objectID);
return false;
+ }
Frame* frame = core([m_pluginView webFrame]);
if (!frame)
@@ -898,9 +1027,11 @@ bool NetscapePluginInstanceProxy::getProperty(uint32_t objectID, const Identifie
bool NetscapePluginInstanceProxy::getProperty(uint32_t objectID, unsigned propertyName, data_t& resultData, mach_msg_type_number_t& resultLength)
{
- JSObject* object = m_objects.get(objectID);
- if (!object)
+ JSObject* object = m_localObjects.get(objectID);
+ if (!object) {
+ LOG_ERROR("NetscapePluginInstanceProxy::getProperty: local object %u doesn't exist.", objectID);
return false;
+ }
Frame* frame = core([m_pluginView webFrame]);
if (!frame)
@@ -920,9 +1051,11 @@ bool NetscapePluginInstanceProxy::setProperty(uint32_t objectID, const Identifie
if (m_inDestroy)
return false;
- JSObject* object = m_objects.get(objectID);
- if (!object)
+ JSObject* object = m_localObjects.get(objectID);
+ if (!object) {
+ LOG_ERROR("NetscapePluginInstanceProxy::setProperty: local object %u doesn't exist.", objectID);
return false;
+ }
Frame* frame = core([m_pluginView webFrame]);
if (!frame)
@@ -944,9 +1077,11 @@ bool NetscapePluginInstanceProxy::setProperty(uint32_t objectID, unsigned proper
if (m_inDestroy)
return false;
- JSObject* object = m_objects.get(objectID);
- if (!object)
+ JSObject* object = m_localObjects.get(objectID);
+ if (!object) {
+ LOG_ERROR("NetscapePluginInstanceProxy::setProperty: local object %u doesn't exist.", objectID);
return false;
+ }
Frame* frame = core([m_pluginView webFrame]);
if (!frame)
@@ -967,9 +1102,11 @@ bool NetscapePluginInstanceProxy::removeProperty(uint32_t objectID, const Identi
if (m_inDestroy)
return false;
- JSObject* object = m_objects.get(objectID);
- if (!object)
+ JSObject* object = m_localObjects.get(objectID);
+ if (!object) {
+ LOG_ERROR("NetscapePluginInstanceProxy::removeProperty: local object %u doesn't exist.", objectID);
return false;
+ }
Frame* frame = core([m_pluginView webFrame]);
if (!frame)
@@ -992,9 +1129,11 @@ bool NetscapePluginInstanceProxy::removeProperty(uint32_t objectID, unsigned pro
if (m_inDestroy)
return false;
- JSObject* object = m_objects.get(objectID);
- if (!object)
+ JSObject* object = m_localObjects.get(objectID);
+ if (!object) {
+ LOG_ERROR("NetscapePluginInstanceProxy::removeProperty: local object %u doesn't exist.", objectID);
return false;
+ }
Frame* frame = core([m_pluginView webFrame]);
if (!frame)
@@ -1017,9 +1156,11 @@ bool NetscapePluginInstanceProxy::hasProperty(uint32_t objectID, const Identifie
if (m_inDestroy)
return false;
- JSObject* object = m_objects.get(objectID);
- if (!object)
+ JSObject* object = m_localObjects.get(objectID);
+ if (!object) {
+ LOG_ERROR("NetscapePluginInstanceProxy::hasProperty: local object %u doesn't exist.", objectID);
return false;
+ }
Frame* frame = core([m_pluginView webFrame]);
if (!frame)
@@ -1037,9 +1178,11 @@ bool NetscapePluginInstanceProxy::hasProperty(uint32_t objectID, unsigned proper
if (m_inDestroy)
return false;
- JSObject* object = m_objects.get(objectID);
- if (!object)
+ JSObject* object = m_localObjects.get(objectID);
+ if (!object) {
+ LOG_ERROR("NetscapePluginInstanceProxy::hasProperty: local object %u doesn't exist.", objectID);
return false;
+ }
Frame* frame = core([m_pluginView webFrame]);
if (!frame)
@@ -1057,9 +1200,11 @@ bool NetscapePluginInstanceProxy::hasMethod(uint32_t objectID, const Identifier&
if (m_inDestroy)
return false;
- JSObject* object = m_objects.get(objectID);
- if (!object)
+ JSObject* object = m_localObjects.get(objectID);
+ if (!object) {
+ LOG_ERROR("NetscapePluginInstanceProxy::hasMethod: local object %u doesn't exist.", objectID);
return false;
+ }
Frame* frame = core([m_pluginView webFrame]);
if (!frame)
@@ -1077,9 +1222,11 @@ bool NetscapePluginInstanceProxy::enumerate(uint32_t objectID, data_t& resultDat
if (m_inDestroy)
return false;
- JSObject* object = m_objects.get(objectID);
- if (!object)
+ JSObject* object = m_localObjects.get(objectID);
+ if (!object) {
+ LOG_ERROR("NetscapePluginInstanceProxy::enumerate: local object %u doesn't exist.", objectID);
return false;
+ }
Frame* frame = core([m_pluginView webFrame]);
if (!frame)
@@ -1093,7 +1240,7 @@ bool NetscapePluginInstanceProxy::enumerate(uint32_t objectID, data_t& resultDat
RetainPtr<NSMutableArray*> array(AdoptNS, [[NSMutableArray alloc] init]);
for (unsigned i = 0; i < propertyNames.size(); i++) {
- uint64_t methodName = reinterpret_cast<uint64_t>(_NPN_GetStringIdentifier(propertyNames[i].ustring().UTF8String().c_str()));
+ uint64_t methodName = reinterpret_cast<uint64_t>(_NPN_GetStringIdentifier(propertyNames[i].ustring().utf8().data()));
[array.get() addObject:[NSNumber numberWithLongLong:methodName]];
}
@@ -1117,7 +1264,7 @@ void NetscapePluginInstanceProxy::addValueToArray(NSMutableArray *array, ExecSta
if (value.isString()) {
[array addObject:[NSNumber numberWithInt:StringValueType]];
- [array addObject:String(value.toString(exec))];
+ [array addObject:ustringToString(value.toString(exec))];
} else if (value.isNumber()) {
[array addObject:[NSNumber numberWithInt:DoubleValueType]];
[array addObject:[NSNumber numberWithDouble:value.toNumber(exec)]];
@@ -1128,15 +1275,15 @@ void NetscapePluginInstanceProxy::addValueToArray(NSMutableArray *array, ExecSta
[array addObject:[NSNumber numberWithInt:NullValueType]];
else if (value.isObject()) {
JSObject* object = asObject(value);
- if (object->classInfo() == &RuntimeObjectImp::s_info) {
- RuntimeObjectImp* imp = static_cast<RuntimeObjectImp*>(object);
- if (ProxyInstance* instance = static_cast<ProxyInstance*>(imp->getInternalInstance())) {
+ if (object->classInfo() == &ProxyRuntimeObject::s_info) {
+ ProxyRuntimeObject* runtimeObject = static_cast<ProxyRuntimeObject*>(object);
+ if (ProxyInstance* instance = runtimeObject->getInternalProxyInstance()) {
[array addObject:[NSNumber numberWithInt:NPObjectValueType]];
[array addObject:[NSNumber numberWithInt:instance->objectID()]];
}
} else {
[array addObject:[NSNumber numberWithInt:JSObjectValueType]];
- [array addObject:[NSNumber numberWithInt:idForObject(object)]];
+ [array addObject:[NSNumber numberWithInt:m_localObjects.idForObject(object)]];
}
} else
[array addObject:[NSNumber numberWithInt:VoidValueType]];
@@ -1187,7 +1334,7 @@ bool NetscapePluginInstanceProxy::demarshalValueFromArray(ExecState* exec, NSArr
result = jsBoolean([[array objectAtIndex:index++] boolValue]);
return true;
case DoubleValueType:
- result = jsNumber(exec, [[array objectAtIndex:index++] doubleValue]);
+ result = jsNumber([[array objectAtIndex:index++] doubleValue]);
return true;
case StringValueType: {
NSString *string = [array objectAtIndex:index++];
@@ -1198,7 +1345,7 @@ bool NetscapePluginInstanceProxy::demarshalValueFromArray(ExecState* exec, NSArr
case JSObjectValueType: {
uint32_t objectID = [[array objectAtIndex:index++] intValue];
- result = m_objects.get(objectID);
+ result = m_localObjects.get(objectID);
ASSERT(result);
return true;
}
@@ -1209,7 +1356,7 @@ bool NetscapePluginInstanceProxy::demarshalValueFromArray(ExecState* exec, NSArr
if (!frame)
return false;
- if (!frame->script()->canExecuteScripts())
+ if (!frame->script()->canExecuteScripts(NotAboutToExecuteScript))
return false;
RefPtr<RootObject> rootObject = frame->script()->createRootObject(m_pluginView);
@@ -1255,6 +1402,22 @@ void NetscapePluginInstanceProxy::demarshalValues(ExecState* exec, data_t values
result.append(value);
}
+void NetscapePluginInstanceProxy::retainLocalObject(JSC::JSValue value)
+{
+ if (!value.isObject() || value.inherits(&ProxyRuntimeObject::s_info))
+ return;
+
+ m_localObjects.retain(asObject(value));
+}
+
+void NetscapePluginInstanceProxy::releaseLocalObject(JSC::JSValue value)
+{
+ if (!value.isObject() || value.inherits(&ProxyRuntimeObject::s_info))
+ return;
+
+ m_localObjects.release(asObject(value));
+}
+
PassRefPtr<Instance> NetscapePluginInstanceProxy::createBindingsInstance(PassRefPtr<RootObject> rootObject)
{
uint32_t requestID = nextRequestID();
@@ -1262,10 +1425,6 @@ PassRefPtr<Instance> NetscapePluginInstanceProxy::createBindingsInstance(PassRef
if (_WKPHGetScriptableNPObject(m_pluginHostProxy->port(), m_pluginID, requestID) != KERN_SUCCESS)
return 0;
- // If the plug-in host crashes while we're waiting for a reply, the last reference to the instance proxy
- // will go away. Prevent this by protecting it here.
- RefPtr<NetscapePluginInstanceProxy> protect(this);
-
auto_ptr<GetScriptableNPObjectReply> reply = waitForReply<GetScriptableNPObjectReply>(requestID);
if (!reply.get())
return 0;
@@ -1273,6 +1432,7 @@ PassRefPtr<Instance> NetscapePluginInstanceProxy::createBindingsInstance(PassRef
if (!reply->m_objectID)
return 0;
+ // Since the reply was non-null, "this" is still a valid pointer.
return ProxyInstance::create(rootObject, this, reply->m_objectID);
}
@@ -1295,7 +1455,7 @@ void NetscapePluginInstanceProxy::willCallPluginFunction()
m_pluginFunctionCallDepth++;
}
-void NetscapePluginInstanceProxy::didCallPluginFunction()
+void NetscapePluginInstanceProxy::didCallPluginFunction(bool& stopped)
{
ASSERT(m_pluginFunctionCallDepth > 0);
m_pluginFunctionCallDepth--;
@@ -1305,6 +1465,7 @@ void NetscapePluginInstanceProxy::didCallPluginFunction()
if (!m_pluginFunctionCallDepth && m_shouldStopSoon) {
m_shouldStopSoon = false;
[m_pluginView stop];
+ stopped = true;
}
}
@@ -1356,7 +1517,7 @@ bool NetscapePluginInstanceProxy::getCookies(data_t urlData, mach_msg_type_numbe
if (Frame* frame = core([m_pluginView webFrame])) {
String cookieString = cookies(frame->document(), url);
- WebCore::CString cookieStringUTF8 = cookieString.utf8();
+ WTF::CString cookieStringUTF8 = cookieString.utf8();
if (cookieStringUTF8.isNull())
return false;
@@ -1398,7 +1559,8 @@ bool NetscapePluginInstanceProxy::getProxy(data_t urlData, mach_msg_type_number_
if (!url)
return false;
- WebCore::CString proxyStringUTF8 = proxiesForURL(url);
+ Vector<ProxyServer> proxyServers = proxyServersForURL(url, 0);
+ WTF::CString proxyStringUTF8 = toString(proxyServers).utf8();
proxyLength = proxyStringUTF8.length();
mig_allocate(reinterpret_cast<vm_address_t*>(&proxyData), proxyLength);
@@ -1410,8 +1572,8 @@ bool NetscapePluginInstanceProxy::getProxy(data_t urlData, mach_msg_type_number_
bool NetscapePluginInstanceProxy::getAuthenticationInfo(data_t protocolData, data_t hostData, uint32_t port, data_t schemeData, data_t realmData,
data_t& usernameData, mach_msg_type_number_t& usernameLength, data_t& passwordData, mach_msg_type_number_t& passwordLength)
{
- WebCore::CString username;
- WebCore::CString password;
+ WTF::CString username;
+ WTF::CString password;
if (!WebKit::getAuthenticationInfo(protocolData, hostData, port, schemeData, realmData, username, password))
return false;
@@ -1481,7 +1643,7 @@ void NetscapePluginInstanceProxy::resolveURL(const char* url, const char* target
{
ASSERT(m_pluginView);
- WebCore::CString resolvedURL = [m_pluginView resolvedURLStringForURL:url target:target];
+ WTF::CString resolvedURL = [m_pluginView resolvedURLStringForURL:url target:target];
resolvedURLLength = resolvedURL.length();
mig_allocate(reinterpret_cast<vm_address_t*>(&resolvedURLData), resolvedURLLength);
@@ -1511,12 +1673,12 @@ void NetscapePluginInstanceProxy::moveGlobalExceptionToExecState(ExecState* exec
{
JSLock lock(SilenceAssertionsOnly);
- throwError(exec, GeneralError, globalExceptionString());
+ throwError(exec, createError(exec, stringToUString(globalExceptionString())));
}
- globalExceptionString() = UString();
+ globalExceptionString() = String();
}
} // namespace WebKit
-#endif // USE(PLUGIN_HOST_PROCESS)
+#endif // USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
diff --git a/WebKit/mac/Plugins/Hosted/ProxyInstance.h b/WebKit/mac/Plugins/Hosted/ProxyInstance.h
index 6e8ac47..b72e49a 100644
--- a/WebKit/mac/Plugins/Hosted/ProxyInstance.h
+++ b/WebKit/mac/Plugins/Hosted/ProxyInstance.h
@@ -58,13 +58,16 @@ public:
private:
ProxyInstance(PassRefPtr<JSC::Bindings::RootObject>, NetscapePluginInstanceProxy*, uint32_t objectID);
-
- virtual JSC::Bindings::Class *getClass() const;
- virtual JSC::JSValue invokeMethod(JSC::ExecState*, const JSC::Bindings::MethodList&, const JSC::ArgList& args);
+ virtual JSC::Bindings::RuntimeObject* newRuntimeObject(JSC::ExecState*);
+
+ virtual JSC::Bindings::Class* getClass() const;
+
+ virtual JSC::JSValue getMethod(JSC::ExecState* exec, const JSC::Identifier& propertyName);
+ virtual JSC::JSValue invokeMethod(JSC::ExecState*, JSC::RuntimeMethod*);
virtual bool supportsInvokeDefaultMethod() const;
- virtual JSC::JSValue invokeDefaultMethod(JSC::ExecState*, const JSC::ArgList&);
+ virtual JSC::JSValue invokeDefaultMethod(JSC::ExecState*);
virtual bool supportsConstruct() const;
virtual JSC::JSValue invokeConstruct(JSC::ExecState*, const JSC::ArgList&);
@@ -78,7 +81,7 @@ private:
JSC::JSValue numberValue(JSC::ExecState*) const;
JSC::JSValue booleanValue() const;
- JSC::JSValue invoke(JSC::ExecState*, InvokeType, uint64_t identifier, const JSC::ArgList& args);
+ JSC::JSValue invoke(JSC::ExecState*, InvokeType, uint64_t identifier, const JSC::ArgList&);
template <typename T>
std::auto_ptr<T> waitForReply(uint32_t requestID) const {
diff --git a/WebKit/mac/Plugins/Hosted/ProxyInstance.mm b/WebKit/mac/Plugins/Hosted/ProxyInstance.mm
index 1587ad0..927a008 100644
--- a/WebKit/mac/Plugins/Hosted/ProxyInstance.mm
+++ b/WebKit/mac/Plugins/Hosted/ProxyInstance.mm
@@ -23,14 +23,17 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#if USE(PLUGIN_HOST_PROCESS)
+#if USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
#import "ProxyInstance.h"
#import "NetscapePluginHostProxy.h"
+#import "ProxyRuntimeObject.h"
#import <WebCore/IdentifierRep.h>
#import <WebCore/JSDOMWindow.h>
#import <WebCore/npruntime_impl.h>
+#import <WebCore/runtime_method.h>
+#import <runtime/Error.h>
#import <runtime/PropertyNameArray.h>
extern "C" {
@@ -128,39 +131,83 @@ ProxyInstance::~ProxyInstance()
invalidate();
}
-JSC::Bindings::Class *ProxyInstance::getClass() const
+RuntimeObject* ProxyInstance::newRuntimeObject(ExecState* exec)
+{
+ return new (exec) ProxyRuntimeObject(exec, exec->lexicalGlobalObject(), this);
+}
+
+JSC::Bindings::Class* ProxyInstance::getClass() const
{
return proxyClass();
}
-JSValue ProxyInstance::invoke(JSC::ExecState* exec, InvokeType type, uint64_t identifier, const JSC::ArgList& args)
+JSValue ProxyInstance::invoke(JSC::ExecState* exec, InvokeType type, uint64_t identifier, const ArgList& args)
{
if (!m_instanceProxy)
return jsUndefined();
-
+
RetainPtr<NSData*> arguments(m_instanceProxy->marshalValues(exec, args));
uint32_t requestID = m_instanceProxy->nextRequestID();
+ for (unsigned i = 0; i < args.size(); i++)
+ m_instanceProxy->retainLocalObject(args.at(i));
+
if (_WKPHNPObjectInvoke(m_instanceProxy->hostProxy()->port(), m_instanceProxy->pluginID(), requestID, m_objectID,
- type, identifier, (char*)[arguments.get() bytes], [arguments.get() length]) != KERN_SUCCESS)
+ type, identifier, (char*)[arguments.get() bytes], [arguments.get() length]) != KERN_SUCCESS) {
+ if (m_instanceProxy) {
+ for (unsigned i = 0; i < args.size(); i++)
+ m_instanceProxy->releaseLocalObject(args.at(i));
+ }
return jsUndefined();
+ }
auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID);
NetscapePluginInstanceProxy::moveGlobalExceptionToExecState(exec);
+
+ if (m_instanceProxy) {
+ for (unsigned i = 0; i < args.size(); i++)
+ m_instanceProxy->releaseLocalObject(args.at(i));
+ }
+
if (!reply.get() || !reply->m_returnValue)
return jsUndefined();
return m_instanceProxy->demarshalValue(exec, (char*)CFDataGetBytePtr(reply->m_result.get()), CFDataGetLength(reply->m_result.get()));
}
-JSValue ProxyInstance::invokeMethod(ExecState* exec, const MethodList& methodList, const ArgList& args)
+class ProxyRuntimeMethod : public RuntimeMethod {
+public:
+ ProxyRuntimeMethod(ExecState* exec, JSGlobalObject* globalObject, const Identifier& name, Bindings::MethodList& list)
+ : RuntimeMethod(exec, globalObject, name, list)
+ {
+ }
+
+ virtual const ClassInfo* classInfo() const { return &s_info; }
+
+ static const ClassInfo s_info;
+};
+
+const ClassInfo ProxyRuntimeMethod::s_info = { "ProxyRuntimeMethod", &RuntimeMethod::s_info, 0, 0 };
+
+JSValue ProxyInstance::getMethod(JSC::ExecState* exec, const JSC::Identifier& propertyName)
+{
+ MethodList methodList = getClass()->methodsNamed(propertyName, this);
+ return new (exec) ProxyRuntimeMethod(exec, exec->lexicalGlobalObject(), propertyName, methodList);
+}
+
+JSValue ProxyInstance::invokeMethod(ExecState* exec, JSC::RuntimeMethod* runtimeMethod)
{
+ if (!asObject(runtimeMethod)->inherits(&ProxyRuntimeMethod::s_info))
+ return throwError(exec, createTypeError(exec, "Attempt to invoke non-plug-in method on plug-in object."));
+
+ const MethodList& methodList = *runtimeMethod->methods();
+
ASSERT(methodList.size() == 1);
ProxyMethod* method = static_cast<ProxyMethod*>(methodList[0]);
- return invoke(exec, Invoke, method->serverIdentifier(), args);
+ return invoke(exec, Invoke, method->serverIdentifier(), ArgList(exec));
}
bool ProxyInstance::supportsInvokeDefaultMethod() const
@@ -181,10 +228,10 @@ bool ProxyInstance::supportsInvokeDefaultMethod() const
return false;
}
-
-JSValue ProxyInstance::invokeDefaultMethod(ExecState* exec, const ArgList& args)
+
+JSValue ProxyInstance::invokeDefaultMethod(ExecState* exec)
{
- return invoke(exec, InvokeDefault, 0, args);
+ return invoke(exec, InvokeDefault, 0, ArgList(exec));
}
bool ProxyInstance::supportsConstruct() const
@@ -226,10 +273,10 @@ JSValue ProxyInstance::stringValue(ExecState* exec) const
return jsEmptyString(exec);
}
-JSValue ProxyInstance::numberValue(ExecState* exec) const
+JSValue ProxyInstance::numberValue(ExecState*) const
{
// FIXME: Implement something sensible.
- return jsNumber(exec, 0);
+ return jsNumber(0);
}
JSValue ProxyInstance::booleanValue() const
@@ -270,7 +317,7 @@ void ProxyInstance::getPropertyNames(ExecState* exec, PropertyNameArray& nameArr
if (identifier->isString()) {
const char* str = identifier->string();
- nameArray.add(Identifier(JSDOMWindow::commonJSGlobalData(), String::fromUTF8WithLatin1Fallback(str, strlen(str))));
+ nameArray.add(Identifier(JSDOMWindow::commonJSGlobalData(), stringToUString(String::fromUTF8WithLatin1Fallback(str, strlen(str)))));
} else
nameArray.add(Identifier::from(exec, identifier->number()));
}
@@ -282,7 +329,7 @@ MethodList ProxyInstance::methodsNamed(const Identifier& identifier)
return MethodList();
// If we already have an entry in the map, use it.
- MethodMap::iterator existingMapEntry = m_methods.find(identifier.ustring().rep());
+ MethodMap::iterator existingMapEntry = m_methods.find(identifier.impl());
if (existingMapEntry != m_methods.end()) {
MethodList methodList;
if (existingMapEntry->second)
@@ -290,7 +337,7 @@ MethodList ProxyInstance::methodsNamed(const Identifier& identifier)
return methodList;
}
- uint64_t methodName = reinterpret_cast<uint64_t>(_NPN_GetStringIdentifier(identifier.ascii()));
+ uint64_t methodName = reinterpret_cast<uint64_t>(_NPN_GetStringIdentifier(identifier.ascii().data()));
uint32_t requestID = m_instanceProxy->nextRequestID();
if (_WKPHNPObjectHasMethod(m_instanceProxy->hostProxy()->port(),
@@ -306,7 +353,7 @@ MethodList ProxyInstance::methodsNamed(const Identifier& identifier)
return MethodList();
// Add a new entry to the map unless an entry was added while we were in waitForReply.
- pair<MethodMap::iterator, bool> mapAddResult = m_methods.add(identifier.ustring().rep(), 0);
+ pair<MethodMap::iterator, bool> mapAddResult = m_methods.add(identifier.impl(), 0);
if (mapAddResult.second && reply->m_result)
mapAddResult.first->second = new ProxyMethod(methodName);
@@ -322,11 +369,11 @@ Field* ProxyInstance::fieldNamed(const Identifier& identifier)
return 0;
// If we already have an entry in the map, use it.
- FieldMap::iterator existingMapEntry = m_fields.find(identifier.ustring().rep());
+ FieldMap::iterator existingMapEntry = m_fields.find(identifier.impl());
if (existingMapEntry != m_fields.end())
return existingMapEntry->second;
- uint64_t propertyName = reinterpret_cast<uint64_t>(_NPN_GetStringIdentifier(identifier.ascii()));
+ uint64_t propertyName = reinterpret_cast<uint64_t>(_NPN_GetStringIdentifier(identifier.ascii().data()));
uint32_t requestID = m_instanceProxy->nextRequestID();
if (_WKPHNPObjectHasProperty(m_instanceProxy->hostProxy()->port(),
@@ -342,7 +389,7 @@ Field* ProxyInstance::fieldNamed(const Identifier& identifier)
return 0;
// Add a new entry to the map unless an entry was added while we were in waitForReply.
- pair<FieldMap::iterator, bool> mapAddResult = m_fields.add(identifier.ustring().rep(), 0);
+ pair<FieldMap::iterator, bool> mapAddResult = m_fields.add(identifier.impl(), 0);
if (mapAddResult.second && reply->m_result)
mapAddResult.first->second = new ProxyField(propertyName);
return mapAddResult.first->second;
@@ -381,10 +428,13 @@ void ProxyInstance::setFieldValue(ExecState* exec, const Field* field, JSValue v
mach_msg_type_number_t valueLength;
m_instanceProxy->marshalValue(exec, value, valueData, valueLength);
+ m_instanceProxy->retainLocalObject(value);
kern_return_t kr = _WKPHNPObjectSetProperty(m_instanceProxy->hostProxy()->port(),
m_instanceProxy->pluginID(), requestID,
m_objectID, serverIdentifier, valueData, valueLength);
mig_deallocate(reinterpret_cast<vm_address_t>(valueData), valueLength);
+ if (m_instanceProxy)
+ m_instanceProxy->releaseLocalObject(value);
if (kr != KERN_SUCCESS)
return;
@@ -404,5 +454,5 @@ void ProxyInstance::invalidate()
} // namespace WebKit
-#endif // USE(PLUGIN_HOST_PROCESS)
+#endif // USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
diff --git a/WebKit/mac/Misc/EmptyProtocolDefinitions.h b/WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.h
index c52d8ce..81d9b42 100644
--- a/WebKit/mac/Misc/EmptyProtocolDefinitions.h
+++ b/WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -13,36 +13,41 @@
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#if defined(__OBJC__)
+#if USE(PLUGIN_HOST_PROCESS)
-#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD)
-#define DELEGATES_DECLARED_AS_FORMAL_PROTOCOLS 0
-#else
-#define DELEGATES_DECLARED_AS_FORMAL_PROTOCOLS 1
-#endif
+#ifndef ProxyRuntimeObject_h
+#define ProxyRuntimeObject_h
+
+#include <WebCore/runtime_object.h>
+
+namespace WebKit {
-#if !DELEGATES_DECLARED_AS_FORMAL_PROTOCOLS
+class ProxyInstance;
-#define EMPTY_PROTOCOL(NAME) \
-@protocol NAME <NSObject> \
-@end
+class ProxyRuntimeObject : public JSC::Bindings::RuntimeObject {
+public:
+ ProxyRuntimeObject(JSC::ExecState*, JSC::JSGlobalObject*, PassRefPtr<ProxyInstance>);
+ virtual ~ProxyRuntimeObject();
-EMPTY_PROTOCOL(NSTableViewDataSource)
-EMPTY_PROTOCOL(NSTableViewDelegate)
-EMPTY_PROTOCOL(NSWindowDelegate)
+ ProxyInstance* getInternalProxyInstance() const;
-#undef EMPTY_PROTOCOL
+ static const JSC::ClassInfo s_info;
-#endif /* !DELEGATES_DECLARED_AS_FORMAL_PROTOCOLS */
+private:
+ virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
+};
-#endif /* defined(__OBJC__) */
+}
+
+#endif
+#endif
diff --git a/WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.mm b/WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.mm
new file mode 100644
index 0000000..96855b3
--- /dev/null
+++ b/WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.mm
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#if USE(PLUGIN_HOST_PROCESS)
+
+#include "ProxyInstance.h"
+#include "ProxyRuntimeObject.h"
+
+using namespace JSC;
+
+namespace WebKit {
+
+
+const ClassInfo ProxyRuntimeObject::s_info = { "ProxyRuntimeObject", &RuntimeObject::s_info, 0, 0 };
+
+ProxyRuntimeObject::ProxyRuntimeObject(ExecState* exec, JSGlobalObject* globalObject, PassRefPtr<ProxyInstance> instance)
+ : RuntimeObject(exec, globalObject, instance)
+{
+}
+
+ProxyRuntimeObject::~ProxyRuntimeObject()
+{
+}
+
+ProxyInstance* ProxyRuntimeObject::getInternalProxyInstance() const
+{
+ return static_cast<ProxyInstance*>(getInternalInstance());
+}
+
+
+}
+
+#endif
diff --git a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h
index 5313ff2..1eb164d 100644
--- a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h
+++ b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h
@@ -45,7 +45,6 @@ namespace WebKit {
NSSize _previousSize;
RefPtr<WebKit::NetscapePluginInstanceProxy> _proxy;
- BOOL _pluginHostDied;
}
- (id)initWithFrame:(NSRect)r
diff --git a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
index 42f0877..362dd97 100644
--- a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
@@ -22,7 +22,8 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#if USE(PLUGIN_HOST_PROCESS)
+
+#if USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
#import "WebHostedNetscapePluginView.h"
@@ -40,11 +41,14 @@
#import <WebCore/Bridge.h>
#import <WebCore/Frame.h>
#import <WebCore/FrameLoaderTypes.h>
+#import <WebCore/FrameView.h>
#import <WebCore/HTMLPlugInElement.h>
-#import <WebCore/runtime_root.h>
+#import <WebCore/RenderEmbeddedObject.h>
#import <WebCore/WebCoreObjCExtras.h>
+#import <WebCore/runtime_root.h>
#import <runtime/InitializeThreading.h>
#import <wtf/Assertions.h>
+#import <wtf/Threading.h>
using namespace WebCore;
using namespace WebKit;
@@ -59,6 +63,7 @@ extern "C" {
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
@@ -107,19 +112,36 @@ extern "C" {
accleratedCompositingEnabled = [[[self webView] preferences] acceleratedCompositingEnabled];
#endif
- _proxy = NetscapePluginHostManager::shared().instantiatePlugin(_pluginPackage.get(), self, _MIMEType.get(), _attributeKeys.get(), _attributeValues.get(), userAgent, _sourceURL.get(),
+ _proxy = NetscapePluginHostManager::shared().instantiatePlugin([_pluginPackage.get() path], [_pluginPackage.get() pluginHostArchitecture], [_pluginPackage.get() bundleIdentifier], self, _MIMEType.get(), _attributeKeys.get(), _attributeValues.get(), userAgent, _sourceURL.get(),
_mode == NP_FULL, _isPrivateBrowsingEnabled, accleratedCompositingEnabled);
if (!_proxy)
return NO;
- if (_proxy->useSoftwareRenderer())
+ if (_proxy->rendererType() == UseSoftwareRenderer)
_softwareRenderer = WKSoftwareCARendererCreate(_proxy->renderContextID());
else {
_pluginLayer = WKMakeRenderLayer(_proxy->renderContextID());
- if (accleratedCompositingEnabled)
+ if (accleratedCompositingEnabled && _proxy->rendererType() == UseAcceleratedCompositing) {
+ // FIXME: This code can be shared between WebHostedNetscapePluginView and WebNetscapePluginView.
+#ifndef BUILDING_ON_LEOPARD
+ // Since this layer isn't going to be inserted into a view, we need to create another layer and flip its geometry
+ // in order to get the coordinate system right.
+ RetainPtr<CALayer> realPluginLayer(AdoptNS, _pluginLayer.releaseRef());
+
+ _pluginLayer.adoptNS([[CALayer alloc] init]);
+ _pluginLayer.get().bounds = realPluginLayer.get().bounds;
+ _pluginLayer.get().geometryFlipped = YES;
+
+ realPluginLayer.get().autoresizingMask = kCALayerWidthSizable | kCALayerHeightSizable;
+ [_pluginLayer.get() addSublayer:realPluginLayer.get()];
+#endif
+
+ // Eagerly enter compositing mode, since we know we'll need it. This avoids firing setNeedsStyleRecalc()
+ // for iframes that contain composited plugins at bad times. https://bugs.webkit.org/show_bug.cgi?id=39033
+ core([self webFrame])->view()->enterCompositingMode();
[self element]->setNeedsStyleRecalc(SyntheticStyleChange);
- else
+ } else
self.wantsLayer = YES;
}
@@ -159,8 +181,11 @@ extern "C" {
if (!_proxy)
return;
- // Use AppKit to convert view coordinates to NSWindow coordinates.
- NSRect boundsInWindow = [self convertRect:[self bounds] toView:nil];
+ // The base coordinates of a window and it's contentView happen to be the equal at a userSpaceScaleFactor
+ // of 1. For non-1.0 scale factors this assumption is false.
+ NSView *windowContentView = [[self window] contentView];
+ NSRect boundsInWindow = [self convertRect:[self bounds] toView:windowContentView];
+
NSRect visibleRectInWindow;
// Core Animation plug-ins need to be updated (with a 0,0,0,0 clipRect) when
@@ -169,7 +194,7 @@ extern "C" {
// compatible with this behavior.
BOOL shouldClipOutPlugin = _pluginLayer && [self shouldClipOutPlugin];
if (!shouldClipOutPlugin)
- visibleRectInWindow = [self convertRect:[self visibleRect] toView:nil];
+ visibleRectInWindow = [self convertRect:[self visibleRect] toView:windowContentView];
else
visibleRectInWindow = NSZeroRect;
@@ -180,10 +205,9 @@ extern "C" {
if (!shouldClipOutPlugin)
visibleRectInWindow.origin.y = borderViewHeight - NSMaxY(visibleRectInWindow);
- BOOL sizeChanged = !NSEqualSizes(_previousSize, boundsInWindow.size);
_previousSize = boundsInWindow.size;
- _proxy->resize(boundsInWindow, visibleRectInWindow, sizeChanged);
+ _proxy->resize(boundsInWindow, visibleRectInWindow);
}
- (void)windowFocusChanged:(BOOL)hasFocus
@@ -285,16 +309,24 @@ extern "C" {
_proxy->mouseEvent(self, event, NPCocoaEventMouseDragged);
}
-- (void)mouseEntered:(NSEvent *)event
+- (void)handleMouseEntered:(NSEvent *)event
{
+ // Set cursor to arrow. Plugins often handle cursor internally, but those that don't will just get this default one.
+ [[NSCursor arrowCursor] set];
+
if (_isStarted && _proxy)
_proxy->mouseEvent(self, event, NPCocoaEventMouseEntered);
}
-- (void)mouseExited:(NSEvent *)event
+- (void)handleMouseExited:(NSEvent *)event
{
if (_isStarted && _proxy)
_proxy->mouseEvent(self, event, NPCocoaEventMouseExited);
+
+ // Set cursor back to arrow cursor. Because NSCursor doesn't know about changes that the plugin made, we could get confused about what we think the
+ // current cursor is otherwise. Therefore we have no choice but to unconditionally reset the cursor when the mouse exits the plugin.
+ // FIXME: This should be job of plugin host, see <rdar://problem/7654434>.
+ [[NSCursor arrowCursor] set];
}
- (void)scrollWheel:(NSEvent *)event
@@ -348,7 +380,11 @@ extern "C" {
- (void)pluginHostDied
{
- _pluginHostDied = YES;
+ if (_element->renderer() && _element->renderer()->isEmbeddedObject()) {
+ // FIXME: The renderer could also be a RenderApplet, we should handle that.
+ RenderEmbeddedObject* renderer = toRenderEmbeddedObject(_element->renderer());
+ renderer->setShowsCrashedPluginIndicator();
+ }
_pluginLayer = nil;
_proxy = 0;
@@ -359,6 +395,11 @@ extern "C" {
[self invalidatePluginContentRect:[self bounds]];
}
+- (void)visibleRectDidChange
+{
+ [super visibleRectDidChange];
+ WKSyncSurfaceToView(self);
+}
- (void)drawRect:(NSRect)rect
{
@@ -369,28 +410,12 @@ extern "C" {
_proxy->didDraw();
} else
_proxy->print(reinterpret_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]), [self bounds].size.width, [self bounds].size.height);
+ } else if ([self inFlatteningPaint] && [self supportsSnapshotting]) {
+ _proxy->snapshot(reinterpret_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]), [self bounds].size.width, [self bounds].size.height);
}
-
+
return;
}
-
- if (_pluginHostDied) {
- static NSImage *nullPlugInImage;
- if (!nullPlugInImage) {
- NSBundle *bundle = [NSBundle bundleForClass:[WebHostedNetscapePluginView class]];
- nullPlugInImage = [[NSImage alloc] initWithContentsOfFile:[bundle pathForResource:@"nullplugin" ofType:@"tiff"]];
- [nullPlugInImage setFlipped:YES];
- }
-
- if (!nullPlugInImage)
- return;
-
- NSSize imageSize = [nullPlugInImage size];
- NSSize viewSize = [self bounds].size;
-
- NSPoint point = NSMakePoint((viewSize.width - imageSize.width) / 2.0, (viewSize.height - imageSize.height) / 2.0);
- [nullPlugInImage drawAtPoint:point fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
- }
}
- (PassRefPtr<JSC::Bindings::Instance>)createPluginBindingsInstance:(PassRefPtr<JSC::Bindings::RootObject>)rootObject
@@ -483,4 +508,4 @@ extern "C" {
@end
-#endif
+#endif // USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
diff --git a/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs b/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs
index 58a7996..15fc5fa 100644
--- a/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs
+++ b/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs
@@ -112,7 +112,7 @@ routine PCGetPluginElementNPObject(clientPort :mach_port_t;
pluginID :uint32_t;
out objectID :uint32_t);
-routine PCReleaseObject(clientPort :mach_port_t;
+routine PCForgetBrowserObject(clientPort :mach_port_t;
pluginID :uint32_t;
objectID :uint32_t);
@@ -213,7 +213,7 @@ simpleroutine PCInstantiatePluginReply(clientPort :mach_port_t;
requestID :uint32_t;
result :kern_return_t;
renderContextID :uint32_t;
- useSoftwareRenderer :boolean_t);
+ rendererType :uint32_t);
simpleroutine PCGetScriptableNPObjectReply(clientPort :mach_port_t;
pluginID :uint32_t;
@@ -231,10 +231,7 @@ simpleroutine PCBooleanAndDataReply(clientPort :mach_port_t;
returnValue :boolean_t;
result :data_t);
-simpleroutine PCRunSyncOpenPanel(clientPort :mach_port_t;
- panelData :data_t);
-
-simpleroutine PCSetFullScreenWindowIsShowing(clientPort :mach_port_t;
+simpleroutine PCSetFullscreenWindowIsShowing(clientPort :mach_port_t;
isShowing :boolean_t);
simpleroutine PCSetException(clientPort :mach_port_t;
diff --git a/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs b/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs
index c7cec89..fa808ac 100644
--- a/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs
+++ b/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs
@@ -240,5 +240,8 @@ simpleroutine PHPluginInstancePrivateBrowsingModeDidChange(pluginHostPort :mach_
pluginID :uint32_t;
privateBrowsingEnabled :boolean_t);
-simpleroutine PHSyncOpenPanelReply(pluginHostPort :mach_port_t;
- filenames :data_t);
+simpleroutine PHPluginInstanceSnapshot(pluginHostPort :mach_port_t;
+ pluginID :uint32_t;
+ requestID :uint32_t;
+ width :uint32_t;
+ height :uint32_t);
diff --git a/WebKit/mac/Plugins/Hosted/WebKitPluginHostTypes.h b/WebKit/mac/Plugins/Hosted/WebKitPluginHostTypes.h
index e8bd82d..0bac2bc 100644
--- a/WebKit/mac/Plugins/Hosted/WebKitPluginHostTypes.h
+++ b/WebKit/mac/Plugins/Hosted/WebKitPluginHostTypes.h
@@ -58,4 +58,10 @@ enum ValueType {
NPObjectValueType
};
+enum RendererType {
+ UseAcceleratedCompositing,
+ UseSoftwareRenderer,
+ UseLayerBackedView
+};
+
#endif // WebKitPluginHostTypes_h
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.h b/WebKit/mac/Plugins/WebBaseNetscapePluginView.h
index 029a058..1a4b6bb 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.h
+++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.h
@@ -31,6 +31,7 @@
#import "WebNetscapePluginPackage.h"
#import "WebPluginContainerCheck.h"
+#import <wtf/Forward.h>
#import <wtf/OwnPtr.h>
#import <wtf/PassRefPtr.h>
#import <wtf/RefPtr.h>
@@ -42,12 +43,16 @@
@class WebView;
namespace WebCore {
- class CString;
class HTMLPlugInElement;
}
class WebHaltablePlugin;
+// Also declared in WebCore/WidgetMac.mm
+@interface NSView (Widget)
+- (void)visibleRectDidChange;
+@end
+
@interface WebBaseNetscapePluginView : NSView
{
RetainPtr<WebNetscapePluginPackage> _pluginPackage;
@@ -92,7 +97,10 @@ class WebHaltablePlugin;
- (NSMutableURLRequest *)requestWithURLCString:(const char *)URLCString;
// Subclasses must override these.
+// The "handle" prefix is needed to avoid overriding NSView methods.
- (void)handleMouseMoved:(NSEvent *)event;
+- (void)handleMouseEntered:(NSEvent *)event;
+- (void)handleMouseExited:(NSEvent *)event;
- (void)setAttributeKeys:(NSArray *)keys andValues:(NSArray *)values;
- (void)focusChanged;
@@ -120,23 +128,25 @@ class WebHaltablePlugin;
- (void)addWindowObservers;
- (void)removeWindowObservers;
- (BOOL)shouldClipOutPlugin;
+- (BOOL)inFlatteningPaint;
+- (BOOL)supportsSnapshotting;
- (BOOL)convertFromX:(double)sourceX andY:(double)sourceY space:(NPCoordinateSpace)sourceSpace
toX:(double *)destX andY:(double *)destY space:(NPCoordinateSpace)destSpace;
-- (WebCore::CString)resolvedURLStringForURL:(const char*)url target:(const char*)target;
+- (WTF::CString)resolvedURLStringForURL:(const char*)url target:(const char*)target;
- (void)invalidatePluginContentRect:(NSRect)rect;
+#ifndef BUILDING_ON_TIGER
+- (CALayer *)pluginLayer;
+#endif
+
@end
namespace WebKit {
-#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
-WebCore::CString proxiesForURL(NSURL *);
-#endif
-
bool getAuthenticationInfo(const char* protocolStr, const char* hostStr, int32_t port, const char* schemeStr, const char* realmStr,
- WebCore::CString& username, WebCore::CString& password);
+ WTF::CString& username, WTF::CString& password);
}
#endif
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
index e93509a..b6b8b64 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
@@ -41,12 +41,10 @@
#import "WebView.h"
#import "WebViewInternal.h"
-#import <WebCore/WebCoreObjCExtras.h>
#import <WebCore/AuthenticationMac.h>
#import <WebCore/BitmapImage.h>
#import <WebCore/Credential.h>
#import <WebCore/CredentialStorage.h>
-#import <WebCore/CString.h>
#import <WebCore/Document.h>
#import <WebCore/Element.h>
#import <WebCore/Frame.h>
@@ -57,9 +55,12 @@
#import <WebCore/ProtectionSpace.h>
#import <WebCore/RenderView.h>
#import <WebCore/RenderWidget.h>
+#import <WebCore/WebCoreObjCExtras.h>
#import <WebKit/DOMPrivate.h>
#import <runtime/InitializeThreading.h>
#import <wtf/Assertions.h>
+#import <wtf/Threading.h>
+#import <wtf/text/CString.h>
#define LoginWindowDidSwitchFromUserNotification @"WebLoginWindowDidSwitchFromUserNotification"
#define LoginWindowDidSwitchToUserNotification @"WebLoginWindowDidSwitchToUserNotification"
@@ -107,7 +108,7 @@ bool WebHaltablePlugin::isWindowed() const
String WebHaltablePlugin::pluginName() const
{
- return [[m_view pluginPackage] name];
+ return [[m_view pluginPackage] pluginInfo].name;
}
@implementation WebBaseNetscapePluginView
@@ -115,6 +116,7 @@ String WebHaltablePlugin::pluginName() const
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
@@ -144,7 +146,7 @@ String WebHaltablePlugin::pluginName() const
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
// Enable "kiosk mode" when instantiating the QT plug-in inside of Dashboard. See <rdar://problem/6878105>
if ([[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.dashboard.client"] &&
- [[[_pluginPackage.get() bundle] bundleIdentifier] isEqualToString:@"com.apple.QuickTime Plugin.plugin"]) {
+ [_pluginPackage.get() bundleIdentifier] == "com.apple.QuickTime Plugin.plugin") {
RetainPtr<NSMutableArray> mutableKeys(AdoptNS, [keys mutableCopy]);
RetainPtr<NSMutableArray> mutableValues(AdoptNS, [values mutableCopy]);
@@ -232,6 +234,16 @@ String WebHaltablePlugin::pluginName() const
ASSERT_NOT_REACHED();
}
+- (void)handleMouseEntered:(NSEvent *)event
+{
+ ASSERT_NOT_REACHED();
+}
+
+- (void)handleMouseExited:(NSEvent *)event
+{
+ ASSERT_NOT_REACHED();
+}
+
- (void)focusChanged
{
ASSERT_NOT_REACHED();
@@ -314,8 +326,6 @@ String WebHaltablePlugin::pluginName() const
- (void)restartTimers
{
- ASSERT([self window]);
-
[self stopTimers];
if (!_isStarted || [[self window] isMiniaturized])
@@ -327,13 +337,10 @@ String WebHaltablePlugin::pluginName() const
- (NSRect)_windowClipRect
{
RenderObject* renderer = _element->renderer();
-
- if (renderer && renderer->view()) {
- if (FrameView* frameView = renderer->view()->frameView())
- return frameView->windowClipRectForLayer(renderer->enclosingLayer(), true);
- }
-
- return NSZeroRect;
+ if (!renderer || !renderer->view())
+ return NSZeroRect;
+
+ return toRenderWidget(renderer)->windowClipRect();
}
- (NSRect)visibleRect
@@ -343,6 +350,11 @@ String WebHaltablePlugin::pluginName() const
return NSIntersectionRect([self convertRect:[self _windowClipRect] fromView:nil], [super visibleRect]);
}
+- (void)visibleRectDidChange
+{
+ [self renewGState];
+}
+
- (BOOL)acceptsFirstResponder
{
return YES;
@@ -496,9 +508,9 @@ String WebHaltablePlugin::pluginName() const
ASSERT(_isStarted);
Element *element = [self element];
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
- CGImageRef cgImage = CGImageRetain([core([self webFrame])->nodeImage(element) CGImageForProposedRect:nil context:nil hints:nil]);
+ CGImageRef cgImage = CGImageRetain([core([self webFrame])->nodeImage(element).get() CGImageForProposedRect:nil context:nil hints:nil]);
#else
- RetainPtr<CGImageSourceRef> imageRef(AdoptCF, CGImageSourceCreateWithData((CFDataRef)[core([self webFrame])->nodeImage(element) TIFFRepresentation], 0));
+ RetainPtr<CGImageSourceRef> imageRef(AdoptCF, CGImageSourceCreateWithData((CFDataRef)[core([self webFrame])->nodeImage(element).get() TIFFRepresentation], 0));
CGImageRef cgImage = CGImageSourceCreateImageAtIndex(imageRef.get(), 0, 0);
#endif
ASSERT(cgImage);
@@ -545,22 +557,28 @@ String WebHaltablePlugin::pluginName() const
return _isHalted;
}
-- (BOOL)superviewsHaveSuperviews
+- (BOOL)shouldClipOutPlugin
{
- NSView *contentView = [[self window] contentView];
- for (NSView *view = self; view; view = [view superview]) {
- if (view == contentView)
- return YES;
+ NSWindow *window = [self window];
+ return !window || [window isMiniaturized] || [NSApp isHidden] || ![self isDescendantOf:[[self window] contentView]] || [self isHiddenOrHasHiddenAncestor];
+}
+
+- (BOOL)inFlatteningPaint
+{
+ RenderObject* renderer = _element->renderer();
+ if (renderer && renderer->view()) {
+ if (FrameView* frameView = renderer->view()->frameView())
+ return frameView->paintBehavior() & PaintBehaviorFlattenCompositingLayers;
}
+
return NO;
}
-- (BOOL)shouldClipOutPlugin
+- (BOOL)supportsSnapshotting
{
- NSWindow *window = [self window];
- return !window || [window isMiniaturized] || [NSApp isHidden] || ![self superviewsHaveSuperviews] || [self isHiddenOrHasHiddenAncestor];
+ return [_pluginPackage.get() supportsSnapshotting];
}
-
+
- (BOOL)hasBeenHalted
{
return _hasBeenHalted;
@@ -897,7 +915,7 @@ String WebHaltablePlugin::pluginName() const
}
-- (CString)resolvedURLStringForURL:(const char*)url target:(const char*)target;
+- (CString)resolvedURLStringForURL:(const char*)url target:(const char*)target
{
String relativeURLString = String::fromUTF8(url);
if (relativeURLString.isNull())
@@ -928,70 +946,18 @@ String WebHaltablePlugin::pluginName() const
}
}
+#ifndef BUILDING_ON_TIGER
+- (CALayer *)pluginLayer
+{
+ ASSERT_NOT_REACHED();
+ return nil;
+}
+#endif
+
@end
namespace WebKit {
-#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
-CString proxiesForURL(NSURL *url)
-{
- RetainPtr<CFDictionaryRef> systemProxies(AdoptCF, CFNetworkCopySystemProxySettings());
- if (!systemProxies)
- return "DIRECT";
-
- RetainPtr<CFArrayRef> proxiesForURL(AdoptCF, CFNetworkCopyProxiesForURL((CFURLRef)url, systemProxies.get()));
- CFIndex proxyCount = proxiesForURL ? CFArrayGetCount(proxiesForURL.get()) : 0;
- if (!proxyCount)
- return "DIRECT";
-
- // proxiesForURL is a CFArray of CFDictionaries. Each dictionary represents a proxy.
- // The format of the result should be:
- // "PROXY host[:port]" (for HTTP proxy) or
- // "SOCKS host[:port]" (for SOCKS proxy) or
- // A combination of the above, separated by semicolon, in the order that they should be tried.
- String proxies;
- for (CFIndex i = 0; i < proxyCount; ++i) {
- CFDictionaryRef proxy = static_cast<CFDictionaryRef>(CFArrayGetValueAtIndex(proxiesForURL.get(), i));
- if (!proxy)
- continue;
-
- CFStringRef type = static_cast<CFStringRef>(CFDictionaryGetValue(proxy, kCFProxyTypeKey));
- bool isHTTP = type == kCFProxyTypeHTTP || type == kCFProxyTypeHTTPS;
- bool isSOCKS = type == kCFProxyTypeSOCKS;
-
- // We can only report HTTP and SOCKS proxies.
- if (!isHTTP && !isSOCKS)
- continue;
-
- CFStringRef host = static_cast<CFStringRef>(CFDictionaryGetValue(proxy, kCFProxyHostNameKey));
- CFNumberRef port = static_cast<CFNumberRef>(CFDictionaryGetValue(proxy, kCFProxyPortNumberKey));
-
- // If we are inserting multiple entries, add a separator
- if (!proxies.isEmpty())
- proxies += ";";
-
- if (isHTTP)
- proxies += "PROXY ";
- else if (isSOCKS)
- proxies += "SOCKS ";
-
- proxies += host;
-
- if (port) {
- SInt32 intPort;
- CFNumberGetValue(port, kCFNumberSInt32Type, &intPort);
-
- proxies += ":" + String::number(intPort);
- }
- }
-
- if (proxies.isEmpty())
- return "DIRECT";
-
- return proxies.utf8();
-}
-#endif
-
bool getAuthenticationInfo(const char* protocolStr, const char* hostStr, int32_t port, const char* schemeStr, const char* realmStr,
CString& username, CString& password)
{
diff --git a/WebKit/mac/Plugins/WebBasePluginPackage.h b/WebKit/mac/Plugins/WebBasePluginPackage.h
index 1082551..a42a82e 100644
--- a/WebKit/mac/Plugins/WebBasePluginPackage.h
+++ b/WebKit/mac/Plugins/WebBasePluginPackage.h
@@ -26,7 +26,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import <WebCore/WebCoreViewFactory.h>
+#import <WebCore/PluginData.h>
+#import <wtf/RetainPtr.h>
#if ENABLE(NETSCAPE_PLUGIN_API)
#import <WebKit/npfunctions.h>
@@ -52,21 +53,15 @@ typedef void (*BP_CreatePluginMIMETypesPreferencesFuncPtr)(void);
#define WebPluginTypeDescriptionKey @"WebPluginTypeDescription"
#define WebPluginTypeEnabledKey @"WebPluginTypeEnabled"
-@interface WebBasePluginPackage : NSObject <WebCorePluginInfo>
+@interface WebBasePluginPackage : NSObject
{
NSMutableSet *pluginDatabases;
- NSString *name;
- NSString *path;
- NSString *pluginDescription;
+ WTF::String path;
+ WebCore::PluginInfo pluginInfo;
- NSBundle *bundle;
- CFBundleRef cfBundle;
+ RetainPtr<CFBundleRef> cfBundle;
- NSDictionary *MIMEToDescription;
- NSDictionary *MIMEToExtensions;
- NSMutableDictionary *extensionToMIME;
-
BP_CreatePluginMIMETypesPreferencesFuncPtr BP_CreatePluginMIMETypesPreferences;
}
@@ -78,23 +73,16 @@ typedef void (*BP_CreatePluginMIMETypesPreferencesFuncPtr)(void);
- (BOOL)load;
- (void)unload;
-- (NSString *)name;
-- (NSString *)path;
-- (NSString *)filename;
-- (NSString *)pluginDescription;
-- (NSBundle *)bundle;
-
-- (NSEnumerator *)extensionEnumerator;
-- (NSEnumerator *)MIMETypeEnumerator;
-- (NSString *)descriptionForMIMEType:(NSString *)MIMEType;
-- (NSString *)MIMETypeForExtension:(NSString *)extension;
-- (NSArray *)extensionsForMIMEType:(NSString *)MIMEType;
-
-- (void)setName:(NSString *)theName;
-- (void)setPath:(NSString *)thePath;
-- (void)setPluginDescription:(NSString *)description;
-- (void)setMIMEToDescriptionDictionary:(NSDictionary *)MIMEToDescriptionDictionary;
-- (void)setMIMEToExtensionsDictionary:(NSDictionary *)MIMEToExtensionsDictionary;
+- (const WTF::String&)path;
+
+- (const WebCore::PluginInfo&)pluginInfo;
+
+- (WTF::String)bundleIdentifier;
+
+- (BOOL)supportsExtension:(const WTF::String&)extension;
+- (BOOL)supportsMIMEType:(const WTF::String&)MIMEType;
+
+- (NSString *)MIMETypeForExtension:(const WTF::String&)extension;
- (BOOL)isQuickTimePlugIn;
- (BOOL)isJavaPlugIn;
diff --git a/WebKit/mac/Plugins/WebBasePluginPackage.mm b/WebKit/mac/Plugins/WebBasePluginPackage.mm
index 1bddbcf..78b0a7f 100644
--- a/WebKit/mac/Plugins/WebBasePluginPackage.mm
+++ b/WebKit/mac/Plugins/WebBasePluginPackage.mm
@@ -28,13 +28,15 @@
#import <WebKit/WebBasePluginPackage.h>
+#import <algorithm>
+#import <WebCore/WebCoreObjCExtras.h>
#import <WebKit/WebKitNSStringExtras.h>
-#import <WebKit/WebNetscapePluginPackage.h>
#import <WebKit/WebNSObjectExtras.h>
+#import <WebKit/WebNetscapePluginPackage.h>
#import <WebKit/WebPluginPackage.h>
-#import <WebCore/WebCoreObjCExtras.h>
#import <runtime/InitializeThreading.h>
#import <wtf/Assertions.h>
+#import <wtf/Threading.h>
#import <wtf/Vector.h>
#import <WebKitSystemInterface.h>
@@ -46,23 +48,26 @@
#import <mach-o/fat.h>
#import <mach-o/loader.h>
+#define JavaCocoaPluginIdentifier "com.apple.JavaPluginCocoa"
+#define JavaCarbonPluginIdentifier "com.apple.JavaAppletPlugin"
+#define JavaCFMPluginFilename "Java Applet Plugin Enabler"
-#define JavaCocoaPluginIdentifier @"com.apple.JavaPluginCocoa"
-#define JavaCarbonPluginIdentifier @"com.apple.JavaAppletPlugin"
-#define JavaCFMPluginFilename @"Java Applet Plugin Enabler"
-
-#define QuickTimeCarbonPluginIdentifier @"com.apple.QuickTime Plugin.plugin"
-#define QuickTimeCocoaPluginIdentifier @"com.apple.quicktime.webplugin"
+#define QuickTimeCarbonPluginIdentifier "com.apple.QuickTime Plugin.plugin"
+#define QuickTimeCocoaPluginIdentifier "com.apple.quicktime.webplugin"
@interface NSArray (WebPluginExtensions)
- (NSArray *)_web_lowercaseStrings;
@end;
+using namespace std;
+using namespace WebCore;
+
@implementation WebBasePluginPackage
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
@@ -89,7 +94,7 @@
return WebCFAutorelease(WKCopyCFLocalizationPreferredName(NULL));
}
-- (NSString *)pathByResolvingSymlinksAndAliasesInPath:(NSString *)thePath
+static NSString *pathByResolvingSymlinksAndAliases(NSString *thePath)
{
NSString *newPath = [thePath stringByResolvingSymlinksInPath];
@@ -120,80 +125,20 @@
if (!(self = [super init]))
return nil;
- path = [[self pathByResolvingSymlinksAndAliasesInPath:pluginPath] retain];
- bundle = [[NSBundle alloc] initWithPath:path];
+ path = pathByResolvingSymlinksAndAliases(pluginPath);
+ cfBundle.adoptCF(CFBundleCreate(kCFAllocatorDefault, (CFURLRef)[NSURL fileURLWithPath:path]));
+
#ifndef __ppc__
// 32-bit PowerPC is the only platform where non-bundled CFM plugins are supported
- if (!bundle) {
+ if (!cfBundle) {
[self release];
return nil;
}
#endif
- cfBundle = CFBundleCreate(NULL, (CFURLRef)[NSURL fileURLWithPath:path]);
- extensionToMIME = [[NSMutableDictionary alloc] init];
return self;
}
-- (BOOL)getPluginInfoFromBundleAndMIMEDictionary:(NSDictionary *)MIMETypes
-{
- if (!bundle)
- return NO;
-
- if (!MIMETypes) {
- MIMETypes = [bundle objectForInfoDictionaryKey:WebPluginMIMETypesKey];
- if (!MIMETypes)
- return NO;
- }
-
- NSMutableDictionary *MIMEToExtensionsDictionary = [NSMutableDictionary dictionary];
- NSMutableDictionary *MIMEToDescriptionDictionary = [NSMutableDictionary dictionary];
- NSEnumerator *keyEnumerator = [MIMETypes keyEnumerator];
- NSDictionary *MIMEDictionary;
- NSString *MIME, *description;
- NSArray *extensions;
-
- while ((MIME = [keyEnumerator nextObject]) != nil) {
- MIMEDictionary = [MIMETypes objectForKey:MIME];
-
- // FIXME: Consider storing disabled MIME types.
- NSNumber *isEnabled = [MIMEDictionary objectForKey:WebPluginTypeEnabledKey];
- if (isEnabled && [isEnabled boolValue] == NO)
- continue;
-
- extensions = [[MIMEDictionary objectForKey:WebPluginExtensionsKey] _web_lowercaseStrings];
- if ([extensions count] == 0)
- extensions = [NSArray arrayWithObject:@""];
-
- MIME = [MIME lowercaseString];
-
- [MIMEToExtensionsDictionary setObject:extensions forKey:MIME];
-
- description = [MIMEDictionary objectForKey:WebPluginTypeDescriptionKey];
- if (!description)
- description = @"";
-
- [MIMEToDescriptionDictionary setObject:description forKey:MIME];
- }
-
- [self setMIMEToExtensionsDictionary:MIMEToExtensionsDictionary];
- [self setMIMEToDescriptionDictionary:MIMEToDescriptionDictionary];
-
- NSString *filename = [self filename];
-
- NSString *theName = [bundle objectForInfoDictionaryKey:WebPluginNameKey];
- if (!theName)
- theName = filename;
- [self setName:theName];
-
- description = [bundle objectForInfoDictionaryKey:WebPluginDescriptionKey];
- if (!description)
- description = filename;
- [self setPluginDescription:description];
-
- return YES;
-}
-
- (void)unload
{
}
@@ -223,13 +168,22 @@
return pList;
}
+- (id)_objectForInfoDictionaryKey:(NSString *)key
+{
+ CFDictionaryRef bundleInfoDictionary = CFBundleGetInfoDictionary(cfBundle.get());
+ if (!bundleInfoDictionary)
+ return nil;
+
+ return (id)CFDictionaryGetValue(bundleInfoDictionary, key);
+}
+
- (BOOL)getPluginInfoFromPLists
{
- if (!bundle)
+ if (!cfBundle)
return NO;
NSDictionary *MIMETypes = nil;
- NSString *pListFilename = [bundle objectForInfoDictionaryKey:WebPluginMIMETypesFilenameKey];
+ NSString *pListFilename = [self _objectForInfoDictionaryKey:WebPluginMIMETypesFilenameKey];
// Check if the MIME types are claimed in a plist in the user's preferences directory.
if (pListFilename) {
@@ -245,15 +199,65 @@
// Plist doesn't exist, ask the plug-in to create it.
MIMETypes = [[self pListForPath:pListPath createFile:YES] objectForKey:WebPluginMIMETypesKey];
}
-
- // Pass the MIME dictionary to the superclass to parse it.
- return [self getPluginInfoFromBundleAndMIMEDictionary:MIMETypes];
+
+ if (!MIMETypes) {
+ MIMETypes = [self _objectForInfoDictionaryKey:WebPluginMIMETypesKey];
+ if (!MIMETypes)
+ return NO;
+ }
+
+ NSEnumerator *keyEnumerator = [MIMETypes keyEnumerator];
+ NSDictionary *MIMEDictionary;
+ NSString *MIME, *description;
+ NSArray *extensions;
+
+ while ((MIME = [keyEnumerator nextObject]) != nil) {
+ MIMEDictionary = [MIMETypes objectForKey:MIME];
+
+ // FIXME: Consider storing disabled MIME types.
+ NSNumber *isEnabled = [MIMEDictionary objectForKey:WebPluginTypeEnabledKey];
+ if (isEnabled && [isEnabled boolValue] == NO)
+ continue;
+
+ MimeClassInfo mimeClassInfo;
+
+ extensions = [[MIMEDictionary objectForKey:WebPluginExtensionsKey] _web_lowercaseStrings];
+ for (NSUInteger i = 0; i < [extensions count]; ++i)
+ mimeClassInfo.extensions.append((NSString *)[extensions objectAtIndex:i]);
+
+ if ([extensions count] == 0)
+ extensions = [NSArray arrayWithObject:@""];
+
+ mimeClassInfo.type = String(MIME).lower();
+
+ description = [MIMEDictionary objectForKey:WebPluginTypeDescriptionKey];
+ mimeClassInfo.desc = description;
+
+ pluginInfo.mimes.append(mimeClassInfo);
+ if (!description)
+ description = @"";
+ }
+
+ NSString *filename = [(NSString *)path lastPathComponent];
+ pluginInfo.file = filename;
+
+ NSString *theName = [self _objectForInfoDictionaryKey:WebPluginNameKey];
+ if (!theName)
+ theName = filename;
+ pluginInfo.name = theName;
+
+ description = [self _objectForInfoDictionaryKey:WebPluginDescriptionKey];
+ if (!description)
+ description = filename;
+ pluginInfo.desc = description;
+
+ return YES;
}
- (BOOL)load
{
- if (bundle && !BP_CreatePluginMIMETypesPreferences)
- BP_CreatePluginMIMETypesPreferences = (BP_CreatePluginMIMETypesPreferencesFuncPtr)CFBundleGetFunctionPointerForName(cfBundle, CFSTR("BP_CreatePluginMIMETypesPreferences"));
+ if (cfBundle && !BP_CreatePluginMIMETypesPreferences)
+ BP_CreatePluginMIMETypesPreferences = (BP_CreatePluginMIMETypesPreferencesFuncPtr)CFBundleGetFunctionPointerForName(cfBundle.get(), CFSTR("BP_CreatePluginMIMETypesPreferences"));
return YES;
}
@@ -263,18 +267,6 @@
ASSERT(!pluginDatabases || [pluginDatabases count] == 0);
[pluginDatabases release];
- [name release];
- [path release];
- [pluginDescription release];
-
- [MIMEToDescription release];
- [MIMEToExtensions release];
- [extensionToMIME release];
-
- [bundle release];
- if (cfBundle)
- CFRelease(cfBundle);
-
[super dealloc];
}
@@ -284,128 +276,71 @@
ASSERT(!pluginDatabases || [pluginDatabases count] == 0);
[pluginDatabases release];
- if (cfBundle)
- CFRelease(cfBundle);
-
[super finalize];
}
-- (NSString *)name
-{
- return name;
-}
-
-- (NSString *)path
+- (const String&)path
{
return path;
}
-- (NSString *)filename
+- (const PluginInfo&)pluginInfo
{
- return [path lastPathComponent];
+ return pluginInfo;
}
-- (NSString *)pluginDescription
+- (BOOL)supportsExtension:(const String&)extension
{
- return pluginDescription;
-}
-
-- (NSEnumerator *)extensionEnumerator
-{
- return [extensionToMIME keyEnumerator];
-}
-
-- (NSEnumerator *)MIMETypeEnumerator
-{
- return [MIMEToExtensions keyEnumerator];
-}
-
-- (NSString *)descriptionForMIMEType:(NSString *)MIMEType
-{
- return [MIMEToDescription objectForKey:MIMEType];
-}
-
-- (NSString *)MIMETypeForExtension:(NSString *)extension
-{
- return [extensionToMIME objectForKey:extension];
-}
-
-- (NSArray *)extensionsForMIMEType:(NSString *)MIMEType
-{
- return [MIMEToExtensions objectForKey:MIMEType];
-}
-
-- (NSBundle *)bundle
-{
- return bundle;
-}
-
-- (void)setName:(NSString *)theName
-{
- [name release];
- name = [theName retain];
-}
+ ASSERT(extension.lower() == extension);
+
+ for (size_t i = 0; i < pluginInfo.mimes.size(); ++i) {
+ const Vector<String>& extensions = pluginInfo.mimes[i].extensions;
-- (void)setPath:(NSString *)thePath
-{
- [path release];
- path = [thePath retain];
-}
+ if (find(extensions.begin(), extensions.end(), extension) != extensions.end())
+ return YES;
+ }
-- (void)setPluginDescription:(NSString *)description
-{
- [pluginDescription release];
- pluginDescription = [description retain];
+ return NO;
}
-- (void)setMIMEToDescriptionDictionary:(NSDictionary *)MIMEToDescriptionDictionary
+- (BOOL)supportsMIMEType:(const WTF::String&)mimeType
{
- [MIMEToDescription release];
- MIMEToDescription = [MIMEToDescriptionDictionary retain];
+ ASSERT(mimeType.lower() == mimeType);
+
+ for (size_t i = 0; i < pluginInfo.mimes.size(); ++i) {
+ if (pluginInfo.mimes[i].type == mimeType)
+ return YES;
+ }
+
+ return NO;
}
-- (void)setMIMEToExtensionsDictionary:(NSDictionary *)MIMEToExtensionsDictionary
+- (NSString *)MIMETypeForExtension:(const String&)extension
{
- [MIMEToExtensions release];
- MIMEToExtensions = [MIMEToExtensionsDictionary retain];
-
- // Reverse the mapping
- [extensionToMIME removeAllObjects];
-
- NSEnumerator *MIMEEnumerator = [MIMEToExtensions keyEnumerator], *extensionEnumerator;
- NSString *MIME, *extension;
- NSArray *extensions;
+ ASSERT(extension.lower() == extension);
- while ((MIME = [MIMEEnumerator nextObject]) != nil) {
- extensions = [MIMEToExtensions objectForKey:MIME];
- extensionEnumerator = [extensions objectEnumerator];
-
- while ((extension = [extensionEnumerator nextObject]) != nil) {
- if (![extension isEqualToString:@""])
- [extensionToMIME setObject:MIME forKey:extension];
- }
+ for (size_t i = 0; i < pluginInfo.mimes.size(); ++i) {
+ const MimeClassInfo& mimeClassInfo = pluginInfo.mimes[i];
+ const Vector<String>& extensions = mimeClassInfo.extensions;
+
+ if (find(extensions.begin(), extensions.end(), extension) != extensions.end())
+ return mimeClassInfo.type;
}
-}
-- (NSString *)description
-{
- return [NSString stringWithFormat:@"name: %@\npath: %@\nmimeTypes:\n%@\npluginDescription:%@",
- name, path, [MIMEToExtensions description], [MIMEToDescription description], pluginDescription];
+ return nil;
}
- (BOOL)isQuickTimePlugIn
{
- NSString *bundleIdentifier = [[self bundle] bundleIdentifier];
- return [bundleIdentifier _webkit_isCaseInsensitiveEqualToString:QuickTimeCarbonPluginIdentifier] ||
- [bundleIdentifier _webkit_isCaseInsensitiveEqualToString:QuickTimeCocoaPluginIdentifier];
+ const String& bundleIdentifier = [self bundleIdentifier];
+ return bundleIdentifier == QuickTimeCocoaPluginIdentifier || bundleIdentifier == QuickTimeCocoaPluginIdentifier;
}
- (BOOL)isJavaPlugIn
{
- NSString *bundleIdentifier = [[self bundle] bundleIdentifier];
- return [bundleIdentifier _webkit_isCaseInsensitiveEqualToString:JavaCocoaPluginIdentifier] ||
- [bundleIdentifier _webkit_isCaseInsensitiveEqualToString:JavaCarbonPluginIdentifier] ||
- [[path lastPathComponent] _webkit_isCaseInsensitiveEqualToString:JavaCFMPluginFilename];
+ const String& bundleIdentifier = [self bundleIdentifier];
+ return bundleIdentifier == JavaCocoaPluginIdentifier || bundleIdentifier == JavaCarbonPluginIdentifier ||
+ equalIgnoringCase(pluginInfo.file, JavaCFMPluginFilename);
}
static inline void swapIntsInHeader(uint8_t* bytes, unsigned length)
@@ -490,7 +425,7 @@ static inline void swapIntsInHeader(uint8_t* bytes, unsigned length)
- (UInt32)versionNumber
{
// CFBundleGetVersionNumber doesn't work with all possible versioning schemes, but we think for now it's good enough for us.
- return CFBundleGetVersionNumber(cfBundle);
+ return CFBundleGetVersionNumber(cfBundle.get());
}
- (void)wasAddedToPluginDatabase:(WebPluginDatabase *)database
@@ -510,6 +445,11 @@ static inline void swapIntsInHeader(uint8_t* bytes, unsigned length)
[pluginDatabases removeObject:database];
}
+- (WTF::String)bundleIdentifier
+{
+ return CFBundleGetIdentifier(cfBundle.get());
+}
+
@end
@implementation NSArray (WebPluginExtensions)
diff --git a/WebKit/mac/Plugins/WebNetscapeContainerCheckContextInfo.h b/WebKit/mac/Plugins/WebNetscapeContainerCheckContextInfo.h
index e9b14a7..dcd4dd4 100644
--- a/WebKit/mac/Plugins/WebNetscapeContainerCheckContextInfo.h
+++ b/WebKit/mac/Plugins/WebNetscapeContainerCheckContextInfo.h
@@ -31,14 +31,14 @@
#if ENABLE(NETSCAPE_PLUGIN_API)
@interface WebNetscapeContainerCheckContextInfo : NSObject {
- uint32 _checkRequestID;
- void (*_callback)(NPP npp, uint32, NPBool, void *);
+ uint32_t _checkRequestID;
+ void (*_callback)(NPP npp, uint32_t, NPBool, void *);
void *_context;
}
-- (id)initWithCheckRequestID:(uint32)checkRequestID callbackFunc:(void (*)(NPP npp, uint32 checkID, NPBool allowed, void* context))callbackFunc context:(void*)context;
-- (uint32)checkRequestID;
-- (void (*)(NPP npp, uint32, NPBool, void*))callback;
+- (id)initWithCheckRequestID:(uint32_t)checkRequestID callbackFunc:(void (*)(NPP npp, uint32_t checkID, NPBool allowed, void* context))callbackFunc context:(void*)context;
+- (uint32_t)checkRequestID;
+- (void (*)(NPP npp, uint32_t, NPBool, void*))callback;
- (void*)context;
@end
diff --git a/WebKit/mac/Plugins/WebNetscapeContainerCheckContextInfo.mm b/WebKit/mac/Plugins/WebNetscapeContainerCheckContextInfo.mm
index 34a0ec1..8991c95 100644
--- a/WebKit/mac/Plugins/WebNetscapeContainerCheckContextInfo.mm
+++ b/WebKit/mac/Plugins/WebNetscapeContainerCheckContextInfo.mm
@@ -29,7 +29,7 @@
@implementation WebNetscapeContainerCheckContextInfo
-- (id)initWithCheckRequestID:(uint32)checkRequestID callbackFunc:(void (*)(NPP npp, uint32 checkID, NPBool allowed, void* context))callbackFunc context:(void*)context
+- (id)initWithCheckRequestID:(uint32_t)checkRequestID callbackFunc:(void (*)(NPP npp, uint32_t checkID, NPBool allowed, void* context))callbackFunc context:(void*)context
{
self = [super init];
if (!self)
@@ -41,12 +41,12 @@
return self;
}
-- (uint32)checkRequestID
+- (uint32_t)checkRequestID
{
return _checkRequestID;
}
-- (void (*)(NPP npp, uint32, NPBool, void*))callback
+- (void (*)(NPP npp, uint32_t, NPBool, void*))callback
{
return _callback;
}
diff --git a/WebKit/mac/Plugins/WebNetscapeContainerCheckPrivate.h b/WebKit/mac/Plugins/WebNetscapeContainerCheckPrivate.h
index dfde2f7..799680b 100644
--- a/WebKit/mac/Plugins/WebNetscapeContainerCheckPrivate.h
+++ b/WebKit/mac/Plugins/WebNetscapeContainerCheckPrivate.h
@@ -40,17 +40,17 @@ extern "C" {
#define WKNVBrowserContainerCheckFuncsVersionHasGetLocation 2
-typedef uint32 (*WKN_CheckIfAllowedToLoadURLProcPtr)(NPP npp, const char* url, const char* frame, void (*callbackFunc)(NPP npp, uint32, NPBool allowed, void* context), void* context);
-typedef void (*WKN_CancelCheckIfAllowedToLoadURLProcPtr)(NPP npp, uint32);
+typedef uint32_t (*WKN_CheckIfAllowedToLoadURLProcPtr)(NPP npp, const char* url, const char* frame, void (*callbackFunc)(NPP npp, uint32_t, NPBool allowed, void* context), void* context);
+typedef void (*WKN_CancelCheckIfAllowedToLoadURLProcPtr)(NPP npp, uint32_t);
typedef char* (*WKN_ResolveURLProcPtr)(NPP npp, const char* url, const char* target);
-uint32 WKN_CheckIfAllowedToLoadURL(NPP npp, const char* url, const char* frame, void (*callbackFunc)(NPP npp, uint32, NPBool allowed, void* context), void* context);
-void WKN_CancelCheckIfAllowedToLoadURL(NPP npp, uint32);
+uint32_t WKN_CheckIfAllowedToLoadURL(NPP npp, const char* url, const char* frame, void (*callbackFunc)(NPP npp, uint32_t, NPBool allowed, void* context), void* context);
+void WKN_CancelCheckIfAllowedToLoadURL(NPP npp, uint32_t);
char* WKN_ResolveURL(NPP npp, const char* url, const char* target);
typedef struct _WKNBrowserContainerCheckFuncs {
- uint16 size;
- uint16 version;
+ uint16_t size;
+ uint16_t version;
WKN_CheckIfAllowedToLoadURLProcPtr checkIfAllowedToLoadURL;
WKN_CancelCheckIfAllowedToLoadURLProcPtr cancelCheckIfAllowedToLoadURL;
diff --git a/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm b/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm
index d8324f7..a3aca1f 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm
+++ b/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm
@@ -49,8 +49,6 @@ static void getCarbonEvent(EventRecord* carbonEvent)
carbonEvent->when = TickCount();
GetGlobalMouse(&carbonEvent->where);
- carbonEvent->where.h = static_cast<short>(carbonEvent->where.h * HIGetScaleFactor());
- carbonEvent->where.v = static_cast<short>(carbonEvent->where.v * HIGetScaleFactor());
carbonEvent->modifiers = GetCurrentKeyModifiers();
if (!Button())
carbonEvent->modifiers |= btnState;
@@ -87,11 +85,8 @@ static EventModifiers modifiersForEvent(NSEvent *event)
static void getCarbonEvent(EventRecord *carbonEvent, NSEvent *cocoaEvent)
{
- if (WKConvertNSEventToCarbonEvent(carbonEvent, cocoaEvent)) {
- carbonEvent->where.h = static_cast<short>(carbonEvent->where.h * HIGetScaleFactor());
- carbonEvent->where.v = static_cast<short>(carbonEvent->where.v * HIGetScaleFactor());
+ if (WKConvertNSEventToCarbonEvent(carbonEvent, cocoaEvent))
return;
- }
NSPoint where = [[cocoaEvent window] convertBaseToScreen:[cocoaEvent locationInWindow]];
@@ -174,7 +169,7 @@ void WebNetscapePluginEventHandlerCarbon::mouseEntered(NSEvent* theEvent)
EventRecord event;
getCarbonEvent(&event, theEvent);
- event.what = adjustCursorEvent;
+ event.what = NPEventType_AdjustCursorEvent;
BOOL acceptedEvent;
acceptedEvent = sendEvent(&event);
@@ -187,7 +182,7 @@ void WebNetscapePluginEventHandlerCarbon::mouseExited(NSEvent* theEvent)
EventRecord event;
getCarbonEvent(&event, theEvent);
- event.what = adjustCursorEvent;
+ event.what = NPEventType_AdjustCursorEvent;
BOOL acceptedEvent;
acceptedEvent = sendEvent(&event);
@@ -199,8 +194,17 @@ void WebNetscapePluginEventHandlerCarbon::mouseDragged(NSEvent*)
{
}
-void WebNetscapePluginEventHandlerCarbon::mouseMoved(NSEvent*)
+void WebNetscapePluginEventHandlerCarbon::mouseMoved(NSEvent* theEvent)
{
+ EventRecord event;
+
+ getCarbonEvent(&event, theEvent);
+ event.what = NPEventType_AdjustCursorEvent;
+
+ BOOL acceptedEvent;
+ acceptedEvent = sendEvent(&event);
+
+ LOG(PluginEvents, "NPP_HandleEvent(mouseMoved): %d", acceptedEvent);
}
void WebNetscapePluginEventHandlerCarbon::keyDown(NSEvent *theEvent)
@@ -262,14 +266,14 @@ void WebNetscapePluginEventHandlerCarbon::focusChanged(bool hasFocus)
getCarbonEvent(&event);
bool acceptedEvent;
if (hasFocus) {
- event.what = getFocusEvent;
+ event.what = NPEventType_GetFocusEvent;
acceptedEvent = sendEvent(&event);
- LOG(PluginEvents, "NPP_HandleEvent(getFocusEvent): %d", acceptedEvent);
+ LOG(PluginEvents, "NPP_HandleEvent(NPEventType_GetFocusEvent): %d", acceptedEvent);
installKeyEventHandler();
} else {
- event.what = loseFocusEvent;
+ event.what = NPEventType_LoseFocusEvent;
acceptedEvent = sendEvent(&event);
- LOG(PluginEvents, "NPP_HandleEvent(loseFocusEvent): %d", acceptedEvent);
+ LOG(PluginEvents, "NPP_HandleEvent(NPEventType_LoseFocusEvent): %d", acceptedEvent);
removeKeyEventHandler();
}
}
diff --git a/WebKit/mac/Plugins/WebNetscapePluginPackage.h b/WebKit/mac/Plugins/WebNetscapePluginPackage.h
index 010956d..445c3bb 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginPackage.h
+++ b/WebKit/mac/Plugins/WebNetscapePluginPackage.h
@@ -47,8 +47,8 @@ typedef enum {
NPPluginFuncs pluginFuncs;
NPNetscapeFuncs browserFuncs;
- uint16 pluginSize;
- uint16 pluginVersion;
+ uint16_t pluginSize;
+ uint16_t pluginVersion;
ResFileRefNum resourceRef;
@@ -77,6 +77,8 @@ typedef enum {
- (WebExecutableType)executableType;
- (NPPluginFuncs *)pluginFuncs;
+- (BOOL)supportsSnapshotting;
+
#if USE(PLUGIN_HOST_PROCESS)
- (cpu_type_t)pluginHostArchitecture;
#endif
diff --git a/WebKit/mac/Plugins/WebNetscapePluginPackage.mm b/WebKit/mac/Plugins/WebNetscapePluginPackage.mm
index 5c10d95..7ca1121 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginPackage.mm
+++ b/WebKit/mac/Plugins/WebNetscapePluginPackage.mm
@@ -29,12 +29,14 @@
#if ENABLE(NETSCAPE_PLUGIN_API)
#import "WebNetscapePluginPackage.h"
+#import "WebTypesInternal.h"
#import "WebKitLogging.h"
#import "WebKitNSStringExtras.h"
#import "WebNSFileManagerExtras.h"
#import "WebNSObjectExtras.h"
#import "WebNetscapeDeprecatedFunctions.h"
#import <WebCore/npruntime_impl.h>
+#import <wtf/RetainPtr.h>
#if USE(PLUGIN_HOST_PROCESS)
#import "NetscapePluginHostManager.h"
@@ -42,6 +44,8 @@
using namespace WebKit;
#endif
+using namespace WebCore;
+
#ifdef SUPPORT_CFM
typedef void (* FunctionPointer)(void);
typedef void (* TransitionVector)(void);
@@ -54,7 +58,7 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
#define MIMEListStringStringNumber 128
#define RealPlayerAppIndentifier @"com.RealNetworks.RealOne Player"
-#define RealPlayerPluginFilename @"RealPlayer Plugin"
+#define RealPlayerPluginFilename "RealPlayer Plugin"
@interface WebNetscapePluginPackage (Internal)
- (void)_unloadWithShutdown:(BOOL)shutdown;
@@ -95,7 +99,7 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
#ifdef SUPPORT_CFM
if (!isBundle) {
FSRef fref;
- OSErr err = FSPathMakeRef((const UInt8 *)[path fileSystemRepresentation], &fref, NULL);
+ OSErr err = FSPathMakeRef((const UInt8 *)[(NSString *)path fileSystemRepresentation], &fref, NULL);
if (err != noErr)
return -1;
@@ -103,7 +107,7 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
}
#endif
- return CFBundleOpenBundleResourceMap(cfBundle);
+ return CFBundleOpenBundleResourceMap(cfBundle.get());
}
- (void)closeResourceFile:(ResFileRefNum)resRef
@@ -115,7 +119,7 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
}
#endif
- CFBundleCloseBundleResourceMap(cfBundle, resRef);
+ CFBundleCloseBundleResourceMap(cfBundle.get(), resRef);
}
- (NSString *)stringForStringListID:(SInt16)stringListID andIndex:(SInt16)index
@@ -156,46 +160,42 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
NSArray *extensions;
unsigned i;
- NSMutableDictionary *MIMEToExtensionsDictionary = [NSMutableDictionary dictionary];
- NSMutableDictionary *MIMEToDescriptionDictionary = [NSMutableDictionary dictionary];
-
for (i=1; 1; i+=2) {
MIME = [[self stringForStringListID:MIMEListStringStringNumber
andIndex:i] lowercaseString];
if (!MIME)
break;
+ MimeClassInfo mimeClassInfo;
+ mimeClassInfo.type = String(MIME).lower();
+
extensionsList = [[self stringForStringListID:MIMEListStringStringNumber andIndex:i+1] lowercaseString];
if (extensionsList) {
extensions = [extensionsList componentsSeparatedByString:@","];
- [MIMEToExtensionsDictionary setObject:extensions forKey:MIME];
- } else
- // DRM and WMP claim MIMEs without extensions. Use a @"" extension in this case.
- [MIMEToExtensionsDictionary setObject:[NSArray arrayWithObject:@""] forKey:MIME];
+ for (NSUInteger j = 0; j < [extensions count]; ++j)
+ mimeClassInfo.extensions.append((NSString *)[extensions objectAtIndex:j]);
+ }
description = [self stringForStringListID:MIMEDescriptionStringNumber
- andIndex:[MIMEToExtensionsDictionary count]];
- if (description)
- [MIMEToDescriptionDictionary setObject:description forKey:MIME];
- else
- [MIMEToDescriptionDictionary setObject:@"" forKey:MIME];
- }
+ andIndex:pluginInfo.mimes.size() + 1];
+ mimeClassInfo.desc = description;
- [self setMIMEToDescriptionDictionary:MIMEToDescriptionDictionary];
- [self setMIMEToExtensionsDictionary:MIMEToExtensionsDictionary];
+ pluginInfo.mimes.append(mimeClassInfo);
+ }
- NSString *filename = [self filename];
+ NSString *filename = [(NSString *)path lastPathComponent];
+ pluginInfo.file = filename;
description = [self stringForStringListID:PluginNameOrDescriptionStringNumber andIndex:1];
if (!description)
description = filename;
- [self setPluginDescription:description];
+ pluginInfo.desc = description;
NSString *theName = [self stringForStringListID:PluginNameOrDescriptionStringNumber andIndex:2];
if (!theName)
theName = filename;
- [self setName:theName];
+ pluginInfo.name = theName;
[self closeResourceFile:resRef];
@@ -208,9 +208,9 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
OSType type = 0;
- if (bundle) {
+ if (cfBundle) {
// Bundle
- CFBundleGetPackageInfo(cfBundle, &type, NULL);
+ CFBundleGetPackageInfo(cfBundle.get(), &type, NULL);
#ifdef SUPPORT_CFM
isBundle = YES;
#endif
@@ -230,8 +230,11 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
return NO;
// Check if the executable is Mach-O or CFM.
- if (bundle) {
- NSFileHandle *executableFile = [NSFileHandle fileHandleForReadingAtPath:[bundle executablePath]];
+ if (cfBundle) {
+ RetainPtr<CFURLRef> executableURL(AdoptCF, CFBundleCopyExecutableURL(cfBundle.get()));
+ if (!executableURL)
+ return NO;
+ NSFileHandle *executableFile = [NSFileHandle fileHandleForReadingAtPath:[(NSURL *)executableURL.get() path]];
NSData *data = [executableFile readDataOfLength:512];
[executableFile closeFile];
// Check the length of the data before calling memcmp. We think this fixes 3782543.
@@ -246,11 +249,11 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
#endif
#if USE(PLUGIN_HOST_PROCESS)
- NSArray *archs = [bundle executableArchitectures];
+ RetainPtr<CFArrayRef> archs(AdoptCF, CFBundleCopyExecutableArchitectures(cfBundle.get()));
- if ([archs containsObject:[NSNumber numberWithInteger:NSBundleExecutableArchitectureX86_64]])
+ if ([(NSArray *)archs.get() containsObject:[NSNumber numberWithInteger:NSBundleExecutableArchitectureX86_64]])
pluginHostArchitecture = CPU_TYPE_X86_64;
- else if ([archs containsObject:[NSNumber numberWithInteger:NSBundleExecutableArchitectureI386]])
+ else if ([(NSArray *)archs.get() containsObject:[NSNumber numberWithInteger:NSBundleExecutableArchitectureI386]])
pluginHostArchitecture = CPU_TYPE_X86;
else
return NO;
@@ -299,7 +302,7 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
- (void)createPropertyListFile
{
- NetscapePluginHostManager::createPropertyListFile(self);
+ NetscapePluginHostManager::createPropertyListFile(path, pluginHostArchitecture);
}
#endif
@@ -323,7 +326,7 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
if (!cfBundle)
return;
- if ([(NSString *)CFBundleGetIdentifier(cfBundle) isEqualToString:@"com.lizardtech.NPDjVu"]) {
+ if ([self bundleIdentifier] == "com.lizardtech.NPDjVu") {
// The DjVu plug-in will crash copying the vtable if it's too big so we cap it to
// what the plug-in expects here.
// size + version + 40 function pointers.
@@ -352,7 +355,7 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
CFAbsoluteTime currentTime;
CFAbsoluteTime duration;
#endif
- LOG(Plugins, "%f Load timing started for: %@", start, [self name]);
+ LOG(Plugins, "%f Load timing started for: %@", start, (NSString *)[self pluginInfo].name);
if (isLoaded)
return YES;
@@ -360,7 +363,7 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
#ifdef SUPPORT_CFM
if (isBundle) {
#endif
- if (!CFBundleLoadExecutable(cfBundle))
+ if (!CFBundleLoadExecutable(cfBundle.get()))
return NO;
#if !LOG_DISABLED
currentTime = CFAbsoluteTimeGetCurrent();
@@ -371,14 +374,14 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
#ifdef SUPPORT_CFM
if (isCFM) {
- pluginMainFunc = (MainFuncPtr)CFBundleGetFunctionPointerForName(cfBundle, CFSTR("main") );
+ pluginMainFunc = (MainFuncPtr)CFBundleGetFunctionPointerForName(cfBundle.get(), CFSTR("main") );
if (!pluginMainFunc)
return NO;
} else {
#endif
- NP_Initialize = (NP_InitializeFuncPtr)CFBundleGetFunctionPointerForName(cfBundle, CFSTR("NP_Initialize"));
- NP_GetEntryPoints = (NP_GetEntryPointsFuncPtr)CFBundleGetFunctionPointerForName(cfBundle, CFSTR("NP_GetEntryPoints"));
- NP_Shutdown = (NPP_ShutdownProcPtr)CFBundleGetFunctionPointerForName(cfBundle, CFSTR("NP_Shutdown"));
+ NP_Initialize = (NP_InitializeFuncPtr)CFBundleGetFunctionPointerForName(cfBundle.get(), CFSTR("NP_Initialize"));
+ NP_GetEntryPoints = (NP_GetEntryPointsFuncPtr)CFBundleGetFunctionPointerForName(cfBundle.get(), CFSTR("NP_GetEntryPoints"));
+ NP_Shutdown = (NPP_ShutdownProcPtr)CFBundleGetFunctionPointerForName(cfBundle.get(), CFSTR("NP_Shutdown"));
if (!NP_Initialize || !NP_GetEntryPoints || !NP_Shutdown)
return NO;
#ifdef SUPPORT_CFM
@@ -389,7 +392,7 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
FSRef fref;
OSErr err;
- err = FSPathMakeRef((UInt8 *)[path fileSystemRepresentation], &fref, NULL);
+ err = FSPathMakeRef((UInt8 *)[(NSString *)path fileSystemRepresentation], &fref, NULL);
if (err != noErr) {
LOG_ERROR("FSPathMakeRef failed. Error=%d", err);
return NO;
@@ -503,7 +506,7 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
// Workaround for 3270576. The RealPlayer plug-in fails to load if its preference file is out of date.
// Launch the RealPlayer application to refresh the file.
if (npErr != NPERR_NO_ERROR) {
- if (npErr == NPERR_MODULE_LOAD_FAILED_ERROR && [[self filename] isEqualToString:RealPlayerPluginFilename])
+ if (npErr == NPERR_MODULE_LOAD_FAILED_ERROR && equalIgnoringCase(pluginInfo.file, RealPlayerPluginFilename))
[self launchRealPlayer];
return NO;
}
@@ -534,9 +537,9 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
// LiveConnect support
pluginFuncs.javaClass = (JRIGlobalRef)functionPointerForTVector((TransitionVector)pluginFuncs.javaClass);
if (pluginFuncs.javaClass) {
- LOG(LiveConnect, "%@: CFM entry point for NPP_GetJavaClass = %p", [self name], pluginFuncs.javaClass);
+ LOG(LiveConnect, "%@: CFM entry point for NPP_GetJavaClass = %p", (NSString *)[self pluginInfo].name, pluginFuncs.javaClass);
} else {
- LOG(LiveConnect, "%@: no entry point for NPP_GetJavaClass", [self name]);
+ LOG(LiveConnect, "%@: no entry point for NPP_GetJavaClass", (NSString *)[self pluginInfo].name);
}
} else {
@@ -625,9 +628,9 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
pluginVersion = pluginFuncs.version;
if (pluginFuncs.javaClass)
- LOG(LiveConnect, "%@: mach-o entry point for NPP_GetJavaClass = %p", [self name], pluginFuncs.javaClass);
+ LOG(LiveConnect, "%@: mach-o entry point for NPP_GetJavaClass = %p", (NSString *)[self pluginInfo].name, pluginFuncs.javaClass);
else
- LOG(LiveConnect, "%@: no entry point for NPP_GetJavaClass", [self name]);
+ LOG(LiveConnect, "%@: no entry point for NPP_GetJavaClass", (NSString *)[self pluginInfo].name);
#ifdef SUPPORT_CFM
}
@@ -689,6 +692,22 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
[self _unloadWithShutdown:YES];
}
+
+- (BOOL)supportsSnapshotting
+{
+ if ([self bundleIdentifier] != "com.macromedia.Flash Player.plugin")
+ return YES;
+
+ // Flash has a bogus Info.plist entry for CFBundleVersionString, so use CFBundleShortVersionString.
+ NSString *versionString = (NSString *)CFDictionaryGetValue(CFBundleGetInfoDictionary(cfBundle.get()), CFSTR("CFBundleShortVersionString"));
+
+ if (![versionString hasPrefix:@"10.1"])
+ return YES;
+
+ // Some prerelease versions of Flash 10.1 crash when sent a drawRect event using the CA drawing model: <rdar://problem/7739922>
+ return CFStringCompare((CFStringRef)versionString, CFSTR("10.1.53.60"), kCFCompareNumerically) != kCFCompareLessThan;
+}
+
@end
#ifdef SUPPORT_CFM
@@ -697,11 +716,11 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
FunctionPointer functionPointerForTVector(TransitionVector tvp)
{
- const uint32 temp[6] = {0x3D800000, 0x618C0000, 0x800C0000, 0x804C0004, 0x7C0903A6, 0x4E800420};
- uint32 *newGlue = NULL;
+ const uint32_t temp[6] = {0x3D800000, 0x618C0000, 0x800C0000, 0x804C0004, 0x7C0903A6, 0x4E800420};
+ uint32_t *newGlue = NULL;
if (tvp != NULL) {
- newGlue = (uint32 *)malloc(sizeof(temp));
+ newGlue = (uint32_t *)malloc(sizeof(temp));
if (newGlue != NULL) {
unsigned i;
for (i = 0; i < 6; i++) newGlue[i] = temp[i];
@@ -736,7 +755,7 @@ TransitionVector tVectorForFunctionPointer(FunctionPointer fp)
if (!isLoaded)
return;
- LOG(Plugins, "Unloading %@...", name);
+ LOG(Plugins, "Unloading %@...", (NSString *)pluginInfo.name);
// Cannot unload a plug-in package while an instance is still using it
if (instanceCount > 0) {
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginStream.h b/WebKit/mac/Plugins/WebNetscapePluginStream.h
index a28793a..20beee2 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginStream.h
+++ b/WebKit/mac/Plugins/WebNetscapePluginStream.h
@@ -36,6 +36,7 @@
#import <wtf/RefCounted.h>
#import <wtf/RefPtr.h>
#import <wtf/RetainPtr.h>
+#import <wtf/text/CString.h>
#import "WebNetscapePluginView.h"
@@ -71,7 +72,7 @@ public:
void cancelLoadAndDestroyStreamWithError(NSError *);
- void setRequestURL(NSURL *requestURL) { m_requestURL = requestURL; }
+ void setRequestURL(const WebCore::KURL& requestURL) { m_requestURL = requestURL; }
void start();
void stop();
@@ -89,7 +90,7 @@ private:
void deliverDataToFile(NSData *data);
void deliverData();
- void startStream(NSURL *, long long expectedContentLength, NSDate *lastModifiedDate, NSString *mimeType, NSData *headers);
+ void startStream(NSURL *, long long expectedContentLength, NSDate *lastModifiedDate, const WTF::String& mimeType, NSData *headers);
NSError *pluginCancelledConnectionError() const;
@@ -99,13 +100,13 @@ private:
bool wantsAllStreams() const;
RetainPtr<NSMutableData> m_deliveryData;
- RetainPtr<NSURL> m_requestURL;
+ WebCore::KURL m_requestURL;
RetainPtr<NSURL> m_responseURL;
- RetainPtr<NSString> m_mimeType;
+ CString m_mimeType;
NPP m_plugin;
- uint16 m_transferMode;
- int32 m_offset;
+ uint16_t m_transferMode;
+ int32_t m_offset;
NPStream m_stream;
RetainPtr<NSString> m_path;
int m_fileDescriptor;
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm b/WebKit/mac/Plugins/WebNetscapePluginStream.mm
index 232a6c4..f39b104 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm
+++ b/WebKit/mac/Plugins/WebNetscapePluginStream.mm
@@ -27,7 +27,7 @@
*/
#if ENABLE(NETSCAPE_PLUGIN_API)
-#import "WebBaseNetscapePluginStream.h"
+#import "WebNetscapePluginStream.h"
#import "WebNetscapePluginView.h"
#import "WebFrameInternal.h"
@@ -102,10 +102,10 @@ NPReason WebNetscapePluginStream::reasonForError(NSError *error)
NSError *WebNetscapePluginStream::pluginCancelledConnectionError() const
{
return [[[NSError alloc] _initWithPluginErrorCode:WebKitErrorPlugInCancelledConnection
- contentURL:m_responseURL ? m_responseURL.get() : m_requestURL.get()
+ contentURL:m_responseURL ? m_responseURL.get() : (NSURL *)m_requestURL
pluginPageURL:nil
- pluginName:[[m_pluginView.get() pluginPackage] name]
- MIMEType:m_mimeType.get()] autorelease];
+ pluginName:[[m_pluginView.get() pluginPackage] pluginInfo].name
+ MIMEType:(NSString *)String::fromUTF8(m_mimeType.data(), m_mimeType.length())] autorelease];
}
NSError *WebNetscapePluginStream::errorForReason(NPReason reason) const
@@ -116,7 +116,7 @@ NSError *WebNetscapePluginStream::errorForReason(NPReason reason) const
if (reason == NPRES_USER_BREAK)
return [NSError _webKitErrorWithDomain:NSURLErrorDomain
code:NSURLErrorCancelled
- URL:m_responseURL ? m_responseURL.get() : m_requestURL.get()];
+ URL:m_responseURL ? m_responseURL.get() : (NSURL *)m_requestURL];
return pluginCancelledConnectionError();
}
@@ -161,7 +161,7 @@ WebNetscapePluginStream::WebNetscapePluginStream(NSURLRequest *request, NPP plug
WebNetscapePluginView *view = (WebNetscapePluginView *)plugin->ndata;
// This check has already been done by the plug-in view.
- ASSERT(SecurityOrigin::canLoad([request URL], String(), core([view webFrame])->document()));
+ ASSERT(core([view webFrame])->document()->securityOrigin()->canDisplay([request URL]));
ASSERT([request URL]);
ASSERT(plugin);
@@ -209,19 +209,19 @@ void WebNetscapePluginStream::setPlugin(NPP plugin)
}
}
-void WebNetscapePluginStream::startStream(NSURL *url, long long expectedContentLength, NSDate *lastModifiedDate, NSString *mimeType, NSData *headers)
+void WebNetscapePluginStream::startStream(NSURL *url, long long expectedContentLength, NSDate *lastModifiedDate, const String& mimeType, NSData *headers)
{
ASSERT(!m_isTerminated);
m_responseURL = url;
- m_mimeType = mimeType;
+ m_mimeType = mimeType.utf8();
free((void *)m_stream.url);
m_stream.url = strdup([m_responseURL.get() _web_URLCString]);
m_stream.ndata = this;
- m_stream.end = expectedContentLength > 0 ? (uint32)expectedContentLength : 0;
- m_stream.lastmodified = (uint32)[lastModifiedDate timeIntervalSince1970];
+ m_stream.end = expectedContentLength > 0 ? (uint32_t)expectedContentLength : 0;
+ m_stream.lastmodified = (uint32_t)[lastModifiedDate timeIntervalSince1970];
m_stream.notifyData = m_notifyData;
if (headers) {
@@ -243,10 +243,10 @@ void WebNetscapePluginStream::startStream(NSURL *url, long long expectedContentL
NPError npErr;
{
PluginStopDeferrer deferrer(m_pluginView.get());
- npErr = m_pluginFuncs->newstream(m_plugin, (char *)[m_mimeType.get() UTF8String], &m_stream, NO, &m_transferMode);
+ npErr = m_pluginFuncs->newstream(m_plugin, m_mimeType.mutableData(), &m_stream, NO, &m_transferMode);
}
- LOG(Plugins, "NPP_NewStream URL=%@ MIME=%@ error=%d", m_responseURL.get(), m_mimeType.get(), npErr);
+ LOG(Plugins, "NPP_NewStream URL=%@ MIME=%s error=%d", m_responseURL.get(), m_mimeType.data(), npErr);
if (npErr != NPERR_NO_ERROR) {
LOG_ERROR("NPP_NewStream failed with error: %d responseURL: %@", npErr, m_responseURL.get());
@@ -350,7 +350,7 @@ void WebNetscapePluginStream::didReceiveResponse(NetscapePlugInStreamLoader*, co
// startStreamResponseURL:... will null-terminate.
}
- startStream([r URL], expectedContentLength, WKGetNSURLResponseLastModifiedDate(r), [r MIMEType], theHeaders);
+ startStream([r URL], expectedContentLength, WKGetNSURLResponseLastModifiedDate(r), response.mimeType(), theHeaders);
}
void WebNetscapePluginStream::startStreamWithResponse(NSURLResponse *response)
@@ -440,8 +440,8 @@ void WebNetscapePluginStream::destroyStream()
if (m_sendNotification) {
// NPP_URLNotify expects the request URL, not the response URL.
PluginStopDeferrer deferrer(m_pluginView.get());
- m_pluginFuncs->urlnotify(m_plugin, [m_requestURL.get() _web_URLCString], m_reason, m_notifyData);
- LOG(Plugins, "NPP_URLNotify requestURL=%@ reason=%d", m_requestURL.get(), m_reason);
+ m_pluginFuncs->urlnotify(m_plugin, m_requestURL.string().utf8().data(), m_reason, m_notifyData);
+ LOG(Plugins, "NPP_URLNotify requestURL=%@ reason=%d", (NSURL *)m_requestURL, m_reason);
}
m_isTerminated = true;
@@ -507,12 +507,12 @@ void WebNetscapePluginStream::deliverData()
RefPtr<WebNetscapePluginStream> protect(this);
- int32 totalBytes = [m_deliveryData.get() length];
- int32 totalBytesDelivered = 0;
+ int32_t totalBytes = [m_deliveryData.get() length];
+ int32_t totalBytesDelivered = 0;
while (totalBytesDelivered < totalBytes) {
PluginStopDeferrer deferrer(m_pluginView.get());
- int32 deliveryBytes = m_pluginFuncs->writeready(m_plugin, &m_stream);
+ int32_t deliveryBytes = m_pluginFuncs->writeready(m_plugin, &m_stream);
LOG(Plugins, "NPP_WriteReady responseURL=%@ bytes=%d", m_responseURL.get(), deliveryBytes);
if (m_isTerminated)
@@ -533,7 +533,7 @@ void WebNetscapePluginStream::deliverData()
cancelLoadAndDestroyStreamWithError(pluginCancelledConnectionError());
return;
}
- deliveryBytes = min<int32>(deliveryBytes, [subdata length]);
+ deliveryBytes = min<int32_t>(deliveryBytes, [subdata length]);
m_offset += deliveryBytes;
totalBytesDelivered += deliveryBytes;
LOG(Plugins, "NPP_Write responseURL=%@ bytes=%d total-delivered=%d/%d", m_responseURL.get(), deliveryBytes, m_offset, m_stream.end);
diff --git a/WebKit/mac/Plugins/WebNetscapePluginView.h b/WebKit/mac/Plugins/WebNetscapePluginView.h
index 2ee566e..b2debfa 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginView.h
+++ b/WebKit/mac/Plugins/WebNetscapePluginView.h
@@ -89,13 +89,13 @@ typedef union PluginPort {
BOOL inSetWindow;
BOOL shouldStopSoon;
- uint32 currentTimerID;
- HashMap<uint32, PluginTimer*>* timers;
+ uint32_t currentTimerID;
+ HashMap<uint32_t, PluginTimer*>* timers;
unsigned pluginFunctionCallDepth;
- int32 specifiedHeight;
- int32 specifiedWidth;
+ int32_t specifiedHeight;
+ int32_t specifiedWidth;
HashSet<RefPtr<WebNetscapePluginStream> > streams;
RetainPtr<NSMutableDictionary> _pendingFrameLoads;
@@ -104,7 +104,7 @@ typedef union PluginPort {
BOOL _isSilverlight;
NSMutableDictionary *_containerChecksInProgress;
- uint32 _currentContainerCheckRequestID;
+ uint32_t _currentContainerCheckRequestID;
}
+ (WebNetscapePluginView *)currentPluginView;
@@ -143,8 +143,11 @@ typedef union PluginPort {
- (void)didCallPlugInFunction;
- (void)handleMouseMoved:(NSEvent *)event;
-- (uint32)checkIfAllowedToLoadURL:(const char*)urlCString frame:(const char*)frameNameCString callbackFunc:(void (*)(NPP npp, uint32 checkID, NPBool allowed, void* context))callbackFunc context:(void*)context;
-- (void)cancelCheckIfAllowedToLoadURL:(uint32)checkID;
+- (void)handleMouseEntered:(NSEvent *)event;
+- (void)handleMouseExited:(NSEvent *)event;
+
+- (uint32_t)checkIfAllowedToLoadURL:(const char*)urlCString frame:(const char*)frameNameCString callbackFunc:(void (*)(NPP npp, uint32_t checkID, NPBool allowed, void* context))callbackFunc context:(void*)context;
+- (void)cancelCheckIfAllowedToLoadURL:(uint32_t)checkID;
@end
@@ -169,14 +172,14 @@ typedef union PluginPort {
- (void)forceRedraw;
- (NPError)getVariable:(NPNVariable)variable value:(void *)value;
- (NPError)setVariable:(NPPVariable)variable value:(void *)value;
-- (uint32)scheduleTimerWithInterval:(uint32)interval repeat:(NPBool)repeat timerFunc:(void (*)(NPP npp, uint32 timerID))timerFunc;
-- (void)unscheduleTimer:(uint32)timerID;
+- (uint32_t)scheduleTimerWithInterval:(uint32_t)interval repeat:(NPBool)repeat timerFunc:(void (*)(NPP npp, uint32_t timerID))timerFunc;
+- (void)unscheduleTimer:(uint32_t)timerID;
- (NPError)popUpContextMenu:(NPMenu *)menu;
-- (NPError)getVariable:(NPNURLVariable)variable forURL:(const char*)url value:(char**)value length:(uint32*)length;
-- (NPError)setVariable:(NPNURLVariable)variable forURL:(const char*)url value:(const char*)value length:(uint32)length;
-- (NPError)getAuthenticationInfoWithProtocol:(const char*) protocol host:(const char*)host port:(int32)port scheme:(const char*)scheme realm:(const char*)realm
- username:(char**)username usernameLength:(uint32*)usernameLength
- password:(char**)password passwordLength:(uint32*)passwordLength;
+- (NPError)getVariable:(NPNURLVariable)variable forURL:(const char*)url value:(char**)value length:(uint32_t*)length;
+- (NPError)setVariable:(NPNURLVariable)variable forURL:(const char*)url value:(const char*)value length:(uint32_t)length;
+- (NPError)getAuthenticationInfoWithProtocol:(const char*) protocol host:(const char*)host port:(int32_t)port scheme:(const char*)scheme realm:(const char*)realm
+ username:(char**)username usernameLength:(uint32_t*)usernameLength
+ password:(char**)password passwordLength:(uint32_t*)passwordLength;
- (char*)resolveURL:(const char*)url forTarget:(const char*)target;
@end
diff --git a/WebKit/mac/Plugins/WebNetscapePluginView.mm b/WebKit/mac/Plugins/WebNetscapePluginView.mm
index e96abe8..48574bf 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebNetscapePluginView.mm
@@ -30,13 +30,13 @@
#import "WebNetscapePluginView.h"
+#import "QuickDrawCompatibility.h"
#import "WebDataSourceInternal.h"
#import "WebDefaultUIDelegate.h"
#import "WebFrameInternal.h"
#import "WebFrameView.h"
#import "WebKitErrorsPrivate.h"
#import "WebKitLogging.h"
-#import "WebNetscapeContainerCheckPrivate.h"
#import "WebKitNSStringExtras.h"
#import "WebKitSystemInterface.h"
#import "WebNSDataExtras.h"
@@ -45,44 +45,47 @@
#import "WebNSURLExtras.h"
#import "WebNSURLRequestExtras.h"
#import "WebNSViewExtras.h"
-#import "WebNetscapePluginPackage.h"
-#import "WebBaseNetscapePluginStream.h"
-#import "WebPluginContainerCheck.h"
#import "WebNetscapeContainerCheckContextInfo.h"
+#import "WebNetscapeContainerCheckPrivate.h"
#import "WebNetscapePluginEventHandler.h"
-#import "WebNullPluginView.h"
-#import "WebPreferences.h"
+#import "WebNetscapePluginPackage.h"
+#import "WebNetscapePluginStream.h"
+#import "WebPluginContainerCheck.h"
#import "WebPluginRequest.h"
-#import "WebViewInternal.h"
+#import "WebPreferences.h"
#import "WebUIDelegatePrivate.h"
+#import "WebViewInternal.h"
#import <Carbon/Carbon.h>
-#import <runtime/JSLock.h>
-#import <WebCore/npruntime_impl.h>
#import <WebCore/CookieJar.h>
-#import <WebCore/CString.h>
#import <WebCore/DocumentLoader.h>
#import <WebCore/Element.h>
#import <WebCore/Frame.h>
#import <WebCore/FrameLoader.h>
#import <WebCore/FrameTree.h>
+#import <WebCore/FrameView.h>
#import <WebCore/HTMLPlugInElement.h>
#import <WebCore/Page.h>
#import <WebCore/PluginMainThreadScheduler.h>
+#import <WebCore/ProxyServer.h>
#import <WebCore/ScriptController.h>
#import <WebCore/SecurityOrigin.h>
#import <WebCore/SoftLinking.h>
#import <WebCore/WebCoreObjCExtras.h>
#import <WebCore/WebCoreURLResponse.h>
+#import <WebCore/npruntime_impl.h>
#import <WebKit/DOMPrivate.h>
#import <WebKit/WebUIDelegate.h>
+#import <objc/objc-runtime.h>
#import <runtime/InitializeThreading.h>
+#import <runtime/JSLock.h>
#import <wtf/Assertions.h>
-#import <objc/objc-runtime.h>
+#import <wtf/Threading.h>
+#import <wtf/text/CString.h>
#define LoginWindowDidSwitchFromUserNotification @"WebLoginWindowDidSwitchFromUserNotification"
#define LoginWindowDidSwitchToUserNotification @"WebLoginWindowDidSwitchToUserNotification"
#define WKNVSupportsCompositingCoreAnimationPluginsBool 74656 /* TRUE if the browser supports hardware compositing of Core Animation plug-ins */
-static const int WKNVSilverlightFullScreenPerformanceIssueFixed = 7288546; /* TRUE if Siverlight addressed its underlying bug in <rdar://problem/7288546> */
+static const int WKNVSilverlightFullscreenPerformanceIssueFixed = 7288546; /* TRUE if Siverlight addressed its underlying bug in <rdar://problem/7288546> */
using namespace WebCore;
using namespace WebKit;
@@ -113,9 +116,9 @@ static const double ThrottledTimerInterval = 0.25;
class PluginTimer : public TimerBase {
public:
- typedef void (*TimerFunc)(NPP npp, uint32 timerID);
+ typedef void (*TimerFunc)(NPP npp, uint32_t timerID);
- PluginTimer(NPP npp, uint32 timerID, uint32 interval, NPBool repeat, TimerFunc timerFunc)
+ PluginTimer(NPP npp, uint32_t timerID, uint32_t interval, NPBool repeat, TimerFunc timerFunc)
: m_npp(npp)
, m_timerID(timerID)
, m_interval(interval)
@@ -148,8 +151,8 @@ private:
}
NPP m_npp;
- uint32 m_timerID;
- uint32 m_interval;
+ uint32_t m_timerID;
+ uint32_t m_interval;
NPBool m_repeat;
TimerFunc m_timerFunc;
};
@@ -189,6 +192,7 @@ typedef struct {
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
@@ -253,31 +257,33 @@ static UInt32 getQDPixelFormatForBitmapContext(CGContextRef context)
static inline void getNPRect(const CGRect& cgr, NPRect& npr)
{
- npr.top = static_cast<uint16>(cgr.origin.y);
- npr.left = static_cast<uint16>(cgr.origin.x);
- npr.bottom = static_cast<uint16>(CGRectGetMaxY(cgr));
- npr.right = static_cast<uint16>(CGRectGetMaxX(cgr));
+ npr.top = static_cast<uint16_t>(cgr.origin.y);
+ npr.left = static_cast<uint16_t>(cgr.origin.x);
+ npr.bottom = static_cast<uint16_t>(CGRectGetMaxY(cgr));
+ npr.right = static_cast<uint16_t>(CGRectGetMaxX(cgr));
}
#endif
static inline void getNPRect(const NSRect& nr, NPRect& npr)
{
- npr.top = static_cast<uint16>(nr.origin.y);
- npr.left = static_cast<uint16>(nr.origin.x);
- npr.bottom = static_cast<uint16>(NSMaxY(nr));
- npr.right = static_cast<uint16>(NSMaxX(nr));
+ npr.top = static_cast<uint16_t>(nr.origin.y);
+ npr.left = static_cast<uint16_t>(nr.origin.x);
+ npr.bottom = static_cast<uint16_t>(NSMaxY(nr));
+ npr.right = static_cast<uint16_t>(NSMaxX(nr));
}
- (PortState)saveAndSetNewPortStateForUpdate:(BOOL)forUpdate
{
ASSERT([self currentWindow] != nil);
-
- // Use AppKit to convert view coordinates to NSWindow coordinates.
- NSRect boundsInWindow = [self convertRect:[self bounds] toView:nil];
- NSRect visibleRectInWindow = [self convertRect:[self visibleRect] toView:nil];
- // Flip Y to convert NSWindow coordinates to top-left-based window coordinates.
+ // The base coordinates of a window and it's contentView happen to be the equal at a userSpaceScaleFactor
+ // of 1. For non-1.0 scale factors this assumption is false.
+ NSView *windowContentView = [[self window] contentView];
+ NSRect boundsInWindow = [self convertRect:[self bounds] toView:windowContentView];
+ NSRect visibleRectInWindow = [self convertRect:[self visibleRect] toView:windowContentView];
+
+ // Flip Y to convert -[NSWindow contentView] coordinates to top-left-based window coordinates.
float borderViewHeight = [[self currentWindow] frame].size.height;
boundsInWindow.origin.y = borderViewHeight - NSMaxY(boundsInWindow);
visibleRectInWindow.origin.y = borderViewHeight - NSMaxY(visibleRectInWindow);
@@ -305,10 +311,10 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
#endif
window.type = NPWindowTypeWindow;
- window.x = (int32)boundsInWindow.origin.x;
- window.y = (int32)boundsInWindow.origin.y;
- window.width = static_cast<uint32>(NSWidth(boundsInWindow));
- window.height = static_cast<uint32>(NSHeight(boundsInWindow));
+ window.x = (int32_t)boundsInWindow.origin.x;
+ window.y = (int32_t)boundsInWindow.origin.y;
+ window.width = static_cast<uint32_t>(NSWidth(boundsInWindow));
+ window.height = static_cast<uint32_t>(NSHeight(boundsInWindow));
// "Clip-out" the plug-in when:
// 1) it's not really in a window or off-screen or has no height or width.
@@ -354,8 +360,8 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
CGrafPtr port = GetWindowPort(windowRef);
GetPortBounds(port, &portBounds);
nPort.qdPort.port = port;
- nPort.qdPort.portx = (int32)-boundsInWindow.origin.x;
- nPort.qdPort.porty = (int32)-boundsInWindow.origin.y;
+ nPort.qdPort.portx = (int32_t)-boundsInWindow.origin.x;
+ nPort.qdPort.porty = (int32_t)-boundsInWindow.origin.y;
window.window = &nPort;
PortState_QD *qdPortState = (PortState_QD*)malloc(sizeof(PortState_QD));
@@ -418,8 +424,8 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
origin.x = offscreenBounds.left - origin.x * (axisFlip.x - origin.x);
origin.y = offscreenBounds.bottom + origin.y * (axisFlip.y - origin.y);
- nPort.qdPort.portx = static_cast<int32>(-boundsInWindow.origin.x + origin.x);
- nPort.qdPort.porty = static_cast<int32>(-boundsInWindow.origin.y - origin.y);
+ nPort.qdPort.portx = static_cast<int32_t>(-boundsInWindow.origin.x + origin.x);
+ nPort.qdPort.porty = static_cast<int32_t>(-boundsInWindow.origin.y - origin.y);
window.x = 0;
window.y = 0;
window.window = &nPort;
@@ -656,13 +662,19 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
// Temporarily retain self in case the plug-in view is released while sending an event.
[[self retain] autorelease];
-
+
BOOL acceptedEvent;
[self willCallPlugInFunction];
+ // Set the pluginAllowPopup flag.
+ ASSERT(_eventHandler);
+ bool oldAllowPopups = frame->script()->allowPopupsFromPlugin();
+ frame->script()->setAllowPopupsFromPlugin(_eventHandler->currentEventIsUserGesture());
{
JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
acceptedEvent = [_pluginPackage.get() pluginFuncs]->event(plugin, event);
}
+ // Restore the old pluginAllowPopup flag.
+ frame->script()->setAllowPopupsFromPlugin(oldAllowPopups);
[self didCallPlugInFunction];
if (portState) {
@@ -698,8 +710,8 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
if (!timers)
return;
- HashMap<uint32, PluginTimer*>::const_iterator end = timers->end();
- for (HashMap<uint32, PluginTimer*>::const_iterator it = timers->begin(); it != end; ++it) {
+ HashMap<uint32_t, PluginTimer*>::const_iterator end = timers->end();
+ for (HashMap<uint32_t, PluginTimer*>::const_iterator it = timers->begin(); it != end; ++it) {
PluginTimer* timer = it->second;
timer->stop();
}
@@ -716,8 +728,8 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
if (!timers)
return;
- HashMap<uint32, PluginTimer*>::const_iterator end = timers->end();
- for (HashMap<uint32, PluginTimer*>::const_iterator it = timers->begin(); it != end; ++it) {
+ HashMap<uint32_t, PluginTimer*>::const_iterator end = timers->end();
+ for (HashMap<uint32_t, PluginTimer*>::const_iterator it = timers->begin(); it != end; ++it) {
PluginTimer* timer = it->second;
ASSERT(!timer->isActive());
timer->start(_isCompletelyObscured);
@@ -749,15 +761,18 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
_eventHandler->mouseUp(theEvent);
}
-- (void)mouseEntered:(NSEvent *)theEvent
+- (void)handleMouseEntered:(NSEvent *)theEvent
{
if (!_isStarted)
return;
+ // Set cursor to arrow. Plugins often handle cursor internally, but those that don't will just get this default one.
+ [[NSCursor arrowCursor] set];
+
_eventHandler->mouseEntered(theEvent);
}
-- (void)mouseExited:(NSEvent *)theEvent
+- (void)handleMouseExited:(NSEvent *)theEvent
{
if (!_isStarted)
return;
@@ -769,8 +784,6 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
[[NSCursor arrowCursor] set];
}
-// We can't name this method mouseMoved because we don't want to override
-// the NSView mouseMoved implementation.
- (void)handleMouseMoved:(NSEvent *)theEvent
{
if (!_isStarted)
@@ -1087,10 +1100,27 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
#if USE(ACCELERATED_COMPOSITING)
accleratedCompositingEnabled = [[[self webView] preferences] acceleratedCompositingEnabled];
#endif
- if (accleratedCompositingEnabled)
+ if (accleratedCompositingEnabled) {
+ // FIXME: This code can be shared between WebHostedNetscapePluginView and WebNetscapePluginView.
+#ifndef BUILDING_ON_LEOPARD
+ // Since this layer isn't going to be inserted into a view, we need to create another layer and flip its geometry
+ // in order to get the coordinate system right.
+ RetainPtr<CALayer> realPluginLayer(AdoptNS, _pluginLayer.releaseRef());
+
+ _pluginLayer.adoptNS([[CALayer alloc] init]);
+ _pluginLayer.get().bounds = realPluginLayer.get().bounds;
+ _pluginLayer.get().geometryFlipped = YES;
+
+ realPluginLayer.get().autoresizingMask = kCALayerWidthSizable | kCALayerHeightSizable;
+ [_pluginLayer.get() addSublayer:realPluginLayer.get()];
+#endif
+ // Eagerly enter compositing mode, since we know we'll need it. This avoids firing setNeedsStyleRecalc()
+ // for iframes that contain composited plugins at bad times. https://bugs.webkit.org/show_bug.cgi?id=39033
+ core([self webFrame])->view()->enterCompositingMode();
[self element]->setNeedsStyleRecalc(SyntheticStyleChange);
- else
+ } else
[self setWantsLayer:YES];
+
LOG(Plugins, "%@ is using Core Animation drawing model with layer %@", _pluginPackage.get(), _pluginLayer.get());
}
@@ -1212,7 +1242,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
cValues = (char **)malloc([values count] * sizeof(char *));
}
- BOOL isWMP = [[[_pluginPackage.get() bundle] bundleIdentifier] isEqualToString:@"com.microsoft.WMP.defaultplugin"];
+ BOOL isWMP = [_pluginPackage.get() bundleIdentifier] == "com.microsoft.WMP.defaultplugin";
unsigned i;
unsigned count = [keys count];
@@ -1235,9 +1265,9 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
}
}
-- (uint32)checkIfAllowedToLoadURL:(const char*)urlCString frame:(const char*)frameNameCString
- callbackFunc:(void (*)(NPP npp, uint32 checkID, NPBool allowed, void* context))callbackFunc
- context:(void*)context
+- (uint32_t)checkIfAllowedToLoadURL:(const char*)urlCString frame:(const char*)frameNameCString
+ callbackFunc:(void (*)(NPP npp, uint32_t checkID, NPBool allowed, void* context))callbackFunc
+ context:(void*)context
{
if (!_containerChecksInProgress)
_containerChecksInProgress = [[NSMutableDictionary alloc] init];
@@ -1266,7 +1296,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
- (void)_containerCheckResult:(PolicyAction)policy contextInfo:(id)contextInfo
{
ASSERT([contextInfo isKindOfClass:[WebNetscapeContainerCheckContextInfo class]]);
- void (*pluginCallback)(NPP npp, uint32, NPBool, void*) = [contextInfo callback];
+ void (*pluginCallback)(NPP npp, uint32_t, NPBool, void*) = [contextInfo callback];
if (!pluginCallback) {
ASSERT_NOT_REACHED();
@@ -1276,7 +1306,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
pluginCallback([self plugin], [contextInfo checkRequestID], (policy == PolicyUse), [contextInfo context]);
}
-- (void)cancelCheckIfAllowedToLoadURL:(uint32)checkID
+- (void)cancelCheckIfAllowedToLoadURL:(uint32_t)checkID
{
WebPluginContainerCheck *check = (WebPluginContainerCheck *)[_containerChecksInProgress objectForKey:[NSNumber numberWithInt:checkID]];
@@ -1396,13 +1426,13 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
- (void)drawRect:(NSRect)rect
{
- if (drawingModel == NPDrawingModelCoreAnimation)
+ if (drawingModel == NPDrawingModelCoreAnimation && (![self inFlatteningPaint] || ![self supportsSnapshotting]))
return;
if (!_isStarted)
return;
- if ([NSGraphicsContext currentContextDrawingToScreen])
+ if ([NSGraphicsContext currentContextDrawingToScreen] || _isFlash)
[self sendDrawRectEvent:rect];
else {
NSBitmapImageRep *printedPluginBitmap = [self _printedPluginBitmap];
@@ -1705,7 +1735,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
return NPERR_INVALID_PARAM;
}
} else {
- if (!SecurityOrigin::canLoad(URL, String(), core([self webFrame])->document()))
+ if (!core([self webFrame])->document()->securityOrigin()->canDisplay(URL))
return NPERR_GENERIC_ERROR;
}
@@ -1906,12 +1936,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
-(void)status:(const char *)message
{
- if (!message) {
- LOG_ERROR("NPN_Status passed a NULL status message");
- return;
- }
-
- CFStringRef status = CFStringCreateWithCString(NULL, message, kCFStringEncodingUTF8);
+ CFStringRef status = CFStringCreateWithCString(NULL, message ? message : "", kCFStringEncodingUTF8);
if (!status) {
LOG_ERROR("NPN_Status: the message was not valid UTF-8");
return;
@@ -2136,15 +2161,15 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
}
}
-- (uint32)scheduleTimerWithInterval:(uint32)interval repeat:(NPBool)repeat timerFunc:(void (*)(NPP npp, uint32 timerID))timerFunc
+- (uint32_t)scheduleTimerWithInterval:(uint32_t)interval repeat:(NPBool)repeat timerFunc:(void (*)(NPP npp, uint32_t timerID))timerFunc
{
if (!timerFunc)
return 0;
if (!timers)
- timers = new HashMap<uint32, PluginTimer*>;
+ timers = new HashMap<uint32_t, PluginTimer*>;
- uint32 timerID;
+ uint32_t timerID;
do {
timerID = ++currentTimerID;
@@ -2159,7 +2184,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
return timerID;
}
-- (void)unscheduleTimer:(uint32)timerID
+- (void)unscheduleTimer:(uint32_t)timerID
{
if (!timers)
return;
@@ -2180,7 +2205,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
return NPERR_NO_ERROR;
}
-- (NPError)getVariable:(NPNURLVariable)variable forURL:(const char*)url value:(char**)value length:(uint32*)length
+- (NPError)getVariable:(NPNURLVariable)variable forURL:(const char*)url value:(char**)value length:(uint32_t*)length
{
switch (variable) {
case NPNURLVCookie: {
@@ -2215,7 +2240,8 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
if (!URL)
break;
- CString proxiesUTF8 = proxiesForURL(URL);
+ Vector<ProxyServer> proxyServers = proxyServersForURL(URL, 0);
+ CString proxiesUTF8 = toString(proxyServers).utf8();
*value = static_cast<char*>(NPN_MemAlloc(proxiesUTF8.length()));
memcpy(*value, proxiesUTF8.data(), proxiesUTF8.length());
@@ -2232,7 +2258,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
return NPERR_GENERIC_ERROR;
}
-- (NPError)setVariable:(NPNURLVariable)variable forURL:(const char*)url value:(const char*)value length:(uint32)length
+- (NPError)setVariable:(NPNURLVariable)variable forURL:(const char*)url value:(const char*)value length:(uint32_t)length
{
switch (variable) {
case NPNURLVCookie: {
@@ -2258,9 +2284,9 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
return NPERR_GENERIC_ERROR;
}
-- (NPError)getAuthenticationInfoWithProtocol:(const char*)protocolStr host:(const char*)hostStr port:(int32)port scheme:(const char*)schemeStr realm:(const char*)realmStr
- username:(char**)usernameStr usernameLength:(uint32*)usernameLength
- password:(char**)passwordStr passwordLength:(uint32*)passwordLength
+- (NPError)getAuthenticationInfoWithProtocol:(const char*)protocolStr host:(const char*)hostStr port:(int32_t)port scheme:(const char*)schemeStr realm:(const char*)realmStr
+ username:(char**)usernameStr usernameLength:(uint32_t*)usernameLength
+ password:(char**)passwordStr passwordLength:(uint32_t*)passwordLength
{
if (!protocolStr || !hostStr || !schemeStr || !realmStr || !usernameStr || !usernameLength || !passwordStr || !passwordLength)
return NPERR_GENERIC_ERROR;
@@ -2283,7 +2309,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
- (char*)resolveURL:(const char*)url forTarget:(const char*)target
{
- WebCore::CString location = [self resolvedURLStringForURL:url target:target];
+ CString location = [self resolvedURLStringForURL:url target:target];
if (location.isNull())
return 0;
@@ -2314,13 +2340,13 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
// 1) Microsoft releases a genuine fix for 7288546.
// 2) Enough Silverlight users update to the new Silverlight.
// For now, we'll distinguish older broken versions of Silverlight by asking the plug-in if it resolved its full screen badness.
-- (void)_workaroundSilverlightFullScreenBug:(BOOL)initializedPlugin
+- (void)_workaroundSilverlightFullscreenBug:(BOOL)initializedPlugin
{
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
ASSERT(_isSilverlight);
- NPBool isFullScreenPerformanceIssueFixed = 0;
+ NPBool isFullscreenPerformanceIssueFixed = 0;
NPPluginFuncs *pluginFuncs = [_pluginPackage.get() pluginFuncs];
- if (pluginFuncs->getvalue && pluginFuncs->getvalue(plugin, static_cast<NPPVariable>(WKNVSilverlightFullScreenPerformanceIssueFixed), &isFullScreenPerformanceIssueFixed) == NPERR_NO_ERROR && isFullScreenPerformanceIssueFixed)
+ if (pluginFuncs->getvalue && pluginFuncs->getvalue(plugin, static_cast<NPPVariable>(WKNVSilverlightFullscreenPerformanceIssueFixed), &isFullscreenPerformanceIssueFixed) == NPERR_NO_ERROR && isFullscreenPerformanceIssueFixed)
return;
static CGLPixelFormatObj pixelFormatObject = 0;
@@ -2353,15 +2379,15 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
ASSERT(pluginFunctionCallDepth == 0);
PluginMainThreadScheduler::scheduler().registerPlugin(plugin);
-
- _isFlash = [[[_pluginPackage.get() bundle] bundleIdentifier] isEqualToString:@"com.macromedia.Flash Player.plugin"];
- _isSilverlight = [[[_pluginPackage.get() bundle] bundleIdentifier] isEqualToString:@"com.microsoft.SilverlightPlugin"];
+
+ _isFlash = [_pluginPackage.get() bundleIdentifier] == "com.macromedia.Flash Player.plugin";
+ _isSilverlight = [_pluginPackage.get() bundleIdentifier] == "com.microsoft.SilverlightPlugin";
[[self class] setCurrentPluginView:self];
NPError npErr = [_pluginPackage.get() pluginFuncs]->newp((char *)[_MIMEType.get() cString], plugin, _mode, argsCount, cAttributes, cValues, NULL);
[[self class] setCurrentPluginView:nil];
if (_isSilverlight)
- [self _workaroundSilverlightFullScreenBug:YES];
+ [self _workaroundSilverlightFullscreenBug:YES];
LOG(Plugins, "NPP_New: %d", npErr);
return npErr;
}
@@ -2371,7 +2397,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
PluginMainThreadScheduler::scheduler().unregisterPlugin(plugin);
if (_isSilverlight)
- [self _workaroundSilverlightFullScreenBug:NO];
+ [self _workaroundSilverlightFullscreenBug:NO];
NPError npErr;
npErr = ![_pluginPackage.get() pluginFuncs]->destroy(plugin, NULL);
diff --git a/WebKit/mac/Plugins/WebNullPluginView.mm b/WebKit/mac/Plugins/WebNullPluginView.mm
deleted file mode 100644
index bcc7a4b..0000000
--- a/WebKit/mac/Plugins/WebNullPluginView.mm
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (C) 2005, 2007 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "WebNullPluginView.h"
-
-#import "DOMElementInternal.h"
-#import "WebDelegateImplementationCaching.h"
-#import "WebFrameInternal.h"
-#import "WebViewInternal.h"
-#import <WebCore/Document.h>
-#import <WebCore/Element.h>
-
-@implementation WebNullPluginView
-
-- initWithFrame:(NSRect)frame error:(NSError *)err DOMElement:(DOMElement *)elem
-{
- static NSImage *nullPlugInImage;
- if (!nullPlugInImage) {
- NSBundle *bundle = [NSBundle bundleForClass:[WebNullPluginView class]];
- NSString *imagePath = [bundle pathForResource:@"nullplugin" ofType:@"tiff"];
- nullPlugInImage = [[NSImage alloc] initWithContentsOfFile:imagePath];
- }
-
- self = [super initWithFrame:frame];
- if (!self)
- return nil;
-
- error = [err retain];
- if (err)
- element = [elem retain];
-
- [self setImage:nullPlugInImage];
-
- return self;
-}
-
-- (void)dealloc
-
-{
- [error release];
- [element release];
- [super dealloc];
-}
-
-- (void)reportFailure
-{
- NSError *localError = error;
- DOMElement *localElement = element;
-
- error = nil;
- element = nil;
-
- WebFrame *webFrame = kit(core(localElement)->document()->frame());
- if (webFrame) {
- WebView *webView = [webFrame webView];
- WebResourceDelegateImplementationCache* implementations = WebViewGetResourceLoadDelegateImplementations(webView);
- if (implementations->plugInFailedWithErrorFunc)
- CallResourceLoadDelegate(implementations->plugInFailedWithErrorFunc, webView,
- @selector(webView:plugInFailedWithError:dataSource:), localError, [webFrame _dataSource]);
- }
-
- [localError release];
- [localElement release];
-}
-
-- (void)viewDidMoveToWindow
-{
- if (!error)
- return;
-
- if ([self window])
- [self reportFailure];
-}
-
-@end
diff --git a/WebKit/mac/Plugins/WebPluginContainerCheck.mm b/WebKit/mac/Plugins/WebPluginContainerCheck.mm
index 5609d80..30368a8 100644
--- a/WebKit/mac/Plugins/WebPluginContainerCheck.mm
+++ b/WebKit/mac/Plugins/WebPluginContainerCheck.mm
@@ -99,7 +99,7 @@ using namespace WebCore;
{
Frame* coreFrame = core([_controller webFrame]);
ASSERT(coreFrame);
- if (!SecurityOrigin::canLoad([_request URL], String(), coreFrame->document())) {
+ if (!coreFrame->document()->securityOrigin()->canDisplay([_request URL])) {
[self _continueWithPolicy:PolicyIgnore];
return YES;
}
diff --git a/WebKit/mac/Plugins/WebPluginController.h b/WebKit/mac/Plugins/WebPluginController.h
index ffc07a4..dc1f413 100644
--- a/WebKit/mac/Plugins/WebPluginController.h
+++ b/WebKit/mac/Plugins/WebPluginController.h
@@ -42,6 +42,9 @@
NSMutableArray *_views;
BOOL _started;
NSMutableSet *_checksInProgress;
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+ NSMutableArray *_viewsNotInDocument;
+#endif
}
+ (NSView *)plugInViewWithArguments:(NSDictionary *)arguments fromPluginPackage:(WebPluginPackage *)plugin;
@@ -53,6 +56,10 @@
- (void)addPlugin:(NSView *)view;
- (void)destroyPlugin:(NSView *)view;
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+- (void)pluginViewCreated:(NSView *)view;
++ (void)pluginViewHidden:(NSView *)view;
+#endif
- (void)startAllPlugins;
- (void)stopAllPlugins;
diff --git a/WebKit/mac/Plugins/WebPluginController.mm b/WebKit/mac/Plugins/WebPluginController.mm
index 4343119..9c037c2 100644
--- a/WebKit/mac/Plugins/WebPluginController.mm
+++ b/WebKit/mac/Plugins/WebPluginController.mm
@@ -36,6 +36,7 @@
#import "WebHTMLViewPrivate.h"
#import "WebKitErrorsPrivate.h"
#import "WebKitLogging.h"
+#import "WebNSObjectExtras.h"
#import "WebNSURLExtras.h"
#import "WebNSViewExtras.h"
#import "WebPlugin.h"
@@ -57,6 +58,7 @@
#import <WebCore/ResourceRequest.h>
#import <WebCore/ScriptController.h>
#import <WebCore/WebCoreURLResponse.h>
+#import <objc/objc-runtime.h>
#import <runtime/JSLock.h>
using namespace WebCore;
@@ -78,6 +80,10 @@ using namespace HTMLNames;
- (void)pluginDestroy;
@end
+static bool isKindOfClass(id, NSString* className);
+static void installFlip4MacPlugInWorkaroundIfNecessary();
+
+
static NSMutableSet *pluginViews = nil;
@implementation WebPluginController
@@ -132,6 +138,9 @@ static NSMutableSet *pluginViews = nil;
{
[_views release];
[_checksInProgress release];
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+ [_viewsNotInDocument release];
+#endif
[super dealloc];
}
@@ -192,9 +201,30 @@ static NSMutableSet *pluginViews = nil;
for (i = 0; i < count; i++)
[self stopOnePlugin:[_views objectAtIndex:i]];
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+ count = [_viewsNotInDocument count];
+ for (i = 0; i < count; i++)
+ [self stopOnePlugin:[_viewsNotInDocument objectAtIndex:i]];
+#endif
+
_started = NO;
}
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+- (void)pluginViewCreated:(NSView *)view
+{
+ if (!_viewsNotInDocument)
+ _viewsNotInDocument= [[NSMutableArray alloc] init];
+ if (![_viewsNotInDocument containsObject:view])
+ [_viewsNotInDocument addObject:view];
+}
+
++ (void)pluginViewHidden:(NSView *)view
+{
+ [pluginViews removeObject:view];
+}
+#endif
+
- (void)addPlugin:(NSView *)view
{
if (!_documentView) {
@@ -206,10 +236,18 @@ static NSMutableSet *pluginViews = nil;
[_views addObject:view];
[[_documentView _webView] addPluginInstanceView:view];
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+ if ([_viewsNotInDocument containsObject:view])
+ [_viewsNotInDocument removeObject:view];
+#endif
+
BOOL oldDefersCallbacks = [[self webView] defersCallbacks];
if (!oldDefersCallbacks)
[[self webView] setDefersCallbacks:YES];
-
+
+ if (isKindOfClass(view, @"WmvPlugin"))
+ installFlip4MacPlugInWorkaroundIfNecessary();
+
LOG(Plugins, "initializing plug-in %@", view);
if ([view respondsToSelector:@selector(webPlugInInitialize)]) {
JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
@@ -242,7 +280,11 @@ static NSMutableSet *pluginViews = nil;
- (void)destroyPlugin:(NSView *)view
{
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+ if ([_views containsObject:view] || [_viewsNotInDocument containsObject:view]) {
+#else
if ([_views containsObject:view]) {
+#endif
if (_started)
[self stopOnePlugin:view];
[self destroyOnePlugin:view];
@@ -255,6 +297,9 @@ static NSMutableSet *pluginViews = nil;
[pluginViews removeObject:view];
[[_documentView _webView] removePluginInstanceView:view];
[_views removeObject:view];
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+ [_viewsNotInDocument removeObject:view];
+#endif
}
}
@@ -301,6 +346,13 @@ static void cancelOutstandingCheck(const void *item, void *context)
[pluginViews removeObject:aView];
[[_documentView _webView] removePluginInstanceView:aView];
}
+
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+ count = [_viewsNotInDocument count];
+ for (i = 0; i < count; i++)
+ [self destroyOnePlugin:[_viewsNotInDocument objectAtIndex:i]];
+#endif
+
[_views makeObjectsPerformSelector:@selector(removeFromSuperviewWithoutNeedingDisplay)];
[_views release];
_views = nil;
@@ -351,21 +403,11 @@ static void cancelOutstandingCheck(const void *item, void *context)
}
}
-// For compatibility only.
-- (void)showURL:(NSURL *)URL inFrame:(NSString *)target
-{
- [self webPlugInContainerLoadRequest:[NSURLRequest requestWithURL:URL] inFrame:target];
-}
-
- (void)webPlugInContainerShowStatus:(NSString *)message
{
- if (!message) {
+ if (!message)
message = @"";
- }
- if (!_documentView) {
- LOG_ERROR("could not show status message (%@) because plug-in has already been destroyed", message);
- return;
- }
+
WebView *v = [_dataSource _webView];
[[v _UIDelegateForwarder] webView:v setStatusText:message];
}
@@ -475,3 +517,85 @@ static WebCore::HTMLMediaElement* mediaProxyClient(DOMElement* element)
#endif
@end
+
+static bool isKindOfClass(id object, NSString *className)
+{
+ Class cls = NSClassFromString(className);
+
+ if (!cls)
+ return false;
+
+ return [object isKindOfClass:cls];
+}
+
+
+// Existing versions of the Flip4Mac WebKit plug-in have an object lifetime bug related to an NSAlert that is
+// used to notify the user about updates to the plug-in. This bug can result in Safari crashing if the page
+// containing the plug-in navigates while the alert is displayed (<rdar://problem/7313430>).
+//
+// The gist of the bug is thus: Flip4Mac sets an instance of the TSUpdateCheck class as the modal delegate of the
+// NSAlert instance. This TSUpdateCheck instance itself has a delegate. The delegate is set to the WmvPlugin
+// instance which is the NSView subclass that is exposed to WebKit as the plug-in view. Since this relationship
+// is that of delegates the TSUpdateCheck does not retain the WmvPlugin. This leads to a bug if the WmvPlugin
+// instance is destroyed before the TSUpdateCheck instance as the TSUpdateCheck instance will be left with a
+// pointer to a stale object. This will happen if a page containing the Flip4Mac plug-in triggers a navigation
+// while the update sheet is visible as the WmvPlugin instance is removed from the view hierarchy and there are
+// no other references to keep the object alive.
+//
+// We work around this bug by patching the following two messages:
+//
+// 1) -[NSAlert beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:]
+// 2) -[TSUpdateCheck alertDidEnd:returnCode:contextInfo:]
+//
+// Our override of 1) detects whether it is Flip4Mac's update sheet triggering the alert by checking whether the
+// modal delegate is an instance of TSUpdateCheck. If it is, it retains the modal delegate's delegate.
+//
+// Our override of 2) then autoreleases the delegate, balancing the retain we added in 1).
+//
+// These two overrides have the effect of ensuring that the WmvPlugin instance will always outlive the TSUpdateCheck
+// instance, preventing the TSUpdateCheck instance from accessing a stale delegate pointer and crashing the application.
+
+
+typedef void (*beginSheetModalForWindowIMP)(id, SEL, NSWindow *, id, SEL, void*);
+static beginSheetModalForWindowIMP original_NSAlert_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_;
+
+typedef void (*alertDidEndIMP)(id, SEL, NSAlert *, NSInteger, void*);
+static alertDidEndIMP original_TSUpdateCheck_alertDidEnd_returnCode_contextInfo_;
+
+static void WebKit_TSUpdateCheck_alertDidEnd_returnCode_contextInfo_(id object, SEL selector, NSAlert *alert, NSInteger returnCode, void* contextInfo)
+{
+ [[object delegate] autorelease];
+
+ original_TSUpdateCheck_alertDidEnd_returnCode_contextInfo_(object, selector, alert, returnCode, contextInfo);
+}
+
+static void WebKit_NSAlert_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_(id object, SEL selector, NSWindow *window, id modalDelegate, SEL didEndSelector, void* contextInfo)
+{
+ if (isKindOfClass(modalDelegate, @"TSUpdateCheck"))
+ [[modalDelegate delegate] retain];
+
+ original_NSAlert_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_(object, selector, window, modalDelegate, didEndSelector, contextInfo);
+}
+
+static void installFlip4MacPlugInWorkaroundIfNecessary()
+{
+ static bool hasInstalledFlip4MacPlugInWorkaround;
+ if (!hasInstalledFlip4MacPlugInWorkaround) {
+ Class TSUpdateCheck = objc_lookUpClass("TSUpdateCheck");
+ if (!TSUpdateCheck)
+ return;
+
+ Method methodToPatch = class_getInstanceMethod(TSUpdateCheck, @selector(alertDidEnd:returnCode:contextInfo:));
+ if (!methodToPatch)
+ return;
+
+ IMP originalMethod = method_setImplementation(methodToPatch, reinterpret_cast<IMP>(WebKit_TSUpdateCheck_alertDidEnd_returnCode_contextInfo_));
+ original_TSUpdateCheck_alertDidEnd_returnCode_contextInfo_ = reinterpret_cast<alertDidEndIMP>(originalMethod);
+
+ methodToPatch = class_getInstanceMethod(objc_getRequiredClass("NSAlert"), @selector(beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:));
+ originalMethod = method_setImplementation(methodToPatch, reinterpret_cast<IMP>(WebKit_NSAlert_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_));
+ original_NSAlert_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_ = reinterpret_cast<beginSheetModalForWindowIMP>(originalMethod);
+
+ hasInstalledFlip4MacPlugInWorkaround = true;
+ }
+}
diff --git a/WebKit/mac/Plugins/WebPluginDatabase.mm b/WebKit/mac/Plugins/WebPluginDatabase.mm
index 1856fe1..e7fae1b 100644
--- a/WebKit/mac/Plugins/WebPluginDatabase.mm
+++ b/WebKit/mac/Plugins/WebPluginDatabase.mm
@@ -35,16 +35,18 @@
#import "WebFrameViewInternal.h"
#import "WebHTMLRepresentation.h"
#import "WebHTMLView.h"
-#import "WebHTMLView.h"
#import "WebKitLogging.h"
#import "WebNSFileManagerExtras.h"
#import "WebNetscapePluginPackage.h"
#import "WebPluginController.h"
#import "WebPluginPackage.h"
#import "WebViewPrivate.h"
+#import "WebViewInternal.h"
#import <WebKitSystemInterface.h>
#import <wtf/Assertions.h>
+using namespace WebCore;
+
static void checkCandidate(WebBasePluginPackage **currentPlugin, WebBasePluginPackage **candidatePlugin);
@interface WebPluginDatabase (Internal)
@@ -82,78 +84,107 @@ static void checkCandidate(WebBasePluginPackage **currentPlugin, WebBasePluginPa
return;
}
- if ([[[*currentPlugin bundle] bundleIdentifier] isEqualToString:[[*candidatePlugin bundle] bundleIdentifier]] && [*candidatePlugin versionNumber] > [*currentPlugin versionNumber])
+ if ([*currentPlugin bundleIdentifier] == [*candidatePlugin bundleIdentifier] && [*candidatePlugin versionNumber] > [*currentPlugin versionNumber])
*currentPlugin = *candidatePlugin;
}
-- (WebBasePluginPackage *)pluginForKey:(NSString *)key withEnumeratorSelector:(SEL)enumeratorSelector
-{
- WebBasePluginPackage *plugin = nil;
- WebBasePluginPackage *webPlugin = nil;
+struct PluginPackageCandidates {
+ PluginPackageCandidates()
+ : webPlugin(nil)
+ , machoPlugin(nil)
#ifdef SUPPORT_CFM
- WebBasePluginPackage *CFMPlugin = nil;
+ , CFMPlugin(nil)
#endif
- WebBasePluginPackage *machoPlugin = nil;
-
- NSEnumerator *pluginEnumerator = [plugins objectEnumerator];
- key = [key lowercaseString];
-
- while ((plugin = [pluginEnumerator nextObject]) != nil) {
- if ([[[plugin performSelector:enumeratorSelector] allObjects] containsObject:key]) {
- if ([plugin isKindOfClass:[WebPluginPackage class]])
- checkCandidate(&webPlugin, &plugin);
+ {
+ }
+
+ void update(WebBasePluginPackage *plugin)
+ {
+ if ([plugin isKindOfClass:[WebPluginPackage class]]) {
+ checkCandidate(&webPlugin, &plugin);
+ return;
+ }
+
#if ENABLE(NETSCAPE_PLUGIN_API)
- else if([plugin isKindOfClass:[WebNetscapePluginPackage class]]) {
- WebExecutableType executableType = [(WebNetscapePluginPackage *)plugin executableType];
+ if([plugin isKindOfClass:[WebNetscapePluginPackage class]]) {
+ WebExecutableType executableType = [(WebNetscapePluginPackage *)plugin executableType];
#ifdef SUPPORT_CFM
- if (executableType == WebCFMExecutableType) {
- checkCandidate(&CFMPlugin, &plugin);
- } else
+ if (executableType == WebCFMExecutableType) {
+ checkCandidate(&CFMPlugin, &plugin);
+ return;
+ }
#endif // SUPPORT_CFM
- if (executableType == WebMachOExecutableType) {
- checkCandidate(&machoPlugin, &plugin);
- } else {
- ASSERT_NOT_REACHED();
- }
- } else {
- ASSERT_NOT_REACHED();
+ if (executableType == WebMachOExecutableType) {
+ checkCandidate(&machoPlugin, &plugin);
+ return;
}
-#endif
}
+#endif
+ ASSERT_NOT_REACHED();
}
-
- // Allow other plug-ins to win over QT because if the user has installed a plug-in that can handle a type
- // that the QT plug-in can handle, they probably intended to override QT.
- if (webPlugin && ![webPlugin isQuickTimePlugIn])
- return webPlugin;
- else if (machoPlugin && ![machoPlugin isQuickTimePlugIn])
- return machoPlugin;
+ WebBasePluginPackage *bestCandidate()
+ {
+ // Allow other plug-ins to win over QT because if the user has installed a plug-in that can handle a type
+ // that the QT plug-in can handle, they probably intended to override QT.
+ if (webPlugin && ![webPlugin isQuickTimePlugIn])
+ return webPlugin;
+
+ if (machoPlugin && ![machoPlugin isQuickTimePlugIn])
+ return machoPlugin;
+
#ifdef SUPPORT_CFM
- else if (CFMPlugin && ![CFMPlugin isQuickTimePlugIn])
- return CFMPlugin;
+ if (CFMPlugin && ![CFMPlugin isQuickTimePlugIn])
+ return CFMPlugin;
#endif // SUPPORT_CFM
- else if (webPlugin)
- return webPlugin;
- else if (machoPlugin)
- return machoPlugin;
+
+ if (webPlugin)
+ return webPlugin;
+ if (machoPlugin)
+ return machoPlugin;
#ifdef SUPPORT_CFM
- else if (CFMPlugin)
- return CFMPlugin;
+ if (CFMPlugin)
+ return CFMPlugin;
#endif
- return nil;
-}
+ return nil;
+ }
+
+ WebBasePluginPackage *webPlugin;
+ WebBasePluginPackage *machoPlugin;
+#ifdef SUPPORT_CFM
+ WebBasePluginPackage *CFMPlugin;
+#endif
+};
- (WebBasePluginPackage *)pluginForMIMEType:(NSString *)MIMEType
{
- return [self pluginForKey:[MIMEType lowercaseString]
- withEnumeratorSelector:@selector(MIMETypeEnumerator)];
+ PluginPackageCandidates candidates;
+
+ MIMEType = [MIMEType lowercaseString];
+ NSEnumerator *pluginEnumerator = [plugins objectEnumerator];
+
+ while (WebBasePluginPackage *plugin = [pluginEnumerator nextObject]) {
+ if ([plugin supportsMIMEType:MIMEType])
+ candidates.update(plugin);
+ }
+
+ return candidates.bestCandidate();
}
- (WebBasePluginPackage *)pluginForExtension:(NSString *)extension
{
- WebBasePluginPackage *plugin = [self pluginForKey:[extension lowercaseString]
- withEnumeratorSelector:@selector(extensionEnumerator)];
+ PluginPackageCandidates candidates;
+
+ extension = [extension lowercaseString];
+ NSEnumerator *pluginEnumerator = [plugins objectEnumerator];
+
+ while (WebBasePluginPackage *plugin = [pluginEnumerator nextObject]) {
+ if ([plugin supportsExtension:extension])
+ candidates.update(plugin);
+ }
+
+ WebBasePluginPackage *plugin = candidates.bestCandidate();
+
if (!plugin) {
// If no plug-in was found from the extension, attempt to map from the extension to a MIME type
// and find the a plug-in from the MIME type. This is done in case the plug-in has not fully specified
@@ -275,8 +306,11 @@ static NSArray *additionalWebPlugInPaths;
// Build a list of MIME types.
NSMutableSet *MIMETypes = [[NSMutableSet alloc] init];
pluginEnumerator = [plugins objectEnumerator];
- while ((plugin = [pluginEnumerator nextObject]) != nil)
- [MIMETypes addObjectsFromArray:[[plugin MIMETypeEnumerator] allObjects]];
+ while ((plugin = [pluginEnumerator nextObject])) {
+ const PluginInfo& pluginInfo = [plugin pluginInfo];
+ for (size_t i = 0; i < pluginInfo.mimes.size(); ++i)
+ [MIMETypes addObject:pluginInfo.mimes[i].type];
+ }
// Register plug-in views and representations.
NSEnumerator *MIMEEnumerator = [MIMETypes objectEnumerator];
@@ -296,7 +330,7 @@ static NSArray *additionalWebPlugInPaths;
continue;
if (self == sharedDatabase)
- [WebView registerViewClass:[WebHTMLView class] representationClass:[WebHTMLRepresentation class] forMIMEType:MIMEType];
+ [WebView _registerPluginMIMEType:MIMEType];
}
[MIMETypes release];
@@ -410,12 +444,13 @@ static NSArray *additionalWebPlugInPaths;
ASSERT(plugin);
// Unregister plug-in's MIME type registrations
- NSEnumerator *MIMETypeEnumerator = [plugin MIMETypeEnumerator];
- NSString *MIMEType;
- while ((MIMEType = [MIMETypeEnumerator nextObject])) {
+ const PluginInfo& pluginInfo = [plugin pluginInfo];
+ for (size_t i = 0; i < pluginInfo.mimes.size(); ++i) {
+ NSString *MIMEType = pluginInfo.mimes[i].type;
+
if ([registeredMIMETypes containsObject:MIMEType]) {
if (self == sharedDatabase)
- [WebView _unregisterViewClassAndRepresentationClassForMIMEType:MIMEType];
+ [WebView _unregisterPluginMIMEType:MIMEType];
[registeredMIMETypes removeObject:MIMEType];
}
}
diff --git a/WebKit/mac/Plugins/WebPluginPackage.h b/WebKit/mac/Plugins/WebPluginPackage.h
index 290bb1b..f8c8146 100644
--- a/WebKit/mac/Plugins/WebPluginPackage.h
+++ b/WebKit/mac/Plugins/WebPluginPackage.h
@@ -32,7 +32,9 @@
@protocol WebPluginViewFactory;
-@interface WebPluginPackage : WebBasePluginPackage
+@interface WebPluginPackage : WebBasePluginPackage {
+ NSBundle *nsBundle;
+}
- (Class)viewFactory;
diff --git a/WebKit/mac/Plugins/WebPluginPackage.m b/WebKit/mac/Plugins/WebPluginPackage.mm
index d7f144e..a608068 100644
--- a/WebKit/mac/Plugins/WebPluginPackage.m
+++ b/WebKit/mac/Plugins/WebPluginPackage.mm
@@ -40,26 +40,28 @@ NSString *WebPlugInContainingElementKey = @"WebPlugInContainingElementKey"
@implementation WebPluginPackage
-- initWithPath:(NSString *)pluginPath
+- (id)initWithPath:(NSString *)pluginPath
{
if (!(self = [super initWithPath:pluginPath]))
return nil;
- if (bundle == nil) {
+ nsBundle = [[NSBundle alloc] initWithPath:path];
+
+ if (!nsBundle) {
[self release];
return nil;
}
if (![[pluginPath pathExtension] _webkit_isCaseInsensitiveEqualToString:@"webplugin"]) {
UInt32 type = 0;
- CFBundleGetPackageInfo(cfBundle, &type, NULL);
+ CFBundleGetPackageInfo(cfBundle.get(), &type, NULL);
if (type != FOUR_CHAR_CODE('WBPL')) {
[self release];
return nil;
}
}
- NSFileHandle *executableFile = [NSFileHandle fileHandleForReadingAtPath:[bundle executablePath]];
+ NSFileHandle *executableFile = [NSFileHandle fileHandleForReadingAtPath:[nsBundle executablePath]];
NSData *data = [executableFile readDataOfLength:512];
[executableFile closeFile];
if (![self isNativeLibraryData:data]) {
@@ -75,9 +77,16 @@ NSString *WebPlugInContainingElementKey = @"WebPlugInContainingElementKey"
return self;
}
+- (void)dealloc
+{
+ [nsBundle release];
+
+ [super dealloc];
+}
+
- (Class)viewFactory
{
- return [bundle principalClass];
+ return [nsBundle principalClass];
}
- (BOOL)load
@@ -87,14 +96,14 @@ NSString *WebPlugInContainingElementKey = @"WebPlugInContainingElementKey"
#endif
// Load the bundle
- if (![bundle isLoaded]) {
- if (![bundle load])
+ if (![nsBundle isLoaded]) {
+ if (![nsBundle load])
return NO;
}
#if !LOG_DISABLED
CFAbsoluteTime duration = CFAbsoluteTimeGetCurrent() - start;
- LOG(Plugins, "principalClass took %f seconds for: %@", duration, [self name]);
+ LOG(Plugins, "principalClass took %f seconds for: %@", duration, (NSString *)[self pluginInfo].name);
#endif
return [super load];
}
diff --git a/WebKit/mac/Plugins/npapi.mm b/WebKit/mac/Plugins/npapi.mm
index 51c37ae..8b1cfd6 100644
--- a/WebKit/mac/Plugins/npapi.mm
+++ b/WebKit/mac/Plugins/npapi.mm
@@ -39,7 +39,7 @@ WebNetscapePluginView *pluginViewForInstance(NPP instance);
// general plug-in to browser functions
-void* NPN_MemAlloc(uint32 size)
+void* NPN_MemAlloc(uint32_t size)
{
return malloc(size);
}
@@ -49,7 +49,7 @@ void NPN_MemFree(void* ptr)
free(ptr);
}
-uint32 NPN_MemFlush(uint32 size)
+uint32_t NPN_MemFlush(uint32_t size)
{
LOG(Plugins, "NPN_MemFlush");
return size;
@@ -89,12 +89,12 @@ NPError NPN_GetURL(NPP instance, const char* URL, const char* target)
return [pluginViewForInstance(instance) getURL:URL target:target];
}
-NPError NPN_PostURLNotify(NPP instance, const char* URL, const char* target, uint32 len, const char* buf, NPBool file, void* notifyData)
+NPError NPN_PostURLNotify(NPP instance, const char* URL, const char* target, uint32_t len, const char* buf, NPBool file, void* notifyData)
{
return [pluginViewForInstance(instance) postURLNotify:URL target:target len:len buf:buf file:file notifyData:notifyData];
}
-NPError NPN_PostURL(NPP instance, const char* URL, const char* target, uint32 len, const char* buf, NPBool file)
+NPError NPN_PostURL(NPP instance, const char* URL, const char* target, uint32_t len, const char* buf, NPBool file)
{
return [pluginViewForInstance(instance) postURL:URL target:target len:len buf:buf file:file];
}
@@ -104,7 +104,7 @@ NPError NPN_NewStream(NPP instance, NPMIMEType type, const char* target, NPStrea
return [pluginViewForInstance(instance) newStream:type target:target stream:stream];
}
-int32 NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer)
+int32_t NPN_Write(NPP instance, NPStream* stream, int32_t len, void* buffer)
{
return [pluginViewForInstance(instance) write:stream len:len buffer:buffer];
}
@@ -176,12 +176,12 @@ void NPN_PluginThreadAsyncCall(NPP instance, void (*func) (void *), void *userDa
PluginMainThreadScheduler::scheduler().scheduleCall(instance, func, userData);
}
-uint32 NPN_ScheduleTimer(NPP instance, uint32 interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32 timerID))
+uint32_t NPN_ScheduleTimer(NPP instance, uint32_t interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32_t timerID))
{
return [pluginViewForInstance(instance) scheduleTimerWithInterval:interval repeat:repeat timerFunc:timerFunc];
}
-void NPN_UnscheduleTimer(NPP instance, uint32 timerID)
+void NPN_UnscheduleTimer(NPP instance, uint32_t timerID)
{
[pluginViewForInstance(instance) unscheduleTimer:timerID];
}
@@ -191,17 +191,17 @@ NPError NPN_PopUpContextMenu(NPP instance, NPMenu *menu)
return [pluginViewForInstance(instance) popUpContextMenu:menu];
}
-NPError NPN_GetValueForURL(NPP instance, NPNURLVariable variable, const char* url, char** value, uint32* len)
+NPError NPN_GetValueForURL(NPP instance, NPNURLVariable variable, const char* url, char** value, uint32_t* len)
{
return [pluginViewForInstance(instance) getVariable:variable forURL:url value:value length:len];
}
-NPError NPN_SetValueForURL(NPP instance, NPNURLVariable variable, const char* url, const char* value, uint32 len)
+NPError NPN_SetValueForURL(NPP instance, NPNURLVariable variable, const char* url, const char* value, uint32_t len)
{
return [pluginViewForInstance(instance) setVariable:variable forURL:url value:value length:len];
}
-NPError NPN_GetAuthenticationInfo(NPP instance, const char* protocol, const char* host, int32 port, const char* scheme, const char *realm, char** username, uint32* ulen, char** password, uint32* plen)
+NPError NPN_GetAuthenticationInfo(NPP instance, const char* protocol, const char* host, int32_t port, const char* scheme, const char *realm, char** username, uint32_t* ulen, char** password, uint32_t* plen)
{
return [pluginViewForInstance(instance) getAuthenticationInfoWithProtocol:protocol
host:host
@@ -217,12 +217,12 @@ NPBool NPN_ConvertPoint(NPP instance, double sourceX, double sourceY, NPCoordina
return [pluginViewForInstance(instance) convertFromX:sourceX andY:sourceY space:sourceSpace toX:destX andY:destY space:destSpace];
}
-uint32 WKN_CheckIfAllowedToLoadURL(NPP instance, const char* url, const char* frame, void (*callbackFunc)(NPP npp, uint32, NPBool, void*), void* context)
+uint32_t WKN_CheckIfAllowedToLoadURL(NPP instance, const char* url, const char* frame, void (*callbackFunc)(NPP npp, uint32_t, NPBool, void*), void* context)
{
return [pluginViewForInstance(instance) checkIfAllowedToLoadURL:url frame:frame callbackFunc:callbackFunc context:context];
}
-void WKN_CancelCheckIfAllowedToLoadURL(NPP instance, uint32 checkID)
+void WKN_CancelCheckIfAllowedToLoadURL(NPP instance, uint32_t checkID)
{
[pluginViewForInstance(instance) cancelCheckIfAllowedToLoadURL:checkID];
}
diff --git a/WebKit/mac/Resources/nullplugin.tiff b/WebKit/mac/Resources/nullplugin.tiff
deleted file mode 100644
index 8a2d9df..0000000
--- a/WebKit/mac/Resources/nullplugin.tiff
+++ /dev/null
Binary files differ
diff --git a/WebKit/mac/Storage/WebDatabaseManager.mm b/WebKit/mac/Storage/WebDatabaseManager.mm
index a84f235..8c5e8a2 100644
--- a/WebKit/mac/Storage/WebDatabaseManager.mm
+++ b/WebKit/mac/Storage/WebDatabaseManager.mm
@@ -49,6 +49,8 @@ NSString *WebDatabaseDidModifyOriginNotification = @"WebDatabaseDidModifyOriginN
NSString *WebDatabaseDidModifyDatabaseNotification = @"WebDatabaseDidModifyDatabaseNotification";
NSString *WebDatabaseIdentifierKey = @"WebDatabaseIdentifierKey";
+static NSString *databasesDirectoryPath();
+
@implementation WebDatabaseManager
+ (WebDatabaseManager *) sharedWebDatabaseManager
@@ -107,18 +109,28 @@ NSString *WebDatabaseIdentifierKey = @"WebDatabaseIdentifierKey";
DatabaseTracker::tracker().deleteAllDatabases();
}
-- (void)deleteOrigin:(WebSecurityOrigin *)origin
+- (BOOL)deleteOrigin:(WebSecurityOrigin *)origin
{
- DatabaseTracker::tracker().deleteOrigin([origin _core]);
+ return DatabaseTracker::tracker().deleteOrigin([origin _core]);
}
-- (void)deleteDatabase:(NSString *)databaseIdentifier withOrigin:(WebSecurityOrigin *)origin
+- (BOOL)deleteDatabase:(NSString *)databaseIdentifier withOrigin:(WebSecurityOrigin *)origin
{
- DatabaseTracker::tracker().deleteDatabase([origin _core], databaseIdentifier);
+ return DatabaseTracker::tracker().deleteDatabase([origin _core], databaseIdentifier);
}
@end
+static NSString *databasesDirectoryPath()
+{
+ NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
+ NSString *databasesDirectory = [defaults objectForKey:WebDatabaseDirectoryDefaultsKey];
+ if (!databasesDirectory || ![databasesDirectory isKindOfClass:[NSString class]])
+ databasesDirectory = @"~/Library/WebKit/Databases";
+
+ return [databasesDirectory stringByStandardizingPath];
+}
+
void WebKitInitializeDatabasesIfNecessary()
{
static BOOL initialized = NO;
@@ -126,13 +138,7 @@ void WebKitInitializeDatabasesIfNecessary()
return;
// Set the database root path in WebCore
- NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
-
- NSString *databasesDirectory = [defaults objectForKey:WebDatabaseDirectoryDefaultsKey];
- if (!databasesDirectory || ![databasesDirectory isKindOfClass:[NSString class]])
- databasesDirectory = @"~/Library/WebKit/Databases";
-
- DatabaseTracker::tracker().setDatabaseDirectoryPath([databasesDirectory stringByStandardizingPath]);
+ DatabaseTracker::initializeTracker(databasesDirectoryPath());
// Set the DatabaseTrackerClient
DatabaseTracker::tracker().setClient(WebDatabaseTrackerClient::sharedWebDatabaseTrackerClient());
diff --git a/WebKit/mac/Storage/WebDatabaseManagerPrivate.h b/WebKit/mac/Storage/WebDatabaseManagerPrivate.h
index e373b1c..94d8109 100644
--- a/WebKit/mac/Storage/WebDatabaseManagerPrivate.h
+++ b/WebKit/mac/Storage/WebDatabaseManagerPrivate.h
@@ -60,8 +60,8 @@ extern NSString *WebDatabaseIdentifierKey;
- (NSDictionary *)detailsForDatabase:(NSString *)databaseIdentifier withOrigin:(WebSecurityOrigin *)origin;
- (void)deleteAllDatabases; // Deletes all databases and all origins.
-- (void)deleteOrigin:(WebSecurityOrigin *)origin;
-- (void)deleteDatabase:(NSString *)databaseIdentifier withOrigin:(WebSecurityOrigin *)origin;
+- (BOOL)deleteOrigin:(WebSecurityOrigin *)origin;
+- (BOOL)deleteDatabase:(NSString *)databaseIdentifier withOrigin:(WebSecurityOrigin *)origin;
@end
diff --git a/WebKit/mac/Storage/WebDatabaseQuotaManager.h b/WebKit/mac/Storage/WebDatabaseQuotaManager.h
new file mode 100644
index 0000000..8219da4
--- /dev/null
+++ b/WebKit/mac/Storage/WebDatabaseQuotaManager.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "WebQuotaManager.h"
+
+@interface WebDatabaseQuotaManager : NSObject <WebQuotaManager> {
+ WebSecurityOrigin *_origin;
+}
+
+@end
diff --git a/WebKit/mac/Storage/WebDatabaseQuotaManager.mm b/WebKit/mac/Storage/WebDatabaseQuotaManager.mm
new file mode 100644
index 0000000..e26ae33
--- /dev/null
+++ b/WebKit/mac/Storage/WebDatabaseQuotaManager.mm
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2007, 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "WebDatabaseQuotaManager.h"
+
+#import "WebSecurityOriginInternal.h"
+#import <WebCore/DatabaseTracker.h>
+
+using namespace WebCore;
+
+@implementation WebDatabaseQuotaManager
+
+- (id)initWithOrigin:(WebSecurityOrigin *)origin
+{
+ self = [super init];
+ if (!self)
+ return nil;
+
+ _origin = origin;
+ return self;
+}
+
+- (WebSecurityOrigin *)origin
+{
+ return _origin;
+}
+
+- (unsigned long long)usage
+{
+#if ENABLE(DATABASE)
+ return DatabaseTracker::tracker().usageForOrigin([_origin _core]);
+#else
+ return 0;
+#endif
+}
+
+- (unsigned long long)quota
+{
+#if ENABLE(DATABASE)
+ return DatabaseTracker::tracker().quotaForOrigin([_origin _core]);
+#else
+ return 0;
+#endif
+}
+
+// If the quota is set to a value lower than the current usage, that quota will
+// "stick" but no data will be purged to meet the new quota. This will simply
+// prevent new data from being added to databases in that origin.
+- (void)setQuota:(unsigned long long)quota
+{
+#if ENABLE(DATABASE)
+ DatabaseTracker::tracker().setQuota([_origin _core], quota);
+#endif
+}
+
+@end
diff --git a/WebKit/mac/Storage/WebDatabaseTrackerClient.h b/WebKit/mac/Storage/WebDatabaseTrackerClient.h
index d06cfe9..cbb5eb7 100644
--- a/WebKit/mac/Storage/WebDatabaseTrackerClient.h
+++ b/WebKit/mac/Storage/WebDatabaseTrackerClient.h
@@ -36,7 +36,7 @@ public:
virtual ~WebDatabaseTrackerClient();
virtual void dispatchDidModifyOrigin(WebCore::SecurityOrigin*);
- virtual void dispatchDidModifyDatabase(WebCore::SecurityOrigin*, const WebCore::String& databaseIdentifier);
+ virtual void dispatchDidModifyDatabase(WebCore::SecurityOrigin*, const WTF::String& databaseIdentifier);
private:
WebDatabaseTrackerClient();
};
diff --git a/WebKit/mac/Storage/WebDatabaseTrackerClient.mm b/WebKit/mac/Storage/WebDatabaseTrackerClient.mm
index 89626fb..2913739 100644
--- a/WebKit/mac/Storage/WebDatabaseTrackerClient.mm
+++ b/WebKit/mac/Storage/WebDatabaseTrackerClient.mm
@@ -32,6 +32,7 @@
#import "WebDatabaseManagerPrivate.h"
#import "WebSecurityOriginInternal.h"
+#import <wtf/MainThread.h>
#import <wtf/RetainPtr.h>
#import <WebCore/SecurityOrigin.h>
@@ -50,10 +51,42 @@ WebDatabaseTrackerClient::WebDatabaseTrackerClient()
WebDatabaseTrackerClient::~WebDatabaseTrackerClient()
{
}
-
+
+class DidModifyOriginData : public Noncopyable {
+public:
+ static void dispatchToMainThread(WebDatabaseTrackerClient* client, SecurityOrigin* origin)
+ {
+ DidModifyOriginData* context = new DidModifyOriginData(client, origin->threadsafeCopy());
+ callOnMainThread(&DidModifyOriginData::dispatchDidModifyOriginOnMainThread, context);
+ }
+
+private:
+ DidModifyOriginData(WebDatabaseTrackerClient* client, PassRefPtr<SecurityOrigin> origin)
+ : client(client)
+ , origin(origin)
+ {
+ }
+
+ static void dispatchDidModifyOriginOnMainThread(void* context)
+ {
+ ASSERT(isMainThread());
+ DidModifyOriginData* info = static_cast<DidModifyOriginData*>(context);
+ info->client->dispatchDidModifyOrigin(info->origin.get());
+ delete info;
+ }
+
+ WebDatabaseTrackerClient* client;
+ RefPtr<SecurityOrigin> origin;
+};
+
void WebDatabaseTrackerClient::dispatchDidModifyOrigin(SecurityOrigin* origin)
{
- RetainPtr<WebSecurityOrigin> webSecurityOrigin(AdoptNS, [[WebSecurityOrigin alloc] _initWithWebCoreSecurityOrigin:origin]);
+ if (!isMainThread()) {
+ DidModifyOriginData::dispatchToMainThread(this, origin);
+ return;
+ }
+
+ RetainPtr<WebSecurityOrigin> webSecurityOrigin(AdoptNS, [[WebSecurityOrigin alloc] _initWithWebCoreSecurityOrigin:origin]);
[[NSNotificationCenter defaultCenter] postNotificationName:WebDatabaseDidModifyOriginNotification
object:webSecurityOrigin.get()];
@@ -61,6 +94,11 @@ void WebDatabaseTrackerClient::dispatchDidModifyOrigin(SecurityOrigin* origin)
void WebDatabaseTrackerClient::dispatchDidModifyDatabase(SecurityOrigin* origin, const String& databaseIdentifier)
{
+ if (!isMainThread()) {
+ DidModifyOriginData::dispatchToMainThread(this, origin);
+ return;
+ }
+
RetainPtr<WebSecurityOrigin> webSecurityOrigin(AdoptNS, [[WebSecurityOrigin alloc] _initWithWebCoreSecurityOrigin:origin]);
RetainPtr<NSDictionary> userInfo(AdoptNS, [[NSDictionary alloc]
initWithObjectsAndKeys:(NSString *)databaseIdentifier, WebDatabaseIdentifierKey, nil]);
diff --git a/WebKit/mac/WebCoreSupport/WebApplicationCache.h b/WebKit/mac/WebCoreSupport/WebApplicationCache.h
index 282157f..976ce18 100644
--- a/WebKit/mac/WebCoreSupport/WebApplicationCache.h
+++ b/WebKit/mac/WebCoreSupport/WebApplicationCache.h
@@ -25,8 +25,14 @@
#import <Foundation/Foundation.h>
-@interface WebApplicationCache: NSObject {
-}
+@interface WebApplicationCache: NSObject
+
++ (long long)maximumSize;
++ (void)setMaximumSize:(long long)size;
+
++ (long long)defaultOriginQuota;
++ (void)setDefaultOriginQuota:(long long)size;
+
++ (void)deleteAllApplicationCaches;
-+ (void)setMaximumSize:(unsigned long long)size;
@end
diff --git a/WebKit/mac/WebCoreSupport/WebApplicationCache.mm b/WebKit/mac/WebCoreSupport/WebApplicationCache.mm
index 4ca749c..45f0703 100644
--- a/WebKit/mac/WebCoreSupport/WebApplicationCache.mm
+++ b/WebKit/mac/WebCoreSupport/WebApplicationCache.mm
@@ -32,11 +32,31 @@ using namespace WebCore;
@implementation WebApplicationCache
-+ (void)setMaximumSize:(unsigned long long)size
++ (long long)maximumSize
+{
+ return cacheStorage().maximumSize();
+}
+
++ (void)setMaximumSize:(long long)size
+{
+ [WebApplicationCache deleteAllApplicationCaches];
+ cacheStorage().setMaximumSize(size);
+}
+
++ (long long)defaultOriginQuota
+{
+ return cacheStorage().defaultOriginQuota();
+}
+
++ (void)setDefaultOriginQuota:(long long)size
+{
+ cacheStorage().setDefaultOriginQuota(size);
+}
+
++ (void)deleteAllApplicationCaches
{
cacheStorage().empty();
cacheStorage().vacuumDatabaseFile();
- cacheStorage().setMaximumSize(size);
}
@end
diff --git a/WebKit/mac/WebCoreSupport/WebApplicationCacheQuotaManager.h b/WebKit/mac/WebCoreSupport/WebApplicationCacheQuotaManager.h
new file mode 100644
index 0000000..6d30148
--- /dev/null
+++ b/WebKit/mac/WebCoreSupport/WebApplicationCacheQuotaManager.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "WebQuotaManager.h"
+
+@interface WebApplicationCacheQuotaManager : NSObject <WebQuotaManager> {
+ WebSecurityOrigin *_origin;
+}
+
+@end
diff --git a/WebKit/mac/WebCoreSupport/WebApplicationCacheQuotaManager.mm b/WebKit/mac/WebCoreSupport/WebApplicationCacheQuotaManager.mm
new file mode 100644
index 0000000..562bb29
--- /dev/null
+++ b/WebKit/mac/WebCoreSupport/WebApplicationCacheQuotaManager.mm
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "WebApplicationCacheQuotaManager.h"
+
+#import "WebSecurityOriginInternal.h"
+#import <WebCore/ApplicationCacheStorage.h>
+
+using namespace WebCore;
+
+@implementation WebApplicationCacheQuotaManager
+
+- (id)initWithOrigin:(WebSecurityOrigin *)origin
+{
+ self = [super init];
+ if (!self)
+ return nil;
+
+ _origin = origin;
+ return self;
+}
+
+- (WebSecurityOrigin *)origin
+{
+ return _origin;
+}
+
+- (unsigned long long)usage
+{
+#if ENABLE(OFFLINE_WEB_APPLICATIONS)
+ long long usage;
+ if (cacheStorage().usageForOrigin([_origin _core], usage))
+ return usage;
+ return 0;
+#else
+ return 0;
+#endif
+}
+
+- (unsigned long long)quota
+{
+#if ENABLE(OFFLINE_WEB_APPLICATIONS)
+ long long quota;
+ if (cacheStorage().quotaForOrigin([_origin _core], quota))
+ return quota;
+ return 0;
+#else
+ return 0;
+#endif
+}
+
+- (void)setQuota:(unsigned long long)quota
+{
+#if ENABLE(OFFLINE_WEB_APPLICATIONS)
+ cacheStorage().storeUpdatedQuotaForOrigin([_origin _core], quota);
+#endif
+}
+
+@end
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.h b/WebKit/mac/WebCoreSupport/WebChromeClient.h
index 8e8b51a..a5f49e3 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.h
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.h
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -36,7 +36,7 @@
class WebChromeClient : public WebCore::ChromeClient {
public:
WebChromeClient(WebView *webView);
- WebView *webView() { return m_webView; }
+ WebView *webView() const { return m_webView; }
virtual void chromeDestroyed();
@@ -54,8 +54,9 @@ public:
virtual void takeFocus(WebCore::FocusDirection);
virtual void focusedNodeChanged(WebCore::Node*);
+ virtual void focusedFrameChanged(WebCore::Frame*);
- virtual WebCore::Page* createWindow(WebCore::Frame*, const WebCore::FrameLoadRequest&, const WebCore::WindowFeatures&);
+ virtual WebCore::Page* createWindow(WebCore::Frame*, const WebCore::FrameLoadRequest&, const WebCore::WindowFeatures&, const WebCore::NavigationAction&);
virtual void show();
virtual bool canRunModal();
@@ -75,43 +76,49 @@ public:
virtual void setResizable(bool);
- virtual void addMessageToConsole(WebCore::MessageSource source, WebCore::MessageType type, WebCore::MessageLevel level, const WebCore::String& message, unsigned int lineNumber, const WebCore::String& sourceURL);
+ virtual void addMessageToConsole(WebCore::MessageSource source, WebCore::MessageType type, WebCore::MessageLevel level, const WTF::String& message, unsigned int lineNumber, const WTF::String& sourceURL);
virtual bool canRunBeforeUnloadConfirmPanel();
- virtual bool runBeforeUnloadConfirmPanel(const WebCore::String& message, WebCore::Frame* frame);
+ virtual bool runBeforeUnloadConfirmPanel(const WTF::String& message, WebCore::Frame* frame);
virtual void closeWindowSoon();
- virtual void runJavaScriptAlert(WebCore::Frame*, const WebCore::String&);
- virtual bool runJavaScriptConfirm(WebCore::Frame*, const WebCore::String&);
- virtual bool runJavaScriptPrompt(WebCore::Frame*, const WebCore::String& message, const WebCore::String& defaultValue, WebCore::String& result);
+ virtual void runJavaScriptAlert(WebCore::Frame*, const WTF::String&);
+ virtual bool runJavaScriptConfirm(WebCore::Frame*, const WTF::String&);
+ virtual bool runJavaScriptPrompt(WebCore::Frame*, const WTF::String& message, const WTF::String& defaultValue, WTF::String& result);
virtual bool shouldInterruptJavaScript();
virtual bool tabsToLinks() const;
virtual WebCore::IntRect windowResizerRect() const;
- virtual void repaint(const WebCore::IntRect&, bool contentChanged, bool immediate = false, bool repaintContentOnly = false);
+ virtual void invalidateWindow(const WebCore::IntRect&, bool);
+ virtual void invalidateContentsAndWindow(const WebCore::IntRect&, bool);
+ virtual void invalidateContentsForSlowScroll(const WebCore::IntRect&, bool);
virtual void scroll(const WebCore::IntSize& scrollDelta, const WebCore::IntRect& rectToScroll, const WebCore::IntRect& clipRect);
+
virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint&) const;
virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&) const;
virtual PlatformPageClient platformPageClient() const;
virtual void contentsSizeChanged(WebCore::Frame*, const WebCore::IntSize&) const;
virtual void scrollRectIntoView(const WebCore::IntRect&, const WebCore::ScrollView*) const;
- virtual void setStatusbarText(const WebCore::String&);
+ virtual void setStatusbarText(const WTF::String&);
virtual void scrollbarsModeDidChange() const { }
+ virtual bool shouldMissingPluginMessageBeButton() const;
+ virtual void missingPluginButtonClicked(WebCore::Element*) const;
virtual void mouseDidMoveOverElement(const WebCore::HitTestResult&, unsigned modifierFlags);
- virtual void setToolTip(const WebCore::String&, WebCore::TextDirection);
+ virtual void setToolTip(const WTF::String&, WebCore::TextDirection);
virtual void print(WebCore::Frame*);
#if ENABLE(DATABASE)
- virtual void exceededDatabaseQuota(WebCore::Frame*, const WebCore::String& databaseName);
+ virtual void exceededDatabaseQuota(WebCore::Frame*, const WTF::String& databaseName);
#endif
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
virtual void reachedMaxAppCacheSize(int64_t spaceNeeded);
+ virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin*);
#endif
virtual void populateVisitedLinks();
@@ -120,12 +127,13 @@ public:
#endif
virtual void runOpenPanel(WebCore::Frame*, PassRefPtr<WebCore::FileChooser>);
+ virtual void chooseIconForFiles(const Vector<WTF::String>&, WebCore::FileChooser*);
- virtual bool setCursor(WebCore::PlatformCursorHandle) { return false; }
+ virtual void setCursor(const WebCore::Cursor&);
- virtual WebCore::FloatRect customHighlightRect(WebCore::Node*, const WebCore::AtomicString& type,
+ virtual WebCore::FloatRect customHighlightRect(WebCore::Node*, const WTF::AtomicString& type,
const WebCore::FloatRect& lineRect);
- virtual void paintCustomHighlight(WebCore::Node*, const WebCore::AtomicString& type,
+ virtual void paintCustomHighlight(WebCore::Node*, const WTF::AtomicString& type,
const WebCore::FloatRect& boxRect, const WebCore::FloatRect& lineRect,
bool behindText, bool entireLine);
@@ -136,10 +144,10 @@ public:
virtual void willPopUpMenu(NSMenu *);
- virtual bool shouldReplaceWithGeneratedFileForUpload(const WebCore::String& path, WebCore::String &generatedFilename);
- virtual WebCore::String generateReplacementFile(const WebCore::String& path);
+ virtual bool shouldReplaceWithGeneratedFileForUpload(const WTF::String& path, WTF::String &generatedFilename);
+ virtual WTF::String generateReplacementFile(const WTF::String& path);
- virtual void formStateDidChange(const WebCore::Node*);
+ virtual void formStateDidChange(const WebCore::Node*) { }
virtual void formDidFocus(const WebCore::Node*);
virtual void formDidBlur(const WebCore::Node*);
@@ -157,10 +165,23 @@ public:
virtual void enterFullscreenForNode(WebCore::Node*);
virtual void exitFullscreenForNode(WebCore::Node*);
#endif
+
+#if ENABLE(FULLSCREEN_API)
+ virtual bool supportsFullScreenForElement(const WebCore::Element*);
+ virtual void enterFullScreenForElement(WebCore::Element*);
+ virtual void exitFullScreenForElement(WebCore::Element*);
+#endif
virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*);
- virtual void cancelGeolocationPermissionRequestForFrame(WebCore::Frame*) { }
+ virtual void cancelGeolocationPermissionRequestForFrame(WebCore::Frame*, WebCore::Geolocation*) { }
+ virtual bool selectItemWritingDirectionIsNatural();
+ virtual PassRefPtr<WebCore::PopupMenu> createPopupMenu(WebCore::PopupMenuClient*) const;
+ virtual PassRefPtr<WebCore::SearchPopupMenu> createSearchPopupMenu(WebCore::PopupMenuClient*) const;
+
+#if ENABLE(CONTEXT_MENUS)
+ virtual void showContextMenu() { }
+#endif
private:
WebView *m_webView;
};
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.mm b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
index c4e9671..fe95989 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -41,6 +41,7 @@
#import "WebKitSystemInterface.h"
#import "WebNSURLRequestExtras.h"
#import "WebPlugin.h"
+#import "WebQuotaManager.h"
#import "WebSecurityOriginInternal.h"
#import "WebUIDelegatePrivate.h"
#import "WebView.h"
@@ -48,20 +49,24 @@
#import <Foundation/Foundation.h>
#import <WebCore/BlockExceptions.h>
#import <WebCore/Console.h>
+#import <WebCore/Cursor.h>
#import <WebCore/Element.h>
#import <WebCore/FileChooser.h>
#import <WebCore/FloatRect.h>
#import <WebCore/Frame.h>
#import <WebCore/FrameLoadRequest.h>
#import <WebCore/Geolocation.h>
-#import <WebCore/HitTestResult.h>
#import <WebCore/HTMLNames.h>
+#import <WebCore/HitTestResult.h>
+#import <WebCore/Icon.h>
#import <WebCore/IntRect.h>
+#import <WebCore/NavigationAction.h>
#import <WebCore/Page.h>
#import <WebCore/PlatformScreen.h>
#import <WebCore/PlatformString.h>
+#import <WebCore/PopupMenuMac.h>
#import <WebCore/ResourceRequest.h>
-#import <WebCore/ScrollView.h>
+#import <WebCore/SearchPopupMenuMac.h>
#import <WebCore/Widget.h>
#import <WebCore/WindowFeatures.h>
#import <wtf/PassRefPtr.h>
@@ -71,7 +76,7 @@
#import <WebCore/GraphicsLayer.h>
#endif
-#if USE(PLUGIN_HOST_PROCESS)
+#if USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
#import "NetscapePluginHostManager.h"
#endif
@@ -104,6 +109,18 @@ using namespace WebCore;
- (id)initWithGeolocation:(Geolocation*)geolocation;
@end
+#if ENABLE(FULLSCREEN_API)
+
+@interface WebKitFullScreenListener : NSObject <WebKitFullScreenListener>
+{
+ RefPtr<Element> _element;
+}
+
+- (id)initWithElement:(Element*)element;
+@end
+
+#endif
+
WebChromeClient::WebChromeClient(WebView *webView)
: m_webView(webView)
{
@@ -183,7 +200,11 @@ void WebChromeClient::focusedNodeChanged(Node*)
{
}
-Page* WebChromeClient::createWindow(Frame* frame, const FrameLoadRequest& request, const WindowFeatures& features)
+void WebChromeClient::focusedFrameChanged(Frame*)
+{
+}
+
+Page* WebChromeClient::createWindow(Frame* frame, const FrameLoadRequest& request, const WindowFeatures& features, const NavigationAction&)
{
NSURLRequest *URLRequest = nil;
if (!request.isEmpty())
@@ -244,7 +265,7 @@ Page* WebChromeClient::createWindow(Frame* frame, const FrameLoadRequest& reques
newWebView = CallUIDelegate(m_webView, @selector(webView:createWebViewWithRequest:), URLRequest);
}
-#if USE(PLUGIN_HOST_PROCESS)
+#if USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
if (newWebView)
WebKit::NetscapePluginHostManager::shared().didCreateWindow();
#endif
@@ -439,20 +460,32 @@ IntRect WebChromeClient::windowResizerRect() const
return enclosingIntRect([m_webView convertRect:rect fromView:nil]);
}
-void WebChromeClient::repaint(const IntRect& rect, bool contentChanged, bool immediate, bool repaintContentOnly)
+void WebChromeClient::invalidateWindow(const IntRect&, bool immediate)
+{
+ if (immediate) {
+ [[m_webView window] displayIfNeeded];
+ [[m_webView window] flushWindowIfNeeded];
+ }
+}
+
+void WebChromeClient::invalidateContentsAndWindow(const IntRect& rect, bool immediate)
{
if ([m_webView _usesDocumentViews])
return;
-
- if (contentChanged)
- [m_webView setNeedsDisplayInRect:rect];
-
+
+ [m_webView setNeedsDisplayInRect:rect];
+
if (immediate) {
[[m_webView window] displayIfNeeded];
[[m_webView window] flushWindowIfNeeded];
}
}
+void WebChromeClient::invalidateContentsForSlowScroll(const IntRect& rect, bool immediate)
+{
+ invalidateContentsAndWindow(rect, immediate);
+}
+
void WebChromeClient::scroll(const IntSize&, const IntRect&, const IntRect&)
{
}
@@ -486,23 +519,34 @@ void WebChromeClient::contentsSizeChanged(Frame*, const IntSize&) const
{
}
-void WebChromeClient::scrollRectIntoView(const IntRect& r, const ScrollView* scrollView) const
+void WebChromeClient::scrollRectIntoView(const IntRect& r, const ScrollView*) const
{
- // FIXME: This scrolling behavior should be under the control of the embedding client (rather than something
- // we just do ourselves).
-
+ // FIXME: This scrolling behavior should be under the control of the embedding client,
+ // perhaps in a delegate method, rather than something WebKit does unconditionally.
+ NSView *coordinateView = [m_webView _usesDocumentViews]
+ ? [[[m_webView mainFrame] frameView] documentView] : m_webView;
NSRect rect = r;
for (NSView *view = m_webView; view; view = [view superview]) {
if ([view isKindOfClass:[NSClipView class]]) {
NSClipView *clipView = (NSClipView *)view;
NSView *documentView = [clipView documentView];
- [documentView scrollRectToVisible:[documentView convertRect:rect fromView:m_webView]];
+ [documentView scrollRectToVisible:[documentView convertRect:rect fromView:coordinateView]];
}
}
}
// End host window methods.
+bool WebChromeClient::shouldMissingPluginMessageBeButton() const
+{
+ return [[m_webView UIDelegate] respondsToSelector:@selector(webView:didPressMissingPluginButton:)];
+}
+
+void WebChromeClient::missingPluginButtonClicked(Element* element) const
+{
+ CallUIDelegate(m_webView, @selector(webView:didPressMissingPluginButton:), kit(element));
+}
+
void WebChromeClient::mouseDidMoveOverElement(const HitTestResult& result, unsigned modifierFlags)
{
WebElementDictionary *element = [[WebElementDictionary alloc] initWithHitTestResult:result];
@@ -525,6 +569,7 @@ void WebChromeClient::print(Frame* frame)
}
#if ENABLE(DATABASE)
+
void WebChromeClient::exceededDatabaseQuota(Frame* frame, const String& databaseName)
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
@@ -533,20 +578,34 @@ void WebChromeClient::exceededDatabaseQuota(Frame* frame, const String& database
// FIXME: remove this workaround once shipping Safari has the necessary delegate implemented.
if (WKAppVersionCheckLessThan(@"com.apple.Safari", -1, 3.1)) {
const unsigned long long defaultQuota = 5 * 1024 * 1024; // 5 megabytes should hopefully be enough to test storage support.
- [webOrigin setQuota:defaultQuota];
+ [[webOrigin databaseQuotaManager] setQuota:defaultQuota];
} else
CallUIDelegate(m_webView, @selector(webView:frame:exceededDatabaseQuotaForSecurityOrigin:database:), kit(frame), webOrigin, (NSString *)databaseName);
[webOrigin release];
END_BLOCK_OBJC_EXCEPTIONS;
}
+
#endif
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
+
void WebChromeClient::reachedMaxAppCacheSize(int64_t spaceNeeded)
{
// FIXME: Free some space.
}
+
+void WebChromeClient::reachedApplicationCacheOriginQuota(SecurityOrigin* origin)
+{
+ BEGIN_BLOCK_OBJC_EXCEPTIONS;
+
+ WebSecurityOrigin *webOrigin = [[WebSecurityOrigin alloc] _initWithWebCoreSecurityOrigin:origin];
+ CallUIDelegate(m_webView, @selector(webView:exceededApplicationCacheOriginQuotaForSecurityOrigin:), webOrigin);
+ [webOrigin release];
+
+ END_BLOCK_OBJC_EXCEPTIONS;
+}
+
#endif
void WebChromeClient::populateVisitedLinks()
@@ -566,17 +625,14 @@ void WebChromeClient::populateVisitedLinks()
}
#if ENABLE(DASHBOARD_SUPPORT)
+
void WebChromeClient::dashboardRegionsChanged()
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
-
- NSMutableDictionary *regions = core([m_webView mainFrame])->dashboardRegionsDictionary();
- [m_webView _addScrollerDashboardRegions:regions];
-
- CallUIDelegate(m_webView, @selector(webView:dashboardRegionsChanged:), regions);
-
+ CallUIDelegate(m_webView, @selector(webView:dashboardRegionsChanged:), [m_webView _dashboardRegions]);
END_BLOCK_OBJC_EXCEPTIONS;
}
+
#endif
FloatRect WebChromeClient::customHighlightRect(Node* node, const AtomicString& type, const FloatRect& lineRect)
@@ -589,9 +645,7 @@ FloatRect WebChromeClient::customHighlightRect(Node* node, const AtomicString& t
WebHTMLView *webHTMLView = (WebHTMLView *)documentView;
id<WebHTMLHighlighter> highlighter = [webHTMLView _highlighterForType:type];
- if ([(NSObject *)highlighter respondsToSelector:@selector(highlightRectForLine:representedNode:)])
- return [highlighter highlightRectForLine:lineRect representedNode:kit(node)];
- return [highlighter highlightRectForLine:lineRect];
+ return [highlighter highlightRectForLine:lineRect representedNode:kit(node)];
END_BLOCK_OBJC_EXCEPTIONS;
@@ -609,10 +663,7 @@ void WebChromeClient::paintCustomHighlight(Node* node, const AtomicString& type,
WebHTMLView *webHTMLView = (WebHTMLView *)documentView;
id<WebHTMLHighlighter> highlighter = [webHTMLView _highlighterForType:type];
- if ([(NSObject *)highlighter respondsToSelector:@selector(paintHighlightForBox:onLine:behindText:entireLine:representedNode:)])
- [highlighter paintHighlightForBox:boxRect onLine:lineRect behindText:behindText entireLine:entireLine representedNode:kit(node)];
- else
- [highlighter paintHighlightForBox:boxRect onLine:lineRect behindText:behindText entireLine:entireLine];
+ [highlighter paintHighlightForBox:boxRect onLine:lineRect behindText:behindText entireLine:entireLine representedNode:kit(node)];
END_BLOCK_OBJC_EXCEPTIONS;
}
@@ -631,6 +682,19 @@ void WebChromeClient::runOpenPanel(Frame*, PassRefPtr<FileChooser> chooser)
END_BLOCK_OBJC_EXCEPTIONS;
}
+void WebChromeClient::chooseIconForFiles(const Vector<String>& filenames, FileChooser* chooser)
+{
+ chooser->iconLoaded(Icon::createIconForFiles(filenames));
+}
+
+void WebChromeClient::setCursor(const WebCore::Cursor& cursor)
+{
+ NSCursor *platformCursor = cursor.platformCursor();
+ if ([NSCursor currentCursor] == platformCursor)
+ return;
+ [platformCursor set];
+}
+
KeyboardUIMode WebChromeClient::keyboardUIMode()
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
@@ -677,11 +741,6 @@ String WebChromeClient::generateReplacementFile(const String& path)
return [[m_webView _UIDelegateForwarder] webView:m_webView generateReplacementFile:path];
}
-void WebChromeClient::formStateDidChange(const WebCore::Node* node)
-{
- CallUIDelegate(m_webView, @selector(webView:formStateDidChangeForNode:), kit(const_cast<WebCore::Node*>(node)));
-}
-
void WebChromeClient::formDidFocus(const WebCore::Node* node)
{
CallUIDelegate(m_webView, @selector(webView:formDidFocusNode:), kit(const_cast<WebCore::Node*>(node)));
@@ -692,6 +751,21 @@ void WebChromeClient::formDidBlur(const WebCore::Node* node)
CallUIDelegate(m_webView, @selector(webView:formDidBlurNode:), kit(const_cast<WebCore::Node*>(node)));
}
+bool WebChromeClient::selectItemWritingDirectionIsNatural()
+{
+ return true;
+}
+
+PassRefPtr<WebCore::PopupMenu> WebChromeClient::createPopupMenu(WebCore::PopupMenuClient* client) const
+{
+ return adoptRef(new PopupMenuMac(client));
+}
+
+PassRefPtr<WebCore::SearchPopupMenu> WebChromeClient::createSearchPopupMenu(WebCore::PopupMenuClient* client) const
+{
+ return adoptRef(new SearchPopupMenuMac(client));
+}
+
#if USE(ACCELERATED_COMPOSITING)
void WebChromeClient::attachRootGraphicsLayer(Frame* frame, GraphicsLayer* graphicsLayer)
@@ -752,6 +826,29 @@ void WebChromeClient::exitFullscreenForNode(Node*)
#endif
+#if ENABLE(FULLSCREEN_API)
+
+bool WebChromeClient::supportsFullScreenForElement(const Element* element)
+{
+ return CallUIDelegateReturningBoolean(false, m_webView, @selector(webView:supportsFullScreenForElement:), kit(const_cast<WebCore::Element*>(element)));
+}
+
+void WebChromeClient::enterFullScreenForElement(Element* element)
+{
+ WebKitFullScreenListener* listener = [[WebKitFullScreenListener alloc] initWithElement:element];
+ CallUIDelegate(m_webView, @selector(webView:enterFullScreenForElement:listener:), kit(element), listener);
+ [listener release];
+}
+
+void WebChromeClient::exitFullScreenForElement(Element* element)
+{
+ WebKitFullScreenListener* listener = [[WebKitFullScreenListener alloc] initWithElement:element];
+ CallUIDelegate(m_webView, @selector(webView:exitFullScreenForElement:listener:), kit(element), listener);
+ [listener release];
+}
+
+#endif
+
void WebChromeClient::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation)
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
@@ -856,3 +953,44 @@ void WebChromeClient::requestGeolocationPermissionForFrame(Frame* frame, Geoloca
}
@end
+
+#if ENABLE(FULLSCREEN_API)
+
+@implementation WebKitFullScreenListener
+
+- (id)initWithElement:(Element*)element
+{
+ if (!(self = [super init]))
+ return nil;
+
+ _element = element;
+ return self;
+}
+
+- (void)webkitWillEnterFullScreen
+{
+ if (_element)
+ _element->document()->webkitWillEnterFullScreenForElement(_element.get());
+}
+
+- (void)webkitDidEnterFullScreen
+{
+ if (_element)
+ _element->document()->webkitDidEnterFullScreenForElement(_element.get());
+}
+
+- (void)webkitWillExitFullScreen
+{
+ if (_element)
+ _element->document()->webkitWillExitFullScreenForElement(_element.get());
+}
+
+- (void)webkitDidExitFullScreen
+{
+ if (_element)
+ _element->document()->webkitDidExitFullScreenForElement(_element.get());
+}
+
+@end
+
+#endif
diff --git a/WebKit/mac/WebCoreSupport/WebContextMenuClient.h b/WebKit/mac/WebCoreSupport/WebContextMenuClient.h
index c3ff4dd..077cd16 100644
--- a/WebKit/mac/WebCoreSupport/WebContextMenuClient.h
+++ b/WebKit/mac/WebCoreSupport/WebContextMenuClient.h
@@ -43,7 +43,7 @@ public:
virtual void searchWithGoogle(const WebCore::Frame*);
virtual void lookUpInDictionary(WebCore::Frame*);
virtual bool isSpeaking();
- virtual void speak(const WebCore::String&);
+ virtual void speak(const WTF::String&);
virtual void stopSpeaking();
virtual void searchWithSpotlight();
diff --git a/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm b/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm
index 639f3c1..f3a85f0 100644
--- a/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm
@@ -43,6 +43,7 @@
#import "WebViewInternal.h"
#import <WebCore/ContextMenu.h>
#import <WebCore/KURL.h>
+#import <WebCore/LocalizedStrings.h>
#import <WebCore/RuntimeApplicationChecks.h>
#import <WebKit/DOMPrivate.h>
@@ -168,75 +169,77 @@ static void fixMenusReceivedFromOldClients(NSMutableArray *newMenuItems, NSMutab
if (tag == WebMenuItemTagOther) {
// Restore the specific tag for items on which we temporarily set WebMenuItemTagOther to match old behavior.
NSString *title = [item title];
- if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagOpenLink]])
+ if ([title isEqualToString:contextMenuItemTagOpenLink()])
modernTag = WebMenuItemTagOpenLink;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagIgnoreGrammar]])
+ else if ([title isEqualToString:contextMenuItemTagIgnoreGrammar()])
modernTag = WebMenuItemTagIgnoreGrammar;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagSpellingMenu]])
+ else if ([title isEqualToString:contextMenuItemTagSpellingMenu()])
modernTag = WebMenuItemTagSpellingMenu;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagShowSpellingPanel:true]]
- || [title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagShowSpellingPanel:false]])
+ else if ([title isEqualToString:contextMenuItemTagShowSpellingPanel(true)]
+ || [title isEqualToString:contextMenuItemTagShowSpellingPanel(false)])
modernTag = WebMenuItemTagShowSpellingPanel;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagCheckSpelling]])
+ else if ([title isEqualToString:contextMenuItemTagCheckSpelling()])
modernTag = WebMenuItemTagCheckSpelling;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagCheckSpellingWhileTyping]])
+ else if ([title isEqualToString:contextMenuItemTagCheckSpellingWhileTyping()])
modernTag = WebMenuItemTagCheckSpellingWhileTyping;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagCheckGrammarWithSpelling]])
+ else if ([title isEqualToString:contextMenuItemTagCheckGrammarWithSpelling()])
modernTag = WebMenuItemTagCheckGrammarWithSpelling;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagFontMenu]])
+ else if ([title isEqualToString:contextMenuItemTagFontMenu()])
modernTag = WebMenuItemTagFontMenu;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagShowFonts]])
+ else if ([title isEqualToString:contextMenuItemTagShowFonts()])
modernTag = WebMenuItemTagShowFonts;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagBold]])
+ else if ([title isEqualToString:contextMenuItemTagBold()])
modernTag = WebMenuItemTagBold;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagItalic]])
+ else if ([title isEqualToString:contextMenuItemTagItalic()])
modernTag = WebMenuItemTagItalic;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagUnderline]])
+ else if ([title isEqualToString:contextMenuItemTagUnderline()])
modernTag = WebMenuItemTagUnderline;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagOutline]])
+ else if ([title isEqualToString:contextMenuItemTagOutline()])
modernTag = WebMenuItemTagOutline;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagStyles]])
+ else if ([title isEqualToString:contextMenuItemTagStyles()])
modernTag = WebMenuItemTagStyles;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagShowColors]])
+ else if ([title isEqualToString:contextMenuItemTagShowColors()])
modernTag = WebMenuItemTagShowColors;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagSpeechMenu]])
+ else if ([title isEqualToString:contextMenuItemTagSpeechMenu()])
modernTag = WebMenuItemTagSpeechMenu;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagStartSpeaking]])
+ else if ([title isEqualToString:contextMenuItemTagStartSpeaking()])
modernTag = WebMenuItemTagStartSpeaking;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagStopSpeaking]])
+ else if ([title isEqualToString:contextMenuItemTagStopSpeaking()])
modernTag = WebMenuItemTagStopSpeaking;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagWritingDirectionMenu]])
+ else if ([title isEqualToString:contextMenuItemTagWritingDirectionMenu()])
modernTag = WebMenuItemTagWritingDirectionMenu;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagDefaultDirection]])
+ else if ([title isEqualToString:contextMenuItemTagDefaultDirection()])
modernTag = WebMenuItemTagDefaultDirection;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagLeftToRight]])
+ else if ([title isEqualToString:contextMenuItemTagLeftToRight()])
modernTag = WebMenuItemTagLeftToRight;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagRightToLeft]])
+ else if ([title isEqualToString:contextMenuItemTagRightToLeft()])
modernTag = WebMenuItemTagRightToLeft;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagCorrectSpellingAutomatically]])
+ else if ([title isEqualToString:contextMenuItemTagInspectElement()])
+ modernTag = WebMenuItemTagInspectElement;
+ else if ([title isEqualToString:contextMenuItemTagCorrectSpellingAutomatically()])
modernTag = WebMenuItemTagCorrectSpellingAutomatically;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagSubstitutionsMenu]])
+ else if ([title isEqualToString:contextMenuItemTagSubstitutionsMenu()])
modernTag = WebMenuItemTagSubstitutionsMenu;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagShowSubstitutions:true]]
- || [title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagShowSubstitutions:false]])
+ else if ([title isEqualToString:contextMenuItemTagShowSubstitutions(true)]
+ || [title isEqualToString:contextMenuItemTagShowSubstitutions(false)])
modernTag = WebMenuItemTagShowSubstitutions;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagSmartCopyPaste]])
+ else if ([title isEqualToString:contextMenuItemTagSmartCopyPaste()])
modernTag = WebMenuItemTagSmartCopyPaste;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagSmartQuotes]])
+ else if ([title isEqualToString:contextMenuItemTagSmartQuotes()])
modernTag = WebMenuItemTagSmartQuotes;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagSmartDashes]])
+ else if ([title isEqualToString:contextMenuItemTagSmartDashes()])
modernTag = WebMenuItemTagSmartDashes;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagSmartLinks]])
+ else if ([title isEqualToString:contextMenuItemTagSmartLinks()])
modernTag = WebMenuItemTagSmartLinks;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagTextReplacement]])
+ else if ([title isEqualToString:contextMenuItemTagTextReplacement()])
modernTag = WebMenuItemTagTextReplacement;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagTransformationsMenu]])
+ else if ([title isEqualToString:contextMenuItemTagTransformationsMenu()])
modernTag = WebMenuItemTagTransformationsMenu;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagMakeUpperCase]])
+ else if ([title isEqualToString:contextMenuItemTagMakeUpperCase()])
modernTag = WebMenuItemTagMakeUpperCase;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagMakeLowerCase]])
+ else if ([title isEqualToString:contextMenuItemTagMakeLowerCase()])
modernTag = WebMenuItemTagMakeLowerCase;
- else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagCapitalize]])
+ else if ([title isEqualToString:contextMenuItemTagCapitalize()])
modernTag = WebMenuItemTagCapitalize;
else {
// We don't expect WebMenuItemTagOther for any items other than the ones we explicitly handle.
diff --git a/WebKit/mac/WebCoreSupport/WebDeviceOrientationClient.h b/WebKit/mac/WebCoreSupport/WebDeviceOrientationClient.h
new file mode 100644
index 0000000..8e1c274
--- /dev/null
+++ b/WebKit/mac/WebCoreSupport/WebDeviceOrientationClient.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "WebDeviceOrientationProvider.h"
+#import <WebCore/DeviceOrientationClient.h>
+
+namespace WebCore {
+class DeviceOrientationController;
+}
+
+@class WebView;
+
+// This class is the Mac implementation of DeviceOrientationClient. It is
+// passed to the Page constructor by the WebView. It is a simple proxy to
+// either the real or mock client which is passed to the WebView. It is
+// required because the WebView must pass a client to the Page constructor,
+// but the real or mock client can not be specified until after the Page has
+// been constructed.
+class WebDeviceOrientationClient : public WebCore::DeviceOrientationClient {
+public:
+ WebDeviceOrientationClient(WebView*);
+
+ // DeviceOrientationClient methods
+ virtual void setController(WebCore::DeviceOrientationController*);
+ virtual void startUpdating();
+ virtual void stopUpdating();
+ virtual WebCore::DeviceOrientation* lastOrientation() const;
+ virtual void deviceOrientationControllerDestroyed();
+
+private:
+ id<WebDeviceOrientationProvider> getProvider() const;
+
+ WebView* m_webView;
+ WebCore::DeviceOrientationController* m_controller;
+ mutable id<WebDeviceOrientationProvider> m_provider;
+};
diff --git a/WebKit/mac/WebCoreSupport/WebDeviceOrientationClient.mm b/WebKit/mac/WebCoreSupport/WebDeviceOrientationClient.mm
new file mode 100644
index 0000000..3a4d5d7
--- /dev/null
+++ b/WebKit/mac/WebCoreSupport/WebDeviceOrientationClient.mm
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "WebDeviceOrientationClient.h"
+
+#import "WebDeviceOrientationInternal.h"
+#import "WebDeviceOrientationProvider.h"
+#import "WebViewInternal.h"
+#import <objc/objc-runtime.h>
+
+using namespace WebCore;
+
+WebDeviceOrientationClient::WebDeviceOrientationClient(WebView* webView)
+ : m_webView(webView)
+ , m_controller(0)
+{
+}
+
+void WebDeviceOrientationClient::setController(DeviceOrientationController* controller)
+{
+ // This is called by the Page constructor before our WebView has the provider set up.
+ // MemoryCache the controller for later use.
+ m_controller = controller;
+}
+
+void WebDeviceOrientationClient::startUpdating()
+{
+ [getProvider() startUpdating];
+}
+
+void WebDeviceOrientationClient::stopUpdating()
+{
+ [getProvider() stopUpdating];
+}
+
+DeviceOrientation* WebDeviceOrientationClient::lastOrientation() const
+{
+ return core([getProvider() lastOrientation]);
+}
+
+void WebDeviceOrientationClient::deviceOrientationControllerDestroyed()
+{
+ delete this;
+}
+
+id<WebDeviceOrientationProvider> WebDeviceOrientationClient::getProvider() const
+{
+ if (!m_provider) {
+ m_provider = [m_webView _deviceOrientationProvider];
+ if ([m_provider respondsToSelector:@selector(setController:)])
+ objc_msgSend(m_provider, @selector(setController:), m_controller);
+ }
+ return m_provider;
+}
diff --git a/WebKit/mac/WebCoreSupport/WebDragClient.h b/WebKit/mac/WebCoreSupport/WebDragClient.h
index 234090e..216a2fb 100644
--- a/WebKit/mac/WebCoreSupport/WebDragClient.h
+++ b/WebKit/mac/WebCoreSupport/WebDragClient.h
@@ -36,7 +36,7 @@ public:
virtual void dragControllerDestroyed();
virtual WebCore::DragSourceAction dragSourceActionMaskForPoint(const WebCore::IntPoint& windowPoint);
virtual void startDrag(WebCore::DragImageRef dragImage, const WebCore::IntPoint& dragPos, const WebCore::IntPoint& eventPos, WebCore::Clipboard*, WebCore::Frame*, bool linkDrag);
- virtual WebCore::DragImageRef createDragImageForLink(WebCore::KURL& url, const WebCore::String& label, WebCore::Frame*);
+ virtual WebCore::DragImageRef createDragImageForLink(WebCore::KURL& url, const WTF::String& label, WebCore::Frame*);
virtual void declareAndWriteDragImage(NSPasteboard*, DOMElement*, NSURL*, NSString*, WebCore::Frame*);
private:
WebView* m_webView;
diff --git a/WebKit/mac/WebCoreSupport/WebEditorClient.h b/WebKit/mac/WebCoreSupport/WebEditorClient.h
index d7dfdd7..23cf312 100644
--- a/WebKit/mac/WebCoreSupport/WebEditorClient.h
+++ b/WebKit/mac/WebCoreSupport/WebEditorClient.h
@@ -27,6 +27,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#import <WebCore/Editor.h>
#import <WebCore/EditorClient.h>
#import <wtf/RetainPtr.h>
#import <wtf/Forward.h>
@@ -38,7 +39,7 @@
class WebEditorClient : public WebCore::EditorClient {
public:
WebEditorClient(WebView *);
-
+ virtual ~WebEditorClient();
virtual void pageDestroyed();
virtual bool isGrammarCheckingEnabled();
@@ -57,7 +58,7 @@ public:
virtual bool shouldBeginEditing(WebCore::Range*);
virtual bool shouldEndEditing(WebCore::Range*);
virtual bool shouldInsertNode(WebCore::Node*, WebCore::Range*, WebCore::EditorInsertAction);
- virtual bool shouldInsertText(const WebCore::String&, WebCore::Range*, WebCore::EditorInsertAction);
+ virtual bool shouldInsertText(const WTF::String&, WebCore::Range*, WebCore::EditorInsertAction);
virtual bool shouldChangeSelectedRange(WebCore::Range* fromRange, WebCore::Range* toRange, WebCore::EAffinity, bool stillSelecting);
virtual bool shouldApplyStyle(WebCore::CSSStyleDeclaration*, WebCore::Range*);
@@ -69,9 +70,11 @@ public:
virtual void didWriteSelectionToPasteboard();
virtual void didSetSelectionTypesForPasteboard();
- virtual NSString* userVisibleString(NSURL*);
+ virtual NSString* userVisibleString(NSURL *);
+ virtual WebCore::DocumentFragment* documentFragmentFromAttributedString(NSAttributedString *, Vector< RefPtr<WebCore::ArchiveResource> >&);
+ virtual void setInsertionPasteboard(NSPasteboard *);
#ifdef BUILDING_ON_TIGER
- virtual NSArray* pasteboardTypesForSelection(WebCore::Frame*);
+ virtual NSArray *pasteboardTypesForSelection(WebCore::Frame*);
#endif
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
@@ -116,24 +119,33 @@ public:
virtual void textWillBeDeletedInTextField(WebCore::Element*);
virtual void textDidChangeInTextArea(WebCore::Element*);
- virtual void ignoreWordInSpellDocument(const WebCore::String&);
- virtual void learnWord(const WebCore::String&);
+ virtual void ignoreWordInSpellDocument(const WTF::String&);
+ virtual void learnWord(const WTF::String&);
virtual void checkSpellingOfString(const UChar*, int length, int* misspellingLocation, int* misspellingLength);
- virtual WebCore::String getAutoCorrectSuggestionForMisspelledWord(const WebCore::String&);
+ virtual WTF::String getAutoCorrectSuggestionForMisspelledWord(const WTF::String&);
virtual void checkGrammarOfString(const UChar*, int length, WTF::Vector<WebCore::GrammarDetail>&, int* badGrammarLocation, int* badGrammarLength);
virtual void checkTextOfParagraph(const UChar* text, int length, uint64_t checkingTypes, WTF::Vector<WebCore::TextCheckingResult>& results);
- virtual void updateSpellingUIWithGrammarString(const WebCore::String&, const WebCore::GrammarDetail&);
- virtual void updateSpellingUIWithMisspelledWord(const WebCore::String&);
+ virtual void updateSpellingUIWithGrammarString(const WTF::String&, const WebCore::GrammarDetail&);
+ virtual void updateSpellingUIWithMisspelledWord(const WTF::String&);
virtual void showSpellingUI(bool show);
virtual bool spellingUIIsShowing();
- virtual void getGuessesForWord(const WebCore::String&, WTF::Vector<WebCore::String>& guesses);
+ virtual void getGuessesForWord(const WTF::String&, WTF::Vector<WTF::String>& guesses);
+ virtual void willSetInputMethodState();
virtual void setInputMethodState(bool enabled);
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ virtual void showCorrectionPanel(WebCore::CorrectionPanelInfo::PanelType, const WebCore::FloatRect& boundingBoxOfReplacedString, const WTF::String& replacedString, const WTF::String& replacementString, WebCore::Editor*);
+ virtual void dismissCorrectionPanel(WebCore::CorrectionWasRejectedOrNot);
+ virtual bool isShowingCorrectionPanel();
+#endif
private:
void registerCommandForUndoOrRedo(PassRefPtr<WebCore::EditCommand>, bool isRedo);
WebEditorClient();
-
+
WebView *m_webView;
RetainPtr<WebEditorUndoTarget> m_undoTarget;
-
bool m_haveUndoRedoOperations;
+
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ BOOL m_correctionPanelIsShown;
+#endif
};
diff --git a/WebKit/mac/WebCoreSupport/WebEditorClient.mm b/WebKit/mac/WebCoreSupport/WebEditorClient.mm
index 1e03d88..39b511e 100644
--- a/WebKit/mac/WebCoreSupport/WebEditorClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebEditorClient.mm
@@ -30,6 +30,7 @@
#import "WebEditorClient.h"
#import "DOMCSSStyleDeclarationInternal.h"
+#import "DOMDocumentFragmentInternal.h"
#import "DOMHTMLElementInternal.h"
#import "DOMHTMLInputElementInternal.h"
#import "DOMHTMLTextAreaElementInternal.h"
@@ -48,8 +49,11 @@
#import "WebKitVersionChecks.h"
#import "WebLocalizableStrings.h"
#import "WebNSURLExtras.h"
+#import "WebResourceInternal.h"
#import "WebViewInternal.h"
+#import <WebCore/ArchiveResource.h>
#import <WebCore/Document.h>
+#import <WebCore/DocumentFragment.h>
#import <WebCore/EditAction.h>
#import <WebCore/EditCommand.h>
#import <WebCore/HTMLInputElement.h>
@@ -59,20 +63,32 @@
#import <WebCore/LegacyWebArchive.h>
#import <WebCore/PlatformKeyboardEvent.h>
#import <WebCore/PlatformString.h>
+#import <WebCore/UserTypingGestureIndicator.h>
#import <WebCore/WebCoreObjCExtras.h>
#import <runtime/InitializeThreading.h>
#import <wtf/PassRefPtr.h>
+#import <wtf/Threading.h>
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#import <AppKit/NSTextChecker.h>
+#endif
using namespace WebCore;
using namespace WTF;
using namespace HTMLNames;
+@interface NSAttributedString (WebNSAttributedStringDetails)
+- (id)_initWithDOMRange:(DOMRange*)range;
+- (DOMDocumentFragment*)_documentFromRange:(NSRange)range document:(DOMDocument*)document documentAttributes:(NSDictionary *)dict subresources:(NSArray **)subresources;
+@end
+
static WebViewInsertAction kit(EditorInsertAction coreAction)
{
return static_cast<WebViewInsertAction>(coreAction);
}
+static const int InvalidCorrectionPanelTag = 0;
+
#ifdef BUILDING_ON_TIGER
@interface NSSpellChecker (NotYetPublicMethods)
- (void)learnWord:(NSString *)word;
@@ -94,6 +110,7 @@ static WebViewInsertAction kit(EditorInsertAction coreAction)
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
@@ -168,9 +185,19 @@ WebEditorClient::WebEditorClient(WebView *webView)
: m_webView(webView)
, m_undoTarget([[[WebEditorUndoTarget alloc] init] autorelease])
, m_haveUndoRedoOperations(false)
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ , m_correctionPanelIsShown(false)
+#endif
{
}
+WebEditorClient::~WebEditorClient()
+{
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ dismissCorrectionPanel(WebCore::CorrectionWasNotRejected);
+#endif
+}
+
bool WebEditorClient::isContinuousSpellCheckingEnabled()
{
return [m_webView isContinuousSpellCheckingEnabled];
@@ -305,13 +332,54 @@ void WebEditorClient::didSetSelectionTypesForPasteboard()
[[m_webView _editingDelegateForwarder] webView:m_webView didSetSelectionTypesForPasteboard:[NSPasteboard generalPasteboard]];
}
-NSString* WebEditorClient::userVisibleString(NSURL *URL)
+NSString *WebEditorClient::userVisibleString(NSURL *URL)
{
return [URL _web_userVisibleString];
}
+static NSArray *createExcludedElementsForAttributedStringConversion()
+{
+ NSArray *elements = [[NSArray alloc] initWithObjects:
+ // Omit style since we want style to be inline so the fragment can be easily inserted.
+ @"style",
+ // Omit xml so the result is not XHTML.
+ @"xml",
+ // Omit tags that will get stripped when converted to a fragment anyway.
+ @"doctype", @"html", @"head", @"body",
+ // Omit deprecated tags.
+ @"applet", @"basefont", @"center", @"dir", @"font", @"isindex", @"menu", @"s", @"strike", @"u",
+ // Omit object so no file attachments are part of the fragment.
+ @"object", nil];
+ CFRetain(elements);
+ return elements;
+}
+
+DocumentFragment* WebEditorClient::documentFragmentFromAttributedString(NSAttributedString *string, Vector<RefPtr<ArchiveResource> >& resources)
+{
+ static NSArray *excludedElements = createExcludedElementsForAttributedStringConversion();
+
+ NSDictionary *dictionary = [[NSDictionary alloc] initWithObjectsAndKeys: excludedElements, NSExcludedElementsDocumentAttribute,
+ nil, @"WebResourceHandler", nil];
+
+ NSArray *subResources;
+ DOMDocumentFragment* fragment = [string _documentFromRange:NSMakeRange(0, [string length])
+ document:[[m_webView mainFrame] DOMDocument]
+ documentAttributes:dictionary
+ subresources:&subResources];
+ for (WebResource* resource in subResources)
+ resources.append([resource _coreResource]);
+
+ [dictionary release];
+ return core(fragment);
+}
+
+void WebEditorClient::setInsertionPasteboard(NSPasteboard *pasteboard)
+{
+ [m_webView _setInsertionPasteboard:pasteboard];
+}
+
#ifdef BUILDING_ON_TIGER
-NSArray* WebEditorClient::pasteboardTypesForSelection(Frame* selectedFrame)
+NSArray *WebEditorClient::pasteboardTypesForSelection(Frame* selectedFrame)
{
WebFrame* frame = kit(selectedFrame);
return [[[frame frameView] documentView] pasteboardTypesForSelection];
@@ -555,12 +623,15 @@ void WebEditorClient::textFieldDidEndEditing(Element* element)
FormDelegateLog(inputElement);
CallFormDelegate(m_webView, @selector(textFieldDidEndEditing:inFrame:), inputElement, kit(element->document()->frame()));
}
-
+
void WebEditorClient::textDidChangeInTextField(Element* element)
{
if (!element->hasTagName(inputTag))
return;
+ if (!UserTypingGestureIndicator::processingUserTypingGesture() || UserTypingGestureIndicator::focusedElementAtGestureStart() != element)
+ return;
+
DOMHTMLInputElement* inputElement = kit(static_cast<HTMLInputElement*>(element));
FormDelegateLog(inputElement);
CallFormDelegate(m_webView, @selector(textDidChangeInTextField:inFrame:), inputElement, kit(element->document()->frame()));
@@ -784,6 +855,48 @@ void WebEditorClient::updateSpellingUIWithGrammarString(const String& badGrammar
#endif
}
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+void WebEditorClient::showCorrectionPanel(WebCore::CorrectionPanelInfo::PanelType panelType, const FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, Editor* editor) {
+ dismissCorrectionPanel(WebCore::CorrectionWasNotRejected);
+
+ NSRect boundingBoxAsNSRect = boundingBoxOfReplacedString;
+ NSRect webViewFrame = m_webView.frame;
+ boundingBoxAsNSRect.origin.y = webViewFrame.size.height-NSMaxY(boundingBoxAsNSRect);
+
+ // Need to explicitly use these local NSString objects, because the C++ references may be invalidated by the time the block below is executed.
+ NSString *replacedStringAsNSString = replacedString;
+ NSString *replacementStringAsNSString = replacementString;
+
+ m_correctionPanelIsShown = YES;
+ NSCorrectionBubbleType bubbleType = panelType == WebCore::CorrectionPanelInfo::PanelTypeCorrection ? NSCorrectionBubbleTypeCorrection : NSCorrectionBubbleTypeReversion;
+ [[NSSpellChecker sharedSpellChecker] showCorrectionBubbleOfType:bubbleType primaryString:replacementStringAsNSString alternativeStrings:nil forStringInRect:boundingBoxAsNSRect view:m_webView completionHandler:^(NSString *acceptedString) {
+ if (!acceptedString && bubbleType == NSCorrectionBubbleTypeCorrection) {
+ [[NSSpellChecker sharedSpellChecker] recordResponse:NSCorrectionResponseRejected toCorrection:replacementStringAsNSString forWord:replacedStringAsNSString language:nil inSpellDocumentWithTag:[m_webView spellCheckerDocumentTag]];
+ editor->handleRejectedCorrection();
+ } else if (acceptedString && bubbleType == NSCorrectionBubbleTypeReversion) {
+ [[NSSpellChecker sharedSpellChecker] recordResponse:NSCorrectionResponseReverted toCorrection:replacedStringAsNSString forWord:replacementStringAsNSString language:nil inSpellDocumentWithTag:[m_webView spellCheckerDocumentTag]];
+ editor->handleRejectedCorrection();
+ }
+ }];
+}
+
+void WebEditorClient::dismissCorrectionPanel(WebCore::CorrectionWasRejectedOrNot correctionWasRejectedOrNot)
+{
+ if (isShowingCorrectionPanel()) {
+ if (correctionWasRejectedOrNot == CorrectionWasRejected)
+ [[NSSpellChecker sharedSpellChecker] cancelCorrectionBubbleForView:m_webView];
+ else
+ [[NSSpellChecker sharedSpellChecker] dismissCorrectionBubbleForView:m_webView];
+ m_correctionPanelIsShown = NO;
+ }
+}
+
+bool WebEditorClient::isShowingCorrectionPanel()
+{
+ return m_correctionPanelIsShown;
+}
+#endif
+
void WebEditorClient::updateSpellingUIWithMisspelledWord(const String& misspelledWord)
{
[[NSSpellChecker sharedSpellChecker] updateSpellingPanelWithMisspelledWord:misspelledWord];
@@ -816,6 +929,10 @@ void WebEditorClient::getGuessesForWord(const String& word, WTF::Vector<String>&
}
}
+void WebEditorClient::willSetInputMethodState()
+{
+}
+
void WebEditorClient::setInputMethodState(bool)
{
}
diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
index 2774783..2b3b2cc 100644
--- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
+++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
@@ -42,7 +42,7 @@ namespace WebCore {
class AuthenticationChallenge;
class CachedFrame;
class HistoryItem;
- class String;
+ class ProtectionSpace;
class ResourceLoader;
class ResourceRequest;
}
@@ -79,6 +79,9 @@ private:
virtual bool shouldUseCredentialStorage(WebCore::DocumentLoader*, unsigned long identifier);
virtual void dispatchDidReceiveAuthenticationChallenge(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::AuthenticationChallenge&);
virtual void dispatchDidCancelAuthenticationChallenge(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::AuthenticationChallenge&);
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
+ virtual bool canAuthenticateAgainstProtectionSpace(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ProtectionSpace&);
+#endif
virtual void dispatchDidReceiveResponse(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceResponse&);
virtual void dispatchDidReceiveContentLength(WebCore::DocumentLoader*, unsigned long identifier, int lengthReceived);
virtual void dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned long identifier);
@@ -98,7 +101,8 @@ private:
virtual void dispatchWillClose();
virtual void dispatchDidReceiveIcon();
virtual void dispatchDidStartProvisionalLoad();
- virtual void dispatchDidReceiveTitle(const WebCore::String& title);
+ virtual void dispatchDidReceiveTitle(const WTF::String& title);
+ virtual void dispatchDidChangeIcons();
virtual void dispatchDidCommitLoad();
virtual void dispatchDidFailProvisionalLoad(const WebCore::ResourceError&);
virtual void dispatchDidFailLoad(const WebCore::ResourceError&);
@@ -107,26 +111,26 @@ private:
virtual void dispatchDidFirstLayout();
virtual void dispatchDidFirstVisuallyNonEmptyLayout();
- virtual WebCore::Frame* dispatchCreatePage();
+ virtual WebCore::Frame* dispatchCreatePage(const WebCore::NavigationAction&);
virtual void dispatchShow();
virtual void dispatchDecidePolicyForMIMEType(WebCore::FramePolicyFunction,
- const WebCore::String& MIMEType, const WebCore::ResourceRequest&);
+ const WTF::String& MIMEType, const WebCore::ResourceRequest&);
virtual void dispatchDecidePolicyForNewWindowAction(WebCore::FramePolicyFunction,
- const WebCore::NavigationAction&, const WebCore::ResourceRequest&, PassRefPtr<WebCore::FormState>, const WebCore::String& frameName);
+ const WebCore::NavigationAction&, const WebCore::ResourceRequest&, PassRefPtr<WebCore::FormState>, const WTF::String& frameName);
virtual void dispatchDecidePolicyForNavigationAction(WebCore::FramePolicyFunction,
const WebCore::NavigationAction&, const WebCore::ResourceRequest&, PassRefPtr<WebCore::FormState>);
virtual void cancelPolicyCheck();
virtual void dispatchUnableToImplementPolicy(const WebCore::ResourceError&);
+ virtual void dispatchWillSendSubmitEvent(WebCore::HTMLFormElement*) { }
virtual void dispatchWillSubmitForm(WebCore::FramePolicyFunction, PassRefPtr<WebCore::FormState>);
virtual void dispatchDidLoadMainResource(WebCore::DocumentLoader*);
virtual void revertToProvisionalState(WebCore::DocumentLoader*);
virtual void setMainDocumentError(WebCore::DocumentLoader*, const WebCore::ResourceError&);
virtual bool dispatchDidLoadResourceFromMemoryCache(WebCore::DocumentLoader*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, int length);
- virtual void dispatchDidLoadResourceByXMLHttpRequest(unsigned long identifier, const WebCore::ScriptString&);
virtual void willChangeEstimatedProgress();
virtual void didChangeEstimatedProgress();
@@ -165,16 +169,19 @@ private:
virtual bool shouldFallBack(const WebCore::ResourceError&);
- virtual WebCore::String userAgent(const WebCore::KURL&);
+ virtual WTF::String userAgent(const WebCore::KURL&);
virtual void savePlatformDataToCachedFrame(WebCore::CachedFrame*);
virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*);
virtual void transitionToCommittedForNewPage();
+ virtual void dispatchDidBecomeFrameset(bool);
+
virtual bool canHandleRequest(const WebCore::ResourceRequest&) const;
- virtual bool canShowMIMEType(const WebCore::String& MIMEType) const;
- virtual bool representationExistsForURLScheme(const WebCore::String& URLScheme) const;
- virtual WebCore::String generatedMIMETypeForURLScheme(const WebCore::String& URLScheme) const;
+ virtual bool canShowMIMEType(const WTF::String& MIMEType) const;
+ virtual bool canShowMIMETypeAsHTML(const WTF::String& MIMEType) const;
+ virtual bool representationExistsForURLScheme(const WTF::String& URLScheme) const;
+ virtual WTF::String generatedMIMETypeForURLScheme(const WTF::String& URLScheme) const;
virtual void frameLoadCompleted();
virtual void saveViewStateToItem(WebCore::HistoryItem*);
@@ -184,19 +191,28 @@ private:
virtual void prepareForDataSourceReplacement();
virtual PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&);
- virtual void setTitle(const WebCore::String& title, const WebCore::KURL&);
+ virtual void setTitle(const WTF::String& title, const WebCore::KURL&);
- virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL& url, const WebCore::String& name, WebCore::HTMLFrameOwnerElement*,
- const WebCore::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight);
- virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, const Vector<WebCore::String>&,
- const Vector<WebCore::String>&, const WebCore::String&, bool);
+ virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL& url, const WTF::String& name, WebCore::HTMLFrameOwnerElement*,
+ const WTF::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight);
+ virtual void didTransferChildFrameToNewDocument(WebCore::Page* oldPage);
+ virtual void transferLoadingResourceFromPage(unsigned long identifier, WebCore::DocumentLoader*, const WebCore::ResourceRequest&, WebCore::Page* oldPage);
+ virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, const Vector<WTF::String>&,
+ const Vector<WTF::String>&, const WTF::String&, bool);
virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget);
virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::KURL& baseURL,
- const Vector<WebCore::String>& paramNames, const Vector<WebCore::String>& paramValues);
+ const Vector<WTF::String>& paramNames, const Vector<WTF::String>& paramValues);
- virtual WebCore::ObjectContentType objectContentType(const WebCore::KURL& url, const WebCore::String& mimeType);
- virtual WebCore::String overrideMediaType() const;
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+ virtual PassRefPtr<WebCore::Widget> createMediaPlayerProxyPlugin(const WebCore::IntSize&, WebCore::HTMLMediaElement*, const WebCore::KURL&,
+ const Vector<WTF::String>&, const Vector<WTF::String>&, const WTF::String&);
+ virtual void hideMediaPlayerProxyPlugin(WebCore::Widget*);
+ virtual void showMediaPlayerProxyPlugin(WebCore::Widget*);
+#endif
+
+ virtual WebCore::ObjectContentType objectContentType(const WebCore::KURL& url, const WTF::String& mimeType);
+ virtual WTF::String overrideMediaType() const;
virtual void dispatchDidClearWindowObjectInWorld(WebCore::DOMWrapperWorld*);
virtual void documentElementAvailable();
@@ -204,7 +220,7 @@ private:
virtual void registerForIconNotification(bool listen);
-#if ENABLE(MAC_JAVA_BRIDGE)
+#if ENABLE(JAVA_BRIDGE)
virtual jobject javaApplet(NSView*);
#endif
@@ -216,6 +232,8 @@ private:
virtual bool canCachePage() const;
+ virtual PassRefPtr<WebCore::FrameNetworkingContext> createNetworkingContext();
+
RetainPtr<WebFrame> m_webFrame;
RetainPtr<WebFramePolicyListener> m_policyListener;
diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
index eaec807..7ca27c0 100644
--- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
@@ -47,20 +47,20 @@
#import "WebFormDelegate.h"
#import "WebFrameInternal.h"
#import "WebFrameLoadDelegate.h"
+#import "WebFrameNetworkingContext.h"
#import "WebFrameViewInternal.h"
#import "WebHTMLRepresentationPrivate.h"
#import "WebHTMLViewInternal.h"
-#import "WebHistoryItemInternal.h"
#import "WebHistoryInternal.h"
+#import "WebHistoryItemInternal.h"
#import "WebIconDatabaseInternal.h"
#import "WebKitErrorsPrivate.h"
#import "WebKitLogging.h"
#import "WebKitNSStringExtras.h"
-#import "WebNavigationData.h"
#import "WebNSURLExtras.h"
-#import "WebNetscapePluginView.h"
+#import "WebNavigationData.h"
#import "WebNetscapePluginPackage.h"
-#import "WebNullPluginView.h"
+#import "WebNetscapePluginView.h"
#import "WebPanelAuthenticationHandler.h"
#import "WebPluginController.h"
#import "WebPluginPackage.h"
@@ -74,7 +74,6 @@
#import "WebUIDelegate.h"
#import "WebUIDelegatePrivate.h"
#import "WebViewInternal.h"
-#import <WebKitSystemInterface.h>
#import <WebCore/AuthenticationMac.h>
#import <WebCore/BlockExceptions.h>
#import <WebCore/CachedFrame.h>
@@ -86,15 +85,17 @@
#import <WebCore/FormState.h>
#import <WebCore/Frame.h>
#import <WebCore/FrameLoader.h>
+#import <WebCore/FrameLoaderStateMachine.h>
#import <WebCore/FrameLoaderTypes.h>
#import <WebCore/FrameTree.h>
#import <WebCore/FrameView.h>
#import <WebCore/HTMLAppletElement.h>
-#import <WebCore/HTMLHeadElement.h>
#import <WebCore/HTMLFormElement.h>
#import <WebCore/HTMLFrameElement.h>
#import <WebCore/HTMLFrameOwnerElement.h>
+#import <WebCore/HTMLHeadElement.h>
#import <WebCore/HTMLNames.h>
+#import <WebCore/HTMLParserIdioms.h>
#import <WebCore/HTMLPlugInElement.h>
#import <WebCore/HistoryItem.h>
#import <WebCore/HitTestResult.h>
@@ -104,26 +105,31 @@
#import <WebCore/MouseEvent.h>
#import <WebCore/Page.h>
#import <WebCore/PlatformString.h>
-#import <WebCore/PluginWidget.h>
+#import <WebCore/PluginViewBase.h>
#import <WebCore/ResourceError.h>
#import <WebCore/ResourceHandle.h>
#import <WebCore/ResourceLoader.h>
#import <WebCore/ResourceRequest.h>
#import <WebCore/ScriptController.h>
-#import <WebCore/ScriptString.h>
#import <WebCore/SharedBuffer.h>
#import <WebCore/WebCoreObjCExtras.h>
#import <WebCore/Widget.h>
#import <WebKit/DOMElement.h>
#import <WebKit/DOMHTMLFormElement.h>
+#import <WebKitSystemInterface.h>
#import <runtime/InitializeThreading.h>
#import <wtf/PassRefPtr.h>
+#import <wtf/Threading.h>
-#if ENABLE(MAC_JAVA_BRIDGE)
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+#import <WebCore/HTMLMediaElement.h>
+#endif
+
+#if ENABLE(JAVA_BRIDGE)
#import "WebJavaPlugIn.h"
#endif
-#if USE(PLUGIN_HOST_PROCESS)
+#if USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
#import "NetscapePluginHostManager.h"
#import "WebHostedNetscapePluginView.h"
#endif
@@ -132,7 +138,7 @@ using namespace WebCore;
using namespace HTMLNames;
using namespace std;
-#if ENABLE(MAC_JAVA_BRIDGE)
+#if ENABLE(JAVA_BRIDGE)
@interface NSView (WebJavaPluginDetails)
- (jobject)pollForAppletInWindow:(NSWindow *)window;
@end
@@ -237,8 +243,6 @@ bool WebFrameLoaderClient::hasHTMLView() const
void WebFrameLoaderClient::forceLayout()
{
NSView <WebDocumentView> *view = [m_webFrame->_private->webFrameView documentView];
- if ([view isKindOfClass:[WebHTMLView class]])
- [(WebHTMLView *)view setNeedsToApplyStyles:YES];
[view setNeedsLayout:YES];
[view layout];
}
@@ -349,10 +353,6 @@ bool WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache(DocumentLoader
return true;
}
-void WebFrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest(unsigned long identifier, const ScriptString& sourceString)
-{
-}
-
void WebFrameLoaderClient::assignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader* loader, const ResourceRequest& request)
{
WebView *webView = getWebView(m_webFrame.get());
@@ -418,6 +418,27 @@ void WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge(DocumentLoa
[[WebPanelAuthenticationHandler sharedHandler] startAuthentication:webChallenge window:window];
}
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
+bool WebFrameLoaderClient::canAuthenticateAgainstProtectionSpace(DocumentLoader* loader, unsigned long identifier, const ProtectionSpace& protectionSpace)
+{
+ WebView *webView = getWebView(m_webFrame.get());
+ WebResourceDelegateImplementationCache* implementations = WebViewGetResourceLoadDelegateImplementations(webView);
+
+ NSURLProtectionSpace *webProtectionSpace = mac(protectionSpace);
+
+ if (implementations->canAuthenticateAgainstProtectionSpaceFunc) {
+ if (id resource = [webView _objectForIdentifier:identifier]) {
+ return CallResourceLoadDelegateReturningBoolean(NO, implementations->canAuthenticateAgainstProtectionSpaceFunc, webView, @selector(webView:resource:canAuthenticateAgainstProtectionSpace:forDataSource:), resource, webProtectionSpace, dataSource(loader));
+ }
+ }
+
+ // If our resource load delegate doesn't handle the question, then only send authentication
+ // challenges for pre-10.6 protection spaces. This is the same as the default implementation
+ // in CFNetwork.
+ return (protectionSpace.authenticationScheme() < ProtectionSpaceAuthenticationSchemeClientCertificateRequested);
+}
+#endif
+
void WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge(DocumentLoader* loader, unsigned long identifier, const AuthenticationChallenge&challenge)
{
WebView *webView = getWebView(m_webFrame.get());
@@ -598,6 +619,11 @@ void WebFrameLoaderClient::dispatchDidReceiveTitle(const String& title)
CallFrameLoadDelegate(implementations->didReceiveTitleForFrameFunc, webView, @selector(webView:didReceiveTitle:forFrame:), (NSString *)title, m_webFrame.get());
}
+void WebFrameLoaderClient::dispatchDidChangeIcons()
+{
+ // FIXME: Implement this to allow container to update favicon.
+}
+
void WebFrameLoaderClient::dispatchDidCommitLoad()
{
// Tell the client we've committed this URL.
@@ -671,7 +697,7 @@ void WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout()
CallFrameLoadDelegate(implementations->didFirstVisuallyNonEmptyLayoutInFrameFunc, webView, @selector(webView:didFirstVisuallyNonEmptyLayoutInFrame:), m_webFrame.get());
}
-Frame* WebFrameLoaderClient::dispatchCreatePage()
+Frame* WebFrameLoaderClient::dispatchCreatePage(const NavigationAction&)
{
WebView *currentWebView = getWebView(m_webFrame.get());
NSDictionary *features = [[NSDictionary alloc] init];
@@ -680,7 +706,7 @@ Frame* WebFrameLoaderClient::dispatchCreatePage()
windowFeatures:features];
[features release];
-#if USE(PLUGIN_HOST_PROCESS)
+#if USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
if (newWebView)
WebKit::NetscapePluginHostManager::shared().didCreateWindow();
#endif
@@ -993,6 +1019,11 @@ bool WebFrameLoaderClient::canShowMIMEType(const String& MIMEType) const
return [getWebView(m_webFrame.get()) _canShowMIMEType:MIMEType];
}
+bool WebFrameLoaderClient::canShowMIMETypeAsHTML(const String& MIMEType) const
+{
+ return [WebView canShowMIMETypeAsHTML:MIMEType];
+}
+
bool WebFrameLoaderClient::representationExistsForURLScheme(const String& URLScheme) const
{
return [WebView _representationExistsForURLScheme:URLScheme];
@@ -1155,7 +1186,7 @@ void WebFrameLoaderClient::transitionToCommittedForNewPage()
if (usesDocumentViews) {
// FIXME (Viewless): I assume we want the equivalent of this optimization for viewless mode too.
bool willProduceHTMLView = [m_webFrame->_private->webFrameView _viewClassForMIMEType:[dataSource _responseMIMEType]] == [WebHTMLView class];
- bool canSkipCreation = core(m_webFrame.get())->loader()->committingFirstRealLoad() && willProduceHTMLView;
+ bool canSkipCreation = core(m_webFrame.get())->loader()->stateMachine()->committingFirstRealLoad() && willProduceHTMLView;
if (canSkipCreation) {
[[m_webFrame->_private->webFrameView documentView] setDataSource:dataSource];
return;
@@ -1222,6 +1253,10 @@ void WebFrameLoaderClient::transitionToCommittedForNewPage()
}
}
+void WebFrameLoaderClient::dispatchDidBecomeFrameset(bool)
+{
+}
+
RetainPtr<WebFramePolicyListener> WebFrameLoaderClient::setUpPolicyListener(FramePolicyFunction function)
{
// FIXME: <rdar://5634381> We need to support multiple active policy listeners.
@@ -1352,6 +1387,20 @@ PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const KURL& url, const Strin
return 0;
}
+void WebFrameLoaderClient::didTransferChildFrameToNewDocument(Page* oldPage)
+{
+}
+
+void WebFrameLoaderClient::transferLoadingResourceFromPage(unsigned long identifier, DocumentLoader* loader, const ResourceRequest& request, Page* oldPage)
+{
+ ASSERT(oldPage != core(m_webFrame.get())->page());
+ ASSERT(![getWebView(m_webFrame.get()) _objectForIdentifier:identifier]);
+
+ assignIdentifierToInitialRequest(identifier, loader, request);
+
+ [kit(oldPage) _removeObjectForIdentifier:identifier];
+}
+
ObjectContentType WebFrameLoaderClient::objectContentType(const KURL& url, const String& mimeType)
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
@@ -1475,6 +1524,20 @@ static NSView *pluginView(WebFrame *frame, WebPluginPackage *pluginPackage,
return view;
}
+class PluginWidget : public PluginViewBase {
+public:
+ PluginWidget(NSView *view = 0)
+ : PluginViewBase(view)
+ {
+ }
+
+private:
+ virtual void invalidateRect(const IntRect& rect)
+ {
+ [platformWidget() setNeedsDisplayInRect:rect];
+ }
+};
+
#if ENABLE(NETSCAPE_PLUGIN_API)
class NetscapePluginWidget : public PluginWidget {
@@ -1484,6 +1547,13 @@ public:
{
}
+#if USE(ACCELERATED_COMPOSITING)
+ virtual PlatformLayer* platformLayer() const
+ {
+ return [(WebBaseNetscapePluginView *)platformWidget() pluginLayer];
+ }
+#endif
+
virtual void handleEvent(Event* event)
{
Frame* frame = Frame::frameForWidget(this);
@@ -1493,18 +1563,22 @@ public:
NSEvent* currentNSEvent = frame->eventHandler()->currentNSEvent();
if (event->type() == eventNames().mousemoveEvent)
[(WebBaseNetscapePluginView *)platformWidget() handleMouseMoved:currentNSEvent];
+ else if (event->type() == eventNames().mouseoverEvent)
+ [(WebBaseNetscapePluginView *)platformWidget() handleMouseEntered:currentNSEvent];
+ else if (event->type() == eventNames().mouseoutEvent)
+ [(WebBaseNetscapePluginView *)platformWidget() handleMouseExited:currentNSEvent];
}
};
-#endif // ENABLE(NETSCAPE_PLUGIN_API)
-
#if USE(PLUGIN_HOST_PROCESS)
#define NETSCAPE_PLUGIN_VIEW WebHostedNetscapePluginView
#else
#define NETSCAPE_PLUGIN_VIEW WebNetscapePluginView
#endif
+#endif // ENABLE(NETSCAPE_PLUGIN_API)
+
PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLPlugInElement* element, const KURL& url,
const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)
{
@@ -1516,16 +1590,32 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLP
WebView *webView = getWebView(m_webFrame.get());
SEL selector = @selector(webView:plugInViewWithArguments:);
- NSURL *URL = url;
+ Document* document = core(m_webFrame.get())->document();
+ NSURL *baseURL = document->baseURL();
+ NSURL *pluginURL = url;
+
+ // <rdar://problem/8366089>: AppleConnect has a bug where it does not
+ // understand the parameter names specified in the <object> element that
+ // embeds its plug-in. This site-specific hack works around the issue by
+ // converting the parameter names to lowercase before passing them to the
+ // plug-in.
+ Frame* frame = core(m_webFrame.get());
+ NSMutableArray *attributeKeys = kit(paramNames);
+ if (frame && frame->settings()->needsSiteSpecificQuirks() && equalIgnoringCase(mimeType, "application/x-snkp")) {
+ for (NSUInteger i = 0; i < [attributeKeys count]; ++i)
+ [attributeKeys replaceObjectAtIndex:i withObject:[[attributeKeys objectAtIndex:i] lowercaseString]];
+ }
+
if ([[webView UIDelegate] respondsToSelector:selector]) {
- NSMutableDictionary *attributes = [[NSMutableDictionary alloc] initWithObjects:kit(paramValues) forKeys:kit(paramNames)];
+ NSMutableDictionary *attributes = [[NSMutableDictionary alloc] initWithObjects:kit(paramValues) forKeys:attributeKeys];
NSDictionary *arguments = [[NSDictionary alloc] initWithObjectsAndKeys:
attributes, WebPlugInAttributesKey,
[NSNumber numberWithInt:loadManually ? WebPlugInModeFull : WebPlugInModeEmbed], WebPlugInModeKey,
[NSNumber numberWithBool:!loadManually], WebPlugInShouldLoadMainResourceKey,
kit(element), WebPlugInContainingElementKey,
- URL, WebPlugInBaseURLKey, // URL might be nil, so add it last
+ // FIXME: We should be passing base URL, see <https://bugs.webkit.org/show_bug.cgi?id=35215>.
+ pluginURL, WebPlugInBaseURLKey, // pluginURL might be nil, so add it last
nil];
NSView *view = CallUIDelegate(webView, selector, arguments);
@@ -1547,14 +1637,8 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLP
pluginPackage = [webView _pluginForMIMEType:mimeType];
}
- NSString *extension = [[URL path] pathExtension];
-#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
- // don't allow proxy plug-in selection by file extension
- if (element->hasTagName(videoTag) || element->hasTagName(audioTag))
- extension = @"";
-#endif
-
- if (!pluginPackage && [extension length] != 0) {
+ NSString *extension = [[pluginURL path] pathExtension];
+ if (!pluginPackage && [extension length] && ![MIMEType length]) {
pluginPackage = [webView _pluginForExtension:extension];
if (pluginPackage) {
NSString *newMIMEType = [pluginPackage MIMETypeForExtension:extension];
@@ -1565,21 +1649,19 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLP
NSView *view = nil;
- Document* document = core(m_webFrame.get())->document();
- NSURL *baseURL = document->baseURL();
if (pluginPackage) {
if ([pluginPackage isKindOfClass:[WebPluginPackage class]])
- view = pluginView(m_webFrame.get(), (WebPluginPackage *)pluginPackage, kit(paramNames), kit(paramValues), baseURL, kit(element), loadManually);
+ view = pluginView(m_webFrame.get(), (WebPluginPackage *)pluginPackage, attributeKeys, kit(paramValues), baseURL, kit(element), loadManually);
#if ENABLE(NETSCAPE_PLUGIN_API)
else if ([pluginPackage isKindOfClass:[WebNetscapePluginPackage class]]) {
WebBaseNetscapePluginView *pluginView = [[[NETSCAPE_PLUGIN_VIEW alloc]
initWithFrame:NSMakeRect(0, 0, size.width(), size.height())
pluginPackage:(WebNetscapePluginPackage *)pluginPackage
- URL:URL
+ URL:pluginURL
baseURL:baseURL
MIMEType:MIMEType
- attributeKeys:kit(paramNames)
+ attributeKeys:attributeKeys
attributeValues:kit(paramValues)
loadManually:loadManually
element:element] autorelease];
@@ -1592,17 +1674,23 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLP
if (!errorCode && !view)
errorCode = WebKitErrorCannotLoadPlugIn;
+
+ if (errorCode && m_webFrame) {
+ WebResourceDelegateImplementationCache* implementations = WebViewGetResourceLoadDelegateImplementations(webView);
+ if (implementations->plugInFailedWithErrorFunc) {
+ KURL pluginPageURL = document->completeURL(stripLeadingAndTrailingHTMLSpaces(parameterValue(paramNames, paramValues, "pluginspage")));
+ if (!pluginPageURL.protocolInHTTPFamily())
+ pluginPageURL = KURL();
+ NSString *pluginName = pluginPackage ? (NSString *)[pluginPackage pluginInfo].name : nil;
+
+ NSError *error = [[NSError alloc] _initWithPluginErrorCode:errorCode
+ contentURL:pluginURL pluginPageURL:pluginPageURL pluginName:pluginName MIMEType:MIMEType];
+ CallResourceLoadDelegate(implementations->plugInFailedWithErrorFunc, [m_webFrame.get() webView],
+ @selector(webView:plugInFailedWithError:dataSource:), error, [m_webFrame.get() _dataSource]);
+ [error release];
+ }
- if (errorCode) {
- KURL pluginPageURL = document->completeURL(deprecatedParseURL(parameterValue(paramNames, paramValues, "pluginspage")));
- if (!pluginPageURL.protocolInHTTPFamily())
- pluginPageURL = KURL();
- NSError *error = [[NSError alloc] _initWithPluginErrorCode:errorCode
- contentURL:URL pluginPageURL:pluginPageURL pluginName:[pluginPackage name] MIMEType:MIMEType];
- WebNullPluginView *nullView = [[[WebNullPluginView alloc] initWithFrame:NSMakeRect(0, 0, size.width(), size.height())
- error:error DOMElement:kit(element)] autorelease];
- view = nullView;
- [error release];
+ return 0;
}
ASSERT(view);
@@ -1639,7 +1727,7 @@ void WebFrameLoaderClient::redirectDataToPlugin(Widget* pluginWidget)
PassRefPtr<Widget> WebFrameLoaderClient::createJavaAppletWidget(const IntSize& size, HTMLAppletElement* element, const KURL& baseURL,
const Vector<String>& paramNames, const Vector<String>& paramValues)
{
-#if ENABLE(MAC_JAVA_BRIDGE)
+#if ENABLE(JAVA_BRIDGE)
BEGIN_BLOCK_OBJC_EXCEPTIONS;
NSView *view = nil;
@@ -1664,6 +1752,8 @@ PassRefPtr<Widget> WebFrameLoaderClient::createJavaAppletWidget(const IntSize& s
[values addObject:[NSString stringWithFormat:@"%d", size.height()]];
}
view = pluginView(m_webFrame.get(), (WebPluginPackage *)pluginPackage, names, values, baseURL, kit(element), NO);
+ if (view)
+ return adoptRef(new PluginWidget(view));
}
#if ENABLE(NETSCAPE_PLUGIN_API)
else if ([pluginPackage isKindOfClass:[WebNetscapePluginPackage class]]) {
@@ -1676,6 +1766,8 @@ PassRefPtr<Widget> WebFrameLoaderClient::createJavaAppletWidget(const IntSize& s
attributeValues:kit(paramValues)
loadManually:NO
element:element] autorelease];
+ if (view)
+ return adoptRef(new NetscapePluginWidget(view));
} else {
ASSERT_NOT_REACHED();
}
@@ -1683,27 +1775,98 @@ PassRefPtr<Widget> WebFrameLoaderClient::createJavaAppletWidget(const IntSize& s
}
if (!view) {
- NSError *error = [[NSError alloc] _initWithPluginErrorCode:WebKitErrorJavaUnavailable
- contentURL:nil
- pluginPageURL:nil
- pluginName:[pluginPackage name]
- MIMEType:MIMEType];
- view = [[[WebNullPluginView alloc] initWithFrame:NSMakeRect(0, 0, size.width(), size.height())
+ WebResourceDelegateImplementationCache* implementations = WebViewGetResourceLoadDelegateImplementations(getWebView(m_webFrame.get()));
+ if (implementations->plugInFailedWithErrorFunc) {
+ NSString *pluginName = pluginPackage ? (NSString *)[pluginPackage pluginInfo].name : nil;
+ NSError *error = [[NSError alloc] _initWithPluginErrorCode:WebKitErrorJavaUnavailable contentURL:nil pluginPageURL:nil pluginName:pluginName MIMEType:MIMEType];
+ CallResourceLoadDelegate(implementations->plugInFailedWithErrorFunc, [m_webFrame.get() webView],
+ @selector(webView:plugInFailedWithError:dataSource:), error, [m_webFrame.get() _dataSource]);
+ [error release];
+ }
+ }
+
+ END_BLOCK_OBJC_EXCEPTIONS;
+#endif // ENABLE(JAVA_BRIDGE)
+ return 0;
+}
+
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+PassRefPtr<Widget> WebFrameLoaderClient::createMediaPlayerProxyPlugin(const IntSize& size, HTMLMediaElement* element, const KURL& url,
+ const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType)
+{
+ BEGIN_BLOCK_OBJC_EXCEPTIONS;
+
+ ASSERT(paramNames.size() == paramValues.size());
+ ASSERT(mimeType);
+
+ int errorCode = 0;
+ WebView *webView = getWebView(m_webFrame.get());
+ NSURL *URL = url;
+
+ SEL selector = @selector(webView:plugInViewWithArguments:);
+
+ if ([[webView UIDelegate] respondsToSelector:selector]) {
+ NSMutableDictionary *attributes = [[NSMutableDictionary alloc] initWithObjects:kit(paramValues) forKeys:kit(paramNames)];
+ NSDictionary *arguments = [[NSDictionary alloc] initWithObjectsAndKeys:
+ attributes, WebPlugInAttributesKey,
+ [NSNumber numberWithInt:WebPlugInModeEmbed], WebPlugInModeKey,
+ [NSNumber numberWithBool:YES], WebPlugInShouldLoadMainResourceKey,
+ kit(element), WebPlugInContainingElementKey,
+ URL, WebPlugInBaseURLKey, // URL might be nil, so add it last
+ nil];
+
+ NSView *view = CallUIDelegate(webView, selector, arguments);
+
+ [attributes release];
+ [arguments release];
+
+ if (view)
+ return adoptRef(new PluginWidget(view));
+ }
+
+ WebBasePluginPackage *pluginPackage = [webView _videoProxyPluginForMIMEType:mimeType];
+ Document* document = core(m_webFrame.get())->document();
+ NSURL *baseURL = document->baseURL();
+ NSView *view = nil;
+
+ if (pluginPackage) {
+ if ([pluginPackage isKindOfClass:[WebPluginPackage class]])
+ view = pluginView(m_webFrame.get(), (WebPluginPackage *)pluginPackage, kit(paramNames), kit(paramValues), baseURL, kit(element), false);
+ } else
+ errorCode = WebKitErrorCannotFindPlugIn;
+
+ if (!errorCode && !view)
+ errorCode = WebKitErrorCannotLoadPlugIn;
+
+ if (errorCode) {
+ NSError *error = [[NSError alloc] _initWithPluginErrorCode:errorCode
+ contentURL:URL pluginPageURL:nil pluginName:[pluginPackage name] MIMEType:mimeType];
+ WebNullPluginView *nullView = [[[WebNullPluginView alloc] initWithFrame:NSMakeRect(0, 0, size.width(), size.height())
error:error DOMElement:kit(element)] autorelease];
+ view = nullView;
[error release];
}
-
+
ASSERT(view);
return adoptRef(new PluginWidget(view));
END_BLOCK_OBJC_EXCEPTIONS;
-
- return adoptRef(new PluginWidget);
-#else
+
return 0;
-#endif // ENABLE(MAC_JAVA_BRIDGE)
}
+void WebFrameLoaderClient::hideMediaPlayerProxyPlugin(Widget* widget)
+{
+ [WebPluginController pluginViewHidden:widget->platformWidget()];
+}
+
+void WebFrameLoaderClient::showMediaPlayerProxyPlugin(Widget* widget)
+{
+ [WebPluginController addPlugInView:widget->platformWidget()];
+}
+
+#endif // ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+
String WebFrameLoaderClient::overrideMediaType() const
{
NSString* overrideType = [getWebView(m_webFrame.get()) mediaStyle];
@@ -1760,7 +1923,12 @@ void WebFrameLoaderClient::didPerformFirstNavigation() const
[preferences setCacheModel:WebCacheModelDocumentBrowser];
}
-#if ENABLE(MAC_JAVA_BRIDGE)
+PassRefPtr<FrameNetworkingContext> WebFrameLoaderClient::createNetworkingContext()
+{
+ return WebFrameNetworkingContext::create(core(m_webFrame.get()));
+}
+
+#if ENABLE(JAVA_BRIDGE)
jobject WebFrameLoaderClient::javaApplet(NSView* view)
{
if ([view respondsToSelector:@selector(webPlugInGetApplet)])
@@ -1779,6 +1947,7 @@ jobject WebFrameLoaderClient::javaApplet(NSView* view)
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
diff --git a/WebKit/mac/WebCoreSupport/WebFrameNetworkingContext.h b/WebKit/mac/WebCoreSupport/WebFrameNetworkingContext.h
new file mode 100644
index 0000000..de89024
--- /dev/null
+++ b/WebKit/mac/WebCoreSupport/WebFrameNetworkingContext.h
@@ -0,0 +1,39 @@
+/*
+ Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#import <WebCore/FrameNetworkingContext.h>
+
+class WebFrameNetworkingContext : public WebCore::FrameNetworkingContext {
+public:
+ static PassRefPtr<WebFrameNetworkingContext> create(WebCore::Frame* frame)
+ {
+ return adoptRef(new WebFrameNetworkingContext(frame));
+ }
+
+private:
+ WebFrameNetworkingContext(WebCore::Frame* frame)
+ : WebCore::FrameNetworkingContext(frame)
+ {
+ }
+
+ virtual bool needsSiteSpecificQuirks() const;
+ virtual bool localFileContentSniffingEnabled() const;
+ virtual WebCore::SchedulePairHashSet* scheduledRunLoopPairs() const;
+ virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) const;
+};
diff --git a/WebKit/mac/WebCoreSupport/WebFrameNetworkingContext.mm b/WebKit/mac/WebCoreSupport/WebFrameNetworkingContext.mm
new file mode 100644
index 0000000..98b8ce1
--- /dev/null
+++ b/WebKit/mac/WebCoreSupport/WebFrameNetworkingContext.mm
@@ -0,0 +1,46 @@
+/*
+ Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#import "WebFrameNetworkingContext.h"
+
+#import <WebCore/Page.h>
+#import <WebCore/ResourceError.h>
+#import <WebCore/Settings.h>
+
+using namespace WebCore;
+
+bool WebFrameNetworkingContext::needsSiteSpecificQuirks() const
+{
+ return frame() && frame()->settings() && frame()->settings()->needsSiteSpecificQuirks();
+}
+
+bool WebFrameNetworkingContext::localFileContentSniffingEnabled() const
+{
+ return frame() && frame()->settings() && frame()->settings()->localFileContentSniffingEnabled();
+}
+
+SchedulePairHashSet* WebFrameNetworkingContext::scheduledRunLoopPairs() const
+{
+ return frame() && frame()->page() ? frame()->page()->scheduledRunLoopPairs() : 0;
+}
+
+ResourceError WebFrameNetworkingContext::blockedError(const ResourceRequest& request) const
+{
+ return frame()->loader()->blockedError(request);
+}
diff --git a/WebKit/mac/WebCoreSupport/WebGeolocationControllerClient.h b/WebKit/mac/WebCoreSupport/WebGeolocationControllerClient.h
index 3965210..34d6a29 100644
--- a/WebKit/mac/WebCoreSupport/WebGeolocationControllerClient.h
+++ b/WebKit/mac/WebCoreSupport/WebGeolocationControllerClient.h
@@ -39,6 +39,7 @@ public:
void geolocationDestroyed();
void startUpdating();
void stopUpdating();
+ void setEnableHighAccuracy(bool) { }
WebCore::GeolocationPosition* lastPosition();
diff --git a/WebKit/mac/WebCoreSupport/WebGeolocationMock.mm b/WebKit/mac/WebCoreSupport/WebGeolocationMock.mm
deleted file mode 100644
index 32e8d0d..0000000
--- a/WebKit/mac/WebCoreSupport/WebGeolocationMock.mm
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2009 Apple Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "WebGeolocationMockPrivate.h"
-
-#import <WebCore/GeolocationServiceMock.h>
-#import <WebCore/Geoposition.h>
-#import <WebCore/PositionError.h>
-#import <wtf/CurrentTime.h>
-
-
-using namespace WebCore;
-using namespace WTF;
-
-@implementation WebGeolocationMock
-
-+ (void)setPosition:(double)latitude:(double)longitude:(double)accuracy
-{
- RefPtr<Coordinates> coordinates = Coordinates::create(latitude,
- longitude,
- false, 0.0, // altitude
- accuracy,
- false, 0.0, // altitudeAccuracy
- false, 0.0, // heading
- false, 0.0); // speed
- RefPtr<Geoposition> position = Geoposition::create(coordinates.release(), currentTime() * 1000.0);
- GeolocationServiceMock::setPosition(position.release());
-}
-
-+ (void)setError:(int)code:(NSString *)message
-{
- PositionError::ErrorCode codeEnum = static_cast<PositionError::ErrorCode>(code);
- RefPtr<PositionError> error = PositionError::create(codeEnum, message);
- GeolocationServiceMock::setError(error.release());
-}
-
-@end
diff --git a/WebKit/mac/WebCoreSupport/WebIconDatabaseClient.h b/WebKit/mac/WebCoreSupport/WebIconDatabaseClient.h
index e908242..3f9df13 100644
--- a/WebKit/mac/WebCoreSupport/WebIconDatabaseClient.h
+++ b/WebKit/mac/WebCoreSupport/WebIconDatabaseClient.h
@@ -27,14 +27,11 @@
*/
#import <WebCore/IconDatabaseClient.h>
-
-namespace WebCore {
- class String;
-}
+#import <wtf/Forward.h>
class WebIconDatabaseClient : public WebCore::IconDatabaseClient {
public:
virtual bool performImport();
virtual void dispatchDidRemoveAllIcons();
- virtual void dispatchDidAddIconForPageURL(const WebCore::String& pageURL);
+ virtual void dispatchDidAddIconForPageURL(const WTF::String& pageURL);
};
diff --git a/WebKit/mac/WebCoreSupport/WebIconDatabaseClient.mm b/WebKit/mac/WebCoreSupport/WebIconDatabaseClient.mm
index 1b0c834..3651dea 100644
--- a/WebKit/mac/WebCoreSupport/WebIconDatabaseClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebIconDatabaseClient.mm
@@ -48,7 +48,7 @@ void WebIconDatabaseClient::dispatchDidRemoveAllIcons()
[pool drain];
}
-void WebIconDatabaseClient::dispatchDidAddIconForPageURL(const WebCore::String& pageURL)
+void WebIconDatabaseClient::dispatchDidAddIconForPageURL(const WTF::String& pageURL)
{
// This is a quick notification that is likely to fire in a rapidly iterating loop
// Therefore we let WebCore handle autorelease by draining its pool "from time to time"
diff --git a/WebKit/mac/WebCoreSupport/WebInspectorClient.h b/WebKit/mac/WebCoreSupport/WebInspectorClient.h
index 64621f8..75a3cc6 100644
--- a/WebKit/mac/WebCoreSupport/WebInspectorClient.h
+++ b/WebKit/mac/WebCoreSupport/WebInspectorClient.h
@@ -27,50 +27,75 @@
*/
#import <WebCore/InspectorClient.h>
+#import <WebCore/InspectorFrontendClientLocal.h>
#import <WebCore/PlatformString.h>
#import <wtf/RetainPtr.h>
#ifdef __OBJC__
@class WebInspectorWindowController;
+@class WebNodeHighlighter;
@class WebView;
#else
class WebInspectorWindowController;
+class WebNodeHighlighter;
class WebView;
#endif
+namespace WebCore {
+
+class Page;
+
+}
+
class WebInspectorClient : public WebCore::InspectorClient {
public:
WebInspectorClient(WebView *);
virtual void inspectorDestroyed();
- virtual WebCore::Page* createPage();
- virtual WebCore::String localizedStringsURL();
+ virtual void openInspectorFrontend(WebCore::InspectorController*);
+
+ virtual void highlight(WebCore::Node*);
+ virtual void hideHighlight();
+
+ virtual void populateSetting(const WTF::String& key, WTF::String* value);
+ virtual void storeSetting(const WTF::String& key, const WTF::String& value);
+
+ virtual bool sendMessageToFrontend(const WTF::String&);
+
+ void releaseFrontendPage();
- virtual WebCore::String hiddenPanels();
+private:
+ WebView *m_webView;
+ RetainPtr<WebNodeHighlighter> m_highlighter;
+ WebCore::Page* m_frontendPage;
+};
- virtual void showWindow();
+
+class WebInspectorFrontendClient : public WebCore::InspectorFrontendClientLocal {
+public:
+ WebInspectorFrontendClient(WebView*, WebInspectorWindowController*, WebCore::InspectorController*, WebCore::Page*);
+
+ virtual void frontendLoaded();
+
+ virtual WTF::String localizedStringsURL();
+ virtual WTF::String hiddenPanels();
+
+ virtual void bringToFront();
virtual void closeWindow();
+ virtual void disconnectFromBackend();
virtual void attachWindow();
virtual void detachWindow();
virtual void setAttachedWindowHeight(unsigned height);
-
- virtual void highlight(WebCore::Node*);
- virtual void hideHighlight();
- virtual void inspectedURLChanged(const WebCore::String& newURL);
-
- virtual void populateSetting(const WebCore::String& key, WebCore::String* value);
- virtual void storeSetting(const WebCore::String& key, const WebCore::String& value);
-
- virtual void inspectorWindowObjectCleared();
+ virtual void inspectedURLChanged(const WTF::String& newURL);
private:
void updateWindowTitle() const;
- WebView *m_webView;
+ WebView* m_inspectedWebView;
RetainPtr<WebInspectorWindowController> m_windowController;
- WebCore::String m_inspectedURL;
+ WTF::String m_inspectedURL;
};
diff --git a/WebKit/mac/WebCoreSupport/WebInspectorClient.mm b/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
index 01515b1..b08c161 100644
--- a/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
@@ -33,6 +33,8 @@
#import "WebFrameInternal.h"
#import "WebFrameView.h"
#import "WebInspector.h"
+#import "WebInspectorPrivate.h"
+#import "WebInspectorFrontend.h"
#import "WebLocalizableStrings.h"
#import "WebNodeHighlight.h"
#import "WebUIDelegate.h"
@@ -41,54 +43,109 @@
#import <WebCore/Page.h>
#import <WebKit/DOMExtensions.h>
#import <WebKitSystemInterface.h>
+#import <wtf/PassOwnPtr.h>
using namespace WebCore;
-static const char* const inspectorStartsAttachedName = "inspectorStartsAttached";
-
@interface WebInspectorWindowController : NSWindowController <NSWindowDelegate> {
@private
WebView *_inspectedWebView;
WebView *_webView;
- WebNodeHighlight *_currentHighlight;
+ WebInspectorFrontendClient* _frontendClient;
+ WebInspectorClient* _inspectorClient;
BOOL _attachedToInspectedWebView;
BOOL _shouldAttach;
BOOL _visible;
- BOOL _movingWindows;
+ BOOL _destroyingInspectorView;
}
- (id)initWithInspectedWebView:(WebView *)webView;
-- (BOOL)inspectorVisible;
- (WebView *)webView;
- (void)attach;
- (void)detach;
+- (BOOL)attached;
+- (void)setFrontendClient:(WebInspectorFrontendClient*)frontendClient;
+- (void)setInspectorClient:(WebInspectorClient*)inspectorClient;
- (void)setAttachedWindowHeight:(unsigned)height;
+- (void)destroyInspectorView:(bool)notifyInspectorController;
+@end
+
+#pragma mark -
+
+@interface WebNodeHighlighter : NSObject {
+@private
+ WebView *_inspectedWebView;
+ WebNodeHighlight *_currentHighlight;
+}
+- (id)initWithInspectedWebView:(WebView *)webView;
- (void)highlightNode:(DOMNode *)node;
- (void)hideHighlight;
@end
#pragma mark -
+
WebInspectorClient::WebInspectorClient(WebView *webView)
: m_webView(webView)
+, m_highlighter(AdoptNS, [[WebNodeHighlighter alloc] initWithInspectedWebView:webView])
+, m_frontendPage(0)
{
}
void WebInspectorClient::inspectorDestroyed()
{
- [[m_windowController.get() webView] close];
delete this;
}
-Page* WebInspectorClient::createPage()
+void WebInspectorClient::openInspectorFrontend(InspectorController* inspectorController)
+{
+ RetainPtr<WebInspectorWindowController> windowController(AdoptNS, [[WebInspectorWindowController alloc] initWithInspectedWebView:m_webView]);
+ [windowController.get() setInspectorClient:this];
+
+ m_frontendPage = core([windowController.get() webView]);
+ WebInspectorFrontendClient* frontendClient = new WebInspectorFrontendClient(m_webView, windowController.get(), inspectorController, m_frontendPage);
+ m_frontendPage->inspectorController()->setInspectorFrontendClient(frontendClient);
+
+ [[m_webView inspector] setFrontend:[[WebInspectorFrontend alloc] initWithFrontendClient:frontendClient]];
+}
+
+void WebInspectorClient::highlight(Node* node)
+{
+ [m_highlighter.get() highlightNode:kit(node)];
+}
+
+void WebInspectorClient::hideHighlight()
{
- if (m_windowController)
- [[m_windowController.get() webView] close];
- m_windowController.adoptNS([[WebInspectorWindowController alloc] initWithInspectedWebView:m_webView]);
+ [m_highlighter.get() hideHighlight];
+}
- return core([m_windowController.get() webView]);
+WebInspectorFrontendClient::WebInspectorFrontendClient(WebView* inspectedWebView, WebInspectorWindowController* windowController, InspectorController* inspectorController, Page* frontendPage)
+ : InspectorFrontendClientLocal(inspectorController, frontendPage)
+ , m_inspectedWebView(inspectedWebView)
+ , m_windowController(windowController)
+{
+ [windowController setFrontendClient:this];
}
-String WebInspectorClient::localizedStringsURL()
+void WebInspectorFrontendClient::frontendLoaded()
+{
+ [m_windowController.get() showWindow:nil];
+ if ([m_windowController.get() attached])
+ restoreAttachedWindowHeight();
+
+ InspectorFrontendClientLocal::frontendLoaded();
+
+ WebFrame *frame = [m_inspectedWebView mainFrame];
+
+ WebFrameLoadDelegateImplementationCache* implementations = WebViewGetFrameLoadDelegateImplementations(m_inspectedWebView);
+ if (implementations->didClearInspectorWindowObjectForFrameFunc)
+ CallFrameLoadDelegate(implementations->didClearInspectorWindowObjectForFrameFunc, m_inspectedWebView,
+ @selector(webView:didClearInspectorWindowObject:forFrame:), [frame windowObject], frame);
+
+ bool attached = [m_windowController.get() attached];
+ setAttachedWindow(attached);
+}
+
+String WebInspectorFrontendClient::localizedStringsURL()
{
NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebCore"] pathForResource:@"localizedStrings" ofType:@"js"];
if (path)
@@ -96,7 +153,7 @@ String WebInspectorClient::localizedStringsURL()
return String();
}
-String WebInspectorClient::hiddenPanels()
+String WebInspectorFrontendClient::hiddenPanels()
{
NSString *hiddenPanels = [[NSUserDefaults standardUserDefaults] stringForKey:@"WebKitInspectorHiddenPanels"];
if (hiddenPanels)
@@ -104,63 +161,52 @@ String WebInspectorClient::hiddenPanels()
return String();
}
-void WebInspectorClient::showWindow()
+void WebInspectorFrontendClient::bringToFront()
{
updateWindowTitle();
[m_windowController.get() showWindow:nil];
}
-void WebInspectorClient::closeWindow()
+void WebInspectorFrontendClient::closeWindow()
{
- [m_windowController.get() close];
+ [m_windowController.get() destroyInspectorView:true];
}
-void WebInspectorClient::attachWindow()
+void WebInspectorFrontendClient::disconnectFromBackend()
{
- [m_windowController.get() attach];
-}
-
-void WebInspectorClient::detachWindow()
-{
- [m_windowController.get() detach];
+ [m_windowController.get() destroyInspectorView:false];
}
-void WebInspectorClient::setAttachedWindowHeight(unsigned height)
+void WebInspectorFrontendClient::attachWindow()
{
- [m_windowController.get() setAttachedWindowHeight:height];
+ if ([m_windowController.get() attached])
+ return;
+ [m_windowController.get() attach];
+ restoreAttachedWindowHeight();
}
-void WebInspectorClient::highlight(Node* node)
+void WebInspectorFrontendClient::detachWindow()
{
- [m_windowController.get() highlightNode:kit(node)];
+ [m_windowController.get() detach];
}
-void WebInspectorClient::hideHighlight()
+void WebInspectorFrontendClient::setAttachedWindowHeight(unsigned height)
{
- [m_windowController.get() hideHighlight];
+ [m_windowController.get() setAttachedWindowHeight:height];
}
-void WebInspectorClient::inspectedURLChanged(const String& newURL)
+void WebInspectorFrontendClient::inspectedURLChanged(const String& newURL)
{
m_inspectedURL = newURL;
updateWindowTitle();
}
-void WebInspectorClient::updateWindowTitle() const
+void WebInspectorFrontendClient::updateWindowTitle() const
{
NSString *title = [NSString stringWithFormat:UI_STRING("Web Inspector — %@", "Web Inspector window title"), (NSString *)m_inspectedURL];
[[m_windowController.get() window] setTitle:title];
}
-void WebInspectorClient::inspectorWindowObjectCleared()
-{
- WebFrame *frame = [m_webView mainFrame];
-
- WebFrameLoadDelegateImplementationCache* implementations = WebViewGetFrameLoadDelegateImplementations(m_webView);
- if (implementations->didClearInspectorWindowObjectForFrameFunc)
- CallFrameLoadDelegate(implementations->didClearInspectorWindowObjectForFrameFunc, m_webView,
- @selector(webView:didClearInspectorWindowObject:forFrame:), [frame windowObject], frame);
-}
#pragma mark -
@@ -171,11 +217,9 @@ void WebInspectorClient::inspectorWindowObjectCleared()
return nil;
// Keep preferences separate from the rest of the client, making sure we are using expected preference values.
- // One reason this is good is that it keeps the inspector out of history via "private browsing".
WebPreferences *preferences = [[WebPreferences alloc] init];
[preferences setAutosaves:NO];
- [preferences setPrivateBrowsingEnabled:YES];
[preferences setLoadsImagesAutomatically:YES];
[preferences setAuthorAndUserStylesEnabled:YES];
[preferences setJavaScriptEnabled:YES];
@@ -223,18 +267,12 @@ void WebInspectorClient::inspectorWindowObjectCleared()
- (void)dealloc
{
- ASSERT(!_currentHighlight);
[_webView release];
[super dealloc];
}
#pragma mark -
-- (BOOL)inspectorVisible
-{
- return _visible;
-}
-
- (WebView *)webView
{
return _webView;
@@ -273,11 +311,7 @@ void WebInspectorClient::inspectorWindowObjectCleared()
- (BOOL)windowShouldClose:(id)sender
{
- _visible = NO;
-
- [_inspectedWebView page]->inspectorController()->setWindowVisible(false);
-
- [self hideHighlight];
+ [self destroyInspectorView:true];
return YES;
}
@@ -289,11 +323,6 @@ void WebInspectorClient::inspectorWindowObjectCleared()
_visible = NO;
- if (!_movingWindows)
- [_inspectedWebView page]->inspectorController()->setWindowVisible(false);
-
- [self hideHighlight];
-
if (_attachedToInspectedWebView) {
if ([_inspectedWebView _isClosed])
return;
@@ -327,8 +356,11 @@ void WebInspectorClient::inspectorWindowObjectCleared()
_visible = YES;
// If no preference is set - default to an attached window. This is important for inspector LayoutTests.
- String shouldAttach = [_inspectedWebView page]->inspectorController()->setting(inspectorStartsAttachedName);
- _shouldAttach = shouldAttach != "false";
+ // FIXME: This flag can be fetched directly from the flags storage.
+ _shouldAttach = [_inspectedWebView page]->inspectorController()->inspectorStartsAttached();
+
+ if (_shouldAttach && !_frontendClient->canAttachWindow())
+ _shouldAttach = NO;
if (_shouldAttach) {
WebFrameView *frameView = [[_inspectedWebView mainFrame] frameView];
@@ -351,8 +383,6 @@ void WebInspectorClient::inspectorWindowObjectCleared()
[super showWindow:nil];
}
-
- [_inspectedWebView page]->inspectorController()->setWindowVisible(true, _shouldAttach);
}
#pragma mark -
@@ -362,13 +392,11 @@ void WebInspectorClient::inspectorWindowObjectCleared()
if (_attachedToInspectedWebView)
return;
- [_inspectedWebView page]->inspectorController()->setSetting(inspectorStartsAttachedName, "true");
- _movingWindows = YES;
+ // FIXME: This flag can be saved directly to the flags storage.
+ [_inspectedWebView page]->inspectorController()->setInspectorStartsAttached(true);
[self close];
[self showWindow:nil];
-
- _movingWindows = NO;
}
- (void)detach
@@ -376,14 +404,26 @@ void WebInspectorClient::inspectorWindowObjectCleared()
if (!_attachedToInspectedWebView)
return;
- [_inspectedWebView page]->inspectorController()->setSetting(inspectorStartsAttachedName, "false");
- _movingWindows = YES;
+ // FIXME: This flag can be saved to the flags storage directly.
+ [_inspectedWebView page]->inspectorController()->setInspectorStartsAttached(false);
[self close];
[self showWindow:nil];
+}
- _movingWindows = NO;
+- (BOOL)attached
+{
+ return _attachedToInspectedWebView;
+}
+- (void)setFrontendClient:(WebInspectorFrontendClient*)frontendClient
+{
+ _frontendClient = frontendClient;
+}
+
+- (void)setInspectorClient:(WebInspectorClient*)inspectorClient
+{
+ _inspectorClient = inspectorClient;
}
- (void)setAttachedWindowHeight:(unsigned)height
@@ -404,29 +444,25 @@ void WebInspectorClient::inspectorWindowObjectCleared()
[frameView setFrame:frameViewRect];
}
-#pragma mark -
-
-- (void)highlightNode:(DOMNode *)node
+- (void)destroyInspectorView:(bool)notifyInspectorController
{
- // The scrollview's content view stays around between page navigations, so target it
- NSView *view = [[[[[_inspectedWebView mainFrame] frameView] documentView] enclosingScrollView] contentView];
- if (![view window])
- return; // skip the highlight if we have no window (e.g. hidden tab)
+ if (_destroyingInspectorView)
+ return;
+ _destroyingInspectorView = YES;
- if (!_currentHighlight) {
- _currentHighlight = [[WebNodeHighlight alloc] initWithTargetView:view inspectorController:[_inspectedWebView page]->inspectorController()];
- [_currentHighlight setDelegate:self];
- [_currentHighlight attach];
- } else
- [[_currentHighlight highlightView] setNeedsDisplay:YES];
-}
+ if (_attachedToInspectedWebView)
+ [self close];
-- (void)hideHighlight
-{
- [_currentHighlight detach];
- [_currentHighlight setDelegate:nil];
- [_currentHighlight release];
- _currentHighlight = nil;
+ _visible = NO;
+
+ if (notifyInspectorController) {
+ if (Page* inspectedPage = [_inspectedWebView page])
+ inspectedPage->inspectorController()->disconnectFrontend();
+
+ _inspectorClient->releaseFrontendPage();
+ }
+
+ [_webView close];
}
#pragma mark -
@@ -496,3 +532,60 @@ void WebInspectorClient::inspectorWindowObjectCleared()
}
@end
+
+
+#pragma mark -
+
+@implementation WebNodeHighlighter
+- (id)initWithInspectedWebView:(WebView *)webView
+{
+ // Don't retain to avoid a circular reference
+ _inspectedWebView = webView;
+ return self;
+}
+
+- (void)dealloc
+{
+ ASSERT(!_currentHighlight);
+ [super dealloc];
+}
+
+#pragma mark -
+
+- (void)highlightNode:(DOMNode *)node
+{
+ // The scrollview's content view stays around between page navigations, so target it
+ NSView *view = [[[[[_inspectedWebView mainFrame] frameView] documentView] enclosingScrollView] contentView];
+ if (![view window])
+ return; // skip the highlight if we have no window (e.g. hidden tab)
+
+ if (!_currentHighlight) {
+ _currentHighlight = [[WebNodeHighlight alloc] initWithTargetView:view inspectorController:[_inspectedWebView page]->inspectorController()];
+ [_currentHighlight setDelegate:self];
+ [_currentHighlight attach];
+ } else
+ [[_currentHighlight highlightView] setNeedsDisplay:YES];
+}
+
+- (void)hideHighlight
+{
+ [_currentHighlight detach];
+ [_currentHighlight setDelegate:nil];
+ [_currentHighlight release];
+ _currentHighlight = nil;
+}
+
+#pragma mark -
+#pragma mark WebNodeHighlight delegate
+
+- (void)didAttachWebNodeHighlight:(WebNodeHighlight *)highlight
+{
+ [_inspectedWebView setCurrentNodeHighlight:highlight];
+}
+
+- (void)willDetachWebNodeHighlight:(WebNodeHighlight *)highlight
+{
+ [_inspectedWebView setCurrentNodeHighlight:nil];
+}
+
+@end
diff --git a/WebKit/mac/WebCoreSupport/WebPasteboardHelper.h b/WebKit/mac/WebCoreSupport/WebPasteboardHelper.h
index 94ff676..2aa37a6 100644
--- a/WebKit/mac/WebCoreSupport/WebPasteboardHelper.h
+++ b/WebKit/mac/WebCoreSupport/WebPasteboardHelper.h
@@ -34,9 +34,9 @@ class WebPasteboardHelper : public WebCore::PasteboardHelper
{
public:
WebPasteboardHelper(WebHTMLView* view) : m_view(view) {}
- virtual WebCore::String urlFromPasteboard(const NSPasteboard*, WebCore::String* title) const;
- virtual WebCore::String plainTextFromPasteboard(const NSPasteboard*) const;
- virtual DOMDocumentFragment* fragmentFromPasteboard(const NSPasteboard*) const;
+ virtual WTF::String urlFromPasteboard(NSPasteboard*, WTF::String* title) const;
+ virtual WTF::String plainTextFromPasteboard(NSPasteboard*) const;
+ virtual DOMDocumentFragment* fragmentFromPasteboard(NSPasteboard*) const;
virtual NSArray* insertablePasteboardTypes() const;
private:
WebHTMLView* m_view;
diff --git a/WebKit/mac/WebCoreSupport/WebPasteboardHelper.mm b/WebKit/mac/WebCoreSupport/WebPasteboardHelper.mm
index eb6a58d..fb93f8e 100644
--- a/WebKit/mac/WebCoreSupport/WebPasteboardHelper.mm
+++ b/WebKit/mac/WebCoreSupport/WebPasteboardHelper.mm
@@ -37,7 +37,7 @@
using namespace WebCore;
-String WebPasteboardHelper::urlFromPasteboard(const NSPasteboard* pasteboard, String* title) const
+String WebPasteboardHelper::urlFromPasteboard(NSPasteboard* pasteboard, String* title) const
{
NSURL *URL = [pasteboard _web_bestURL];
if (title) {
@@ -48,7 +48,7 @@ String WebPasteboardHelper::urlFromPasteboard(const NSPasteboard* pasteboard, St
return [URL _web_originalDataAsString];
}
-String WebPasteboardHelper::plainTextFromPasteboard(const NSPasteboard *pasteboard) const
+String WebPasteboardHelper::plainTextFromPasteboard(NSPasteboard *pasteboard) const
{
NSArray *types = [pasteboard types];
@@ -85,7 +85,7 @@ String WebPasteboardHelper::plainTextFromPasteboard(const NSPasteboard *pasteboa
return String();
}
-DOMDocumentFragment *WebPasteboardHelper::fragmentFromPasteboard(const NSPasteboard *pasteboard) const
+DOMDocumentFragment *WebPasteboardHelper::fragmentFromPasteboard(NSPasteboard *pasteboard) const
{
return [m_view _documentFragmentFromPasteboard:pasteboard];
}
diff --git a/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h b/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h
new file mode 100644
index 0000000..fab7eee
--- /dev/null
+++ b/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h
@@ -0,0 +1,169 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebPlatformStrategies_h
+#define WebPlatformStrategies_h
+
+#include <WebCore/PlatformStrategies.h>
+#include <WebCore/PluginStrategy.h>
+#include <WebCore/LocalizationStrategy.h>
+#include <WebCore/VisitedLinkStrategy.h>
+
+class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::PluginStrategy, private WebCore::LocalizationStrategy, private WebCore::VisitedLinkStrategy {
+public:
+ static void initialize();
+
+private:
+ WebPlatformStrategies();
+
+ // WebCore::PlatformStrategies
+ virtual WebCore::PluginStrategy* createPluginStrategy();
+ virtual WebCore::LocalizationStrategy* createLocalizationStrategy();
+ virtual WebCore::VisitedLinkStrategy* createVisitedLinkStrategy();
+
+ // WebCore::PluginStrategy
+ virtual void refreshPlugins();
+ virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&);
+
+ // WebCore::LocalizationStrategy
+ virtual WTF::String inputElementAltText();
+ virtual WTF::String resetButtonDefaultLabel();
+ virtual WTF::String searchableIndexIntroduction();
+ virtual WTF::String submitButtonDefaultLabel();
+ virtual WTF::String fileButtonChooseFileLabel();
+ virtual WTF::String fileButtonNoFileSelectedLabel();
+ virtual WTF::String copyImageUnknownFileLabel();
+#if ENABLE(CONTEXT_MENUS)
+ virtual WTF::String contextMenuItemTagOpenLinkInNewWindow();
+ virtual WTF::String contextMenuItemTagDownloadLinkToDisk();
+ virtual WTF::String contextMenuItemTagCopyLinkToClipboard();
+ virtual WTF::String contextMenuItemTagOpenImageInNewWindow();
+ virtual WTF::String contextMenuItemTagDownloadImageToDisk();
+ virtual WTF::String contextMenuItemTagCopyImageToClipboard();
+ virtual WTF::String contextMenuItemTagOpenFrameInNewWindow();
+ virtual WTF::String contextMenuItemTagCopy();
+ virtual WTF::String contextMenuItemTagGoBack();
+ virtual WTF::String contextMenuItemTagGoForward();
+ virtual WTF::String contextMenuItemTagStop();
+ virtual WTF::String contextMenuItemTagReload();
+ virtual WTF::String contextMenuItemTagCut();
+ virtual WTF::String contextMenuItemTagPaste();
+ virtual WTF::String contextMenuItemTagNoGuessesFound();
+ virtual WTF::String contextMenuItemTagIgnoreSpelling();
+ virtual WTF::String contextMenuItemTagLearnSpelling();
+ virtual WTF::String contextMenuItemTagSearchWeb();
+ virtual WTF::String contextMenuItemTagLookUpInDictionary();
+ virtual WTF::String contextMenuItemTagOpenLink();
+ virtual WTF::String contextMenuItemTagIgnoreGrammar();
+ virtual WTF::String contextMenuItemTagSpellingMenu();
+ virtual WTF::String contextMenuItemTagShowSpellingPanel(bool show);
+ virtual WTF::String contextMenuItemTagCheckSpelling();
+ virtual WTF::String contextMenuItemTagCheckSpellingWhileTyping();
+ virtual WTF::String contextMenuItemTagCheckGrammarWithSpelling();
+ virtual WTF::String contextMenuItemTagFontMenu();
+ virtual WTF::String contextMenuItemTagBold();
+ virtual WTF::String contextMenuItemTagItalic();
+ virtual WTF::String contextMenuItemTagUnderline();
+ virtual WTF::String contextMenuItemTagOutline();
+ virtual WTF::String contextMenuItemTagWritingDirectionMenu();
+ virtual WTF::String contextMenuItemTagTextDirectionMenu();
+ virtual WTF::String contextMenuItemTagDefaultDirection();
+ virtual WTF::String contextMenuItemTagLeftToRight();
+ virtual WTF::String contextMenuItemTagRightToLeft();
+ virtual WTF::String contextMenuItemTagSearchInSpotlight();
+ virtual WTF::String contextMenuItemTagShowFonts();
+ virtual WTF::String contextMenuItemTagStyles();
+ virtual WTF::String contextMenuItemTagShowColors();
+ virtual WTF::String contextMenuItemTagSpeechMenu();
+ virtual WTF::String contextMenuItemTagStartSpeaking();
+ virtual WTF::String contextMenuItemTagStopSpeaking();
+ virtual WTF::String contextMenuItemTagCorrectSpellingAutomatically();
+ virtual WTF::String contextMenuItemTagSubstitutionsMenu();
+ virtual WTF::String contextMenuItemTagShowSubstitutions(bool show);
+ virtual WTF::String contextMenuItemTagSmartCopyPaste();
+ virtual WTF::String contextMenuItemTagSmartQuotes();
+ virtual WTF::String contextMenuItemTagSmartDashes();
+ virtual WTF::String contextMenuItemTagSmartLinks();
+ virtual WTF::String contextMenuItemTagTextReplacement();
+ virtual WTF::String contextMenuItemTagTransformationsMenu();
+ virtual WTF::String contextMenuItemTagMakeUpperCase();
+ virtual WTF::String contextMenuItemTagMakeLowerCase();
+ virtual WTF::String contextMenuItemTagCapitalize();
+ virtual WTF::String contextMenuItemTagChangeBack(const WTF::String& replacedString);
+ virtual WTF::String contextMenuItemTagInspectElement();
+ virtual WTF::String contextMenuItemTagOpenVideoInNewWindow();
+ virtual WTF::String contextMenuItemTagOpenAudioInNewWindow();
+ virtual WTF::String contextMenuItemTagCopyVideoLinkToClipboard();
+ virtual WTF::String contextMenuItemTagCopyAudioLinkToClipboard();
+ virtual WTF::String contextMenuItemTagToggleMediaControls();
+ virtual WTF::String contextMenuItemTagToggleMediaLoop();
+ virtual WTF::String contextMenuItemTagEnterVideoFullscreen();
+ virtual WTF::String contextMenuItemTagMediaPlay();
+ virtual WTF::String contextMenuItemTagMediaPause();
+ virtual WTF::String contextMenuItemTagMediaMute();
+#endif // ENABLE(CONTEXT_MENUS)
+ virtual WTF::String searchMenuNoRecentSearchesText();
+ virtual WTF::String searchMenuRecentSearchesText();
+ virtual WTF::String searchMenuClearRecentSearchesText();
+ virtual WTF::String AXWebAreaText();
+ virtual WTF::String AXLinkText();
+ virtual WTF::String AXListMarkerText();
+ virtual WTF::String AXImageMapText();
+ virtual WTF::String AXHeadingText();
+ virtual WTF::String AXDefinitionListTermText();
+ virtual WTF::String AXDefinitionListDefinitionText();
+ virtual WTF::String AXARIAContentGroupText(const WTF::String& ariaType);
+ virtual WTF::String AXButtonActionVerb();
+ virtual WTF::String AXRadioButtonActionVerb();
+ virtual WTF::String AXTextFieldActionVerb();
+ virtual WTF::String AXCheckedCheckBoxActionVerb();
+ virtual WTF::String AXUncheckedCheckBoxActionVerb();
+ virtual WTF::String AXMenuListActionVerb();
+ virtual WTF::String AXMenuListPopupActionVerb();
+ virtual WTF::String AXLinkActionVerb();
+ virtual WTF::String missingPluginText();
+ virtual WTF::String crashedPluginText();
+ virtual WTF::String multipleFileUploadText(unsigned numberOfFiles);
+ virtual WTF::String unknownFileSizeText();
+ virtual WTF::String imageTitle(const WTF::String& filename, const WebCore::IntSize& size);
+ virtual WTF::String mediaElementLoadingStateText();
+ virtual WTF::String mediaElementLiveBroadcastStateText();
+ virtual WTF::String localizedMediaControlElementString(const WTF::String&);
+ virtual WTF::String localizedMediaControlElementHelpText(const WTF::String&);
+ virtual WTF::String localizedMediaTimeDescription(float);
+ virtual WTF::String validationMessageValueMissingText();
+ virtual WTF::String validationMessageTypeMismatchText();
+ virtual WTF::String validationMessagePatternMismatchText();
+ virtual WTF::String validationMessageTooLongText();
+ virtual WTF::String validationMessageRangeUnderflowText();
+ virtual WTF::String validationMessageRangeOverflowText();
+ virtual WTF::String validationMessageStepMismatchText();
+
+ // WebCore::VisitedLinkStrategy
+ virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash);
+ virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash);
+};
+
+#endif // WebPlatformStrategies_h
diff --git a/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm b/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm
new file mode 100644
index 0000000..f95594a
--- /dev/null
+++ b/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm
@@ -0,0 +1,837 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "WebPlatformStrategies.h"
+
+#import "WebLocalizableStrings.h"
+#import "WebPluginDatabase.h"
+#import "WebPluginPackage.h"
+#import <WebCore/BlockExceptions.h>
+#import <WebCore/IntSize.h>
+#import <WebCore/Page.h>
+#import <WebCore/PageGroup.h>
+#import <wtf/StdLibExtras.h>
+
+#ifdef BUILDING_ON_TIGER
+typedef unsigned NSUInteger;
+#endif
+
+using namespace WebCore;
+
+void WebPlatformStrategies::initialize()
+{
+ DEFINE_STATIC_LOCAL(WebPlatformStrategies, platformStrategies, ());
+ setPlatformStrategies(&platformStrategies);
+}
+
+WebPlatformStrategies::WebPlatformStrategies()
+{
+}
+
+// PluginStrategy
+
+PluginStrategy* WebPlatformStrategies::createPluginStrategy()
+{
+ return this;
+}
+
+LocalizationStrategy* WebPlatformStrategies::createLocalizationStrategy()
+{
+ return this;
+}
+
+VisitedLinkStrategy* WebPlatformStrategies::createVisitedLinkStrategy()
+{
+ return this;
+}
+
+void WebPlatformStrategies::refreshPlugins()
+{
+ [[WebPluginDatabase sharedDatabase] refresh];
+}
+
+void WebPlatformStrategies::getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>& plugins)
+{
+ BEGIN_BLOCK_OBJC_EXCEPTIONS;
+
+ NSArray* pluginsArray = [[WebPluginDatabase sharedDatabase] plugins];
+ for (unsigned int i = 0; i < [pluginsArray count]; ++i) {
+ WebPluginPackage *plugin = [pluginsArray objectAtIndex:i];
+
+ plugins.append([plugin pluginInfo]);
+ }
+
+ END_BLOCK_OBJC_EXCEPTIONS;
+}
+
+// LocalizationStrategy
+
+String WebPlatformStrategies::inputElementAltText()
+{
+ return UI_STRING_KEY("Submit", "Submit (input element)", "alt text for <input> elements with no alt, title, or value");
+}
+
+String WebPlatformStrategies::resetButtonDefaultLabel()
+{
+ return UI_STRING("Reset", "default label for Reset buttons in forms on web pages");
+}
+
+String WebPlatformStrategies::searchableIndexIntroduction()
+{
+ return UI_STRING("This is a searchable index. Enter search keywords: ",
+ "text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index'");
+}
+
+String WebPlatformStrategies::submitButtonDefaultLabel()
+{
+ return UI_STRING("Submit", "default label for Submit buttons in forms on web pages");
+}
+
+String WebPlatformStrategies::fileButtonChooseFileLabel()
+{
+ return UI_STRING("Choose File", "title for file button used in HTML forms");
+}
+
+String WebPlatformStrategies::fileButtonNoFileSelectedLabel()
+{
+ return UI_STRING("no file selected", "text to display in file button used in HTML forms when no file is selected");
+}
+
+String WebPlatformStrategies::copyImageUnknownFileLabel()
+{
+ return UI_STRING("unknown", "Unknown filename");
+}
+
+#if ENABLE(CONTEXT_MENUS)
+
+String WebPlatformStrategies::contextMenuItemTagOpenLinkInNewWindow()
+{
+ return UI_STRING("Open Link in New Window", "Open in New Window context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagDownloadLinkToDisk()
+{
+ return UI_STRING("Download Linked File", "Download Linked File context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagCopyLinkToClipboard()
+{
+ return UI_STRING("Copy Link", "Copy Link context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagOpenImageInNewWindow()
+{
+ return UI_STRING("Open Image in New Window", "Open Image in New Window context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagDownloadImageToDisk()
+{
+ return UI_STRING("Download Image", "Download Image context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagCopyImageToClipboard()
+{
+ return UI_STRING("Copy Image", "Copy Image context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagOpenVideoInNewWindow()
+{
+ return UI_STRING("Open Video in New Window", "Open Video in New Window context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagOpenAudioInNewWindow()
+{
+ return UI_STRING("Open Audio in New Window", "Open Audio in New Window context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagCopyVideoLinkToClipboard()
+{
+ return UI_STRING("Copy Video Address", "Copy Video Address Location context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagCopyAudioLinkToClipboard()
+{
+ return UI_STRING("Copy Audio Address", "Copy Audio Address Location context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagToggleMediaControls()
+{
+ return UI_STRING("Controls", "Media Controls context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagToggleMediaLoop()
+{
+ return UI_STRING("Loop", "Media Loop context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagEnterVideoFullscreen()
+{
+ return UI_STRING("Enter Fullscreen", "Video Enter Fullscreen context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagMediaPlay()
+{
+ return UI_STRING("Play", "Media Play context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagMediaPause()
+{
+ return UI_STRING("Pause", "Media Pause context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagMediaMute()
+{
+ return UI_STRING("Mute", "Media Mute context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagOpenFrameInNewWindow()
+{
+ return UI_STRING("Open Frame in New Window", "Open Frame in New Window context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagCopy()
+{
+ return UI_STRING("Copy", "Copy context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagGoBack()
+{
+ return UI_STRING("Back", "Back context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagGoForward()
+{
+ return UI_STRING("Forward", "Forward context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagStop()
+{
+ return UI_STRING("Stop", "Stop context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagReload()
+{
+ return UI_STRING("Reload", "Reload context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagCut()
+{
+ return UI_STRING("Cut", "Cut context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagPaste()
+{
+ return UI_STRING("Paste", "Paste context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagNoGuessesFound()
+{
+ return UI_STRING("No Guesses Found", "No Guesses Found context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagIgnoreSpelling()
+{
+ return UI_STRING("Ignore Spelling", "Ignore Spelling context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagLearnSpelling()
+{
+ return UI_STRING("Learn Spelling", "Learn Spelling context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagSearchWeb()
+{
+ return UI_STRING("Search in Google", "Search in Google context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagLookUpInDictionary()
+{
+ return UI_STRING("Look Up in Dictionary", "Look Up in Dictionary context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagOpenLink()
+{
+ return UI_STRING("Open Link", "Open Link context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagIgnoreGrammar()
+{
+ return UI_STRING("Ignore Grammar", "Ignore Grammar context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagSpellingMenu()
+{
+#ifndef BUILDING_ON_TIGER
+ return UI_STRING("Spelling and Grammar", "Spelling and Grammar context sub-menu item");
+#else
+ return UI_STRING("Spelling", "Spelling context sub-menu item");
+#endif
+}
+
+String WebPlatformStrategies::contextMenuItemTagShowSpellingPanel(bool show)
+{
+#ifndef BUILDING_ON_TIGER
+ if (show)
+ return UI_STRING("Show Spelling and Grammar", "menu item title");
+ return UI_STRING("Hide Spelling and Grammar", "menu item title");
+#else
+ return UI_STRING("Spelling...", "menu item title");
+#endif
+}
+
+String WebPlatformStrategies::contextMenuItemTagCheckSpelling()
+{
+#ifndef BUILDING_ON_TIGER
+ return UI_STRING("Check Document Now", "Check spelling context menu item");
+#else
+ return UI_STRING("Check Spelling", "Check spelling context menu item");
+#endif
+}
+
+String WebPlatformStrategies::contextMenuItemTagCheckSpellingWhileTyping()
+{
+#ifndef BUILDING_ON_TIGER
+ return UI_STRING("Check Spelling While Typing", "Check spelling while typing context menu item");
+#else
+ return UI_STRING("Check Spelling as You Type", "Check spelling while typing context menu item");
+#endif
+}
+
+String WebPlatformStrategies::contextMenuItemTagCheckGrammarWithSpelling()
+{
+ return UI_STRING("Check Grammar With Spelling", "Check grammar with spelling context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagFontMenu()
+{
+ return UI_STRING("Font", "Font context sub-menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagBold()
+{
+ return UI_STRING("Bold", "Bold context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagItalic()
+{
+ return UI_STRING("Italic", "Italic context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagUnderline()
+{
+ return UI_STRING("Underline", "Underline context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagOutline()
+{
+ return UI_STRING("Outline", "Outline context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagWritingDirectionMenu()
+{
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+ return UI_STRING("Paragraph Direction", "Paragraph direction context sub-menu item");
+#else
+ return UI_STRING("Writing Direction", "Writing direction context sub-menu item");
+#endif
+}
+
+String WebPlatformStrategies::contextMenuItemTagTextDirectionMenu()
+{
+ return UI_STRING("Selection Direction", "Selection direction context sub-menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagDefaultDirection()
+{
+ return UI_STRING("Default", "Default writing direction context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagLeftToRight()
+{
+ return UI_STRING("Left to Right", "Left to Right context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagRightToLeft()
+{
+ return UI_STRING("Right to Left", "Right to Left context menu item");
+}
+
+#if PLATFORM(MAC)
+
+String WebPlatformStrategies::contextMenuItemTagSearchInSpotlight()
+{
+ return UI_STRING("Search in Spotlight", "Search in Spotlight context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagShowFonts()
+{
+ return UI_STRING("Show Fonts", "Show fonts context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagStyles()
+{
+ return UI_STRING("Styles...", "Styles context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagShowColors()
+{
+ return UI_STRING("Show Colors", "Show colors context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagSpeechMenu()
+{
+ return UI_STRING("Speech", "Speech context sub-menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagStartSpeaking()
+{
+ return UI_STRING("Start Speaking", "Start speaking context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagStopSpeaking()
+{
+ return UI_STRING("Stop Speaking", "Stop speaking context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagCorrectSpellingAutomatically()
+{
+ return UI_STRING("Correct Spelling Automatically", "Correct Spelling Automatically context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagSubstitutionsMenu()
+{
+ return UI_STRING("Substitutions", "Substitutions context sub-menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagShowSubstitutions(bool show)
+{
+ if (show)
+ return UI_STRING("Show Substitutions", "menu item title");
+ return UI_STRING("Hide Substitutions", "menu item title");
+}
+
+String WebPlatformStrategies::contextMenuItemTagSmartCopyPaste()
+{
+ return UI_STRING("Smart Copy/Paste", "Smart Copy/Paste context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagSmartQuotes()
+{
+ return UI_STRING("Smart Quotes", "Smart Quotes context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagSmartDashes()
+{
+ return UI_STRING("Smart Dashes", "Smart Dashes context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagSmartLinks()
+{
+ return UI_STRING("Smart Links", "Smart Links context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagTextReplacement()
+{
+ return UI_STRING("Text Replacement", "Text Replacement context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagTransformationsMenu()
+{
+ return UI_STRING("Transformations", "Transformations context sub-menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagMakeUpperCase()
+{
+ return UI_STRING("Make Upper Case", "Make Upper Case context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagMakeLowerCase()
+{
+ return UI_STRING("Make Lower Case", "Make Lower Case context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagCapitalize()
+{
+ return UI_STRING("Capitalize", "Capitalize context menu item");
+}
+
+String WebPlatformStrategies::contextMenuItemTagChangeBack(const String& replacedString)
+{
+ static NSString *formatString = nil;
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+ static bool lookedUpString = false;
+ if (!lookedUpString) {
+ formatString = [[[NSBundle bundleForClass:[NSSpellChecker class]] localizedStringForKey:@"Change Back to \\U201C%@\\U201D" value:nil table:@"MenuCommands"] retain];
+ lookedUpString = true;
+ }
+#endif
+ if (!formatString)
+ return replacedString;
+ return [NSString stringWithFormat:formatString, (NSString *)replacedString];
+}
+
+#endif
+
+String WebPlatformStrategies::contextMenuItemTagInspectElement()
+{
+ return UI_STRING("Inspect Element", "Inspect Element context menu item");
+}
+
+#endif // ENABLE(CONTEXT_MENUS)
+
+String WebPlatformStrategies::searchMenuNoRecentSearchesText()
+{
+ return UI_STRING("No recent searches", "Label for only item in menu that appears when clicking on the search field image, when no searches have been performed");
+}
+
+String WebPlatformStrategies::searchMenuRecentSearchesText()
+{
+ return UI_STRING("Recent Searches", "label for first item in the menu that appears when clicking on the search field image, used as embedded menu title");
+}
+
+String WebPlatformStrategies::searchMenuClearRecentSearchesText()
+{
+ return UI_STRING("Clear Recent Searches", "menu item in Recent Searches menu that empties menu's contents");
+}
+
+String WebPlatformStrategies::AXWebAreaText()
+{
+ return UI_STRING("HTML content", "accessibility role description for web area");
+}
+
+String WebPlatformStrategies::AXLinkText()
+{
+ return UI_STRING("link", "accessibility role description for link");
+}
+
+String WebPlatformStrategies::AXListMarkerText()
+{
+ return UI_STRING("list marker", "accessibility role description for list marker");
+}
+
+String WebPlatformStrategies::AXImageMapText()
+{
+ return UI_STRING("image map", "accessibility role description for image map");
+}
+
+String WebPlatformStrategies::AXHeadingText()
+{
+ return UI_STRING("heading", "accessibility role description for headings");
+}
+
+String WebPlatformStrategies::AXDefinitionListTermText()
+{
+ return UI_STRING("term", "term word of a definition");
+}
+
+String WebPlatformStrategies::AXDefinitionListDefinitionText()
+{
+ return UI_STRING("definition", "definition phrase");
+}
+
+String WebPlatformStrategies::AXARIAContentGroupText(const String& ariaType)
+{
+ if (ariaType == "ARIAApplicationAlert")
+ return UI_STRING("alert", "An ARIA accessibility group that acts as an alert.");
+ if (ariaType == "ARIAApplicationAlertDialog")
+ return UI_STRING("alert dialog", "An ARIA accessibility group that acts as an alert dialog.");
+ if (ariaType == "ARIAApplicationDialog")
+ return UI_STRING("dialog", "An ARIA accessibility group that acts as an dialog.");
+ if (ariaType == "ARIAApplicationLog")
+ return UI_STRING("log", "An ARIA accessibility group that acts as a console log.");
+ if (ariaType == "ARIAApplicationMarquee")
+ return UI_STRING("marquee", "An ARIA accessibility group that acts as a marquee.");
+ if (ariaType == "ARIAApplicationStatus")
+ return UI_STRING("application status", "An ARIA accessibility group that acts as a status update.");
+ if (ariaType == "ARIAApplicationTimer")
+ return UI_STRING("timer", "An ARIA accessibility group that acts as an updating timer.");
+ if (ariaType == "ARIADocument")
+ return UI_STRING("document", "An ARIA accessibility group that acts as a document.");
+ if (ariaType == "ARIADocumentArticle")
+ return UI_STRING("article", "An ARIA accessibility group that acts as an article.");
+ if (ariaType == "ARIADocumentNote")
+ return UI_STRING("note", "An ARIA accessibility group that acts as a note in a document.");
+ if (ariaType == "ARIADocumentRegion")
+ return UI_STRING("region", "An ARIA accessibility group that acts as a distinct region in a document.");
+ if (ariaType == "ARIALandmarkApplication")
+ return UI_STRING("application", "An ARIA accessibility group that acts as an application.");
+ if (ariaType == "ARIALandmarkBanner")
+ return UI_STRING("banner", "An ARIA accessibility group that acts as a banner.");
+ if (ariaType == "ARIALandmarkComplementary")
+ return UI_STRING("complementary", "An ARIA accessibility group that acts as a region of complementary information.");
+ if (ariaType == "ARIALandmarkContentInfo")
+ return UI_STRING("content", "An ARIA accessibility group that contains content.");
+ if (ariaType == "ARIALandmarkMain")
+ return UI_STRING("main", "An ARIA accessibility group that is the main portion of the website.");
+ if (ariaType == "ARIALandmarkNavigation")
+ return UI_STRING("navigation", "An ARIA accessibility group that contains the main navigation elements of a website.");
+ if (ariaType == "ARIALandmarkSearch")
+ return UI_STRING("search", "An ARIA accessibility group that contains a search feature of a website.");
+ if (ariaType == "ARIAUserInterfaceTooltip")
+ return UI_STRING("tooltip", "An ARIA accessibility group that acts as a tooltip.");
+ if (ariaType == "ARIATabPanel")
+ return UI_STRING("tab panel", "An ARIA accessibility group that contains the content of a tab.");
+ if (ariaType == "ARIADocumentMath")
+ return UI_STRING("math", "An ARIA accessibility group that contains mathematical symbols.");
+ return String();
+}
+
+String WebPlatformStrategies::AXButtonActionVerb()
+{
+ return UI_STRING("press", "Verb stating the action that will occur when a button is pressed, as used by accessibility");
+}
+
+String WebPlatformStrategies::AXRadioButtonActionVerb()
+{
+ return UI_STRING("select", "Verb stating the action that will occur when a radio button is clicked, as used by accessibility");
+}
+
+String WebPlatformStrategies::AXTextFieldActionVerb()
+{
+ return UI_STRING("activate", "Verb stating the action that will occur when a text field is selected, as used by accessibility");
+}
+
+String WebPlatformStrategies::AXCheckedCheckBoxActionVerb()
+{
+ return UI_STRING("uncheck", "Verb stating the action that will occur when a checked checkbox is clicked, as used by accessibility");
+}
+
+String WebPlatformStrategies::AXUncheckedCheckBoxActionVerb()
+{
+ return UI_STRING("check", "Verb stating the action that will occur when an unchecked checkbox is clicked, as used by accessibility");
+}
+
+String WebPlatformStrategies::AXMenuListActionVerb()
+{
+ return String();
+}
+
+String WebPlatformStrategies::AXMenuListPopupActionVerb()
+{
+ return String();
+}
+
+String WebPlatformStrategies::AXLinkActionVerb()
+{
+ return UI_STRING("jump", "Verb stating the action that will occur when a link is clicked, as used by accessibility");
+}
+
+String WebPlatformStrategies::missingPluginText()
+{
+ return UI_STRING("Missing Plug-in", "Label text to be used when a plugin is missing");
+}
+
+String WebPlatformStrategies::crashedPluginText()
+{
+ return UI_STRING("Plug-in Failure", "Label text to be used if plugin host process has crashed");
+}
+
+String WebPlatformStrategies::multipleFileUploadText(unsigned numberOfFiles)
+{
+ return [NSString stringWithFormat:UI_STRING("%d files", "Label to describe the number of files selected in a file upload control that allows multiple files"), numberOfFiles];
+}
+
+String WebPlatformStrategies::unknownFileSizeText()
+{
+ return UI_STRING("Unknown", "Unknown filesize FTP directory listing item");
+}
+
+String WebPlatformStrategies::imageTitle(const String& filename, const IntSize& size)
+{
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+ NSString *widthString = [NSNumberFormatter localizedStringFromNumber:[NSNumber numberWithInt:size.width()] numberStyle:NSNumberFormatterDecimalStyle];
+ NSString *heightString = [NSNumberFormatter localizedStringFromNumber:[NSNumber numberWithInt:size.height()] numberStyle:NSNumberFormatterDecimalStyle];
+ return [NSString localizedStringWithFormat:UI_STRING("%@ %@×%@ pixels", "window title for a standalone image (uses multiplication symbol, not x)"), (NSString *)filename, widthString, heightString];
+#else
+ return [NSString stringWithFormat:UI_STRING("%@ %d×%d pixels", "window title for a standalone image (uses multiplication symbol, not x)"), (NSString *)filename, size.width(), size.height()];
+#endif
+}
+
+String WebPlatformStrategies::mediaElementLoadingStateText()
+{
+ return UI_STRING("Loading...", "Media controller status message when the media is loading");
+}
+
+String WebPlatformStrategies::mediaElementLiveBroadcastStateText()
+{
+ return UI_STRING("Live Broadcast", "Media controller status message when watching a live broadcast");
+}
+
+String WebPlatformStrategies::localizedMediaControlElementString(const String& name)
+{
+ if (name == "AudioElement")
+ return UI_STRING("audio element controller", "accessibility role description for audio element controller");
+ if (name == "VideoElement")
+ return UI_STRING("video element controller", "accessibility role description for video element controller");
+ if (name == "MuteButton")
+ return UI_STRING("mute", "accessibility role description for mute button");
+ if (name == "UnMuteButton")
+ return UI_STRING("unmute", "accessibility role description for turn mute off button");
+ if (name == "PlayButton")
+ return UI_STRING("play", "accessibility role description for play button");
+ if (name == "PauseButton")
+ return UI_STRING("pause", "accessibility role description for pause button");
+ if (name == "Slider")
+ return UI_STRING("movie time", "accessibility role description for timeline slider");
+ if (name == "SliderThumb")
+ return UI_STRING("timeline slider thumb", "accessibility role description for timeline thumb");
+ if (name == "RewindButton")
+ return UI_STRING("back 30 seconds", "accessibility role description for seek back 30 seconds button");
+ if (name == "ReturnToRealtimeButton")
+ return UI_STRING("return to realtime", "accessibility role description for return to real time button");
+ if (name == "CurrentTimeDisplay")
+ return UI_STRING("elapsed time", "accessibility role description for elapsed time display");
+ if (name == "TimeRemainingDisplay")
+ return UI_STRING("remaining time", "accessibility role description for time remaining display");
+ if (name == "StatusDisplay")
+ return UI_STRING("status", "accessibility role description for movie status");
+ if (name == "FullscreenButton")
+ return UI_STRING("fullscreen", "accessibility role description for enter fullscreen button");
+ if (name == "SeekForwardButton")
+ return UI_STRING("fast forward", "accessibility role description for fast forward button");
+ if (name == "SeekBackButton")
+ return UI_STRING("fast reverse", "accessibility role description for fast reverse button");
+ if (name == "ShowClosedCaptionsButton")
+ return UI_STRING("show closed captions", "accessibility role description for show closed captions button");
+ if (name == "HideClosedCaptionsButton")
+ return UI_STRING("hide closed captions", "accessibility role description for hide closed captions button");
+
+ // FIXME: the ControlsPanel container should never be visible in the accessibility hierarchy.
+ if (name == "ControlsPanel")
+ return String();
+
+ ASSERT_NOT_REACHED();
+ return String();
+}
+
+String WebPlatformStrategies::localizedMediaControlElementHelpText(const String& name)
+{
+ if (name == "AudioElement")
+ return UI_STRING("audio element playback controls and status display", "accessibility role description for audio element controller");
+ if (name == "VideoElement")
+ return UI_STRING("video element playback controls and status display", "accessibility role description for video element controller");
+ if (name == "MuteButton")
+ return UI_STRING("mute audio tracks", "accessibility help text for mute button");
+ if (name == "UnMuteButton")
+ return UI_STRING("unmute audio tracks", "accessibility help text for un mute button");
+ if (name == "PlayButton")
+ return UI_STRING("begin playback", "accessibility help text for play button");
+ if (name == "PauseButton")
+ return UI_STRING("pause playback", "accessibility help text for pause button");
+ if (name == "Slider")
+ return UI_STRING("movie time scrubber", "accessibility help text for timeline slider");
+ if (name == "SliderThumb")
+ return UI_STRING("movie time scrubber thumb", "accessibility help text for timeline slider thumb");
+ if (name == "RewindButton")
+ return UI_STRING("seek movie back 30 seconds", "accessibility help text for jump back 30 seconds button");
+ if (name == "ReturnToRealtimeButton")
+ return UI_STRING("return streaming movie to real time", "accessibility help text for return streaming movie to real time button");
+ if (name == "CurrentTimeDisplay")
+ return UI_STRING("current movie time in seconds", "accessibility help text for elapsed time display");
+ if (name == "TimeRemainingDisplay")
+ return UI_STRING("number of seconds of movie remaining", "accessibility help text for remaining time display");
+ if (name == "StatusDisplay")
+ return UI_STRING("current movie status", "accessibility help text for movie status display");
+ if (name == "SeekBackButton")
+ return UI_STRING("seek quickly back", "accessibility help text for fast rewind button");
+ if (name == "SeekForwardButton")
+ return UI_STRING("seek quickly forward", "accessibility help text for fast forward button");
+ if (name == "FullscreenButton")
+ return UI_STRING("Play movie in fullscreen mode", "accessibility help text for enter fullscreen button");
+ if (name == "ShowClosedCaptionsButton")
+ return UI_STRING("start displaying closed captions", "accessibility help text for show closed captions button");
+ if (name == "HideClosedCaptionsButton")
+ return UI_STRING("stop displaying closed captions", "accessibility help text for hide closed captions button");
+
+ ASSERT_NOT_REACHED();
+ return String();
+}
+
+String WebPlatformStrategies::localizedMediaTimeDescription(float time)
+{
+ if (!isfinite(time))
+ return UI_STRING("indefinite time", "accessibility help text for an indefinite media controller time value");
+
+ int seconds = (int)fabsf(time);
+ int days = seconds / (60 * 60 * 24);
+ int hours = seconds / (60 * 60);
+ int minutes = (seconds / 60) % 60;
+ seconds %= 60;
+
+ if (days)
+ return [NSString stringWithFormat:UI_STRING("%1$d days %2$d hours %3$d minutes %4$d seconds", "accessibility help text for media controller time value >= 1 day"), days, hours, minutes, seconds];
+ else if (hours)
+ return [NSString stringWithFormat:UI_STRING("%1$d hours %2$d minutes %3$d seconds", "accessibility help text for media controller time value >= 60 minutes"), hours, minutes, seconds];
+ else if (minutes)
+ return [NSString stringWithFormat:UI_STRING("%1$d minutes %2$d seconds", "accessibility help text for media controller time value >= 60 seconds"), minutes, seconds];
+
+ return [NSString stringWithFormat:UI_STRING("%1$d seconds", "accessibility help text for media controller time value < 60 seconds"), seconds];
+}
+
+String WebPlatformStrategies::validationMessageValueMissingText()
+{
+ return UI_STRING("value missing", "Validation message for required form control elements that have no value");
+}
+
+String WebPlatformStrategies::validationMessageTypeMismatchText()
+{
+ return UI_STRING("type mismatch", "Validation message for input form controls with a value not matching type");
+}
+
+String WebPlatformStrategies::validationMessagePatternMismatchText()
+{
+ return UI_STRING("pattern mismatch", "Validation message for input form controls requiring a constrained value according to pattern");
+}
+
+String WebPlatformStrategies::validationMessageTooLongText()
+{
+ return UI_STRING("too long", "Validation message for form control elements with a value longer than maximum allowed length");
+}
+
+String WebPlatformStrategies::validationMessageRangeUnderflowText()
+{
+ return UI_STRING("range underflow", "Validation message for input form controls with value lower than allowed minimum");
+}
+
+String WebPlatformStrategies::validationMessageRangeOverflowText()
+{
+ return UI_STRING("range overflow", "Validation message for input form controls with value higher than allowed maximum");
+}
+
+String WebPlatformStrategies::validationMessageStepMismatchText()
+{
+ return UI_STRING("step mismatch", "Validation message for input form controls with value not respecting the step attribute");
+}
+
+// VisitedLinkStrategy
+bool WebPlatformStrategies::isLinkVisited(Page* page, LinkHash hash)
+{
+ return page->group().isLinkVisited(hash);
+}
+
+void WebPlatformStrategies::addVisitedLink(Page* page, LinkHash hash)
+{
+ return page->group().addVisitedLinkHash(hash);
+}
diff --git a/WebKit/mac/WebCoreSupport/WebPluginHalterClient.h b/WebKit/mac/WebCoreSupport/WebPluginHalterClient.h
index a0d398d..ed4ff11 100644
--- a/WebKit/mac/WebCoreSupport/WebPluginHalterClient.h
+++ b/WebKit/mac/WebCoreSupport/WebPluginHalterClient.h
@@ -24,10 +24,10 @@
*/
#import <WebCore/PluginHalterClient.h>
+#import <wtf/Forward.h>
namespace WebCore {
class Node;
- class String;
}
@class WebView;
@@ -36,7 +36,7 @@ class WebPluginHalterClient : public WebCore::PluginHalterClient {
public:
WebPluginHalterClient(WebView *);
- virtual bool shouldHaltPlugin(WebCore::Node*, bool, const WebCore::String&) const;
+ virtual bool shouldHaltPlugin(WebCore::Node*, bool, const WTF::String&) const;
virtual bool enabled() const;
private:
diff --git a/WebKit/mac/Storage/WebSecurityOrigin.mm b/WebKit/mac/WebCoreSupport/WebSecurityOrigin.mm
index 56a21f5..f19dcb5 100644
--- a/WebKit/mac/Storage/WebSecurityOrigin.mm
+++ b/WebKit/mac/WebCoreSupport/WebSecurityOrigin.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -28,8 +28,11 @@
#import "WebSecurityOriginInternal.h"
-#import <WebCore/DatabaseTracker.h>
+#import "WebApplicationCacheQuotaManager.h"
+#import "WebDatabaseQuotaManager.h"
+#import "WebQuotaManager.h"
#import <WebCore/KURL.h>
+#import <WebCore/DatabaseTracker.h>
#import <WebCore/SecurityOrigin.h>
using namespace WebCore;
@@ -69,34 +72,6 @@ using namespace WebCore;
return reinterpret_cast<SecurityOrigin*>(_private)->port();
}
-- (unsigned long long)usage
-{
-#if ENABLE(DATABASE)
- return DatabaseTracker::tracker().usageForOrigin(reinterpret_cast<SecurityOrigin*>(_private));
-#else
- return 0;
-#endif
-}
-
-- (unsigned long long)quota
-{
-#if ENABLE(DATABASE)
- return DatabaseTracker::tracker().quotaForOrigin(reinterpret_cast<SecurityOrigin*>(_private));
-#else
- return 0;
-#endif
-}
-
-// Sets the storage quota (in bytes)
-// If the quota is set to a value lower than the current usage, that quota will "stick" but no data will be purged to meet the new quota.
-// This will simply prevent new data from being added to databases in that origin
-- (void)setQuota:(unsigned long long)quota
-{
-#if ENABLE(DATABASE)
- DatabaseTracker::tracker().setQuota(reinterpret_cast<SecurityOrigin*>(_private), quota);
-#endif
-}
-
- (BOOL)isEqual:(id)anObject
{
if (![anObject isMemberOfClass:[WebSecurityOrigin class]]) {
@@ -110,6 +85,10 @@ using namespace WebCore;
{
if (_private)
reinterpret_cast<SecurityOrigin*>(_private)->deref();
+ if (_applicationCacheQuotaManager)
+ [(NSObject *)_applicationCacheQuotaManager release];
+ if (_databaseQuotaManager)
+ [(NSObject *)_databaseQuotaManager release];
[super dealloc];
}
@@ -143,3 +122,62 @@ using namespace WebCore;
}
@end
+
+
+#pragma mark -
+#pragma mark WebQuotaManagers
+
+@implementation WebSecurityOrigin (WebQuotaManagers)
+
+- (id<WebQuotaManager>)applicationCacheQuotaManager
+{
+ if (!_applicationCacheQuotaManager)
+ _applicationCacheQuotaManager = [[WebApplicationCacheQuotaManager alloc] initWithOrigin:self];
+ return _applicationCacheQuotaManager;
+}
+
+- (id<WebQuotaManager>)databaseQuotaManager
+{
+ if (!_databaseQuotaManager)
+ _databaseQuotaManager = [[WebDatabaseQuotaManager alloc] initWithOrigin:self];
+ return _databaseQuotaManager;
+}
+
+@end
+
+
+#pragma mark -
+#pragma mark Deprecated
+
+// FIXME: The following methods are deprecated and should removed later.
+// Clients should instead get a WebQuotaManager, and query / set the quota via the Manager.
+// NOTE: the <WebCore/DatabaseTracker.h> #include should be removed as well.
+
+@implementation WebSecurityOrigin (Deprecated)
+
+- (unsigned long long)usage
+{
+#if ENABLE(DATABASE)
+ return DatabaseTracker::tracker().usageForOrigin(reinterpret_cast<SecurityOrigin*>(_private));
+#else
+ return 0;
+#endif
+}
+
+- (unsigned long long)quota
+{
+#if ENABLE(DATABASE)
+ return DatabaseTracker::tracker().quotaForOrigin(reinterpret_cast<SecurityOrigin*>(_private));
+#else
+ return 0;
+#endif
+}
+
+- (void)setQuota:(unsigned long long)quota
+{
+#if ENABLE(DATABASE)
+ DatabaseTracker::tracker().setQuota(reinterpret_cast<SecurityOrigin*>(_private), quota);
+#endif
+}
+
+@end
diff --git a/WebKit/mac/Storage/WebSecurityOriginInternal.h b/WebKit/mac/WebCoreSupport/WebSecurityOriginInternal.h
index 7bd6817..7bd6817 100644
--- a/WebKit/mac/Storage/WebSecurityOriginInternal.h
+++ b/WebKit/mac/WebCoreSupport/WebSecurityOriginInternal.h
diff --git a/WebKit/mac/Storage/WebSecurityOriginPrivate.h b/WebKit/mac/WebCoreSupport/WebSecurityOriginPrivate.h
index c7836f8..2973d92 100644
--- a/WebKit/mac/Storage/WebSecurityOriginPrivate.h
+++ b/WebKit/mac/WebCoreSupport/WebSecurityOriginPrivate.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -27,9 +27,12 @@
*/
@class WebSecurityOriginPrivate;
+@protocol WebQuotaManager;
@interface WebSecurityOrigin : NSObject {
WebSecurityOriginPrivate *_private;
+ id<WebQuotaManager> _applicationCacheQuotaManager;
+ id<WebQuotaManager> _databaseQuotaManager;
}
- (id)initWithURL:(NSURL *)url;
@@ -37,17 +40,20 @@
- (NSString*)protocol;
- (NSString*)host;
-// Returns zero if the port is the default port for the protocol, non-zero otherwise
+// Returns zero if the port is the default port for the protocol, non-zero otherwise.
- (unsigned short)port;
-// Returns the current total usage of all databases in this security origin in bytes
-- (unsigned long long)usage;
+@end
+
+@interface WebSecurityOrigin (WebQuotaManagers)
+- (id<WebQuotaManager>)applicationCacheQuotaManager;
+- (id<WebQuotaManager>)databaseQuotaManager;
+@end
+// FIXME: The following methods are deprecated and should removed later.
+// Clients should instead get a WebQuotaManager, and query / set the quota via the Manager.
+@interface WebSecurityOrigin (Deprecated)
+- (unsigned long long)usage;
- (unsigned long long)quota;
-// Sets the storage quota (in bytes)
-// If the quota is set to a value lower than the current usage, that quota will "stick" but no data will be purged to meet the new quota.
-// This will simply prevent new data from being added to databases in that origin
- (void)setQuota:(unsigned long long)quota;
-
-
@end
diff --git a/WebKit/mac/WebCoreSupport/WebSystemInterface.h b/WebKit/mac/WebCoreSupport/WebSystemInterface.h
index 6e20279..d460217 100644
--- a/WebKit/mac/WebCoreSupport/WebSystemInterface.h
+++ b/WebKit/mac/WebCoreSupport/WebSystemInterface.h
@@ -26,12 +26,4 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void InitWebCoreSystemInterface(void);
-
-#ifdef __cplusplus
-}
-#endif
+void InitWebCoreSystemInterface();
diff --git a/WebKit/mac/WebCoreSupport/WebSystemInterface.m b/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
index 7f4effd..df3ea4d 100644
--- a/WebKit/mac/WebCoreSupport/WebSystemInterface.m
+++ b/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
@@ -1,5 +1,5 @@
/*
- * Copyright 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -28,12 +28,12 @@
#import "WebSystemInterface.h"
-#import <WebCore/WebCoreSystemInterface.h>
-#import <WebKitSystemInterface.h>
-
// Needed for builds not using PCH to expose BUILDING_ macros, see bug 32753.
#include <wtf/Platform.h>
+#import <WebCore/WebCoreSystemInterface.h>
+#import <WebKitSystemInterface.h>
+
#define INIT(function) wk##function = WK##function
void InitWebCoreSystemInterface(void)
@@ -44,7 +44,9 @@ void InitWebCoreSystemInterface(void)
INIT(AdvanceDefaultButtonPulseAnimation);
INIT(CGContextGetShouldSmoothFonts);
+ INIT(CopyCFLocalizationPreferredName);
INIT(CopyCONNECTProxyResponse);
+ INIT(CopyNSURLResponseStatusLine);
INIT(CreateCustomCFReadStream);
INIT(CreateNSURLConnectionDelegateProxy);
INIT(DrawCapsLockIndicator);
@@ -71,6 +73,7 @@ void InitWebCoreSystemInterface(void)
INIT(SetCGFontRenderingMode);
INIT(SetCONNECTProxyAuthorizationForStream);
INIT(SetCONNECTProxyForStream);
+ INIT(SetCookieStoragePrivateBrowsingEnabled);
INIT(SetDragImage);
INIT(SetNSURLConnectionDefersCallbacks);
INIT(SetNSURLRequestShouldContentSniff);
@@ -83,12 +86,14 @@ void InitWebCoreSystemInterface(void)
INIT(SignalCFReadStreamHasBytes);
INIT(QTIncludeOnlyModernMediaFileTypes);
INIT(QTMovieDataRate);
+ INIT(QTMovieDisableComponent);
INIT(QTMovieMaxTimeLoaded);
INIT(QTMovieMaxTimeLoadedChangeNotification);
INIT(QTMovieMaxTimeSeekable);
INIT(QTMovieGetType);
INIT(QTMovieHasClosedCaptions);
INIT(QTMovieSetShowClosedCaptions);
+ INIT(QTMovieSelectPreferredAlternates);
INIT(QTMovieViewSetDrawSynchronously);
#ifndef BUILDING_ON_TIGER
@@ -109,8 +114,8 @@ void InitWebCoreSystemInterface(void)
INIT(SupportsMultipartXMixedReplace);
#endif
-#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
- INIT(NoteOpenPanelFiles);
+#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)
+ INIT(GetHyphenationLocationBeforeIndex);
#endif
didInit = true;
diff --git a/WebKit/mac/WebCoreSupport/WebViewFactory.mm b/WebKit/mac/WebCoreSupport/WebViewFactory.mm
index 2607f18..055e3b4 100644
--- a/WebKit/mac/WebCoreSupport/WebViewFactory.mm
+++ b/WebKit/mac/WebCoreSupport/WebViewFactory.mm
@@ -31,11 +31,9 @@
#import <WebKit/WebFrameInternal.h>
#import <WebKit/WebViewInternal.h>
#import <WebKit/WebHTMLViewInternal.h>
-#import <WebKit/WebLocalizableStrings.h>
#import <WebKit/WebNSUserDefaultsExtras.h>
#import <WebKit/WebNSObjectExtras.h>
#import <WebKit/WebNSViewExtras.h>
-#import <WebKit/WebPluginDatabase.h>
#import <WebKitSystemInterface.h>
#import <wtf/Assertions.h>
@@ -65,389 +63,6 @@
ASSERT([[self sharedFactory] isKindOfClass:self]);
}
-- (NSArray *)pluginsInfo
-{
- return [[WebPluginDatabase sharedDatabase] plugins];
-}
-
-- (void)refreshPlugins
-{
- [[WebPluginDatabase sharedDatabase] refresh];
-}
-
-- (NSString *)inputElementAltText
-{
- return UI_STRING_KEY("Submit", "Submit (input element)", "alt text for <input> elements with no alt, title, or value");
-}
-
-- (NSString *)resetButtonDefaultLabel
-{
- return UI_STRING("Reset", "default label for Reset buttons in forms on web pages");
-}
-
-- (NSString *)searchableIndexIntroduction
-{
- return UI_STRING("This is a searchable index. Enter search keywords: ",
- "text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index'");
-}
-
-- (NSString *)submitButtonDefaultLabel
-{
- return UI_STRING("Submit", "default label for Submit buttons in forms on web pages");
-}
-
-- (NSString *)fileButtonChooseFileLabel
-{
- return UI_STRING("Choose File", "title for file button used in HTML forms");
-}
-
-- (NSString *)fileButtonNoFileSelectedLabel
-{
- return UI_STRING("no file selected", "text to display in file button used in HTML forms when no file is selected");
-}
-
-- (NSString *)copyImageUnknownFileLabel
-{
- return UI_STRING("unknown", "Unknown filename");
-}
-
-- (NSString *)searchMenuNoRecentSearchesText
-{
- return UI_STRING("No recent searches", "Label for only item in menu that appears when clicking on the search field image, when no searches have been performed");
-}
-
-- (NSString *)searchMenuRecentSearchesText
-{
- return UI_STRING("Recent Searches", "label for first item in the menu that appears when clicking on the search field image, used as embedded menu title");
-}
-
-- (NSString *)searchMenuClearRecentSearchesText
-{
- return UI_STRING("Clear Recent Searches", "menu item in Recent Searches menu that empties menu's contents");
-}
-
-- (NSString *)defaultLanguageCode
-{
- return [NSUserDefaults _webkit_preferredLanguageCode];
-}
-
-- (NSString *)contextMenuItemTagOpenLinkInNewWindow
-{
- return UI_STRING("Open Link in New Window", "Open in New Window context menu item");
-}
-
-- (NSString *)contextMenuItemTagDownloadLinkToDisk
-{
- return UI_STRING("Download Linked File", "Download Linked File context menu item");
-}
-
-- (NSString *)contextMenuItemTagCopyLinkToClipboard
-{
- return UI_STRING("Copy Link", "Copy Link context menu item");
-}
-
-- (NSString *)contextMenuItemTagOpenImageInNewWindow
-{
- return UI_STRING("Open Image in New Window", "Open Image in New Window context menu item");
-}
-
-- (NSString *)contextMenuItemTagDownloadImageToDisk
-{
- return UI_STRING("Download Image", "Download Image context menu item");
-}
-
-- (NSString *)contextMenuItemTagCopyImageToClipboard
-{
- return UI_STRING("Copy Image", "Copy Image context menu item");
-}
-
-- (NSString *)contextMenuItemTagOpenFrameInNewWindow
-{
- return UI_STRING("Open Frame in New Window", "Open Frame in New Window context menu item");
-}
-
-- (NSString *)contextMenuItemTagCopy
-{
- return UI_STRING("Copy", "Copy context menu item");
-}
-
-- (NSString *)contextMenuItemTagGoBack
-{
- return UI_STRING("Back", "Back context menu item");
-}
-
-- (NSString *)contextMenuItemTagGoForward
-{
- return UI_STRING("Forward", "Forward context menu item");
-}
-
-- (NSString *)contextMenuItemTagStop
-{
- return UI_STRING("Stop", "Stop context menu item");
-}
-
-- (NSString *)contextMenuItemTagReload
-{
- return UI_STRING("Reload", "Reload context menu item");
-}
-
-- (NSString *)contextMenuItemTagCut
-{
- return UI_STRING("Cut", "Cut context menu item");
-}
-
-- (NSString *)contextMenuItemTagPaste
-{
- return UI_STRING("Paste", "Paste context menu item");
-}
-
-- (NSString *)contextMenuItemTagNoGuessesFound
-{
- return UI_STRING("No Guesses Found", "No Guesses Found context menu item");
-}
-
-- (NSString *)contextMenuItemTagIgnoreSpelling
-{
- return UI_STRING("Ignore Spelling", "Ignore Spelling context menu item");
-}
-
-- (NSString *)contextMenuItemTagLearnSpelling
-{
- return UI_STRING("Learn Spelling", "Learn Spelling context menu item");
-}
-
-- (NSString *)contextMenuItemTagSearchInSpotlight
-{
- return UI_STRING("Search in Spotlight", "Search in Spotlight context menu item");
-}
-
-- (NSString *)contextMenuItemTagSearchWeb
-{
- return UI_STRING("Search in Google", "Search in Google context menu item");
-}
-
-- (NSString *)contextMenuItemTagLookUpInDictionary
-{
- return UI_STRING("Look Up in Dictionary", "Look Up in Dictionary context menu item");
-}
-
-- (NSString *)contextMenuItemTagOpenLink
-{
- return UI_STRING("Open Link", "Open Link context menu item");
-}
-
-- (NSString *)contextMenuItemTagIgnoreGrammar
-{
- return UI_STRING("Ignore Grammar", "Ignore Grammar context menu item");
-}
-
-- (NSString *)contextMenuItemTagSpellingMenu
-{
-#ifndef BUILDING_ON_TIGER
- return UI_STRING("Spelling and Grammar", "Spelling and Grammar context sub-menu item");
-#else
- return UI_STRING("Spelling", "Spelling context sub-menu item");
-#endif
-}
-
-- (NSString *)contextMenuItemTagShowSpellingPanel:(bool)show
-{
-#ifndef BUILDING_ON_TIGER
- if (show)
- return UI_STRING("Show Spelling and Grammar", "menu item title");
- return UI_STRING("Hide Spelling and Grammar", "menu item title");
-#else
- return UI_STRING("Spelling...", "menu item title");
-#endif
-}
-
-- (NSString *)contextMenuItemTagCheckSpelling
-{
-#ifndef BUILDING_ON_TIGER
- return UI_STRING("Check Document Now", "Check spelling context menu item");
-#else
- return UI_STRING("Check Spelling", "Check spelling context menu item");
-#endif
-}
-
-- (NSString *)contextMenuItemTagCheckSpellingWhileTyping
-{
-#ifndef BUILDING_ON_TIGER
- return UI_STRING("Check Spelling While Typing", "Check spelling while typing context menu item");
-#else
- return UI_STRING("Check Spelling as You Type", "Check spelling while typing context menu item");
-#endif
-}
-
-- (NSString *)contextMenuItemTagCheckGrammarWithSpelling
-{
- return UI_STRING("Check Grammar With Spelling", "Check grammar with spelling context menu item");
-}
-
-- (NSString *)contextMenuItemTagFontMenu
-{
- return UI_STRING("Font", "Font context sub-menu item");
-}
-
-- (NSString *)contextMenuItemTagShowFonts
-{
- return UI_STRING("Show Fonts", "Show fonts context menu item");
-}
-
-- (NSString *)contextMenuItemTagBold
-{
- return UI_STRING("Bold", "Bold context menu item");
-}
-
-- (NSString *)contextMenuItemTagItalic
-{
- return UI_STRING("Italic", "Italic context menu item");
-}
-
-- (NSString *)contextMenuItemTagUnderline
-{
- return UI_STRING("Underline", "Underline context menu item");
-}
-
-- (NSString *)contextMenuItemTagOutline
-{
- return UI_STRING("Outline", "Outline context menu item");
-}
-
-- (NSString *)contextMenuItemTagStyles
-{
- return UI_STRING("Styles...", "Styles context menu item");
-}
-
-- (NSString *)contextMenuItemTagShowColors
-{
- return UI_STRING("Show Colors", "Show colors context menu item");
-}
-
-- (NSString *)contextMenuItemTagSpeechMenu
-{
- return UI_STRING("Speech", "Speech context sub-menu item");
-}
-
-- (NSString *)contextMenuItemTagStartSpeaking
-{
- return UI_STRING("Start Speaking", "Start speaking context menu item");
-}
-
-- (NSString *)contextMenuItemTagStopSpeaking
-{
- return UI_STRING("Stop Speaking", "Stop speaking context menu item");
-}
-
-- (NSString *)contextMenuItemTagWritingDirectionMenu
-{
-#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
- return UI_STRING("Paragraph Direction", "Paragraph direction context sub-menu item");
-#else
- return UI_STRING("Writing Direction", "Writing direction context sub-menu item");
-#endif
-}
-
-- (NSString *)contextMenuItemTagTextDirectionMenu
-{
- return UI_STRING("Selection Direction", "Selection direction context sub-menu item");
-}
-
-- (NSString *)contextMenuItemTagDefaultDirection
-{
- return UI_STRING("Default", "Default writing direction context menu item");
-}
-
-- (NSString *)contextMenuItemTagLeftToRight
-{
- return UI_STRING("Left to Right", "Left to Right context menu item");
-}
-
-- (NSString *)contextMenuItemTagRightToLeft
-{
- return UI_STRING("Right to Left", "Right to Left context menu item");
-}
-
-- (NSString *)contextMenuItemTagCorrectSpellingAutomatically
-{
- return UI_STRING("Correct Spelling Automatically", "Correct Spelling Automatically context menu item");
-}
-
-- (NSString *)contextMenuItemTagSubstitutionsMenu
-{
- return UI_STRING("Substitutions", "Substitutions context sub-menu item");
-}
-
-- (NSString *)contextMenuItemTagShowSubstitutions:(bool)show
-{
- if (show)
- return UI_STRING("Show Substitutions", "menu item title");
- return UI_STRING("Hide Substitutions", "menu item title");
-}
-
-- (NSString *)contextMenuItemTagSmartCopyPaste
-{
- return UI_STRING("Smart Copy/Paste", "Smart Copy/Paste context menu item");
-}
-
-- (NSString *)contextMenuItemTagSmartQuotes
-{
- return UI_STRING("Smart Quotes", "Smart Quotes context menu item");
-}
-
-- (NSString *)contextMenuItemTagSmartDashes
-{
- return UI_STRING("Smart Dashes", "Smart Dashes context menu item");
-}
-
-- (NSString *)contextMenuItemTagSmartLinks
-{
- return UI_STRING("Smart Links", "Smart Links context menu item");
-}
-
-- (NSString *)contextMenuItemTagTextReplacement
-{
- return UI_STRING("Text Replacement", "Text Replacement context menu item");
-}
-
-- (NSString *)contextMenuItemTagTransformationsMenu
-{
- return UI_STRING("Transformations", "Transformations context sub-menu item");
-}
-
-- (NSString *)contextMenuItemTagMakeUpperCase
-{
- return UI_STRING("Make Upper Case", "Make Upper Case context menu item");
-}
-
-- (NSString *)contextMenuItemTagMakeLowerCase
-{
- return UI_STRING("Make Lower Case", "Make Lower Case context menu item");
-}
-
-- (NSString *)contextMenuItemTagCapitalize
-{
- return UI_STRING("Capitalize", "Capitalize context menu item");
-}
-
-- (NSString *)contextMenuItemTagChangeBack:(NSString *)replacedString
-{
- static NSString *formatString = nil;
-#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
- static bool lookedUpString = false;
- if (!lookedUpString) {
- formatString = [[[NSBundle bundleForClass:[NSSpellChecker class]] localizedStringForKey:@"Change Back to \\U201C%@\\U201D" value:nil table:@"MenuCommands"] retain];
- lookedUpString = true;
- }
-#endif
- return formatString ? [NSString stringWithFormat:formatString, replacedString] : replacedString;
-}
-
-- (NSString *)contextMenuItemTagInspectElement
-{
- return UI_STRING("Inspect Element", "Inspect Element context menu item");
-}
-
- (BOOL)objectIsTextMarker:(id)object
{
return object != nil && CFGetTypeID(object) == WKGetAXTextMarkerTypeID();
@@ -518,298 +133,4 @@
WKUnregisterUniqueIdForElement(element);
}
-- (NSString *)AXWebAreaText
-{
- return UI_STRING("HTML content", "accessibility role description for web area");
-}
-
-- (NSString *)AXLinkText
-{
- return UI_STRING("link", "accessibility role description for link");
-}
-
-- (NSString *)AXListMarkerText
-{
- return UI_STRING("list marker", "accessibility role description for list marker");
-}
-
-- (NSString *)AXImageMapText
-{
- return UI_STRING("image map", "accessibility role description for image map");
-}
-
-- (NSString *)AXHeadingText
-{
- return UI_STRING("heading", "accessibility role description for headings");
-}
-
-- (NSString *)AXDefinitionListTermText
-{
- return UI_STRING("term", "term word of a definition");
-}
-
-- (NSString *)AXDefinitionListDefinitionText
-{
- return UI_STRING("definition", "definition phrase");
-}
-
-- (NSString *)AXARIAContentGroupText:(NSString *)ariaType
-{
- if ([ariaType isEqualToString:@"ARIAApplicationAlert"])
- return UI_STRING("alert", "An ARIA accessibility group that acts as an alert.");
- if ([ariaType isEqualToString:@"ARIAApplicationAlertDialog"])
- return UI_STRING("alert dialog", "An ARIA accessibility group that acts as an alert dialog.");
- if ([ariaType isEqualToString:@"ARIAApplicationDialog"])
- return UI_STRING("dialog", "An ARIA accessibility group that acts as an dialog.");
- if ([ariaType isEqualToString:@"ARIAApplicationLog"])
- return UI_STRING("log", "An ARIA accessibility group that acts as a console log.");
- if ([ariaType isEqualToString:@"ARIAApplicationMarquee"])
- return UI_STRING("marquee", "An ARIA accessibility group that acts as a marquee.");
- if ([ariaType isEqualToString:@"ARIAApplicationStatus"])
- return UI_STRING("application status", "An ARIA accessibility group that acts as a status update.");
- if ([ariaType isEqualToString:@"ARIAApplicationTimer"])
- return UI_STRING("timer", "An ARIA accessibility group that acts as an updating timer.");
- if ([ariaType isEqualToString:@"ARIADocument"])
- return UI_STRING("document", "An ARIA accessibility group that acts as a document.");
- if ([ariaType isEqualToString:@"ARIADocumentArticle"])
- return UI_STRING("article", "An ARIA accessibility group that acts as an article.");
- if ([ariaType isEqualToString:@"ARIADocumentNote"])
- return UI_STRING("note", "An ARIA accessibility group that acts as a note in a document.");
- if ([ariaType isEqualToString:@"ARIADocumentRegion"])
- return UI_STRING("region", "An ARIA accessibility group that acts as a distinct region in a document.");
- if ([ariaType isEqualToString:@"ARIALandmarkApplication"])
- return UI_STRING("application", "An ARIA accessibility group that acts as an application.");
- if ([ariaType isEqualToString:@"ARIALandmarkBanner"])
- return UI_STRING("banner", "An ARIA accessibility group that acts as a banner.");
- if ([ariaType isEqualToString:@"ARIALandmarkComplementary"])
- return UI_STRING("complementary", "An ARIA accessibility group that acts as a region of complementary information.");
- if ([ariaType isEqualToString:@"ARIALandmarkContentInfo"])
- return UI_STRING("content", "An ARIA accessibility group that contains content.");
- if ([ariaType isEqualToString:@"ARIALandmarkMain"])
- return UI_STRING("main", "An ARIA accessibility group that is the main portion of the website.");
- if ([ariaType isEqualToString:@"ARIALandmarkNavigation"])
- return UI_STRING("navigation", "An ARIA accessibility group that contains the main navigation elements of a website.");
- if ([ariaType isEqualToString:@"ARIALandmarkSearch"])
- return UI_STRING("search", "An ARIA accessibility group that contains a search feature of a website.");
- if ([ariaType isEqualToString:@"ARIAUserInterfaceTooltip"])
- return UI_STRING("tooltip", "An ARIA accessibility group that acts as a tooltip.");
- if ([ariaType isEqualToString:@"ARIATabPanel"])
- return UI_STRING("tab panel", "An ARIA accessibility group that contains the content of a tab.");
- if ([ariaType isEqualToString:@"ARIADocumentMath"])
- return UI_STRING("math", "An ARIA accessibility group that contains mathematical symbols.");
- return nil;
-}
-
-- (NSString *)AXButtonActionVerb
-{
- return UI_STRING("press", "Verb stating the action that will occur when a button is pressed, as used by accessibility");
-}
-
-- (NSString *)AXRadioButtonActionVerb
-{
- return UI_STRING("select", "Verb stating the action that will occur when a radio button is clicked, as used by accessibility");
-}
-
-- (NSString *)AXTextFieldActionVerb
-{
- return UI_STRING("activate", "Verb stating the action that will occur when a text field is selected, as used by accessibility");
-}
-
-- (NSString *)AXCheckedCheckBoxActionVerb
-{
- return UI_STRING("uncheck", "Verb stating the action that will occur when a checked checkbox is clicked, as used by accessibility");
-}
-
-- (NSString *)AXUncheckedCheckBoxActionVerb
-{
- return UI_STRING("check", "Verb stating the action that will occur when an unchecked checkbox is clicked, as used by accessibility");
-}
-
-- (NSString *)AXLinkActionVerb
-{
- return UI_STRING("jump", "Verb stating the action that will occur when a link is clicked, as used by accessibility");
-}
-
-- (NSString *)AXMenuListPopupActionVerb
-{
- return nil;
-}
-
-- (NSString *)AXMenuListActionVerb
-{
- return nil;
-}
-
-- (NSString *)multipleFileUploadTextForNumberOfFiles:(unsigned)numberOfFiles
-{
- return [NSString stringWithFormat:UI_STRING("%d files", "Label to describe the number of files selected in a file upload control that allows multiple files"), numberOfFiles];
-}
-
-- (NSString *)unknownFileSizeText
-{
- return UI_STRING("Unknown", "Unknown filesize FTP directory listing item");
-}
-
-- (NSString*)imageTitleForFilename:(NSString*)filename width:(int)width height:(int)height
-{
- return [NSString stringWithFormat:UI_STRING("%@ %d×%d pixels", "window title for a standalone image (uses multiplication symbol, not x)"), filename, width, height];
-}
-
-- (NSString*)mediaElementLoadingStateText
-{
- return UI_STRING("Loading...", "Media controller status message when the media is loading");
-}
-
-- (NSString*)mediaElementLiveBroadcastStateText
-{
- return UI_STRING("Live Broadcast", "Media controller status message when watching a live broadcast");
-}
-
-- (NSString*)localizedMediaControlElementString:(NSString*)name
-{
- if ([name isEqualToString:@"AudioElement"])
- return UI_STRING("audio element controller", "accessibility role description for audio element controller");
- if ([name isEqualToString:@"VideoElement"])
- return UI_STRING("video element controller", "accessibility role description for video element controller");
-
- // FIXME: the ControlsPanel container should never be visible in the accessibility hierarchy.
- if ([name isEqualToString:@"ControlsPanel"])
- return @"";
-
- if ([name isEqualToString:@"MuteButton"])
- return UI_STRING("mute", "accessibility role description for mute button");
- if ([name isEqualToString:@"UnMuteButton"])
- return UI_STRING("unmute", "accessibility role description for turn mute off button");
- if ([name isEqualToString:@"PlayButton"])
- return UI_STRING("play", "accessibility role description for play button");
- if ([name isEqualToString:@"PauseButton"])
- return UI_STRING("pause", "accessibility role description for pause button");
- if ([name isEqualToString:@"Slider"])
- return UI_STRING("movie time", "accessibility role description for timeline slider");
- if ([name isEqualToString:@"SliderThumb"])
- return UI_STRING("timeline slider thumb", "accessibility role description for timeline thumb");
- if ([name isEqualToString:@"RewindButton"])
- return UI_STRING("back 30 seconds", "accessibility role description for seek back 30 seconds button");
- if ([name isEqualToString:@"ReturnToRealtimeButton"])
- return UI_STRING("return to realtime", "accessibility role description for return to real time button");
- if ([name isEqualToString:@"CurrentTimeDisplay"])
- return UI_STRING("elapsed time", "accessibility role description for elapsed time display");
- if ([name isEqualToString:@"TimeRemainingDisplay"])
- return UI_STRING("remaining time", "accessibility role description for time remaining display");
- if ([name isEqualToString:@"StatusDisplay"])
- return UI_STRING("status", "accessibility role description for movie status");
- if ([name isEqualToString:@"FullscreenButton"])
- return UI_STRING("fullscreen", "accessibility role description for enter fullscreen button");
- if ([name isEqualToString:@"SeekForwardButton"])
- return UI_STRING("fast forward", "accessibility role description for fast forward button");
- if ([name isEqualToString:@"SeekBackButton"])
- return UI_STRING("fast reverse", "accessibility role description for fast reverse button");
- if ([name isEqualToString:@"ShowClosedCaptionsButton"])
- return UI_STRING("show closed captions", "accessibility role description for show closed captions button");
- if ([name isEqualToString:@"HideClosedCaptionsButton"])
- return UI_STRING("hide closed captions", "accessibility role description for hide closed captions button");
-
- ASSERT_NOT_REACHED();
- return @"";
-}
-
-- (NSString*)localizedMediaControlElementHelpText:(NSString*)name
-{
- if ([name isEqualToString:@"AudioElement"])
- return UI_STRING("audio element playback controls and status display", "accessibility role description for audio element controller");
- if ([name isEqualToString:@"VideoElement"])
- return UI_STRING("video element playback controls and status display", "accessibility role description for video element controller");
-
- if ([name isEqualToString:@"MuteButton"])
- return UI_STRING("mute audio tracks", "accessibility help text for mute button");
- if ([name isEqualToString:@"UnMuteButton"])
- return UI_STRING("unmute audio tracks", "accessibility help text for un mute button");
- if ([name isEqualToString:@"PlayButton"])
- return UI_STRING("begin playback", "accessibility help text for play button");
- if ([name isEqualToString:@"PauseButton"])
- return UI_STRING("pause playback", "accessibility help text for pause button");
- if ([name isEqualToString:@"Slider"])
- return UI_STRING("movie time scrubber", "accessibility help text for timeline slider");
- if ([name isEqualToString:@"SliderThumb"])
- return UI_STRING("movie time scrubber thumb", "accessibility help text for timeline slider thumb");
- if ([name isEqualToString:@"RewindButton"])
- return UI_STRING("seek movie back 30 seconds", "accessibility help text for jump back 30 seconds button");
- if ([name isEqualToString:@"ReturnToRealtimeButton"])
- return UI_STRING("return streaming movie to real time", "accessibility help text for return streaming movie to real time button");
- if ([name isEqualToString:@"CurrentTimeDisplay"])
- return UI_STRING("current movie time in seconds", "accessibility help text for elapsed time display");
- if ([name isEqualToString:@"TimeRemainingDisplay"])
- return UI_STRING("number of seconds of movie remaining", "accessibility help text for remaining time display");
- if ([name isEqualToString:@"StatusDisplay"])
- return UI_STRING("current movie status", "accessibility help text for movie status display");
- if ([name isEqualToString:@"SeekBackButton"])
- return UI_STRING("seek quickly back", "accessibility help text for fast rewind button");
- if ([name isEqualToString:@"SeekForwardButton"])
- return UI_STRING("seek quickly forward", "accessibility help text for fast forward button");
- if ([name isEqualToString:@"FullscreenButton"])
- return UI_STRING("Play movie in fullscreen mode", "accessibility help text for enter fullscreen button");
- if ([name isEqualToString:@"ShowClosedCaptionsButton"])
- return UI_STRING("start displaying closed captions", "accessibility help text for show closed captions button");
- if ([name isEqualToString:@"HideClosedCaptionsButton"])
- return UI_STRING("stop displaying closed captions", "accessibility help text for hide closed captions button");
- ASSERT_NOT_REACHED();
- return @"";
-}
-
-- (NSString*)localizedMediaTimeDescription:(float)time
-{
- if (!isfinite(time))
- return UI_STRING("indefinite time", "accessibility help text for an indefinite media controller time value");
-
- int seconds = (int)fabsf(time);
- int days = seconds / (60 * 60 * 24);
- int hours = seconds / (60 * 60);
- int minutes = (seconds / 60) % 60;
- seconds %= 60;
-
- if (days)
- return [NSString stringWithFormat:UI_STRING("%1$d days %2$d hours %3$d minutes %4$d seconds", "accessibility help text for media controller time value >= 1 day"), days, hours, minutes, seconds];
- else if (hours)
- return [NSString stringWithFormat:UI_STRING("%1$d hours %2$d minutes %3$d seconds", "accessibility help text for media controller time value >= 60 minutes"), hours, minutes, seconds];
- else if (minutes)
- return [NSString stringWithFormat:UI_STRING("%1$d minutes %2$d seconds", "accessibility help text for media controller time value >= 60 seconds"), minutes, seconds];
-
- return [NSString stringWithFormat:UI_STRING("%1$d seconds", "accessibility help text for media controller time value < 60 seconds"), seconds];
-}
-
-- (NSString *)validationMessageValueMissingText
-{
- return UI_STRING("value missing", "Validation message for required form control elements that have no value");
-}
-
-- (NSString *)validationMessageTypeMismatchText
-{
- return UI_STRING("type mismatch", "Validation message for input form controls with a value not matching type");
-}
-
-- (NSString *)validationMessagePatternMismatchText
-{
- return UI_STRING("pattern mismatch", "Validation message for input form controls requiring a constrained value according to pattern");
-}
-
-- (NSString *)validationMessageTooLongText
-{
- return UI_STRING("too long", "Validation message for form control elements with a value longer than maximum allowed length");
-}
-
-- (NSString *)validationMessageRangeUnderflowText
-{
- return UI_STRING("range underflow", "Validation message for input form controls with value lower than allowed minimum");
-}
-
-- (NSString *)validationMessageRangeOverflowText
-{
- return UI_STRING("range overflow", "Validation message for input form controls with value higher than allowed maximum");
-}
-
-- (NSString *)validationMessageStepMismatchText
-{
- return UI_STRING("step mismatch", "Validation message for input form controls with value not respecting the step attribute");
-}
-
@end
diff --git a/WebKit/mac/WebInspector/WebInspector.h b/WebKit/mac/WebInspector/WebInspector.h
index fa13c8d..ed78ed7 100644
--- a/WebKit/mac/WebInspector/WebInspector.h
+++ b/WebKit/mac/WebInspector/WebInspector.h
@@ -29,10 +29,12 @@
#import <Foundation/NSObject.h>
@class WebView;
+@class WebInspectorFrontend;
@interface WebInspector : NSObject
{
WebView *_webView;
+ WebInspectorFrontend *_frontend;
}
- (id)initWithWebView:(WebView *)webView;
- (void)webViewClosed;
diff --git a/WebKit/mac/WebInspector/WebInspector.mm b/WebKit/mac/WebInspector/WebInspector.mm
index 258dd01..f109e15 100644
--- a/WebKit/mac/WebInspector/WebInspector.mm
+++ b/WebKit/mac/WebInspector/WebInspector.mm
@@ -30,6 +30,7 @@
#import "WebFrameInternal.h"
#import "WebInspectorPrivate.h"
+#import "WebInspectorFrontend.h"
#include <WebCore/Document.h>
#include <WebCore/Frame.h>
@@ -47,6 +48,12 @@ using namespace WebCore;
return self;
}
+- (void)dealloc
+{
+ [_frontend release];
+ [super dealloc];
+}
+
- (void)webViewClosed
{
_webView = nil;
@@ -175,14 +182,12 @@ using namespace WebCore;
- (void)attach:(id)sender
{
- if (Page* page = core(_webView))
- page->inspectorController()->attachWindow();
+ [_frontend attach];
}
- (void)detach:(id)sender
{
- if (Page* page = core(_webView))
- page->inspectorController()->detachWindow();
+ [_frontend detach];
}
- (void)evaluateInFrontend:(id)sender callId:(long)callId script:(NSString *)script
@@ -190,6 +195,12 @@ using namespace WebCore;
if (Page* page = core(_webView))
page->inspectorController()->evaluateForTestInFrontend(callId, script);
}
+
+- (void)setFrontend:(WebInspectorFrontend *)frontend
+{
+ [_frontend release];
+ _frontend = [frontend retain];
+}
@end
@implementation WebInspector (Obsolete)
diff --git a/WebKit/mac/Misc/WebIconFetcher.h b/WebKit/mac/WebInspector/WebInspectorFrontend.h
index d27ad94..93bed84 100644
--- a/WebKit/mac/Misc/WebIconFetcher.h
+++ b/WebKit/mac/WebInspector/WebInspectorFrontend.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2010 Apple Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,14 +23,13 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import <Cocoa/Cocoa.h>
+class WebInspectorFrontendClient;
-@class WebIconFetcherPrivate;
-
-@interface WebIconFetcher : NSObject {
- WebIconFetcherPrivate *_private;
+@interface WebInspectorFrontend : NSObject {
+@private
+ WebInspectorFrontendClient *m_frontendClient;
}
-
-- (void)cancel;
-
+- (id)initWithFrontendClient:(WebInspectorFrontendClient *)frontendClient;
+- (void)attach;
+- (void)detach;
@end
diff --git a/WebKit/mac/Misc/WebIconFetcherInternal.h b/WebKit/mac/WebInspector/WebInspectorFrontend.mm
index 5951ef9..c285ef7 100644
--- a/WebKit/mac/Misc/WebIconFetcherInternal.h
+++ b/WebKit/mac/WebInspector/WebInspectorFrontend.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2010 Apple Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,20 +23,29 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import <WebKit/WebIconFetcher.h>
-#import <wtf/Forward.h>
+#import "WebInspectorFrontend.h"
-namespace WebCore {
- class IconFetcher;
-}
+#import "WebInspectorClient.h"
-@class WebFrame;
+@implementation WebInspectorFrontend
-@interface WebIconFetcher (WebInternal)
+- (id)initWithFrontendClient:(WebInspectorFrontendClient *)frontendClient
+{
+ if (!(self = [super init]))
+ return nil;
-+ (WebIconFetcher *)_fetchApplicationIconForFrame:(WebFrame *)webFrame
- target:(id)target
- selector:(SEL)selector;
+ m_frontendClient = frontendClient;
+ return self;
+}
-@end
+- (void)attach
+{
+ m_frontendClient->attachWindow();
+}
+- (void)detach
+{
+ m_frontendClient->detachWindow();
+}
+
+@end
diff --git a/WebKit/mac/WebInspector/WebInspectorPrivate.h b/WebKit/mac/WebInspector/WebInspectorPrivate.h
index c82bb92..df1e286 100644
--- a/WebKit/mac/WebInspector/WebInspectorPrivate.h
+++ b/WebKit/mac/WebInspector/WebInspectorPrivate.h
@@ -28,8 +28,11 @@
// This header contains the WebInspector SPI.
-#import "WebInspector.h"
+#import <WebKit/WebInspector.h>
+
+@class WebInspectorFrontend;
@interface WebInspector (WebPrivate)
- (void)evaluateInFrontend:(id)sender callId:(long)callId script:(NSString *)script;
+- (void)setFrontend:(WebInspectorFrontend *)frontend;
@end
diff --git a/WebKit/mac/WebInspector/WebNodeHighlightView.mm b/WebKit/mac/WebInspector/WebNodeHighlightView.mm
index b3cd69e..7fc3cf4 100644
--- a/WebKit/mac/WebInspector/WebNodeHighlightView.mm
+++ b/WebKit/mac/WebInspector/WebNodeHighlightView.mm
@@ -67,14 +67,15 @@ using namespace WebCore;
- (void)drawRect:(NSRect)rect
{
- [NSGraphicsContext saveGraphicsState];
+ if (_webNodeHighlight) {
+ [NSGraphicsContext saveGraphicsState];
- ASSERT([[NSGraphicsContext currentContext] isFlipped]);
+ ASSERT([[NSGraphicsContext currentContext] isFlipped]);
- GraphicsContext context((PlatformGraphicsContext*)[[NSGraphicsContext currentContext] graphicsPort]);
- [_webNodeHighlight inspectorController]->drawNodeHighlight(context);
-
- [NSGraphicsContext restoreGraphicsState];
+ GraphicsContext context((PlatformGraphicsContext*)[[NSGraphicsContext currentContext] graphicsPort]);
+ [_webNodeHighlight inspectorController]->drawNodeHighlight(context);
+ [NSGraphicsContext restoreGraphicsState];
+ }
}
- (WebNodeHighlight *)webNodeHighlight
diff --git a/WebKit/mac/WebKit.exp b/WebKit/mac/WebKit.exp
index 904f389..7c20307 100644
--- a/WebKit/mac/WebKit.exp
+++ b/WebKit/mac/WebKit.exp
@@ -7,12 +7,13 @@
.objc_class_name_WebDataSource
.objc_class_name_WebDatabaseManager
.objc_class_name_WebDefaultPolicyDelegate
+.objc_class_name_WebDeviceOrientation
+.objc_class_name_WebDeviceOrientationProviderMock
.objc_class_name_WebDownload
.objc_class_name_WebDynamicScrollBarsView
.objc_class_name_WebFormDelegate
.objc_class_name_WebFrame
.objc_class_name_WebFrameView
-.objc_class_name_WebGeolocationMock
.objc_class_name_WebGeolocationPosition
.objc_class_name_WebHTMLRepresentation
.objc_class_name_WebHTMLView
@@ -26,6 +27,7 @@
.objc_class_name_WebPanelAuthenticationHandler
.objc_class_name_WebPluginDatabase
.objc_class_name_WebPreferences
+.objc_class_name_WebRenderLayer
.objc_class_name_WebRenderNode
.objc_class_name_WebResource
.objc_class_name_WebScriptCallFrame
@@ -35,6 +37,7 @@
.objc_class_name_WebStringTruncator
.objc_class_name_WebTextIterator
.objc_class_name_WebURLsWithTitles
+.objc_class_name_WebUserContentURLPattern
.objc_class_name_WebView
.objc_class_name_WebWorkersPrivate
_HIWebViewCreate
@@ -62,6 +65,7 @@ _WebElementImageKey
_WebElementImageRectKey
_WebElementImageURLKey
_WebElementIsSelectedKey
+_WebElementMediaURLKey
_WebElementLinkIsLiveKey
_WebElementLinkLabelKey
_WebElementLinkTargetFrameKey
@@ -120,4 +124,6 @@ _WebViewDidEndEditingNotification
_WebViewProgressEstimateChangedNotification
_WebViewProgressFinishedNotification
_WebViewProgressStartedNotification
+__WebHTMLViewPrintingMaximumShrinkFactor
+__WebHTMLViewPrintingMinimumShrinkFactor
__WebViewDidStartAcceleratedCompositingNotification
diff --git a/WebKit/mac/WebKit.order b/WebKit/mac/WebKit.order
index 187f66a..c2b5f5d 100644
--- a/WebKit/mac/WebKit.order
+++ b/WebKit/mac/WebKit.order
@@ -12,6 +12,7 @@ _WebKitLinkTimeVersion
-[WebPreferences setAutosaves:]
+[NSString(WebKitExtras) _webkit_localCacheDirectoryWithBundleIdentifier:]
-[NSString(WebKitExtras) _web_stringByAbbreviatingWithTildeInPath]
++[WebIconDatabase initialize]
+[WebIconDatabase delayDatabaseCleanup]
+[WebIconDatabase sharedIconDatabase]
-[WebIconDatabase init]
@@ -33,26 +34,36 @@ _InitWebCoreSystemInterface
+[WebHTMLView(WebPrivate) _selectionPasteboardTypes]
+[WebHTMLView(WebPrivate) supportedNonImageMIMETypes]
+[WebHTMLRepresentation supportedNonImageMIMETypes]
-__ZN21WebIconDatabaseClient13performImportEv
-__Z21importToWebCoreFormatv
-+[ThreadEnabler enableThreading]
--[ThreadEnabler threadEnablingSelector:]
-__ZL20objectFromPathForKeyP8NSStringP11objc_object
__ZL11stringArrayRKN3WTF7HashSetIN7WebCore6StringENS1_10StringHashENS_10HashTraitsIS2_EEEE
+[WebPDFView supportedMIMETypes]
+[WebPDFRepresentation supportedMIMETypes]
+[WebPDFRepresentation postScriptMIMETypes]
+[WebDataSource(WebInternal) _repTypesAllowImageTypeOmission:]
-_WebLocalizedString
--[NSURL(WebNSURLExtras) _web_originalDataAsString]
--[NSURL(WebNSURLExtras) _web_originalData]
-[WebIconDatabase retainIconForURL:]
-[WebIconDatabase(WebPendingPublic) isEnabled]
-+[WebView registerURLSchemeAsLocal:]
++[WebIconDatabase allowDatabaseCleanup]
+_WebLocalizedString
+[NSURL(WebNSURLExtras) _web_URLWithDataAsString:]
+[NSURL(WebNSURLExtras) _web_URLWithDataAsString:relativeToURL:]
-[NSString(WebKitExtras) _webkit_stringByTrimmingWhitespace]
+[NSURL(WebNSURLExtras) _web_URLWithData:relativeToURL:]
++[WebView(WebPrivate) _registerURLSchemeAsSecure:]
++[WebView(WebPrivate) _setDomainRelaxationForbidden:forURLScheme:]
++[WebView registerURLSchemeAsLocal:]
+-[WebPreferences(WebPrivate) setRespectStandardStyleKeyEquivalents:]
+-[WebPreferences _setBoolValue:forKey:]
+-[WebPreferences setPrivateBrowsingEnabled:]
+-[WebPreferences(WebPrivate) setDOMPasteAllowed:]
+-[WebPreferences setCacheModel:]
+-[WebPreferences _setIntegerValue:forKey:]
+-[WebPreferences(WebPrivate) setAutomaticallyDetectsCacheModel:]
++[WebPreferences(WebPrivate) _setInitialDefaultTextEncodingToSystemEncoding]
++[WebPreferences(WebPrivate) _systemCFStringEncoding]
+_WKGetWebDefaultCFStringEncoding
+-[NSString(WebKitExtras) _webkit_isCaseInsensitiveEqualToString:]
++[WebHistory(WebPrivate) _setVisitedLinkTrackingEnabled:]
++[WebHistory(WebPrivate) _removeAllVisitedLinks]
++[WebCoreStatistics setShouldPrintExceptions:]
-[NSURL(WebNSURLExtras) _webkit_canonicalize]
_WKNSURLProtocolClassForRequest
-[WebView(WebPrivate) _initWithFrame:frameName:groupName:usesDocumentViews:]
@@ -64,7 +75,10 @@ _WKNSURLProtocolClassForRequest
-[WebFrameView initWithFrame:]
+[WebViewFactory createSharedFactory]
+[WebKeyGenerator createSharedGenerator]
+-[WebDynamicScrollBarsView initWithFrame:]
-[WebClipView initWithFrame:]
+-[WebClipView visibleRect]
+-[WebDynamicScrollBarsView(WebInternal) tile]
-[WebFrameView visibleRect]
-[WebFrameView webFrame]
_WebKitInitializeLoggingChannelsIfNecessary
@@ -76,6 +90,8 @@ __ZN24WebDatabaseTrackerClient30sharedWebDatabaseTrackerClientEv
__ZN24WebDatabaseTrackerClientC1Ev
__ZN24WebDatabaseTrackerClientC2Ev
__ZL47WebKitInitializeApplicationCachePathIfNecessaryv
+__ZN30WebGeolocationControllerClientC1EP7WebView
+__ZN30WebGeolocationControllerClientC2EP7WebView
__ZN15WebChromeClientC1EP7WebView
__ZN15WebChromeClientC2EP7WebView
__ZN20WebContextMenuClientC1EP7WebView
@@ -86,6 +102,9 @@ __ZN13WebDragClientC1EP7WebView
__ZN13WebDragClientC2EP7WebView
__ZN18WebInspectorClientC1EP7WebView
__ZN18WebInspectorClientC2EP7WebView
+-[WebNodeHighlighter initWithInspectedWebView:]
+__ZN21WebPluginHalterClientC1EP7WebView
+__ZN21WebPluginHalterClientC2EP7WebView
-[WebView preferences]
-[WebPreferences(WebPrivate) _localStorageDatabasePath]
-[WebPreferences _stringValueForKey:]
@@ -95,6 +114,7 @@ __Z3kitPN7WebCore4PageE
-[WebFrame(WebInternal) _initWithWebFrameView:webView:]
-[WebFramePrivate setWebFrameView:]
-[WebFrameView(WebInternal) _setWebFrame:]
+-[WebFrame(WebInternal) _isIncludedInWebKitStatistics]
__ZN20WebFrameLoaderClientC1EP8WebFrame
__ZN20WebFrameLoaderClientC2EP8WebFrame
__ZN20WebFrameLoaderClient20createDocumentLoaderERKN7WebCore15ResourceRequestERKNS0_14SubstituteDataE
@@ -102,6 +122,7 @@ __ZN20WebDocumentLoaderMacC1ERKN7WebCore15ResourceRequestERKNS0_14SubstituteData
__ZN20WebDocumentLoaderMacC2ERKN7WebCore15ResourceRequestERKNS0_14SubstituteDataE
-[WebDataSource(WebInternal) _initWithDocumentLoader:]
+[WebDataSourcePrivate initialize]
+-[WebDataSource webFrame]
__Z10getWebViewP8WebFrame
__Z4coreP8WebFrame
__ZN20WebDocumentLoaderMac13setDataSourceEP13WebDataSourceP7WebView
@@ -118,35 +139,40 @@ __ZN20WebFrameLoaderClient31prepareForDataSourceReplacementEv
-[WebFrame(WebInternal) _dataSource]
__ZN20WebFrameLoaderClient31transitionToCommittedForNewPageEv
__ZNK20WebDocumentLoaderMac10dataSourceEv
+-[WebView(WebPrivate) _usesDocumentViews]
-[WebDataSource(WebPrivate) _responseMIMEType]
-[WebDataSource response]
-+[WebFrameView(WebInternal) _viewClassForMIMEType:]
-+[WebView(WebPrivate) _viewClass:andRepresentationClass:forMIMEType:]
+-[WebFrameView(WebInternal) _viewClassForMIMEType:]
+-[WebFrameView(WebInternal) _webView]
+-[WebFrame webView]
+-[WebPreferences arePlugInsEnabled]
++[WebFrameView(WebInternal) _viewClassForMIMEType:allowingPlugins:]
++[WebView(WebPrivate) _viewClass:andRepresentationClass:forMIMEType:allowingPlugins:]
-[NSDictionary(WebNSDictionaryExtras) _webkit_objectForMIMEType:]
+[WebHTMLView(WebPrivate) unsupportedTextMIMETypes]
-[WebView removePluginInstanceViewsFor:]
--[WebView(WebPrivate) _usesDocumentViews]
-[WebFrameView(WebInternal) _makeDocumentViewForDataSource:]
-[WebDataSource representation]
-[WebHTMLView initWithFrame:]
+[WebHTMLViewPrivate initialize]
-[WebPluginController initWithDocumentView:]
-[WebFrameView(WebInternal) _setDocumentView:]
--[WebFrameView(WebInternal) _webView]
--[WebFrame webView]
__Z4coreP7WebView
-[WebView(WebPrivate) page]
-[WebDynamicScrollBarsView(WebInternal) setSuppressLayout:]
-[WebHTMLView viewWillMoveToSuperview:]
-[WebHTMLView(WebHTMLViewFileInternal) _removeSuperviewObservers]
--[WebHTMLView setNeedsDisplay:]
+-[WebHTMLView setNeedsDisplayInRect:]
+__ZL21setNeedsDisplayInRectP6NSViewP13objc_selector6CGRect
-[WebHTMLView visibleRect]
-[WebClipView hasAdditionalClip]
-[WebFrame(WebInternal) _getVisibleRect:]
-[WebHTMLView viewDidMoveToSuperview]
-[WebHTMLView addSuperviewObservers]
+-[WebHTMLView(WebPrivate) _isUsingAcceleratedCompositing]
-[WebHTMLView isFlipped]
-[WebDynamicScrollBarsView(WebInternal) reflectScrolledClipView:]
+-[WebDynamicScrollBarsView(WebInternal) updateScrollers]
-[WebFrame(WebInternal) _updateBackgroundAndUpdatesWhileOffscreen]
-[WebView drawsBackground]
-[WebView(WebPrivate) backgroundColor]
@@ -162,19 +188,21 @@ __Z3kitPN7WebCore5FrameE
-[WebHTMLView(WebHTMLViewFileInternal) _isTopHTMLView]
-[WebHTMLView(WebHTMLViewFileInternal) _topHTMLView]
-[WebDataSource(WebInternal) _webView]
--[WebDataSource webFrame]
-[WebView mainFrame]
-[WebHTMLView(WebHTMLViewFileInternal) _webView]
-[WebView(WebPrivate) _dashboardBehavior:]
-__ZN15WebEditorClient23clearUndoRedoOperationsEv
+-[WebDataSource(WebInternal) _documentLoader]
+-[WebDataSource pageTitle]
__ZN20WebFrameLoaderClient15finishedLoadingEPN7WebCore14DocumentLoaderE
-[WebDataSource(WebInternal) _finishedLoading]
__ZNK7WebCore17FrameLoaderClient23shouldUsePluginDocumentERKNS_6StringE
+__ZNK20WebFrameLoaderClient11hasHTMLViewEv
_WKInitializeMaximumHTTPConnectionCountPerHost
+__ZNK7WebCore12ChromeClient28allowsAcceleratedCompositingEv
+__ZN15WebChromeClient22createHTMLParserQuirksEv
+__ZN7WebCore17FrameLoaderClient15allowJavaScriptEb
__ZNK20WebFrameLoaderClient17overrideMediaTypeEv
-[WebView mediaStyle]
-__ZN15WebChromeClient22createHTMLParserQuirksEv
-__ZNK15WebChromeClient19contentsSizeChangedEPN7WebCore5FrameERKNS0_7IntSizeE
__ZN20WebFrameLoaderClient24documentElementAvailableEv
__ZN20WebFrameLoaderClient18frameLoadCompletedEv
__ZN20WebFrameLoaderClient21forceLayoutForNonHTMLEv
@@ -184,6 +212,7 @@ __ZN20WebFrameLoaderClient21forceLayoutForNonHTMLEv
-[WebView _realZoomMultiplierIsTextOnly]
-[WebView _realZoomMultiplier]
-[WebView _setZoomMultiplier:isTextOnly:]
+-[WebView(WebViewInternal) _mainCoreFrame]
-[WebView(WebPendingPublic) scheduleInRunLoop:forMode:]
-[WebView(AllWebViews) _addToAllWebViewsSet]
-[WebView setGroupName:]
@@ -201,7 +230,6 @@ _WebVolumeFreeSize
-[WebView(WebPrivate) _preferencesChangedNotification:]
-[WebPreferences(WebPrivate) _useSiteSpecificSpoofing]
-[WebPreferences cursiveFontFamily]
-__ZNK20WebFrameLoaderClient11hasHTMLViewEv
-[WebPreferences defaultFixedFontSize]
-[WebPreferences defaultFontSize]
-[WebPreferences defaultTextEncodingName]
@@ -214,12 +242,13 @@ __ZNK20WebFrameLoaderClient11hasHTMLViewEv
-[WebPreferences isJavaScriptEnabled]
-[WebPreferences(WebPrivate) isWebSecurityEnabled]
-[WebPreferences(WebPrivate) allowUniversalAccessFromFileURLs]
+-[WebPreferences(WebPrivate) allowFileAccessFromFileURLs]
-[WebPreferences javaScriptCanOpenWindowsAutomatically]
-[WebPreferences minimumFontSize]
-[WebPreferences minimumLogicalFontSize]
--[WebPreferences arePlugInsEnabled]
-[WebPreferences(WebPrivate) databasesEnabled]
-[WebPreferences(WebPrivate) localStorageEnabled]
+-[WebPreferences(WebPrivate) experimentalNotificationsEnabled]
-[WebPreferences sansSerifFontFamily]
-[WebPreferences serifFontFamily]
-[WebPreferences standardFontFamily]
@@ -241,10 +270,21 @@ __Z4core40WebTextDirectionSubmenuInclusionBehavior
-[WebPreferences userStyleSheetEnabled]
-[WebView(WebPrivate) _needsAdobeFrameReloadingQuirk]
_WKAppVersionCheckLessThan
+-[WebView(WebPrivate) _needsLinkElementTextCSSQuirk]
-[WebView(WebPrivate) _needsKeyboardEventDisambiguationQuirks]
-[WebPreferences(WebPrivate) webArchiveDebugModeEnabled]
+-[WebPreferences(WebPrivate) localFileContentSniffingEnabled]
-[WebPreferences(WebPrivate) offlineWebApplicationCacheEnabled]
-[WebPreferences(WebPrivate) zoomsTextOnly]
+-[WebPreferences(WebPrivate) javaScriptCanAccessClipboard]
+-[WebPreferences(WebPrivate) isXSSAuditorEnabled]
+-[WebPreferences(WebPrivate) acceleratedCompositingEnabled]
+-[WebPreferences(WebPrivate) showDebugBorders]
+-[WebPreferences(WebPrivate) showRepaintCounter]
+-[WebPreferences(WebPrivate) pluginAllowedRunTime]
+-[WebPreferences(WebPrivate) webGLEnabled]
+-[WebPreferences(WebPrivate) memoryInfoEnabled]
+-[WebPreferences(WebPrivate) isFrameFlatteningEnabled]
-[WebView setMaintainsBackForwardList:]
-[WebView setUIDelegate:]
-[WebView(WebPrivate) setMemoryCacheDelegateCallsEnabled:]
@@ -259,6 +299,7 @@ __ZN3WTF7HashMapIPN7WebCore15BackForwardListEP18WebBackForwardListNS_7PtrHashIS3
__ZN3WTF9HashTableIPN7WebCore15BackForwardListESt4pairIS3_P18WebBackForwardListENS_18PairFirstExtractorIS7_EENS_7PtrHashIS3_EEN
-[WebBackForwardList setCapacity:]
-[WebView setFrameLoadDelegate:]
+-[WebView(WebPrivate) _needsFrameLoadDelegateRetainQuirk]
-[WebView(WebPrivate) _cacheFrameLoadDelegateImplementations]
-[WebView setPolicyDelegate:]
-[WebView(WebViewEditing) setEditingDelegate:]
@@ -266,6 +307,9 @@ __ZN3WTF9HashTableIPN7WebCore15BackForwardListESt4pairIS3_P18WebBackForwardListE
-[WebView setResourceLoadDelegate:]
-[WebView(WebPrivate) _cacheResourceLoadDelegateImplementations]
-[WebView setDownloadDelegate:]
+-[WebView(WebPendingPublic) setHistoryDelegate:]
+-[WebView(WebPrivate) _cacheHistoryDelegateImplementations]
+-[WebView(WebViewGeolocation) _setGeolocationProvider:]
-[WebView setApplicationNameForUserAgent:]
-[WebView setHostWindow:]
-[WebView(WebPrivate) _setFormDelegate:]
@@ -276,61 +320,57 @@ __ZN3WTF9HashTableIPN7WebCore15BackForwardListESt4pairIS3_P18WebBackForwardListE
__ZL14fontFromNSFontP6NSFont
_WKGetGlyphsForCharacters
_WKGetGlyphTransformedAdvances
--[WebView viewWillMoveToSuperview:]
--[WebView removeSizeObservers]
--[WebView viewDidMoveToSuperview]
--[WebView addSizeObserversForWindow:]
+-[WebView(WebPrivate) setFrameSize:]
-[WebFrameView setFrameSize:]
+-[WebFrameView(WebFrameViewFileInternal) _web_frame]
-[WebView(WebPrivate) isFlipped]
--[WebFrame dataSource]
+-[WebHTMLView(WebInternal) _needsLayout]
+-[WebHTMLView(WebInternal) _frame]
+-[WebFrame(WebInternal) _needsLayout]
+-[WebHTMLView layout]
+-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]
+-[WebHTMLView reapplyStyles]
+-[WebDynamicScrollBarsView(WebInternal) setScrollBarsSuppressed:repaintOnUnsuppress:]
+-[WebDynamicScrollBarsView(WebInternal) setScrollingModes:vertical:andLock:]
+__ZN15WebEditorClient10isEditableEv
+-[WebView(WebViewEditing) isEditable]
+-[WebHTMLView setNeedsLayout:]
+__ZNK15WebChromeClient19contentsSizeChangedEPN7WebCore5FrameERKNS0_7IntSizeE
+__ZN20WebFrameLoaderClient22dispatchDidFirstLayoutEv
+__Z42WebViewGetFrameLoadDelegateImplementationsP7WebView
+__Z21CallFrameLoadDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS2_S0_
-[WebView viewWillMoveToWindow:]
_WKSetNSWindowShouldPostEventNotifications
-[WebView removeWindowObservers]
--[WebView(WebPrivate) _boundsChanged]
-[WebView addWindowObserversForWindow:]
+_WKWindowWillOrderOnScreenNotification
-[WebHTMLView viewWillMoveToWindow:]
-[WebHTMLView(WebHTMLViewFileInternal) _removeMouseMovedObserverUnconditionally]
-[WebHTMLView(WebHTMLViewFileInternal) _removeWindowObservers]
-[WebHTMLView(WebHTMLViewFileInternal) _cancelUpdateMouseoverTimer]
--[WebHTMLView(WebHTMLViewFileInternal) _cancelUpdateFocusedAndActiveStateTimer]
-[WebHTMLView(WebPrivate) _pluginController]
-[WebPluginController stopAllPlugins]
-[WebHTMLView viewDidMoveToWindow]
-[WebHTMLView(WebPrivate) _stopAutoscrollTimer]
-[WebHTMLView addWindowObservers]
-_WKWindowWillOrderOnScreenNotification
-[WebHTMLView(WebPrivate) _frameOrBoundsChanged]
-[WebPluginController startAllPlugins]
-[WebFrameView viewDidMoveToWindow]
-[WebView viewDidMoveToWindow]
+-[WebView(WebPrivate) _updateActiveState]
-[NSString(WebKitExtras) _web_widthWithFont:]
-_canUseFastRenderer
--[WebFrame provisionalDataSource]
--[WebIconDatabase iconForURL:withSize:]
--[WebIconDatabase iconForURL:withSize:cache:]
--[NSString(WebNSURLExtras) _webkit_isFileURL]
-__Z13webGetNSImagePN7WebCore5ImageE6CGSize
+__ZL18canUseFastRendererPKtj
-[WebHTMLView(WebPrivate) hitTest:]
-[WebView setNextKeyView:]
-[WebFrameView setNextKeyView:]
-[NSView(WebExtras) _web_superviewOfClass:]
-[WebFrame loadRequest:]
-__ZN20WebFrameLoaderClient9userAgentERKN7WebCore4KURLE
--[WebView(WebViewInternal) _userAgentForURL:]
-+[WebView(WebPrivate) _standardUserAgentWithApplicationName:]
-+[NSUserDefaults(WebNSUserDefaultsExtras) _webkit_preferredLanguageCode]
-+[NSUserDefaults(WebNSUserDefaultsExtras) _webkit_ensureAndLockPreferredLanguageLock]
-_makeLock
--[NSString(WebNSUserDefaultsPrivate) _webkit_HTTPStyleLanguageCode]
-_WKCopyCFLocalizationPreferredName
-+[NSUserDefaults(WebNSUserDefaultsExtras) _webkit_addDefaultsChangeObserver]
-_addDefaultsChangeObserver
__ZN20WebFrameLoaderClient17cancelPolicyCheckEv
-__ZN20WebFrameLoaderClient39dispatchDecidePolicyForNavigationActionEMN7WebCore11FrameLoaderEFvNS0_12PolicyActionEERKNS0_16Navig
+__ZN20WebFrameLoaderClient39dispatchDecidePolicyForNavigationActionEMN7WebCore13PolicyCheckerEFvNS0_12PolicyActionEERKNS0_16Nav
-[WebView(WebPrivate) _policyDelegateForwarder]
+[WebDefaultPolicyDelegate sharedPolicyDelegate]
-[_WebSafeForwarder initWithTarget:defaultTarget:catchExceptions:]
-__ZN20WebFrameLoaderClient19setUpPolicyListenerEMN7WebCore11FrameLoaderEFvNS0_12PolicyActionEE
+__ZN20WebFrameLoaderClient19setUpPolicyListenerEMN7WebCore13PolicyCheckerEFvNS0_12PolicyActionEE
+[WebFramePolicyListener initialize]
-[WebFramePolicyListener initWithWebCoreFrame:]
__ZNK20WebFrameLoaderClient16actionDictionaryERKN7WebCore16NavigationActionEN3WTF10PassRefPtrINS0_9FormStateEEE
@@ -353,8 +393,6 @@ __ZN20WebFrameLoaderClient26didChangeEstimatedProgressEv
__ZN20WebFrameLoaderClient31dispatchDidStartProvisionalLoadEv
-[WebView(WebPrivate) _didStartProvisionalLoadForFrame:]
-[WebView(WebPrivate) _willChangeBackForwardKeys]
-__Z42WebViewGetFrameLoadDelegateImplementationsP7WebView
-__Z21CallFrameLoadDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS2_S0_
-[WebDataSource isLoading]
-[WebDataSource request]
-[NSURL(WebNSURLExtras) _web_hostString]
@@ -364,163 +402,121 @@ __Z21CallFrameLoadDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS2_S0_
-[NSData(WebNSDataExtras) _web_isCaseInsensitiveEqualToCString:]
-[NSString(WebNSURLExtras) _web_decodeHostName]
-[NSString(WebNSURLExtras) _web_mapHostNameWithRange:encode:makeString:]
--[NSString(WebKitExtras) _webkit_isCaseInsensitiveEqualToString:]
-[WebDataSource unreachableURL]
-[NSURL(WebNSURLExtras) _web_userVisibleString]
+-[NSURL(WebNSURLExtras) _web_originalData]
__ZL12mapHostNamesP8NSStringa
-__ZN3WTF6VectorItLm2048EE6shrinkEm
+-[NSURL(WebNSURLExtras) _web_originalDataAsString]
-[WebView mainFrameURL]
-[WebBackForwardList currentItem]
__Z3kitPN7WebCore11HistoryItemE
--[WebView(WebPrivate) setDefersCallbacks:]
++[WebView(WebPrivate) _standardUserAgentWithApplicationName:]
++[NSUserDefaults(WebNSUserDefaultsExtras) _webkit_preferredLanguageCode]
++[NSUserDefaults(WebNSUserDefaultsExtras) _webkit_ensureAndLockPreferredLanguageLock]
+_makeLock
+-[NSString(WebNSUserDefaultsPrivate) _webkit_HTTPStyleLanguageCode]
+_WKCopyCFLocalizationPreferredName
++[NSUserDefaults(WebNSUserDefaultsExtras) _webkit_addDefaultsChangeObserver]
+_addDefaultsChangeObserver
__ZN20WebFrameLoaderClient32assignIdentifierToInitialRequestEmPN7WebCore14DocumentLoaderERKNS0_15ResourceRequestE
__Z45WebViewGetResourceLoadDelegateImplementationsP7WebView
__Z24CallResourceLoadDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS2_S0_S0_
-[WebView(WebViewInternal) _addObject:forIdentifier:]
__ZN3WTF7HashMapImNS_9RetainPtrIP11objc_objectEENS_7IntHashImEENS_10HashTraitsImEENS7_IS4_EEE3setERKmRKS4_
--[WebFramePolicyListener dealloc]
+__ZN3WTF9HashTableImSt4pairImNS_9RetainPtrIP11objc_objectEEENS_18PairFirstExtractorIS6_EENS_7IntHashImEENS_14PairHashTraitsINS_
+__ZN20WebFrameLoaderClient9userAgentERKN7WebCore4KURLE
+-[WebView userAgentForURL:]
+__ZN20WebFrameLoaderClient23dispatchWillSendRequestEPN7WebCore14DocumentLoaderEmRNS0_15ResourceRequestERKNS0_16ResourceResponse
+__ZN20WebDocumentLoaderMac17increaseLoadCountEm
+__ZNK3WTF9HashTableImmNS_17IdentityExtractorImEENS_7IntHashImEENS_10HashTraitsImEES6_E8containsImNS_22IdentityHashTranslatorImm
+__ZN3WTF7HashSetImNS_7IntHashImEENS_10HashTraitsImEEE3addERKm
+__ZN3WTF9HashTableImmNS_17IdentityExtractorImEENS_7IntHashImEENS_10HashTraitsImEES6_E6expandEv
+__ZN3WTF9HashTableImmNS_17IdentityExtractorImEENS_7IntHashImEENS_10HashTraitsImEES6_E6rehashEi
+__ZN3WTF9HashTableImmNS_17IdentityExtractorImEENS_7IntHashImEENS_10HashTraitsImEES6_E13allocateTableEi
+__ZN3WTF9HashTableImmNS_17IdentityExtractorImEENS_7IntHashImEENS_10HashTraitsImEES6_E15deallocateTableEPmi
+-[WebView(WebViewInternal) _objectForIdentifier:]
+__ZNK3WTF7HashMapImNS_9RetainPtrIP11objc_objectEENS_7IntHashImEENS_10HashTraitsImEENS7_IS4_EEE3getERKm
+__Z24CallResourceLoadDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS2_S0_S0_S0_S0_
+__ZN3WTF9HashTableIN7WebCore12AtomicStringESt4pairIS2_NS1_6StringEENS_18PairFirstExtractorIS5_EENS1_15CaseFoldingHashENS_14Pair
+__ZN3WTF6VectorIN7WebCore6StringELm0EEaSERKS3_
__ZN7WebCore19ResourceRequestBaseD2Ev
+__ZNK20WebFrameLoaderClient32representationExistsForURLSchemeERKN7WebCore6StringE
++[WebView(WebPrivate) _representationExistsForURLScheme:]
+_WKCreateNSURLConnectionDelegateProxy
+__ZN20WebFrameLoaderClient26shouldUseCredentialStorageEPN7WebCore14DocumentLoaderEm
+_WKSetNSURLRequestShouldContentSniff
+-[WebFramePolicyListener dealloc]
-[WebView(WebIBActions) canGoBack]
-[WebView(WebIBActions) canGoForward]
-[WebFrameView isOpaque]
+-[WebView _windowDidBecomeKey:]
-[WebHTMLView windowDidBecomeKey:]
_WKMouseMovedNotification
--[WebHTMLView(WebPrivate) _updateFocusedAndActiveState]
--[WebHTMLView(WebInternal) _frame]
--[WebView _updateFocusedAndActiveStateForFrame:]
--[WebHTMLView(WebInternal) _isResigningFirstResponder]
-[WebHTMLView _windowChangedKeyState]
-[WebHTMLView _updateControlTints]
--[WebHTMLView windowWillOrderOnScreen:]
+-[WebView _windowWillOrderOnScreen:]
-[WebView(WebPrivate) viewWillDraw]
--[WebFrameView drawRect:]
+-[WebHTMLView(WebPrivate) viewWillDraw]
+-[WebHTMLView(WebInternal) _web_layoutIfNeededRecursive]
+-[WebHTMLView(WebInternal) _layoutIfNeeded]
+-[NSView(WebHTMLViewFileInternal) _web_addDescendantWebHTMLViewsToArray:]
+-[WebHTMLView isOpaque]
-[WebHTMLView(WebPrivate) _recursiveDisplayAllDirtyWithLockFocus:visRect:]
-[WebHTMLView(WebPrivate) _setAsideSubviews]
+-[WebHTMLView drawRect:]
-[WebHTMLView(WebPrivate) _restoreSubviews]
+-[WebView(WebPrivate) _mustDrawUnionedRect:singleRects:count:]
+-[WebHTMLView drawSingleRect:]
+-[WebClipView setAdditionalClip:]
+-[WebHTMLView(WebPrivate) _transparentBackground]
+-[WebFrame(WebInternal) _drawRect:contentsOnly:]
+_WKCGContextIsBitmapContext
+-[WebView(WebPrivate) _UIDelegateForwarder]
++[WebDefaultUIDelegate sharedUIDelegate]
+-[WebView currentNodeHighlight]
+-[WebClipView resetAdditionalClip]
+-[WebView(WebViewInternal) _needsOneShotDrawingSynchronization]
-[WebHTMLView viewWillMoveToHostWindow:]
-[NSArray(WebHTMLView) _web_makePluginViewsPerformSelector:withObject:]
-[WebHTMLView viewDidMoveToHostWindow]
--[WebPreferences(WebPrivate) setRespectStandardStyleKeyEquivalents:]
--[WebPreferences _setBoolValue:forKey:]
--[NSMutableDictionary(WebNSDictionaryExtras) _webkit_setBool:forKey:]
-+[NSUserDefaults(WebNSUserDefaultsExtras) _webkit_defaultsDidChange]
-+[WebView(WebFileInternal) _cacheModel]
--[WebPreferences setPrivateBrowsingEnabled:]
--[WebPreferences(WebPrivate) setDOMPasteAllowed:]
--[WebPreferences setCacheModel:]
--[WebPreferences _setIntegerValue:forKey:]
--[WebPreferences(WebPrivate) setAutomaticallyDetectsCacheModel:]
-+[WebPreferences(WebPrivate) _setInitialDefaultTextEncodingToSystemEncoding]
-+[WebPreferences(WebPrivate) _systemCFStringEncoding]
-_WKGetWebDefaultCFStringEncoding
--[WebHistory init]
-+[WebHistoryPrivate initialize]
--[WebHistoryPrivate init]
--[WebHistory setHistoryAgeInDaysLimit:]
--[WebHistoryPrivate setHistoryAgeInDaysLimit:]
--[WebHistory setHistoryItemLimit:]
--[WebHistoryPrivate setHistoryItemLimit:]
--[WebHistory loadFromURL:error:]
--[WebHistoryPrivate loadFromURL:collectDiscardedItemsInto:error:]
--[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]
-+[WebHistory setOptionalSharedHistory:]
-+[WebIconDatabase allowDatabaseCleanup]
-[WebBackForwardList dealloc]
__ZL9setCursorP8NSWindowP13objc_selector7CGPoint
-[NSWindow(BorderViewAccess) _web_borderView]
-__ZN20WebFrameLoaderClient23dispatchWillSendRequestEPN7WebCore14DocumentLoaderEmRNS0_15ResourceRequestERKNS0_16ResourceResponse
-__ZN20WebDocumentLoaderMac17increaseLoadCountEm
-__ZNK3WTF9HashTableImmNS_17IdentityExtractorImEENS_7IntHashImEENS_10HashTraitsImEES6_E8containsImNS_22IdentityHashTranslatorImm
-__ZN3WTF7HashSetImNS_7IntHashImEENS_10HashTraitsImEEE3addERKm
-__ZN3WTF9HashTableImmNS_17IdentityExtractorImEENS_7IntHashImEENS_10HashTraitsImEES6_E6expandEv
-__ZN3WTF9HashTableImmNS_17IdentityExtractorImEENS_7IntHashImEENS_10HashTraitsImEES6_E6rehashEi
-__ZN3WTF9HashTableImmNS_17IdentityExtractorImEENS_7IntHashImEENS_10HashTraitsImEES6_E13allocateTableEi
-__ZN3WTF9HashTableImmNS_17IdentityExtractorImEENS_7IntHashImEENS_10HashTraitsImEES6_E15deallocateTableEPmi
--[WebView(WebViewInternal) _objectForIdentifier:]
-__ZNK3WTF7HashMapImNS_9RetainPtrIP11objc_objectEENS_7IntHashImEENS_10HashTraitsImEENS7_IS4_EEE3getERKm
-__Z24CallResourceLoadDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS2_S0_S0_S0_S0_
-__ZN3WTF9HashTableIN7WebCore12AtomicStringESt4pairIS2_NS1_6StringEENS_18PairFirstExtractorIS5_EENS1_15CaseFoldingHashENS_14Pair
-__ZN3WTF6VectorIN7WebCore6StringELm0EEaSERKS3_
-__ZN3WTF6VectorIN7WebCore6StringELm0EE6shrinkEm
-__ZNK20WebFrameLoaderClient32representationExistsForURLSchemeERKN7WebCore6StringE
-+[WebView(WebPrivate) _representationExistsForURLScheme:]
-_WKCreateNSURLConnectionDelegateProxy
-__ZN20WebFrameLoaderClient26shouldUseCredentialStorageEPN7WebCore14DocumentLoaderEm
-__ZL29_updateMouseoverTimerCallbackP16__CFRunLoopTimerPv
--[WebHTMLView(WebPrivate) _updateMouseoverWithFakeEvent]
--[WebHTMLView(WebPrivate) _updateMouseoverWithEvent:]
--[WebView estimatedProgress]
--[WebIconDatabase defaultIconForURL:withSize:]
-+[WebView(WebPrivate) _shouldUseFontSmoothing]
-+[WebView(WebPrivate) _setShouldUseFontSmoothing:]
--[NSString(WebKitExtras) _web_drawDoubledAtPoint:withTopColor:bottomColor:font:]
--[NSString(WebKitExtras) _web_drawAtPoint:font:textColor:]
-_WKCGContextGetShouldSmoothFonts
-_WKSetCGFontRenderingMode
--[NSString(WebKitExtras) _webkit_hasCaseInsensitivePrefix:]
-+[NSURL(WebNSURLExtras) _web_URLWithUserTypedString:]
-+[NSURL(WebNSURLExtras) _web_URLWithUserTypedString:relativeToURL:]
--[WebHistoryPrivate historyItemLimit]
--[WebHistoryPrivate ageLimitDate]
--[WebHistoryPrivate historyAgeInDaysLimit]
--[WebHistoryItem(WebInternal) initFromDictionaryRepresentation:]
--[NSDictionary(WebNSDictionaryExtras) _webkit_stringForKey:]
--[WebHistoryItem(WebInternal) initWithURLString:title:displayTitle:lastVisitedTimeInterval:]
--[WebHistoryItem(WebInternal) initWithWebCoreHistoryItem:]
-__ZL19historyItemWrappersv
-__ZN3WTF7HashMapIPN7WebCore11HistoryItemEP14WebHistoryItemNS_7PtrHashIS3_EENS_10HashTraitsIS3_EENS8_IS5_EEE3setERKS3_RKS5_
-__ZN3WTF9HashTableIPN7WebCore11HistoryItemESt4pairIS3_P14WebHistoryItemENS_18PairFirstExtractorIS7_EENS_7PtrHashIS3_EENS_14Pair
--[NSDictionary(WebNSDictionaryExtras) _webkit_intForKey:]
--[NSDictionary(WebNSDictionaryExtras) _webkit_numberForKey:]
--[NSDictionary(WebNSDictionaryExtras) _webkit_boolForKey:]
--[NSDictionary(WebNSDictionaryExtras) _webkit_arrayForKey:]
--[NSArray(WebNSArrayExtras) _webkit_numberAtIndex:]
--[WebHistoryItem URLString]
--[WebHistoryItem lastVisitedTimeInterval]
--[WebHistoryPrivate addItem:discardDuplicate:]
--[WebHistoryPrivate addItemToDateCaches:]
--[WebHistoryPrivate findKey:forDay:]
-__ZNK3WTF9HashTableIxSt4pairIxNS_9RetainPtrI14NSMutableArrayEEENS_18PairFirstExtractorIS5_EENS_7IntHashIyEENS_14PairHashTraitsI
-__ZN3WTF7HashMapIxNS_9RetainPtrI14NSMutableArrayEENS_7IntHashIyEENS_10HashTraitsIxEENS6_IS3_EEE3setERKxRKS3_
--[WebHistoryPrivate insertItem:forDateKey:]
-__ZNK3WTF7HashMapIxNS_9RetainPtrI14NSMutableArrayEENS_7IntHashIyEENS_10HashTraitsIxEENS6_IS3_EEE3getERKx
--[NSArray(WebNSArrayExtras) _webkit_stringAtIndex:]
-+[WebCoreStatistics setShouldPrintExceptions:]
--[WebHistory itemForURL:]
--[WebHistoryPrivate itemForURL:]
--[WebHistoryPrivate itemForURLString:]
-__ZN21WebIconDatabaseClient28dispatchDidAddIconForPageURLERKN7WebCore6StringE
--[WebIconDatabase(WebInternal) _sendNotificationForURL:]
--[NSNotificationCenter(WebNSNotificationCenterExtras) postNotificationOnMainThreadWithName:object:userInfo:]
--[NSNotificationCenter(WebNSNotificationCenterExtras) postNotificationOnMainThreadWithName:object:userInfo:waitUntilDone:]
-+[NSNotificationCenter(WebNSNotificationCenterExtras) _postNotificationName:]
-__ZN20WebFrameLoaderClient31dispatchDecidePolicyForMIMETypeEMN7WebCore11FrameLoaderEFvNS0_12PolicyActionEERKNS0_6StringERKNS0_1
++[WebBaseNetscapePluginView initialize]
+_WKSendUserChangeNotifications
+__ZN20WebFrameLoaderClient31dispatchDecidePolicyForMIMETypeEMN7WebCore13PolicyCheckerEFvNS0_12PolicyActionEERKNS0_6StringERKNS0
+[WebView canShowMIMEType:]
++[WebView _canShowMIMEType:allowingPlugins:]
__ZNK20WebFrameLoaderClient15canShowMIMETypeERKN7WebCore6StringE
+-[WebView _canShowMIMEType:]
__ZN20WebFrameLoaderClient26dispatchDidReceiveResponseEPN7WebCore14DocumentLoaderEmRKNS0_16ResourceResponseE
__Z24CallResourceLoadDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS2_S0_S0_S0_
__ZN20WebFrameLoaderClient17dispatchWillCloseEv
__ZN20WebFrameLoaderClient18makeRepresentationEPN7WebCore14DocumentLoaderE
-[WebDataSource(WebInternal) _makeRepresentation]
-+[WebDataSource(WebFileInternal) _representationClassForMIMEType:]
++[WebDataSource(WebFileInternal) _representationClassForMIMEType:allowingPlugins:]
-[WebHTMLRepresentation init]
-[WebDataSource(WebFileInternal) _setRepresentation:]
-[WebHTMLRepresentation setDataSource:]
+__ZN15WebEditorClient23clearUndoRedoOperationsEv
__ZN20WebDocumentLoaderMac15detachFromFrameEv
__ZN20WebDocumentLoaderMac17releaseDataSourceEv
-__Z26WKNotifyHistoryItemChangedv
+__Z26WKNotifyHistoryItemChangedPN7WebCore11HistoryItemE
+__ZNK20WebFrameLoaderClient29dispatchDidAddBackForwardItemEPN7WebCore11HistoryItemE
__ZN20WebFrameLoaderClient19updateGlobalHistoryEv
-+[WebHistory optionalSharedHistory]
--[WebHistory(WebInternal) _visitedURL:withTitle:method:wasFailure:]
--[WebHistoryPrivate visitedURL:withTitle:]
--[WebHistoryPrivate removeItemFromDateCaches:]
-__ZN3WTF9HashTableIxSt4pairIxNS_9RetainPtrI14NSMutableArrayEEENS_18PairFirstExtractorIS5_EENS_7IntHashIyEENS_14PairHashTraitsIN
--[WebHistoryItem(WebInternal) _visitedWithTitle:]
-__Z4coreP14WebHistoryItem
--[WebHistory _sendNotification:entries:]
--[WebHistoryItem originalURLString]
+-[WebView(WebPendingPublic) historyDelegate]
+__Z40WebViewGetHistoryDelegateImplementationsP7WebView
+-[WebNavigationData initWithURLString:title:originalRequest:response:hasSubstituteData:clientRedirectSource:]
+__Z19CallHistoryDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS2_S0_S0_
+-[WebNavigationData response]
+-[WebNavigationData clientRedirectSource]
+-[WebNavigationData hasSubstituteData]
+-[WebNavigationData originalRequest]
+-[WebNavigationData title]
+-[WebNavigationData url]
+-[WebNavigationData dealloc]
+-[WebNavigationDataPrivate dealloc]
__ZN20WebFrameLoaderClient32updateGlobalHistoryRedirectLinksEv
--[WebDynamicScrollBarsView(WebInternal) setScrollBarsSuppressed:repaintOnUnsuppress:]
-[WebDataSource dealloc]
-[WebDataSourcePrivate dealloc]
__ZN20WebDocumentLoaderMac16detachDataSourceEv
@@ -533,135 +529,62 @@ __ZN20WebFrameLoaderClient13committedLoadEPN7WebCore14DocumentLoaderEPKci
-[WebFrame(WebInternal) _receivedData:textEncodingName:]
__ZN20WebFrameLoaderClient21dispatchDidCommitLoadEv
-[WebView(WebPrivate) _didCommitLoadForFrame:]
--[WebDataSource pageTitle]
-[WebHTMLRepresentation title]
--[WebDataSource(WebInternal) _documentLoader]
-[WebView(WebPrivate) _setJavaScriptURLsAreAllowed:]
+__ZL19historyItemWrappersv
__ZNK3WTF7HashMapIPN7WebCore11HistoryItemEP14WebHistoryItemNS_7PtrHashIS3_EENS_10HashTraitsIS3_EENS8_IS5_EEE3getERKS3_
+-[WebHistoryItem(WebInternal) initWithWebCoreHistoryItem:]
+__ZN3WTF7HashMapIPN7WebCore11HistoryItemEP14WebHistoryItemNS_7PtrHashIS3_EENS_10HashTraitsIS3_EENS8_IS5_EEE3setERKS3_RKS5_
+__ZN3WTF9HashTableIPN7WebCore11HistoryItemESt4pairIS3_P14WebHistoryItemENS_18PairFirstExtractorIS7_EENS_7PtrHashIS3_EENS_14Pair
+-[WebView becomeFirstResponder]
+-[WebFrameView acceptsFirstResponder]
-[WebFrameView becomeFirstResponder]
-[WebHTMLView acceptsFirstResponder]
-[WebHTMLView becomeFirstResponder]
-[WebView(WebPrivate) _isPerformingProgrammaticFocus]
-__ZN15WebEditorClient10isEditableEv
--[WebView(WebViewEditing) isEditable]
-[WebHTMLView(WebInternal) _updateFontPanel]
-[WebHTMLView(WebPrivate) _canEdit]
+__ZL11isTextInputPN7WebCore5FrameE
-[WebFrame(WebInternal) _addData:]
__ZN20WebFrameLoaderClient15willChangeTitleEPN7WebCore14DocumentLoaderE
__ZN20WebFrameLoaderClient14didChangeTitleEPN7WebCore14DocumentLoaderE
__ZN20WebFrameLoaderClient8setTitleERKN7WebCore6StringERKNS0_4KURLE
--[WebHistoryItem(WebInternal) setTitle:]
__ZN20WebFrameLoaderClient23dispatchDidReceiveTitleERKN7WebCore6StringE
__Z21CallFrameLoadDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS2_S0_S0_
-__ZN20WebFrameLoaderClient19windowObjectClearedEv
--[WebView(WebPendingPublic) scriptDebugDelegate]
-__ZN15WebChromeClient18formStateDidChangeEPKN7WebCore4NodeE
+__ZN15WebChromeClient20populateVisitedLinksEv
+__Z19CallHistoryDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS2_
+-[WebView(WebPendingPublic) addVisitedLinks:]
+__ZN3WTF6VectorItLm512EE6shrinkEm
-[WebHTMLView dataSourceUpdated:]
__ZN20WebFrameLoaderClient39postProgressEstimateChangedNotificationEv
__ZN20WebFrameLoaderClient31dispatchDidReceiveContentLengthEPN7WebCore14DocumentLoaderEmi
__Z24CallResourceLoadDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS2_S0_lS0_
-__ZNK20WebFrameLoaderClient17willCacheResponseEPN7WebCore14DocumentLoaderEmP19NSCachedURLResponse
-[WebHTMLRepresentation finishedLoadingWithDataSource:]
-[WebHTMLRepresentation _isDisplayingWebArchive]
__ZN20WebFrameLoaderClient29dispatchDidFinishDocumentLoadEv
+__ZN20WebFrameLoaderClient29dispatchDidHandleOnloadEventsEv
+_WKSetUpFontCache
+__ZN20WebFrameLoaderClient38dispatchDidFirstVisuallyNonEmptyLayoutEv
__ZN20WebFrameLoaderClient27dispatchDidLoadMainResourceEPN7WebCore14DocumentLoaderE
+__ZN20WebFrameLoaderClient21dispatchDidFinishLoadEv
+-[WebView(WebPrivate) _didFinishLoadForFrame:]
+-[WebView(WebPrivate) _didChangeBackForwardKeys]
+-[WebHistoryItem(WebPrivate) _transientPropertyForKey:]
+__ZN20WebFrameLoaderClient32postProgressFinishedNotificationEv
__ZN20WebFrameLoaderClient24dispatchDidFinishLoadingEPN7WebCore14DocumentLoaderEm
-[WebView(WebViewInternal) _removeObjectForIdentifier:]
-__ZN3WTF9HashTableImSt4pairImNS_9RetainPtrIP11objc_objectEEENS_18PairFirstExtractorIS6_EENS_7IntHashImEENS_14PairHashTraitsINS_
__ZN20WebDocumentLoaderMac17decreaseLoadCountEm
__ZN3WTF9HashTableImmNS_17IdentityExtractorImEENS_7IntHashImEENS_10HashTraitsImEES6_E4findImNS_22IdentityHashTranslatorImmS4_EE
__ZN3WTF9HashTableImmNS_17IdentityExtractorImEENS_7IntHashImEENS_10HashTraitsImEES6_E47removeAndInvalidateWithoutEntryConsisten
__ZN3WTF9HashTableImmNS_17IdentityExtractorImEENS_7IntHashImEENS_10HashTraitsImEES6_E6removeEPm
++[NSUserDefaults(WebNSUserDefaultsExtras) _webkit_defaultsDidChange]
-[WebHTMLView(WebNSTextInputSupport) inputContext]
-__ZL11isTextInputPN7WebCore5FrameE
-__ZN15WebChromeClient20populateVisitedLinksEv
--[WebHistory(WebInternal) _addVisitedLinksToPageGroup:]
--[WebHistoryPrivate addVisitedLinksToPageGroup:]
-__ZN3WTF6VectorItLm512EE6shrinkEm
-_WKSetUpFontCache
-_WKGetFontInLanguageForRange
--[WebDynamicScrollBarsView(WebInternal) setScrollingModes:vertical:andLock:]
--[WebDynamicScrollBarsView(WebInternal) updateScrollers]
-_WKGetFontInLanguageForCharacter
--[WebHTMLView(WebInternal) _needsLayout]
--[WebFrame(WebInternal) _needsLayout]
-__ZN20WebFrameLoaderClient22dispatchDidFirstLayoutEv
-__ZN20WebFrameLoaderClient38dispatchDidFirstVisuallyNonEmptyLayoutEv
--[WebHTMLView(WebPrivate) viewWillDraw]
--[WebHTMLView(WebInternal) _web_layoutIfNeededRecursive]
--[WebHTMLView(WebInternal) _layoutIfNeeded]
--[NSView(WebHTMLViewFileInternal) _web_addDescendantWebHTMLViewsToArray:]
--[WebHTMLView isOpaque]
--[WebHTMLView drawRect:]
--[WebView(WebPrivate) _mustDrawUnionedRect:singleRects:count:]
--[WebHTMLView drawSingleRect:]
--[WebClipView setAdditionalClip:]
--[WebHTMLView(WebPrivate) _transparentBackground]
--[WebFrame(WebInternal) _drawRect:contentsOnly:]
-_WKDrawBezeledTextFieldCell
--[WebView(WebPrivate) _UIDelegateForwarder]
-+[WebDefaultUIDelegate sharedUIDelegate]
--[WebView currentNodeHighlight]
--[WebClipView resetAdditionalClip]
-__ZN20WebFrameLoaderClient22dispatchDidReceiveIconEv
--[WebView(WebViewInternal) _dispatchDidReceiveIconFromWebFrame:]
--[WebView(WebViewInternal) _registerForIconNotification:]
-__ZN15WebChromeClient14firstResponderEv
-__ZN15WebEditorClient19setInputMethodStateEb
-__ZN15WebEditorClient32isContinuousSpellCheckingEnabledEv
--[WebView(WebViewEditing) isContinuousSpellCheckingEnabled]
--[WebView(WebFileInternal) _continuousCheckingAllowed]
-__ZN15WebEditorClient24isGrammarCheckingEnabledEv
--[WebView(WebViewGrammarChecking) isGrammarCheckingEnabled]
-__ZN15WebEditorClient25respondToChangedSelectionEv
--[WebView selectedFrame]
--[WebView(WebFileInternal) _focusedFrame]
-__ZL19containingFrameViewP6NSView
--[WebHTMLView(WebInternal) _selectionChanged]
--[WebHTMLView(WebNSTextInputSupport) _updateSelectionForInputManager]
--[WebHTMLView(WebHTMLViewFileInternal) _frameView]
--[WebHTMLView(WebPrivate) _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
-_WKDrawFocusRing
-__ZNK15WebChromeClient18scrollRectIntoViewERKN7WebCore7IntRectEPKNS0_10ScrollViewE
--[WebViewFactory defaultLanguageCode]
-__ZN20WebFrameLoaderClient29dispatchDidHandleOnloadEventsEv
-__ZN20WebFrameLoaderClient21dispatchDidFinishLoadEv
--[WebView(WebPrivate) _didFinishLoadForFrame:]
--[WebView(WebPrivate) _didChangeBackForwardKeys]
--[WebFrame DOMDocument]
--[WebHistoryItem(WebPrivate) _transientPropertyForKey:]
-__ZN20WebFrameLoaderClient32postProgressFinishedNotificationEv
-__ZL17isInPasswordFieldPN7WebCore5FrameE
--[WebHTMLView(WebNSTextInputSupport) validAttributesForMarkedText]
--[WebHTMLRepresentation currentForm]
--[WebHTMLRepresentation controlsInForm:]
-__ZL25formElementFromDOMElementP10DOMElement
--[WebHTMLRepresentation elementIsPassword:]
-__ZL26inputElementFromDOMElementP10DOMElement
--[WebHTMLRepresentation elementDoesAutoComplete:]
--[WebView(WebPrivate) _globalHistoryItem]
--[WebHTMLView(WebDocumentPrivateProtocols) selectionView]
--[WebHTMLView(WebPrivate) _recursive:displayRectIgnoringOpacity:inContext:topView:]
--[WebHistoryItem initWithURLString:title:lastVisitedTimeInterval:]
--[WebHistoryItem(WebInternal) _recordInitialVisit]
--[WebHistory(WebPrivate) allItems]
--[WebHistoryPrivate allItems]
--[WebHistoryItem(WebPrivate) visitCount]
--[WebHistory(WebPrivate) _itemForURLString:]
--[WebFrame(WebPrivate) _isFrameSet]
--[WebHTMLView(WebDocumentPrivateProtocols) string]
--[WebHTMLView(WebHTMLViewFileInternal) _documentRange]
--[DOMDocument(WebDOMDocumentOperationsInternal) _documentRange]
--[DOMDocument(WebDOMDocumentOperationsInternal) _createRangeWithNode:]
--[WebFrame(WebInternal) _stringForRange:]
+_WKCGContextGetShouldSmoothFonts
+_WKSetCGFontRenderingMode
-[WebHTMLView mouseMovedNotification:]
-_WKGetMIMETypeForExtension
-_WKQTIncludeOnlyModernMediaFileTypes
-_WKQTMovieMaxTimeLoadedChangeNotification
--[WebFrame childFrames]
-_WKQTMovieMaxTimeLoaded
-_maxValueForTimeRanges
+-[WebHTMLView(WebPrivate) _updateMouseoverWithEvent:]
-[WebView(WebPendingPublic) isHoverFeedbackSuspended]
+__ZNK15WebChromeClient18platformPageClientEv
__ZN15WebChromeClient23mouseDidMoveOverElementERKN7WebCore13HitTestResultEj
+[WebElementDictionary initialize]
-[WebElementDictionary initWithHitTestResult:]
@@ -672,82 +595,95 @@ __Z14CallUIDelegateP7WebViewP13objc_selectorP11objc_objectm
-[WebElementDictionary objectForKey:]
-[WebElementDictionary _absoluteLinkURL]
-[WebElementDictionary dealloc]
-__ZN15WebChromeClient10setToolTipERKN7WebCore6StringE
+__ZN15WebChromeClient10setToolTipERKN7WebCore6StringENS0_13TextDirectionE
+-[WebView(WebViewEventHandling) _setToolTip:]
+-[WebView(WebViewInternal) _selectedOrMainFrame]
+-[WebView selectedFrame]
+-[WebView(WebFileInternal) _focusedFrame]
+__ZL19containingFrameViewP6NSView
-[WebHTMLView(WebPrivate) _setToolTip:]
+-[WebHTMLView(WebPrivate) _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
+__ZL29_updateMouseoverTimerCallbackP16__CFRunLoopTimerPv
+-[WebHTMLView(WebPrivate) _updateMouseoverWithFakeEvent]
+-[WebIconDatabase(WebInternal) _iconForFileURL:withSize:]
+-[WebIconDatabase(WebInternal) _iconsBySplittingRepresentationsOfIcon:]
+-[WebIconDatabase(WebInternal) _iconFromDictionary:forSize:cache:]
++[NSURL(WebNSURLExtras) _web_URLWithUserTypedString:]
++[NSURL(WebNSURLExtras) _web_URLWithUserTypedString:relativeToURL:]
+__ZL10isHexDigitc
+__ZL13hexDigitValuec
+-[WebFrame childFrames]
++[WebScriptWorld world]
+-[WebScriptWorld init]
+-[WebScriptWorld initWithWorld:]
+-[WebScriptWorldPrivate .cxx_construct]
+__ZL9allWorldsv
+__ZN3WTF7HashMapIPN7WebCore15DOMWrapperWorldEP14WebScriptWorldNS_7PtrHashIS3_EENS_10HashTraitsIS3_EENS8_IS5_EEE3addERKS3_RKS5_
+__ZN3WTF9HashTableIPN7WebCore15DOMWrapperWorldESt4pairIS3_P14WebScriptWorldENS_18PairFirstExtractorIS7_EENS_7PtrHashIS3_EENS_14
+-[WebScriptWorld unregisterWorld]
+-[WebScriptWorld dealloc]
+-[WebScriptWorldPrivate .cxx_destruct]
+-[WebView(WebPrivate) _globalHistoryItem]
+-[WebHistoryItem originalURLString]
+-[WebHTMLView(WebDocumentPrivateProtocols) selectionView]
+-[WebView(WebPrivate) _isSoftwareRenderable]
+-[WebHTMLView(WebPrivate) _recursive:displayRectIgnoringOpacity:inContext:topView:]
+-[WebView(WebPrivate) _includesFlattenedCompositingLayersWhenDrawingToBitmap]
+-[WebFrame(WebPrivate) _isFrameSet]
+-[WebHTMLView(WebDocumentPrivateProtocols) string]
+-[WebHTMLView(WebHTMLViewFileInternal) _documentRange]
+-[DOMDocument(WebDOMDocumentOperationsInternal) _documentRange]
+-[DOMDocument(WebDOMDocumentOperationsInternal) _createRangeWithNode:]
+-[WebFrame(WebInternal) _stringForRange:]
+-[NSString(WebKitExtras) _webkit_hasCaseInsensitivePrefix:]
+-[WebHTMLView updateCell:]
+-[WebView _windowDidResignKey:]
+-[WebHTMLView windowDidResignKey:]
+-[WebHTMLView removeMouseMovedObserver]
-[WebHTMLView shouldDelayWindowOrderingForEvent:]
-[WebHTMLView(WebHTMLViewFileInternal) _hitViewForEvent:]
-[WebHTMLView _isSelectionEvent:]
-[WebHTMLView(WebDocumentInternalProtocols) elementAtPoint:allowShadowContent:]
-[WebElementDictionary _isSelected]
--[WebHTMLView mouseDown:]
+-[WebHTMLView needsPanelToBecomeKey]
+-[WebHTMLView acceptsFirstMouse:]
-[WebHTMLView(WebHTMLViewFileInternal) _setMouseDownEvent:]
-__ZN15WebEditorClient22textFieldDidEndEditingEPN7WebCore7ElementE
-__Z16CallFormDelegateP7WebViewP13objc_selectorP11objc_objectS4_
-__ZN15WebEditorClient25shouldChangeSelectedRangeEPN7WebCore5RangeES2_NS0_9EAffinityEb
--[WebView(WebViewEditing) _shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]
--[WebView(WebPrivate) _editingDelegateForwarder]
-+[WebDefaultEditingDelegate sharedEditingDelegate]
--[WebDefaultEditingDelegate webView:shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]
--[WebHTMLView mouseDragged:]
-__ZN13WebDragClient28dragSourceActionMaskForPointERKN7WebCore8IntPointE
--[WebDefaultUIDelegate webView:dragSourceActionMaskForPoint:]
--[WebHTMLView mouseUp:]
--[WebHTMLView layout]
--[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]
--[WebHTMLView reapplyStyles]
+-[WebHTMLView _isScrollBarEvent:]
+-[WebElementDictionary _isInScrollBar]
+-[WebHTMLView scrollWheel:]
+_WKIsLatchingWheelEvent
+_WKGetWheelEventDeltas
+-[WebClipView scrollWheel:]
+-[WebDynamicScrollBarsView(WebInternal) scrollWheel:]
+-[WebDynamicScrollBarsView(WebInternal) allowsVerticalScrolling]
+-[WebDynamicScrollBarsView(WebInternal) autoforwardsScrollWheelEvents]
+-[WebClipView _immediateScrollToPoint:]
+-[WebHTMLView(WebHTMLViewFileInternal) _frameView]
+-[WebBackForwardList backListCount]
+-[WebBackForwardList forwardListCount]
+-[WebBackForwardList itemAtIndex:]
-[WebHistoryItem title]
--[WebDataSource(WebPrivate) _mainDocumentError]
--[WebHistory orderedLastVisitedDays]
--[WebHistoryPrivate orderedLastVisitedDays]
-__ZN3WTF6VectorIiLm0EE15reserveCapacityEm
-__ZSt16__introsort_loopIPilEvT_S1_T0_
-__ZSt22__final_insertion_sortIPiEvT_S1_
-__ZSt16__insertion_sortIPiEvT_S1_
-__ZN3WTF6VectorIiLm0EE6shrinkEm
--[WebHistory orderedItemsLastVisitedOnDay:]
--[WebHistoryPrivate orderedItemsLastVisitedOnDay:]
--[WebView(WebPrivate) _isClosed]
--[WebFrameView(WebPrivate) _contentView]
--[WebHTMLView resignFirstResponder]
--[WebHTMLView updateCell:]
--[WebHTMLView maintainsInactiveSelection]
--[WebView(WebViewEditing) maintainsInactiveSelection]
--[WebView(WebPendingPublic) setHoverFeedbackSuspended:]
--[WebHTMLView(WebInternal) _hoverFeedbackSuspendedChanged]
--[WebView elementAtPoint:]
--[WebView _elementAtWindowPoint:]
--[WebView(WebFileInternal) _frameViewAtWindowPoint:]
--[WebHTMLView(WebDocumentInternalProtocols) elementAtPoint:]
--[WebElementDictionary _domNode]
--[DOMDocument(WebDOMDocumentOperations) webFrame]
--[WebHistory(WebPrivate) _data]
--[WebHistoryPrivate data]
-__ZN16WebHistoryWriterC1EPN3WTF7HashMapIxNS0_9RetainPtrI14NSMutableArrayEENS0_7IntHashIyEENS0_10HashTraitsIxEENS7_IS4_EEEE
-__ZN16WebHistoryWriterC2EPN3WTF7HashMapIxNS0_9RetainPtrI14NSMutableArrayEENS0_7IntHashIyEENS0_10HashTraitsIxEENS7_IS4_EEEE
-__ZN16WebHistoryWriter17writeHistoryItemsERN7WebCore30BinaryPropertyListObjectStreamE
-__ZN7WebCore25HistoryPropertyListWriterD2Ev
--[WebView becomeFirstResponder]
--[WebFrameView acceptsFirstResponder]
--[WebHTMLView(WebDocumentPrivateProtocols) deselectAll]
--[WebHTMLView clearFocus]
--[WebView textSizeMultiplier]
--[WebView customTextEncodingName]
--[WebView _mainFrameOverrideEncoding]
--[WebPreferences userStyleSheetLocation]
--[NSString(WebNSURLExtras) _webkit_looksLikeAbsoluteURL]
--[NSString(WebNSURLExtras) _webkit_rangeOfURLScheme]
-__ZN20WebFrameLoaderClient33dispatchWillPerformClientRedirectERKN7WebCore4KURLEdd
-__Z21CallFrameLoadDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS2_S0_dS0_S0_
+__ZN3WTF6VectorItLm2048EE6shrinkEm
+-[WebFrame provisionalDataSource]
+-[WebFrame dataSource]
+-[WebView estimatedProgress]
+-[WebIconDatabase iconForURL:withSize:]
+-[WebIconDatabase iconForURL:withSize:cache:]
+-[NSString(WebNSURLExtras) _webkit_isFileURL]
+__Z13webGetNSImagePN7WebCore5ImageE6CGSize
+-[WebFrame DOMDocument]
+__ZL44needsMicrosoftMessengerDOMDocumentWorkaroundv
__ZNK20WebFrameLoaderClient29generatedMIMETypeForURLSchemeERKN7WebCore6StringE
-__ZNK20WebFrameLoaderClient25didPerformFirstNavigationEv
--[WebPreferences(WebPrivate) automaticallyDetectsCacheModel]
-__ZN20WebFrameLoaderClient19saveViewStateToItemEPN7WebCore11HistoryItemE
--[WebHistory removeItems:]
--[WebHistoryPrivate removeItems:]
--[WebHistoryPrivate removeItem:]
--[WebHistoryPrivate removeItemForURLString:]
-__ZN20WebFrameLoaderClient31dispatchDidCancelClientRedirectEv
+-[WebIconDatabase defaultIconForURL:withSize:]
+__ZN21WebIconDatabaseClient28dispatchDidAddIconForPageURLERKN7WebCore6StringE
+-[WebIconDatabase(WebInternal) _sendNotificationForURL:]
+-[NSNotificationCenter(WebNSNotificationCenterExtras) postNotificationOnMainThreadWithName:object:userInfo:]
+-[NSNotificationCenter(WebNSNotificationCenterExtras) postNotificationOnMainThreadWithName:object:userInfo:waitUntilDone:]
++[WebView(WebPrivate) _shouldUseFontSmoothing]
++[WebView(WebPrivate) _setShouldUseFontSmoothing:]
+-[NSString(WebKitExtras) _web_drawAtPoint:font:textColor:]
-[WebHistoryItem dealloc]
+-[WebIconDatabase releaseIconForURL:]
-[WebHTMLView dealloc]
-[WebHTMLView(WebPrivate) close]
-[WebHTMLView(WebPrivate) _clearLastHitViewIfSelf]
@@ -755,36 +691,125 @@ __ZN20WebFrameLoaderClient31dispatchDidCancelClientRedirectEv
-[WebPluginController _cancelOutstandingChecks]
-[WebHTMLViewPrivate clear]
-[WebPluginController dealloc]
--[WebHTMLRepresentation dealloc]
-[WebHTMLViewPrivate dealloc]
--[WebElementDictionary _webFrame]
--[WebElementDictionary _targetWebFrame]
--[NSURL(WebNSURLExtras) _webkit_URLByRemovingFragment]
--[NSURL(WebNSURLExtras) _webkit_URLByRemovingComponent:]
-__ZL10isHexDigitc
-__ZL13hexDigitValuec
-__ZL32applyHostNameFunctionToURLStringP8NSStringPFvS0_8_NSRangePvES2_
-__ZL29collectRangesThatNeedEncodingP8NSString8_NSRangePv
-__ZL28collectRangesThatNeedMappingP8NSString8_NSRangePva
--[NSString(WebNSURLExtras) _web_hostNameNeedsEncodingWithRange:]
--[WebHTMLView(WebPrivate) addTrackingRect:owner:userData:assumeInside:]
--[WebHTMLView(WebPrivate) _sendToolTipMouseEntered]
--[WebHTMLView(WebPrivate) _sendToolTipMouseExited]
--[WebHTMLView windowDidResignKey:]
--[WebHTMLView removeMouseMovedObserver]
++[NSNotificationCenter(WebNSNotificationCenterExtras) _postNotificationName:]
++[WebView(WebPrivate) _pointingHandCursor]
++[WebView(WebFileInternal) _cacheModel]
++[WebHTMLView(WebPrivate) _postFlagsChangedEvent:]
+-[WebHTMLView flagsChanged:]
+__ZN15WebEditorClient24handleInputMethodKeydownEPN7WebCore13KeyboardEventE
+-[WebHTMLView(WebInternal) _interceptEditingKeyEvent:shouldSaveCommand:]
+__ZN15WebEditorClient19handleKeyboardEventEPN7WebCore13KeyboardEventE
+-[WebHTMLView performKeyEquivalent:]
+-[WebHTMLView _handleStyleKeyEquivalent:]
+-[WebPreferences(WebPrivate) respectStandardStyleKeyEquivalents]
+-[WebHTMLView(WebNSTextInputSupport) doCommandBySelector:]
+-[WebHTMLView resignFirstResponder]
+-[WebHTMLView maintainsInactiveSelection]
+-[WebView hostWindow]
+-[WebView acceptsFirstResponder]
+-[WebView(WebViewEditing) maintainsInactiveSelection]
+-[WebHTMLView(WebDocumentPrivateProtocols) deselectAll]
+-[WebHTMLView clearFocus]
+-[NSView(WebExtras) _web_dragShouldBeginFromMouseDown:withExpiration:xHysteresis:yHysteresis:]
+-[WebClipView _focusRingVisibleRect]
+-[WebHistoryItem URLString]
+-[WebView(WebPendingPublic) shouldClose]
-[WebWindowWatcher windowWillClose:]
+-[WebView _windowWillClose:]
+-[WebView shouldCloseWithWindow]
+-[WebView(WebPrivate) _isClosed]
+-[WebView(WebPrivate) _clearUndoRedoOperations]
+-[WebView close]
+-[WebView(WebPrivate) _close]
+-[WebView(AllWebViews) _removeFromAllWebViewsSet]
+-[WebView(WebViewEventHandling) _closingEventHandling]
+-[WebView(WebViewInternal) _exitFullscreen]
+__ZN20WebFrameLoaderClient19saveViewStateToItemEPN7WebCore11HistoryItemE
+__ZN20WebFrameLoaderClient19detachedFromParent2Ev
+__ZN20WebFrameLoaderClient19detachedFromParent3Ev
+-[WebView(WebPendingPublic) setScriptDebugDelegate:]
+-[WebView(WebPrivate) _cacheScriptDebugDelegateImplementations]
+-[WebView(WebPrivate) _detachScriptDebuggerFromAllFrames]
+-[WebFrame(WebInternal) _detachScriptDebugger]
+-[WebView removeDragCaret]
+__ZN15WebEditorClient13pageDestroyedEv
+__ZN15WebEditorClientD0Ev
+__ZN18WebInspectorClient18inspectorDestroyedEv
+__ZN18WebInspectorClientD0Ev
+-[WebNodeHighlighter dealloc]
+__ZN21WebPluginHalterClientD0Ev
+__ZN20WebFrameLoaderClient20frameLoaderDestroyedEv
+-[WebFrame(WebInternal) _clearCoreFrame]
+__ZN20WebFrameLoaderClientD0Ev
+-[WebFrame dealloc]
+-[WebFramePrivate dealloc]
+__ZN30WebGeolocationControllerClient20geolocationDestroyedEv
+__ZN30WebGeolocationControllerClientD0Ev
+__ZN20WebContextMenuClient20contextMenuDestroyedEv
+__ZN20WebContextMenuClientD0Ev
+__ZN13WebDragClient23dragControllerDestroyedEv
+__ZN13WebDragClientD0Ev
+__ZN15WebChromeClient15chromeDestroyedEv
+__ZN15WebChromeClientD0Ev
+-[WebView(WebFileInternal) _clearLayerSyncLoopObserver]
+-[WebView preferencesIdentifier]
+-[WebPreferences identifier]
++[WebPreferences(WebPrivate) _removeReferenceForIdentifier:]
+-[WebPreferences(WebPrivate) didRemoveFromWebView]
+-[WebView(WebPrivate) _closePluginDatabases]
+-[WebView dealloc]
+-[WebViewPrivate dealloc]
+-[WebViewPrivate .cxx_destruct]
+-[WebFrameView dealloc]
+-[WebFrameViewPrivate dealloc]
+-[WebDynamicScrollBarsView dealloc]
+-[WebHTMLRepresentation dealloc]
+-[NSString(WebNSURLExtras) _webkit_scriptIfJavaScriptURL]
+-[NSString(WebNSURLExtras) _webkit_isJavaScriptURL]
+-[WebView(WebPrivate) setDefersCallbacks:]
+__ZN3WTF6VectorIN7WebCore6StringELm0EE6shrinkEm
+_WKCopyNSURLResponseStatusLine
__ZNK20WebFrameLoaderClient12canCachePageEv
+__ZNK20WebFrameLoaderClient25didPerformFirstNavigationEv
+-[WebPreferences(WebPrivate) automaticallyDetectsCacheModel]
+__ZN20WebFrameLoaderClient35dispatchDidClearWindowObjectInWorldEPN7WebCore15DOMWrapperWorldE
++[WebScriptWorld(WebInternal) findOrCreateWorld:]
++[WebScriptWorld standardWorld]
+-[WebFrame windowObject]
+-[WebFrameView drawRect:]
+__ZNK7WebCore12ChromeClient27didReceiveViewportArgumentsEPNS_5FrameERKNS_17ViewportArgumentsE
+__ZN15WebChromeClient18formStateDidChangeEPKN7WebCore4NodeE
__ZN20WebFrameLoaderClient11createFrameERKN7WebCore4KURLERKNS0_6StringEPNS0_21HTMLFrameOwnerElementES6_bii
+[WebFrame(WebInternal) _createSubframeWithOwnerElement:frameName:frameView:]
-[WebHTMLView addSubview:]
+[WebPluginController isPlugInView:]
-[WebFrame parentFrame]
-_WKSetNSURLConnectionDefersCallbacks
-__ZL41_updateFocusedAndActiveStateTimerCallbackP16__CFRunLoopTimerPv
-_haltTimerFired
-__ZN20WebFrameLoaderClient17objectContentTypeERKN7WebCore4KURLERKNS0_6StringE
-_WKSetNSURLRequestShouldContentSniff
-__ZN20WebFrameLoaderClient39dispatchDidLoadResourceByXMLHttpRequestEmRKN7WebCore12ScriptStringE
+__ZN7WebCore17FrameLoaderClient11allowImagesEb
+__ZN15WebChromeClient16statusbarVisibleEv
+__Z30CallUIDelegateReturningBooleanaP7WebViewP13objc_selector
+__ZNK20WebFrameLoaderClient17willCacheResponseEPN7WebCore14DocumentLoaderEmP19NSCachedURLResponse
+-[WebFrame(WebPrivate) _globalContextForScriptWorld:]
+__Z4coreP14WebScriptWorld
+__ZN3WTF9HashTableINS_6RefPtrIN7WebCore15DOMWrapperWorldEEESt4pairIS4_N3JSC12ProtectedPtrINS2_16JSDOMWindowShellEEEENS_18PairFi
+__ZNK3WTF7HashMapIPN7WebCore15DOMWrapperWorldEP14WebScriptWorldNS_7PtrHashIS3_EENS_10HashTraitsIS3_EENS8_IS5_EEE3getERKS3_
+__ZN15WebChromeClient12formDidFocusEPKN7WebCore4NodeE
+__ZN15WebChromeClient14firstResponderEv
+__ZN15WebChromeClient18focusedNodeChangedEPN7WebCore4NodeE
+__ZN15WebEditorClient19setInputMethodStateEb
+__ZN15WebEditorClient32isContinuousSpellCheckingEnabledEv
+-[WebView(WebViewEditing) isContinuousSpellCheckingEnabled]
+-[WebView(WebFileInternal) _continuousCheckingAllowed]
+__ZN15WebEditorClient24isGrammarCheckingEnabledEv
+-[WebView(WebViewGrammarChecking) isGrammarCheckingEnabled]
+__ZN15WebEditorClient25respondToChangedSelectionEv
+-[WebView(WebViewInternal) _selectionChanged]
+-[WebHTMLView(WebInternal) _selectionChanged]
+-[WebHTMLView(WebNSTextInputSupport) _updateSelectionForInputManager]
+__ZL17isInPasswordFieldPN7WebCore5FrameE
+-[WebHTMLView(WebNSTextInputSupport) validAttributesForMarkedText]
+__ZNK15WebChromeClient18scrollRectIntoViewERKN7WebCore7IntRectEPKNS0_10ScrollViewE
+__ZN7WebCore17FrameLoaderClient12allowPluginsEb
-[WebViewFactory pluginsInfo]
+[WebPluginDatabase sharedDatabase]
-[WebPluginDatabase init]
@@ -809,11 +834,6 @@ __ZN20WebFrameLoaderClient39dispatchDidLoadResourceByXMLHttpRequestEmRKN7WebCore
-[WebBasePluginPackage filename]
-[WebBasePluginPackage setName:]
-[WebBasePluginPackage setPluginDescription:]
--[WebNetscapePluginPackage getPluginInfoFromResources]
--[WebNetscapePluginPackage openResourceFile]
--[WebNetscapePluginPackage stringForStringListID:andIndex:]
-+[NSString(WebKitExtras) _web_encodingForResource:]
--[WebNetscapePluginPackage closeResourceFile:]
-[WebBasePluginPackage isNativeLibraryData:]
__ZN3WTF6VectorIhLm512EE6shrinkEm
-[WebBasePluginPackage pListForPath:createFile:]
@@ -828,396 +848,65 @@ __ZN3WTF6VectorIhLm512EE6shrinkEm
-[WebBasePluginPackage MIMETypeEnumerator]
-[WebPluginDatabase pluginForMIMEType:]
-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]
--[WebNetscapePluginPackage executableType]
__ZL14checkCandidatePP20WebBasePluginPackageS1_
-[WebBasePluginPackage isQuickTimePlugIn]
-[WebBasePluginPackage bundle]
-[WebBasePluginPackage isJavaPlugIn]
+-[WebNetscapePluginPackage executableType]
+[WebHTMLView(WebPrivate) supportedImageMIMETypes]
+[WebHTMLRepresentation supportedImageMIMETypes]
++[WebView(WebPrivate) _registerPluginMIMEType:]
__ZN3WTF7HashSetIN7WebCore6StringENS1_10StringHashENS_10HashTraitsIS2_EEE3addERKS2_
+__ZL20knownPluginMIMETypesv
__ZN3WTF9HashTableIN7WebCore6StringES2_NS_17IdentityExtractorIS2_EENS1_10StringHashENS_10HashTraitsIS2_EES7_E6expandEv
__ZN3WTF9HashTableIN7WebCore6StringES2_NS_17IdentityExtractorIS2_EENS1_10StringHashENS_10HashTraitsIS2_EES7_E6rehashEi
__ZN3WTF9HashTableIN7WebCore6StringES2_NS_17IdentityExtractorIS2_EENS1_10StringHashENS_10HashTraitsIS2_EES7_E13allocateTableEi
__ZN3WTF9HashTableIN7WebCore6StringES2_NS_17IdentityExtractorIS2_EENS1_10StringHashENS_10HashTraitsIS2_EES7_E15deallocateTableE
__ZN3WTF9HashTableIN7WebCore6StringES2_NS_17IdentityExtractorIS2_EENS1_10StringHashENS_10HashTraitsIS2_EES7_E4findIS2_NS_22Iden
--[WebBasePluginPackage versionNumber]
-[WebPluginDatabase plugins]
-[WebBasePluginPackage name]
-[WebBasePluginPackage pluginDescription]
-[WebBasePluginPackage extensionsForMIMEType:]
-[WebBasePluginPackage descriptionForMIMEType:]
-__ZN15WebChromeClient19addMessageToConsoleEN7WebCore13MessageSourceENS0_12MessageLevelERKNS0_6StringEjS5_
-__ZN20WebFrameLoaderClient22dispatchDidFailLoadingEPN7WebCore14DocumentLoaderEmRKNS0_13ResourceErrorE
--[WebHTMLView setNeedsLayout:]
--[WebIconDatabase(WebInternal) _iconForFileURL:withSize:]
--[WebIconDatabase(WebInternal) _iconsBySplittingRepresentationsOfIcon:]
--[WebIconDatabase(WebInternal) _iconFromDictionary:forSize:cache:]
--[WebHistoryItem alternateTitle]
--[WebHistoryItem setAlternateTitle:]
--[WebHistoryItem(WebPrivate) URL]
--[WebBackForwardList forwardListCount]
--[WebBackForwardList backListCount]
--[WebBackForwardList itemAtIndex:]
-+[WebView(WebPrivate) canCloseAllWebViews]
--[WebIconDatabase(WebInternal) _applicationWillTerminate:]
-+[WebView _applicationWillTerminate]
-__ZL27fastDocumentTeardownEnabledv
-+[WebView(WebPrivate) closeAllWebViews]
--[WebView(WebPrivate) _clearUndoRedoOperations]
--[WebView close]
--[WebView(WebPrivate) _close]
--[WebView(WebPrivate) _closeWithFastTeardown]
--[WebView(WebPrivate) _closePluginDatabases]
-+[WebPluginDatabase closeSharedDatabase]
--[WebView _windowWillClose:]
--[WebView shouldCloseWithWindow]
--[WebHTMLView windowWillClose:]
--[NSEvent(WebExtras) _web_isOptionTabKeyEvent]
--[WebFrame(WebPrivate) _isDisplayingStandaloneImage]
--[WebView(WebPendingPublic) markAllMatchesForText:caseSensitive:highlight:limit:]
--[WebHTMLView(WebDocumentInternalProtocols) setMarkedTextMatchesAreHighlighted:]
--[WebHTMLView(WebDocumentInternalProtocols) markAllMatchesForText:caseSensitive:limit:]
-__ZL14incrementFrameP8WebFrameaa
--[WebView(WebPendingPublic) unmarkAllTextMatches]
--[WebHTMLView(WebDocumentInternalProtocols) unmarkAllTextMatches]
--[WebDynamicScrollBarsView setAllowsHorizontalScrolling:]
--[WebDynamicScrollBarsView(WebInternal) accessibilityIsIgnored]
-+[NSPasteboard(WebExtras) _web_setFindPasteboardString:withOwner:]
+__ZN20WebFrameLoaderClient33dispatchDidReplaceStateWithinPageEv
+__ZN15WebEditorClient27doTextFieldCommandFromEventEPN7WebCore7ElementEPNS0_13KeyboardEventE
__ZN20WebFrameLoaderClient50dispatchDidReceiveServerRedirectForProvisionalLoadEv
-__ZN20WebFrameLoaderClient29savePlatformDataToCachedFrameEPN7WebCore11CachedFrameE
-+[WebStringTruncator centerTruncateString:toWidth:]
-__ZL15defaultMenuFontv
+__ZN20WebFrameLoaderClient37canAuthenticateAgainstProtectionSpaceEPN7WebCore14DocumentLoaderEmRKNS0_15ProtectionSpaceE
+__Z40CallResourceLoadDelegateReturningBooleanaPFP11objc_objectS0_P13objc_selectorzEP7WebViewS2_S0_S0_S0_
+__ZN20WebFrameLoaderClient22dispatchDidReceiveIconEv
+-[WebView(WebViewInternal) _dispatchDidReceiveIconFromWebFrame:]
+-[WebView(WebViewInternal) _registerForIconNotification:]
+__Z19CallHistoryDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS2_S0_S0_S0_
+__ZN20WebFrameLoaderClient25didDisplayInsecureContentEv
+__Z21CallFrameLoadDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS2_
+__ZN15WebEditorClient22textFieldDidEndEditingEPN7WebCore7ElementE
+__Z16CallFormDelegateP7WebViewP13objc_selectorP11objc_objectS4_
+__ZN15WebChromeClient11formDidBlurEPKN7WebCore4NodeE
-[WebClipView additionalClip]
+_WKSetNSURLConnectionDefersCallbacks
+__ZN20WebFrameLoaderClient21didRunInsecureContentEPN7WebCore14SecurityOriginE
+-[WebSecurityOrigin(WebInternal) _initWithWebCoreSecurityOrigin:]
+-[WebSecurityOrigin dealloc]
+__ZN20WebFrameLoaderClient33dispatchWillPerformClientRedirectERKN7WebCore4KURLEdd
+__Z21CallFrameLoadDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS2_S0_dS0_S0_
-[WebHTMLView willRemoveSubview:]
-__ZN20WebFrameLoaderClient19detachedFromParent2Ev
-__ZN20WebFrameLoaderClient19detachedFromParent3Ev
--[WebFrameView dealloc]
--[WebFrameViewPrivate dealloc]
-__ZN20WebFrameLoaderClient20frameLoaderDestroyedEv
--[WebFrame(WebInternal) _clearCoreFrame]
-__ZN20WebFrameLoaderClientD0Ev
--[WebFrame dealloc]
--[WebFramePrivate dealloc]
--[NSView(WebExtras) _web_dragShouldBeginFromMouseDown:withExpiration:xHysteresis:yHysteresis:]
--[NSString(WebNSURLExtras) _webkit_scriptIfJavaScriptURL]
--[NSString(WebNSURLExtras) _webkit_isJavaScriptURL]
--[WebHTMLView(WebPrivate) _removeTrackingRects:count:]
--[WebHTMLView(WebPrivate) _addTrackingRect:owner:userData:assumeInside:useTrackingNum:]
--[WebView _hitTest:dragTypes:]
--[WebView draggingEntered:]
--[WebView documentViewAtWindowPoint:]
-__ZN13WebDragClient17actionMaskForDragEPN7WebCore8DragDataE
--[WebDefaultUIDelegate webView:dragDestinationActionMaskForDraggingInfo:]
-__ZNK19WebPasteboardHelper25insertablePasteboardTypesEv
-__ZNK19WebPasteboardHelper17urlFromPasteboardEPK12NSPasteboardPN7WebCore6StringE
--[NSPasteboard(WebExtras) _web_bestURL]
--[WebView draggingUpdated:]
--[WebView _shouldAutoscrollForDraggingInfo:]
--[WebView prepareForDragOperation:]
--[WebView performDragOperation:]
-__ZN13WebDragClient32willPerformDragDestinationActionEN7WebCore21DragDestinationActionEPNS0_8DragDataE
--[WebDefaultUIDelegate webView:willPerformDragDestinationAction:forDraggingInfo:]
--[WebHTMLView scrollWheel:]
-_WKGetWheelEventDeltas
--[WebClipView scrollWheel:]
--[WebDynamicScrollBarsView(WebInternal) scrollWheel:]
--[WebDynamicScrollBarsView(WebInternal) allowsVerticalScrolling]
--[WebDynamicScrollBarsView(WebInternal) autoforwardsScrollWheelEvents]
--[DOMNode(WebDOMNodeOperations) webArchive]
--[WebArchive(WebInternal) _initWithCoreLegacyWebArchive:]
-+[WebArchivePrivate initialize]
--[WebArchivePrivate .cxx_construct]
--[WebArchivePrivate initWithCoreArchive:]
--[WebArchive data]
--[WebArchivePrivate coreArchive]
--[WebArchive dealloc]
--[WebArchivePrivate dealloc]
--[WebArchivePrivate .cxx_destruct]
--[WebHTMLView needsPanelToBecomeKey]
--[WebHTMLView acceptsFirstMouse:]
--[NSView(WebExtras) _web_dragShouldBeginFromMouseDown:withExpiration:]
-+[WebPreferences(WebInternal) _concatenateKeyWithIBCreatorID:]
--[WebPreferences setJavaEnabled:]
--[WebPreferences setJavaScriptEnabled:]
--[WebPreferences setUserStyleSheetEnabled:]
--[WebPreferences setPlugInsEnabled:]
--[WebPreferences setAllowsAnimatedImages:]
--[WebPreferences setLoadsImagesAutomatically:]
--[WebPreferences setShouldPrintBackgrounds:]
--[WebPreferences(WebPrivate) setEditableLinkBehavior:]
--[NSMutableDictionary(WebNSDictionaryExtras) _webkit_setInt:forKey:]
--[WebPreferences setMinimumFontSize:]
--[WebPreferences setDefaultTextEncodingName:]
--[WebPreferences _setStringValue:forKey:]
--[WebPreferences setUserStyleSheetLocation:]
--[WebPreferences setStandardFontFamily:]
--[WebPreferences setDefaultFontSize:]
--[WebPreferences setFixedFontFamily:]
--[WebPreferences setDefaultFixedFontSize:]
--[WebPreferences setMinimumLogicalFontSize:]
-+[WebCache initialize]
-+[WebCache setDisabled:]
--[WebPreferences setJavaScriptCanOpenWindowsAutomatically:]
--[WebPreferences setAllowsAnimatedImageLooping:]
--[WebView initWithFrame:]
--[WebView initWithFrame:frameName:groupName:]
-__ZL32needsWebViewInitThreadWorkaroundv
--[WebView setPreferences:]
--[WebPreferences identifier]
-+[WebPreferences(WebPrivate) _removeReferenceForIdentifier:]
--[WebPreferences(WebPrivate) didRemoveFromWebView]
-+[WebView(WebFileInternal) _preferencesRemovedNotification:]
-+[WebView(WebFileInternal) _maxCacheModelInAnyInstance]
--[WebFrame loadData:MIMEType:textEncodingName:baseURL:]
--[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]
-__ZL22createUniqueWebDataURLv
--[WebFrame stopLoading]
--[WebView setPreferencesIdentifier:]
--[WebPreferences dealloc]
--[WebPreferencesPrivate dealloc]
--[WebFrame loadHTMLString:baseURL:]
--[WebFrame _loadHTMLString:baseURL:unreachableURL:]
--[WebFrameView setAllowsScrolling:]
--[WebDefaultUIDelegate webView:didDrawRect:]
--[WebView setTextSizeMultiplier:]
--[WebPreferences(WebPrivate) setShowsURLsInToolTips:]
--[WebView(WebPrivate) textIteratorForRect:]
--[WebTextIterator initWithRange:]
-+[WebTextIteratorPrivate initialize]
--[WebTextIteratorPrivate .cxx_construct]
--[WebTextIterator atEnd]
--[WebTextIterator currentTextLength]
--[WebTextIterator currentTextPointer]
--[WebTextIterator currentRange]
--[WebTextIterator advance]
--[WebTextIterator dealloc]
--[WebTextIteratorPrivate .cxx_destruct]
--[WebView hostWindow]
--[WebView dealloc]
--[WebView(AllWebViews) _removeFromAllWebViewsSet]
--[WebView(WebPendingPublic) setScriptDebugDelegate:]
--[WebView(WebPrivate) _cacheScriptDebugDelegateImplementations]
--[WebView(WebPrivate) _detachScriptDebuggerFromAllFrames]
--[WebFrame(WebInternal) _detachScriptDebugger]
--[WebView removeDragCaret]
-__ZN15WebEditorClient13pageDestroyedEv
-__ZN15WebEditorClientD0Ev
-__ZN18WebInspectorClient18inspectorDestroyedEv
-__ZN18WebInspectorClientD0Ev
-__ZN20WebContextMenuClient20contextMenuDestroyedEv
-__ZN20WebContextMenuClientD0Ev
-__ZN13WebDragClient23dragControllerDestroyedEv
-__ZN13WebDragClientD0Ev
-__ZN15WebChromeClient15chromeDestroyedEv
-__ZN15WebChromeClientD0Ev
--[WebView preferencesIdentifier]
--[WebViewPrivate dealloc]
--[WebViewPrivate .cxx_destruct]
-+[WebPreferences(WebPrivate) _checkLastReferenceForIdentifier:]
--[WebView(WebViewEditing) selectedDOMRange]
--[WebView(WebFileInternal) _selectedOrMainFrame]
--[WebFrame(WebInternal) _findFrameWithSelection]
--[WebFrame(WebInternal) _hasSelection]
--[WebHTMLView(WebDocumentPrivateProtocols) selectedAttributedString]
--[WebHTMLView(WebHTMLViewFileInternal) _selectedRange]
--[WebHTMLView(WebDocumentPrivateProtocols) _attributeStringFromDOMRange:]
-+[NSAttributedString(WebKitExtras) _web_attributedStringFromRange:]
--[DOMRange(WebDOMRangeOperations) webArchive]
--[WebArchive mainResource]
--[WebResource(WebResourceInternal) _initWithCoreResource:]
-+[WebResourcePrivate initialize]
--[WebResourcePrivate initWithCoreResource:]
--[WebResource textEncodingName]
--[WebResource data]
--[WebResource MIMEType]
--[WebResource URL]
--[WebArchive subresources]
--[WebView initWithCoder:]
--[WebPreferences initWithCoder:]
--[WebView(WebViewEditing) editingDelegate]
--[WebView(WebPrivate) setAlwaysShowVerticalScroller:]
--[WebDynamicScrollBarsView(WebInternal) setVerticalScrollingMode:andLock:]
--[WebDynamicScrollBarsView(WebInternal) horizontalScrollingMode]
--[WebDynamicScrollBarsView(WebInternal) setScrollingModesLocked:]
--[WebView(WebViewEditing) spellCheckerDocumentTag]
--[WebResource dealloc]
--[WebResourcePrivate dealloc]
-__ZN3WTF6VectorINS_6RefPtrIN7WebCore15ArchiveResourceEEELm0EE6shrinkEm
--[WebView(WebViewEditing) setContinuousSpellCheckingEnabled:]
-+[WebView(WebFileInternal) _preflightSpellChecker]
-+[WebView(WebFileInternal) _preflightSpellCheckerNow:]
--[WebView(WebViewEditing) undoManager]
--[WebDefaultEditingDelegate undoManagerForWebView:]
--[WebView(WebViewEditing) selectionAffinity]
--[WebView(WebViewEditing) setSelectedDOMRange:affinity:]
--[WebView(WebViewEditing) setEditable:]
-__ZN15WebEditorClient18shouldBeginEditingEPN7WebCore5RangeE
--[WebDefaultEditingDelegate webView:shouldBeginEditingInDOMRange:]
-__ZN15WebEditorClient15didBeginEditingEv
--[WebDefaultUIDelegate webViewFirstResponder:]
--[WebView(WebPendingPublic) setTabKeyCyclesThroughElements:]
--[WebHTMLView keyDown:]
-__ZN15WebEditorClient24handleInputMethodKeydownEPN7WebCore13KeyboardEventE
--[WebHTMLView(WebInternal) _interceptEditingKeyEvent:shouldSaveCommand:]
--[WebHTMLView(WebNSTextInputSupport) hasMarkedText]
--[WebHTMLView(WebNSTextInputSupport) insertText:]
-__ZN3WTF6VectorIN7WebCore15KeypressCommandELm0EE14expandCapacityEmPKS2_
-__ZN3WTF6VectorIN7WebCore15KeypressCommandELm0EE14expandCapacityEm
-__ZN3WTF6VectorIN7WebCore15KeypressCommandELm0EE15reserveCapacityEm
-__ZN15WebEditorClient19handleKeyboardEventEPN7WebCore13KeyboardEventE
--[WebHTMLView coreCommandBySelector:]
-__ZN15WebEditorClient16shouldInsertTextERKN7WebCore6StringEPNS0_5RangeENS0_18EditorInsertActionE
--[WebView(WebViewEditing) typingStyle]
--[WebFrame(WebInternal) _typingStyle]
-__ZN15WebEditorClient22registerCommandForUndoEN3WTF10PassRefPtrIN7WebCore11EditCommandEEE
-__ZN15WebEditorClient28registerCommandForUndoOrRedoEN3WTF10PassRefPtrIN7WebCore11EditCommandEEEb
-+[WebEditCommand initialize]
-+[WebEditCommand commandWithEditCommand:]
--[WebEditCommand .cxx_construct]
--[WebEditCommand initWithEditCommand:]
-__ZN15WebEditorClient24respondToChangedContentsEv
--[WebHTMLView keyUp:]
-__ZN15WebEditorClient35isAutomaticQuoteSubstitutionEnabledEv
--[WebView(WebViewTextChecking) isAutomaticQuoteSubstitutionEnabled]
-__ZN15WebEditorClient31isAutomaticLinkDetectionEnabledEv
--[WebView(WebViewTextChecking) isAutomaticLinkDetectionEnabled]
-__ZN15WebEditorClient34isAutomaticDashSubstitutionEnabledEv
--[WebView(WebViewTextChecking) isAutomaticDashSubstitutionEnabled]
-__ZN15WebEditorClient33isAutomaticTextReplacementEnabledEv
--[WebView(WebViewTextChecking) isAutomaticTextReplacementEnabled]
-__ZN15WebEditorClient36isAutomaticSpellingCorrectionEnabledEv
--[WebView(WebViewTextChecking) isAutomaticSpellingCorrectionEnabled]
-__ZN15WebEditorClient20checkTextOfParagraphEPKtiyRN3WTF6VectorIN7WebCore18TextCheckingResultELm0EEE
-__ZN15WebEditorClient23spellCheckerDocumentTagEv
-__ZN15WebEditorClient13didEndEditingEv
--[WebEditCommand dealloc]
--[WebEditCommand .cxx_destruct]
--[WebHTMLView(WebPrivate) removeTrackingRect:]
--[WebView windowScriptObject]
--[WebFrame name]
-__ZN20WebFrameLoaderClient14cancelledErrorERKN7WebCore15ResourceRequestE
-+[NSError(WebKitExtras) _webKitErrorWithDomain:code:URL:]
-+[NSError(WebKitExtras) _registerWebKitErrors]
-_registerErrors
-+[NSError(WebKitExtras) _webkit_addErrorsWithCodesAndDescriptions:inDomain:]
-+[NSError(WebKitExtras) _webkit_errorWithDomain:code:URL:]
--[NSError(WebKitExtras) _webkit_initWithDomain:code:URL:]
-__ZN20WebFrameLoaderClient20setMainDocumentErrorEPN7WebCore14DocumentLoaderERKNS0_13ResourceErrorE
--[WebDataSource(WebInternal) _setMainDocumentError:]
-__ZL49applyAppleDictionaryApplicationQuirkNonInlinePartP20WebFrameLoaderClientRKN7WebCore15ResourceRequestE
-+[WebHistoryItem(WebPrivate) _releaseAllPendingPageCaches]
-+[WebKitStatistics webViewCount]
-+[WebKitStatistics frameCount]
-+[WebKitStatistics dataSourceCount]
-+[WebKitStatistics viewCount]
-+[WebKitStatistics HTMLRepresentationCount]
-+[WebKitStatistics bridgeCount]
-+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]
--[WebView stringByEvaluatingJavaScriptFromString:]
--[WebFrame(WebInternal) _stringByEvaluatingJavaScriptFromString:]
--[WebFrame(WebInternal) _stringByEvaluatingJavaScriptFromString:forceUserGesture:]
-_WKDrawBezeledTextArea
-__ZNK15WebChromeClient17windowResizerRectEv
--[WebViewFactory inputElementAltText]
-__ZN26WebCachedFramePlatformData5clearEv
--[WebHTMLView(WebInternal) closeIfNotCurrentView]
-__ZN26WebCachedFramePlatformDataD0Ev
--[WebPluginDatabase close]
--[WebPluginDatabase(Internal) _removePlugin:]
-+[WebView(WebPrivate) _unregisterViewClassAndRepresentationClassForMIMEType:]
-__ZN3WTF9HashTableIN7WebCore6StringES2_NS_17IdentityExtractorIS2_EENS1_10StringHashENS_10HashTraitsIS2_EES7_E47removeAndInvalid
-__ZN3WTF9HashTableIN7WebCore6StringES2_NS_17IdentityExtractorIS2_EENS1_10StringHashENS_10HashTraitsIS2_EES7_E6removeEPS2_
--[WebNetscapePluginPackage wasRemovedFromPluginDatabase:]
--[WebBasePluginPackage wasRemovedFromPluginDatabase:]
--[WebNetscapePluginPackage(Internal) _unloadWithShutdown:]
--[WebView(WebPendingPublic) unscheduleFromRunLoop:forMode:]
+__ZN20WebFrameLoaderClient31dispatchDidCancelClientRedirectEv
+__ZN20WebFrameLoaderClient17objectContentTypeERKN7WebCore4KURLERKNS0_6StringE
-[WebView _pluginForMIMEType:]
__ZN20WebFrameLoaderClient12createPluginERKN7WebCore7IntSizeEPNS0_17HTMLPlugInElementERKNS0_4KURLERKN3WTF6VectorINS0_6StringELm
-__ZL3kitRKN3WTF6VectorIN7WebCore6StringELm0EEE
-__ZL10pluginViewP8WebFrameP16WebPluginPackageP7NSArrayS4_P5NSURLP10DOMElementa
--[WebPluginPackage viewFactory]
-+[WebPluginController plugInViewWithArguments:fromPluginPackage:]
-__ZNK7WebCore6Widget11isFrameViewEv
-__ZN7WebCore6Widget16setParentVisibleEb
--[WebPluginController addPlugin:]
--[WebView addPluginInstanceView:]
--[WebPluginDatabase addPluginInstanceView:]
--[WebPluginController webView]
--[WebPluginController webFrame]
--[WebView(WebPrivate) defersCallbacks]
-_resumeTimerFired
--[WebPluginController destroyPlugin:]
--[WebView removePluginInstanceView:]
--[WebPluginDatabase removePluginInstanceView:]
-__ZN12PluginWidgetD0Ev
--[WebPluginDatabase destroyAllPluginInstanceViews]
--[WebPluginDatabase dealloc]
--[WebView mainFrameTitle]
--[WebView setShouldCloseWithWindow:]
--[WebDataSource initialRequest]
-__ZN20WebFrameLoaderClient14shouldFallBackERKN7WebCore13ResourceErrorE
-__ZN20WebFrameLoaderClient30dispatchDidFailProvisionalLoadERKN7WebCore13ResourceErrorE
--[WebView(WebPrivate) _didFailProvisionalLoadWithError:forFrame:]
--[WebFramePolicyListener finalize]
--[WebElementDictionary finalize]
--[WebFramePolicyListener ignore]
--[WebDataSource finalize]
--[WebDataSourcePrivate finalize]
--[WebDefaultUIDelegate webView:didScrollDocumentInFrameView:]
-__ZN15WebChromeClient18makeFirstResponderEP11NSResponder
--[WebView(WebPrivate) _pushPerformingProgrammaticFocus]
--[WebDefaultUIDelegate webView:makeFirstResponder:]
--[WebView(WebPrivate) _popPerformingProgrammaticFocus]
--[WebElementDictionary count]
--[WebElementDictionary _fillCache]
-__ZL16cacheValueForKeyPKvS0_Pv
--[WebElementDictionary _title]
-__ZL13NSStringOrNilN7WebCore6StringE
--[WebElementDictionary _absoluteImageURL]
--[WebElementDictionary _isContentEditable]
--[WebElementDictionary _image]
--[WebElementDictionary _spellingToolTip]
--[WebElementDictionary _titleDisplayString]
--[WebElementDictionary _textContent]
--[WebElementDictionary _imageRect]
--[WebElementDictionary _altDisplayString]
--[WebElementDictionary _isLiveLink]
-__ZN20WebFrameLoaderClient38dispatchDidLoadResourceFromMemoryCacheEPN7WebCore14DocumentLoaderERKNS0_15ResourceRequestERKNS0_16R
--[WebHTMLRepresentation finalize]
--[WebHTMLView finalize]
--[WebHTMLViewPrivate finalize]
-__ZN20WebFrameLoaderClient38dispatchDecidePolicyForNewWindowActionEMN7WebCore11FrameLoaderEFvNS0_12PolicyActionEERKNS0_16Naviga
-__ZN20WebFrameLoaderClient19dispatchDidFailLoadERKN7WebCore13ResourceErrorE
--[WebView(WebPrivate) _didFailLoadWithError:forFrame:]
-+[WebBaseNetscapePluginView initialize]
-_WKSendUserChangeNotifications
+[WebHostedNetscapePluginView initialize]
-[WebBaseNetscapePluginView .cxx_construct]
-[WebHostedNetscapePluginView .cxx_construct]
+__ZL3kitRKN3WTF6VectorIN7WebCore6StringELm0EEE
-[WebHostedNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:eleme
-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element
-[WebHostedNetscapePluginView setAttributeKeys:andValues:]
--[WebBaseNetscapePluginView renewGState]
--[WebBaseNetscapePluginView viewWillMoveToSuperview:]
-[WebBaseNetscapePluginView visibleRect]
--[WebBaseNetscapePluginView isFlipped]
-[WebBaseNetscapePluginView _windowClipRect]
-__ZN20WebFrameLoaderClient35dispatchDidChangeLocationWithinPageEv
-__ZN20WebFrameLoaderClient13didFinishLoadEv
--[WebHTMLView validateUserInterfaceItem:]
--[WebHTMLView validateUserInterfaceItemWithoutDelegate:]
-__ZL3kitN7WebCore8TriStateE
-__Z30CallUIDelegateReturningBooleanaP7WebViewP13objc_selectorP11objc_objecta
--[WebView(WebIBActions) validateUserInterfaceItem:]
--[WebView(WebIBActions) validateUserInterfaceItemWithoutDelegate:]
--[WebView(WebIBActions) canMakeTextLarger]
--[WebView _canZoomIn:]
--[WebView _zoomMultiplier:]
--[WebView(WebIBActions) canMakeTextSmaller]
--[WebView _canZoomOut:]
--[WebHTMLView(WebPrivate) _hasSelection]
--[WebHTMLView(WebPrivate) _isEditable]
+-[WebBaseNetscapePluginView isFlipped]
+-[WebBaseNetscapePluginView renewGState]
+__ZN7WebCore6Widget16setParentVisibleEb
+-[WebBaseNetscapePluginView viewWillMoveToSuperview:]
-[WebBaseNetscapePluginView viewWillMoveToWindow:]
-[WebBaseNetscapePluginView removeTrackingRect]
-[WebHostedNetscapePluginView removeWindowObservers]
@@ -1225,40 +914,41 @@ __Z30CallUIDelegateReturningBooleanaP7WebViewP13objc_selectorP11objc_objecta
-[WebBaseNetscapePluginView setHasFocus:]
-[WebBaseNetscapePluginView viewDidMoveToWindow]
-[WebBaseNetscapePluginView resetTrackingRect]
--[WebBaseNetscapePluginView start]
-[WebBaseNetscapePluginView webView]
-[WebBaseNetscapePluginView webFrame]
--[WebBaseNetscapePluginView dataSource]
+-[WebBaseNetscapePluginView start]
-[WebHostedNetscapePluginView createPlugin]
--[WebView userAgentForURL:]
__ZN6WebKit25NetscapePluginHostManager6sharedEv
__ZN6WebKit25NetscapePluginHostManagerC1Ev
__ZN6WebKit25NetscapePluginHostManagerC2Ev
__ZN6WebKit25NetscapePluginHostManager17instantiatePluginEP24WebNetscapePluginPackageP27WebHostedNetscapePluginViewP8NSStringP7
-__ZN6WebKit25NetscapePluginHostManager14hostForPackageEP24WebNetscapePluginPackage
+-[WebPreferences(WebPrivate) usesProxiedOpenPanel]
+__ZN6WebKit25NetscapePluginHostManager14hostForPackageEP24WebNetscapePluginPackageb
__ZN3WTF7HashMapIP24WebNetscapePluginPackagePN6WebKit23NetscapePluginHostProxyENS_7PtrHashIS2_EENS_10HashTraitsIS2_EENS8_IS5_EE
__ZN3WTF9HashTableIP24WebNetscapePluginPackageSt4pairIS2_PN6WebKit23NetscapePluginHostProxyEENS_18PairFirstExtractorIS7_EENS_7P
-__ZN6WebKit25NetscapePluginHostManager15spawnPluginHostEP24WebNetscapePluginPackagejRjR19ProcessSerialNumber
+__ZN6WebKit25NetscapePluginHostManager15spawnPluginHostEP24WebNetscapePluginPackagejRjR19ProcessSerialNumberb
__ZN6WebKit25NetscapePluginHostManager20initializeVendorPortEv
__WKPACheckInApplication
_WKInitializeRenderServer
-[WebNetscapePluginPackage pluginHostArchitecture]
__WKPASpawnPluginHost
__WKPHCheckInWithPluginHost
-__ZN6WebKit23NetscapePluginHostProxyC1EjjRK19ProcessSerialNumber
-__ZN6WebKit23NetscapePluginHostProxyC2EjjRK19ProcessSerialNumber
+__ZN6WebKit23NetscapePluginHostProxyC1EjjRK19ProcessSerialNumberb
+__ZN6WebKit23NetscapePluginHostProxyC2EjjRK19ProcessSerialNumberb
__ZN6WebKitL14pluginProxyMapEv
__ZN3WTF7HashMapIjPN6WebKit23NetscapePluginHostProxyENS_7IntHashIjEENS_10HashTraitsIjEENS6_IS3_EEE3addERKjRKS3_
-__ZN3WTF9HashTableIjSt4pairIjPN6WebKit23NetscapePluginHostProxyEENS_18PairFirstExtractorIS5_EENS_7IntHashIjEENS_14PairHashTrait
_WKCreateMIGServerSource
__ZN6WebKit27NetscapePluginInstanceProxyC1EPNS_23NetscapePluginHostProxyEP27WebHostedNetscapePluginViewb
__ZN6WebKit27NetscapePluginInstanceProxyC2EPNS_23NetscapePluginHostProxyEP27WebHostedNetscapePluginViewb
+__ZN6WebKit27NetscapePluginInstanceProxy14LocalObjectMapC1Ev
+__ZN6WebKit27NetscapePluginInstanceProxy14LocalObjectMapC2Ev
__ZN6WebKit23NetscapePluginHostProxy14pluginInstanceEj
__ZNK3WTF7HashMapIjNS_6RefPtrIN6WebKit27NetscapePluginInstanceProxyEEENS_7IntHashIjEENS_10HashTraitsIjEENS7_IS4_EEE3getERKj
__ZN6WebKit23NetscapePluginHostProxy17addPluginInstanceEPNS_27NetscapePluginInstanceProxyE
__ZN3WTF7HashMapIjNS_6RefPtrIN6WebKit27NetscapePluginInstanceProxyEEENS_7IntHashIjEENS_10HashTraitsIjEENS7_IS4_EEE3setERKjRKS4_
__ZN6WebKit27NetscapePluginInstanceProxy13nextRequestIDEv
__WKPHInstantiatePlugin
+__ZN6WebKit27NetscapePluginInstanceProxy22willCallPluginFunctionEv
__ZN6WebKit27NetscapePluginInstanceProxy30processRequestsAndWaitForReplyEj
__ZN3WTF7HashMapIjPN6WebKit27NetscapePluginInstanceProxy5ReplyENS_7IntHashIjEENS_10HashTraitsIjEENS7_IS4_EEE4takeERKj
__ZN3WTF9HashTableIjSt4pairIjPN6WebKit27NetscapePluginInstanceProxy5ReplyEENS_18PairFirstExtractorIS6_EENS_7IntHashIjEENS_14Pai
@@ -1272,21 +962,27 @@ __ZN6WebKit27NetscapePluginInstanceProxy7loadURLEPKcS2_S2_j12LoadURLFlagsRj
-[WebBaseNetscapePluginView URLWithCString:]
-[NSString(WebKitExtras) _web_stringByStrippingReturnCharacters]
-[NSURL(WebNSURLExtras) _webkit_URLByRemovingResourceSpecifier]
+-[NSURL(WebNSURLExtras) _web_URLByTruncatingOneCharacterBeforeComponent:]
-[NSMutableURLRequest(WebNSURLRequestExtras) _web_setHTTPReferrer:]
__ZN6WebKit27NetscapePluginInstanceProxy11loadRequestEP12NSURLRequestPKcbRj
+-[WebBaseNetscapePluginView dataSource]
-[NSURL(WebNSURLExtras) _webkit_scriptIfJavaScriptURL]
-__ZN3WTF5DequeIPN6WebKit27NetscapePluginInstanceProxy13PluginRequestEE14expandCapacityEv
+__ZN3WTF5DequeINS_6RefPtrIN6WebKit27NetscapePluginInstanceProxy13PluginRequestEEEE14expandCapacityEv
__XPCInstantiatePluginReply
_WKPCInstantiatePluginReply
__ZN3WTF7HashMapIjPN6WebKit27NetscapePluginInstanceProxy5ReplyENS_7IntHashIjEENS_10HashTraitsIjEENS7_IS4_EEE3setERKjRKS4_
+__ZN6WebKit27NetscapePluginInstanceProxy21didCallPluginFunctionEv
__ZN6WebKit27NetscapePluginInstanceProxy22InstantiatePluginReplyD0Ev
_WKSoftwareCARendererCreate
_WKMakeRenderLayer
__ZN6WebKit27NetscapePluginInstanceProxy18windowFrameChangedE6CGRect
__WKPHPluginInstanceWindowFrameChanged
--[WebHostedNetscapePluginView updateAndSetWindow]
+__ZNK21WebPluginHalterClient7enabledEv
+-[WebView addPluginInstanceView:]
+-[WebPluginDatabase addPluginInstanceView:]
-[WebBaseNetscapePluginView currentWindow]
-__ZN6WebKit27NetscapePluginInstanceProxy6resizeE6CGRectS1_b
+-[WebHostedNetscapePluginView updateAndSetWindow]
+__ZN6WebKit27NetscapePluginInstanceProxy6resizeE6CGRectS1_
__WKPHResizePluginInstance
__XPCBooleanReply
_WKPCBooleanReply
@@ -1305,20 +1001,50 @@ __WKPHPluginInstanceStopTimers
__ZN6WebKit27NetscapePluginInstanceProxy11startTimersEb
__WKPHPluginInstanceStartTimers
-[WebHostedNetscapePluginView loadStream]
--[WebView acceptsFirstResponder]
--[WebHostedNetscapePluginView drawRect:]
-_WKSoftwareCARendererRender
+__ZNK7WebCore6Widget11isFrameViewEv
+-[WebHostedNetscapePluginView createPluginBindingsInstance:]
+-[WebBaseNetscapePluginView stop]
+-[WebHostedNetscapePluginView shouldStop]
+__ZN20NetscapePluginWidgetD0Ev
__ZN7WebCore5TimerIN6WebKit27NetscapePluginInstanceProxyEE5firedEv
__ZN6WebKit27NetscapePluginInstanceProxy17requestTimerFiredEPN7WebCore5TimerIS0_EE
__ZN6WebKit27NetscapePluginInstanceProxy14performRequestEPNS0_13PluginRequestE
--[WebPluginDatabase removePluginInstanceViewsFor:]
-__ZN20WebFrameLoaderClient22dispatchWillSubmitFormEMN7WebCore11FrameLoaderEFvNS0_12PolicyActionEEN3WTF10PassRefPtrINS0_9FormSta
+__ZN20WebFrameLoaderClient14cancelledErrorERKN7WebCore15ResourceRequestE
++[NSError(WebKitExtras) _webKitErrorWithDomain:code:URL:]
++[NSError(WebKitExtras) _registerWebKitErrors]
+_registerErrors
++[NSError(WebKitExtras) _webkit_addErrorsWithCodesAndDescriptions:inDomain:]
++[NSError(WebKitExtras) _webkit_errorWithDomain:code:URL:]
+-[NSError(WebKitExtras) _webkit_initWithDomain:code:URL:]
+__ZN20WebFrameLoaderClient14shouldFallBackERKN7WebCore13ResourceErrorE
+__ZN20WebFrameLoaderClient20setMainDocumentErrorEPN7WebCore14DocumentLoaderERKNS0_13ResourceErrorE
+-[WebDataSource(WebInternal) _setMainDocumentError:]
+__ZN20WebFrameLoaderClient30dispatchDidFailProvisionalLoadERKN7WebCore13ResourceErrorE
+-[WebView(WebPrivate) _didFailProvisionalLoadWithError:forFrame:]
+__ZN20WebFrameLoaderClient22dispatchDidFailLoadingEPN7WebCore14DocumentLoaderEmRKNS0_13ResourceErrorE
+-[WebFrame(WebInternal) _internalLoadDelegate]
+__ZN3WTF7HashMapIP8WebFrameNS_6RefPtrIN6WebKit27NetscapePluginInstanceProxy13PluginRequestEEENS_7PtrHashIS2_EENS_10HashTraitsIS
+__ZN3WTF9HashTableIP8WebFrameSt4pairIS2_NS_6RefPtrIN6WebKit27NetscapePluginInstanceProxy13PluginRequestEEEENS_18PairFirstExtrac
+-[WebFrame(WebInternal) _setInternalLoadDelegate:]
+-[WebBaseNetscapePluginView dealloc]
+-[WebHostedNetscapePluginView .cxx_destruct]
+-[WebBaseNetscapePluginView .cxx_destruct]
+__ZN17WebHaltablePluginD0Ev
+-[WebHostedNetscapePluginView drawRect:]
+_WKSoftwareCARendererRender
+__ZN6WebKit27NetscapePluginInstanceProxy7didDrawEv
+-[WebHostedNetscapePluginView webFrame:didFinishLoadWithError:]
+-[WebHostedNetscapePluginView webFrame:didFinishLoadWithReason:]
+__ZN6WebKit27NetscapePluginInstanceProxy31webFrameDidFinishLoadWithReasonEP8WebFrames
+__WKPHLoadURLNotify
+__ZN20WebFrameLoaderClient22dispatchWillSubmitFormEMN7WebCore13PolicyCheckerEFvNS0_12PolicyActionEEN3WTF10PassRefPtrINS0_9FormS
-[WebView(WebPrivate) _formDelegate]
__Z16CallFormDelegateP7WebViewP13objc_selectorP11objc_objectS4_S4_S4_S4_
-[WebFramePolicyListener continue]
--[WebBaseNetscapePluginView stop]
--[WebHostedNetscapePluginView shouldStop]
+-[WebPluginDatabase removePluginInstanceViewsFor:]
__ZN6WebKit27NetscapePluginInstanceProxy10shouldStopEv
+-[WebView removePluginInstanceView:]
+-[WebPluginDatabase removePluginInstanceView:]
-[WebHostedNetscapePluginView destroyPlugin]
_WKSoftwareCARendererDestroy
__ZN6WebKit27NetscapePluginInstanceProxy7destroyEv
@@ -1329,6 +1055,9 @@ __ZN6WebKit27NetscapePluginInstanceProxy16cancelStreamLoadEjs
__ZNK3WTF7HashMapIjNS_6RefPtrIN6WebKit26HostedNetscapePluginStreamEEENS_7IntHashIjEENS_10HashTraitsIjEENS7_IS4_EEE3getERKj
__ZN6WebKit27NetscapePluginInstanceProxy7cleanupEv
__ZN6WebKit27NetscapePluginInstanceProxy14stopAllStreamsEv
+__ZN6WebKit27NetscapePluginInstanceProxy14LocalObjectMap5clearEv
+__ZN3WTF9HashTableIjSt4pairIjN3JSC12ProtectedPtrINS2_8JSObjectEEEENS_18PairFirstExtractorIS6_EENS_7IntHashIjEENS_14PairHashTrai
+__ZN3WTF9HashTableIPN3JSC8JSObjectESt4pairIS3_S4_IjjEENS_18PairFirstExtractorIS6_EENS_7PtrHashIS3_EENS_14PairHashTraitsINS_10Ha
__ZN3WTF9HashTableIPN6WebKit13ProxyInstanceES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E4swapERSA_
__ZN3WTF9HashTableIPN6WebKit13ProxyInstanceES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E15dealloca
__ZN6WebKit27NetscapePluginInstanceProxy10invalidateEv
@@ -1337,6 +1066,8 @@ __ZN6WebKit27NetscapePluginInstanceProxyD1Ev
__ZN6WebKit27NetscapePluginInstanceProxyD2Ev
__ZN3WTF20deleteAllPairSecondsIPN6WebKit27NetscapePluginInstanceProxy5ReplyEKNS_7HashMapIjS4_NS_7IntHashIjEENS_10HashTraitsIjEE
__ZN3WTF9HashTableIjSt4pairIjNS_9RetainPtrIP11objc_objectEEENS_18PairFirstExtractorIS6_EENS_7IntHashIjEENS_14PairHashTraitsINS_
+__ZN6WebKit27NetscapePluginInstanceProxy14LocalObjectMapD1Ev
+__ZN6WebKit27NetscapePluginInstanceProxy14LocalObjectMapD2Ev
-[WebHostedNetscapePluginView inputContext]
+[WebTextInputWindowController sharedTextInputWindowController]
-[WebTextInputWindowController init]
@@ -1344,80 +1075,202 @@ __ZN3WTF9HashTableIjSt4pairIjNS_9RetainPtrIP11objc_objectEEENS_18PairFirstExtrac
_WKGetInputPanelWindowStyle
-[WebTextInputWindowController inputContext]
-[WebTextInputPanel _inputContext]
-__ZN20NetscapePluginWidgetD0Ev
--[WebBaseNetscapePluginView dealloc]
--[WebHostedNetscapePluginView .cxx_destruct]
--[WebBaseNetscapePluginView .cxx_destruct]
+-[WebHTMLView mouseUp:]
__ZN6WebKit23NetscapePluginHostProxy28deadNameNotificationCallbackEP12__CFMachPortPvlS3_
__ZN6WebKit23NetscapePluginHostProxy14pluginHostDiedEv
__ZN3WTF9HashTableIjSt4pairIjNS_6RefPtrIN6WebKit27NetscapePluginInstanceProxyEEEENS_18PairFirstExtractorIS6_EENS_7IntHashIjEENS
__ZN6WebKit25NetscapePluginHostManager14pluginHostDiedEPNS_23NetscapePluginHostProxyE
__ZN6WebKit23NetscapePluginHostProxyD1Ev
__ZN6WebKit23NetscapePluginHostProxyD2Ev
-__ZN15WebChromeClient11scaleFactorEv
-__ZN15WebEditorClient27doTextFieldCommandFromEventEPN7WebCore7ElementEPNS0_13KeyboardEventE
--[WebDefaultEditingDelegate webView:shouldInsertText:replacingDOMRange:givenAction:]
-__ZN15WebEditorClient24textFieldDidBeginEditingEPN7WebCore7ElementE
--[WebHTMLRepresentation formForElement:]
-__ZN15WebEditorClient24textDidChangeInTextFieldEPN7WebCore7ElementE
--[WebHTMLView performKeyEquivalent:]
--[WebHTMLView _handleStyleKeyEquivalent:]
--[WebPreferences(WebPrivate) respectStandardStyleKeyEquivalents]
--[WebHTMLView(WebNSTextInputSupport) doCommandBySelector:]
--[WebDefaultEditingDelegate webView:doCommandBySelector:]
--[WebHTMLRepresentation elementWithName:inForm:]
-__ZN15WebEditorClient24smartInsertDeleteEnabledEv
+__ZN3WTF9HashTableIjSt4pairIjPN6WebKit23NetscapePluginHostProxyEENS_18PairFirstExtractorIS5_EENS_7IntHashIjEENS_14PairHashTrait
+__ZN21WebIconDatabaseClient13performImportEv
+__Z21importToWebCoreFormatv
++[ThreadEnabler enableThreading]
+-[ThreadEnabler threadEnablingSelector:]
+__ZL20objectFromPathForKeyP8NSStringP11objc_object
+-[NSMutableDictionary(WebNSDictionaryExtras) _webkit_setBool:forKey:]
+_WKGetMIMETypeForExtension
+_WKQTIncludeOnlyModernMediaFileTypes
+_WKQTMovieMaxTimeLoadedChangeNotification
+-[WebViewFactory defaultLanguageCode]
+_WKQTMovieSelectPreferredAlternates
+_WKQTMovieSelectPreferredAlternateTrackForMediaType
+_WKQTMovieGetType
+_WKQTMovieMaxTimeSeekable
+_maxValueForTimeRanges
+__ZN15WebChromeClient23attachRootGraphicsLayerEPN7WebCore5FrameEPNS0_13GraphicsLayerE
+-[WebHTMLView(WebInternal) attachRootLayer:]
+-[WebView(WebPrivate) _postsAcceleratedCompositingNotifications]
+__ZN15WebChromeClient37setNeedsOneShotDrawingSynchronizationEv
+-[WebView(WebViewInternal) _setNeedsOneShotDrawingSynchronization:]
+__ZN15WebChromeClient28scheduleCompositingLayerSyncEv
+-[WebView(WebViewInternal) _scheduleCompositingLayerSync]
+_WKQTMovieMaxTimeLoaded
+__ZL32layerSyncRunLoopObserverCallBackP19__CFRunLoopObservermPv
+-[WebView(WebViewInternal) _syncCompositingChanges]
++[WebView(WebPrivate) canCloseAllWebViews]
+-[WebIconDatabase(WebInternal) _applicationWillTerminate:]
++[WebView _applicationWillTerminate]
+__ZL27fastDocumentTeardownEnabledv
++[WebView(WebPrivate) closeAllWebViews]
+-[WebView(WebIBActions) stopLoading:]
+-[WebFrame stopLoading]
+-[WebView(WebPrivate) _closeWithFastTeardown]
++[WebPluginDatabase closeSharedDatabase]
++[WebHistoryItem(WebPrivate) _releaseAllPendingPageCaches]
+-[WebView initWithFrame:]
+-[WebView initWithFrame:frameName:groupName:]
+__ZL32needsWebViewInitThreadWorkaroundv
++[WebView(WebViewInternal) shouldIncludeInWebKitStatistics]
+-[WebView stringByEvaluatingJavaScriptFromString:]
+-[WebFrame(WebInternal) _stringByEvaluatingJavaScriptFromString:]
+-[WebFrame(WebInternal) _stringByEvaluatingJavaScriptFromString:forceUserGesture:]
+-[WebView(WebPendingPublic) scriptDebugDelegate]
+__ZNK3JSC7JSValue8toStringEPNS_9ExecStateE
+__ZN3WTF12bitwise_castIdlEET_T0_
++[WebView(WebFileInternal) _preferencesRemovedNotification:]
++[WebView(WebFileInternal) _maxCacheModelInAnyInstance]
+_WKDrawBezeledTextArea
+__ZNK15WebChromeClient17windowResizerRectEv
+_WKDrawBezeledTextFieldCell
+__ZN20WebFrameLoaderClient29savePlatformDataToCachedFrameEPN7WebCore11CachedFrameE
+-[WebViewFactory inputElementAltText]
+_WKGetFontInLanguageForRange
+-[WebNetscapePluginPackage getPluginInfoFromResources]
+-[WebNetscapePluginPackage openResourceFile]
+-[WebNetscapePluginPackage stringForStringListID:andIndex:]
++[NSString(WebKitExtras) _web_encodingForResource:]
+-[WebNetscapePluginPackage closeResourceFile:]
+__ZN15WebChromeClient19addMessageToConsoleEN7WebCore13MessageSourceENS0_11MessageTypeENS0_12MessageLevelERKNS0_6StringEjS6_
+__ZN26WebCachedFramePlatformData5clearEv
+-[WebHTMLView(WebInternal) closeIfNotCurrentView]
+__ZN26WebCachedFramePlatformDataD0Ev
++[WebStringTruncator centerTruncateString:toWidth:]
+__ZL15defaultMenuFontv
+__ZN20WebFrameLoaderClient22dispatchDidChangeIconsEv
++[NSObject(WebScripting) isKeyExcludedFromWebScript:]
+-[WebIconDatabase iconURLForURL:]
+-[WebHistoryItem(WebPrivate) RSSFeedReferrer]
+-[WebElementDictionary _webFrame]
+-[WebElementDictionary _domNode]
+-[DOMDocument(WebDOMDocumentOperations) webFrame]
+-[WebElementDictionary _targetWebFrame]
+-[NSURL(WebNSURLExtras) _webkit_URLByRemovingFragment]
+__ZNK20WebFrameLoaderClient32dispatchDidRemoveBackForwardItemEPN7WebCore11HistoryItemE
+-[WebPluginDatabase close]
+-[WebPluginDatabase(Internal) _removePlugin:]
++[WebView(WebPrivate) _unregisterPluginMIMEType:]
++[WebView(WebPrivate) _unregisterViewClassAndRepresentationClassForMIMEType:]
+__ZN3WTF9HashTableIN7WebCore6StringES2_NS_17IdentityExtractorIS2_EENS1_10StringHashENS_10HashTraitsIS2_EES7_E47removeAndInvalid
+__ZN3WTF9HashTableIN7WebCore6StringES2_NS_17IdentityExtractorIS2_EENS1_10StringHashENS_10HashTraitsIS2_EES7_E6removeEPS2_
+-[WebNetscapePluginPackage wasRemovedFromPluginDatabase:]
+-[WebBasePluginPackage wasRemovedFromPluginDatabase:]
+-[WebNetscapePluginPackage(Internal) _unloadWithShutdown:]
+-[WebHTMLView windowWillClose:]
+-[WebPreferences setJavaScriptCanOpenWindowsAutomatically:]
+-[WebPreferences setJavaScriptEnabled:]
+__ZN7WebCore17FrameLoaderClient17didNotAllowScriptEv
+-[WebPreferences setJavaEnabled:]
+-[WebPreferences setPlugInsEnabled:]
+__ZN15WebChromeClient10windowRectEv
+-[WebHTMLRepresentation currentForm]
+-[WebHTMLRepresentation controlsInForm:]
+__ZL25formElementFromDOMElementP10DOMElement
+-[WebHTMLRepresentation elementIsPassword:]
+__ZL26inputElementFromDOMElementP10DOMElement
+-[WebHTMLRepresentation elementDoesAutoComplete:]
++[WebDatabaseManager sharedWebDatabaseManager]
+-[WebDatabaseManager origins]
+-[WebDataSource(WebPrivate) _mainDocumentError]
+-[WebHTMLView validRequestorForSendType:returnType:]
+-[WebHTMLView(WebDocumentPrivateProtocols) pasteboardTypesForSelection]
+-[WebHTMLView(WebInternal) _canSmartCopyOrDelete]
-[WebView(WebViewEditing) smartInsertDeleteEnabled]
-__ZN15WebEditorClient17shouldDeleteRangeEPN7WebCore5RangeE
--[WebDefaultEditingDelegate webView:shouldDeleteDOMRange:]
-__ZN15WebEditorClient28textWillBeDeletedInTextFieldEPN7WebCore7ElementE
-__Z32CallFormDelegateReturningBooleanaP7WebViewP13objc_selectorP11objc_objectS2_S4_
-__ZN3WTF6VectorIN7WebCore18TextCheckingResultELm0EE14expandCapacityEmPKS2_
-__ZN3WTF6VectorIN7WebCore18TextCheckingResultELm0EE14expandCapacityEm
-__ZN3WTF6VectorIN7WebCore18TextCheckingResultELm0EE15reserveCapacityEm
-__ZN7WebCore18TextCheckingResultC2ERKS0_
-__ZN3WTF6VectorIN7WebCore13GrammarDetailELm0EEC1ERKS3_
-__ZN3WTF6VectorIN7WebCore13GrammarDetailELm0EEC2ERKS3_
-__ZN7WebCore18TextCheckingResultD2Ev
-_WKSetPatternPhaseInUserSpace
--[NSString(WebNSURLExtras) _web_isUserVisibleURL]
-+[WebHTMLView(WebPrivate) _postFlagsChangedEvent:]
--[WebHTMLView flagsChanged:]
-__ZN15WebEditorClient33isSelectTrailingWhitespaceEnabledEv
--[WebView(WebPrivate) isSelectTrailingWhitespaceEnabled]
-__ZN15WebChromeClient11canRunModalEv
+-[WebHTMLView(WebPrivate) _isEditable]
+-[WebHTMLView(WebPrivate) _hasSelection]
+-[WebHTMLView(WebPrivate) addTrackingRect:owner:userData:assumeInside:]
+-[WebHTMLView(WebPrivate) _sendToolTipMouseEntered]
+-[WebHTMLView(WebPrivate) _sendToolTipMouseExited]
+-[WebHTMLView(WebPrivate) removeTrackingRect:]
++[WebCache initialize]
++[WebCache empty]
+-[WebBackForwardList pageCacheSize]
+-[WebBackForwardList setPageCacheSize:]
+-[WebView(WebPrivate) setUsesPageCache:]
-[WebHTMLView(WebPrivate) view:stringForToolTip:point:userData:]
-+[WebStringTruncator rightTruncateString:toWidth:withFont:]
--[WebView(WebIBActions) goBack:]
--[WebView goBack]
-__ZNK20WebFrameLoaderClient21shouldGoToHistoryItemEPN7WebCore11HistoryItemE
-__ZN20WebFrameLoaderClient16restoreViewStateEv
--[WebDynamicScrollBarsView(WebInternal) allowsHorizontalScrolling]
--[WebView(WebPendingPublic) shouldClose]
--[NSEvent(WebExtras) _web_isReturnOrEnterKeyEvent]
--[NSEvent(WebExtras) _web_isKeyEvent:]
-__ZN20WebFrameLoaderClient27registerForIconNotificationEb
--[WebView(WebViewInternal) _receivedIconChangedNotification:]
-__ZN20WebFrameLoaderClient36transitionToCommittedFromCachedFrameEPN7WebCore11CachedFrameE
-__ZN20WebFrameLoaderClient11forceLayoutEv
--[WebHTMLView setNeedsToApplyStyles:]
+-[WebHTMLView validateUserInterfaceItem:]
+-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]
+-[WebHTMLView coreCommandBySelector:]
+__ZL22commandNameForSelectorP13objc_selector
+__ZN3WTF7HashMapIP13objc_selectorN7WebCore6StringENS_7PtrHashIS2_EENS_10HashTraitsIS2_EENS7_IS4_EEE3addERKS2_RKS4_
+__ZN3WTF9HashTableIP13objc_selectorSt4pairIS2_N7WebCore6StringEENS_18PairFirstExtractorIS6_EENS_7PtrHashIS2_EENS_14PairHashTrai
+__ZNK3WTF9HashTableIP13objc_selectorSt4pairIS2_N7WebCore6StringEENS_18PairFirstExtractorIS6_EENS_7PtrHashIS2_EENS_14PairHashTra
+__ZL3kitN7WebCore8TriStateE
+__Z30CallUIDelegateReturningBooleanaP7WebViewP13objc_selectorP11objc_objecta
+-[WebFrame(WebPrivate) _isDisplayingStandaloneImage]
+-[WebHTMLView selectAll:]
+-[WebHTMLView executeCoreCommandBySelector:]
+-[WebHTMLView callDelegateDoCommandBySelectorIfNeeded:]
+-[WebView(WebPrivate) _editingDelegateForwarder]
++[WebDefaultEditingDelegate sharedEditingDelegate]
+-[WebDefaultEditingDelegate webView:doCommandBySelector:]
+__ZN15WebEditorClient25shouldChangeSelectedRangeEPN7WebCore5RangeES2_NS0_9EAffinityEb
+-[WebView(WebViewEditing) _shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]
+-[WebDefaultEditingDelegate webView:shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]
+-[WebHTMLView(WebInternal) smartInsertDeleteEnabled]
+-[WebHTMLView(WebInternal) isAutomaticQuoteSubstitutionEnabled]
+-[WebView(WebViewTextChecking) isAutomaticQuoteSubstitutionEnabled]
+-[WebHTMLView(WebInternal) isAutomaticDashSubstitutionEnabled]
+-[WebView(WebViewTextChecking) isAutomaticDashSubstitutionEnabled]
+-[WebHTMLView(WebInternal) isAutomaticLinkDetectionEnabled]
+-[WebView(WebViewTextChecking) isAutomaticLinkDetectionEnabled]
+-[WebHTMLView(WebInternal) isAutomaticTextReplacementEnabled]
+-[WebView(WebViewTextChecking) isAutomaticTextReplacementEnabled]
+-[WebView(WebIBActions) validateUserInterfaceItem:]
+-[WebView(WebIBActions) validateUserInterfaceItemWithoutDelegate:]
+-[WebHTMLView(WebInternal) isGrammarCheckingEnabled]
+-[WebHTMLView(WebInternal) isAutomaticSpellingCorrectionEnabled]
+-[WebView(WebViewTextChecking) isAutomaticSpellingCorrectionEnabled]
+-[WebView(WebIBActions) toggleContinuousSpellChecking:]
+-[WebView(WebViewEditing) setContinuousSpellCheckingEnabled:]
+-[WebFrame(WebInternal) _unmarkAllMisspellings]
++[WebView(WebFileInternal) _preflightSpellChecker]
++[WebView(WebFileInternal) _preflightSpellCheckerNow:]
+-[WebHTMLView(WebInternal) toggleGrammarChecking:]
+-[WebView(WebViewGrammarChecking) toggleGrammarChecking:]
+-[WebView(WebViewGrammarChecking) setGrammarCheckingEnabled:]
+__ZN13WebDragClient28dragSourceActionMaskForPointERKN7WebCore8IntPointE
+-[WebDefaultUIDelegate webView:dragSourceActionMaskForPoint:]
+-[WebHTMLView mouseDown:]
+-[WebView(WebPendingPublic) canResetPageZoom]
+-[WebView _canResetZoom:]
+-[WebView _zoomMultiplier:]
+-[WebView(WebIBActions) canMakeTextStandardSize]
+-[WebView(WebPendingPublic) canZoomPageIn]
+-[WebView _canZoomIn:]
+-[WebView(WebPendingPublic) canZoomPageOut]
+-[WebView _canZoomOut:]
+-[WebHTMLRepresentation canProvideDocumentSource]
+-[WebFrame(WebInternal) _canProvideDocumentSource]
+-[WebView(WebIBActions) reload:]
+-[WebFrame reload]
+-[WebHTMLView(WebPrivate) _removeTrackingRects:count:]
+-[WebHTMLView(WebPrivate) _addTrackingRect:owner:userData:assumeInside:useTrackingNum:]
__XPCGetWindowNPObject
_WKPCGetWindowNPObject
__ZN6WebKit27NetscapePluginInstanceProxy17getWindowNPObjectERj
-__ZN6WebKit27NetscapePluginInstanceProxy11idForObjectEPN3JSC8JSObjectE
+__ZN6WebKit27NetscapePluginInstanceProxy14LocalObjectMap11idForObjectEPN3JSC8JSObjectE
__ZNK3WTF9HashTableIjSt4pairIjN3JSC12ProtectedPtrINS2_8JSObjectEEEENS_18PairFirstExtractorIS6_EENS_7IntHashIjEENS_14PairHashTra
__ZN3WTF7HashMapIjN3JSC12ProtectedPtrINS1_8JSObjectEEENS_7IntHashIjEENS_10HashTraitsIjEENS7_IS4_EEE3setERKjRKS4_
-__ZN3WTF9HashTableIjSt4pairIjN3JSC12ProtectedPtrINS2_8JSObjectEEEENS_18PairFirstExtractorIS6_EENS_7IntHashIjEENS_14PairHashTrai
+__ZN3WTF7HashMapIPN3JSC8JSObjectESt4pairIjjENS_7PtrHashIS3_EENS_10HashTraitsIS3_EENS8_IS5_EEE3setERKS3_RKS5_
__XPCEvaluate
_WKPCEvaluate
-__ZN6WebKit27NetscapePluginInstanceProxy22willCallPluginFunctionEv
-__ZN6WebKit27NetscapePluginInstanceProxy8evaluateEjRKN7WebCore6StringERPcRj
-__ZNK3JSC21UStringSourceProvider6lengthEv
-__ZNK3JSC21UStringSourceProvider4dataEv
+__ZN6WebKit27NetscapePluginInstanceProxy8evaluateEjRKN7WebCore6StringERPcRjb
+__ZNK7WebCore20StringSourceProvider6lengthEv
+__ZNK7WebCore20StringSourceProvider4dataEv
__ZN6WebKit27NetscapePluginInstanceProxy12marshalValueEPN3JSC9ExecStateENS1_7JSValueERPcRj
__ZN6WebKit27NetscapePluginInstanceProxy15addValueToArrayEP14NSMutableArrayPN3JSC9ExecStateENS3_7JSValueE
__WKPHBooleanAndDataReply
-__ZN6WebKit27NetscapePluginInstanceProxy21didCallPluginFunctionEv
__XPCGetStringIdentifier
_WKPCGetStringIdentifier
__XPCInvoke
@@ -1427,20 +1280,36 @@ __ZN6WebKit27NetscapePluginInstanceProxy6invokeEjRKN3JSC10IdentifierEPcjRS5_Rj
__ZNK3WTF7HashMapIjN3JSC12ProtectedPtrINS1_8JSObjectEEENS_7IntHashIjEENS_10HashTraitsIjEENS7_IS4_EEE3getERKj
__ZN6WebKit27NetscapePluginInstanceProxy15demarshalValuesEPN3JSC9ExecStateEPcjRNS1_20MarkedArgumentBufferE
__ZN6WebKit27NetscapePluginInstanceProxy23demarshalValueFromArrayEPN3JSC9ExecStateEP7NSArrayRmRNS1_7JSValueE
-__XPCReleaseObject
-_WKPCReleaseObject
-__ZN6WebKit27NetscapePluginInstanceProxy13releaseObjectEj
+__XPCForgetBrowserObject
+_WKPCForgetBrowserObject
+__ZN6WebKit27NetscapePluginInstanceProxy21forgetBrowserObjectIDEj
+__ZN6WebKit27NetscapePluginInstanceProxy14LocalObjectMap6forgetEj
__ZN6WebKit26HostedNetscapePluginStreamC1EPNS_27NetscapePluginInstanceProxyEjP12NSURLRequest
__ZN6WebKit26HostedNetscapePluginStreamC2EPNS_27NetscapePluginInstanceProxyEjP12NSURLRequest
__ZN3WTF7HashMapIjNS_6RefPtrIN6WebKit26HostedNetscapePluginStreamEEENS_7IntHashIjEENS_10HashTraitsIjEENS7_IS4_EEE3addERKjRKS4_
__ZN3WTF9HashTableIjSt4pairIjNS_6RefPtrIN6WebKit26HostedNetscapePluginStreamEEEENS_18PairFirstExtractorIS6_EENS_7IntHashIjEENS_
__ZN6WebKit26HostedNetscapePluginStream5startEv
--[WebHostedNetscapePluginView createPluginBindingsInstance:]
+-[WebBaseNetscapePluginView element]
+-[WebBaseNetscapePluginView shouldClipOutPlugin]
+__ZNK7WebCore12PluginWidget14isPluginWidgetEv
+-[WebHostedNetscapePluginView pluginLayer]
+__ZN7WebCore6Widget22widgetPositionsUpdatedEv
+-[WebBaseNetscapePluginView windowResignedKey:]
+-[WebBaseNetscapePluginView invalidatePluginContentRect:]
+__ZN6WebKit26HostedNetscapePluginStream18didReceiveResponseEPN7WebCore26NetscapePlugInStreamLoaderERKNS1_16ResourceResponseE
+_WKGetNSURLResponseLastModifiedDate
+__ZN6WebKit26HostedNetscapePluginStream11startStreamEP5NSURLxP6NSDateP8NSStringP6NSData
+-[NSURL(WebNSURLExtras) _web_URLCString]
+__WKPHStartStream
+__ZNK6WebKit26HostedNetscapePluginStream15wantsAllStreamsEv
+__ZN6WebKit26HostedNetscapePluginStream14didReceiveDataEPN7WebCore26NetscapePlugInStreamLoaderEPKci
+__WKPHStreamDidReceiveData
+__ZN6WebKit26HostedNetscapePluginStream16didFinishLoadingEPN7WebCore26NetscapePlugInStreamLoaderE
+__WKPHStreamDidFinishLoading
+__ZN6WebKit27NetscapePluginInstanceProxy16disconnectStreamEPNS_26HostedNetscapePluginStreamE
+__ZN6WebKit26HostedNetscapePluginStreamD0Ev
__ZN6WebKit27NetscapePluginInstanceProxy22createBindingsInstanceEN3WTF10PassRefPtrIN3JSC8Bindings10RootObjectEEE
__WKPHGetScriptableNPObject
-__XPCInvalidateRect
-_WKPCInvalidateRect
-__ZN6WebKit27NetscapePluginInstanceProxy14invalidateRectEdddd
__XPCGetScriptableNPObjectReply
_WKPCGetScriptableNPObjectReply
__ZN6WebKit13ProxyInstanceC1EN3WTF10PassRefPtrIN3JSC8Bindings10RootObjectEEEPNS_27NetscapePluginInstanceProxyEj
@@ -1451,6 +1320,9 @@ __ZN3WTF9HashTableIPN6WebKit13ProxyInstanceES3_NS_17IdentityExtractorIS3_EENS_7P
__ZN3WTF9HashTableIPN6WebKit13ProxyInstanceES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E6rehashEi
__ZN3WTF9HashTableIPN6WebKit13ProxyInstanceES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E13allocate
__ZN6WebKit27NetscapePluginInstanceProxy26GetScriptableNPObjectReplyD0Ev
+__ZN6WebKit13ProxyInstance16newRuntimeObjectEPN3JSC9ExecStateE
+__ZN6WebKit18ProxyRuntimeObjectC1EPN3JSC9ExecStateEN3WTF10PassRefPtrINS_13ProxyInstanceEEE
+__ZN6WebKit18ProxyRuntimeObjectC2EPN3JSC9ExecStateEN3WTF10PassRefPtrINS_13ProxyInstanceEEE
__ZN3JSC8Bindings8Instance12virtualBeginEv
__ZNK6WebKit13ProxyInstance8getClassEv
__ZN6WebKitL10proxyClassEv
@@ -1459,293 +1331,189 @@ __ZN6WebKit13ProxyInstance10fieldNamedERKN3JSC10IdentifierE
__WKPHNPObjectHasProperty
__XPCIdentifierInfo
_WKPCIdentifierInfo
-__ZN3WTF7HashMapINS_6RefPtrIN3JSC7UString3RepEEEPNS2_8Bindings5FieldENS_7StrHashIS5_EENS_10HashTraitsIS5_EENSB_IS8_EEE3addEPS4_
-__ZN3WTF9HashTableINS_6RefPtrIN3JSC7UString3RepEEESt4pairIS5_PNS2_8Bindings5FieldEENS_18PairFirstExtractorISA_EENS_7StrHashIS5_
__ZNK6WebKit10ProxyClass12methodsNamedERKN3JSC10IdentifierEPNS1_8Bindings8InstanceE
__ZN6WebKit13ProxyInstance12methodsNamedERKN3JSC10IdentifierE
__WKPHNPObjectHasMethod
-__ZN3WTF7HashMapINS_6RefPtrIN3JSC7UString3RepEEEPNS2_8Bindings6MethodENS_7StrHashIS5_EENS_10HashTraitsIS5_EENSB_IS8_EEE3addEPS4
-__ZN3WTF9HashTableINS_6RefPtrIN3JSC7UString3RepEEESt4pairIS5_PNS2_8Bindings6MethodEENS_18PairFirstExtractorISA_EENS_7StrHashIS5
-__ZN3WTF6VectorIPN3JSC8Bindings6MethodELm0EEC1ERKS5_
-__ZN3WTF6VectorIPN3JSC8Bindings6MethodELm0EEC2ERKS5_
__ZN3JSC8Bindings5Class14fallbackObjectEPNS_9ExecStateEPNS0_8InstanceERKNS_10IdentifierE
__ZN3JSC8Bindings8Instance10virtualEndEv
__ZN3JSC8Bindings8Instance18getOwnPropertySlotEPNS_8JSObjectEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE
-__ZN6WebKit26HostedNetscapePluginStream7didFailEPN7WebCore26NetscapePlugInStreamLoaderERKNS1_13ResourceErrorE
-__WKPHStreamDidFail
-__ZN15WebChromeClient10windowRectEv
-__ZN6WebKit13ProxyInstanceD0Ev
-__ZN3WTF20deleteAllPairSecondsIPN3JSC8Bindings5FieldEKNS_7HashMapINS_6RefPtrINS1_7UString3RepEEES4_NS_7StrHashIS9_EENS_10HashTr
-__ZN3WTF20deleteAllPairSecondsIPN3JSC8Bindings6MethodEKNS_7HashMapINS_6RefPtrINS1_7UString3RepEEES4_NS_7StrHashIS9_EENS_10HashT
-__ZN6WebKit27NetscapePluginInstanceProxy14removeInstanceEPNS_13ProxyInstanceE
-__ZN3WTF9HashTableIPN6WebKit13ProxyInstanceES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E4findIS3_N
-__ZN3WTF9HashTableIPN6WebKit13ProxyInstanceES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E47removeAn
-__ZN3WTF9HashTableIPN6WebKit13ProxyInstanceES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E6removeEPS
-__ZN6WebKit13ProxyInstance10invalidateEv
-__WKPHNPObjectRelease
-__ZN3WTF6VectorINS_6RefPtrIN6WebKit26HostedNetscapePluginStreamEEELm0EE14expandCapacityEm
-__ZN3WTF6VectorINS_6RefPtrIN6WebKit26HostedNetscapePluginStreamEEELm0EE15reserveCapacityEm
-__ZN6WebKit26HostedNetscapePluginStream4stopEv
-__ZN3WTF6VectorINS_6RefPtrIN6WebKit26HostedNetscapePluginStreamEEELm0EE6shrinkEm
-__ZN3JSC21UStringSourceProviderD0Ev
--[WebView(WebIBActions) goForward:]
--[WebView goForward]
--[WebFramePolicyListener download]
-__ZN20WebFrameLoaderClient8downloadEPN7WebCore14ResourceHandleERKNS0_15ResourceRequestES5_RKNS0_16ResourceResponseE
--[WebDownload _initWithLoadingConnection:request:response:delegate:proxy:]
--[WebDownload _setRealDelegate:]
--[WebDownloadInternal setRealDelegate:]
--[WebDownload init]
--[WebDownloadInternal respondsToSelector:]
--[WebDownloadInternal downloadDidBegin:]
--[WebDownloadInternal download:didReceiveResponse:]
-__ZNK20WebFrameLoaderClient25setOriginalURLForDownloadEP11WebDownloadRKN7WebCore15ResourceRequestE
-__ZN20WebFrameLoaderClient29interruptForPolicyChangeErrorERKN7WebCore15ResourceRequestE
--[WebDownloadInternal download:didReceiveDataOfLength:]
--[WebDownloadInternal download:decideDestinationWithSuggestedFilename:]
--[NSFileManager(WebNSFileManagerExtras) _webkit_setMetadataURL:referrer:atPath:]
-_setMetaData
-_WKSetMetadataURL
--[WebDownloadInternal download:didCreateDestination:]
--[WebDownloadInternal downloadDidFinish:]
--[WebDownload dealloc]
--[WebDownloadInternal dealloc]
-__ZN20NetscapePluginWidget11handleEventEPN7WebCore5EventE
--[WebHostedNetscapePluginView handleMouseMoved:]
-__ZN6WebKit27NetscapePluginInstanceProxy10mouseEventEP6NSViewP7NSEvent16NPCocoaEventType
-__WKPHPluginInstanceMouseEvent
-__ZN6WebKit26HostedNetscapePluginStream18didReceiveResponseEPN7WebCore26NetscapePlugInStreamLoaderERKNS1_16ResourceResponseE
-_WKGetNSURLResponseLastModifiedDate
-__ZN6WebKit26HostedNetscapePluginStream11startStreamEP5NSURLxP6NSDateP8NSStringP6NSData
--[NSURL(WebNSURLExtras) _web_URLCString]
-__WKPHStartStream
-__ZNK6WebKit26HostedNetscapePluginStream15wantsAllStreamsEv
-__ZN6WebKit26HostedNetscapePluginStream14didReceiveDataEPN7WebCore26NetscapePlugInStreamLoaderEPKci
-__WKPHStreamDidReceiveData
-__ZN6WebKit26HostedNetscapePluginStream16didFinishLoadingEPN7WebCore26NetscapePlugInStreamLoaderE
-__WKPHStreamDidFinishLoading
-__ZN6WebKit27NetscapePluginInstanceProxy16disconnectStreamEPNS_26HostedNetscapePluginStreamE
-__ZN6WebKit26HostedNetscapePluginStreamD0Ev
--[WebHostedNetscapePluginView mouseExited:]
-__ZN20WebFrameLoaderClient18dispatchCreatePageEv
--[WebBaseNetscapePluginView preferencesHaveChanged:]
-__ZN20WebFrameLoaderClient12dispatchShowEv
--[WebBaseNetscapePluginView windowResignedKey:]
--[WebView(WebPendingPublic) canMarkAllTextMatches]
--[WebView(WebPendingPublic) searchFor:direction:caseSensitive:wrap:startInSelection:]
--[WebHTMLView(WebDocumentPrivateProtocols) searchFor:direction:caseSensitive:wrap:startInSelection:]
--[WebView(WebPendingPublic) rectsForTextMatches]
--[WebHTMLView(WebDocumentInternalProtocols) rectsForTextMatches]
-__ZN3WTF6VectorIN7WebCore7IntRectELm0EE6shrinkEm
--[WebHTMLView(WebDocumentPrivateProtocols) selectionRect]
--[WebHTMLView(WebDocumentPrivateProtocols) selectionTextRects]
-__ZN3WTF6VectorIN7WebCore9FloatRectELm0EE6shrinkEm
--[WebHTMLView(WebDocumentPrivateProtocols) selectionImageForcingBlackText:]
--[WebHTMLView(WebDocumentPrivateProtocols) selectedString]
--[WebFrame(WebInternal) _selectedString]
--[WebBaseNetscapePluginView windowBecameKey:]
--[WebHostedNetscapePluginView windowFrameDidChange:]
-+[WebStringTruncator widthOfString:font:]
+__ZN20WebFrameLoaderClient16restoreViewStateEv
+__ZN3WTF7HashMapINS_6RefPtrIN7WebCore10StringImplEEEPN3JSC8Bindings6MethodENS2_10StringHashENS_10HashTraitsIS4_EENSA_IS8_EEE3ad
+__ZN3WTF9HashTableINS_6RefPtrIN7WebCore10StringImplEEESt4pairIS4_PN3JSC8Bindings6MethodEENS_18PairFirstExtractorISA_EENS2_10Str
__ZN3WTF6VectorIPN3JSC8Bindings6MethodELm0EE14expandCapacityEmPKS4_
__ZN3WTF6VectorIPN3JSC8Bindings6MethodELm0EE14expandCapacityEm
__ZN3WTF6VectorIPN3JSC8Bindings6MethodELm0EE15reserveCapacityEm
+__ZN3WTF6VectorIPN3JSC8Bindings6MethodELm0EEC1ERKS5_
+__ZN3WTF6VectorIPN3JSC8Bindings6MethodELm0EEC2ERKS5_
__ZN3WTF6VectorIPN3JSC8Bindings6MethodELm0EE6shrinkEm
-__ZN6WebKit13ProxyInstance12invokeMethodEPN3JSC9ExecStateERKN3WTF6VectorIPNS1_8Bindings6MethodELm0EEERKNS1_7ArgListE
+__ZN6WebKit13ProxyInstance9getMethodEPN3JSC9ExecStateERKNS1_10IdentifierE
+__ZN6WebKit13ProxyInstance12invokeMethodEPN3JSC9ExecStateEPNS1_13RuntimeMethodERKNS1_7ArgListE
+__ZNK6WebKit18ProxyRuntimeMethod9classInfoEv
__ZN6WebKit13ProxyInstance6invokeEPN3JSC9ExecStateE10InvokeTypeyRKNS1_7ArgListE
__ZN6WebKit27NetscapePluginInstanceProxy13marshalValuesEPN3JSC9ExecStateERKNS1_7ArgListE
__WKPHNPObjectInvoke
__XPCBooleanAndDataReply
_WKPCBooleanAndDataReply
+__ZN6WebKit27NetscapePluginInstanceProxy30moveGlobalExceptionToExecStateEPN3JSC9ExecStateE
+__ZN6WebKitL21globalExceptionStringEv
__ZN6WebKit27NetscapePluginInstanceProxy14demarshalValueEPN3JSC9ExecStateEPKcj
__ZN6WebKit27NetscapePluginInstanceProxy19BooleanAndDataReplyD0Ev
--[NSString(WebNSURLExtras) _webkit_stringByReplacingValidPercentEscapes]
--[WebFrame findFrameNamed:]
-__ZN6WebKit27NetscapePluginInstanceProxy18evaluateJavaScriptEPNS0_13PluginRequestE
--[WebHostedNetscapePluginView mouseEntered:]
--[WebView(WebIBActions) stopLoading:]
+-[WebBaseNetscapePluginView inFlatteningPaint]
+__ZN6WebKit27NetscapePluginInstanceProxy17retainLocalObjectEN3JSC7JSValueE
+__ZN6WebKit27NetscapePluginInstanceProxy18releaseLocalObjectEN3JSC7JSValueE
+-[WebView(WebPrivate) _viewWillDrawInternal]
+__ZNK3WTF7HashMapIPN7WebCore10StringImplEPN3JSC8JSStringENS1_10StringHashENS_10HashTraitsIS3_EENS8_IS6_EEE3getERKS3_
+__ZN3WTF6VectorIN3JSC8RegisterELm8EE6shrinkEm
+-[WebBaseNetscapePluginView supportsSnapshotting]
+__ZN6WebKit27NetscapePluginInstanceProxy8snapshotEP9CGContextjj
+__WKPHPluginInstanceSnapshot
+-[WebBaseNetscapePluginView windowBecameKey:]
+-[WebHostedNetscapePluginView windowFrameDidChange:]
+-[WebView(WebPendingPublic) zoomPageIn:]
+-[WebView _zoomIn:isTextOnly:]
+-[WebView(WebPendingPublic) zoomPageOut:]
+-[WebView _zoomOut:isTextOnly:]
+-[WebHostedNetscapePluginView visibleRectDidChange]
+-[WebBaseNetscapePluginView visibleRectDidChange]
+_WKSyncSurfaceToView
+-[WebPreferences(WebPrivate) setZoomsTextOnly:]
+-[WebBaseNetscapePluginView preferencesHaveChanged:]
+-[WebFrameView documentViewShouldHandlePrint]
+-[WebFrameView printOperationWithPrintInfo:]
+-[WebFrameView canPrintHeadersAndFooters]
+-[WebHTMLView canPrintHeadersAndFooters]
+-[WebHTMLView knowsPageRange:]
+-[NSPrintOperation(WebKitExtras) _web_availablePaperWidth]
+-[WebHTMLView(WebPrivate) _beginPrintModeWithPageWidth:shrinkToFit:]
+-[WebHTMLView _setPrinting:minimumPageWidth:maximumPageWidth:adjustViewSize:]
+-[WebHTMLView setNeedsToApplyStyles:]
+-[WebView(WebViewPrintingPrivate) _adjustPrintingMarginsForHeaderAndFooter]
+-[NSPrintOperation(WebKitExtras) _web_pageSetupScaleFactor]
+-[WebView(WebViewPrintingPrivate) _headerHeight]
+__Z28CallUIDelegateReturningFloatP7WebViewP13objc_selector
+-[WebView(WebViewPrintingPrivate) _footerHeight]
+-[WebHTMLView _scaleFactorForPrintOperation:]
+-[NSPrintOperation(WebKitExtras) _web_availablePaperHeight]
+-[WebFrame(WebInternal) _computePageRectsWithPrintWidthScaleFactor:printHeight:]
+-[WebHTMLView _provideTotalScaleFactorForPrintOperation:]
+-[WebHTMLView beginDocument]
+-[WebHTMLView endDocument]
+-[WebHTMLView _endPrintModeAndRestoreWindowAutodisplay]
+-[WebHTMLView(WebPrivate) _endPrintMode]
+-[WebView(WebIBActions) canMakeTextLarger]
+-[WebView(WebIBActions) canMakeTextSmaller]
+-[WebView(WebIBActions) makeTextLarger:]
+-[WebView(WebIBActions) makeTextSmaller:]
+-[WebView(WebPendingPublic) resetPageZoom:]
+-[WebView _resetZoom:isTextOnly:]
+-[WebView(WebIBActions) makeTextStandardSize:]
+-[WebView initWithCoder:]
+-[WebDynamicScrollBarsView initWithCoder:]
+-[WebPreferences initWithCoder:]
++[WebPreferences(WebInternal) _concatenateKeyWithIBCreatorID:]
+-[WebView setPreferences:]
+-[WebPreferences setMinimumFontSize:]
+-[NSMutableDictionary(WebNSDictionaryExtras) _webkit_setInt:forKey:]
+-[WebHTMLRepresentation documentSource]
+-[WebDataSource data]
+-[WebFrame loadData:MIMEType:textEncodingName:baseURL:]
+-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]
+__ZL22createUniqueWebDataURLv
+__ZN3WTF6RefPtrIN7WebCore10StringImplEED2Ev
+-[WebDefaultPolicyDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:]
++[WebPreferences(WebPrivate) _checkLastReferenceForIdentifier:]
+-[WebPreferences dealloc]
+-[WebPreferencesPrivate dealloc]
+-[WebView supportsTextEncoding]
+-[WebHTMLView(WebDocumentPrivateProtocols) supportsTextEncoding]
+-[WebView customTextEncodingName]
+-[WebView _mainFrameOverrideEncoding]
+-[WebView setCustomTextEncodingName:]
+__ZN6WebKit13ProxyInstanceD0Ev
+__ZN3WTF20deleteAllPairSecondsIPN3JSC8Bindings5FieldEKNS_7HashMapINS_6RefPtrIN7WebCore10StringImplEEES4_NS7_10StringHashENS_10H
+__ZN3WTF20deleteAllPairSecondsIPN3JSC8Bindings6MethodEKNS_7HashMapINS_6RefPtrIN7WebCore10StringImplEEES4_NS7_10StringHashENS_10
__ZN6WebKit11ProxyMethodD0Ev
--[WebDownloadInternal download:shouldDecodeSourceDataOfMIMEType:]
-__ZN20WebFrameLoaderClient25pluginWillHandleLoadErrorERKN7WebCore16ResourceResponseE
--[NSError(WebKitExtras) _initWithPluginErrorCode:contentURL:pluginPageURL:pluginName:MIMEType:]
--[WebHTMLRepresentation receivedError:withDataSource:]
-_WKDrawMediaUIPart
-__ZL24createCGImageRefFromDataPKhj
-__ZL14drawMediaImageP9CGContext6CGRectP7CGImage
-_WKDrawMediaSliderTrack
-_WKQTMovieMaxTimeSeekable
-__ZN15WebChromeClient5focusEv
-__Z13webGetNSImagePN7WebCore5ImageE7_NSSize
-__ZL12CallDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS0_S2_S0_
-__ZL12CallDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS0_S2_S0_S0_
-__ZL12CallDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS0_S2_S0_S0_S0_S0_
-__ZL12CallDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS0_S2_S0_S0_S0_
-__ZL12CallDelegateP7WebViewP11objc_objectP13objc_selectorS2_
-__Z24CallResourceLoadDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS2_S0_iS0_
-__ZL12CallDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS0_S2_S0_iS0_
-__ZSt16__introsort_loopIPiiEvT_S1_T0_
-__ZL9setCursorP8NSWindowP13objc_selector8_NSPoint
-+[WebNetscapePluginPackage initialize]
-_WebLMGetCurApRefNum
-_WebLMSetCurApRefNum
-+[WebNetscapePluginDocumentView initialize]
--[WebNetscapePluginDocumentView .cxx_construct]
--[WebNetscapePluginDocumentView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:ele
--[WebNetscapePluginDocumentView setAttributeKeys:andValues:]
--[WebNetscapePluginPackage load]
--[WebNetscapePluginPackage _tryLoad]
--[WebNetscapePluginPackage _applyDjVuWorkaround]
--[WebNetscapePluginDocumentView createPlugin]
--[WebNetscapePluginPackage open]
--[WebNetscapePluginDocumentView(Internal) _createPlugin]
-+[WebNetscapePluginDocumentView setCurrentPluginView:]
--[WebNetscapePluginPackage pluginFuncs]
-_NPN_UserAgent
-__Z21pluginViewForInstanceP4_NPP
-+[WebNetscapePluginDocumentView currentPluginView]
--[WebNetscapePluginDocumentView(WebNPPCallbacks) userAgent]
-_NPN_GetValue
--[WebNetscapePluginDocumentView(WebNPPCallbacks) getVariable:value:]
-_NPN_SetValue
--[WebNetscapePluginDocumentView(WebNPPCallbacks) setVariable:value:]
-_NPN_InvalidateRect
--[WebNetscapePluginDocumentView(WebNPPCallbacks) invalidateRect:]
-__ZN29WebNetscapePluginEventHandler6createEP29WebNetscapePluginDocumentView
--[WebNetscapePluginDocumentView eventModel]
-__ZN35WebNetscapePluginEventHandlerCarbonC1EP29WebNetscapePluginDocumentView
-__ZN35WebNetscapePluginEventHandlerCarbonC2EP29WebNetscapePluginDocumentView
--[WebNetscapePluginDocumentView updateAndSetWindow]
--[WebNetscapePluginDocumentView saveAndSetNewPortState]
--[WebNetscapePluginDocumentView saveAndSetNewPortStateForUpdate:]
--[WebNetscapePluginDocumentView superviewsHaveSuperviews]
--[WebNetscapePluginDocumentView setWindowIfNecessary]
--[WebNetscapePluginDocumentView isNewWindowEqualToOldWindow]
--[WebNetscapePluginDocumentView willCallPlugInFunction]
--[WebNetscapePluginDocumentView didCallPlugInFunction]
--[WebNetscapePluginDocumentView restorePortState:]
--[WebNetscapePluginDocumentView windowFocusChanged:]
-__ZN35WebNetscapePluginEventHandlerCarbon18windowFocusChangedEb
-__ZL14getCarbonEventP11EventRecord
-__ZN35WebNetscapePluginEventHandlerCarbon9sendEventEP11EventRecord
--[WebNetscapePluginDocumentView sendEvent:isDrawRect:]
--[WebNetscapePluginDocumentView stopTimers]
--[WebBaseNetscapePluginView stopTimers]
-__ZN35WebNetscapePluginEventHandlerCarbon10stopTimersEv
--[WebNetscapePluginDocumentView startTimers]
--[WebBaseNetscapePluginView startTimers]
-__ZN35WebNetscapePluginEventHandlerCarbon11startTimersEb
--[WebNetscapePluginDocumentView loadStream]
--[WebNetscapePluginDocumentView(Internal) _shouldCancelSrcStream]
--[NSURL(WebNSURLExtras) _web_isEmpty]
--[WebNetscapePluginDocumentView(WebNPPCallbacks) loadRequest:inTarget:withNotifyData:sendNotification:]
-__ZN23WebNetscapePluginStreamC1EP12NSURLRequestP4_NPPbPv
-__ZN23WebNetscapePluginStreamC2EP12NSURLRequestP4_NPPbPv
-__ZN23WebNetscapePluginStream9setPluginEP4_NPP
--[WebBaseNetscapePluginView pluginPackage]
-__ZL7streamsv
-__ZN3WTF7HashMapIP9_NPStreamP4_NPPNS_7PtrHashIS2_EENS_10HashTraitsIS2_EENS7_IS4_EEE3addERKS2_RKS4_
-__ZN3WTF9HashTableIP9_NPStreamSt4pairIS2_P4_NPPENS_18PairFirstExtractorIS6_EENS_7PtrHashIS2_EENS_14PairHashTraitsINS_10HashTrai
-__ZN3WTF7HashSetINS_6RefPtrI23WebNetscapePluginStreamEENS_7PtrHashIS3_EENS_10HashTraitsIS3_EEE3addERKS3_
-__ZN3WTF9HashTableINS_6RefPtrI23WebNetscapePluginStreamEES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES
-__ZN23WebNetscapePluginStream5startEv
-__ZN3WTF6VectorI6CGRectLm16EE6shrinkEm
--[WebNetscapePluginDocumentView drawRect:]
--[WebNetscapePluginDocumentView sendDrawRectEvent:]
-__ZN35WebNetscapePluginEventHandlerCarbon8drawRectEP9CGContextRK7_NSRect
-__ZN35WebNetscapePluginEventHandlerCarbon19nullEventTimerFiredEP16__CFRunLoopTimerPv
-__ZN35WebNetscapePluginEventHandlerCarbon13sendNullEventEv
-__ZN23WebNetscapePluginStream18didReceiveResponseEPN7WebCore26NetscapePlugInStreamLoaderERKNS0_16ResourceResponseE
-__ZN23WebNetscapePluginStream11startStreamEP5NSURLxP6NSDateP8NSStringP6NSData
-__ZNK23WebNetscapePluginStream15wantsAllStreamsEv
-__ZN23WebNetscapePluginStream14didReceiveDataEPN7WebCore26NetscapePlugInStreamLoaderEPKci
-__ZN23WebNetscapePluginStream11deliverDataEv
-__ZN23WebNetscapePluginStream16didFinishLoadingEPN7WebCore26NetscapePlugInStreamLoaderE
-__ZN23WebNetscapePluginStream23destroyStreamWithReasonEs
-__ZN23WebNetscapePluginStream13destroyStreamEv
--[WebNetscapePluginDocumentView disconnectStream:]
-__ZN23WebNetscapePluginStreamD0Ev
--[WebNetscapePluginDocumentView createPluginScriptableObject]
-_NPN_MemFree
-_NPN_PostURLNotify
--[WebNetscapePluginDocumentView(WebNPPCallbacks) postURLNotify:target:len:buf:file:notifyData:]
--[WebNetscapePluginDocumentView(WebNPPCallbacks) _postURL:target:len:buf:file:notifyData:sendNotification:allowHeaders:]
--[NSData(WebNSDataExtras) _web_startsWithBlankLine]
--[NSData(WebNSDataExtras) _web_locationAfterFirstBlankLine]
--[NSData(WebNSDataExtras) _webkit_parseRFC822HeaderFields]
--[NSString(WebNSDataExtrasInternal) _web_capitalizeRFC822HeaderFieldName]
-_NPN_GetURLNotify
--[WebNetscapePluginDocumentView(WebNPPCallbacks) getURLNotify:target:notifyData:]
-_NPN_GetURL
--[WebNetscapePluginDocumentView(WebNPPCallbacks) getURL:target:]
--[WebPluginRequest initWithRequest:frameName:notifyData:sendNotification:didStartFromUserGesture:]
--[WebNetscapePluginDocumentView(WebNPPCallbacks) loadPluginRequest:]
--[WebPluginRequest request]
--[WebPluginRequest frameName]
--[WebNetscapePluginDocumentView(WebNPPCallbacks) evaluateJavaScriptPluginRequest:]
--[WebPluginRequest isCurrentEventUserGesture]
--[WebPluginRequest sendNotification]
--[WebPluginRequest dealloc]
--[WebHistoryItem(WebPrivate) _getDailyVisitCounts:]
--[WebHistoryItem(WebPrivate) _getWeeklyVisitCounts:]
--[WebHistoryItem(WebPrivate) _lastVisitWasHTTPNonGet]
--[WebHistoryItem(WebPrivate) lastVisitWasFailure]
--[WebHistoryItem(WebPrivate) _redirectURLs]
--[WebView(WebIBActions) reload:]
--[WebFrame reload]
-__Z14CallUIDelegateP7WebViewP13objc_selectorP11objc_objectj
-__ZL12CallDelegateP7WebViewP11objc_objectP13objc_selectorS2_j
--[WebNetscapePluginDocumentView mouseEntered:]
-__ZN35WebNetscapePluginEventHandlerCarbon12mouseEnteredEP7NSEvent
-__ZL14getCarbonEventP11EventRecordP7NSEvent
-_WKConvertNSEventToCarbonEvent
--[WebNetscapePluginDocumentView handleMouseMoved:]
-__ZN35WebNetscapePluginEventHandlerCarbon10mouseMovedEP7NSEvent
--[WebBaseNetscapePluginView acceptsFirstResponder]
--[WebBaseNetscapePluginView becomeFirstResponder]
--[WebNetscapePluginDocumentView focusChanged]
-__ZN35WebNetscapePluginEventHandlerCarbon12focusChangedEb
-__ZN35WebNetscapePluginEventHandlerCarbon22installKeyEventHandlerEv
--[WebNetscapePluginDocumentView mouseDown:]
-__ZN35WebNetscapePluginEventHandlerCarbon9mouseDownEP7NSEvent
--[WebNetscapePluginDocumentView inputContext]
--[WebNetscapePluginDocumentView mouseUp:]
-__ZN35WebNetscapePluginEventHandlerCarbon7mouseUpEP7NSEvent
--[WebNetscapePluginDocumentView mouseExited:]
-__ZN35WebNetscapePluginEventHandlerCarbon11mouseExitedEP7NSEvent
--[WebNetscapePluginDocumentView mouseDragged:]
-__ZN35WebNetscapePluginEventHandlerCarbon12mouseDraggedEP7NSEvent
--[WebNetscapePluginDocumentView keyDown:]
-__ZN35WebNetscapePluginEventHandlerCarbon7keyDownEP7NSEvent
-_WKSendKeyEventToTSM
-__ZN35WebNetscapePluginEventHandlerCarbon15TSMEventHandlerEP25OpaqueEventHandlerCallRefP14OpaqueEventRefPv
--[WebNetscapePluginDocumentView keyUp:]
-__ZN35WebNetscapePluginEventHandlerCarbon5keyUpEP7NSEvent
--[WebNetscapePluginDocumentView flagsChanged:]
-__ZN35WebNetscapePluginEventHandlerCarbon12flagsChangedEP7NSEvent
--[WebBaseNetscapePluginView resignFirstResponder]
-__ZN35WebNetscapePluginEventHandlerCarbon21removeKeyEventHandlerEv
--[WebNetscapePluginDocumentView shouldStop]
--[WebNetscapePluginDocumentView destroyPlugin]
--[WebNetscapePluginDocumentView(Internal) _destroyPlugin]
--[WebNetscapePluginPackage close]
-__ZN35WebNetscapePluginEventHandlerCarbonD0Ev
--[WebNetscapePluginDocumentView dealloc]
--[WebNetscapePluginDocumentView fini]
--[WebNetscapePluginDocumentView .cxx_destruct]
-__ZL12CallDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS0_S2_S0_dS0_S0_
--[WebViewFactory imageTitleForFilename:width:height:]
--[WebHTMLRepresentation matchLabels:againstElement:]
--[WebHTMLRepresentation searchForLabels:beforeElement:]
-__ZN20WebFrameLoaderClient22createJavaAppletWidgetERKN7WebCore7IntSizeEPNS0_17HTMLAppletElementERKNS0_4KURLERKN3WTF6VectorINS0_
-__ZL14parameterValueRKN3WTF6VectorIN7WebCore6StringELm0EEES5_RKS2_
-__ZN7WebCore6Widget11handleEventEPNS_5EventE
-__ZN20WebFrameLoaderClient10javaAppletEP6NSView
--[WebPluginController webPlugInContainerShowStatus:]
-__ZN20WebFrameLoaderClient21fileDoesNotExistErrorERKN7WebCore16ResourceResponseE
-__ZN23WebNetscapePluginStream7didFailEPN7WebCore26NetscapePlugInStreamLoaderERKNS0_13ResourceErrorE
-__ZN23WebNetscapePluginStream22destroyStreamWithErrorEP7NSError
-__ZN23WebNetscapePluginStream14reasonForErrorEP7NSError
+__ZN6WebKit27NetscapePluginInstanceProxy14removeInstanceEPNS_13ProxyInstanceE
+__ZN3WTF9HashTableIPN6WebKit13ProxyInstanceES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E4findIS3_N
+__ZN3WTF9HashTableIPN6WebKit13ProxyInstanceES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E47removeAn
+__ZN3WTF9HashTableIPN6WebKit13ProxyInstanceES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E6removeEPS
+__ZN6WebKit13ProxyInstance10invalidateEv
+__WKPHNPObjectRelease
+__ZN7WebCore20StringSourceProviderD0Ev
+__ZN6WebKit18ProxyRuntimeObjectD1Ev
+__ZN6WebKit18ProxyRuntimeObjectD2Ev
+__ZN6WebKit18ProxyRuntimeMethodD1Ev
+__ZN3JSC13RuntimeMethodD2Ev
+_WKGetUserToBaseCTM
+-[WebView(WebIBActions) goBack:]
+-[WebView goBack]
+__ZNK20WebFrameLoaderClient21shouldGoToHistoryItemEPN7WebCore11HistoryItemE
+-[WebHistoryItem(WebPrivate) URL]
+__ZNK20WebFrameLoaderClient33dispatchDidChangeBackForwardIndexEv
+-[WebView(WebIBActions) goForward:]
+-[WebView goForward]
+__ZN20WebFrameLoaderClient36transitionToCommittedFromCachedFrameEPN7WebCore11CachedFrameE
+-[WebFrame loadAlternateHTMLString:baseURL:forUnreachableURL:]
+-[WebFrame _loadHTMLString:baseURL:unreachableURL:]
+-[WebFrame(WebInternal) _findFrameWithSelection]
+-[WebFrame(WebInternal) _hasSelection]
+__ZN20WebFrameLoaderClient19dispatchDidFailLoadERKN7WebCore13ResourceErrorE
+-[WebView(WebPrivate) _didFailLoadWithError:forFrame:]
+-[WebHTMLView keyUp:]
+-[WebHTMLView keyDown:]
+-[WebHTMLView(WebNSTextInputSupport) insertText:]
+__ZN3WTF6VectorIN7WebCore15KeypressCommandELm0EE14expandCapacityEmPKS2_
+__ZN3WTF6VectorIN7WebCore15KeypressCommandELm0EE14expandCapacityEm
+__ZN3WTF6VectorIN7WebCore15KeypressCommandELm0EE15reserveCapacityEm
+-[WebFrameView keyDown:]
+-[WebFrameView(WebPrivate) _isScrollable]
+-[WebDynamicScrollBarsView horizontalScrollingAllowed]
+-[WebDynamicScrollBarsView verticalScrollingAllowed]
+-[WebFrameView(WebPrivate) _largestScrollableChild]
+-[WebHTMLView(WebInternal) detachRootLayer]
+-[WebBaseNetscapePluginView viewWillMoveToHostWindow:]
+-[WebBaseNetscapePluginView viewDidMoveToHostWindow]
+__ZN20WebFrameLoaderClient38dispatchDidLoadResourceFromMemoryCacheEPN7WebCore14DocumentLoaderERKNS0_15ResourceRequestERKNS0_16R
+__Z24CallResourceLoadDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS2_S0_S0_lS0_
+__ZL32applyHostNameFunctionToURLStringP8NSStringPFvS0_8_NSRangePvES2_
+__ZL29collectRangesThatNeedEncodingP8NSString8_NSRangePv
+__ZL28collectRangesThatNeedMappingP8NSString8_NSRangePva
+-[NSString(WebNSURLExtras) _web_hostNameNeedsEncodingWithRange:]
+__ZL8hexDigiti
+-[NSEvent(WebExtras) _web_isOptionTabKeyEvent]
+-[NSString(WebNSURLExtras) _web_isUserVisibleURL]
++[WebStringTruncator rightTruncateString:toWidth:withFont:]
+__ZN20WebFrameLoaderClient41dispatchDidReceiveAuthenticationChallengeEPN7WebCore14DocumentLoaderEmRKNS0_23AuthenticationChallen
++[WebPanelAuthenticationHandler sharedHandler]
+-[WebPanelAuthenticationHandler init]
+-[WebPanelAuthenticationHandler startAuthentication:window:]
+-[WebAuthenticationPanel initWithCallback:selector:]
+-[NSMutableDictionary(WebNSDictionaryExtras) _webkit_setObject:forUncopiedKey:]
+-[WebAuthenticationPanel runAsSheetOnWindow:withChallenge:]
+-[WebAuthenticationPanel setUpForChallenge:]
+-[WebAuthenticationPanel loadNib]
+-[NSControl(WebExtras) sizeToFitAndAdjustWindowHeight]
+-[NonBlockingPanel _blocksActionWhenModal:]
+-[WebAuthenticationPanel logIn:]
+-[WebAuthenticationPanel sheetDidEnd:returnCode:contextInfo:]
+-[WebPanelAuthenticationHandler _authenticationDoneWithChallenge:result:]
+-[WebAuthenticationPanel dealloc]
+-[WebPanelAuthenticationHandler tryNextChallengeForWindow:]
+-[WebView(WebPrivate) _setIncludesFlattenedCompositingLayersWhenDrawingToBitmap:]
+-[WebHTMLView(WebPrivate) _compositingLayersHostingView]
+-[WebHTMLView mouseDragged:]
+-[WebDynamicScrollBarsView(WebInternal) allowsHorizontalScrolling]
+__ZN15WebChromeClient11scaleFactorEv
+__ZN15WebChromeClient13setWindowRectERKN7WebCore9FloatRectE
+__ZN15WebEditorClient33isSelectTrailingWhitespaceEnabledEv
+-[WebView(WebPrivate) isSelectTrailingWhitespaceEnabled]
__ZN13WebDragClient24declareAndWriteDragImageEP12NSPasteboardP10DOMElementP5NSURLP8NSStringPN7WebCore5FrameE
__ZL14getTopHTMLViewPN7WebCore5FrameE
+-[DOMNode(WebDOMNodeOperations) webArchive]
+-[WebArchive(WebInternal) _initWithCoreLegacyWebArchive:]
++[WebArchivePrivate initialize]
+-[WebArchivePrivate .cxx_construct]
+-[WebArchivePrivate initWithCoreArchive:]
-[NSPasteboard(WebExtras) _web_declareAndWriteDragImageForElement:URL:title:archive:source:]
+[NSPasteboard(WebExtras) _web_writableTypesForImageIncludingArchive:]
__ZL33_writableTypesForImageWithArchivev
@@ -1759,214 +1527,466 @@ __ZL36_writableTypesForImageWithoutArchivev
__ZL18promisedDataClientv
__ZN7WebCore20CachedResourceClient12imageChangedEPNS_11CachedImageEPKNS_7IntRectE
__ZN7WebCore20CachedResourceClient14notifyFinishedEPNS_14CachedResourceE
+-[WebArchive data]
+-[WebArchivePrivate coreArchive]
__ZN13WebDragClient27willPerformDragSourceActionEN7WebCore16DragSourceActionERKNS0_8IntPointEPNS0_9ClipboardE
-[WebDefaultUIDelegate webView:willPerformDragSourceAction:fromPoint:withPasteboard:]
__ZN13WebDragClient9startDragEN3WTF9RetainPtrI7NSImageEERKN7WebCore8IntPointES7_PNS4_9ClipboardEPNS4_5FrameEb
-[WebHTMLView(WebInternal) _mouseDownEvent]
-[WebHTMLView dragImage:at:offset:event:pasteboard:source:slideBack:]
-[WebHTMLView draggingSourceOperationMaskForLocal:]
--[WebHTMLView draggedImage:movedTo:]
--[WebFrame(WebInternal) _dragSourceMovedTo:]
+-[WebView _hitTest:dragTypes:]
+-[WebView draggingEntered:]
+-[WebView documentViewAtWindowPoint:]
+-[WebView(WebFileInternal) _frameViewAtWindowPoint:]
+__ZN13WebDragClient17actionMaskForDragEPN7WebCore8DragDataE
+-[WebDefaultUIDelegate webView:dragDestinationActionMaskForDraggingInfo:]
+__ZNK19WebPasteboardHelper25insertablePasteboardTypesEv
+-[WebView draggingUpdated:]
+-[WebView _shouldAutoscrollForDraggingInfo:]
-[WebView draggingExited:]
-[WebHTMLView draggedImage:endedAt:operation:]
-[WebFrame(WebInternal) _dragSourceEndedAt:operation:]
--[WebNetscapePluginDocumentView setLayer:]
-__ZN34WebNetscapePluginEventHandlerCocoaC1EP29WebNetscapePluginDocumentView
-__ZN34WebNetscapePluginEventHandlerCocoaC2EP29WebNetscapePluginDocumentView
-__ZN34WebNetscapePluginEventHandlerCocoa18windowFocusChangedEb
-__ZN34WebNetscapePluginEventHandlerCocoa9sendEventEP13_NPCocoaEvent
-__ZN29WebNetscapePluginEventHandler10stopTimersEv
-__ZN29WebNetscapePluginEventHandler11startTimersEb
-_NPN_ConvertPoint
--[WebBaseNetscapePluginView convertFromX:andY:space:toX:andY:space:]
-__Z26browserContainerCheckFuncsv
-_WKN_CheckIfAllowedToLoadURL
--[WebNetscapePluginDocumentView checkIfAllowedToLoadURL:frame:callbackFunc:context:]
--[WebNetscapeContainerCheckContextInfo initWithCheckRequestID:callbackFunc:context:]
-+[WebPluginContainerCheck checkWithRequest:target:resultObject:selector:controller:contextInfo:]
--[WebPluginContainerCheck initWithRequest:target:resultObject:selector:controller:contextInfo:]
--[WebPluginContainerCheck start]
--[WebPluginContainerCheck _isForbiddenFileLoad]
--[WebPluginContainerCheck _askPolicyDelegate]
--[WebPluginContainerCheck _actionInformationWithURL:]
--[WebPolicyDecisionListener _initWithTarget:action:]
--[WebPolicyDecisionListenerPrivate initWithTarget:action:]
--[WebPolicyDecisionListener use]
--[WebPolicyDecisionListener _usePolicy:]
--[WebPluginContainerCheck _continueWithPolicy:]
--[WebNetscapePluginDocumentView _containerCheckResult:contextInfo:]
--[WebNetscapeContainerCheckContextInfo callback]
--[WebNetscapeContainerCheckContextInfo context]
--[WebNetscapeContainerCheckContextInfo checkRequestID]
--[WebNetscapePluginDocumentView plugin]
--[WebNetscapePluginDocumentView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]
--[WebPluginContainerCheck contextInfo]
--[WebNetscapePluginDocumentView cancelCheckIfAllowedToLoadURL:]
--[WebPluginContainerCheck cancel]
--[WebPolicyDecisionListener _invalidate]
--[WebPolicyDecisionListener dealloc]
--[WebPolicyDecisionListenerPrivate dealloc]
--[WebPluginContainerCheck dealloc]
-_NPN_MemAlloc
-__ZN34WebNetscapePluginEventHandlerCocoaD0Ev
+-[WebArchive dealloc]
+-[WebArchivePrivate dealloc]
+-[WebArchivePrivate .cxx_destruct]
+__ZN3WTF6VectorINS_6RefPtrIN7WebCore15ArchiveResourceEEELm0EE6shrinkEm
+__ZN7WebCore17FrameLoaderClient29dispatchDidNavigateWithinPageEv
+__ZN20WebFrameLoaderClient35dispatchDidChangeLocationWithinPageEv
+__ZN20WebFrameLoaderClient13didFinishLoadEv
+-[WebPluginDatabase destroyAllPluginInstanceViews]
+-[WebPluginDatabase dealloc]
+__ZN6WebKit26HostedNetscapePluginStream10cancelLoadEs
+__ZNK6WebKit26HostedNetscapePluginStream14errorForReasonEs
+__ZN6WebKit26HostedNetscapePluginStream10cancelLoadEP7NSError
+__ZN6WebKit26HostedNetscapePluginStream7didFailEPN7WebCore26NetscapePlugInStreamLoaderERKNS1_13ResourceErrorE
+__ZN6WebKit26HostedNetscapePluginStream14reasonForErrorEP7NSError
+__WKPHStreamDidFail
+-[WebHTMLView(WebPrivate) pasteboard:provideDataForType:]
+-[WebHTMLView(WebInternal) promisedDragTIFFDataSource]
+-[WebArchive initWithData:]
+-[WebArchivePrivate init]
+-[WebArchivePrivate setCoreArchive:]
+-[NSPasteboard(WebExtras) _web_writePromisedRTFDFromArchive:containsImage:]
+-[WebArchive subresources]
+-[WebResource(WebResourceInternal) _initWithCoreResource:]
++[WebResourcePrivate initialize]
+-[WebResourcePrivate initWithCoreResource:]
+-[WebArchive mainResource]
+-[WebResource MIMEType]
+-[WebResource(WebResourcePrivate) _fileWrapperRepresentation]
+-[WebResource data]
+-[WebResource(WebResourcePrivate) _suggestedFilename]
+-[NSPasteboard(WebExtras) _web_writeFileWrapperAsRTFDAttachment:]
-[WebView _pluginForExtension:]
-[WebPluginDatabase pluginForExtension:]
-[WebBasePluginPackage extensionEnumerator]
-[WebBasePluginPackage MIMETypeForExtension:]
-__ZN34WebNetscapePluginEventHandlerCocoa10mouseMovedEP7NSEvent
-__ZN34WebNetscapePluginEventHandlerCocoa14sendMouseEventEP7NSEvent16NPCocoaEventType
-__ZN34WebNetscapePluginEventHandlerCocoa11mouseExitedEP7NSEvent
+__ZN20WebFrameLoaderClient22createJavaAppletWidgetERKN7WebCore7IntSizeEPNS0_17HTMLAppletElementERKNS0_4KURLERKN3WTF6VectorINS0_
+__ZL14parameterValueRKN3WTF6VectorIN7WebCore6StringELm0EEES5_RKS2_
+__ZL10pluginViewP8WebFrameP16WebPluginPackageP7NSArrayS4_P5NSURLP10DOMElementa
+-[WebPluginPackage viewFactory]
++[WebPluginController plugInViewWithArguments:fromPluginPackage:]
+-[WebPluginController addPlugin:]
+-[WebPluginController webView]
+-[WebPluginController webFrame]
+-[WebView(WebPrivate) defersCallbacks]
+__ZL13isKindOfClassP11objc_objectP8NSString
+__ZN20WebFrameLoaderClient10javaAppletEP6NSView
+-[WebPluginController webPlugInContainerShowStatus:]
+-[WebPluginController stopOnePlugin:]
+-[WebPluginController destroyPlugin:]
+-[WebPluginController destroyOnePlugin:]
+-[WebViewFactory fileButtonChooseFileLabel]
+-[WebViewFactory fileButtonNoFileSelectedLabel]
+-[NSString(WebNSURLExtras) _webkit_stringByReplacingValidPercentEscapes]
+-[WebFrame findFrameNamed:]
+__ZN6WebKit27NetscapePluginInstanceProxy18evaluateJavaScriptEPNS0_13PluginRequestE
+__ZN20WebFrameLoaderClient27registerForIconNotificationEb
+-[WebView(WebViewInternal) _receivedIconChangedNotification:]
+-[WebViewFactory imageTitleForFilename:width:height:]
+-[NSView(WebExtras) _web_dragShouldBeginFromMouseDown:withExpiration:]
+-[WebView(WebPendingPublic) markAllMatchesForText:caseSensitive:highlight:limit:]
+-[WebHTMLView(WebDocumentInternalProtocols) setMarkedTextMatchesAreHighlighted:]
+-[WebHTMLView(WebDocumentInternalProtocols) markAllMatchesForText:caseSensitive:limit:]
+-[WebView(WebPendingPublic) unmarkAllTextMatches]
+-[WebHTMLView(WebDocumentInternalProtocols) unmarkAllTextMatches]
+__ZL14incrementFrameP8WebFrameaa
++[NSPasteboard(WebExtras) _web_setFindPasteboardString:withOwner:]
+-[WebFrame globalContext]
+-[NSData(WebNSDataExtras) _web_startsWithBlankLine]
+-[NSData(WebNSDataExtras) _web_locationAfterFirstBlankLine]
+-[NSData(WebNSDataExtras) _webkit_parseRFC822HeaderFields]
+-[NSString(WebNSDataExtrasInternal) _web_capitalizeRFC822HeaderFieldName]
+-[NSFileManager(WebNSFileManagerExtras) _webkit_pathWithUniqueFilenameForPath:]
+-[NSString(WebKitExtras) _webkit_filenameByFixingIllegalCharacters]
+_fileExists
+__ZNK6WebKit13ProxyInstance27supportsInvokeDefaultMethodEv
+__WKPHNPObjectHasInvokeDefaultMethod
+__ZN20WebFrameLoaderClient20redirectDataToPluginEPN7WebCore6WidgetE
+-[WebHTMLRepresentation _redirectDataToManualLoader:forPluginView:]
+-[WebHostedNetscapePluginView pluginView:receivedResponse:]
+__ZN6WebKit26HostedNetscapePluginStreamC1EPNS_27NetscapePluginInstanceProxyEPN7WebCore11FrameLoaderE
+__ZN6WebKit26HostedNetscapePluginStreamC2EPNS_27NetscapePluginInstanceProxyEPN7WebCore11FrameLoaderE
+__ZN6WebKit27NetscapePluginInstanceProxy15setManualStreamEN3WTF10PassRefPtrINS_26HostedNetscapePluginStreamEEE
+__ZN6WebKit26HostedNetscapePluginStream23startStreamWithResponseEP13NSURLResponse
+-[WebHostedNetscapePluginView pluginView:receivedData:]
+-[WebHostedNetscapePluginView pluginViewFinishedLoading:]
+_WKDrawFocusRing
+-[WebViewFactory submitButtonDefaultLabel]
+__ZN15WebChromeClient36requestGeolocationPermissionForFrameEPN7WebCore5FrameEPNS0_11GeolocationE
+-[WebGeolocationPolicyListener .cxx_construct]
+-[WebGeolocationPolicyListener initWithGeolocation:]
+__Z14CallUIDelegateP7WebViewP13objc_selectorP11objc_objectS4_S4_
+-[WebSecurityOrigin port]
+-[WebSecurityOrigin host]
+-[WebSecurityOrigin protocol]
+-[WebGeolocationPolicyListener deny]
+-[WebGeolocationPolicyListener .cxx_destruct]
+-[WebHTMLRepresentation receivedError:withDataSource:]
+__ZN20WebFrameLoaderClient18cannotShowURLErrorERKN7WebCore15ResourceRequestE
+__ZN15WebChromeClient5focusEv
+__ZN20WebFrameLoaderClient21fileDoesNotExistErrorERKN7WebCore16ResourceResponseE
+__ZN6WebKit27NetscapePluginInstanceProxy14LocalObjectMap6retainEPN3JSC8JSObjectE
+__ZN6WebKit27NetscapePluginInstanceProxy14LocalObjectMap7releaseEPN3JSC8JSObjectE
+__XPCConvertPoint
+_WKPCConvertPoint
+__ZN6WebKit27NetscapePluginInstanceProxy12convertPointEdd17NPCoordinateSpaceRdS2_S1_
+-[WebBaseNetscapePluginView convertFromX:andY:space:toX:andY:space:]
+__ZN20NetscapePluginWidget11handleEventEPN7WebCore5EventE
+-[WebHostedNetscapePluginView handleMouseEntered:]
+__ZN6WebKit27NetscapePluginInstanceProxy10mouseEventEP6NSViewP7NSEvent16NPCocoaEventType
+__WKPHPluginInstanceMouseEvent
+-[WebHostedNetscapePluginView handleMouseMoved:]
+_WKGetFontInLanguageForCharacter
+__XPCInvalidateRect
+_WKPCInvalidateRect
+__ZN6WebKit27NetscapePluginInstanceProxy14invalidateRectEdddd
+__WKPHPluginInstanceDidDraw
+___WKPCInvalidateRect_block_invoke_2
+-[WebPDFRepresentation setDataSource:]
+-[WebPDFView initWithFrame:]
++[WebPDFView(FileInternal) _PDFPreviewViewClass]
++[WebPDFView PDFKitBundle]
+-[PDFPrefUpdatingProxy initWithView:]
+-[WebPDFView setNextKeyView:]
+-[WebPDFView viewWillMoveToWindow:]
+-[WebPDFView viewDidMoveToWindow]
+-[WebPDFView(FileInternal) _trackFirstResponder]
+-[WebPDFView(FileInternal) _clipViewForPDFDocumentView]
+-[WebPDFView becomeFirstResponder]
+-[WebPDFView setDataSource:]
+-[WebPDFRepresentation title]
+-[WebPDFView acceptsFirstResponder]
+-[WebPDFRepresentation receivedData:withDataSource:]
+-[WebPDFView dataSourceUpdated:]
+-[WebPDFView hitTest:]
+-[WebPDFRepresentation receivedError:withDataSource:]
+-[WebPDFView setNeedsLayout:]
+-[WebPDFView layout]
+-[WebPDFView selectionView]
+-[WebPDFView dealloc]
+__ZNK7WebCore20StringSourceProvider8getRangeEii
+__XPCResolveURL
+_WKPCResolveURL
+__ZN6WebKit27NetscapePluginInstanceProxy10resolveURLEPKcS2_RPcRj
+-[WebBaseNetscapePluginView resolvedURLStringForURL:target:]
+__ZN3WTF6VectorIcLm0EE6shrinkEm
+__XPCGetCookies
+_WKPCGetCookies
+__ZN6WebKit27NetscapePluginInstanceProxy10getCookiesEPcjRS1_Rj
+-[WebHostedNetscapePluginView setLayer:]
+__ZN3WTF7HashMapINS_6RefPtrIN7WebCore10StringImplEEEPN3JSC8Bindings5FieldENS2_10StringHashENS_10HashTraitsIS4_EENSA_IS8_EEE3add
+__ZN3WTF9HashTableINS_6RefPtrIN7WebCore10StringImplEEESt4pairIS4_PN3JSC8Bindings5FieldEENS_18PairFirstExtractorISA_EENS2_10Stri
+-[WebViewFactory refreshPlugins]
+__ZN15WebChromeClient27invalidateContentsAndWindowERKN7WebCore7IntRectEb
+-[WebFramePolicyListener invalidate]
+__ZN20WebFrameLoaderClient29interruptForPolicyChangeErrorERKN7WebCore15ResourceRequestE
+-[WebFramePolicyListener ignore]
+-[WebHTMLView(WebNSTextInputSupport) hasMarkedText]
+__ZN15WebEditorClient16shouldInsertTextERKN7WebCore6StringEPNS0_5RangeENS0_18EditorInsertActionE
+-[WebDefaultEditingDelegate webView:shouldInsertText:replacingDOMRange:givenAction:]
+__ZN15WebEditorClient24textFieldDidBeginEditingEPN7WebCore7ElementE
+__ZN15WebEditorClient24textDidChangeInTextFieldEPN7WebCore7ElementE
+-[WebHTMLRepresentation formForElement:]
+__ZN15WebEditorClient22registerCommandForUndoEN3WTF10PassRefPtrIN7WebCore11EditCommandEEE
+__ZN15WebEditorClient28registerCommandForUndoOrRedoEN3WTF10PassRefPtrIN7WebCore11EditCommandEEEb
+-[WebView(WebViewEditing) undoManager]
++[WebEditCommand initialize]
++[WebEditCommand commandWithEditCommand:]
+-[WebEditCommand .cxx_construct]
+-[WebEditCommand initWithEditCommand:]
+__ZN15WebEditorClient24respondToChangedContentsEv
+__ZN15WebEditorClient35isAutomaticQuoteSubstitutionEnabledEv
+__ZN15WebEditorClient31isAutomaticLinkDetectionEnabledEv
+__ZN15WebEditorClient34isAutomaticDashSubstitutionEnabledEv
+__ZN15WebEditorClient33isAutomaticTextReplacementEnabledEv
+__ZN15WebEditorClient36isAutomaticSpellingCorrectionEnabledEv
+__ZN15WebEditorClient20checkTextOfParagraphEPKtiyRN3WTF6VectorIN7WebCore18TextCheckingResultELm0EEE
+__ZN15WebEditorClient23spellCheckerDocumentTagEv
+-[WebView(WebViewEditing) spellCheckerDocumentTag]
+__ZN3WTF6VectorIN7WebCore18TextCheckingResultELm0EE14expandCapacityEmPKS2_
+__ZN3WTF6VectorIN7WebCore18TextCheckingResultELm0EE14expandCapacityEm
+__ZN3WTF6VectorIN7WebCore18TextCheckingResultELm0EE15reserveCapacityEm
+__ZN7WebCore18TextCheckingResultC2ERKS0_
+__ZN3WTF6VectorIN7WebCore13GrammarDetailELm0EEC1ERKS3_
+__ZN3WTF6VectorIN7WebCore13GrammarDetailELm0EEC2ERKS3_
+__ZN7WebCore18TextCheckingResultD2Ev
+_WKSetPatternPhaseInUserSpace
+__ZN15WebChromeClient13willPopUpMenuEP6NSMenu
+_WKPopupMenu
__ZN15WebChromeClient12createWindowEPN7WebCore5FrameERKNS0_16FrameLoadRequestERKNS0_14WindowFeaturesE
__Z14CallUIDelegateP7WebViewP13objc_selectorP11objc_objectS4_
-__ZL12CallDelegateP7WebViewP11objc_objectP13objc_selectorS2_S2_
+__ZN6WebKit25NetscapePluginHostManager15didCreateWindowEv
__ZN15WebChromeClient18setToolbarsVisibleEb
__ZN15WebChromeClient19setStatusbarVisibleEb
__ZN15WebChromeClient20setScrollbarsVisibleEb
+-[WebFrameView setAllowsScrolling:]
__ZN15WebChromeClient17setMenubarVisibleEb
__ZN15WebChromeClient12setResizableEb
__ZN15WebChromeClient8pageRectEv
-__ZN15WebChromeClient13setWindowRectERKN7WebCore9FloatRectE
__ZN15WebChromeClient4showEv
-__ZN34WebNetscapePluginEventHandlerCocoa12mouseEnteredEP7NSEvent
-__ZN34WebNetscapePluginEventHandlerCocoa12focusChangedEb
-__ZN34WebNetscapePluginEventHandlerCocoa22installKeyEventHandlerEv
-__ZN34WebNetscapePluginEventHandlerCocoa9mouseDownEP7NSEvent
-__ZN34WebNetscapePluginEventHandlerCocoa12mouseDraggedEP7NSEvent
-__ZN34WebNetscapePluginEventHandlerCocoa7mouseUpEP7NSEvent
+-[WebHostedNetscapePluginView handleMouseExited:]
+-[WebEditCommand dealloc]
+-[WebEditCommand .cxx_destruct]
+__ZN15WebChromeClient15closeWindowSoonEv
+-[WebView(WebPrivate) _closeWindow]
-[WebBaseNetscapePluginView windowWillClose:]
--[WebFrameView keyDown:]
--[WebFrameView(WebFrameViewFileInternal) _web_frame]
--[WebNetscapePluginDocumentView scrollWheel:]
-__ZN35WebNetscapePluginEventHandlerCarbon11scrollWheelEP7NSEvent
-__ZN3WTF6VectorINS_6RefPtrI23WebNetscapePluginStreamEELm0EE14expandCapacityEm
-__ZN3WTF6VectorINS_6RefPtrI23WebNetscapePluginStreamEELm0EE15reserveCapacityEm
-__ZN23WebNetscapePluginStream4stopEv
-__ZN23WebNetscapePluginStream35cancelLoadAndDestroyStreamWithErrorEP7NSError
-__ZN23WebNetscapePluginStream19cancelLoadWithErrorEP7NSError
-__ZN3WTF6VectorINS_6RefPtrI23WebNetscapePluginStreamEELm0EE6shrinkEm
--[WebHTMLView(WebPrivate) pasteboard:provideDataForType:]
--[WebHTMLView(WebInternal) promisedDragTIFFDataSource]
--[WebArchive initWithData:]
--[WebArchivePrivate init]
--[WebArchivePrivate setCoreArchive:]
--[NSPasteboard(WebExtras) _web_writePromisedRTFDFromArchive:containsImage:]
--[WebResource(WebResourcePrivate) _fileWrapperRepresentation]
--[WebResource(WebResourcePrivate) _suggestedFilename]
--[NSPasteboard(WebExtras) _web_writeFileWrapperAsRTFDAttachment:]
-__ZN15WebChromeClient16statusbarVisibleEv
-__Z30CallUIDelegateReturningBooleanaP7WebViewP13objc_selector
--[WebIconDatabase releaseIconForURL:]
+__Z32CallFormDelegateReturningBooleanaP7WebViewP13objc_selectorP11objc_objectS2_S4_
+__ZN20WebFrameLoaderClient27dispatchWillSendSubmitEventEPN7WebCore15HTMLFormElementE
+-[WebHTMLRepresentation matchLabels:againstElement:]
+-[WebHTMLRepresentation searchForLabels:beforeElement:resultDistance:resultIsInCellAbove:]
+-[WebHTMLRepresentation elementWithName:inForm:]
+__ZN15WebChromeClient18makeFirstResponderEP11NSResponder
+-[WebView(WebPrivate) _pushPerformingProgrammaticFocus]
+-[WebView(WebPrivate) _popPerformingProgrammaticFocus]
+__ZN20WebFrameLoaderClient38dispatchDecidePolicyForNewWindowActionEMN7WebCore13PolicyCheckerEFvNS0_12PolicyActionEERKNS0_16Navi
+__ZN20WebFrameLoaderClient18dispatchCreatePageEv
+__ZN20WebFrameLoaderClient12dispatchShowEv
+__ZN15WebEditorClient24smartInsertDeleteEnabledEv
+__ZN15WebEditorClient17shouldDeleteRangeEPN7WebCore5RangeE
+-[WebDefaultEditingDelegate webView:shouldDeleteDOMRange:]
+__ZN15WebEditorClient28textWillBeDeletedInTextFieldEPN7WebCore7ElementE
+__ZNK15WebChromeClient11tabsToLinksEv
+-[WebPreferences tabsToLinks]
+__ZN15WebChromeClient12canTakeFocusEN7WebCore14FocusDirectionE
+__ZN15WebChromeClient9takeFocusEN7WebCore14FocusDirectionE
+-[WebView(WebViewInternal) _becomingFirstResponderFromOutside]
+-[WebBackForwardList forwardItem]
+-[WebBackForwardList backItem]
+-[WebView(WebViewEventHandling) mouseUp:]
+-[NSView(WebExtras) _webView]
+__ZN15WebChromeClient7unfocusEv
+-[WebDefaultUIDelegate webViewUnfocus:]
+__ZN15WebChromeClient14keyboardUIModeEv
+-[WebView(WebViewInternal) _keyboardUIMode]
+-[WebView(WebViewInternal) _retrieveKeyboardUIModeFromPreferences:]
+-[WebBaseNetscapePluginView acceptsFirstResponder]
+-[WebBaseNetscapePluginView becomeFirstResponder]
+-[WebHostedNetscapePluginView focusChanged]
+__ZN6WebKit27NetscapePluginInstanceProxy12focusChangedEb
+__WKPHPluginInstanceFocusChanged
+-[WebHostedNetscapePluginView mouseDown:]
+-[WebHostedNetscapePluginView mouseUp:]
+-[WebHostedNetscapePluginView mouseDragged:]
+-[WebBaseNetscapePluginView resignFirstResponder]
+-[WebView(WebPrivate) _clearMainFrameName]
+-[WebViewFactory contextMenuItemTagOpenLink]
+-[WebViewFactory contextMenuItemTagOpenLinkInNewWindow]
+-[WebViewFactory contextMenuItemTagDownloadLinkToDisk]
+-[WebViewFactory contextMenuItemTagCopyLinkToClipboard]
+-[WebViewFactory contextMenuItemTagOpenImageInNewWindow]
+-[WebViewFactory contextMenuItemTagDownloadImageToDisk]
+-[WebViewFactory contextMenuItemTagCopyImageToClipboard]
+-[WebViewFactory contextMenuItemTagSearchInSpotlight]
+-[WebViewFactory contextMenuItemTagLookUpInDictionary]
+-[WebViewFactory contextMenuItemTagSearchWeb]
+-[WebViewFactory contextMenuItemTagCopy]
+-[WebViewFactory contextMenuItemTagGoBack]
+-[WebViewFactory contextMenuItemTagGoForward]
+-[WebViewFactory contextMenuItemTagStop]
+-[WebViewFactory contextMenuItemTagReload]
+-[WebViewFactory contextMenuItemTagOpenFrameInNewWindow]
+-[WebViewFactory contextMenuItemTagNoGuessesFound]
+-[WebViewFactory contextMenuItemTagIgnoreSpelling]
+-[WebViewFactory contextMenuItemTagLearnSpelling]
+-[WebViewFactory contextMenuItemTagIgnoreGrammar]
+-[WebViewFactory contextMenuItemTagCut]
+-[WebViewFactory contextMenuItemTagPaste]
+__ZN20WebContextMenuClient29getCustomMenuFromDefaultItemsEPN7WebCore11ContextMenuE
+__ZL19isPreVersion3Clientv
+__ZL26fixMenusToSendToOldClientsP14NSMutableArray
+__ZL28isPreInspectElementTagClientv
+-[WebElementDictionary _absoluteImageURL]
+-[WebFramePolicyListener download]
+__ZN20WebFrameLoaderClient8downloadEPN7WebCore14ResourceHandleERKNS0_15ResourceRequestES5_RKNS0_16ResourceResponseE
+-[WebDownload _initWithLoadingConnection:request:response:delegate:proxy:]
+-[WebDownload _setRealDelegate:]
+-[WebDownloadInternal setRealDelegate:]
+-[WebDownload init]
+-[WebDownloadInternal respondsToSelector:]
+-[WebDownloadInternal downloadDidBegin:]
+-[WebDownloadInternal download:didReceiveResponse:]
+__ZNK20WebFrameLoaderClient25setOriginalURLForDownloadEP11WebDownloadRKN7WebCore15ResourceRequestE
+-[WebDownloadInternal download:didReceiveDataOfLength:]
+-[WebDownloadInternal download:decideDestinationWithSuggestedFilename:]
+-[NSFileManager(WebNSFileManagerExtras) _webkit_setMetadataURL:referrer:atPath:]
+-[NSURL(WebNSURLExtras) _web_URLByRemovingUserInfo]
+-[NSURL(WebNSURLExtras) _web_URLByRemovingComponentAndSubsequentCharacter:]
+_setMetaData
+_WKSetMetadataURL
+-[WebDownloadInternal download:didCreateDestination:]
+-[WebDownloadInternal downloadDidFinish:]
+-[WebDownload dealloc]
+-[WebDownloadInternal dealloc]
+-[WebPDFRepresentation finishedLoadingWithDataSource:]
++[WebPDFRepresentation PDFDocumentClass]
+-[WebPDFView setPDFDocument:]
+-[WebPDFView(FileInternal) _scaleOrDisplayModeOrPageChanged:]
+-[WebPDFView(FileInternal) _applyPDFDefaults]
+-[WebPreferences(WebPrivate) PDFScaleFactor]
+-[WebPreferences _floatValueForKey:]
+-[WebPreferences(WebPrivate) PDFDisplayMode]
+__Z23allScriptsInPDFDocumentP11PDFDocument
+-[WebPDFView PDFDocument]
+__ZN15WebChromeClient21exceededDatabaseQuotaEPN7WebCore5FrameERKNS0_6StringE
+-[WebSecurityOrigin quota]
+-[WebDatabaseManager detailsForDatabase:withOrigin:]
+-[WebSecurityOrigin(WebInternal) _core]
+-[WebSecurityOrigin setQuota:]
+__ZN24WebDatabaseTrackerClient23dispatchDidModifyOriginEPN7WebCore14SecurityOriginE
+__ZN24WebDatabaseTrackerClient25dispatchDidModifyDatabaseEPN7WebCore14SecurityOriginERKNS0_6StringE
++[WebIconDatabase(WebPrivate) _checkIntegrityBeforeOpening]
+-[WebPreferences(WebPrivate) setAllowUniversalAccessFromFileURLs:]
+-[WebPreferences(WebPrivate) setAllowFileAccessFromFileURLs:]
+-[WebPreferences setStandardFontFamily:]
+-[WebPreferences _setStringValue:forKey:]
+-[WebPreferences setFixedFontFamily:]
-[WebPreferences setSerifFontFamily:]
-[WebPreferences setSansSerifFontFamily:]
-[WebPreferences setCursiveFontFamily:]
-[WebPreferences setFantasyFontFamily:]
+-[WebPreferences setDefaultFontSize:]
+-[WebPreferences setDefaultFixedFontSize:]
+-[WebPreferences(WebPrivate) setEditableLinkBehavior:]
-[WebPreferences setTabsToLinks:]
+-[WebPreferences setShouldPrintBackgrounds:]
+-[WebPreferences(WebPrivate) setXSSAuditorEnabled:]
+-[WebPreferences(WebPrivate) setExperimentalNotificationsEnabled:]
+-[WebPreferences(WebPrivate) setPluginAllowedRunTime:]
+-[WebPreferences(WebPrivate) setAuthorAndUserStylesEnabled:]
+-[WebPreferences(WebPrivate) setJavaScriptCanAccessClipboard:]
+-[WebPreferences(WebPrivate) setOfflineWebApplicationCacheEnabled:]
+-[WebPreferences(WebPrivate) setDeveloperExtrasEnabled:]
+-[WebPreferences setLoadsImagesAutomatically:]
+-[WebPreferences(WebPrivate) setFrameFlatteningEnabled:]
+-[WebPreferences setUserStyleSheetEnabled:]
-[WebPreferences setUsesPageCache:]
+-[WebPreferences(WebPrivate) setAcceleratedCompositingEnabled:]
+-[WebPreferences(WebPrivate) setWebGLEnabled:]
+-[WebPreferences(WebPrivate) setMemoryInfoEnabled:]
+[WebPluginDatabase setAdditionalWebPlugInPaths:]
--[WebHistory removeAllItems]
--[WebHistoryPrivate removeAllItems]
-+[WebCache empty]
--[WebBackForwardList pageCacheSize]
--[WebBackForwardList setPageCacheSize:]
--[WebView(WebPrivate) setUsesPageCache:]
--[WebIconDatabase(WebPendingPublic) removeAllIcons]
-__ZN21WebIconDatabaseClient25dispatchDidRemoveAllIconsEv
--[WebIconDatabase(WebInternal) _sendDidRemoveAllIconsNotification]
--[WebView(WebPendingPublic) setMediaVolume:]
--[WebView(WebDebugBinding) addObserver:forKeyPath:options:context:]
--[WebView(WebPrivate) setObservationInfo:]
-+[WebView(WebPrivate) automaticallyNotifiesObserversForKey:]
+-[WebDefaultUIDelegate webView:didDrawRect:]
+-[WebView(WebPrivate) _setPostsAcceleratedCompositingNotifications:]
-[WebView(WebPrivate) drawRect:]
--[WebView(WebIBActions) makeTextStandardSize:]
--[WebView _resetZoom:isTextOnly:]
--[WebView(WebPendingPublic) resetPageZoom:]
+-[WebView(WebViewEditing) setEditable:]
+-[WebView(WebViewEditing) editingDelegate]
+-[WebView(WebPendingPublic) setTabKeyCyclesThroughElements:]
-[WebView(WebPrivate) _setDashboardBehavior:to:]
--[WebView(WebPrivate) _clearMainFrameName]
--[WebPreferences(WebPrivate) setAuthorAndUserStylesEnabled:]
--[WebPreferences(WebPrivate) setOfflineWebApplicationCacheEnabled:]
--[WebPreferences(WebPrivate) setDeveloperExtrasEnabled:]
+-[WebDefaultEditingDelegate undoManagerForWebView:]
+-[WebView groupName]
++[WebView(WebPrivate) _removeAllUserContentFromGroup:]
-[WebView(WebViewEditing) setSmartInsertDeleteEnabled:]
-[WebView(WebPrivate) setSelectTrailingWhitespaceEnabled:]
-[WebView(WebPrivate) inspector]
-[WebInspector initWithWebView:]
-[WebInspector setJavaScriptProfilingEnabled:]
+[WebView(WebPrivate) _setUsesTestModeFocusRingColor:]
--[WebDefaultPolicyDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:]
++[WebView(WebPrivate) _resetOriginAccessWhitelists]
++[WebHistory optionalSharedHistory]
-[WebDefaultPolicyDelegate webView:decidePolicyForMIMEType:request:frame:decisionListener:]
--[WebFrame windowObject]
--[WebFrame globalContext]
+-[WebFrame(WebPrivate) _pendingFrameUnloadEventCount]
+-[WebDefaultUIDelegate webViewFirstResponder:]
-[WebHTMLView accessibilityFocusedUIElement]
-[WebFrame(WebInternal) _accessibilityTree]
--[WebFrame(WebPrivate) _pendingFrameUnloadEventCount]
--[NSView(WebExtras) _web_parentWebFrameView]
--[WebHistoryItem hash]
--[WebClipView _focusRingVisibleRect]
-+[WebView(WebPrivate) _pointingHandCursor]
--[NSEvent(WebExtras) _web_isDeleteKeyEvent]
--[WebFrameView allowsScrolling]
--[WebFrameView _scrollLineHorizontally:]
--[WebFrameView _scrollOverflowInDirection:granularity:]
--[WebFrameView(WebPrivate) _hasScrollBars]
--[WebFrameView(WebPrivate) _largestChildWithScrollBars]
--[WebHostedNetscapePluginView mouseDown:]
--[WebHostedNetscapePluginView mouseDragged:]
--[WebHostedNetscapePluginView mouseUp:]
--[WebHostedNetscapePluginView scrollWheel:]
+-[WebView(WebViewEditing) setSelectedDOMRange:affinity:]
+-[WebFrame loadHTMLString:baseURL:]
-[WebViewFactory unregisterUniqueIdForUIElement:]
_WKUnregisterUniqueIdForElement
-[WebViewFactory accessibilityHandleFocusChanged]
_WKAccessibilityHandleFocusChanged
+-[WebHTMLView accessibilityAttributeValue:]
+-[WebViewFactory AXHeadingText]
-[WebViewFactory textMarkerWithBytes:length:]
_WKCreateAXTextMarker
+-[WebDefaultUIDelegate webView:didScrollDocumentInFrameView:]
-[WebViewFactory objectIsTextMarker:]
_WKGetAXTextMarkerTypeID
-[WebViewFactory objectIsTextMarkerRange:]
_WKGetAXTextMarkerRangeTypeID
--[WebHTMLView accessibilityAttributeValue:]
+__ZN15WebEditorClient18shouldBeginEditingEPN7WebCore5RangeE
+__ZN15WebEditorClient15didBeginEditingEv
+-[WebDynamicScrollBarsView(WebInternal) accessibilityIsIgnored]
-[WebHTMLView _accessibilityParentForSubview:]
-[WebViewFactory AXWebAreaText]
-[WebViewFactory AXLinkText]
--[WebViewFactory AXHeadingText]
-[WebViewFactory AXDefinitionListTermText]
-[WebViewFactory AXDefinitionListDefinitionText]
--[WebViewFactory fileButtonChooseFileLabel]
--[WebViewFactory fileButtonNoFileSelectedLabel]
+_WKDrawMediaUIPart
+__ZL16controlsForThemei
+__ZN13MediaControls8drawPartEiP9CGContext6CGRectj
+__ZNK21MediaSharedUIControls14controlForPartEi
+__ZN30MediaSharedUIBackgroundElement5paintEP9CGContext6CGRect
+__ZNK14MediaUIElement23setUpContextForPaintingEP9CGContext6CGRect
+__ZL25createGenericGrayGradientPKdS0_m
+__ZL35draw3PartBannerInRectRelativeToEdgeP9CGContext6CGRect10CGRectEdgedPKvP7CGColorS4_
+__ZNK14MediaUIElement27restoreContextAfterPaintingEP9CGContext
+__ZN25MediaSharedUIImageElement5paintEP9CGContext6CGRect
+__ZNK25MediaSharedUIImageElement20constrainAspectRatioEv
+__ZN25MediaSharedUIImageElement21createBackgroundImageEP9CGContext6CGRect
+__ZNK25MediaSharedUIImageElement5imageEv
+__ZL28createMediaPDFRetreat30Imagev
+__ZL32createCGLayerFromPDFDataProviderP14CGDataProvider
+__ZNK25MediaSharedUIImageElement14drawBackgroundEP9CGContext6CGRect
+__ZL15drawOuterShadowP9CGContext6CGRectPKv
+__ZL10drawShadowP9CGContext6CGRectPKv6CGSizedP7CGColor
+__ZL16drawImageOrLayerP9CGContext6CGRectPKv
+__ZL15drawInnerShadowP9CGContext6CGRectPKv6CGSizedP7CGColor
+__ZL29createMediaPDFPlayButtonImagev
+-[WebViewFactory mediaElementLoadingStateText]
+_WKQTMovieHasClosedCaptions
+__ZN15WebChromeClient25supportsFullscreenForNodeEPKN7WebCore4NodeE
+-[WebView(WebPrivate) _isUsingAcceleratedCompositing]
+_WKMeasureMediaUIPart
+__ZNK13MediaControls11naturalSizeEi
+__ZNK39MediaSharedUITimelineSliderThumbElement11naturalSizeEv
+_WKDrawMediaSliderTrack
+__ZN13MediaControls15drawSliderTrackEP9CGContext6CGRectddj
+__ZNK21MediaSharedUIControls6sliderEv
+__ZN27MediaSharedUITimelineSlider5paintEP9CGContext6CGRect
+__ZL23addRoundedRectToContextP9CGContext6CGRectd
+__ZNK27MediaSharedUITimelineSlider22highlightUnloadedRangeEP9CGContext6CGRect
+__ZN39MediaSharedUITimelineSliderThumbElement5paintEP9CGContext6CGRect
+__ZL34createMediaPDFEnterFullscreenImagev
+__ZL34createMediaPDFAudioVolumeHighImagev
+-[WebViewFactory localizedMediaControlElementString:]
-[WebViewFactory textMarkerRangeWithStart:end:]
_WKCreateAXTextMarkerRange
-[WebFrame(WebPrivate) _numberOfActiveAnimations]
-[WebFrame(WebPrivate) _pauseAnimation:onNode:atTime:]
--[WebFrame(WebKitDebug) renderTreeAsExternalRepresentation]
+-[WebFrame(WebKitDebug) renderTreeAsExternalRepresentationForPrinting:]
+[WebCoreStatistics garbageCollectJavaScriptObjects]
--[WebNullPluginView initWithFrame:error:DOMElement:]
--[WebNullPluginView viewDidMoveToWindow]
--[WebNullPluginView reportFailure]
--[WebNullPluginView dealloc]
+-[WebFrame(WebPrivate) _layerTreeAsText]
+-[WebFrame(WebPrivate) _pauseTransitionOfProperty:onNode:atTime:]
+-[WebPreferences(WebPrivate) _setPreferenceForTestWithValue:forKey:]
-[WebInspector webViewClosed]
--[WebView(WebDebugBinding) removeObserver:forKeyPath:]
+[WebCoreStatistics emptyCache]
-+[NSObject(WebScripting) isKeyExcludedFromWebScript:]
--[WebIconDatabase iconURLForURL:]
-__ZN15WebChromeClient7repaintERKN7WebCore7IntRectEbbb
--[WebHistoryItem(WebPrivate) RSSFeedReferrer]
--[WebViewFactory refreshPlugins]
+-[NSError(WebKitExtras) _initWithPluginErrorCode:contentURL:pluginPageURL:pluginName:MIMEType:]
+-[WebViewFactory missingPluginText]
-[WebViewFactory searchableIndexIntroduction]
-__ZN15WebChromeClient15closeWindowSoonEv
--[WebView(WebPrivate) _closeWindow]
--[WebHTMLView validRequestorForSendType:returnType:]
--[WebHTMLView(WebDocumentPrivateProtocols) pasteboardTypesForSelection]
--[WebHTMLView(WebInternal) _canSmartCopyOrDelete]
--[WebHTMLView(WebInternal) isGrammarCheckingEnabled]
--[WebView(WebPendingPublic) canResetPageZoom]
--[WebView _canResetZoom:]
--[WebView(WebIBActions) canMakeTextStandardSize]
--[WebView(WebPendingPublic) canZoomPageIn]
--[WebView(WebPendingPublic) canZoomPageOut]
--[WebHTMLRepresentation canProvideDocumentSource]
--[WebFrame(WebInternal) _canProvideDocumentSource]
--[WebView supportsTextEncoding]
--[WebHTMLView(WebDocumentPrivateProtocols) supportsTextEncoding]
__ZN15WebEditorClient26shouldMoveRangeAfterDeleteEPN7WebCore5RangeES2_
-[WebDefaultEditingDelegate webView:shouldMoveRangeAfterDelete:replacingRange:]
+__ZN15WebEditorClient13didEndEditingEv
__ZN15WebEditorClient25shouldShowDeleteInterfaceEPN7WebCore11HTMLElementE
__ZN15WebEditorClient16shouldEndEditingEPN7WebCore5RangeE
-[WebView(WebPrivate) _executeCoreCommandByName:value:]
@@ -1977,40 +1997,50 @@ __ZN15WebEditorClient4undoEv
-[WebEditCommand command]
__ZN15WebEditorClient22registerCommandForRedoEN3WTF10PassRefPtrIN7WebCore11EditCommandEEE
__ZN15WebEditorClient23textDidChangeInTextAreaEPN7WebCore7ElementE
-__ZN15WebChromeClient7unfocusEv
--[WebDefaultUIDelegate webViewUnfocus:]
+-[WebView textSizeMultiplier]
__ZN15WebEditorClient33didSetSelectionTypesForPasteboardEv
-[WebDefaultEditingDelegate webView:didSetSelectionTypesForPasteboard:]
__ZN15WebEditorClient29didWriteSelectionToPasteboardEv
-[WebDefaultEditingDelegate webView:didWriteSelectionToPasteboard:]
-[WebHTMLView(WebInternal) paste:]
--[WebHTMLView callDelegateDoCommandBySelectorIfNeeded:]
-[WebHTMLView(WebHTMLViewFileInternal) _pasteWithPasteboard:allowPlainText:]
-[WebView(WebViewInternal) _setInsertionPasteboard:]
+-[WebHTMLView(WebHTMLViewFileInternal) _selectedRange]
-[WebHTMLView(WebHTMLViewFileInternal) _documentFragmentFromPasteboard:inContext:allowPlainText:]
-[WebHTMLView(WebPrivate) _documentFragmentFromPasteboard:forType:inContext:subresources:]
-[WebHTMLView(WebHTMLViewFileInternal) _dataSource]
-[WebDataSource(WebInternal) _documentFragmentWithArchive:]
-[WebArchive(WebInternal) _coreLegacyWebArchive]
+-[WebResource URL]
-[WebFrame(WebInternal) _documentFragmentWithMarkupString:baseURLString:]
-[WebHTMLView(WebHTMLViewFileInternal) _shouldInsertFragment:replacingDOMRange:givenAction:]
-[WebHTMLView(WebPrivate) _canSmartReplaceWithPasteboard:]
-[WebFrame(WebPrivate) _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]
+-[WebResource dealloc]
+-[WebResourcePrivate dealloc]
-[WebView(WebIBActions) _responderValidateUserInterfaceItem:]
-[WebView(WebFileInternal) _responderForResponderOperations]
-[NSView(WebExtras) _web_firstResponderIsSelfOrDescendantView]
__ZN15WebChromeClient5printEPN7WebCore5FrameE
+-[WebDefaultUIDelegate webView:makeFirstResponder:]
+-[WebHTMLView(WebNSTextInputSupport) firstRectForCharacterRange:]
+-[WebFrame(WebInternal) _convertNSRangeToDOMRange:]
+-[WebFrame(WebInternal) _convertToDOMRange:]
+-[WebFrame(WebInternal) _firstRectForDOMRange:]
__ZNK15WebEditorClient7canRedoEv
__ZN15WebEditorClient4redoEv
-[WebEditorUndoTarget redoEditing:]
-[DOMDocument(WebDOMDocumentOperations) URLWithAttributeString:]
-[WebView(WebPrivate) _catchesDelegateExceptions]
+-[WebView performDragOperation:]
__ZNK19WebPasteboardHelper22fragmentFromPasteboardEPK12NSPasteboard
-[WebHTMLView(WebInternal) _documentFragmentFromPasteboard:]
__ZN15WebEditorClient16shouldInsertNodeEPN7WebCore4NodeEPNS0_5RangeENS0_18EditorInsertActionE
+__ZN13WebDragClient32willPerformDragDestinationActionEN7WebCore21DragDestinationActionEPNS0_8DragDataE
+-[WebDefaultUIDelegate webView:willPerformDragDestinationAction:forDraggingInfo:]
+-[WebHTMLView(WebPrivate) _hasHTMLDocument]
__ZN15WebEditorClient17userVisibleStringEP5NSURL
_WKGetExtensionsForMIMEType
--[WebHTMLView(WebPrivate) _hasHTMLDocument]
+[WebHTMLView(WebHTMLViewFileInternal) _excludedElementsForAttributedStringConversion]
+[NSURL(WebDataURL) _web_uniqueWebDataURL]
-[WebResource initWithData:URL:MIMEType:textEncodingName:frameName:]
@@ -2018,36 +2048,24 @@ _WKGetExtensionsForMIMEType
__ZN7WebCore20ResourceResponseBaseD2Ev
-[WebDataSource addSubresource:]
-[WebResource(WebResourceInternal) _coreResource]
+__ZNK19WebPasteboardHelper17urlFromPasteboardEPK12NSPasteboardPN7WebCore6StringE
+-[NSPasteboard(WebExtras) _web_bestURL]
+-[NSString(WebNSURLExtras) _webkit_looksLikeAbsoluteURL]
+-[NSString(WebNSURLExtras) _webkit_rangeOfURLScheme]
+__ZNK19WebPasteboardHelper23plainTextFromPasteboardEPK12NSPasteboard
__ZN13WebDragClient22createDragImageForLinkERN7WebCore4KURLERKNS0_6StringEPNS0_5FrameE
-[WebHTMLView(WebPrivate) _dragImageForURL:withLabel:]
-__ZNK19WebPasteboardHelper23plainTextFromPasteboardEPK12NSPasteboard
+-[NSString(WebKitExtras) _web_drawDoubledAtPoint:withTopColor:bottomColor:font:]
+__ZN15WebChromeClient18chooseIconForFilesERKN3WTF6VectorIN7WebCore6StringELm0EEEPNS2_11FileChooserE
__ZL25uniqueURLWithRelativePartP8NSString
-[WebDataSource(WebInternal) _documentFragmentWithImageResource:]
-[WebDataSource(WebInternal) _imageElementWithImageResource:]
+__ZN3WTF6VectorINS_6RefPtrIN7WebCore7ArchiveEEELm0EE6shrinkEm
-[WebHTMLView menuForEvent:]
--[WebViewFactory contextMenuItemTagOpenLink]
--[WebViewFactory contextMenuItemTagOpenLinkInNewWindow]
--[WebViewFactory contextMenuItemTagDownloadLinkToDisk]
--[WebViewFactory contextMenuItemTagCopyLinkToClipboard]
--[WebViewFactory contextMenuItemTagOpenImageInNewWindow]
--[WebViewFactory contextMenuItemTagDownloadImageToDisk]
--[WebViewFactory contextMenuItemTagCopyImageToClipboard]
--[WebViewFactory contextMenuItemTagSearchInSpotlight]
--[WebViewFactory contextMenuItemTagLookUpInDictionary]
--[WebViewFactory contextMenuItemTagSearchWeb]
--[WebViewFactory contextMenuItemTagCopy]
--[WebViewFactory contextMenuItemTagGoBack]
--[WebViewFactory contextMenuItemTagGoForward]
--[WebViewFactory contextMenuItemTagStop]
--[WebViewFactory contextMenuItemTagReload]
--[WebViewFactory contextMenuItemTagOpenFrameInNewWindow]
--[WebViewFactory contextMenuItemTagNoGuessesFound]
--[WebViewFactory contextMenuItemTagIgnoreSpelling]
--[WebViewFactory contextMenuItemTagLearnSpelling]
--[WebViewFactory contextMenuItemTagIgnoreGrammar]
--[WebViewFactory contextMenuItemTagCut]
--[WebViewFactory contextMenuItemTagPaste]
-__ZN20WebContextMenuClient29getCustomMenuFromDefaultItemsEPN7WebCore11ContextMenuE
+-[WebViewFactory contextMenuItemTagSpeechMenu]
+-[WebViewFactory contextMenuItemTagStartSpeaking]
+-[WebViewFactory contextMenuItemTagStopSpeaking]
+__ZN20WebContextMenuClient10isSpeakingEv
-[WebViewFactory contextMenuItemTagSpellingMenu]
-[WebViewFactory contextMenuItemTagShowSpellingPanel:]
-[WebViewFactory contextMenuItemTagCheckSpelling]
@@ -2075,9 +2093,6 @@ __ZN15WebEditorClient27substitutionsPanelIsShowingEv
-[WebViewFactory contextMenuItemTagOutline]
-[WebViewFactory contextMenuItemTagStyles]
-[WebViewFactory contextMenuItemTagShowColors]
--[WebViewFactory contextMenuItemTagSpeechMenu]
--[WebViewFactory contextMenuItemTagStartSpeaking]
--[WebViewFactory contextMenuItemTagStopSpeaking]
-[WebViewFactory contextMenuItemTagWritingDirectionMenu]
-[WebViewFactory contextMenuItemTagDefaultDirection]
-[WebViewFactory contextMenuItemTagLeftToRight]
@@ -2085,121 +2100,238 @@ __ZN15WebEditorClient27substitutionsPanelIsShowingEv
-[WebHTMLView(WebNSTextInputSupport) selectedRange]
-[WebFrame(WebPrivate) _selectedNSRange]
-[WebFrame(WebInternal) _convertToNSRange:]
--[WebHTMLView(WebNSTextInputSupport) firstRectForCharacterRange:]
--[WebFrame(WebInternal) _convertNSRangeToDOMRange:]
--[WebFrame(WebInternal) _convertToDOMRange:]
--[WebFrame(WebInternal) _firstRectForDOMRange:]
__ZN15WebChromeClient19customHighlightRectEPN7WebCore4NodeERKNS0_12AtomicStringERKNS0_9FloatRectE
-[WebHTMLView(WebInternal) _highlighterForType:]
__ZN15WebChromeClient20paintCustomHighlightEPN7WebCore4NodeERKNS0_12AtomicStringERKNS0_9FloatRectES8_bb
--[WebView(WebIBActions) makeTextLarger:]
--[WebView _zoomIn:isTextOnly:]
+-[WebViewFactory resetButtonDefaultLabel]
-[WebDefaultPolicyDelegate webView:shouldGoToHistoryItem:]
--[WebView(WebPendingPublic) zoomPageIn:]
--[WebView(WebPendingPublic) zoomPageOut:]
--[WebView _zoomOut:isTextOnly:]
--[WebPDFRepresentation setDataSource:]
--[WebPDFView initWithFrame:]
-+[WebPDFView(FileInternal) _PDFPreviewViewClass]
-+[WebPDFView PDFKitBundle]
--[PDFPrefUpdatingProxy initWithView:]
--[WebPDFView setNextKeyView:]
--[WebPDFView viewWillMoveToWindow:]
--[WebPDFView viewDidMoveToWindow]
--[WebPDFView(FileInternal) _trackFirstResponder]
--[WebPDFView(FileInternal) _clipViewForPDFDocumentView]
--[WebPDFView becomeFirstResponder]
--[WebPDFView setDataSource:]
--[WebPDFView setNeedsLayout:]
--[WebPDFView layout]
--[WebPDFView acceptsFirstResponder]
--[WebPDFRepresentation receivedData:withDataSource:]
--[WebPDFView dataSourceUpdated:]
--[WebPDFRepresentation title]
--[WebPDFRepresentation finishedLoadingWithDataSource:]
--[WebDataSource data]
-+[WebPDFRepresentation PDFDocumentClass]
--[WebPDFView setPDFDocument:]
--[WebPDFView(FileInternal) _scaleOrDisplayModeOrPageChanged:]
--[WebPDFView(FileInternal) _applyPDFDefaults]
--[WebPreferences(WebPrivate) PDFScaleFactor]
--[WebPreferences _floatValueForKey:]
--[WebPreferences(WebPrivate) PDFDisplayMode]
--[WebPDFView selectionView]
--[WebPDFView string]
--[WebPDFView dealloc]
+-[WebFrame(WebKitDebug) counterValueForElement:]
+__ZN15WebChromeClient11canRunModalEv
+[WebCoreStatistics javaScriptObjectsCount]
+-[WebFrame name]
-[WebBackForwardList capacity]
-[WebBackForwardList addItem:]
+__Z4coreP14WebHistoryItem
-[WebBackForwardList goToItem:]
-[WebDefaultUIDelegate webView:setToolbarsVisible:]
-[WebDefaultUIDelegate webView:setStatusBarVisible:]
-[WebDefaultUIDelegate webView:setResizable:]
-[WebDefaultUIDelegate webViewShow:]
-__XPCGetProperty
-_WKPCGetProperty
-__ZN6WebKit27NetscapePluginInstanceProxy11getPropertyEjRKN3JSC10IdentifierERPcRj
--[WebHostedNetscapePluginView setLayer:]
-[WebDefaultPolicyDelegate webView:decidePolicyForNewWindowAction:request:newFrameName:decisionListener:]
-[WebDefaultUIDelegate webView:createWebViewWithRequest:windowFeatures:]
+__ZN15WebChromeClient14menubarVisibleEv
+__ZN7WebCore12ChromeClient22registerContentHandlerERKNS_6StringES3_S3_S3_
+__ZN7WebCore12ChromeClient23registerProtocolHandlerERKNS_6StringES3_S3_S3_
-[WebKeyGenerator strengthMenuItemTitles]
--[WebViewFactory resetButtonDefaultLabel]
-__ZL19isPreVersion3Clientv
-__ZL26fixMenusToSendToOldClientsP14NSMutableArray
-__ZL28isPreInspectElementTagClientv
__ZN15WebChromeClient20runJavaScriptConfirmEPN7WebCore5FrameERKNS0_6StringE
__Z30CallUIDelegateReturningBooleanaP7WebViewP13objc_selectorP11objc_objectS4_
__ZN15WebChromeClient19runJavaScriptPromptEPN7WebCore5FrameERKNS0_6StringES5_RS3_
-__Z14CallUIDelegateP7WebViewP13objc_selectorP11objc_objectS4_S4_
__ZN15WebChromeClient17scrollbarsVisibleEv
+-[WebFrameView allowsScrolling]
__ZN15WebChromeClient15toolbarsVisibleEv
-__ZN15WebChromeClient14menubarVisibleEv
-[NSString(WebNSURLExtras) _web_encodeHostName]
__ZL22readIDNScriptWhiteListv
__ZL26readIDNScriptWhiteListFileP8NSString
-__ZNK15WebChromeClient11tabsToLinksEv
--[WebPreferences tabsToLinks]
--[WebViewFactory submitButtonDefaultLabel]
-__ZN15WebChromeClient12canTakeFocusEN7WebCore14FocusDirectionE
-__ZN15WebChromeClient9takeFocusEN7WebCore14FocusDirectionE
--[WebView(WebViewInternal) _becomingFirstResponderFromOutside]
--[WebHostedNetscapePluginView focusChanged]
-__ZN6WebKit27NetscapePluginInstanceProxy12focusChangedEb
-__WKPHPluginInstanceFocusChanged
-__ZN15WebChromeClient14keyboardUIModeEv
--[WebView(WebViewInternal) _keyboardUIMode]
--[WebView(WebViewInternal) _retrieveKeyboardUIModeFromPreferences:]
+-[WebFrameView _scrollLineHorizontally:]
+-[WebFrameView _scrollOverflowInDirection:granularity:]
+-[WebHTMLView(WebNSTextInputSupport) setMarkedText:selectedRange:]
+-[WebResponderChainSink initWithResponderChain:]
+-[WebHTMLView complete:]
+-[WebTextCompletionController initWithWebView:HTMLView:]
+-[WebTextCompletionController doCompletion]
+-[WebFrame(WebInternal) _rangeByAlteringCurrentSelection:direction:granularity:]
+-[WebResponderChainSink receivedUnhandledCommand]
+-[WebResponderChainSink detach]
+-[WebTextCompletionController popupWindowIsOpen]
+-[WebTextCompletionController filterKeyDown:]
+-[WebTextCompletionController endRevertingChange:moveLeft:]
+-[WebTextCompletionController dealloc]
+-[WebFrameView scrollPageUp:]
+-[WebFrameView _pageVertically:]
+-[WebView(WebViewEditingActions) scrollPageUp:]
+-[WebView(WebViewEditingActions) _performResponderOperation:with:]
+-[WebResponderChainSink tryToPerform:with:]
+-[WebFrameView scrollPageDown:]
+-[WebView(WebViewEditingActions) scrollPageDown:]
+-[WebFrameView scrollToBeginningOfDocument:]
+-[WebFrameView _scrollToBeginningOfDocument]
+-[WebView(WebViewEditingActions) scrollToBeginningOfDocument:]
+-[WebFrameView scrollToEndOfDocument:]
+-[WebFrameView _scrollToEndOfDocument]
+-[WebView(WebViewEditingActions) scrollToEndOfDocument:]
+-[WebFrameView(WebPrivate) _contentView]
+-[WebViewFactory multipleFileUploadTextForNumberOfFiles:]
+-[WebFrameView(WebInternal) _verticalPageScrollDistance]
+-[WebFrameView _scrollVerticallyBy:]
+-[WebViewFactory validationMessagePatternMismatchText]
+-[WebViewFactory validationMessageValueMissingText]
+-[WebViewFactory validationMessageTypeMismatchText]
+__ZN20WebFrameLoaderClient34didTransferChildFrameToNewDocumentEv
+-[WebDefaultUIDelegate webViewClose:]
+-[WebHistory init]
++[WebHistoryPrivate initialize]
+-[WebHistoryPrivate init]
++[WebHistory setOptionalSharedHistory:]
+-[WebHistory(WebInternal) _addVisitedLinksToPageGroup:]
+-[WebHistoryPrivate addVisitedLinksToPageGroup:]
+-[WebView(WebViewPrivateStyleInfo) _computedStyleIncludingVisitedInfo:forElement:]
-[WebHistory dealloc]
-[WebHistoryPrivate dealloc]
--[WebDefaultUIDelegate webViewClose:]
-__ZN15WebChromeClient21exceededDatabaseQuotaEPN7WebCore5FrameERKNS0_6StringE
--[WebSecurityOrigin(WebInternal) _initWithWebCoreSecurityOrigin:]
--[WebSecurityOrigin setQuota:]
-__ZN24WebDatabaseTrackerClient23dispatchDidModifyOriginEPN7WebCore14SecurityOriginE
--[WebSecurityOrigin dealloc]
-__ZN24WebDatabaseTrackerClient25dispatchDidModifyDatabaseEPN7WebCore14SecurityOriginERKNS0_6StringE
--[NSURL(WebNSURLExtras) _web_URLWithLowercasedScheme]
--[WebFrame loadAlternateHTMLString:baseURL:forUnreachableURL:]
-__ZN3WTF10RefCountedIN7WebCore10StringImplEE5derefEv
-__ZN20WebFrameLoaderClient18cannotShowURLErrorERKN7WebCore15ResourceRequestE
+__ZN3WTF9HashTableIxSt4pairIxNS_9RetainPtrI14NSMutableArrayEEENS_18PairFirstExtractorIS5_EENS_7IntHashIyEENS_14PairHashTraitsIN
+-[WebHistory(WebInternal) _visitedURL:withTitle:method:wasFailure:increaseVisitCount:]
+-[WebHistoryPrivate visitedURL:withTitle:increaseVisitCount:]
+-[WebHistoryItem initWithURLString:title:lastVisitedTimeInterval:]
+-[WebHistoryItem(WebInternal) _recordInitialVisit]
+-[WebHistoryPrivate addItemToDateCaches:]
+-[WebHistoryItem lastVisitedTimeInterval]
+-[WebHistoryPrivate findKey:forDay:]
+__ZL16getDayBoundariesdRdS_
+__ZNK3WTF9HashTableIxSt4pairIxNS_9RetainPtrI14NSMutableArrayEEENS_18PairFirstExtractorIS5_EENS_7IntHashIyEENS_14PairHashTraitsI
+__ZN3WTF7HashMapIxNS_9RetainPtrI14NSMutableArrayEENS_7IntHashIyEENS_10HashTraitsIxEENS6_IS3_EEE3setERKxRKS3_
+-[WebHistory _sendNotification:entries:]
+-[WebHistory(WebPrivate) allItems]
+-[WebHistoryPrivate allItems]
+-[WebView(WebPrivate) _loadBackForwardListFromOtherView:]
+__ZN20WebFrameLoaderClient30dispatchDidPushStateWithinPageEv
-[WebHistoryItem(WebPrivate) target]
-[WebHistoryItem(WebPrivate) isTargetItem]
-[WebHistoryItem(WebPrivate) children]
-__ZN20WebFrameLoaderClient31dispatchUnableToImplementPolicyERKN7WebCore13ResourceErrorE
--[WebView goToBackForwardItem:]
-__ZN3WTF6VectorIN3JSC8RegisterELm8EE6shrinkEm
--[NSString(WebKitExtras) _webkit_fixedCarbonPOSIXPath]
-_WKCreateCustomCFReadStream
-_WKSignalCFReadStreamHasBytes
-_WKSignalCFReadStreamEnd
-__ZN20WebFrameLoaderClient12blockedErrorERKN7WebCore15ResourceRequestE
--[WebHTMLView(WebNSTextInputSupport) setMarkedText:selectedRange:]
+-[WebPreferences setUserStyleSheetLocation:]
+-[WebPreferences userStyleSheetLocation]
+__ZN20WebFrameLoaderClient29dispatchDidPopStateWithinPageEv
+__ZN18WebInspectorClient15populateSettingERKN7WebCore6StringEPS1_
++[WebWorkersPrivate workerThreadCount]
+-[WebInspector show:]
+__ZN18WebInspectorClient21openInspectorFrontendEPN7WebCore19InspectorControllerE
+-[WebInspectorWindowController initWithInspectedWebView:]
+-[WebInspectorWindowController init]
+-[WebPreferences init]
+-[WebPreferences setAllowsAnimatedImages:]
+-[WebPreferences setMinimumLogicalFontSize:]
+-[WebView setDrawsBackground:]
+-[WebView(WebPrivate) setProhibitsMainFrameScrolling:]
+-[WebInspectorWindowController webView]
+__ZN26WebInspectorFrontendClientC1EP7WebViewP28WebInspectorWindowControllerPN7WebCore19InspectorControllerEPNS4_4PageE
+__ZN26WebInspectorFrontendClientC2EP7WebViewP28WebInspectorWindowControllerPN7WebCore19InspectorControllerEPNS4_4PageE
+-[WebInspectorWindowController setFrontendClient:]
+-[WebInspector evaluateInFrontend:callId:script:]
+__ZN26WebInspectorFrontendClient19localizedStringsURLEv
+__ZN26WebInspectorFrontendClient12hiddenPanelsEv
+__ZN18WebInspectorClient13hideHighlightEv
+-[WebNodeHighlighter hideHighlight]
+__ZN26WebInspectorFrontendClient14frontendLoadedEv
+-[WebInspectorWindowController showWindow:]
+-[WebInspectorWindowController attached]
+__ZN26WebInspectorFrontendClient23setAttachedWindowHeightEj
+-[WebInspectorWindowController setAttachedWindowHeight:]
+__ZN26WebInspectorFrontendClient12bringToFrontEv
+__ZNK26WebInspectorFrontendClient17updateWindowTitleEv
+-[WebInspectorWindowController window]
+_WKNSWindowMakeBottomCornersSquare
+__ZN26WebInspectorFrontendClient19inspectedURLChangedERKN7WebCore6StringE
+__ZN18WebInspectorClient12storeSettingERKN7WebCore6StringES3_
+-[WebInspector close:]
+__ZN26WebInspectorFrontendClient11closeWindowEv
+-[WebInspectorWindowController destroyInspectorView]
+-[WebInspectorWindowController close]
+__ZN26WebInspectorFrontendClientD0Ev
+-[WebInspectorWindowController dealloc]
+__ZN18WebInspectorClient9highlightEPN7WebCore4NodeE
+-[WebNodeHighlighter highlightNode:]
+-[WebNodeHighlight initWithTargetView:inspectorController:]
+-[WebNodeHighlight(FileInternal) _computeHighlightWindowFrame]
+-[WebNodeHighlightView initWithWebNodeHighlight:]
+-[WebNodeHighlightView isFlipped]
+-[WebNodeHighlight setDelegate:]
+-[WebNodeHighlight attach]
+-[WebNodeHighlightView drawRect:]
+-[WebNodeHighlight inspectorController]
+-[WebNodeHighlighter didAttachWebNodeHighlight:]
+-[WebView setCurrentNodeHighlight:]
+-[WebNodeHighlight(FileInternal) _repositionHighlightWindow]
+-[WebNodeHighlight targetView]
+-[WebNodeHighlight setNeedsUpdateInTargetViewRect:]
+-[WebNodeHighlight detach]
+-[WebNodeHighlighter willDetachWebNodeHighlight:]
+-[WebNodeHighlightView detachFromWebNodeHighlight]
+-[WebNodeHighlight dealloc]
+-[WebNodeHighlightView dealloc]
+-[WebInspector setTimelineProfilingEnabled:]
+__XPCHasMethod
+_WKPCHasMethod
+__ZN6WebKit27NetscapePluginInstanceProxy9hasMethodEjRKN3JSC10IdentifierE
+__WKPHBooleanReply
+__ZNK6WebKit10ProxyField17valueFromInstanceEPN3JSC9ExecStateEPKNS1_8Bindings8InstanceE
+__ZNK6WebKit13ProxyInstance10fieldValueEPN3JSC9ExecStateEPKNS1_8Bindings5FieldE
+__WKPHNPObjectGetProperty
+__ZNK6WebKit18ProxyRuntimeObject9classInfoEv
+__ZN6WebKit10ProxyFieldD0Ev
+__ZL30createMediaPDFPauseButtonImagev
+__ZNK27MediaSharedUICCImageElement20constrainAspectRatioEv
+__ZNK25MediaSharedUIImageElement11naturalSizeEv
+__ZL33createMediaPDFClosedCaptionsImagev
+__ZN27MediaSharedUICCImageElement21createBackgroundImageEP9CGContext6CGRect
+_WKQTMovieSetShowClosedCaptions
+__ZN20WebFrameLoaderClient25pluginWillHandleLoadErrorERKN7WebCore16ResourceResponseE
+__ZN15WebChromeClient22enterFullscreenForNodeEPN7WebCore4NodeE
+-[WebView(WebViewInternal) _enterFullscreenForNode:]
+-[WebVideoFullscreenController .cxx_construct]
+-[WebVideoFullscreenController init]
+-[WebVideoFullscreenWindow initWithContentRect:styleMask:backing:defer:]
+-[WebVideoFullscreenController windowDidLoad]
+-[WebVideoFullscreenController fullscreenWindow]
+__ZL16initQTMovieLayerv
+__ZL12QTKitLibraryv
+-[WebVideoFullscreenController setMediaElement:]
+__ZL36initQTMovieRateDidChangeNotificationv
+-[WebVideoFullscreenController enterFullscreen:]
+-[WebVideoFullscreenController mediaElementRect]
+-[WebVideoFullscreenController setupFadeAnimationIfNeededAndFadeIn:]
+-[WebWindowFadeAnimation initWithDuration:window:initialAlpha:finalAlpha:]
+-[WebWindowFadeAnimation init]
+-[WebVideoFullscreenWindow animateFromRect:toRect:withSubAnimation:controllerAction:]
+-[WebWindowScaleAnimation initWithHintedDuration:window:initalFrame:finalFrame:]
+-[WebWindowScaleAnimation init]
+-[WebWindowScaleAnimation setSubAnimation:]
+-[WebWindowScaleAnimation setCurrentProgress:]
+-[WebWindowScaleAnimation currentFrame]
+-[WebWindowScaleAnimation currentValue]
+_WKWindowSetScaledFrame
+_flipRect
+-[WebWindowFadeAnimation setCurrentProgress:]
+-[WebWindowFadeAnimation currentAlpha]
+_WKWindowSetAlpha
+-[WebVideoFullscreenWindow canBecomeKeyWindow]
+-[WebWindowScaleAnimation startAnimation]
+-[WebWindowScaleAnimation additionalDurationNeededToReachFinalFrame]
+_squaredDistance
+-[WebWindowScaleAnimation setDuration:]
+_WebWindowAnimationDurationFromDuration
+__ZN15WebChromeClient21exitFullscreenForNodeEPN7WebCore4NodeE
+-[WebVideoFullscreenController exitFullscreen]
+-[WebVideoFullscreenController clearFadeAnimation]
+-[WebWindowFadeAnimation stopAnimation]
+-[WebWindowFadeAnimation setWindow:]
+-[WebWindowScaleAnimation stopAnimation]
+-[WebWindowScaleAnimation dealloc]
+-[WebVideoFullscreenWindow animationDidEnd:]
+-[WebWindowScaleAnimation setWindow:]
+-[WebVideoFullscreenWindow animatedResizeDidEnd]
+-[WebVideoFullscreenController windowDidExitFullscreen]
+-[WebVideoFullscreenController dealloc]
+-[WebVideoFullscreenController .cxx_destruct]
+-[WebVideoFullscreenWindow dealloc]
+__ZL33createMediaPDFAudioVolumeOffImagev
+-[WebHTMLView accessibilityHitTest:]
+-[WebView(WebViewEditing) selectedDOMRange]
__ZN3WTF6VectorIN7WebCore20CompositionUnderlineELm0EE14expandCapacityEmPKS2_
__ZN3WTF6VectorIN7WebCore20CompositionUnderlineELm0EE14expandCapacityEm
__ZN3WTF6VectorIN7WebCore20CompositionUnderlineELm0EE15reserveCapacityEm
__ZN3WTF6VectorIN7WebCore20CompositionUnderlineELm0EE6shrinkEm
-[WebFrame(WebPrivate) _selectNSRange:]
-[WebHTMLView(WebNSTextInputSupport) attributedSubstringFromRange:]
++[NSAttributedString(WebKitExtras) _web_attributedStringFromRange:]
+__ZN3WTF6VectorIjLm1EE6shrinkEm
-[WebHTMLView(WebNSTextInputSupport) markedRange]
-[WebHTMLView(WebNSTextInputSupport) unmarkText]
-[WebHTMLView(WebNSTextInputSupport) characterIndexForPoint:]
@@ -2208,7 +2340,6 @@ __ZN3WTF6VectorIN7WebCore20CompositionUnderlineELm0EE6shrinkEm
-[WebHTMLView(WebNSTextInputSupport) conversationIdentifier]
-[WebView(WebPendingPublic) aeDescByEvaluatingJavaScriptFromString:]
__ZL17aeDescFromJSValuePN3JSC9ExecStateENS_7JSValueE
-__ZN3WTF12bitwise_castIdlEET_T0_
__ZNK3WTF9HashTableIPN3JSC8JSObjectES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E8containsIS3_NS_22
__ZN3WTF7HashSetIPN3JSC8JSObjectENS_7PtrHashIS3_EENS_10HashTraitsIS3_EEE3addERKS3_
__ZN3WTF9HashTableIPN3JSC8JSObjectES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E6expandEv
@@ -2219,134 +2350,100 @@ __ZN3WTF9HashTableIPN3JSC8JSObjectES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3
__ZN3WTF9HashTableIPN3JSC8JSObjectES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E47removeAndInvalida
__ZN3WTF9HashTableIPN3JSC8JSObjectES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E6removeEPS3_
-[WebFrame(WebInternal) _convertDOMRangeToNSRange:]
-__ZNK6WebKit13ProxyInstance27supportsInvokeDefaultMethodEv
-__WKPHNPObjectHasInvokeDefaultMethod
+-[WebPDFView(FileInternal) _updatePreferencesSoon]
+-[WebPDFView(FileInternal) _updatePreferences:]
+-[WebPreferences(WebPrivate) setPDFScaleFactor:]
+-[WebPreferences _setFloatValue:forKey:]
+-[WebPreferences(WebPrivate) setPDFDisplayMode:]
+-[WebPDFView viewState]
++[WebHTMLView(WebPrivate) supportedMIMETypes]
++[WebHTMLRepresentation supportedMIMETypes]
+__ZN7WebCore17FrameLoaderClient18didNotAllowPluginsEv
__ZN6WebKit13ProxyInstance19invokeDefaultMethodEPN3JSC9ExecStateERKNS1_7ArgListE
-__ZNK6WebKit10ProxyField17valueFromInstanceEPN3JSC9ExecStateEPKNS1_8Bindings8InstanceE
-__ZNK6WebKit13ProxyInstance10fieldValueEPN3JSC9ExecStateEPKNS1_8Bindings5FieldE
-__WKPHNPObjectGetProperty
-__ZN6WebKit10ProxyFieldD0Ev
-__WKPHLoadURLNotify
__XPCGetIntIdentifier
_WKPCGetIntIdentifier
-__ZNK6WebKit10ProxyField18setValueToInstanceEPN3JSC9ExecStateEPKNS1_8Bindings8InstanceENS1_7JSValueE
-__ZNK6WebKit13ProxyInstance13setFieldValueEPN3JSC9ExecStateEPKNS1_8Bindings5FieldENS1_7JSValueE
-__WKPHNPObjectSetProperty
-__XPCConstruct
-_WKPCConstruct
-__ZN6WebKit27NetscapePluginInstanceProxy9constructEjPcjRS1_Rj
-__ZNK6WebKit13ProxyInstance17supportsConstructEv
-__WKPHNPObjectHasConstructMethod
-__ZN6WebKit13ProxyInstance15invokeConstructEPN3JSC9ExecStateERKNS1_7ArgListE
-__XPCGetPluginElementNPObject
-_WKPCGetPluginElementNPObject
-__ZN6WebKit27NetscapePluginInstanceProxy24getPluginElementNPObjectERj
--[WebBaseNetscapePluginView element]
-__XPCSetProperty
-_WKPCSetProperty
-__ZN6WebKit27NetscapePluginInstanceProxy11setPropertyEjRKN3JSC10IdentifierEPcj
+__ZNK3JSC8JSObject11toPrimitiveEPNS_9ExecStateENS_22PreferredPrimitiveTypeE
__XPCEnumerate
_WKPCEnumerate
__ZN6WebKit27NetscapePluginInstanceProxy9enumerateEjRPcRj
-__ZN3WTF9HashTableIPN3JSC7UString3RepES4_NS_17IdentityExtractorIS4_EENS_7PtrHashIS4_EENS_10HashTraitsIS4_EESA_E15deallocateTabl
+__ZN3WTF9HashTableIPN7WebCore10StringImplES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E15deallocate
+__ZN3WTF6VectorIN3JSC10IdentifierELm20EE6shrinkEm
__ZN6WebKit13ProxyInstance16getPropertyNamesEPN3JSC9ExecStateERNS1_17PropertyNameArrayE
__WKPHNPObjectEnumerate
+__XPCGetProperty
+_WKPCGetProperty
+__ZN6WebKit27NetscapePluginInstanceProxy11getPropertyEjRKN3JSC10IdentifierERPcRj
+__XPCHasProperty
+_WKPCHasProperty
+__ZN6WebKit27NetscapePluginInstanceProxy11hasPropertyEjRKN3JSC10IdentifierE
__XPCInvokeDefault
_WKPCInvokeDefault
__ZN6WebKit27NetscapePluginInstanceProxy13invokeDefaultEjPcjRS1_Rj
__ZN3WTF12bitwise_castIldEET_T0_
-__ZN20WebFrameLoaderClient20redirectDataToPluginEPN7WebCore6WidgetE
--[WebHTMLRepresentation _redirectDataToManualLoader:forPluginView:]
--[WebHostedNetscapePluginView pluginView:receivedResponse:]
-__ZN6WebKit26HostedNetscapePluginStreamC1EPNS_27NetscapePluginInstanceProxyEPN7WebCore11FrameLoaderE
-__ZN6WebKit26HostedNetscapePluginStreamC2EPNS_27NetscapePluginInstanceProxyEPN7WebCore11FrameLoaderE
-__ZN6WebKit27NetscapePluginInstanceProxy15setManualStreamEN3WTF10PassRefPtrINS_26HostedNetscapePluginStreamEEE
-__ZN6WebKit26HostedNetscapePluginStream23startStreamWithResponseEP13NSURLResponse
--[WebHostedNetscapePluginView pluginView:receivedData:]
--[WebHostedNetscapePluginView pluginViewFinishedLoading:]
-__ZN6WebKit26HostedNetscapePluginStream10cancelLoadEs
-__ZNK6WebKit26HostedNetscapePluginStream14errorForReasonEs
-__ZNK6WebKit26HostedNetscapePluginStream30pluginCancelledConnectionErrorEv
-__ZN6WebKit26HostedNetscapePluginStream10cancelLoadEP7NSError
-+[WebDatabaseManager sharedWebDatabaseManager]
+__ZNK6WebKit10ProxyField18setValueToInstanceEPN3JSC9ExecStateEPKNS1_8Bindings8InstanceENS1_7JSValueE
+__ZNK6WebKit13ProxyInstance13setFieldValueEPN3JSC9ExecStateEPKNS1_8Bindings5FieldENS1_7JSValueE
+__WKPHNPObjectSetProperty
+__ZNK6WebKit18ProxyRuntimeObject24getInternalProxyInstanceEv
+__XPCStatusText
+_WKPCStatusText
+__ZN6WebKit27NetscapePluginInstanceProxy6statusEPKc
+-[WebFrame(WebKitDebug) numberOfPages::]
+-[WebFrame(WebKitDebug) pageNumberForElement:::]
+__ZN20WebFrameLoaderClient12blockedErrorERKN7WebCore15ResourceRequestE
-[WebDatabaseManager deleteAllDatabases]
+-[WebFrame(WebPrivate) _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]
-[WebSecurityOrigin initWithURL:]
--[WebSecurityOrigin port]
--[WebSecurityOrigin host]
--[WebSecurityOrigin protocol]
--[WebFrame(WebPrivate) _pauseTransitionOfProperty:onNode:atTime:]
-__ZN3WTF6VectorINS_6RefPtrIN7WebCore7ArchiveEEELm0EE6shrinkEm
+-[WebFrame(WebPrivate) _pauseSVGAnimation:onSMILNode:atTime:]
++[WebView(WebPrivate) _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:]
+__ZL14toStringVectorP7NSArray
++[WebView(WebPrivate) _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:]
-[WebDataSource webArchive]
-[WebIconDatabase(WebPendingPublic) setEnabled:]
-[WebIconDatabase(WebInternal) _shutDownIconDatabase]
--[WebPDFView viewState]
--[WebFramePolicyListener invalidate]
-__ZL8hexDigiti
-__ZNK3JSC21UStringSourceProvider8getRangeEii
-__ZN7WebCore13ResourceErrorD2Ev
-+[WebIconDatabase(WebPrivate) _checkIntegrityBeforeOpening]
-__XPCConvertPoint
-_WKPCConvertPoint
-__ZN6WebKit27NetscapePluginInstanceProxy12convertPointEdd17NPCoordinateSpaceRdS2_S1_
--[WebHistoryItem(WebPrivate) _lastVisitedDate]
-__ZN6WebKit27NetscapePluginInstanceProxy10wheelEventEP6NSViewP7NSEvent
-__WKPHPluginInstanceWheelEvent
--[WebPreferences init]
++[WebApplicationCache setMaximumSize:]
+__ZN15WebChromeClient22reachedMaxAppCacheSizeEx
+-[WebHistory(WebPrivate) _itemForURLString:]
+-[WebHistoryPrivate itemForURLString:]
+-[WebHistory itemForURL:]
+-[WebHistoryPrivate itemForURL:]
+-[WebHistoryItem(WebInternal) setTitle:]
+-[WebView(WebPrivate) _dispatchPendingLoadRequests]
+_WKCreateCustomCFReadStream
+_WKSignalCFReadStreamHasBytes
+__ZN15WebChromeClient39shouldReplaceWithGeneratedFileForUploadERKN7WebCore6StringERS1_
+-[WebDefaultUIDelegate webView:shouldReplaceUploadFile:usingGeneratedFilename:]
+_WKSignalCFReadStreamEnd
+__ZNK27MediaSharedUITimelineSlider21timelineRectForBoundsE6CGRect
+__ZN20WebFrameLoaderClient31dispatchUnableToImplementPolicyERKN7WebCore13ResourceErrorE
+__ZN20WebFrameLoaderClient24revertToProvisionalStateEPN7WebCore14DocumentLoaderE
+-[WebDataSource(WebInternal) _revertToProvisionalState]
+-[WebView goToBackForwardItem:]
+-[NSString(WebKitExtras) _webkit_fixedCarbonPOSIXPath]
++[WebView(WebPrivate) _addOriginAccessWhitelistEntryWithSourceOrigin:destinationProtocol:destinationHost:allowDestinationSubdom
+__XPCSetException
+_WKPCSetException
+__ZN6WebKit27NetscapePluginInstanceProxy18setGlobalExceptionERKN7WebCore6StringE
++[WebView(WebPrivate) _removeOriginAccessWhitelistEntryWithSourceOrigin:destinationProtocol:destinationHost:allowDestinationSub
-[WebPreferences(WebPrivate) setApplicationChromeModeEnabled:]
-[WebHistoryItem(WebPrivate) _setTransientProperty:forKey:]
--[WebHistoryItem(WebPrivate) _setLastVisitWasFailure:]
--[WebBackForwardList backItem]
-_WKAdvanceDefaultButtonPulseAnimation
--[WKAppKitDrawDecoyWindow isKeyWindow]
--[WebHostedNetscapePluginView keyDown:]
--[WebTextInputWindowController interpretKeyEvent:string:]
--[WebTextInputPanel _interpretKeyEvent:string:]
-__ZN6WebKit27NetscapePluginInstanceProxy8keyEventEP6NSViewP7NSEvent16NPCocoaEventType
-_WKGetNSEventKeyChar
-__WKPHPluginInstanceKeyboardEvent
--[WebHostedNetscapePluginView keyUp:]
--[WebFrameView scrollLineUp:]
--[WebFrameView _scrollLineVertically:]
--[WebFrameView(WebFrameViewFileInternal) _verticalKeyboardScrollDistance]
--[WebFrameView _scrollVerticallyBy:]
--[WebFrameView scrollLineDown:]
--[WebHostedNetscapePluginView flagsChanged:]
-__ZN6WebKit27NetscapePluginInstanceProxy12flagsChangedEP7NSEvent
--[WebDataSource(WebPrivate) _fileWrapperForURL:]
--[WebDataSource subresourceForURL:]
-__XPCSetMenuBarVisible
-_WKPCSetMenuBarVisible
-__ZN6WebKit23NetscapePluginHostProxy17setMenuBarVisibleEb
--[WebBackForwardList backListWithLimit:]
-__ZL15vectorToNSArrayRN3WTF6VectorINS_6RefPtrIN7WebCore11HistoryItemEEELm0EEE
-__ZL30bumperCarBackForwardHackNeededv
-__ZN3WTF6VectorINS_6RefPtrIN7WebCore11HistoryItemEEELm0EE6shrinkEm
--[WebHistoryItem(WebPrivate) targetItem]
--[WebHistoryItem icon]
--[WebBackForwardList forwardItem]
-__ZN15WebChromeClient13willPopUpMenuEP6NSMenu
-_WKPopupMenu
--[WebBaseNetscapePluginView viewWillMoveToHostWindow:]
--[WebBaseNetscapePluginView viewDidMoveToHostWindow]
--[WebFrame(WebPrivate) _isDescendantOfFrame:]
-__ZN3WTF6VectorItLm2048EE14expandCapacityEmPKt
-__ZN3WTF6VectorItLm2048EE14expandCapacityEm
-__ZN3WTF6VectorItLm2048EE15reserveCapacityEm
--[WebHTMLView copy:]
--[WebHTMLView executeCoreCommandBySelector:]
--[WebView(WebViewEditingInMail) _selectionIsAll]
--[WebView(WebPrivate) _cachedResponseForURL:]
--[NSMutableURLRequest(WebNSURLRequestExtras) _web_setHTTPUserAgent:]
-+[WebView(WebPrivate) suggestedFileExtensionForMIMEType:]
-_WKGetPreferredExtensionForMIMEType
--[WebHTMLView(WebPrivate) pasteboardChangedOwner:]
--[NSURL(WebNSURLExtras) _webkit_isJavaScriptURL]
++[WebURLsWithTitles URLsFromPasteboard:]
++[WebView(WebPrivate) canShowFile:]
++[WebView(WebPrivate) _MIMETypeForFile:]
+-[NSView(WebExtras) _web_dragOperationForDraggingInfo:]
+-[WebIconDatabase(WebPendingPublic) removeAllIcons]
+__ZN21WebIconDatabaseClient25dispatchDidRemoveAllIconsEv
+-[WebIconDatabase(WebInternal) _sendDidRemoveAllIconsNotification]
+-[WebPreferences(WebPrivate) setWebArchiveDebugModeEnabled:]
+-[WebPreferences(WebPrivate) setLocalFileContentSniffingEnabled:]
+-[WebPreferences(WebPrivate) setShowDebugBorders:]
+-[WebPreferences(WebPrivate) setShowRepaintCounter:]
+[WebCoreStatistics statistics]
+[WebCache statistics]
+[WebCoreStatistics javaScriptGlobalObjectsCount]
+[WebCoreStatistics javaScriptProtectedObjectsCount]
+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]
__ZN3WTF9HashTableIPKcSt4pairIS2_jENS_18PairFirstExtractorIS4_EENS_7PtrHashIS2_EENS_14PairHashTraitsINS_10HashTraitsIS2_EENSA_I
++[WebCoreStatistics javaScriptObjectTypeCounts]
+[WebCoreStatistics iconPageURLMappingCount]
+[WebCoreStatistics iconRetainedPageURLCount]
+[WebCoreStatistics iconRecordCount]
@@ -2355,181 +2452,153 @@ __ZN3WTF9HashTableIPKcSt4pairIS2_jENS_18PairFirstExtractorIS4_EENS_7PtrHashIS2_E
+[WebCoreStatistics cachedFontDataInactiveCount]
+[WebCoreStatistics glyphPageCount]
+[WebCoreStatistics memoryStatistics]
-__XPCSetModal
-_WKPCSetModal
-__ZN6WebKit23NetscapePluginHostProxy8setModalEb
-__ZN6WebKit23NetscapePluginHostProxy10beginModalEv
--[WebPlaceholderModalWindow _wantsUserAttention]
-__ZN6WebKit23NetscapePluginHostProxy8endModalEv
--[WebHTMLRepresentation canSaveAsWebArchive]
--[WebFrame(WebInternal) _canSaveAsWebArchive]
-+[WebView(WebPrivate) _decodeData:]
--[WebFrameView documentViewShouldHandlePrint]
--[WebFrameView printOperationWithPrintInfo:]
--[WebFrameView canPrintHeadersAndFooters]
--[WebHTMLView canPrintHeadersAndFooters]
--[WebHTMLView knowsPageRange:]
--[WebHTMLView _availablePaperWidthForPrintOperation:]
--[WebHTMLView _setPrinting:minimumPageWidth:maximumPageWidth:adjustViewSize:]
--[WebView(WebViewPrintingPrivate) _adjustPrintingMarginsForHeaderAndFooter]
--[NSPrintOperation(WebKitExtras) _web_pageSetupScaleFactor]
--[WebView(WebViewPrintingPrivate) _headerHeight]
-__Z28CallUIDelegateReturningFloatP7WebViewP13objc_selector
--[WebView(WebViewPrintingPrivate) _footerHeight]
--[WebHTMLView _scaleFactorForPrintOperation:]
--[WebHTMLView(WebHTMLViewFileInternal) _calculatePrintHeight]
--[WebFrame(WebInternal) _computePageRectsWithPrintWidthScaleFactor:printHeight:]
--[WebHTMLView _provideTotalScaleFactorForPrintOperation:]
--[WebHTMLView beginDocument]
--[WebHTMLView rectForPage:]
--[WebHTMLView drawPageBorderWithSize:]
--[WebView(WebViewPrintingPrivate) _drawHeaderAndFooter]
--[WebView(WebViewPrintingPrivate) _drawHeaderInRect:]
-__Z14CallUIDelegateP7WebViewP13objc_selector6CGRect
--[WebView(WebViewPrintingPrivate) _drawFooterInRect:]
--[WebHTMLView endDocument]
--[WebHTMLView _endPrintMode]
--[WebHTMLView(WebPrivate) _hasInsertionPoint]
--[WebPreferences(WebPrivate) setZoomsTextOnly:]
--[WebView(WebIBActions) makeTextSmaller:]
--[WebFrameView initWithCoder:]
--[WebHTMLRepresentation documentSource]
--[WebView setCustomTextEncodingName:]
--[WebBackForwardList containsItem:]
--[WebRenderNode initWithWebFrameView:]
--[WebRenderNode dealloc]
-__ZL14copyRenderNodePN7WebCore12RenderObjectE
--[WebRenderNode initWithName:position:rect:view:children:]
--[WebRenderNode children]
--[WebRenderNode name]
--[WebRenderNode absolutePositionString]
--[WebRenderNode positionString]
--[WebRenderNode widthString]
--[WebRenderNode heightString]
-+[WebView(WebPrivate) _setAlwaysUsesComplexTextCodePath:]
+[WebCoreStatistics returnFreeMemoryToSystem]
+[WebCache isDisabled]
++[WebCache setDisabled:]
+[WebCoreStatistics purgeInactiveFontData]
--[WebView(WebPrivate) _loadBackForwardListFromOtherView:]
--[WebDatabaseManager origins]
++[WebCoreStatistics cachedPageCount]
++[WebCoreStatistics cachedFrameCount]
++[WebCoreStatistics autoreleasedPageCount]
+-[WebFrame(WebPrivate) _cacheabilityDictionary]
+__ZNK3WTF9HashTableIN7WebCore12AtomicStringESt4pairIS2_PNS_6VectorINS1_23RegisteredEventListenerELm1EEEENS_18PairFirstExtractor
++[WebView(WebPrivate) _setAlwaysUsesComplexTextCodePath:]
+-[WebView(WebPrivate) setBackgroundColor:]
+-[WebPreferences(WebPrivate) setDatabasesEnabled:]
+-[WebPreferences(WebPrivate) setLocalStorageEnabled:]
-[WebInspector isDebuggingJavaScript]
-[WebInspector isProfilingJavaScript]
+-[WebNodeHighlight highlightView]
+__ZN26WebInspectorFrontendClient12detachWindowEv
+-[WebInspectorWindowController detach]
-[WebView customUserAgent]
--[WebInspector show:]
-__ZN18WebInspectorClient10createPageEv
--[WebInspectorWindowController initWithInspectedWebView:]
--[WebInspectorWindowController init]
--[WebView setDrawsBackground:]
--[WebView(WebPrivate) setProhibitsMainFrameScrolling:]
--[WebInspectorWindowController webView]
-__ZN18WebInspectorClient19inspectedURLChangedERKN7WebCore6StringE
-__ZNK18WebInspectorClient17updateWindowTitleEv
-__ZN18WebInspectorClient19localizedStringsURLEv
-__ZN18WebInspectorClient12hiddenPanelsEv
-__ZN18WebInspectorClient13hideHighlightEv
--[WebInspectorWindowController hideHighlight]
-__ZN18WebInspectorClient10showWindowEv
--[WebInspectorWindowController window]
-_WKNSWindowMakeBottomCornersSquare
--[WebInspectorWindowController showWindow:]
--[WebInspectorWindowController setAttachedWindowHeight:]
-__ZN18WebInspectorClient12attachWindowEv
--[WebInspectorWindowController attach]
-[WebInspector showConsole:]
--[WebDefaultEditingDelegate webView:shouldEndEditingInDOMRange:]
-__ZN18WebInspectorClient9highlightEPN7WebCore4NodeE
--[WebInspectorWindowController highlightNode:]
--[WebNodeHighlight initWithTargetView:inspectorController:]
--[WebNodeHighlight(FileInternal) _computeHighlightWindowFrame]
--[WebNodeHighlightView initWithWebNodeHighlight:]
--[WebNodeHighlightView isFlipped]
--[WebNodeHighlight setDelegate:]
--[WebNodeHighlight attach]
--[WebNodeHighlightView drawRect:]
--[WebNodeHighlight inspectorController]
--[WebInspectorWindowController didAttachWebNodeHighlight:]
--[WebView setCurrentNodeHighlight:]
--[WebNodeHighlight detach]
--[WebInspectorWindowController willDetachWebNodeHighlight:]
--[WebNodeHighlightView detachFromWebNodeHighlight]
--[WebNodeHighlight dealloc]
--[WebNodeHighlightView dealloc]
-__ZN18WebInspectorClient12detachWindowEv
--[WebInspectorWindowController detach]
--[WebInspectorWindowController close]
--[WebDefaultUIDelegate webViewFrame:]
--[WebDefaultUIDelegate webView:setFrame:]
--[WebNodeHighlight highlightView]
--[WebHTMLView _wantsKeyDownForEvent:]
--[WebInspectorWindowController windowShouldClose:]
+-[WebDefaultEditingDelegate webView:shouldBeginEditingInDOMRange:]
+-[WebInspectorWindowController validateUserInterfaceItem:]
+-[WebView setShouldCloseWithWindow:]
-[WebFrame(WebPrivate) _setIsDisconnected:]
-__ZN18WebInspectorClient11closeWindowEv
+-[WebDefaultEditingDelegate webView:shouldEndEditingInDOMRange:]
+-[WebHTMLView(WebPrivate) _canEditRichly]
+-[WebHTMLView(WebPrivate) _hasInsertionPoint]
+-[WebView(WebFileInternal) _isLoading]
+-[WebInspectorWindowController toggleDebuggingJavaScript:]
-[WebInspector toggleDebuggingJavaScript:]
-[WebInspector startDebuggingJavaScript:]
+-[WebInspectorWindowController toggleProfilingJavaScript:]
-[WebInspector toggleProfilingJavaScript:]
-[WebInspector startProfilingJavaScript:]
--[WebInspector stopProfilingJavaScript:]
+__ZNK7WebCore6Widget12isPluginViewEv
+-[WebDefaultUIDelegate webViewFocus:]
+-[WebPreferences(WebPrivate) _setUseSiteSpecificSpoofing:]
+__ZN26WebInspectorFrontendClient12attachWindowEv
+-[WebInspectorWindowController attach]
+-[WebInspectorWindowController webView:dragDestinationActionMaskForDraggingInfo:]
+-[WebInspectorWindowController windowShouldClose:]
+-[WebHostedNetscapePluginView keyDown:]
+-[WebTextInputWindowController interpretKeyEvent:string:]
+-[WebTextInputPanel _interpretKeyEvent:string:]
+__ZN6WebKit27NetscapePluginInstanceProxy8keyEventEP6NSViewP7NSEvent16NPCocoaEventType
+_WKGetNSEventKeyChar
+__WKPHPluginInstanceKeyboardEvent
+-[WebHostedNetscapePluginView keyUp:]
+-[WebHostedNetscapePluginView flagsChanged:]
+__ZN6WebKit27NetscapePluginInstanceProxy12flagsChangedEP7NSEvent
+-[WebHostedNetscapePluginView scrollWheel:]
+__ZN6WebKit27NetscapePluginInstanceProxy10wheelEventEP6NSViewP7NSEvent
+__WKPHPluginInstanceWheelEvent
+__XPCGetPluginElementNPObject
+_WKPCGetPluginElementNPObject
+__ZN6WebKit27NetscapePluginInstanceProxy24getPluginElementNPObjectERj
+-[WebFrameView(WebPrivate) _setCustomScrollViewClass:]
+-[DOMHTMLIFrameElement(WebDOMHTMLIFrameElementOperations) contentFrame]
+-[WebView(WebPendingPublic) canMarkAllTextMatches]
+-[WebView(WebPendingPublic) searchFor:direction:caseSensitive:wrap:startInSelection:]
+-[WebHTMLView(WebDocumentPrivateProtocols) searchFor:direction:caseSensitive:wrap:startInSelection:]
+-[WebView(WebPendingPublic) rectsForTextMatches]
+-[WebHTMLView(WebDocumentInternalProtocols) rectsForTextMatches]
+__ZN3WTF6VectorIN7WebCore7IntRectELm0EE6shrinkEm
+-[WebHTMLView(WebDocumentPrivateProtocols) selectionRect]
+-[WebHTMLView(WebDocumentPrivateProtocols) selectionTextRects]
+__ZN3WTF6VectorIN7WebCore9FloatRectELm0EE6shrinkEm
+-[WebHTMLView(WebDocumentPrivateProtocols) selectionImageForcingBlackText:]
+-[WebHTMLView(WebDocumentPrivateProtocols) selectedString]
+-[WebFrame(WebInternal) _selectedString]
++[WebStringTruncator widthOfString:font:]
+__ZNK6WebKit26HostedNetscapePluginStream30pluginCancelledConnectionErrorEv
+-[WebBaseNetscapePluginView pluginPackage]
+__XPCSetFullscreenWindowIsShowing
+_WKPCSetFullscreenWindowIsShowing
+__ZN6WebKit23NetscapePluginHostProxy28setFullscreenWindowIsShowingEb
+__ZNK6WebKit23NetscapePluginHostProxy18didEnterFullscreenEv
+__XPCSetMenuBarVisible
+_WKPCSetMenuBarVisible
+__ZN6WebKit23NetscapePluginHostProxy17setMenuBarVisibleEb
+__ZNK6WebKit23NetscapePluginHostProxy17didExitFullscreenEv
+__ZN15WebChromeClient27runBeforeUnloadConfirmPanelERKN7WebCore6StringEPNS0_5FrameE
+-[WebFrameView scrollLineDown:]
+-[WebFrameView _scrollLineVertically:]
+-[WebFrameView(WebFrameViewFileInternal) _verticalKeyboardScrollDistance]
+__ZN25MediaSharedUIImageElement9glowColorEv
+-[WebView(WebViewEventHandling) mouseDown:]
+-[NSEvent(WebExtras) _web_isEscapeKeyEvent]
+-[NSEvent(WebExtras) _web_isKeyEvent:]
++[NSURL(WebNSURLExtras) _web_URLWithData:]
+-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]
+-[NSString(WebKitExtras) _webkit_hasCaseInsensitiveSuffix:]
+-[WebHTMLView(WebPrivate) pasteboardChangedOwner:]
+-[WebView prepareForDragOperation:]
+-[WebHostedNetscapePluginView privateBrowsingModeDidChange]
+__ZN6WebKit27NetscapePluginInstanceProxy28privateBrowsingModeDidChangeEb
+__WKPHPluginInstancePrivateBrowsingModeDidChange
+-[WebFrame(WebPrivate) _allowsFollowingLink:]
+-[WebElementDictionary _imageRect]
+-[WebDataSource(WebPrivate) _fileWrapperForURL:]
+-[WebDataSource subresourceForURL:]
+-[WebHTMLView copy:]
+-[WebView(WebViewEditingInMail) _selectionIsAll]
+-[WebDefaultUIDelegate webViewFrame:]
+-[WebFrame(WebPrivate) _firstLayoutDone]
-[WebHistoryItem(WebPrivate) setRSSFeedReferrer:]
--[NSView(WebExtras) _web_dragOperationForDraggingInfo:]
--[NSString(WebKitExtras) _webkit_filenameByFixingIllegalCharacters]
+_WKAdvanceDefaultButtonPulseAnimation
+-[WKAppKitDrawDecoyWindow isKeyWindow]
+-[WebHTMLRepresentation canSaveAsWebArchive]
+-[WebFrame(WebInternal) _canSaveAsWebArchive]
++[WebView(WebPrivate) suggestedFileExtensionForMIMEType:]
+_WKGetPreferredExtensionForMIMEType
-[WebIconDatabase(WebInternal) _scaleIcon:toSize:]
--[WebPDFView hitTest:]
+-[WebPDFView selectedString]
+-[WebPDFView rectsForTextMatches]
+-[WebPDFView(FileInternal) _visiblePDFPages]
+-[WebPDFView unmarkAllTextMatches]
+-[WebPDFView(FileInternal) _setTextMatches:]
-[WebPDFView(FileInternal) _PDFDocumentViewMightHaveScrolled:]
--[NSView(WebExtras) _webView]
--[WebPDFView(FileInternal) _updatePreferencesSoon]
--[WebPDFView(FileInternal) _updatePreferences:]
--[WebPreferences(WebPrivate) setPDFScaleFactor:]
--[WebPreferences _setFloatValue:forKey:]
--[NSMutableDictionary(WebNSDictionaryExtras) _webkit_setFloat:forKey:]
--[WebPreferences(WebPrivate) setPDFDisplayMode:]
--[WebPDFView PDFViewOpenPDFInNativeApplication:]
--[WebPDFView(FileInternal) _openWithFinder:]
--[WebPDFView(FileInternal) _path]
--[WebPDFView(FileInternal) _temporaryPDFDirectoryPath]
-[WebPDFView setMarkedTextMatchesAreHighlighted:]
-[WebPDFView markAllMatchesForText:caseSensitive:limit:]
-[WebPDFView(FileInternal) _nextMatchFor:direction:caseSensitive:wrap:fromSelection:startInSelection:]
--[WebPDFView(FileInternal) _setTextMatches:]
--[WebPDFView selectedString]
+-[NSMutableDictionary(WebNSDictionaryExtras) _webkit_setFloat:forKey:]
-[WebPDFView searchFor:direction:caseSensitive:wrap:startInSelection:]
--[WebPDFView unmarkAllTextMatches]
--[WebPDFView rectsForTextMatches]
--[WebPDFView(FileInternal) _visiblePDFPages]
-[WebPDFView selectionRect]
-[WebPDFView selectionTextRects]
-[WebPDFView selectionImageForcingBlackText:]
-[WebPDFView selectedAttributedString]
-[WebPDFView(FileInternal) _scaledAttributedString:]
-+[WebURLsWithTitles URLsFromPasteboard:]
-+[WebView(WebPrivate) canShowFile:]
-+[WebView(WebPrivate) _MIMETypeForFile:]
-__ZN20WebFrameLoaderClient41dispatchDidReceiveAuthenticationChallengeEPN7WebCore14DocumentLoaderEmRKNS0_23AuthenticationChallen
-+[WebPanelAuthenticationHandler sharedHandler]
--[WebPanelAuthenticationHandler init]
--[WebPanelAuthenticationHandler startAuthentication:window:]
--[WebAuthenticationPanel initWithCallback:selector:]
--[NSMutableDictionary(WebNSDictionaryExtras) _webkit_setObject:forUncopiedKey:]
--[WebAuthenticationPanel runAsSheetOnWindow:withChallenge:]
--[WebAuthenticationPanel setUpForChallenge:]
--[WebAuthenticationPanel loadNib]
--[NSControl(WebExtras) sizeToFitAndAdjustWindowHeight]
--[NonBlockingPanel _blocksActionWhenModal:]
--[WebAuthenticationPanel logIn:]
--[WebAuthenticationPanel sheetDidEnd:returnCode:contextInfo:]
--[WebPanelAuthenticationHandler _authenticationDoneWithChallenge:result:]
--[WebAuthenticationPanel dealloc]
--[WebPanelAuthenticationHandler tryNextChallengeForWindow:]
--[WebView(WebPrivate) setBackgroundColor:]
-__ZN15WebChromeClient23dashboardRegionsChangedEv
--[WebView(WebPrivate) _addScrollerDashboardRegions:]
--[WebView(WebPrivate) _addScrollerDashboardRegions:from:]
--[WebView(WebPrivate) _addScrollerDashboardRegionsForFrameView:dashboardRegions:]
--[WebView(WebPrivate) _setAdditionalWebPlugInPaths:]
--[WebFrame(WebPrivate) _recursive_resumeNullEventsForAllNetscapePlugins]
--[WebHTMLView(WebPrivate) _resumeNullEventsForAllNetscapePlugins]
-__ZNK7WebCore6Widget11isScrollbarEv
--[WebPreferences(WebPrivate) _setUseSiteSpecificSpoofing:]
--[WebFrame(WebPrivate) _recursive_pauseNullEventsForAllNetscapePlugins]
--[WebHTMLView(WebPrivate) _pauseNullEventsForAllNetscapePlugins]
-+[NSObject(WebScripting) isSelectorExcludedFromWebScript:]
--[WebHTMLView(WebInternal) _destroyAllWebPlugins]
+-[WebPDFView PDFViewSavePDFToDownloadFolder:]
+__Z14CallUIDelegateP7WebViewP13objc_selectorP11objc_objecta
+-[WebPDFView PDFViewOpenPDFInNativeApplication:]
+-[WebPDFView(FileInternal) _openWithFinder:]
+-[WebPDFView(FileInternal) _path]
+-[WebPDFView(FileInternal) _temporaryPDFDirectoryPath]
+-[WebBackForwardList containsItem:]
++[WebURLsWithTitles titlesFromPasteboard:]
+-[WebDownloadInternal download:shouldDecodeSourceDataOfMIMEType:]
+-[WebView(WebPrivate) _cachedResponseForURL:]
+-[NSMutableURLRequest(WebNSURLRequestExtras) _web_setHTTPUserAgent:]
+-[WebHTMLView writeSelectionToPasteboard:types:]
+-[WebHTMLView(WebDocumentPrivateProtocols) writeSelectionWithPasteboardTypes:toPasteboard:]
+-[WebHTMLView(WebHTMLViewFileInternal) _writeSelectionWithPasteboardTypes:toPasteboard:cachedAttributedString:]
+__ZN20WebContextMenuClient11downloadURLERKN7WebCore4KURLE
+-[WebView(WebPrivate) _downloadURL:]
+-[WebDownload _initWithRequest:delegate:directory:]
+-[WebDownload initWithRequest:delegate:]
+-[NSURL(WebNSURLExtras) _web_URLWithLowercasedScheme]
+-[NSEvent(WebExtras) _web_isReturnOrEnterKeyEvent]
+-[WebPreferences setDefaultTextEncodingName:]
diff --git a/WebKit/mac/WebKitPrefix.h b/WebKit/mac/WebKitPrefix.h
index 2a894e6..fe0f214 100644
--- a/WebKit/mac/WebKitPrefix.h
+++ b/WebKit/mac/WebKitPrefix.h
@@ -72,7 +72,7 @@ typedef float CGFloat;
#include <wtf/Platform.h>
-#include "EmptyProtocolDefinitions.h"
+#include <WebCore/EmptyProtocolDefinitions.h>
/* WebKit has no way to pull settings from WebCore/config.h for now */
/* so we assume WebKit is always being compiled on top of JavaScriptCore */
diff --git a/WebKit/mac/WebView/WebArchive.mm b/WebKit/mac/WebView/WebArchive.mm
index 89c8335..f07b51b 100644
--- a/WebKit/mac/WebView/WebArchive.mm
+++ b/WebKit/mac/WebView/WebArchive.mm
@@ -38,6 +38,7 @@
#import <WebCore/LegacyWebArchive.h>
#import <WebCore/ThreadCheck.h>
#import <WebCore/WebCoreObjCExtras.h>
+#import <wtf/Threading.h>
using namespace WebCore;
@@ -66,6 +67,7 @@ static NSString * const WebSubframeArchivesKey = @"WebSubframeArchives";
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
@@ -239,13 +241,13 @@ static BOOL isArrayOfClass(id object, Class elementClass)
@try {
id object = [decoder decodeObjectForKey:WebMainResourceKey];
if ([object isKindOfClass:[WebResource class]])
- mainResource = [object retain];
+ mainResource = object;
object = [decoder decodeObjectForKey:WebSubresourcesKey];
if (isArrayOfClass(object, [WebResource class]))
- subresources = [object retain];
+ subresources = object;
object = [decoder decodeObjectForKey:WebSubframeArchivesKey];
if (isArrayOfClass(object, [WebArchive class]))
- subframeArchives = [object retain];
+ subframeArchives = object;
} @catch(id) {
[self release];
return nil;
diff --git a/WebKit/mac/WebView/WebClipView.h b/WebKit/mac/WebView/WebClipView.h
index 76cc50c..968d2de 100644
--- a/WebKit/mac/WebView/WebClipView.h
+++ b/WebKit/mac/WebView/WebClipView.h
@@ -31,6 +31,7 @@
@interface WebClipView : NSClipView
{
BOOL _haveAdditionalClip;
+ BOOL _isScrolling;
NSRect _additionalClip;
}
diff --git a/WebKit/mac/WebView/WebClipView.m b/WebKit/mac/WebView/WebClipView.mm
index b551145..ced5d8d 100644
--- a/WebKit/mac/WebView/WebClipView.m
+++ b/WebKit/mac/WebView/WebClipView.mm
@@ -28,10 +28,10 @@
#import "WebClipView.h"
-#import <WebKit/WebHTMLView.h>
-#import <WebKit/WebNSViewExtras.h>
-#import <WebKit/WebViewPrivate.h>
-#import <wtf/Assertions.h>
+#import "WebFrameInternal.h"
+#import "WebFrameView.h"
+#import "WebViewPrivate.h"
+#import <WebCore/FrameView.h>
// WebClipView's entire reason for existing is to set the clip used by focus ring redrawing.
// There's no easy way to prevent the focus ring from drawing outside the passed-in clip rectangle
@@ -41,10 +41,16 @@
// FIXME: Change terminology from "additional clip" to "focus ring clip".
+using namespace WebCore;
+
@interface NSView (WebViewMethod)
- (WebView *)_webView;
@end
+@interface NSClipView (WebNSClipViewDetails)
+- (void)_immediateScrollToPoint:(NSPoint)newOrigin;
+@end
+
@implementation WebClipView
- (id)initWithFrame:(NSRect)frame
@@ -67,6 +73,34 @@
return self;
}
+#if USE(ACCELERATED_COMPOSITING)
+- (NSRect)visibleRect
+{
+ if (!_isScrolling)
+ return [super visibleRect];
+
+ WebFrameView *webFrameView = (WebFrameView *)[[self superview] superview];
+ if (![webFrameView isKindOfClass:[WebFrameView class]])
+ return [super visibleRect];
+
+ if (Frame* coreFrame = core([webFrameView webFrame])) {
+ if (FrameView* frameView = coreFrame->view()) {
+ if (frameView->isEnclosedInCompositingLayer())
+ return [self bounds];
+ }
+ }
+
+ return [super visibleRect];
+}
+
+- (void)_immediateScrollToPoint:(NSPoint)newOrigin
+{
+ _isScrolling = YES;
+ [super _immediateScrollToPoint:newOrigin];
+ _isScrolling = NO;
+}
+#endif
+
- (void)resetAdditionalClip
{
ASSERT(_haveAdditionalClip);
diff --git a/WebKit/mac/WebView/WebDashboardRegion.h b/WebKit/mac/WebView/WebDashboardRegion.h
new file mode 100644
index 0000000..4963d04
--- /dev/null
+++ b/WebKit/mac/WebView/WebDashboardRegion.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2004 Apple Computer, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#if !defined(ENABLE_DASHBOARD_SUPPORT)
+#define ENABLE_DASHBOARD_SUPPORT 1
+#endif
+
+#if ENABLE_DASHBOARD_SUPPORT
+
+typedef enum {
+ WebDashboardRegionTypeNone,
+ WebDashboardRegionTypeCircle,
+ WebDashboardRegionTypeRectangle,
+ WebDashboardRegionTypeScrollerRectangle
+} WebDashboardRegionType;
+
+@interface WebDashboardRegion : NSObject <NSCopying>
+{
+ NSRect rect;
+ NSRect clip;
+ WebDashboardRegionType type;
+}
+- initWithRect:(NSRect)rect clip:(NSRect)clip type:(WebDashboardRegionType)type;
+- (NSRect)dashboardRegionClip;
+- (NSRect)dashboardRegionRect;
+- (WebDashboardRegionType)dashboardRegionType;
+@end
+
+#endif
diff --git a/WebKit/mac/WebView/WebDashboardRegion.mm b/WebKit/mac/WebView/WebDashboardRegion.mm
new file mode 100644
index 0000000..c44977a
--- /dev/null
+++ b/WebKit/mac/WebView/WebDashboardRegion.mm
@@ -0,0 +1,93 @@
+/*
+ * Copyright (C) 2004 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "WebDashboardRegion.h"
+
+#import <wtf/UnusedParam.h>
+
+#if ENABLE(DASHBOARD_SUPPORT)
+
+@implementation WebDashboardRegion
+
+- initWithRect:(NSRect)r clip:(NSRect)c type:(WebDashboardRegionType)t
+{
+ self = [super init];
+ rect = r;
+ clip = c;
+ type = t;
+ return self;
+}
+
+- (id)copyWithZone:(NSZone *)unusedZone
+{
+ UNUSED_PARAM(unusedZone);
+
+ return [self retain];
+}
+
+- (NSRect)dashboardRegionClip
+{
+ return clip;
+}
+
+- (NSRect)dashboardRegionRect
+{
+ return rect;
+}
+
+- (WebDashboardRegionType)dashboardRegionType
+{
+ return type;
+}
+
+static const char* typeName(WebDashboardRegionType type)
+{
+ switch (type) {
+ case WebDashboardRegionTypeNone:
+ return "None";
+ case WebDashboardRegionTypeCircle:
+ return "Circle";
+ case WebDashboardRegionTypeRectangle:
+ return "Rectangle";
+ case WebDashboardRegionTypeScrollerRectangle:
+ return "ScrollerRectangle";
+ }
+ return "Unknown";
+}
+
+- (NSString *)description
+{
+ return [NSString stringWithFormat:@"rect:%@ clip:%@ type:%s", NSStringFromRect(rect), NSStringFromRect(clip), typeName(type)];
+}
+
+// FIXME: Overriding isEqual: without overriding hash will cause trouble if this ever goes into a NSSet or is the key in an NSDictionary.
+- (BOOL)isEqual:(id)other
+{
+ return NSEqualRects(rect, [other dashboardRegionRect]) && NSEqualRects(clip, [other dashboardRegionClip]) && type == [other dashboardRegionType];
+}
+
+@end
+
+#endif
diff --git a/WebKit/mac/WebView/WebDataSource.mm b/WebKit/mac/WebView/WebDataSource.mm
index 8a3842e..02dbc2c 100644
--- a/WebKit/mac/WebView/WebDataSource.mm
+++ b/WebKit/mac/WebView/WebDataSource.mm
@@ -60,6 +60,7 @@
#import <WebKit/DOMPrivate.h>
#import <runtime/InitializeThreading.h>
#import <wtf/Assertions.h>
+#import <wtf/Threading.h>
using namespace WebCore;
@@ -70,6 +71,7 @@ using namespace WebCore;
id <WebDocumentRepresentation> representation;
BOOL representationFinishedLoading;
+ BOOL includedInWebKitStatistics;
}
@end
@@ -78,6 +80,7 @@ using namespace WebCore;
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
@@ -208,6 +211,16 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
#endif
}
+- (void)_setDeferMainResourceDataLoad:(BOOL)flag
+{
+ DocumentLoader* loader = [self _documentLoader];
+
+ if (!loader)
+ return;
+
+ loader->setDeferMainResourceDataLoad(flag);
+}
+
@end
@implementation WebDataSource (WebInternal)
@@ -372,10 +385,11 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
_private->loader = loader.releaseRef();
LOG(Loading, "creating datasource for %@", static_cast<NSURL *>(_private->loader->request().url()));
-
- ++WebDataSourceCount;
-
- return self;
+
+ if ((_private->includedInWebKitStatistics = [[self webFrame] _isIncludedInWebKitStatistics]))
+ ++WebDataSourceCount;
+
+ return self;
}
@end
@@ -389,16 +403,18 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
- (void)dealloc
{
- --WebDataSourceCount;
-
+ if (_private && _private->includedInWebKitStatistics)
+ --WebDataSourceCount;
+
[_private release];
-
+
[super dealloc];
}
- (void)finalize
{
- --WebDataSourceCount;
+ if (_private && _private->includedInWebKitStatistics)
+ --WebDataSourceCount;
[super finalize];
}
diff --git a/WebKit/mac/WebView/WebDataSourcePrivate.h b/WebKit/mac/WebView/WebDataSourcePrivate.h
index ae8d4cf..df9c61e 100644
--- a/WebKit/mac/WebView/WebDataSourcePrivate.h
+++ b/WebKit/mac/WebView/WebDataSourcePrivate.h
@@ -37,4 +37,6 @@
- (BOOL)_transferApplicationCache:(NSString*)destinationBundleIdentifier;
+- (void)_setDeferMainResourceDataLoad:(BOOL)flag;
+
@end
diff --git a/WebKit/mac/WebView/WebDelegateImplementationCaching.h b/WebKit/mac/WebView/WebDelegateImplementationCaching.h
index 3ad064c..2aadc83 100644
--- a/WebKit/mac/WebView/WebDelegateImplementationCaching.h
+++ b/WebKit/mac/WebView/WebDelegateImplementationCaching.h
@@ -35,6 +35,9 @@
struct WebResourceDelegateImplementationCache {
IMP didCancelAuthenticationChallengeFunc;
IMP didReceiveAuthenticationChallengeFunc;
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
+ IMP canAuthenticateAgainstProtectionSpaceFunc;
+#endif
IMP identifierForRequestFunc;
IMP willSendRequestFunc;
IMP didReceiveResponseFunc;
@@ -130,6 +133,7 @@ id CallResourceLoadDelegate(IMP, WebView *, SEL, id, NSInteger, id);
id CallResourceLoadDelegate(IMP, WebView *, SEL, id, id, NSInteger, id);
BOOL CallResourceLoadDelegateReturningBoolean(BOOL, IMP, WebView *, SEL, id, id);
+BOOL CallResourceLoadDelegateReturningBoolean(BOOL, IMP, WebView *, SEL, id, id, id);
id CallScriptDebugDelegate(IMP, WebView *, SEL, id, id, NSInteger, id);
id CallScriptDebugDelegate(IMP, WebView *, SEL, id, NSInteger, id, NSInteger, id);
diff --git a/WebKit/mac/WebView/WebDelegateImplementationCaching.mm b/WebKit/mac/WebView/WebDelegateImplementationCaching.mm
index 54c4c33..d00d60b 100644
--- a/WebKit/mac/WebView/WebDelegateImplementationCaching.mm
+++ b/WebKit/mac/WebView/WebDelegateImplementationCaching.mm
@@ -547,6 +547,18 @@ BOOL CallResourceLoadDelegateReturningBoolean(BOOL result, IMP implementation, W
return result;
}
+BOOL CallResourceLoadDelegateReturningBoolean(BOOL result, IMP implementation, WebView *self, SEL selector, id object1, id object2, id object3)
+{
+ if (!self->_private->catchesDelegateExceptions)
+ return reinterpret_cast<BOOL (*)(id, SEL, WebView *, id, id, id)>(objc_msgSend)(self->_private->resourceProgressDelegate, selector, self, object1, object2, object3);
+ @try {
+ return reinterpret_cast<BOOL (*)(id, SEL, WebView *, id, id, id)>(objc_msgSend)(self->_private->resourceProgressDelegate, selector, self, object1, object2, object3);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return result;
+}
+
id CallScriptDebugDelegate(IMP implementation, WebView *self, SEL selector, id object1, id object2, NSInteger integer, id object3)
{
return CallDelegate(implementation, self, self->_private->scriptDebugDelegate, selector, object1, object2, integer, object3);
diff --git a/WebKit/mac/WebView/WebDeviceOrientation.h b/WebKit/mac/WebView/WebDeviceOrientation.h
new file mode 100644
index 0000000..ee04199
--- /dev/null
+++ b/WebKit/mac/WebView/WebDeviceOrientation.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+@class WebDeviceOrientationInternal;
+
+@interface WebDeviceOrientation : NSObject {
+ WebDeviceOrientationInternal* m_internal;
+}
+
+- (id)initWithCanProvideAlpha:(bool)canProvideAlpha alpha:(double)alpha canProvideBeta:(bool)canProvideBeta beta:(double)beta canProvideGamma:(bool)canProvideGamma gamma:(double)gamma;
+
+@end
diff --git a/WebKit/mac/WebView/WebDeviceOrientation.mm b/WebKit/mac/WebView/WebDeviceOrientation.mm
new file mode 100644
index 0000000..7be5d0c
--- /dev/null
+++ b/WebKit/mac/WebView/WebDeviceOrientation.mm
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "WebDeviceOrientationInternal.h"
+
+using namespace WebCore;
+
+@implementation WebDeviceOrientationInternal
+
+- (id)initWithCoreDeviceOrientation:(PassRefPtr<DeviceOrientation>)coreDeviceOrientation
+{
+ self = [super init];
+ if (!self)
+ return nil;
+ m_orientation = coreDeviceOrientation;
+ return self;
+}
+
+@end
+
+@implementation WebDeviceOrientation (Internal)
+
+- (id)initWithCoreDeviceOrientation:(PassRefPtr<WebCore::DeviceOrientation>)coreDeviceOrientation
+{
+ self = [super init];
+ if (!self)
+ return nil;
+ m_internal = [[WebDeviceOrientationInternal alloc] initWithCoreDeviceOrientation:coreDeviceOrientation];
+ return self;
+}
+
+@end
+
+@implementation WebDeviceOrientation
+
+DeviceOrientation* core(WebDeviceOrientation* orientation)
+{
+ return orientation ? orientation->m_internal->m_orientation.get() : 0;
+}
+
+- (id)initWithCanProvideAlpha:(bool)canProvideAlpha alpha:(double)alpha canProvideBeta:(bool)canProvideBeta beta:(double)beta canProvideGamma:(bool)canProvideGamma gamma:(double)gamma
+{
+ self = [super init];
+ if (!self)
+ return nil;
+ m_internal = [[WebDeviceOrientationInternal alloc] initWithCoreDeviceOrientation:DeviceOrientation::create(canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma)];
+ return self;
+}
+
+- (void)dealloc
+{
+ [m_internal release];
+ [super dealloc];
+}
+
+@end
diff --git a/WebKit/mac/WebView/WebDeviceOrientationInternal.h b/WebKit/mac/WebView/WebDeviceOrientationInternal.h
new file mode 100644
index 0000000..b7c6aa5
--- /dev/null
+++ b/WebKit/mac/WebView/WebDeviceOrientationInternal.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "WebDeviceOrientation.h"
+
+#import <WebCore/DeviceOrientation.h>
+#import <wtf/RefPtr.h>
+
+@interface WebDeviceOrientationInternal : NSObject {
+@public
+ RefPtr<WebCore::DeviceOrientation> m_orientation;
+}
+
+- (id)initWithCoreDeviceOrientation:(PassRefPtr<WebCore::DeviceOrientation>)coreDeviceOrientation;
+@end
+
+@interface WebDeviceOrientation (Internal)
+
+- (id)initWithCoreDeviceOrientation:(PassRefPtr<WebCore::DeviceOrientation>)coreDeviceOrientation;
+
+@end
+
+WebCore::DeviceOrientation* core(WebDeviceOrientation*);
diff --git a/WebKit/mac/WebView/WebDeviceOrientationProvider.h b/WebKit/mac/WebView/WebDeviceOrientationProvider.h
new file mode 100644
index 0000000..18b688c
--- /dev/null
+++ b/WebKit/mac/WebView/WebDeviceOrientationProvider.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+@class WebDeviceOrientation;
+
+@protocol WebDeviceOrientationProvider <NSObject>
+- (void)startUpdating;
+- (void)stopUpdating;
+- (WebDeviceOrientation*)lastOrientation;
+@end
diff --git a/WebKit/mac/WebView/WebDeviceOrientationProviderMock.h b/WebKit/mac/WebView/WebDeviceOrientationProviderMock.h
new file mode 100644
index 0000000..be5a764
--- /dev/null
+++ b/WebKit/mac/WebView/WebDeviceOrientationProviderMock.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "WebDeviceOrientationProvider.h"
+
+@class WebDeviceOrientationProviderMockInternal;
+@class WebDeviceOrientation;
+
+@interface WebDeviceOrientationProviderMock : NSObject<WebDeviceOrientationProvider> {
+ WebDeviceOrientationProviderMockInternal* m_internal;
+}
+
+- (id)init;
+- (void)setOrientation:(WebDeviceOrientation*)orientation;
+
+@end
diff --git a/WebKit/mac/WebView/WebDeviceOrientationProviderMock.mm b/WebKit/mac/WebView/WebDeviceOrientationProviderMock.mm
new file mode 100644
index 0000000..0435264
--- /dev/null
+++ b/WebKit/mac/WebView/WebDeviceOrientationProviderMock.mm
@@ -0,0 +1,116 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "WebDeviceOrientationProviderMockInternal.h"
+
+#import "WebDeviceOrientationInternal.h"
+
+using namespace WebCore;
+
+@implementation WebDeviceOrientationProviderMockInternal
+
+- (id)init
+{
+ self = [super init];
+ if (!self)
+ return nil;
+ m_core.set(new DeviceOrientationClientMock());
+ return self;
+}
+
+- (void)setOrientation:(WebDeviceOrientation*)orientation
+{
+ m_core->setOrientation(core(orientation));
+}
+
+- (void)setController:(DeviceOrientationController*)controller
+{
+ m_core->setController(controller);
+}
+
+- (void)startUpdating
+{
+ m_core->startUpdating();
+}
+
+- (void)stopUpdating
+{
+ m_core->stopUpdating();
+}
+
+- (WebDeviceOrientation*)lastOrientation
+{
+ return [[WebDeviceOrientation alloc] initWithCoreDeviceOrientation:m_core->lastOrientation()];
+}
+
+@end
+
+@implementation WebDeviceOrientationProviderMock (Internal)
+
+- (void)setController:(WebCore::DeviceOrientationController*)controller
+{
+ [m_internal setController:controller];
+}
+
+@end
+
+@implementation WebDeviceOrientationProviderMock
+
+- (id)init
+{
+ self = [super init];
+ if (!self)
+ return nil;
+ m_internal = [[WebDeviceOrientationProviderMockInternal alloc] init];
+ return self;
+}
+
+- (void)dealloc
+{
+ [super dealloc];
+ [m_internal release];
+}
+
+- (void)setOrientation:(WebDeviceOrientation*)orientation
+{
+ [m_internal setOrientation:orientation];
+}
+
+- (void)startUpdating
+{
+ [m_internal startUpdating];
+}
+
+- (void)stopUpdating
+{
+ [m_internal stopUpdating];
+}
+
+- (WebDeviceOrientation*)lastOrientation
+{
+ return [m_internal lastOrientation];
+}
+
+@end
diff --git a/WebKit/mac/WebView/WebDeviceOrientationProviderMockInternal.h b/WebKit/mac/WebView/WebDeviceOrientationProviderMockInternal.h
new file mode 100644
index 0000000..5ac38e5
--- /dev/null
+++ b/WebKit/mac/WebView/WebDeviceOrientationProviderMockInternal.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "WebDeviceOrientationProviderMock.h"
+
+#import <WebCore/DeviceOrientationClientMock.h>
+#import <wtf/OwnPtr.h>
+
+@interface WebDeviceOrientationProviderMockInternal : NSObject {
+ OwnPtr<WebCore::DeviceOrientationClientMock> m_core;
+}
+
+- (id)init;
+
+- (void)setOrientation:(WebDeviceOrientation*)orientation;
+
+- (void)setController:(WebCore::DeviceOrientationController*)controller;
+
+- (void)startUpdating;
+- (void)stopUpdating;
+- (WebDeviceOrientation*)lastOrientation;
+@end
+
+@interface WebDeviceOrientationProviderMock (Internal)
+- (void)setController:(WebCore::DeviceOrientationController*)controller;
+@end
diff --git a/WebKit/mac/WebView/WebDocumentInternal.h b/WebKit/mac/WebView/WebDocumentInternal.h
index 191264b..0f63d75 100644
--- a/WebKit/mac/WebView/WebDocumentInternal.h
+++ b/WebKit/mac/WebView/WebDocumentInternal.h
@@ -62,6 +62,7 @@
- (void)setMarkedTextMatchesAreHighlighted:(BOOL)newValue;
- (BOOL)markedTextMatchesAreHighlighted;
- (WebNSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(WebNSUInteger)limit;
+- (WebNSUInteger)countMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(WebNSUInteger)limit markMatches:(BOOL)markMatches;
- (void)unmarkAllTextMatches;
- (NSArray *)rectsForTextMatches;
@end
diff --git a/WebKit/mac/WebView/WebDocumentPrivate.h b/WebKit/mac/WebView/WebDocumentPrivate.h
index f09d3bd..a495e4b 100644
--- a/WebKit/mac/WebView/WebDocumentPrivate.h
+++ b/WebKit/mac/WebView/WebDocumentPrivate.h
@@ -30,6 +30,7 @@
#import <WebKit/WebHTMLView.h>
@class DOMDocument;
+@class PDFDocument;
@protocol WebDocumentImage <NSObject>
- (NSImage *)image;
@@ -64,6 +65,10 @@
- (NSView *)selectionView;
@end
+@protocol WebDocumentPDF <WebDocumentText>
+- (PDFDocument *)PDFDocument;
+@end
+
@protocol WebDocumentIncrementalSearching
/*!
@method searchFor:direction:caseSensitive:wrap:startInSelection:
diff --git a/WebKit/mac/WebView/WebDynamicScrollBarsView.h b/WebKit/mac/WebView/WebDynamicScrollBarsView.h
index 15ed7e4..c289a04 100644
--- a/WebKit/mac/WebView/WebDynamicScrollBarsView.h
+++ b/WebKit/mac/WebView/WebDynamicScrollBarsView.h
@@ -1,53 +1,61 @@
/*
- * Copyright (C) 2005, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2008, 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
*/
// This is a Private header (containing SPI), despite the fact that its name
// does not contain the word Private.
-// This was once used by Safari, but has not been for a long time.
+#import <AppKit/NSScrollView.h>
// FIXME: <rdar://problem/5898985> Mail currently expects this header to define WebCoreScrollbarAlwaysOn.
extern const int WebCoreScrollbarAlwaysOn;
+struct WebDynamicScrollBarsViewPrivate;
@interface WebDynamicScrollBarsView : NSScrollView {
- int hScroll; // FIXME: Should be WebCore::ScrollbarMode if this was an ObjC++ header.
- int vScroll; // Ditto.
- BOOL hScrollModeLocked;
- BOOL vScrollModeLocked;
- BOOL suppressLayout;
- BOOL suppressScrollers;
- BOOL inUpdateScrollers;
- BOOL verticallyPinnedByPreviousWheelEvent;
- BOOL horizontallyPinnedByPreviousWheelEvent;
- unsigned inUpdateScrollersLayoutPass;
+@private
+ struct WebDynamicScrollBarsViewPrivate *_private;
+
+#ifndef __OBJC2__
+ // We need to pad the class out to its former size. See <rdar://problem/7814899> for more information.
+ char padding[16];
+#endif
}
// This was originally added for Safari's benefit, but Safari has not used it for a long time.
// Perhaps it can be removed.
- (void)setAllowsHorizontalScrolling:(BOOL)flag;
+
+// Determines whether the scrollers should be drawn outside of the content (as in normal scroll views)
+// or should overlap the content.
+- (void)setAllowsScrollersToOverlapContent:(BOOL)flag;
+
+// These methods hide the scrollers in a way that does not prevent scrolling.
+- (void)setAlwaysHideHorizontalScroller:(BOOL)flag;
+- (void)setAlwaysHideVerticalScroller:(BOOL)flag;
+
+// These methods return YES if the scrollers are visible, or if the only reason that they are not
+// visible is that they have been suppressed by setAlwaysHideHorizontal/VerticalScroller:.
+- (BOOL)horizontalScrollingAllowed;
+- (BOOL)verticalScrollingAllowed;
@end
diff --git a/WebKit/mac/WebView/WebDynamicScrollBarsView.mm b/WebKit/mac/WebView/WebDynamicScrollBarsView.mm
index b4424e1..74439dd 100644
--- a/WebKit/mac/WebView/WebDynamicScrollBarsView.mm
+++ b/WebKit/mac/WebView/WebDynamicScrollBarsView.mm
@@ -1,29 +1,26 @@
/*
- * Copyright (C) 2005, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2008, 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
*/
#import "WebDynamicScrollBarsViewInternal.h"
@@ -41,31 +38,150 @@ using namespace WebCore;
// FIXME: <rdar://problem/5898985> Mail expects a constant of this name to exist.
const int WebCoreScrollbarAlwaysOn = ScrollbarAlwaysOn;
+#ifndef __OBJC2__
+// In <rdar://problem/7814899> we saw crashes because WebDynamicScrollBarsView increased in size, breaking ABI compatiblity.
+COMPILE_ASSERT(sizeof(WebDynamicScrollBarsView) == 0x8c, WebDynamicScrollBarsView_is_expected_size);
+#endif
+
+struct WebDynamicScrollBarsViewPrivate {
+ unsigned inUpdateScrollersLayoutPass;
+
+ WebCore::ScrollbarMode hScroll;
+ WebCore::ScrollbarMode vScroll;
+
+ bool hScrollModeLocked;
+ bool vScrollModeLocked;
+ bool suppressLayout;
+ bool suppressScrollers;
+ bool inUpdateScrollers;
+ bool verticallyPinnedByPreviousWheelEvent;
+ bool horizontallyPinnedByPreviousWheelEvent;
+
+ bool allowsScrollersToOverlapContent;
+ bool alwaysHideHorizontalScroller;
+ bool alwaysHideVerticalScroller;
+ bool horizontalScrollingAllowedButScrollerHidden;
+ bool verticalScrollingAllowedButScrollerHidden;
+};
+
@implementation WebDynamicScrollBarsView
+- (id)initWithFrame:(NSRect)frame
+{
+ if (!(self = [super initWithFrame:frame]))
+ return nil;
+
+ _private = new WebDynamicScrollBarsViewPrivate;
+ memset(_private, 0, sizeof(WebDynamicScrollBarsViewPrivate));
+ return self;
+}
+
+- (id)initWithCoder:(NSCoder *)aDecoder
+{
+ if (!(self = [super initWithCoder:aDecoder]))
+ return nil;
+
+ _private = new WebDynamicScrollBarsViewPrivate;
+ memset(_private, 0, sizeof(WebDynamicScrollBarsViewPrivate));
+ return self;
+}
+
+- (void)dealloc
+{
+ delete _private;
+ [super dealloc];
+}
+
+- (void)finalize
+{
+ delete _private;
+ [super finalize];
+}
+
- (void)setAllowsHorizontalScrolling:(BOOL)flag
{
- if (hScrollModeLocked)
+ if (_private->hScrollModeLocked)
+ return;
+ if (flag && _private->hScroll == ScrollbarAlwaysOff)
+ _private->hScroll = ScrollbarAuto;
+ else if (!flag && _private->hScroll != ScrollbarAlwaysOff)
+ _private->hScroll = ScrollbarAlwaysOff;
+ [self updateScrollers];
+}
+
+- (void)setAllowsScrollersToOverlapContent:(BOOL)flag
+{
+ if (_private->allowsScrollersToOverlapContent == flag)
return;
- if (flag && hScroll == ScrollbarAlwaysOff)
- hScroll = ScrollbarAuto;
- else if (!flag && hScroll != ScrollbarAlwaysOff)
- hScroll = ScrollbarAlwaysOff;
+
+ _private->allowsScrollersToOverlapContent = flag;
+
+ [[self contentView] setFrame:[self contentViewFrame]];
+ [[self documentView] setNeedsLayout:YES];
+ [[self documentView] layout];
+}
+
+- (void)setAlwaysHideHorizontalScroller:(BOOL)shouldBeHidden
+{
+ if (_private->alwaysHideHorizontalScroller == shouldBeHidden)
+ return;
+
+ _private->alwaysHideHorizontalScroller = shouldBeHidden;
+ [self updateScrollers];
+}
+
+- (void)setAlwaysHideVerticalScroller:(BOOL)shouldBeHidden
+{
+ if (_private->alwaysHideVerticalScroller == shouldBeHidden)
+ return;
+
+ _private->alwaysHideVerticalScroller = shouldBeHidden;
[self updateScrollers];
}
+- (BOOL)horizontalScrollingAllowed
+{
+ return _private->horizontalScrollingAllowedButScrollerHidden || [self hasHorizontalScroller];
+}
+
+- (BOOL)verticalScrollingAllowed
+{
+ return _private->verticalScrollingAllowedButScrollerHidden || [self hasVerticalScroller];
+}
+
@end
@implementation WebDynamicScrollBarsView (WebInternal)
-- (void)setSuppressLayout:(BOOL)flag;
+- (NSRect)contentViewFrame
{
- suppressLayout = flag;
+ NSRect frame = [[self contentView] frame];
+
+ if ([self hasHorizontalScroller])
+ frame.size.height = (_private->allowsScrollersToOverlapContent ? NSMaxY([[self horizontalScroller] frame]) : NSMinY([[self horizontalScroller] frame]));
+ if ([self hasVerticalScroller])
+ frame.size.width = (_private->allowsScrollersToOverlapContent ? NSMaxX([[self verticalScroller] frame]) : NSMinX([[self verticalScroller] frame]));
+ return frame;
+}
+
+- (void)tile
+{
+ [super tile];
+
+ // [super tile] sets the contentView size so that it does not overlap with the scrollers,
+ // we want to re-set the contentView to overlap scrollers before displaying.
+ if (_private->allowsScrollersToOverlapContent)
+ [[self contentView] setFrame:[self contentViewFrame]];
+}
+
+- (void)setSuppressLayout:(BOOL)flag
+{
+ _private->suppressLayout = flag;
}
- (void)setScrollBarsSuppressed:(BOOL)suppressed repaintOnUnsuppress:(BOOL)repaint
{
- suppressScrollers = suppressed;
+ _private->suppressScrollers = suppressed;
// This code was originally changes for a Leopard performance imporvement. We decided to
// ifdef it to fix correctness issues on Tiger documented in <rdar://problem/5441823>.
@@ -74,13 +190,13 @@ const int WebCoreScrollbarAlwaysOn = ScrollbarAlwaysOn;
[[self verticalScroller] setNeedsDisplay:NO];
[[self horizontalScroller] setNeedsDisplay:NO];
}
-
+
if (!suppressed && repaint)
[super reflectScrolledClipView:[self contentView]];
#else
- if (suppressed || repaint) {
- [[self verticalScroller] setNeedsDisplay: !suppressed];
- [[self horizontalScroller] setNeedsDisplay: !suppressed];
+ if (suppressed || repaint) {
+ [[self verticalScroller] setNeedsDisplay:!suppressed];
+ [[self horizontalScroller] setNeedsDisplay:!suppressed];
}
#endif
}
@@ -94,42 +210,50 @@ static const unsigned cMaxUpdateScrollbarsPass = 2;
// If we came in here with the view already needing a layout, then go ahead and do that
// first. (This will be the common case, e.g., when the page changes due to window resizing for example).
// This layout will not re-enter updateScrollers and does not count towards our max layout pass total.
- if (!suppressLayout && !suppressScrollers && [documentView isKindOfClass:[WebHTMLView class]]) {
+ if (!_private->suppressLayout && !_private->suppressScrollers && [documentView isKindOfClass:[WebHTMLView class]]) {
WebHTMLView* htmlView = (WebHTMLView*)documentView;
if ([htmlView _needsLayout]) {
- inUpdateScrollers = YES;
+ _private->inUpdateScrollers = YES;
[(id <WebDocumentView>)documentView layout];
- inUpdateScrollers = NO;
+ _private->inUpdateScrollers = NO;
}
}
BOOL hasHorizontalScroller = [self hasHorizontalScroller];
BOOL hasVerticalScroller = [self hasVerticalScroller];
-
+
BOOL newHasHorizontalScroller = hasHorizontalScroller;
BOOL newHasVerticalScroller = hasVerticalScroller;
-
+
if (!documentView) {
newHasHorizontalScroller = NO;
newHasVerticalScroller = NO;
- }
+ }
- if (hScroll != ScrollbarAuto)
- newHasHorizontalScroller = (hScroll == ScrollbarAlwaysOn);
- if (vScroll != ScrollbarAuto)
- newHasVerticalScroller = (vScroll == ScrollbarAlwaysOn);
-
- if (!documentView || suppressLayout || suppressScrollers || (hScroll != ScrollbarAuto && vScroll != ScrollbarAuto)) {
- inUpdateScrollers = YES;
+ if (_private->hScroll != ScrollbarAuto)
+ newHasHorizontalScroller = (_private->hScroll == ScrollbarAlwaysOn);
+ if (_private->vScroll != ScrollbarAuto)
+ newHasVerticalScroller = (_private->vScroll == ScrollbarAlwaysOn);
+
+ if (!documentView || _private->suppressLayout || _private->suppressScrollers || (_private->hScroll != ScrollbarAuto && _private->vScroll != ScrollbarAuto)) {
+ _private->horizontalScrollingAllowedButScrollerHidden = newHasHorizontalScroller && _private->alwaysHideHorizontalScroller;
+ if (_private->horizontalScrollingAllowedButScrollerHidden)
+ newHasHorizontalScroller = NO;
+
+ _private->verticalScrollingAllowedButScrollerHidden = newHasVerticalScroller && _private->alwaysHideVerticalScroller;
+ if (_private->verticalScrollingAllowedButScrollerHidden)
+ newHasVerticalScroller = NO;
+
+ _private->inUpdateScrollers = YES;
if (hasHorizontalScroller != newHasHorizontalScroller)
[self setHasHorizontalScroller:newHasHorizontalScroller];
if (hasVerticalScroller != newHasVerticalScroller)
[self setHasVerticalScroller:newHasVerticalScroller];
- if (suppressScrollers) {
+ if (_private->suppressScrollers) {
[[self verticalScroller] setNeedsDisplay:NO];
[[self horizontalScroller] setNeedsDisplay:NO];
}
- inUpdateScrollers = NO;
+ _private->inUpdateScrollers = NO;
return;
}
@@ -138,43 +262,60 @@ static const unsigned cMaxUpdateScrollbarsPass = 2;
NSSize documentSize = [documentView frame].size;
NSSize visibleSize = [self documentVisibleRect].size;
NSSize frameSize = [self frame].size;
-
- if (hScroll == ScrollbarAuto) {
+
+ // When in HiDPI with a scale factor > 1, the visibleSize and frameSize may be non-integral values,
+ // while the documentSize (set by WebCore) will be integral. Round up the non-integral sizes so that
+ // the mismatch won't cause unwanted scrollbars to appear. This can result in slightly cut off content,
+ // but it will always be less than one pixel, which should not be noticeable.
+ visibleSize.width = ceilf(visibleSize.width);
+ visibleSize.height = ceilf(visibleSize.height);
+ frameSize.width = ceilf(frameSize.width);
+ frameSize.height = ceilf(frameSize.height);
+
+ if (_private->hScroll == ScrollbarAuto) {
newHasHorizontalScroller = documentSize.width > visibleSize.width;
- if (newHasHorizontalScroller && !inUpdateScrollersLayoutPass && documentSize.height <= frameSize.height && documentSize.width <= frameSize.width)
+ if (newHasHorizontalScroller && !_private->inUpdateScrollersLayoutPass && documentSize.height <= frameSize.height && documentSize.width <= frameSize.width)
newHasHorizontalScroller = NO;
}
-
- if (vScroll == ScrollbarAuto) {
+
+ if (_private->vScroll == ScrollbarAuto) {
newHasVerticalScroller = documentSize.height > visibleSize.height;
- if (newHasVerticalScroller && !inUpdateScrollersLayoutPass && documentSize.height <= frameSize.height && documentSize.width <= frameSize.width)
+ if (newHasVerticalScroller && !_private->inUpdateScrollersLayoutPass && documentSize.height <= frameSize.height && documentSize.width <= frameSize.width)
newHasVerticalScroller = NO;
}
// Unless in ScrollbarsAlwaysOn mode, if we ever turn one scrollbar off, always turn the other one off too.
// Never ever try to both gain/lose a scrollbar in the same pass.
- if (!newHasHorizontalScroller && hasHorizontalScroller && vScroll != ScrollbarAlwaysOn)
+ if (!newHasHorizontalScroller && hasHorizontalScroller && _private->vScroll != ScrollbarAlwaysOn)
newHasVerticalScroller = NO;
- if (!newHasVerticalScroller && hasVerticalScroller && hScroll != ScrollbarAlwaysOn)
+ if (!newHasVerticalScroller && hasVerticalScroller && _private->hScroll != ScrollbarAlwaysOn)
+ newHasHorizontalScroller = NO;
+
+ _private->horizontalScrollingAllowedButScrollerHidden = newHasHorizontalScroller && _private->alwaysHideHorizontalScroller;
+ if (_private->horizontalScrollingAllowedButScrollerHidden)
newHasHorizontalScroller = NO;
+ _private->verticalScrollingAllowedButScrollerHidden = newHasVerticalScroller && _private->alwaysHideVerticalScroller;
+ if (_private->verticalScrollingAllowedButScrollerHidden)
+ newHasVerticalScroller = NO;
+
if (hasHorizontalScroller != newHasHorizontalScroller) {
- inUpdateScrollers = YES;
+ _private->inUpdateScrollers = YES;
[self setHasHorizontalScroller:newHasHorizontalScroller];
- inUpdateScrollers = NO;
+ _private->inUpdateScrollers = NO;
needsLayout = YES;
}
if (hasVerticalScroller != newHasVerticalScroller) {
- inUpdateScrollers = YES;
+ _private->inUpdateScrollers = YES;
[self setHasVerticalScroller:newHasVerticalScroller];
- inUpdateScrollers = NO;
+ _private->inUpdateScrollers = NO;
needsLayout = YES;
}
- if (needsLayout && inUpdateScrollersLayoutPass < cMaxUpdateScrollbarsPass &&
+ if (needsLayout && _private->inUpdateScrollersLayoutPass < cMaxUpdateScrollbarsPass &&
[documentView conformsToProtocol:@protocol(WebDocumentView)]) {
- inUpdateScrollersLayoutPass++;
+ _private->inUpdateScrollersLayoutPass++;
[(id <WebDocumentView>)documentView setNeedsLayout:YES];
[(id <WebDocumentView>)documentView layout];
NSSize newDocumentSize = [documentView frame].size;
@@ -184,7 +325,7 @@ static const unsigned cMaxUpdateScrollbarsPass = 2;
// Recur manually.
[self updateScrollers];
}
- inUpdateScrollersLayoutPass--;
+ _private->inUpdateScrollersLayoutPass--;
}
}
@@ -192,6 +333,10 @@ static const unsigned cMaxUpdateScrollbarsPass = 2;
- (void)reflectScrolledClipView:(NSClipView *)clipView
{
if (clipView == [self contentView]) {
+ // Prevent appearance of trails because of overlapping views
+ if (_private->allowsScrollersToOverlapContent)
+ [self setDrawsBackground:NO];
+
// FIXME: This hack here prevents infinite recursion that takes place when we
// gyrate between having a vertical scroller and not having one. A reproducible
// case is clicking on the "the Policy Routing text" link at
@@ -199,7 +344,7 @@ static const unsigned cMaxUpdateScrollbarsPass = 2;
// The underlying cause is some problem in the NSText machinery, but I was not
// able to pin it down.
NSGraphicsContext *currentContext = [NSGraphicsContext currentContext];
- if (!inUpdateScrollers && (!currentContext || [currentContext isDrawingToScreen]))
+ if (!_private->inUpdateScrollers && (!currentContext || [currentContext isDrawingToScreen]))
[self updateScrollers];
}
@@ -207,15 +352,15 @@ static const unsigned cMaxUpdateScrollbarsPass = 2;
// ifdef it to fix correctness issues on Tiger documented in <rdar://problem/5441823>.
#ifndef BUILDING_ON_TIGER
// Update the scrollers if they're not being suppressed.
- if (!suppressScrollers)
+ if (!_private->suppressScrollers)
[super reflectScrolledClipView:clipView];
#else
- [super reflectScrolledClipView:clipView];
-
- // Validate the scrollers if they're being suppressed.
- if (suppressScrollers) {
- [[self verticalScroller] setNeedsDisplay: NO];
- [[self horizontalScroller] setNeedsDisplay: NO];
+ [super reflectScrolledClipView:clipView];
+
+ // Validate the scrollers if they're being suppressed.
+ if (_private->suppressScrollers) {
+ [[self verticalScroller] setNeedsDisplay:NO];
+ [[self horizontalScroller] setNeedsDisplay:NO];
}
#endif
@@ -231,28 +376,28 @@ static const unsigned cMaxUpdateScrollbarsPass = 2;
- (BOOL)allowsHorizontalScrolling
{
- return hScroll != ScrollbarAlwaysOff;
+ return _private->hScroll != ScrollbarAlwaysOff;
}
- (BOOL)allowsVerticalScrolling
{
- return vScroll != ScrollbarAlwaysOff;
+ return _private->vScroll != ScrollbarAlwaysOff;
}
- (void)scrollingModes:(WebCore::ScrollbarMode*)hMode vertical:(WebCore::ScrollbarMode*)vMode
{
- *hMode = static_cast<ScrollbarMode>(hScroll);
- *vMode = static_cast<ScrollbarMode>(vScroll);
+ *hMode = _private->hScroll;
+ *vMode = _private->vScroll;
}
- (ScrollbarMode)horizontalScrollingMode
{
- return static_cast<ScrollbarMode>(hScroll);
+ return _private->hScroll;
}
- (ScrollbarMode)verticalScrollingMode
{
- return static_cast<ScrollbarMode>(vScroll);
+ return _private->vScroll;
}
- (void)setHorizontalScrollingMode:(ScrollbarMode)horizontalMode andLock:(BOOL)lock
@@ -274,13 +419,13 @@ static const unsigned cMaxUpdateScrollbarsPass = 2;
- (void)setScrollingModes:(ScrollbarMode)horizontalMode vertical:(ScrollbarMode)verticalMode andLock:(BOOL)lock
{
BOOL update = NO;
- if (verticalMode != vScroll && !vScrollModeLocked) {
- vScroll = verticalMode;
+ if (verticalMode != _private->vScroll && !_private->vScrollModeLocked) {
+ _private->vScroll = verticalMode;
update = YES;
}
- if (horizontalMode != hScroll && !hScrollModeLocked) {
- hScroll = horizontalMode;
+ if (horizontalMode != _private->hScroll && !_private->hScrollModeLocked) {
+ _private->hScroll = horizontalMode;
update = YES;
}
@@ -293,27 +438,27 @@ static const unsigned cMaxUpdateScrollbarsPass = 2;
- (void)setHorizontalScrollingModeLocked:(BOOL)locked
{
- hScrollModeLocked = locked;
+ _private->hScrollModeLocked = locked;
}
- (void)setVerticalScrollingModeLocked:(BOOL)locked
{
- vScrollModeLocked = locked;
+ _private->vScrollModeLocked = locked;
}
- (void)setScrollingModesLocked:(BOOL)locked
{
- hScrollModeLocked = vScrollModeLocked = locked;
+ _private->hScrollModeLocked = _private->vScrollModeLocked = locked;
}
- (BOOL)horizontalScrollingModeLocked
{
- return hScrollModeLocked;
+ return _private->hScrollModeLocked;
}
- (BOOL)verticalScrollingModeLocked
{
- return vScrollModeLocked;
+ return _private->vScrollModeLocked;
}
- (BOOL)autoforwardsScrollWheelEvents
@@ -336,7 +481,7 @@ static const unsigned cMaxUpdateScrollbarsPass = 2;
return;
}
- if (isLatchingEvent && !verticallyPinnedByPreviousWheelEvent) {
+ if (isLatchingEvent && !_private->verticallyPinnedByPreviousWheelEvent) {
double verticalPosition = [[self verticalScroller] doubleValue];
if ((deltaY >= 0.0 && verticalPosition == 0.0) || (deltaY <= 0.0 && verticalPosition == 1.0))
return;
@@ -347,7 +492,7 @@ static const unsigned cMaxUpdateScrollbarsPass = 2;
return;
}
- if (isLatchingEvent && !horizontallyPinnedByPreviousWheelEvent) {
+ if (isLatchingEvent && !_private->horizontallyPinnedByPreviousWheelEvent) {
double horizontalPosition = [[self horizontalScroller] doubleValue];
if ((deltaX >= 0.0 && horizontalPosition == 0.0) || (deltaX <= 0.0 && horizontalPosition == 1.0))
return;
@@ -364,8 +509,8 @@ static const unsigned cMaxUpdateScrollbarsPass = 2;
double verticalPosition = [[self verticalScroller] doubleValue];
double horizontalPosition = [[self horizontalScroller] doubleValue];
- verticallyPinnedByPreviousWheelEvent = (verticalPosition == 0.0 || verticalPosition == 1.0);
- horizontallyPinnedByPreviousWheelEvent = (horizontalPosition == 0.0 || horizontalPosition == 1.0);
+ _private->verticallyPinnedByPreviousWheelEvent = (verticalPosition == 0.0 || verticalPosition == 1.0);
+ _private->horizontallyPinnedByPreviousWheelEvent = (horizontalPosition == 0.0 || horizontalPosition == 1.0);
}
[self release];
diff --git a/WebKit/mac/WebView/WebDynamicScrollBarsViewInternal.h b/WebKit/mac/WebView/WebDynamicScrollBarsViewInternal.h
index 312cf9d..40be88d 100644
--- a/WebKit/mac/WebView/WebDynamicScrollBarsViewInternal.h
+++ b/WebKit/mac/WebView/WebDynamicScrollBarsViewInternal.h
@@ -53,4 +53,6 @@
- (void)updateScrollers;
- (void)setSuppressLayout:(BOOL)flag;
+// Calculate the appropriate frame for the contentView based on allowsScrollersToOverlapContent.
+- (NSRect)contentViewFrame;
@end
diff --git a/WebKit/mac/WebView/WebFrame.h b/WebKit/mac/WebView/WebFrame.h
index a6cdebb..64015fd 100644
--- a/WebKit/mac/WebView/WebFrame.h
+++ b/WebKit/mac/WebView/WebFrame.h
@@ -213,5 +213,4 @@
bridge between the WebKit and JavaScriptCore APIs.
*/
- (JSGlobalContextRef)globalContext;
-
@end
diff --git a/WebKit/mac/WebView/WebFrame.mm b/WebKit/mac/WebView/WebFrame.mm
index 41d7e01..fb6d69c 100644
--- a/WebKit/mac/WebView/WebFrame.mm
+++ b/WebKit/mac/WebView/WebFrame.mm
@@ -39,11 +39,11 @@
#import "WebChromeClient.h"
#import "WebDataSourceInternal.h"
#import "WebDocumentLoaderMac.h"
+#import "WebDynamicScrollBarsView.h"
#import "WebFrameLoaderClient.h"
#import "WebFrameViewInternal.h"
#import "WebHTMLView.h"
#import "WebHTMLViewInternal.h"
-#import "WebIconFetcherInternal.h"
#import "WebKitStatisticsPrivate.h"
#import "WebKitVersionChecks.h"
#import "WebNSObjectExtras.h"
@@ -59,12 +59,13 @@
#import <WebCore/Chrome.h>
#import <WebCore/ColorMac.h>
#import <WebCore/DOMImplementation.h>
-#import <WebCore/DocLoader.h>
+#import <WebCore/CachedResourceLoader.h>
#import <WebCore/DocumentFragment.h>
#import <WebCore/EventHandler.h>
#import <WebCore/EventNames.h>
#import <WebCore/Frame.h>
#import <WebCore/FrameLoader.h>
+#import <WebCore/FrameLoaderStateMachine.h>
#import <WebCore/FrameTree.h>
#import <WebCore/GraphicsContext.h>
#import <WebCore/HTMLFrameOwnerElement.h>
@@ -73,6 +74,7 @@
#import <WebCore/LegacyWebArchive.h>
#import <WebCore/Page.h>
#import <WebCore/PluginData.h>
+#import <WebCore/PrintContext.h>
#import <WebCore/RenderLayer.h>
#import <WebCore/RenderPart.h>
#import <WebCore/RenderView.h>
@@ -87,6 +89,7 @@
#import <WebCore/htmlediting.h>
#import <WebCore/markup.h>
#import <WebCore/visible_units.h>
+#import <WebKitSystemInterface.h>
#import <runtime/JSLock.h>
#import <runtime/JSObject.h>
#import <runtime/JSValue.h>
@@ -193,6 +196,20 @@ EditableLinkBehavior core(WebKitEditableLinkBehavior editableLinkBehavior)
return EditableLinkDefaultBehavior;
}
+WebCore::EditingBehaviorType core(WebKitEditingBehavior behavior)
+{
+ switch (behavior) {
+ case WebKitEditingMacBehavior:
+ return WebCore::EditingMacBehavior;
+ case WebKitEditingWinBehavior:
+ return WebCore::EditingWindowsBehavior;
+ case WebKitEditingUnixBehavior:
+ return WebCore::EditingUnixBehavior;
+ }
+ ASSERT_NOT_REACHED();
+ return WebCore::EditingMacBehavior;
+}
+
TextDirectionSubmenuInclusionBehavior core(WebTextDirectionSubmenuInclusionBehavior behavior)
{
switch (behavior) {
@@ -269,6 +286,11 @@ WebView *getWebView(WebFrame *webFrame)
return [self _createFrameWithPage:ownerElement->document()->frame()->page() frameName:name frameView:frameView ownerElement:ownerElement];
}
+- (BOOL)_isIncludedInWebKitStatistics
+{
+ return _private && _private->includedInWebKitStatistics;
+}
+
- (void)_attachScriptDebugger
{
ScriptController* scriptController = _private->coreFrame->script();
@@ -308,6 +330,11 @@ WebView *getWebView(WebFrame *webFrame)
_private = [[WebFramePrivate alloc] init];
+ // Set includedInWebKitStatistics before calling WebFrameView _setWebFrame, since
+ // it calls WebFrame _isIncludedInWebKitStatistics.
+ if ((_private->includedInWebKitStatistics = [[v class] shouldIncludeInWebKitStatistics]))
+ ++WebFrameCount;
+
if (fv) {
[_private setWebFrameView:fv];
[fv _setWebFrame:self];
@@ -315,8 +342,6 @@ WebView *getWebView(WebFrame *webFrame)
_private->shouldCreateRenderers = YES;
- ++WebFrameCount;
-
return self;
}
@@ -371,7 +396,7 @@ WebView *getWebView(WebFrame *webFrame)
Frame* coreFrame = _private->coreFrame;
for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) {
if (Document* document = frame->document())
- document->removeMarkers(DocumentMarker::Grammar);
+ document->markers()->removeMarkers(DocumentMarker::Grammar);
}
}
#endif
@@ -381,7 +406,7 @@ WebView *getWebView(WebFrame *webFrame)
Frame* coreFrame = _private->coreFrame;
for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) {
if (Document* document = frame->document())
- document->removeMarkers(DocumentMarker::Spelling);
+ document->markers()->removeMarkers(DocumentMarker::Spelling);
}
}
@@ -463,21 +488,6 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
return dataSource(_private->coreFrame->loader()->documentLoader());
}
-- (void)_addData:(NSData *)data
-{
- Document* document = _private->coreFrame->document();
-
- // Document may be nil if the part is about to redirect
- // as a result of JS executing during load, i.e. one frame
- // changing another's location before the frame's document
- // has been created.
- if (!document)
- return;
-
- document->setShouldCreateRenderers(_private->shouldCreateRenderers);
- _private->coreFrame->loader()->addData((const char *)[data bytes], [data length]);
-}
-
- (NSString *)_stringWithDocumentTypeStringAndMarkupString:(NSString *)markupString
{
return _private->coreFrame->documentTypeString() + markupString;
@@ -505,7 +515,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
- (NSString *)_selectedString
{
- return _private->coreFrame->displayStringModifiedByEncoding(_private->coreFrame->selectedText());
+ return _private->coreFrame->displayStringModifiedByEncoding(_private->coreFrame->editor()->selectedText());
}
- (NSString *)_stringForRange:(DOMRange *)range
@@ -521,16 +531,57 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
return [[[NSString alloc] initWithCharactersNoCopy:buf length:length freeWhenDone:YES] autorelease];
}
+- (BOOL)_shouldFlattenCompositingLayers:(CGContextRef)context
+{
+ // -currentContextDrawingToScreen returns YES for bitmap contexts.
+ BOOL isPrinting = ![NSGraphicsContext currentContextDrawingToScreen];
+ if (isPrinting)
+ return YES;
+
+ if (!WKCGContextIsBitmapContext(context))
+ return NO;
+
+ // If we're drawing into a bitmap, we might be snapshotting, or drawing into a layer-backed view.
+ if ([getWebView(self) _usesDocumentViews]) {
+ id documentView = [_private->webFrameView documentView];
+ if ([documentView isKindOfClass:[WebHTMLView class]] && [(WebHTMLView *)documentView _web_isDrawingIntoLayer])
+ return NO;
+ }
+
+ return [getWebView(self) _includesFlattenedCompositingLayersWhenDrawingToBitmap];
+}
+
- (void)_drawRect:(NSRect)rect contentsOnly:(BOOL)contentsOnly
{
- PlatformGraphicsContext* platformContext = static_cast<PlatformGraphicsContext*>([[NSGraphicsContext currentContext] graphicsPort]);
ASSERT([[NSGraphicsContext currentContext] isFlipped]);
- GraphicsContext context(platformContext);
+
+ CGContextRef ctx = static_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]);
+ GraphicsContext context(ctx);
+
+ FrameView* view = _private->coreFrame->view();
+
+ bool shouldFlatten = false;
+ if (Frame* parentFrame = _private->coreFrame->tree()->parent()) {
+ // For subframes, we need to inherit the paint behavior from our parent
+ FrameView* parentView = parentFrame ? parentFrame->view() : 0;
+ if (parentView)
+ shouldFlatten = parentView->paintBehavior() & PaintBehaviorFlattenCompositingLayers;
+ } else
+ shouldFlatten = [self _shouldFlattenCompositingLayers:ctx];
+
+ PaintBehavior oldBehavior = PaintBehaviorNormal;
+ if (shouldFlatten) {
+ oldBehavior = view->paintBehavior();
+ view->setPaintBehavior(oldBehavior | PaintBehaviorFlattenCompositingLayers);
+ }
if (contentsOnly)
_private->coreFrame->view()->paintContents(&context, enclosingIntRect(rect));
else
_private->coreFrame->view()->paint(&context, enclosingIntRect(rect));
+
+ if (shouldFlatten)
+ view->setPaintBehavior(oldBehavior);
}
// Used by pagination code called from AppKit when a standalone web page is printed.
@@ -559,22 +610,16 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
if (!documentView)
return pages;
- float currPageHeight = printHeight;
- float docHeight = root->layer()->height();
float docWidth = root->layer()->width();
- float printWidth = docWidth/printWidthScaleFactor;
-
- // We need to give the part the opportunity to adjust the page height at each step.
- for (float i = 0; i < docHeight; i += currPageHeight) {
- float proposedBottom = min(docHeight, i + printHeight);
- view->adjustPageHeight(&proposedBottom, i, proposedBottom, i);
- currPageHeight = max(1.0f, proposedBottom - i);
- for (float j = 0; j < docWidth; j += printWidth) {
- NSValue* val = [NSValue valueWithRect: NSMakeRect(j, i, printWidth, currPageHeight)];
- [pages addObject: val];
- }
- }
-
+ float printWidth = docWidth / printWidthScaleFactor;
+
+ PrintContext printContext(_private->coreFrame);
+ printContext.computePageRectsWithPageSize(FloatSize(printWidth, printHeight), true);
+
+ const Vector<IntRect>& pageRects = printContext.pageRects();
+ const size_t pageCount = pageRects.size();
+ for (size_t pageNumber = 0; pageNumber < pageCount; ++pageNumber)
+ [pages addObject: [NSValue valueWithRect: NSRect(pageRects[pageNumber])]];
return pages;
}
@@ -612,7 +657,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
return @"";
JSLock lock(SilenceAssertionsOnly);
- return String(result.toString(_private->coreFrame->script()->globalObject(mainThreadNormalWorld())->globalExec()));
+ return ustringToString(result.toString(_private->coreFrame->script()->globalObject(mainThreadNormalWorld())->globalExec()));
}
- (NSRect)_caretRectAtNode:(DOMNode *)node offset:(int)offset affinity:(NSSelectionAffinity)affinity
@@ -623,7 +668,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
- (NSRect)_firstRectForDOMRange:(DOMRange *)range
{
- return _private->coreFrame->firstRectForRange(core(range));
+ return _private->coreFrame->editor()->firstRectForRange(core(range));
}
- (void)_scrollDOMRangeToVisible:(DOMRange *)range
@@ -676,7 +721,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
- (TextGranularity)_selectionGranularity
{
- return _private->coreFrame->selectionGranularity();
+ return _private->coreFrame->selection()->granularity();
}
- (NSRange)_convertToNSRange:(Range *)range
@@ -749,7 +794,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
- (DOMRange *)_markDOMRange
{
- return kit(_private->coreFrame->mark().toNormalizedRange().get());
+ return kit(_private->coreFrame->editor()->mark().toNormalizedRange().get());
}
// Given proposedRange, returns an extended range that includes adjacent whitespace that should
@@ -785,64 +830,6 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
return kit(range.get());
}
-// Determines whether whitespace needs to be added around aString to preserve proper spacing and
-// punctuation when it’s inserted into the receiver’s text over charRange. Returns by reference
-// in beforeString and afterString any whitespace that should be added, unless either or both are
-// nil. Both are returned as nil if aString is nil or if smart insertion and deletion are disabled.
-- (void)_smartInsertForString:(NSString *)pasteString replacingRange:(DOMRange *)rangeToReplace beforeString:(NSString **)beforeString afterString:(NSString **)afterString
-{
- // give back nil pointers in case of early returns
- if (beforeString)
- *beforeString = nil;
- if (afterString)
- *afterString = nil;
-
- // inspect destination
- Node *startContainer = core([rangeToReplace startContainer]);
- Node *endContainer = core([rangeToReplace endContainer]);
-
- Position startPos(startContainer, [rangeToReplace startOffset]);
- Position endPos(endContainer, [rangeToReplace endOffset]);
-
- VisiblePosition startVisiblePos = VisiblePosition(startPos, VP_DEFAULT_AFFINITY);
- VisiblePosition endVisiblePos = VisiblePosition(endPos, VP_DEFAULT_AFFINITY);
-
- // this check also ensures startContainer, startPos, endContainer, and endPos are non-null
- if (startVisiblePos.isNull() || endVisiblePos.isNull())
- return;
-
- bool addLeadingSpace = startPos.leadingWhitespacePosition(VP_DEFAULT_AFFINITY, true).isNull() && !isStartOfParagraph(startVisiblePos);
- if (addLeadingSpace)
- if (UChar previousChar = startVisiblePos.previous().characterAfter())
- addLeadingSpace = !isCharacterSmartReplaceExempt(previousChar, true);
-
- bool addTrailingSpace = endPos.trailingWhitespacePosition(VP_DEFAULT_AFFINITY, true).isNull() && !isEndOfParagraph(endVisiblePos);
- if (addTrailingSpace)
- if (UChar thisChar = endVisiblePos.characterAfter())
- addTrailingSpace = !isCharacterSmartReplaceExempt(thisChar, false);
-
- // inspect source
- bool hasWhitespaceAtStart = false;
- bool hasWhitespaceAtEnd = false;
- unsigned pasteLength = [pasteString length];
- if (pasteLength > 0) {
- NSCharacterSet *whiteSet = [NSCharacterSet whitespaceAndNewlineCharacterSet];
-
- if ([whiteSet characterIsMember:[pasteString characterAtIndex:0]]) {
- hasWhitespaceAtStart = YES;
- }
- if ([whiteSet characterIsMember:[pasteString characterAtIndex:(pasteLength - 1)]]) {
- hasWhitespaceAtEnd = YES;
- }
- }
-
- // issue the verdict
- if (beforeString && addLeadingSpace && !hasWhitespaceAtStart)
- *beforeString = @" ";
- if (afterString && addTrailingSpace && !hasWhitespaceAtEnd)
- *afterString = @" ";
-}
-
- (DOMDocumentFragment *)_documentFragmentWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString
{
if (!_private->coreFrame || !_private->coreFrame->document())
@@ -878,7 +865,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
return;
TypingCommand::insertParagraphSeparatorInQuotedContent(_private->coreFrame->document());
- _private->coreFrame->revealSelection(ScrollAlignment::alignToEdgeIfNeeded);
+ _private->coreFrame->selection()->revealSelection(ScrollAlignment::alignToEdgeIfNeeded);
}
- (VisiblePosition)_visiblePositionForPoint:(NSPoint)point
@@ -914,16 +901,16 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
- (DOMCSSStyleDeclaration *)_typingStyle
{
- if (!_private->coreFrame || !_private->coreFrame->typingStyle())
+ if (!_private->coreFrame || !_private->coreFrame->selection()->typingStyle())
return nil;
- return kit(_private->coreFrame->typingStyle()->copy().get());
+ return kit(_private->coreFrame->selection()->typingStyle()->copy().get());
}
- (void)_setTypingStyle:(DOMCSSStyleDeclaration *)style withUndoAction:(EditAction)undoAction
{
if (!_private->coreFrame)
return;
- _private->coreFrame->computeAndSetTypingStyle(core(style), undoAction);
+ _private->coreFrame->editor()->computeAndSetTypingStyle(core(style), undoAction);
}
- (void)_dragSourceEndedAt:(NSPoint)windowLoc operation:(NSDragOperation)operation
@@ -943,7 +930,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
- (BOOL)_canProvideDocumentSource
{
Frame* frame = _private->coreFrame;
- String mimeType = frame->loader()->responseMIMEType();
+ String mimeType = frame->loader()->writer()->mimeType();
PluginData* pluginData = frame->page() ? frame->page()->pluginData() : 0;
if (WebCore::DOMImplementation::isTextMIMEType(mimeType) ||
@@ -961,15 +948,13 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
return [self _canProvideDocumentSource];
}
-- (void)_receivedData:(NSData *)data textEncodingName:(NSString *)textEncodingName
+- (void)_commitData:(NSData *)data
{
- // Set the encoding. This only needs to be done once, but it's harmless to do it again later.
- String encoding = _private->coreFrame->loader()->documentLoader()->overrideEncoding();
- bool userChosen = !encoding.isNull();
- if (encoding.isNull())
- encoding = textEncodingName;
- _private->coreFrame->loader()->setEncoding(encoding, userChosen);
- [self _addData:data];
+ // FIXME: This really should be a setting.
+ Document* document = _private->coreFrame->document();
+ document->setShouldCreateRenderers(_private->shouldCreateRenderers);
+
+ _private->coreFrame->loader()->documentLoader()->commitData((const char *)[data bytes], [data length]);
}
@end
@@ -999,7 +984,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
RenderObject* bodyRenderer = body->renderer();
if (!bodyRenderer)
return nil;
- Color color = bodyRenderer->style()->backgroundColor();
+ Color color = bodyRenderer->style()->visitedDependentColor(CSSPropertyBackgroundColor);
if (!color.isValid())
return nil;
return nsColor(color);
@@ -1013,7 +998,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
- (BOOL)_firstLayoutDone
{
- return _private->coreFrame->loader()->firstLayoutDone();
+ return _private->coreFrame->loader()->stateMachine()->firstLayoutDone();
}
- (WebFrameLoadType)_loadType
@@ -1044,14 +1029,6 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
return _private->coreFrame->domWindow()->pendingUnloadEventListeners();
}
-- (WebIconFetcher *)fetchApplicationIcon:(id)target
- selector:(SEL)selector
-{
- return [WebIconFetcher _fetchApplicationIconForFrame:self
- target:target
- selector:selector];
-}
-
- (void)_setIsDisconnected:(bool)isDisconnected
{
_private->coreFrame->setIsDisconnected(isDisconnected);
@@ -1154,13 +1131,31 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
return controller->numberOfActiveAnimations();
}
+- (void) _suspendAnimations
+{
+ Frame* frame = core(self);
+ if (!frame)
+ return;
+
+ frame->animation()->suspendAnimations();
+}
+
+- (void) _resumeAnimations
+{
+ Frame* frame = core(self);
+ if (!frame)
+ return;
+
+ frame->animation()->resumeAnimations();
+}
+
- (void)_replaceSelectionWithFragment:(DOMDocumentFragment *)fragment selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle
{
if (_private->coreFrame->selection()->isNone() || !fragment)
return;
applyCommand(ReplaceSelectionCommand::create(_private->coreFrame->document(), core(fragment), selectReplacement, smartReplace, matchStyle));
- _private->coreFrame->revealSelection(ScrollAlignment::alignToEdgeIfNeeded);
+ _private->coreFrame->selection()->revealSelection(ScrollAlignment::alignToEdgeIfNeeded);
}
- (void)_replaceSelectionWithText:(NSString *)text selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace
@@ -1175,6 +1170,64 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
[self _replaceSelectionWithFragment:fragment selectReplacement:selectReplacement smartReplace:smartReplace matchStyle:NO];
}
+// Determines whether whitespace needs to be added around aString to preserve proper spacing and
+// punctuation when it's inserted into the receiver's text over charRange. Returns by reference
+// in beforeString and afterString any whitespace that should be added, unless either or both are
+// nil. Both are returned as nil if aString is nil or if smart insertion and deletion are disabled.
+- (void)_smartInsertForString:(NSString *)pasteString replacingRange:(DOMRange *)rangeToReplace beforeString:(NSString **)beforeString afterString:(NSString **)afterString
+{
+ // give back nil pointers in case of early returns
+ if (beforeString)
+ *beforeString = nil;
+ if (afterString)
+ *afterString = nil;
+
+ // inspect destination
+ Node *startContainer = core([rangeToReplace startContainer]);
+ Node *endContainer = core([rangeToReplace endContainer]);
+
+ Position startPos(startContainer, [rangeToReplace startOffset]);
+ Position endPos(endContainer, [rangeToReplace endOffset]);
+
+ VisiblePosition startVisiblePos = VisiblePosition(startPos, VP_DEFAULT_AFFINITY);
+ VisiblePosition endVisiblePos = VisiblePosition(endPos, VP_DEFAULT_AFFINITY);
+
+ // this check also ensures startContainer, startPos, endContainer, and endPos are non-null
+ if (startVisiblePos.isNull() || endVisiblePos.isNull())
+ return;
+
+ bool addLeadingSpace = startPos.leadingWhitespacePosition(VP_DEFAULT_AFFINITY, true).isNull() && !isStartOfParagraph(startVisiblePos);
+ if (addLeadingSpace)
+ if (UChar previousChar = startVisiblePos.previous().characterAfter())
+ addLeadingSpace = !isCharacterSmartReplaceExempt(previousChar, true);
+
+ bool addTrailingSpace = endPos.trailingWhitespacePosition(VP_DEFAULT_AFFINITY, true).isNull() && !isEndOfParagraph(endVisiblePos);
+ if (addTrailingSpace)
+ if (UChar thisChar = endVisiblePos.characterAfter())
+ addTrailingSpace = !isCharacterSmartReplaceExempt(thisChar, false);
+
+ // inspect source
+ bool hasWhitespaceAtStart = false;
+ bool hasWhitespaceAtEnd = false;
+ unsigned pasteLength = [pasteString length];
+ if (pasteLength > 0) {
+ NSCharacterSet *whiteSet = [NSCharacterSet whitespaceAndNewlineCharacterSet];
+
+ if ([whiteSet characterIsMember:[pasteString characterAtIndex:0]]) {
+ hasWhitespaceAtStart = YES;
+ }
+ if ([whiteSet characterIsMember:[pasteString characterAtIndex:(pasteLength - 1)]]) {
+ hasWhitespaceAtEnd = YES;
+ }
+ }
+
+ // issue the verdict
+ if (beforeString && addLeadingSpace && !hasWhitespaceAtStart)
+ *beforeString = @" ";
+ if (afterString && addTrailingSpace && !hasWhitespaceAtEnd)
+ *afterString = @" ";
+}
+
- (NSMutableDictionary *)_cacheabilityDictionary
{
NSMutableDictionary *result = [NSMutableDictionary dictionary];
@@ -1184,7 +1237,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
if (documentLoader && !documentLoader->mainDocumentError().isNull())
[result setObject:(NSError *)documentLoader->mainDocumentError() forKey:WebFrameMainDocumentError];
- if (frameLoader->containsPlugins())
+ if (frameLoader->subframeLoader()->containsPlugins())
[result setObject:[NSNumber numberWithBool:YES] forKey:WebFrameHasPlugins];
if (DOMWindow* domWindow = _private->coreFrame->domWindow()) {
@@ -1217,7 +1270,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
{
if (!_private->coreFrame)
return YES;
- return SecurityOrigin::canLoad(URL, String(), _private->coreFrame->document());
+ return _private->coreFrame->document()->securityOrigin()->canDisplay(URL);
}
- (NSString *)_stringByEvaluatingJavaScriptFromString:(NSString *)string withGlobalObject:(JSObjectRef)globalObjectRef inScriptWorld:(WebScriptWorld *)world
@@ -1245,7 +1298,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
return @"";
JSLock lock(SilenceAssertionsOnly);
- return String(result.toString(anyWorldGlobalObject->globalExec()));
+ return ustringToString(result.toString(anyWorldGlobalObject->globalExec()));
}
- (JSGlobalContextRef)_globalContextForScriptWorld:(WebScriptWorld *)world
@@ -1259,6 +1312,56 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
return toGlobalRef(coreFrame->script()->globalObject(coreWorld)->globalExec());
}
+- (void)setAllowsScrollersToOverlapContent:(BOOL)flag
+{
+ ASSERT([[[self frameView] _scrollView] isKindOfClass:[WebDynamicScrollBarsView class]]);
+ [(WebDynamicScrollBarsView *)[[self frameView] _scrollView] setAllowsScrollersToOverlapContent:flag];
+}
+
+- (void)setAlwaysHideHorizontalScroller:(BOOL)flag
+{
+ ASSERT([[[self frameView] _scrollView] isKindOfClass:[WebDynamicScrollBarsView class]]);
+ [(WebDynamicScrollBarsView *)[[self frameView] _scrollView] setAlwaysHideHorizontalScroller:flag];
+}
+- (void)setAlwaysHideVerticalScroller:(BOOL)flag
+{
+ ASSERT([[[self frameView] _scrollView] isKindOfClass:[WebDynamicScrollBarsView class]]);
+ [(WebDynamicScrollBarsView *)[[self frameView] _scrollView] setAlwaysHideVerticalScroller:flag];
+}
+
+- (void)setAccessibleName:(NSString *)name
+{
+#if HAVE(ACCESSIBILITY)
+ if (!AXObjectCache::accessibilityEnabled())
+ return;
+
+ RenderView* root = toRenderView(_private->coreFrame->document()->renderer());
+ if (!root)
+ return;
+
+ AccessibilityObject* rootObject = _private->coreFrame->document()->axObjectCache()->getOrCreate(root);
+ String strName(name);
+ rootObject->setAccessibleName(strName);
+#endif
+}
+
+- (NSString*)_layerTreeAsText
+{
+ Frame* coreFrame = _private->coreFrame;
+ if (!coreFrame)
+ return @"";
+
+ return coreFrame->layerTreeAsText();
+}
+
+- (BOOL)hasSpellingMarker:(int)from length:(int)length
+{
+ Frame* coreFrame = _private->coreFrame;
+ if (!coreFrame)
+ return NO;
+ return coreFrame->editor()->selectionStartHasSpellingMarkerFor(from, length);
+}
+
@end
@implementation WebFrame
@@ -1276,14 +1379,19 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
- (void)dealloc
{
+ if (_private && _private->includedInWebKitStatistics)
+ --WebFrameCount;
+
[_private release];
- --WebFrameCount;
+
[super dealloc];
}
- (void)finalize
{
- --WebFrameCount;
+ if (_private && _private->includedInWebKitStatistics)
+ --WebFrameCount;
+
[super finalize];
}
@@ -1292,7 +1400,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
Frame* coreFrame = _private->coreFrame;
if (!coreFrame)
return nil;
- return coreFrame->tree()->name();
+ return coreFrame->tree()->uniqueName();
}
- (WebFrameView *)frameView
diff --git a/WebKit/mac/WebView/WebFrameInternal.h b/WebKit/mac/WebView/WebFrameInternal.h
index 0dcf19b..8cdc272 100644
--- a/WebKit/mac/WebView/WebFrameInternal.h
+++ b/WebKit/mac/WebView/WebFrameInternal.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -30,7 +30,6 @@
#import "WebFramePrivate.h"
#import "WebPreferencesPrivate.h"
-
#import <WebCore/EditAction.h>
#import <WebCore/FrameLoaderTypes.h>
#import <WebCore/SelectionController.h>
@@ -71,6 +70,7 @@ WebView *kit(WebCore::Page*);
WebCore::EditableLinkBehavior core(WebKitEditableLinkBehavior);
WebCore::TextDirectionSubmenuInclusionBehavior core(WebTextDirectionSubmenuInclusionBehavior);
+WebCore::EditingBehaviorType core(WebKitEditingBehavior);
WebView *getWebView(WebFrame *webFrame);
@@ -81,6 +81,7 @@ WebView *getWebView(WebFrame *webFrame);
WebScriptDebugger* scriptDebugger;
id internalLoadDelegate;
BOOL shouldCreateRenderers;
+ BOOL includedInWebKitStatistics;
}
@end
@@ -90,12 +91,14 @@ WebView *getWebView(WebFrame *webFrame);
@interface WebFrame (WebInternal)
-+ (void)_createMainFrameWithPage:(WebCore::Page*)page frameName:(const WebCore::String&)name frameView:(WebFrameView *)frameView;
-+ (PassRefPtr<WebCore::Frame>)_createSubframeWithOwnerElement:(WebCore::HTMLFrameOwnerElement*)ownerElement frameName:(const WebCore::String&)name frameView:(WebFrameView *)frameView;
++ (void)_createMainFrameWithPage:(WebCore::Page*)page frameName:(const WTF::String&)name frameView:(WebFrameView *)frameView;
++ (PassRefPtr<WebCore::Frame>)_createSubframeWithOwnerElement:(WebCore::HTMLFrameOwnerElement*)ownerElement frameName:(const WTF::String&)name frameView:(WebFrameView *)frameView;
- (id)_initWithWebFrameView:(WebFrameView *)webFrameView webView:(WebView *)webView;
- (void)_clearCoreFrame;
+- (BOOL)_isIncludedInWebKitStatistics;
+
- (void)_updateBackgroundAndUpdatesWhileOffscreen;
- (void)_setInternalLoadDelegate:(id)internalLoadDelegate;
- (id)_internalLoadDelegate;
@@ -138,7 +141,6 @@ WebView *getWebView(WebFrame *webFrame);
- (id)_accessibilityTree;
- (DOMRange *)_rangeByAlteringCurrentSelection:(WebCore::SelectionController::EAlteration)alteration direction:(WebCore::SelectionController::EDirection)direction granularity:(WebCore::TextGranularity)granularity;
-- (void)_smartInsertForString:(NSString *)pasteString replacingRange:(DOMRange *)charRangeToReplace beforeString:(NSString **)beforeString afterString:(NSString **)afterString;
- (NSRange)_convertToNSRange:(WebCore::Range*)range;
- (DOMRange *)_convertNSRangeToDOMRange:(NSRange)range;
- (NSRange)_convertDOMRangeToNSRange:(DOMRange *)range;
@@ -160,7 +162,7 @@ WebView *getWebView(WebFrame *webFrame);
- (BOOL)_canProvideDocumentSource;
- (BOOL)_canSaveAsWebArchive;
-- (void)_receivedData:(NSData *)data textEncodingName:(NSString *)textEncodingName;
+- (void)_commitData:(NSData *)data;
@end
diff --git a/WebKit/mac/WebView/WebFramePrivate.h b/WebKit/mac/WebView/WebFramePrivate.h
index 462686f..b0cb0f3 100644
--- a/WebKit/mac/WebView/WebFramePrivate.h
+++ b/WebKit/mac/WebView/WebFramePrivate.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -37,7 +37,7 @@
@class DOMDocumentFragment;
@class DOMNode;
-@class WebIconFetcher;
+@class DOMRange;
@class WebScriptObject;
@class WebScriptWorld;
@@ -84,10 +84,7 @@ typedef enum {
- (BOOL)_isDisplayingStandaloneImage;
-- (unsigned) _pendingFrameUnloadEventCount;
-
-- (WebIconFetcher *)fetchApplicationIcon:(id)target
- selector:(SEL)selector;
+- (unsigned)_pendingFrameUnloadEventCount;
- (void)_setIsDisconnected:(bool)isDisconnected;
- (void)_setExcludeFromTextSearch:(bool)exclude;
@@ -111,13 +108,38 @@ typedef enum {
- (BOOL)_pauseSVGAnimation:(NSString*)elementId onSMILNode:(DOMNode *)node atTime:(NSTimeInterval)time;
// Returns the total number of currently running animations (includes both CSS transitions and CSS animations).
-- (unsigned) _numberOfActiveAnimations;
+- (unsigned)_numberOfActiveAnimations;
+
+// Suspend and resume animations (includes both CSS transitions and CSS animations).
+- (void)_suspendAnimations;
+- (void)_resumeAnimations;
- (void)_replaceSelectionWithFragment:(DOMDocumentFragment *)fragment selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle;
- (void)_replaceSelectionWithText:(NSString *)text selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
- (void)_replaceSelectionWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
+- (void)_smartInsertForString:(NSString *)pasteString replacingRange:(DOMRange *)rangeToReplace beforeString:(NSString **)beforeString afterString:(NSString **)afterString;
+
- (NSMutableDictionary *)_cacheabilityDictionary;
- (BOOL)_allowsFollowingLink:(NSURL *)URL;
+
+// Sets whether the scrollbars, if any, should be shown inside the document's border
+// (thus overlapping some content) or outside the webView's border (default behavior).
+// Changing this flag changes the size of the contentView and maintains the size of the frameView.
+- (void)setAllowsScrollersToOverlapContent:(BOOL)flag;
+
+// Sets if the scrollbar is always hidden, regardless of other scrollbar visibility settings.
+// This does not affect the scrollability of the document.
+- (void)setAlwaysHideHorizontalScroller:(BOOL)flag;
+- (void)setAlwaysHideVerticalScroller:(BOOL)flag;
+
+// Sets the name presented to accessibility clients for the web area object.
+- (void)setAccessibleName:(NSString *)name;
+
+- (NSString*)_layerTreeAsText;
+
+// Returns whether there is a spelling marker in the specified range of the focused node.
+- (BOOL)hasSpellingMarker:(int)location length:(int)length;
+
@end
diff --git a/WebKit/mac/WebView/WebFrameView.mm b/WebKit/mac/WebView/WebFrameView.mm
index b6b1941..0db12c0 100644
--- a/WebKit/mac/WebView/WebFrameView.mm
+++ b/WebKit/mac/WebView/WebFrameView.mm
@@ -55,7 +55,7 @@
#import "WebViewInternal.h"
#import "WebViewPrivate.h"
#import <Foundation/NSURLRequest.h>
-#import <WebCore/BackForwardList.h>
+#import <WebCore/BackForwardListImpl.h>
#import <WebCore/DragController.h>
#import <WebCore/EventHandler.h>
#import <WebCore/Frame.h>
@@ -92,6 +92,7 @@ enum {
@public
WebFrame *webFrame;
WebDynamicScrollBarsView *frameScrollView;
+ BOOL includedInWebKitStatistics;
}
@end
@@ -187,6 +188,11 @@ enum {
// Not retained because the WebView owns the WebFrame, which owns the WebFrameView.
_private->webFrame = webFrame;
+
+ if (!_private->includedInWebKitStatistics && [webFrame _isIncludedInWebKitStatistics]) {
+ _private->includedInWebKitStatistics = YES;
+ ++WebFrameViewCount;
+ }
}
- (WebDynamicScrollBarsView *)_scrollView
@@ -286,15 +292,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
@implementation WebFrameView
-- initWithCoder:(NSCoder *)decoder
-{
- // Older nibs containing WebViews will also contain WebFrameViews. We need to keep track of
- // their count also to match the decrement in -dealloc.
- ++WebFrameViewCount;
- return [super initWithCoder:decoder];
-}
-
-- initWithFrame:(NSRect)frame
+- (id)initWithFrame:(NSRect)frame
{
self = [super initWithFrame:frame];
if (!self)
@@ -350,14 +348,13 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
// This works together with our becomeFirstResponder and setNextKeyView overrides.
[super setNextKeyView:scrollView];
- ++WebFrameViewCount;
-
return self;
}
- (void)dealloc
{
- --WebFrameViewCount;
+ if (_private && _private->includedInWebKitStatistics)
+ --WebFrameViewCount;
[_private release];
_private = nil;
@@ -367,14 +364,16 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
- (void)finalize
{
- --WebFrameViewCount;
+ if (_private && _private->includedInWebKitStatistics)
+ --WebFrameViewCount;
[super finalize];
}
- (WebFrame *)webFrame
{
- return _private->webFrame;
+ // This method can be called beneath -[NSView dealloc] after _private has been cleared.
+ return _private ? _private->webFrame : nil;
}
- (void)setAllowsScrolling:(BOOL)flag
@@ -534,7 +533,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
{
if ([self _scrollOverflowInDirection:ScrollUp granularity:ScrollByDocument])
return YES;
- if (![self _hasScrollBars])
+ if (![self _isScrollable])
return NO;
NSPoint point = [[[self _scrollView] documentView] frame].origin;
return [[self _contentView] _scrollTo:&point animate:YES];
@@ -544,7 +543,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
{
if ([self _scrollOverflowInDirection:ScrollDown granularity:ScrollByDocument])
return YES;
- if (![self _hasScrollBars])
+ if (![self _isScrollable])
return NO;
NSRect frame = [[[self _scrollView] documentView] frame];
NSPoint point = NSMakePoint(frame.origin.x, NSMaxY(frame));
@@ -556,7 +555,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
if ([self _scrollToBeginningOfDocument])
return;
- if (WebFrameView *child = [self _largestChildWithScrollBars]) {
+ if (WebFrameView *child = [self _largestScrollableChild]) {
if ([child _scrollToBeginningOfDocument])
return;
}
@@ -568,7 +567,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
if ([self _scrollToEndOfDocument])
return;
- if (WebFrameView *child = [self _largestChildWithScrollBars]) {
+ if (WebFrameView *child = [self _largestScrollableChild]) {
if ([child _scrollToEndOfDocument])
return;
}
@@ -621,8 +620,8 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
if ([self _scrollOverflowInDirection:up ? ScrollUp : ScrollDown granularity:ScrollByPage])
return YES;
- if (![self _hasScrollBars])
- return [[self _largestChildWithScrollBars] _pageVertically:up];
+ if (![self _isScrollable])
+ return [[self _largestScrollableChild] _pageVertically:up];
float delta = [self _verticalPageScrollDistance];
return [self _scrollVerticallyBy:up ? -delta : delta];
@@ -633,8 +632,8 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
if ([self _scrollOverflowInDirection:left ? ScrollLeft : ScrollRight granularity:ScrollByPage])
return YES;
- if (![self _hasScrollBars])
- return [[self _largestChildWithScrollBars] _pageHorizontally:left];
+ if (![self _isScrollable])
+ return [[self _largestScrollableChild] _pageHorizontally:left];
float delta = [self _horizontalPageScrollDistance];
return [self _scrollHorizontallyBy:left ? -delta : delta];
@@ -645,8 +644,8 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
if ([self _scrollOverflowInDirection:up ? ScrollUp : ScrollDown granularity:ScrollByLine])
return YES;
- if (![self _hasScrollBars])
- return [[self _largestChildWithScrollBars] _scrollLineVertically:up];
+ if (![self _isScrollable])
+ return [[self _largestScrollableChild] _scrollLineVertically:up];
float delta = [self _verticalKeyboardScrollDistance];
return [self _scrollVerticallyBy:up ? -delta : delta];
@@ -657,8 +656,8 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
if ([self _scrollOverflowInDirection:left ? ScrollLeft : ScrollRight granularity:ScrollByLine])
return YES;
- if (![self _hasScrollBars])
- return [[self _largestChildWithScrollBars] _scrollLineHorizontally:left];
+ if (![self _isScrollable])
+ return [[self _largestScrollableChild] _scrollLineHorizontally:left];
float delta = [self _horizontalKeyboardScrollDistance];
return [self _scrollHorizontallyBy:left ? -delta : delta];
@@ -709,7 +708,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
int index, count;
BOOL callSuper = YES;
Frame* coreFrame = [self _web_frame];
- BOOL maintainsBackForwardList = coreFrame && coreFrame->page()->backForwardList()->enabled() ? YES : NO;
+ BOOL maintainsBackForwardList = coreFrame && static_cast<BackForwardListImpl*>(coreFrame->page()->backForwardList())->enabled() ? YES : NO;
count = [characters length];
for (index = 0; index < count; ++index) {
@@ -732,7 +731,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
// Checking for a control will allow events to percolate
// correctly when the focus is on a form control and we
// are in full keyboard access mode.
- if ((![self allowsScrolling] && ![self _largestChildWithScrollBars]) || [self _firstResponderIsFormControl]) {
+ if ((![self allowsScrolling] && ![self _largestScrollableChild]) || [self _firstResponderIsFormControl]) {
callSuper = YES;
break;
}
@@ -744,7 +743,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
callSuper = NO;
break;
case NSPageUpFunctionKey:
- if (![self allowsScrolling] && ![self _largestChildWithScrollBars]) {
+ if (![self allowsScrolling] && ![self _largestScrollableChild]) {
callSuper = YES;
break;
}
@@ -752,7 +751,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
callSuper = NO;
break;
case NSPageDownFunctionKey:
- if (![self allowsScrolling] && ![self _largestChildWithScrollBars]) {
+ if (![self allowsScrolling] && ![self _largestScrollableChild]) {
callSuper = YES;
break;
}
@@ -760,7 +759,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
callSuper = NO;
break;
case NSHomeFunctionKey:
- if (![self allowsScrolling] && ![self _largestChildWithScrollBars]) {
+ if (![self allowsScrolling] && ![self _largestScrollableChild]) {
callSuper = YES;
break;
}
@@ -768,7 +767,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
callSuper = NO;
break;
case NSEndFunctionKey:
- if (![self allowsScrolling] && ![self _largestChildWithScrollBars]) {
+ if (![self allowsScrolling] && ![self _largestScrollableChild]) {
callSuper = YES;
break;
}
@@ -781,7 +780,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
callSuper = YES;
break;
}
- if ((![self allowsScrolling] && ![self _largestChildWithScrollBars]) ||
+ if ((![self allowsScrolling] && ![self _largestScrollableChild]) ||
[[[self window] firstResponder] isKindOfClass:[NSPopUpButton class]]) {
// Let arrow keys go through to pop up buttons
// <rdar://problem/3455910>: hitting up or down arrows when focus is on a
@@ -804,7 +803,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
callSuper = YES;
break;
}
- if ((![self allowsScrolling] && ![self _largestChildWithScrollBars]) ||
+ if ((![self allowsScrolling] && ![self _largestScrollableChild]) ||
[[[self window] firstResponder] isKindOfClass:[NSPopUpButton class]]) {
// Let arrow keys go through to pop up buttons
// <rdar://problem/3455910>: hitting up or down arrows when focus is on a
@@ -836,7 +835,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
[self _goBack];
} else {
// Now check scrolling related keys.
- if ((![self allowsScrolling] && ![self _largestChildWithScrollBars])) {
+ if ((![self allowsScrolling] && ![self _largestScrollableChild])) {
callSuper = YES;
break;
}
@@ -864,7 +863,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
[self _goForward];
} else {
// Now check scrolling related keys.
- if ((![self allowsScrolling] && ![self _largestChildWithScrollBars])) {
+ if ((![self allowsScrolling] && ![self _largestScrollableChild])) {
callSuper = YES;
break;
}
@@ -941,14 +940,52 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
return frame.size.height * frame.size.width;
}
+- (BOOL)_isScrollable
+{
+ WebDynamicScrollBarsView *scrollView = [self _scrollView];
+ return [scrollView horizontalScrollingAllowed] || [scrollView verticalScrollingAllowed];
+}
+
+- (WebFrameView *)_largestScrollableChild
+{
+ WebFrameView *largest = nil;
+ NSArray *frameChildren = [[self webFrame] childFrames];
+
+ unsigned i;
+ for (i=0; i < [frameChildren count]; i++) {
+ WebFrameView *childFrameView = [[frameChildren objectAtIndex:i] frameView];
+ WebFrameView *scrollableFrameView = [childFrameView _isScrollable] ? childFrameView : [childFrameView _largestScrollableChild];
+ if (!scrollableFrameView)
+ continue;
+
+ // Some ads lurk in child frames of zero width and height, see radar 4406994. These don't count as scrollable.
+ // Maybe someday we'll discover that this minimum area check should be larger, but this covers the known cases.
+ float area = [scrollableFrameView _area];
+ if (area < 1.0)
+ continue;
+
+ if (!largest || (area > [largest _area])) {
+ largest = scrollableFrameView;
+ }
+ }
+
+ return largest;
+}
+
- (BOOL)_hasScrollBars
{
+ // FIXME: This method was used by Safari 4.0.x and older versions, but has not been used by any other WebKit
+ // clients to my knowledge, and will not be used by future versions of Safari. It can probably be removed
+ // once we no longer need to keep nightly WebKit builds working with Safari 4.0.x and earlier.
NSScrollView *scrollView = [self _scrollView];
return [scrollView hasHorizontalScroller] || [scrollView hasVerticalScroller];
}
- (WebFrameView *)_largestChildWithScrollBars
{
+ // FIXME: This method was used by Safari 4.0.x and older versions, but has not been used by any other WebKit
+ // clients to my knowledge, and will not be used by future versions of Safari. It can probably be removed
+ // once we no longer need to keep nightly WebKit builds working with Safari 4.0.x and earlier.
WebFrameView *largest = nil;
NSArray *frameChildren = [[self webFrame] childFrames];
diff --git a/WebKit/mac/WebView/WebFrameViewPrivate.h b/WebKit/mac/WebView/WebFrameViewPrivate.h
index 47c053e..93d36ec 100644
--- a/WebKit/mac/WebView/WebFrameViewPrivate.h
+++ b/WebKit/mac/WebView/WebFrameViewPrivate.h
@@ -30,13 +30,19 @@
@interface WebFrameView (WebPrivate)
+// FIXME: This method was used by Safari 4.0.x and older versions, but has not been used by any other WebKit
+// clients to my knowledge, and will not be used by future versions of Safari. It can probably be removed
+// once we no longer need to keep nightly WebKit builds working with Safari 4.0.x and earlier.
/*!
@method _largestChildWithScrollBars
@abstract Of the child WebFrameViews that are displaying scroll bars, determines which has the largest area.
@result A child WebFrameView that is displaying scroll bars, or nil if none.
-*/
+ */
- (WebFrameView *)_largestChildWithScrollBars;
+// FIXME: This method was used by Safari 4.0.x and older versions, but has not been used by any other WebKit
+// clients to my knowledge, and will not be used by future versions of Safari. It can probably be removed
+// once we no longer need to keep nightly WebKit builds working with Safari 4.0.x and earlier.
/*!
@method _hasScrollBars
@result YES if at least one scroll bar is currently displayed
@@ -44,6 +50,21 @@
- (BOOL)_hasScrollBars;
/*!
+ @method _largestScrollableChild
+ @abstract Of the child WebFrameViews that allow scrolling, determines which has the largest area.
+ @result A child WebFrameView that is scrollable, or nil if none.
+ */
+- (WebFrameView *)_largestScrollableChild;
+
+/*!
+ @method _isScrollable
+ @result YES if scrolling is currently possible, whether or not scroll bars are currently showing. This
+ differs from -allowsScrolling in that the latter method only checks whether scrolling has been
+ explicitly disallowed via a call to setAllowsScrolling:NO.
+ */
+- (BOOL)_isScrollable;
+
+/*!
@method _contentView
@result The content view (NSClipView) of the WebFrameView's scroll view.
*/
diff --git a/WebKit/mac/WebView/WebGeolocationPosition.mm b/WebKit/mac/WebView/WebGeolocationPosition.mm
index 46f62c1..c92b7f1 100644
--- a/WebKit/mac/WebView/WebGeolocationPosition.mm
+++ b/WebKit/mac/WebView/WebGeolocationPosition.mm
@@ -83,4 +83,10 @@ GeolocationPosition* core(WebGeolocationPosition *position)
return self;
}
+- (void)dealloc
+{
+ [_internal release];
+ [super dealloc];
+}
+
@end
diff --git a/WebKit/mac/WebView/WebHTMLRepresentation.mm b/WebKit/mac/WebView/WebHTMLRepresentation.mm
index 41ce9f9..2699472 100644
--- a/WebKit/mac/WebView/WebHTMLRepresentation.mm
+++ b/WebKit/mac/WebView/WebHTMLRepresentation.mm
@@ -29,6 +29,7 @@
#import "WebHTMLRepresentation.h"
#import "DOMElementInternal.h"
+#import "DOMNodeInternal.h"
#import "DOMRangeInternal.h"
#import "WebArchive.h"
#import "WebBasePluginPackage.h"
@@ -66,6 +67,8 @@ using namespace HTMLNames;
WebDataSource *dataSource;
BOOL hasSentResponseToPlugin;
+ BOOL includedInWebKitStatistics;
+
id <WebPluginManualLoader> manualLoader;
NSView *pluginView;
}
@@ -110,23 +113,22 @@ static NSArray *concatenateArrays(NSArray *first, NSArray *second)
return staticSupportedImageMIMETypes.get();
}
-- init
+- (id)init
{
self = [super init];
if (!self)
return nil;
_private = [[WebHTMLRepresentationPrivate alloc] init];
-
- ++WebHTMLRepresentationCount;
-
+
return self;
}
- (void)dealloc
{
- --WebHTMLRepresentationCount;
-
+ if (_private && _private->includedInWebKitStatistics)
+ --WebHTMLRepresentationCount;
+
[_private release];
[super dealloc];
@@ -134,7 +136,8 @@ static NSArray *concatenateArrays(NSArray *first, NSArray *second)
- (void)finalize
{
- --WebHTMLRepresentationCount;
+ if (_private && _private->includedInWebKitStatistics)
+ --WebHTMLRepresentationCount;
[super finalize];
}
@@ -148,6 +151,11 @@ static NSArray *concatenateArrays(NSArray *first, NSArray *second)
- (void)setDataSource:(WebDataSource *)dataSource
{
_private->dataSource = dataSource;
+
+ if (!_private->includedInWebKitStatistics && [[dataSource webFrame] _isIncludedInWebKitStatistics]) {
+ _private->includedInWebKitStatistics = YES;
+ ++WebHTMLRepresentationCount;
+ }
}
- (BOOL)_isDisplayingWebArchive
@@ -158,23 +166,24 @@ static NSArray *concatenateArrays(NSArray *first, NSArray *second)
- (void)receivedData:(NSData *)data withDataSource:(WebDataSource *)dataSource
{
WebFrame *webFrame = [dataSource webFrame];
- if (webFrame) {
- if (!_private->pluginView)
- [webFrame _receivedData:data textEncodingName:[[_private->dataSource response] textEncodingName]];
-
- // If the document is a stand-alone media document, now is the right time to cancel the WebKit load
- Frame* coreFrame = core(webFrame);
- if (coreFrame->document() && coreFrame->document()->isMediaDocument())
- coreFrame->loader()->documentLoader()->cancelMainResourceLoad(coreFrame->loader()->client()->pluginWillHandleLoadError(coreFrame->loader()->documentLoader()->response()));
-
- if (_private->pluginView) {
- if (!_private->hasSentResponseToPlugin) {
- [_private->manualLoader pluginView:_private->pluginView receivedResponse:[dataSource response]];
- _private->hasSentResponseToPlugin = YES;
- }
-
- [_private->manualLoader pluginView:_private->pluginView receivedData:data];
+ if (!webFrame)
+ return;
+
+ if (!_private->pluginView)
+ [webFrame _commitData:data];
+
+ // If the document is a stand-alone media document, now is the right time to cancel the WebKit load
+ Frame* coreFrame = core(webFrame);
+ if (coreFrame->document()->isMediaDocument())
+ coreFrame->loader()->documentLoader()->cancelMainResourceLoad(coreFrame->loader()->client()->pluginWillHandleLoadError(coreFrame->loader()->documentLoader()->response()));
+
+ if (_private->pluginView) {
+ if (!_private->hasSentResponseToPlugin) {
+ [_private->manualLoader pluginView:_private->pluginView receivedResponse:[dataSource response]];
+ _private->hasSentResponseToPlugin = YES;
}
+
+ [_private->manualLoader pluginView:_private->pluginView receivedData:data];
}
}
@@ -187,25 +196,26 @@ static NSArray *concatenateArrays(NSArray *first, NSArray *second)
- (void)finishedLoadingWithDataSource:(WebDataSource *)dataSource
{
- WebFrame *frame = [dataSource webFrame];
+ WebFrame* webFrame = [dataSource webFrame];
if (_private->pluginView) {
[_private->manualLoader pluginViewFinishedLoading:_private->pluginView];
return;
}
- if (frame) {
- if (![self _isDisplayingWebArchive]) {
- // Telling the frame we received some data and passing nil as the data is our
- // way to get work done that is normally done when the first bit of data is
- // received, even for the case of a document with no data (like about:blank).
- [frame _receivedData:nil textEncodingName:[[_private->dataSource response] textEncodingName]];
- }
-
- WebView *webView = [frame webView];
- if ([webView isEditable])
- core(frame)->applyEditingStyleToBodyElement();
+ if (!webFrame)
+ return;
+
+ if (![self _isDisplayingWebArchive]) {
+ // Telling the frame we received some data and passing nil as the data is our
+ // way to get work done that is normally done when the first bit of data is
+ // received, even for the case of a document with no data (like about:blank).
+ [webFrame _commitData:nil];
}
+
+ WebView *webView = [webFrame webView];
+ if ([webView isEditable])
+ core(webFrame)->editor()->applyEditingStyleToBodyElement();
}
- (BOOL)canProvideDocumentSource
@@ -275,11 +285,11 @@ static HTMLFormElement* formElementFromDOMElement(DOMElement *element)
HTMLFormElement* formElement = formElementFromDOMElement(form);
if (!formElement)
return nil;
- Vector<HTMLFormControlElement*>& elements = formElement->formElements;
+ const Vector<HTMLFormControlElement*>& elements = formElement->associatedElements();
AtomicString targetName = name;
for (unsigned i = 0; i < elements.size(); i++) {
HTMLFormControlElement* elt = elements[i];
- if (elt->formControlName() == targetName)
+ if (elt->name() == targetName)
return kit(elt);
}
return nil;
@@ -295,15 +305,15 @@ static HTMLInputElement* inputElementFromDOMElement(DOMElement* element)
{
HTMLInputElement* inputElement = inputElementFromDOMElement(element);
return inputElement
- && inputElement->inputType() == HTMLInputElement::TEXT
+ && inputElement->isTextField()
+ && !inputElement->isPasswordField()
&& inputElement->autoComplete();
}
- (BOOL)elementIsPassword:(DOMElement *)element
{
HTMLInputElement* inputElement = inputElementFromDOMElement(element);
- return inputElement
- && inputElement->inputType() == HTMLInputElement::PASSWORD;
+ return inputElement && inputElement->isPasswordField();
}
- (DOMElement *)formForElement:(DOMElement *)element
@@ -314,7 +324,7 @@ static HTMLInputElement* inputElementFromDOMElement(DOMElement* element)
- (DOMElement *)currentForm
{
- return kit(core([_private->dataSource webFrame])->currentForm());
+ return kit(core([_private->dataSource webFrame])->selection()->currentForm());
}
- (NSArray *)controlsInForm:(DOMElement *)form
@@ -323,7 +333,7 @@ static HTMLInputElement* inputElementFromDOMElement(DOMElement* element)
if (!formElement)
return nil;
NSMutableArray *results = nil;
- Vector<HTMLFormControlElement*>& elements = formElement->formElements;
+ const Vector<HTMLFormControlElement*>& elements = formElement->associatedElements();
for (unsigned i = 0; i < elements.size(); i++) {
if (elements[i]->isEnumeratable()) { // Skip option elements, other duds
DOMElement* de = kit(elements[i]);
diff --git a/WebKit/mac/WebView/WebHTMLView.mm b/WebKit/mac/WebView/WebHTMLView.mm
index 54a177e..ec2473f 100644
--- a/WebKit/mac/WebView/WebHTMLView.mm
+++ b/WebKit/mac/WebView/WebHTMLView.mm
@@ -118,6 +118,7 @@
#import <dlfcn.h>
#import <limits>
#import <runtime/InitializeThreading.h>
+#import <wtf/Threading.h>
#if USE(ACCELERATED_COMPOSITING)
#import <QuartzCore/QuartzCore.h>
@@ -148,26 +149,54 @@ using namespace std;
- (BOOL)receivedUnhandledCommand;
@end
-static IMP oldSetCursorIMP = NULL;
+// if YES, do the standard NSView hit test (which can't give the right result when HTML overlaps a view)
+static BOOL forceNSViewHitTest;
-#ifdef BUILDING_ON_TIGER
+// if YES, do the "top WebHTMLView" hit test (which we'd like to do all the time but can't because of Java requirements [see bug 4349721])
+static BOOL forceWebHTMLViewHitTest;
+
+static WebHTMLView *lastHitView;
+
+static bool needsCursorRectsSupportAtPoint(NSWindow* window, NSPoint point)
+{
+ forceNSViewHitTest = YES;
+ NSView* view = [[window _web_borderView] hitTest:point];
+ forceNSViewHitTest = NO;
+
+ // WebHTMLView doesn't use cursor rects.
+ if ([view isKindOfClass:[WebHTMLView class]])
+ return false;
-static IMP oldResetCursorRectsIMP = NULL;
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ // Neither do NPAPI plug-ins.
+ if ([view isKindOfClass:[WebBaseNetscapePluginView class]])
+ return false;
+#endif
+
+ // Non-Web content, WebPDFView, and WebKit plug-ins use normal cursor handling.
+ return true;
+}
+
+#ifndef BUILDING_ON_TIGER
+
+static IMP oldSetCursorForMouseLocationIMP;
+
+// Overriding an internal method is a hack; <rdar://problem/7662987> tracks finding a better solution.
+static void setCursor(NSWindow *self, SEL cmd, NSPoint point)
+{
+ if (needsCursorRectsSupportAtPoint(self, point))
+ oldSetCursorForMouseLocationIMP(self, cmd, point);
+}
+
+#else
+
+static IMP oldResetCursorRectsIMP;
+static IMP oldSetCursorIMP;
static BOOL canSetCursor = YES;
static void resetCursorRects(NSWindow* self, SEL cmd)
{
- NSPoint point = [self mouseLocationOutsideOfEventStream];
- NSView* view = [[self _web_borderView] hitTest:point];
- if ([view isKindOfClass:[WebHTMLView class]]) {
- WebHTMLView *htmlView = (WebHTMLView*)view;
- NSPoint localPoint = [htmlView convertPoint:point fromView:nil];
- NSDictionary *dict = [htmlView elementAtPoint:localPoint allowShadowContent:NO];
- DOMElement *element = [dict objectForKey:WebElementDOMNodeKey];
- if (![element isKindOfClass:[DOMHTMLAppletElement class]] && ![element isKindOfClass:[DOMHTMLObjectElement class]] &&
- ![element isKindOfClass:[DOMHTMLEmbedElement class]])
- canSetCursor = NO;
- }
+ canSetCursor = needsCursorRectsSupportAtPoint(self, [self mouseLocationOutsideOfEventStream]);
oldResetCursorRectsIMP(self, cmd);
canSetCursor = YES;
}
@@ -178,23 +207,6 @@ static void setCursor(NSCursor* self, SEL cmd)
oldSetCursorIMP(self, cmd);
}
-#else
-
-static void setCursor(NSWindow* self, SEL cmd, NSPoint point)
-{
- NSView* view = [[self _web_borderView] hitTest:point];
- if ([view isKindOfClass:[WebHTMLView class]]) {
- WebHTMLView *htmlView = (WebHTMLView*)view;
- NSPoint localPoint = [htmlView convertPoint:point fromView:nil];
- NSDictionary *dict = [htmlView elementAtPoint:localPoint allowShadowContent:NO];
- DOMElement *element = [dict objectForKey:WebElementDOMNodeKey];
- if (![element isKindOfClass:[DOMHTMLAppletElement class]] && ![element isKindOfClass:[DOMHTMLObjectElement class]] &&
- ![element isKindOfClass:[DOMHTMLEmbedElement class]])
- return;
- }
- oldSetCursorIMP(self, cmd, point);
-}
-
#endif
extern "C" {
@@ -212,6 +224,7 @@ extern NSString *NSTextInputReplacementRangeAttributeName;
- (void)_recursive:(BOOL)recurse displayRectIgnoringOpacity:(NSRect)displayRect inContext:(NSGraphicsContext *)context topView:(BOOL)topView;
- (NSRect)_dirtyRect;
- (void)_setDrawsOwnDescendants:(BOOL)drawsOwnDescendants;
+- (BOOL)_drawnByAncestor;
- (void)_propagateDirtyRectsToOpaqueAncestors;
- (void)_windowChangedKeyState;
#if USE(ACCELERATED_COMPOSITING) && defined(BUILDING_ON_LEOPARD)
@@ -219,6 +232,42 @@ extern NSString *NSTextInputReplacementRangeAttributeName;
#endif
@end
+#if USE(ACCELERATED_COMPOSITING)
+static IMP oldSetNeedsDisplayInRectIMP;
+
+static void setNeedsDisplayInRect(NSView *self, SEL cmd, NSRect invalidRect)
+{
+ if (![self _drawnByAncestor]) {
+ oldSetNeedsDisplayInRectIMP(self, cmd, invalidRect);
+ return;
+ }
+
+ static Class webFrameViewClass = [WebFrameView class];
+ WebFrameView *enclosingWebFrameView = (WebFrameView *)self;
+ while (enclosingWebFrameView && ![enclosingWebFrameView isKindOfClass:webFrameViewClass])
+ enclosingWebFrameView = (WebFrameView *)[enclosingWebFrameView superview];
+
+ if (!enclosingWebFrameView) {
+ oldSetNeedsDisplayInRectIMP(self, cmd, invalidRect);
+ return;
+ }
+
+ Frame* coreFrame = core([enclosingWebFrameView webFrame]);
+ FrameView* frameView = coreFrame ? coreFrame->view() : 0;
+ if (!frameView || !frameView->isEnclosedInCompositingLayer()) {
+ oldSetNeedsDisplayInRectIMP(self, cmd, invalidRect);
+ return;
+ }
+
+ NSRect invalidRectInWebFrameViewCoordinates = [enclosingWebFrameView convertRect:invalidRect fromView:self];
+ IntRect invalidRectInFrameViewCoordinates(invalidRectInWebFrameViewCoordinates);
+ if (![enclosingWebFrameView isFlipped])
+ invalidRectInFrameViewCoordinates.setY(frameView->frameRect().size().height() - invalidRectInFrameViewCoordinates.bottom());
+
+ frameView->invalidateRect(invalidRectInFrameViewCoordinates);
+}
+#endif // USE(ACCELERATED_COMPOSITING)
+
@interface NSApplication (WebNSApplicationDetails)
- (void)speakString:(NSString *)string;
@end
@@ -241,13 +290,13 @@ extern NSString *NSTextInputReplacementRangeAttributeName;
// print in IE and Camino. This lets them use fewer sheets than they
// would otherwise, which is presumably why other browsers do this.
// Wide pages will be scaled down more than this.
-#define PrintingMinimumShrinkFactor 1.25f
+const float _WebHTMLViewPrintingMinimumShrinkFactor = 1.25;
// This number determines how small we are willing to reduce the page content
// in order to accommodate the widest line. If the page would have to be
// reduced smaller to make the widest line fit, we just clip instead (this
// behavior matches MacIE and Mozilla, at least)
-#define PrintingMaximumShrinkFactor 2.0f
+const float _WebHTMLViewPrintingMaximumShrinkFactor = 2;
// This number determines how short the last printed page of a multi-page print session
// can be before we try to shrink the scale in order to reduce the number of pages, and
@@ -294,14 +343,6 @@ extern NSString *NSTextInputReplacementRangeAttributeName;
@implementation WebCoreScrollView
@end
-// if YES, do the standard NSView hit test (which can't give the right result when HTML overlaps a view)
-static BOOL forceNSViewHitTest;
-
-// if YES, do the "top WebHTMLView" hit test (which we'd like to do all the time but can't because of Java requirements [see bug 4349721])
-static BOOL forceWebHTMLViewHitTest;
-
-static WebHTMLView *lastHitView;
-
// We need this to be able to safely reference the CachedImage for the promised drag data
static CachedResourceClient* promisedDataClient()
{
@@ -314,14 +355,12 @@ static CachedResourceClient* promisedDataClient()
- (DOMDocumentFragment *)_documentFragmentFromPasteboard:(NSPasteboard *)pasteboard inContext:(DOMRange *)context allowPlainText:(BOOL)allowPlainText;
- (NSString *)_plainTextFromPasteboard:(NSPasteboard *)pasteboard;
- (void)_pasteWithPasteboard:(NSPasteboard *)pasteboard allowPlainText:(BOOL)allowPlainText;
-- (void)_pasteAsPlainTextWithPasteboard:(NSPasteboard *)pasteboard;
- (void)_removeMouseMovedObserverUnconditionally;
- (void)_removeSuperviewObservers;
- (void)_removeWindowObservers;
- (BOOL)_shouldInsertFragment:(DOMDocumentFragment *)fragment replacingDOMRange:(DOMRange *)range givenAction:(WebViewInsertAction)action;
- (BOOL)_shouldInsertText:(NSString *)text replacingDOMRange:(DOMRange *)range givenAction:(WebViewInsertAction)action;
- (BOOL)_shouldReplaceSelectionWithText:(NSString *)text givenAction:(WebViewInsertAction)action;
-- (float)_calculatePrintHeight;
- (DOMRange *)_selectedRange;
- (BOOL)_shouldDeleteRange:(DOMRange *)range;
- (NSView *)_hitViewForEvent:(NSEvent *)event;
@@ -362,7 +401,7 @@ static CachedResourceClient* promisedDataClient()
#endif
@interface WebHTMLView (WebForwardDeclaration) // FIXME: Put this in a normal category and stop doing the forward declaration trick.
-- (void)_setPrinting:(BOOL)printing minimumPageWidth:(float)minPageWidth maximumPageWidth:(float)maxPageWidth adjustViewSize:(BOOL)adjustViewSize;
+- (void)_setPrinting:(BOOL)printing minimumPageWidth:(float)minPageWidth height:(float)minPageHeight maximumPageWidth:(float)maxPageWidth adjustViewSize:(BOOL)adjustViewSize paginateScreenContent:(BOOL)paginateScreenContent;
@end
@class NSTextInputContext;
@@ -404,10 +443,10 @@ struct WebHTMLViewInterpretKeyEventsParameters {
@interface WebHTMLViewPrivate : NSObject {
@public
BOOL closed;
- BOOL needsToApplyStyles;
BOOL ignoringMouseDraggedEvents;
BOOL printing;
BOOL avoidingPrintOrphan;
+ BOOL paginateScreenContent;
BOOL observingMouseMovedNotifications;
BOOL observingSuperviewNotifications;
BOOL observingWindowNotifications;
@@ -417,6 +456,7 @@ struct WebHTMLViewInterpretKeyEventsParameters {
#if USE(ACCELERATED_COMPOSITING)
NSView *layerHostingView;
+ BOOL drawingIntoLayer;
#endif
NSEvent *mouseDownEvent; // Kept after handling the event.
@@ -428,6 +468,9 @@ struct WebHTMLViewInterpretKeyEventsParameters {
BOOL exposeInputContext;
NSPoint lastScrollPosition;
+#ifndef BUILDING_ON_TIGER
+ BOOL inScrollPositionChanged;
+#endif
WebPluginController *pluginController;
@@ -487,23 +530,35 @@ static NSCellStateValue kit(TriState state)
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
+
+#ifndef BUILDING_ON_TIGER
+ if (!oldSetCursorForMouseLocationIMP) {
+ Method setCursorMethod = class_getInstanceMethod([NSWindow class], @selector(_setCursorForMouseLocation:));
+ ASSERT(setCursorMethod);
+ oldSetCursorForMouseLocationIMP = method_setImplementation(setCursorMethod, (IMP)setCursor);
+ ASSERT(oldSetCursorForMouseLocationIMP);
+ }
+
+#if USE(ACCELERATED_COMPOSITING)
+ if (!oldSetNeedsDisplayInRectIMP) {
+ Method setNeedsDisplayInRectMethod = class_getInstanceMethod([NSView class], @selector(setNeedsDisplayInRect:));
+ ASSERT(setNeedsDisplayInRectMethod);
+ oldSetNeedsDisplayInRectIMP = method_setImplementation(setNeedsDisplayInRectMethod, (IMP)setNeedsDisplayInRect);
+ ASSERT(oldSetNeedsDisplayInRectIMP);
+ }
+#endif // USE(ACCELERATED_COMPOSITING)
+#else // defined(BUILDING_ON_TIGER)
if (!oldSetCursorIMP) {
-#ifdef BUILDING_ON_TIGER
Method setCursorMethod = class_getInstanceMethod([NSCursor class], @selector(set));
-#else
- Method setCursorMethod = class_getInstanceMethod([NSWindow class], @selector(_setCursorForMouseLocation:));
-#endif
ASSERT(setCursorMethod);
-
oldSetCursorIMP = method_setImplementation(setCursorMethod, (IMP)setCursor);
ASSERT(oldSetCursorIMP);
}
-
-#ifdef BUILDING_ON_TIGER
if (!oldResetCursorRectsIMP) {
Method resetCursorRectsMethod = class_getInstanceMethod([NSWindow class], @selector(resetCursorRects));
ASSERT(resetCursorRectsMethod);
@@ -797,11 +852,12 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
[webView _setInsertionPasteboard:pasteboard];
DOMRange *range = [self _selectedRange];
+ Frame* coreFrame = core([self _frame]);
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
DOMDocumentFragment *fragment = [self _documentFragmentFromPasteboard:pasteboard inContext:range allowPlainText:allowPlainText];
if (fragment && [self _shouldInsertFragment:fragment replacingDOMRange:range givenAction:WebViewInsertActionPasted])
- [[self _frame] _replaceSelectionWithFragment:fragment selectReplacement:NO smartReplace:[self _canSmartReplaceWithPasteboard:pasteboard] matchStyle:NO];
+ coreFrame->editor()->pasteAsFragment(core(fragment), [self _canSmartReplaceWithPasteboard:pasteboard], false);
#else
// Mail is ignoring the frament passed to the delegate and creates a new one.
// We want to avoid creating the fragment twice.
@@ -809,31 +865,18 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
if ([self _shouldInsertFragment:nil replacingDOMRange:range givenAction:WebViewInsertActionPasted]) {
DOMDocumentFragment *fragment = [self _documentFragmentFromPasteboard:pasteboard inContext:range allowPlainText:allowPlainText];
if (fragment)
- [[self _frame] _replaceSelectionWithFragment:fragment selectReplacement:NO smartReplace:[self _canSmartReplaceWithPasteboard:pasteboard] matchStyle:NO];
+ coreFrame->editor()->pasteAsFragment(core(fragment), [self _canSmartReplaceWithPasteboard:pasteboard], false);
}
} else {
DOMDocumentFragment *fragment = [self _documentFragmentFromPasteboard:pasteboard inContext:range allowPlainText:allowPlainText];
if (fragment && [self _shouldInsertFragment:fragment replacingDOMRange:range givenAction:WebViewInsertActionPasted])
- [[self _frame] _replaceSelectionWithFragment:fragment selectReplacement:NO smartReplace:[self _canSmartReplaceWithPasteboard:pasteboard] matchStyle:NO];
+ coreFrame->editor()->pasteAsFragment(core(fragment), [self _canSmartReplaceWithPasteboard:pasteboard], false);
}
#endif
[webView _setInsertionPasteboard:nil];
[webView release];
}
-- (void)_pasteAsPlainTextWithPasteboard:(NSPasteboard *)pasteboard
-{
- WebView *webView = [[self _webView] retain];
- [webView _setInsertionPasteboard:pasteboard];
-
- NSString *text = [self _plainTextFromPasteboard:pasteboard];
- if ([self _shouldReplaceSelectionWithText:text givenAction:WebViewInsertActionPasted])
- [[self _frame] _replaceSelectionWithText:text selectReplacement:NO smartReplace:[self _canSmartReplaceWithPasteboard:pasteboard]];
-
- [webView _setInsertionPasteboard:nil];
- [webView release];
-}
-
- (void)_removeMouseMovedObserverUnconditionally
{
if (!_private || !_private->observingMouseMovedNotifications)
@@ -896,17 +939,6 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
return [self _shouldInsertText:text replacingDOMRange:[self _selectedRange] givenAction:action];
}
-// Calculate the vertical size of the view that fits on a single page
-- (float)_calculatePrintHeight
-{
- // Obtain the print info object for the current operation
- NSPrintInfo *pi = [[NSPrintOperation currentOperation] printInfo];
-
- // Calculate the page height in points
- NSSize paperSize = [pi paperSize];
- return paperSize.height - [pi topMargin] - [pi bottomMargin];
-}
-
- (DOMRange *)_selectedRange
{
Frame* coreFrame = core([self _frame]);
@@ -1012,7 +1044,7 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
- (void)_web_setPrintingModeRecursive
{
- [self _setPrinting:YES minimumPageWidth:0.0f maximumPageWidth:0.0f adjustViewSize:NO];
+ [self _setPrinting:YES minimumPageWidth:0 height:0 maximumPageWidth:0 adjustViewSize:NO paginateScreenContent:[self _isInScreenPaginationMode]];
#ifndef NDEBUG
_private->enumeratingSubviews = YES;
@@ -1024,7 +1056,7 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
unsigned count = [descendantWebHTMLViews count];
for (unsigned i = 0; i < count; ++i)
- [[descendantWebHTMLViews objectAtIndex:i] _setPrinting:YES minimumPageWidth:0.0f maximumPageWidth:0.0f adjustViewSize:NO];
+ [[descendantWebHTMLViews objectAtIndex:i] _setPrinting:YES minimumPageWidth:0 height:0 maximumPageWidth:0 adjustViewSize:NO paginateScreenContent:[self _isInScreenPaginationMode]];
[descendantWebHTMLViews release];
@@ -1035,7 +1067,7 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
- (void)_web_clearPrintingModeRecursive
{
- [self _setPrinting:NO minimumPageWidth:0.0f maximumPageWidth:0.0f adjustViewSize:NO];
+ [self _setPrinting:NO minimumPageWidth:0 height:0 maximumPageWidth:0 adjustViewSize:NO paginateScreenContent:[self _isInScreenPaginationMode]];
#ifndef NDEBUG
_private->enumeratingSubviews = YES;
@@ -1047,7 +1079,7 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
unsigned count = [descendantWebHTMLViews count];
for (unsigned i = 0; i < count; ++i)
- [[descendantWebHTMLViews objectAtIndex:i] _setPrinting:NO minimumPageWidth:0.0f maximumPageWidth:0.0f adjustViewSize:NO];
+ [[descendantWebHTMLViews objectAtIndex:i] _setPrinting:NO minimumPageWidth:0 height:0 maximumPageWidth:0 adjustViewSize:NO paginateScreenContent:[self _isInScreenPaginationMode]];
[descendantWebHTMLViews release];
@@ -1058,7 +1090,7 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
- (void)_web_setPrintingModeRecursiveAndAdjustViewSize
{
- [self _setPrinting:YES minimumPageWidth:0.0f maximumPageWidth:0.0f adjustViewSize:YES];
+ [self _setPrinting:YES minimumPageWidth:0 height:0 maximumPageWidth:0 adjustViewSize:YES paginateScreenContent:[self _isInScreenPaginationMode]];
#ifndef NDEBUG
_private->enumeratingSubviews = YES;
@@ -1070,7 +1102,7 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
unsigned count = [descendantWebHTMLViews count];
for (unsigned i = 0; i < count; ++i)
- [[descendantWebHTMLViews objectAtIndex:i] _setPrinting:YES minimumPageWidth:0.0f maximumPageWidth:0.0f adjustViewSize:YES];
+ [[descendantWebHTMLViews objectAtIndex:i] _setPrinting:YES minimumPageWidth:0 height:0 maximumPageWidth:0 adjustViewSize:YES paginateScreenContent:[self _isInScreenPaginationMode]];
[descendantWebHTMLViews release];
@@ -1169,8 +1201,15 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
NSPoint origin = [[self superview] bounds].origin;
if (!NSEqualPoints(_private->lastScrollPosition, origin)) {
if (Frame* coreFrame = core([self _frame])) {
- if (FrameView* coreView = coreFrame->view())
- coreView->scrollPositionChanged();
+ if (FrameView* coreView = coreFrame->view()) {
+#ifndef BUILDING_ON_TIGER
+ _private->inScrollPositionChanged = YES;
+#endif
+ coreView->scrollPositionChangedViaPlatformWidget();
+#ifndef BUILDING_ON_TIGER
+ _private->inScrollPositionChanged = NO;
+#endif
+ }
}
[_private->completionController endRevertingChange:NO moveLeft:NO];
@@ -1239,15 +1278,6 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
if (_private->enumeratingSubviews)
LOG(View, "A view of class %s was added during subview enumeration for layout or printing mode change. This view might paint without first receiving layout.", object_getClassName([subview class]));
}
-
-- (void)willRemoveSubview:(NSView *)subview
-{
- // Have to null-check _private, since this can be called via -dealloc when
- // cleaning up the the layerHostingView.
- if (_private && _private->enumeratingSubviews)
- LOG(View, "A view of class %s was removed during subview enumeration for layout or printing mode change. We will still do layout or the printing mode change even though this view is no longer in the view hierarchy.", object_getClassName([subview class]));
-}
-
#endif
#ifdef BUILDING_ON_TIGER
@@ -1260,7 +1290,7 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
- (void)_propagateDirtyRectsToOpaqueAncestors
{
if (![[self _webView] drawsBackground])
- [self _web_layoutIfNeededRecursive];
+ [self _web_updateLayoutAndStyleIfNeededRecursive];
[super _propagateDirtyRectsToOpaqueAncestors];
}
@@ -1272,7 +1302,7 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
// So check if the dataSource is nil before calling [self _isTopHTMLView], this can be removed
// once the FIXME in _isTopHTMLView is fixed.
if (_private->dataSource && [self _isTopHTMLView])
- [self _web_layoutIfNeededRecursive];
+ [self _web_updateLayoutAndStyleIfNeededRecursive];
[super viewWillDraw];
}
@@ -1290,7 +1320,7 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
[self _web_setPrintingModeRecursive];
#ifndef BUILDING_ON_TIGER
else
- [self _web_layoutIfNeededRecursive];
+ [self _web_updateLayoutAndStyleIfNeededRecursive];
#endif
} else if (wasInPrintingMode)
[self _web_clearPrintingModeRecursive];
@@ -1299,15 +1329,19 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
// There are known cases where -viewWillDraw is not called on all views being drawn.
// See <rdar://problem/6964278> for example. Performing layout at this point prevents us from
// trying to paint without layout (which WebCore now refuses to do, instead bailing out without
- // drawing at all), but we may still fail to update and regions dirtied by the layout which are
+ // drawing at all), but we may still fail to update any regions dirtied by the layout which are
// not already dirty.
if ([self _needsLayout]) {
- LOG_ERROR("View needs layout. Either -viewWillDraw wasn't called or layout was invalidated during the display operation. Performing layout now.");
- [self _web_layoutIfNeededRecursive];
+ NSInteger rectCount;
+ [self getRectsBeingDrawn:0 count:&rectCount];
+ if (rectCount) {
+ LOG_ERROR("View needs layout. Either -viewWillDraw wasn't called or layout was invalidated during the display operation. Performing layout now.");
+ [self _web_updateLayoutAndStyleIfNeededRecursive];
+ }
}
#else
// Because Tiger does not have viewWillDraw we need to do layout here.
- [self _web_layoutIfNeededRecursive];
+ [self _web_updateLayoutAndStyleIfNeededRecursive];
[_subviews makeObjectsPerformSelector:@selector(_propagateDirtyRectsToOpaqueAncestors)];
#endif
@@ -1339,7 +1373,7 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
[self _web_setPrintingModeRecursive];
#ifndef BUILDING_ON_TIGER
else
- [self _web_layoutIfNeededRecursive];
+ [self _web_updateLayoutAndStyleIfNeededRecursive];
#endif
} else if (wasInPrintingMode)
[self _web_clearPrintingModeRecursive];
@@ -1349,7 +1383,7 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
// Because Tiger does not have viewWillDraw we need to do layout here.
NSRect boundsBeforeLayout = [self bounds];
if (!NSIsEmptyRect(visRect))
- [self _web_layoutIfNeededRecursive];
+ [self _web_updateLayoutAndStyleIfNeededRecursive];
// If layout changes the view's bounds, then we need to recompute the visRect.
// That's because the visRect passed to us was based on the bounds at the time
@@ -1382,7 +1416,7 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
{
#ifdef BUILDING_ON_TIGER
// Because Tiger does not have viewWillDraw we need to do layout here.
- [self _web_layoutIfNeededRecursive];
+ [self _web_updateLayoutAndStyleIfNeededRecursive];
#endif
[self _setAsideSubviews];
@@ -1430,6 +1464,7 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
else if (forceWebHTMLViewHitTest)
captureHitsOnSubviews = YES;
else {
+ // FIXME: Why doesn't this include mouse entered/exited events, or other mouse button events?
NSEvent *event = [[self window] currentEvent];
captureHitsOnSubviews = !([event type] == NSMouseMoved
|| [event type] == NSRightMouseDown
@@ -1880,12 +1915,11 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
- (NSImage *)_selectionDraggingImage
{
- if ([self _hasSelection]) {
- NSImage *dragImage = core([self _frame])->selectionImage();
- [dragImage _web_dissolveToFraction:WebDragImageAlpha];
- return dragImage;
- }
- return nil;
+ if (![self _hasSelection])
+ return nil;
+ NSImage *dragImage = core([self _frame])->selectionImage();
+ [dragImage _web_dissolveToFraction:WebDragImageAlpha];
+ return dragImage;
}
- (NSRect)_selectionDraggingRect
@@ -2194,6 +2228,109 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
#endif
}
+- (BOOL)_isInPrintMode
+{
+ return _private->printing;
+}
+
+- (BOOL)_beginPrintModeWithMinimumPageWidth:(CGFloat)minimumPageWidth height:(CGFloat)minimumPageHeight maximumPageWidth:(CGFloat)maximumPageWidth
+{
+ Frame* frame = core([self _frame]);
+ if (!frame)
+ return NO;
+
+ if (frame->document() && frame->document()->isFrameSet()) {
+ minimumPageWidth = 0;
+ minimumPageHeight = 0;
+ maximumPageWidth = 0;
+ }
+
+ [self _setPrinting:YES minimumPageWidth:minimumPageWidth height:minimumPageHeight maximumPageWidth:maximumPageWidth adjustViewSize:YES paginateScreenContent:[self _isInScreenPaginationMode]];
+ return YES;
+}
+
+- (BOOL)_beginPrintModeWithPageWidth:(float)pageWidth height:(float)pageHeight shrinkToFit:(BOOL)shrinkToFit
+{
+ Frame* frame = core([self _frame]);
+ if (!frame)
+ return NO;
+
+ float minLayoutWidth = 0;
+ float minLayoutHeight = 0;
+ float maxLayoutWidth = 0;
+
+ // If we are a frameset just print with the layout we have onscreen, otherwise relayout
+ // according to the page width.
+ if (!frame->document() || !frame->document()->isFrameSet()) {
+ minLayoutWidth = shrinkToFit ? pageWidth * _WebHTMLViewPrintingMinimumShrinkFactor : pageWidth;
+ minLayoutHeight = shrinkToFit ? pageHeight * _WebHTMLViewPrintingMinimumShrinkFactor : pageHeight;
+ maxLayoutWidth = shrinkToFit ? pageWidth * _WebHTMLViewPrintingMaximumShrinkFactor : pageWidth;
+ }
+ [self _setPrinting:YES minimumPageWidth:minLayoutWidth height:minLayoutHeight maximumPageWidth:maxLayoutWidth adjustViewSize:YES paginateScreenContent:[self _isInScreenPaginationMode]];
+
+ return YES;
+}
+
+- (void)_endPrintMode
+{
+ [self _setPrinting:NO minimumPageWidth:0 height:0 maximumPageWidth:0 adjustViewSize:YES paginateScreenContent:[self _isInScreenPaginationMode]];
+}
+
+- (BOOL)_isInScreenPaginationMode
+{
+ return _private->paginateScreenContent;
+}
+
+- (BOOL)_beginScreenPaginationModeWithPageSize:(CGSize)pageSize shrinkToFit:(BOOL)shrinkToFit
+{
+ Frame* frame = core([self _frame]);
+ if (!frame)
+ return NO;
+
+ CGFloat minLayoutWidth = 0;
+ CGFloat minLayoutHeight = 0;
+ CGFloat maxLayoutWidth = 0;
+
+ // If we are a frameset just print with the layout we have on the screen. Otherwise do a relayout
+ // according to the page width.
+ if (!frame->document() || !frame->document()->isFrameSet()) {
+ minLayoutWidth = shrinkToFit ? pageSize.width * _WebHTMLViewPrintingMinimumShrinkFactor : pageSize.width;
+ minLayoutHeight = shrinkToFit ? pageSize.height * _WebHTMLViewPrintingMinimumShrinkFactor : pageSize.height;
+ maxLayoutWidth = shrinkToFit ? pageSize.width * _WebHTMLViewPrintingMaximumShrinkFactor : pageSize.width;
+ }
+ [self _setPrinting:[self _isInPrintMode] minimumPageWidth:minLayoutWidth height:minLayoutHeight maximumPageWidth:maxLayoutWidth adjustViewSize:YES paginateScreenContent:YES];
+
+ return YES;
+}
+
+- (void)_endScreenPaginationMode
+{
+ [self _setPrinting:[self _isInPrintMode] minimumPageWidth:0 height:0 maximumPageWidth:0 adjustViewSize:YES paginateScreenContent:NO];
+}
+
+- (CGFloat)_adjustedBottomOfPageWithTop:(CGFloat)top bottom:(CGFloat)bottom limit:(CGFloat)bottomLimit
+{
+ Frame* frame = core([self _frame]);
+ if (!frame)
+ return bottom;
+
+ FrameView* view = frame->view();
+ if (!view)
+ return bottom;
+
+ float newBottom;
+ view->adjustPageHeightDeprecated(&newBottom, top, bottom, bottomLimit);
+
+#ifdef __LP64__
+ // If the new bottom is equal to the old bottom (when both are treated as floats), we just return the original
+ // bottom. This prevents rounding errors that can occur when converting newBottom to a double.
+ if (fabs(static_cast<float>(bottom) - newBottom) <= numeric_limits<float>::epsilon())
+ return bottom;
+ else
+#endif
+ return newBottom;
+}
+
@end
@implementation NSView (WebHTMLViewFileInternal)
@@ -2257,10 +2394,6 @@ static bool matchesExtensionOrEquivalent(NSString *filename, NSString *extension
#endif
-@interface NSArray (WebHTMLView)
-- (void)_web_makePluginViewsPerformSelector:(SEL)selector withObject:(id)object;
-@end
-
@implementation WebHTMLView
+ (void)initialize
@@ -2268,6 +2401,7 @@ static bool matchesExtensionOrEquivalent(NSString *filename, NSString *extension
[NSApp registerServicesMenuSendTypes:[[self class] _selectionPasteboardTypes]
returnTypes:[[self class] _insertablePasteboardTypes]];
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
@@ -2407,6 +2541,7 @@ WEBCORE_COMMAND(alignLeft)
WEBCORE_COMMAND(alignRight)
WEBCORE_COMMAND(copy)
WEBCORE_COMMAND(cut)
+WEBCORE_COMMAND(paste)
WEBCORE_COMMAND(delete)
WEBCORE_COMMAND(deleteBackward)
WEBCORE_COMMAND(deleteBackwardByDecomposingPreviousCharacter)
@@ -2477,6 +2612,7 @@ WEBCORE_COMMAND(pageDown)
WEBCORE_COMMAND(pageDownAndModifySelection)
WEBCORE_COMMAND(pageUp)
WEBCORE_COMMAND(pageUpAndModifySelection)
+WEBCORE_COMMAND(pasteAsPlainText)
WEBCORE_COMMAND(selectAll)
WEBCORE_COMMAND(selectLine)
WEBCORE_COMMAND(selectParagraph)
@@ -2516,22 +2652,16 @@ WEBCORE_COMMAND(yankAndSelect)
return YES;
}
-- (BOOL)readSelectionFromPasteboard:(NSPasteboard *)pasteboard
-{
- Frame* coreFrame = core([self _frame]);
- if (!coreFrame)
- return NO;
- if (coreFrame->selection()->isContentRichlyEditable())
- [self _pasteWithPasteboard:pasteboard allowPlainText:YES];
- else
- [self _pasteAsPlainTextWithPasteboard:pasteboard];
- return YES;
-}
-
- (id)validRequestorForSendType:(NSString *)sendType returnType:(NSString *)returnType
{
BOOL isSendTypeOK = !sendType || ([[self pasteboardTypesForSelection] containsObject:sendType] && [self _hasSelection]);
- BOOL isReturnTypeOK = !returnType || ([[[self class] _insertablePasteboardTypes] containsObject:returnType] && [self _isEditable]);
+ BOOL isReturnTypeOK = NO;
+ if (!returnType)
+ isReturnTypeOK = YES;
+ else if ([[[self class] _insertablePasteboardTypes] containsObject:returnType] && [self _isEditable]) {
+ // We can insert strings in any editable context. We can insert other types, like images, only in rich edit contexts.
+ isReturnTypeOK = [returnType isEqualToString:NSStringPboardType] || [self _canEditRichly];
+ }
if (isSendTypeOK && isReturnTypeOK)
return self;
return [[self nextResponder] validRequestorForSendType:sendType returnType:returnType];
@@ -2547,7 +2677,7 @@ WEBCORE_COMMAND(yankAndSelect)
COMMAND_PROLOGUE
if (Frame* coreFrame = core([self _frame]))
- coreFrame->revealSelection(ScrollAlignment::alignCenterAlways);
+ coreFrame->selection()->revealSelection(ScrollAlignment::alignCenterAlways);
}
- (NSCellStateValue)selectionHasStyle:(CSSStyleDeclaration*)style
@@ -2924,7 +3054,9 @@ WEBCORE_COMMAND(yankAndSelect)
[self _removeWindowObservers];
[self _removeSuperviewObservers];
[self _cancelUpdateMouseoverTimer];
-
+
+ // FIXME: This accomplishes the same thing as the call to setCanStartMedia(false) in
+ // WebView. It would be nice to have a single mechanism instead of two.
[[self _pluginController] stopAllPlugins];
}
@@ -2944,20 +3076,48 @@ WEBCORE_COMMAND(yankAndSelect)
[self addSuperviewObservers];
[self addMouseMovedObserver];
+ // FIXME: This accomplishes the same thing as the call to setCanStartMedia(true) in
+ // WebView. It would be nice to have a single mechanism instead of two.
[[self _pluginController] startAllPlugins];
_private->lastScrollPosition = NSZeroPoint;
+
+#if USE(ACCELERATED_COMPOSITING) && !defined(BUILDING_ON_LEOPARD)
+ // We may have created the layer hosting view while outside the window. Update the scale factor
+ // now that we have a window to get it from.
+ if (_private->layerHostingView) {
+ CGFloat scaleFactor = [[self window] userSpaceScaleFactor];
+ [[_private->layerHostingView layer] setTransform:CATransform3DMakeScale(scaleFactor, scaleFactor, 1)];
+ }
+#endif
}
}
+- (void)_web_makePluginSubviewsPerformSelector:(SEL)selector withObject:(id)object
+{
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ // Copy subviews because [self subviews] returns the view's mutable internal array,
+ // and we must avoid mutating the array while enumerating it.
+ NSArray *subviews = [[self subviews] copy];
+
+ NSEnumerator *enumerator = [subviews objectEnumerator];
+ WebNetscapePluginView *view;
+ while ((view = [enumerator nextObject]) != nil)
+ if ([view isKindOfClass:[WebBaseNetscapePluginView class]])
+ [view performSelector:selector withObject:object];
+
+ [subviews release];
+#endif
+}
+
- (void)viewWillMoveToHostWindow:(NSWindow *)hostWindow
{
- [[self subviews] _web_makePluginViewsPerformSelector:@selector(viewWillMoveToHostWindow:) withObject:hostWindow];
+ [self _web_makePluginSubviewsPerformSelector:@selector(viewWillMoveToHostWindow:) withObject:hostWindow];
}
- (void)viewDidMoveToHostWindow
{
- [[self subviews] _web_makePluginViewsPerformSelector:@selector(viewDidMoveToHostWindow) withObject:nil];
+ [self _web_makePluginSubviewsPerformSelector:@selector(viewDidMoveToHostWindow) withObject:nil];
}
@@ -2971,6 +3131,13 @@ WEBCORE_COMMAND(yankAndSelect)
- (void)willRemoveSubview:(NSView *)subview
{
+#ifndef NDEBUG
+ // Have to null-check _private, since this can be called via -dealloc when
+ // cleaning up the the layerHostingView.
+ if (_private && _private->enumeratingSubviews)
+ LOG(View, "A view of class %s was removed during subview enumeration for layout or printing mode change. We will still do layout or the printing mode change even though this view is no longer in the view hierarchy.", object_getClassName([subview class]));
+#endif
+
if ([WebPluginController isPlugInView:subview])
[[self _pluginController] destroyPlugin:subview];
@@ -2979,35 +3146,23 @@ WEBCORE_COMMAND(yankAndSelect)
- (void)reapplyStyles
{
- if (!_private->needsToApplyStyles)
- return;
-
#ifdef LOG_TIMES
double start = CFAbsoluteTimeGetCurrent();
#endif
- if (Frame* coreFrame = core([self _frame])) {
- if (FrameView* coreView = coreFrame->view())
- coreView->setMediaType(_private->printing ? "print" : "screen");
- if (Document* document = coreFrame->document())
- document->setPrinting(_private->printing);
- coreFrame->reapplyStyles();
- }
+ if (Frame* coreFrame = core([self _frame]))
+ coreFrame->document()->styleSelectorChanged(RecalcStyleImmediately);
#ifdef LOG_TIMES
double thisTime = CFAbsoluteTimeGetCurrent() - start;
LOG(Timing, "%s apply style seconds = %f", [self URL], thisTime);
#endif
-
- _private->needsToApplyStyles = NO;
}
// Do a layout, but set up a new fixed width for the purposes of doing printing layout.
// minPageWidth==0 implies a non-printing layout
-- (void)layoutToMinimumPageWidth:(float)minPageWidth maximumPageWidth:(float)maxPageWidth adjustingViewSize:(BOOL)adjustViewSize
-{
- [self reapplyStyles];
-
+- (void)layoutToMinimumPageWidth:(float)minPageWidth height:(float)minPageHeight maximumPageWidth:(float)maxPageWidth adjustingViewSize:(BOOL)adjustViewSize
+{
if (![self _needsLayout])
return;
@@ -3023,7 +3178,7 @@ WEBCORE_COMMAND(yankAndSelect)
if (FrameView* coreView = coreFrame->view()) {
if (minPageWidth > 0.0)
- coreView->forceLayoutWithPageWidthRange(minPageWidth, maxPageWidth, adjustViewSize);
+ coreView->forceLayoutForPagination(FloatSize(minPageWidth, minPageHeight), maxPageWidth / minPageWidth, adjustViewSize ? Frame::AdjustViewSize : Frame::DoNotAdjustViewSize);
else {
coreView->forceLayout(!adjustViewSize);
if (adjustViewSize)
@@ -3039,7 +3194,7 @@ WEBCORE_COMMAND(yankAndSelect)
- (void)layout
{
- [self layoutToMinimumPageWidth:0.0f maximumPageWidth:0.0f adjustingViewSize:NO];
+ [self layoutToMinimumPageWidth:0 height:0 maximumPageWidth:0 adjustingViewSize:NO];
}
// Deliver mouseup events to the DOM for button 2.
@@ -3128,11 +3283,29 @@ WEBCORE_COMMAND(yankAndSelect)
return [[self _webView] drawsBackground];
}
+#if !LOG_DISABLED
- (void)setNeedsDisplay:(BOOL)flag
{
LOG(View, "%@ setNeedsDisplay:%@", self, flag ? @"YES" : @"NO");
[super setNeedsDisplay:flag];
}
+#endif
+
+#ifndef BUILDING_ON_TIGER
+- (void)setNeedsDisplayInRect:(NSRect)invalidRect
+{
+ if (_private->inScrollPositionChanged) {
+ // When scrolling, the dirty regions are adjusted for the scroll only
+ // after NSViewBoundsDidChangeNotification is sent. Translate the invalid
+ // rect to pre-scrolled coordinates in order to get the right dirty region
+ // after adjustment. See <rdar://problem/7678927>.
+ NSPoint origin = [[self superview] bounds].origin;
+ invalidRect.origin.x -= _private->lastScrollPosition.x - origin.x;
+ invalidRect.origin.y -= _private->lastScrollPosition.y - origin.y;
+ }
+ [super setNeedsDisplayInRect:invalidRect];
+}
+#endif
- (void)setNeedsLayout: (BOOL)flag
{
@@ -3150,7 +3323,13 @@ WEBCORE_COMMAND(yankAndSelect)
- (void)setNeedsToApplyStyles: (BOOL)flag
{
LOG(View, "%@ setNeedsToApplyStyles:%@", self, flag ? @"YES" : @"NO");
- _private->needsToApplyStyles = flag;
+ if (!flag)
+ return; // There's no way to say you don't need a style recalc.
+ if (Frame* frame = core([self _frame])) {
+ if (frame->document() && frame->document()->inPageCache())
+ return;
+ frame->document()->scheduleForcedStyleRecalc();
+ }
}
- (void)drawSingleRect:(NSRect)rect
@@ -3224,16 +3403,14 @@ WEBCORE_COMMAND(yankAndSelect)
if (subviewsWereSetAside)
[self _setAsideSubviews];
-
+
#if USE(ACCELERATED_COMPOSITING)
- if ([webView _needsOneShotDrawingSynchronization]) {
- // Disable screen updates so that any layer changes committed here
- // don't show up on the screen before the window flush at the end
- // of the current window display, but only if a window flush is actually
- // going to happen.
- NSWindow *window = [self window];
- if ([window viewsNeedDisplay])
- [window disableScreenUpdatesUntilFlush];
+ // Only do the synchronization dance if we're drawing into the window, otherwise
+ // we risk disabling screen updates when no flush is pending.
+ if ([NSGraphicsContext currentContext] == [[self window] graphicsContext] && [webView _needsOneShotDrawingSynchronization]) {
+ // Disable screen updates to minimize the chances of the race between the CA
+ // display link and AppKit drawing causing flashes.
+ [[self window] disableScreenUpdatesUntilFlush];
// Make sure any layer changes that happened as a result of layout
// via -viewWillDraw are committed.
@@ -3241,6 +3418,9 @@ WEBCORE_COMMAND(yankAndSelect)
[webView _setNeedsOneShotDrawingSynchronization:NO];
}
#endif
+
+ if (webView)
+ CallUIDelegate(webView, @selector(webView:didDrawFrame:), [self _frame]);
}
// Turn off the additional clip while computing our visibleRect.
@@ -3248,7 +3428,7 @@ WEBCORE_COMMAND(yankAndSelect)
{
if (!([[self superview] isKindOfClass:[WebClipView class]]))
return [super visibleRect];
-
+
WebClipView *clipView = (WebClipView *)[self superview];
BOOL hasAdditionalClip = [clipView hasAdditionalClip];
@@ -3704,8 +3884,11 @@ static BOOL isInPasswordField(Frame* coreFrame)
// Does setNeedsDisplay:NO as a side effect when printing is ending.
// pageWidth != 0 implies we will relayout to a new width
-- (void)_setPrinting:(BOOL)printing minimumPageWidth:(float)minPageWidth maximumPageWidth:(float)maxPageWidth adjustViewSize:(BOOL)adjustViewSize
+- (void)_setPrinting:(BOOL)printing minimumPageWidth:(float)minPageWidth height:(float)minPageHeight maximumPageWidth:(float)maxPageWidth adjustViewSize:(BOOL)adjustViewSize paginateScreenContent:(BOOL)paginateScreenContent
{
+ if (printing == _private->printing && paginateScreenContent == _private->paginateScreenContent)
+ return;
+
WebFrame *frame = [self _frame];
NSArray *subframes = [frame childFrames];
unsigned n = [subframes count];
@@ -3714,24 +3897,34 @@ static BOOL isInPasswordField(Frame* coreFrame)
WebFrame *subframe = [subframes objectAtIndex:i];
WebFrameView *frameView = [subframe frameView];
if ([[subframe _dataSource] _isDocumentHTML]) {
- [(WebHTMLView *)[frameView documentView] _setPrinting:printing minimumPageWidth:0.0f maximumPageWidth:0.0f adjustViewSize:adjustViewSize];
+ [(WebHTMLView *)[frameView documentView] _setPrinting:printing minimumPageWidth:0 height:0 maximumPageWidth:0 adjustViewSize:adjustViewSize paginateScreenContent:paginateScreenContent];
}
}
- if (printing != _private->printing) {
- [_private->pageRects release];
- _private->pageRects = nil;
- _private->printing = printing;
- if (!printing)
- _private->avoidingPrintOrphan = NO;
- [self setNeedsToApplyStyles:YES];
- [self setNeedsLayout:YES];
- [self layoutToMinimumPageWidth:minPageWidth maximumPageWidth:maxPageWidth adjustingViewSize:adjustViewSize];
- if (!printing) {
- // Can't do this when starting printing or nested printing won't work, see 3491427.
- [self setNeedsDisplay:NO];
+ [_private->pageRects release];
+ _private->pageRects = nil;
+ _private->printing = printing;
+ _private->paginateScreenContent = paginateScreenContent;
+ if (!printing && !paginateScreenContent)
+ _private->avoidingPrintOrphan = NO;
+
+ Frame* coreFrame = core([self _frame]);
+ if (coreFrame) {
+ if (FrameView* coreView = coreFrame->view())
+ coreView->setMediaType(_private->printing ? "print" : "screen");
+ if (Document* document = coreFrame->document()) {
+ document->setPaginatedForScreen(_private->paginateScreenContent);
+ document->setPrinting(_private->printing);
+ document->styleSelectorChanged(RecalcStyleImmediately);
}
}
+
+ [self setNeedsLayout:YES];
+ [self layoutToMinimumPageWidth:minPageWidth height:minPageHeight maximumPageWidth:maxPageWidth adjustingViewSize:adjustViewSize];
+ if (!printing) {
+ // Can't do this when starting printing or nested printing won't work, see 3491427.
+ [self setNeedsDisplay:NO];
+ }
}
- (BOOL)canPrintHeadersAndFooters
@@ -3747,23 +3940,10 @@ static BOOL isInPasswordField(Frame* coreFrame)
// If the WebHTMLView itself is what we're printing, then we will never have to do this.
BOOL wasInPrintingMode = _private->printing;
if (!wasInPrintingMode)
- [self _setPrinting:YES minimumPageWidth:0.0f maximumPageWidth:0.0f adjustViewSize:NO];
+ [self _setPrinting:YES minimumPageWidth:0 height:0 maximumPageWidth:0 adjustViewSize:NO paginateScreenContent:[self _isInScreenPaginationMode]];
- float newBottomFloat = *newBottom;
- if (Frame* frame = core([self _frame])) {
- if (FrameView* view = frame->view())
- view->adjustPageHeight(&newBottomFloat, oldTop, oldBottom, bottomLimit);
- }
+ *newBottom = [self _adjustedBottomOfPageWithTop:oldTop bottom:oldBottom limit:bottomLimit];
-#ifdef __LP64__
- // If the new bottom is equal to the old bottom (when both are treated as floats), we just copy
- // oldBottom over to newBottom. This prevents rounding errors that can occur when converting newBottomFloat to a double.
- if (fabs((float)oldBottom - newBottomFloat) <= numeric_limits<float>::epsilon())
- *newBottom = oldBottom;
- else
-#endif
- *newBottom = newBottomFloat;
-
if (!wasInPrintingMode) {
NSPrintOperation *currenPrintOperation = [NSPrintOperation currentOperation];
if (currenPrintOperation)
@@ -3771,16 +3951,10 @@ static BOOL isInPasswordField(Frame* coreFrame)
[self performSelector:@selector(_delayedEndPrintMode:) withObject:currenPrintOperation afterDelay:0];
else
// not sure if this is actually ever invoked, it probably shouldn't be
- [self _setPrinting:NO minimumPageWidth:0.0f maximumPageWidth:0.0f adjustViewSize:NO];
+ [self _setPrinting:NO minimumPageWidth:0 height:0 maximumPageWidth:0 adjustViewSize:NO paginateScreenContent:[self _isInScreenPaginationMode]];
}
}
-- (float)_availablePaperWidthForPrintOperation:(NSPrintOperation *)printOperation
-{
- NSPrintInfo *printInfo = [printOperation printInfo];
- return [printInfo paperSize].width - [printInfo leftMargin] - [printInfo rightMargin];
-}
-
- (float)_scaleFactorForPrintOperation:(NSPrintOperation *)printOperation
{
float viewWidth = NSWidth([self bounds]);
@@ -3790,8 +3964,8 @@ static BOOL isInPasswordField(Frame* coreFrame)
}
float userScaleFactor = [printOperation _web_pageSetupScaleFactor];
- float maxShrinkToFitScaleFactor = 1.0f / PrintingMaximumShrinkFactor;
- float shrinkToFitScaleFactor = [self _availablePaperWidthForPrintOperation:printOperation]/viewWidth;
+ float maxShrinkToFitScaleFactor = 1.0f / _WebHTMLViewPrintingMaximumShrinkFactor;
+ float shrinkToFitScaleFactor = [printOperation _web_availablePaperWidth] / viewWidth;
float shrinkToAvoidOrphan = _private->avoidingPrintOrphan ? (1.0f / PrintingOrphanShrinkAdjustment) : 1.0f;
return userScaleFactor * max(maxShrinkToFitScaleFactor, shrinkToFitScaleFactor) * shrinkToAvoidOrphan;
}
@@ -3807,13 +3981,13 @@ static BOOL isInPasswordField(Frame* coreFrame)
// This is used for Carbon printing. At some point we might want to make this public API.
- (void)setPageWidthForPrinting:(float)pageWidth
{
- [self _setPrinting:NO minimumPageWidth:0.0f maximumPageWidth:0.0f adjustViewSize:NO];
- [self _setPrinting:YES minimumPageWidth:pageWidth maximumPageWidth:pageWidth adjustViewSize:YES];
+ [self _setPrinting:NO minimumPageWidth:0 height:0 maximumPageWidth:0 adjustViewSize:NO paginateScreenContent:[self _isInScreenPaginationMode]];
+ [self _setPrinting:YES minimumPageWidth:pageWidth height:0 maximumPageWidth:pageWidth adjustViewSize:YES paginateScreenContent:[self _isInScreenPaginationMode]];
}
-- (void)_endPrintMode
+- (void)_endPrintModeAndRestoreWindowAutodisplay
{
- [self _setPrinting:NO minimumPageWidth:0.0f maximumPageWidth:0.0f adjustViewSize:YES];
+ [self _endPrintMode];
[[self window] setAutodisplay:YES];
}
@@ -3839,7 +4013,7 @@ static BOOL isInPasswordField(Frame* coreFrame)
// cancelled, beginDocument and endDocument must not have been called, and we need to clean up
// the print mode here.
ASSERT(currentOperation == nil);
- [self _endPrintMode];
+ [self _endPrintModeAndRestoreWindowAutodisplay];
}
}
@@ -3849,22 +4023,13 @@ static BOOL isInPasswordField(Frame* coreFrame)
// Must do this explicit display here, because otherwise the view might redisplay while the print
// sheet was up, using printer fonts (and looking different).
[self displayIfNeeded];
- [[self window] setAutodisplay:NO];
-
- // If we are a frameset just print with the layout we have onscreen, otherwise relayout
- // according to the paper size
- float minLayoutWidth = 0.0f;
- float maxLayoutWidth = 0.0f;
- Frame* frame = core([self _frame]);
- if (!frame)
- return NO;
- if (!frame->document() || !frame->document()->isFrameSet()) {
- float paperWidth = [self _availablePaperWidthForPrintOperation:[NSPrintOperation currentOperation]];
- minLayoutWidth = paperWidth * PrintingMinimumShrinkFactor;
- maxLayoutWidth = paperWidth * PrintingMaximumShrinkFactor;
- }
- [self _setPrinting:YES minimumPageWidth:minLayoutWidth maximumPageWidth:maxLayoutWidth adjustViewSize:YES]; // will relayout
+ [[self window] setAutodisplay:NO];
+
+ [[self _webView] _adjustPrintingMarginsForHeaderAndFooter];
NSPrintOperation *printOperation = [NSPrintOperation currentOperation];
+ if (![self _beginPrintModeWithPageWidth:[printOperation _web_availablePaperWidth] height:[printOperation _web_availablePaperHeight] shrinkToFit:YES])
+ return NO;
+
// Certain types of errors, including invalid page ranges, can cause beginDocument and
// endDocument to be skipped after we've put ourselves in print mode (see 4145905). In those cases
// we need to get out of print mode without relying on any more callbacks from the printing mechanism.
@@ -3872,7 +4037,6 @@ static BOOL isInPasswordField(Frame* coreFrame)
// If not cancelled, this delayed call will be invoked in the next pass through the main event loop,
// which is after beginDocument and endDocument would be called.
[self performSelector:@selector(_delayedEndPrintMode:) withObject:printOperation afterDelay:0];
- [[self _webView] _adjustPrintingMarginsForHeaderAndFooter];
// There is a theoretical chance that someone could do some drawing between here and endDocument,
// if something caused setNeedsDisplay after this point. If so, it's not a big tragedy, because
@@ -3882,9 +4046,9 @@ static BOOL isInPasswordField(Frame* coreFrame)
float totalScaleFactor = [self _scaleFactorForPrintOperation:printOperation];
float userScaleFactor = [printOperation _web_pageSetupScaleFactor];
[_private->pageRects release];
- float fullPageHeight = floorf([self _calculatePrintHeight]/totalScaleFactor);
- NSArray *newPageRects = [[self _frame] _computePageRectsWithPrintWidthScaleFactor:userScaleFactor
- printHeight:fullPageHeight];
+ float fullPageHeight = floorf([printOperation _web_availablePaperHeight] / totalScaleFactor);
+ WebFrame *frame = [self _frame];
+ NSArray *newPageRects = [frame _computePageRectsWithPrintWidthScaleFactor:userScaleFactor printHeight:fullPageHeight];
// AppKit gets all messed up if you give it a zero-length page count (see 3576334), so if we
// hit that case we'll pass along a degenerate 1 pixel square to print. This will print
@@ -3897,8 +4061,7 @@ static BOOL isInPasswordField(Frame* coreFrame)
// content onto one fewer page. If it does, use the adjusted scale. If not, use the original scale.
float lastPageHeight = NSHeight([[newPageRects lastObject] rectValue]);
if (lastPageHeight/fullPageHeight < LastPrintedPageOrphanRatio) {
- NSArray *adjustedPageRects = [[self _frame] _computePageRectsWithPrintWidthScaleFactor:userScaleFactor
- printHeight:fullPageHeight*PrintingOrphanShrinkAdjustment];
+ NSArray *adjustedPageRects = [frame _computePageRectsWithPrintWidthScaleFactor:userScaleFactor printHeight:fullPageHeight * PrintingOrphanShrinkAdjustment];
// Use the adjusted rects only if the page count went down
if ([adjustedPageRects count] < [newPageRects count]) {
newPageRects = adjustedPageRects;
@@ -3938,7 +4101,7 @@ static BOOL isInPasswordField(Frame* coreFrame)
} @catch (NSException *localException) {
// Exception during [super beginDocument] means that endDocument will not get called,
// so we need to clean up our "print mode" here.
- [self _endPrintMode];
+ [self _endPrintModeAndRestoreWindowAutodisplay];
}
}
@@ -3946,7 +4109,7 @@ static BOOL isInPasswordField(Frame* coreFrame)
{
[super endDocument];
// Note sadly at this point [NSGraphicsContext currentContextDrawingToScreen] is still NO
- [self _endPrintMode];
+ [self _endPrintModeAndRestoreWindowAutodisplay];
}
- (void)keyDown:(NSEvent *)event
@@ -4067,14 +4230,14 @@ static BOOL isInPasswordField(Frame* coreFrame)
COMMAND_PROLOGUE
if (Frame* coreFrame = core([self _frame]))
- coreFrame->revealSelection(ScrollAlignment::alignCenterAlways);
+ coreFrame->selection()->revealSelection(ScrollAlignment::alignCenterAlways);
}
- (NSData *)_selectionStartFontAttributesAsRTF
{
Frame* coreFrame = core([self _frame]);
NSAttributedString *string = [[NSAttributedString alloc] initWithString:@"x"
- attributes:coreFrame ? coreFrame->fontAttributesForSelectionStart() : nil];
+ attributes:coreFrame ? coreFrame->editor()->fontAttributesForSelectionStart() : nil];
NSData *data = [string RTFFromRange:NSMakeRange(0, [string length]) documentAttributes:nil];
[string release];
return data;
@@ -4242,9 +4405,6 @@ static BOOL isInPasswordField(Frame* coreFrame)
// the current event prevents that from causing a problem inside WebKit or AppKit code.
[[event retain] autorelease];
- if ([self _handleStyleKeyEquivalent:event])
- return YES;
-
BOOL eventWasSentToWebCore = (_private->keyDownEvent == event);
BOOL ret = NO;
@@ -4262,7 +4422,7 @@ static BOOL isInPasswordField(Frame* coreFrame)
ret = frame->eventHandler()->keyEvent(event);
if (!ret)
- ret = [super performKeyEquivalent:event];
+ ret = [self _handleStyleKeyEquivalent:event] || [super performKeyEquivalent:event];
[self release];
@@ -4704,7 +4864,7 @@ NSStrokeColorAttributeName /* NSColor, default nil: same as foreground co
return;
WritingDirection direction = RightToLeftWritingDirection;
- switch (coreFrame->baseWritingDirectionForSelectionStart()) {
+ switch (coreFrame->editor()->baseWritingDirectionForSelectionStart()) {
case NSWritingDirectionLeftToRight:
break;
case NSWritingDirectionRightToLeft:
@@ -4955,21 +5115,6 @@ static BOOL writingDirectionKeyBindingsEnabled()
@end
-@implementation NSArray (WebHTMLView)
-
-- (void)_web_makePluginViewsPerformSelector:(SEL)selector withObject:(id)object
-{
-#if ENABLE(NETSCAPE_PLUGIN_API)
- NSEnumerator *enumerator = [self objectEnumerator];
- WebNetscapePluginView *view;
- while ((view = [enumerator nextObject]) != nil)
- if ([view isKindOfClass:[WebBaseNetscapePluginView class]])
- [view performSelector:selector withObject:object];
-#endif
-}
-
-@end
-
@implementation WebHTMLView (WebInternal)
- (void)_selectionChanged
@@ -4984,22 +5129,21 @@ static BOOL writingDirectionKeyBindingsEnabled()
{
// FIXME: NSTextView bails out if becoming or resigning first responder, for which it has ivar flags. Not
// sure if we need to do something similar.
-
+
if (![self _canEdit])
return;
-
+
NSWindow *window = [self window];
// FIXME: is this first-responder check correct? What happens if a subframe is editable and is first responder?
- if ([NSApp keyWindow] != window || [window firstResponder] != self)
+ if (![window isKeyWindow] || [window firstResponder] != self)
return;
-
+
bool multipleFonts = false;
NSFont *font = nil;
if (Frame* coreFrame = core([self _frame])) {
if (const SimpleFontData* fd = coreFrame->editor()->fontForSelection(multipleFonts))
font = fd->getNSFont();
}
-
// FIXME: for now, return a bogus font that distinguishes the empty selection from the non-empty
// selection. We should be able to remove this once the rest of this code works properly.
@@ -5019,7 +5163,7 @@ static BOOL writingDirectionKeyBindingsEnabled()
if (![[self _webView] smartInsertDeleteEnabled])
return NO;
Frame* coreFrame = core([self _frame]);
- return coreFrame && coreFrame->selectionGranularity() == WordGranularity;
+ return coreFrame && coreFrame->selection()->granularity() == WordGranularity;
}
- (NSEvent *)_mouseDownEvent
@@ -5037,33 +5181,6 @@ static BOOL writingDirectionKeyBindingsEnabled()
return [_private->dataSource webFrame];
}
-- (void)paste:(id)sender
-{
- COMMAND_PROLOGUE
-
- RetainPtr<WebHTMLView> selfProtector = self;
- RefPtr<Frame> coreFrame = core([self _frame]);
- if (!coreFrame)
- return;
- if (coreFrame->editor()->tryDHTMLPaste())
- return; // DHTML did the whole operation
- if (!coreFrame->editor()->canPaste())
- return;
- if (coreFrame->selection()->isContentRichlyEditable())
- [self _pasteWithPasteboard:[NSPasteboard generalPasteboard] allowPlainText:YES];
- else
- coreFrame->editor()->pasteAsPlainText();
-}
-
-- (void)pasteAsPlainText:(id)sender
-{
- COMMAND_PROLOGUE
-
- if (![self _canEdit])
- return;
- [self _pasteAsPlainTextWithPasteboard:[NSPasteboard generalPasteboard]];
-}
-
- (void)closeIfNotCurrentView
{
if ([[[self _frame] frameView] documentView] != self)
@@ -5243,7 +5360,7 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point)
if (!coreFrame)
return;
- NSRect rect = coreFrame->selectionBounds();
+ NSRect rect = coreFrame->selection()->bounds();
#ifndef BUILDING_ON_TIGER
NSDictionary *attributes = [attrString fontAttributesInRange:NSMakeRange(0,1)];
@@ -5392,31 +5509,16 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point)
{
ASSERT(!_private->subviewsSetAside);
- if (_private->needsToApplyStyles || [self _needsLayout])
+ if ([self _needsLayout])
[self layout];
}
-- (void)_web_layoutIfNeededRecursive
+- (void)_web_updateLayoutAndStyleIfNeededRecursive
{
- [self _layoutIfNeeded];
-
-#ifndef NDEBUG
- _private->enumeratingSubviews = YES;
-#endif
-
- NSMutableArray *descendantWebHTMLViews = [[NSMutableArray alloc] init];
-
- [self _web_addDescendantWebHTMLViewsToArray:descendantWebHTMLViews];
-
- unsigned count = [descendantWebHTMLViews count];
- for (unsigned i = 0; i < count; ++i)
- [[descendantWebHTMLViews objectAtIndex:i] _layoutIfNeeded];
-
- [descendantWebHTMLViews release];
-
-#ifndef NDEBUG
- _private->enumeratingSubviews = NO;
-#endif
+ WebFrame *webFrame = [self _frame];
+ Frame* coreFrame = core(webFrame);
+ if (coreFrame && coreFrame->view())
+ coreFrame->view()->updateLayoutAndStyleIfNeededRecursive();
}
- (void) _destroyAllWebPlugins
@@ -5463,6 +5565,21 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point)
[viewLayer setStyle:[NSDictionary dictionaryWithObject:actions forKey:@"actions"]];
#endif
+#if !defined(BUILDING_ON_LEOPARD)
+ // If we aren't in the window yet, we'll use the screen's scale factor now, and reset the scale
+ // via -viewDidMoveToWindow.
+ CGFloat scaleFactor = [self window] ? [[self window] userSpaceScaleFactor] : [[NSScreen mainScreen] userSpaceScaleFactor];
+ [viewLayer setTransform:CATransform3DMakeScale(scaleFactor, scaleFactor, 1)];
+#endif
+
+ if ([self layer]) {
+ // If we are in a layer-backed view, we need to manually initialize the geometry for our layer.
+ [viewLayer setBounds:NSRectToCGRect([_private->layerHostingView bounds])];
+ [viewLayer setAnchorPoint:CGPointMake(0, [self isFlipped] ? 1 : 0)];
+ CGPoint layerPosition = NSPointToCGPoint([self convertPointToBase:[_private->layerHostingView frame].origin]);
+ [viewLayer setPosition:layerPosition];
+ }
+
[_private->layerHostingView setLayer:viewLayer];
[_private->layerHostingView setWantsLayer:YES];
@@ -5473,7 +5590,11 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point)
[[NSNotificationCenter defaultCenter] postNotificationName:_WebViewDidStartAcceleratedCompositingNotification object:[self _webView] userInfo:nil];
#if defined(BUILDING_ON_LEOPARD)
+ [viewLayer setSublayerTransform:CATransform3DMakeScale(1, -1, 1)]; // setGeometryFlipped: doesn't exist on Leopard.
[self _updateLayerHostingViewPosition];
+#else
+ // Do geometry flipping here, which flips all the compositing layers so they are top-down.
+ [viewLayer setGeometryFlipped:YES];
#endif
}
@@ -5498,8 +5619,6 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point)
NSRect layerViewFrame = [self bounds];
if (layerViewFrame.size.height > maxHeight) {
- CGFloat documentHeight = layerViewFrame.size.height;
-
// Clamp the size of the view to <= maxHeight to avoid the bug.
layerViewFrame.size.height = maxHeight;
NSRect visibleRect = [[self enclosingScrollView] documentVisibleRect];
@@ -5509,14 +5628,34 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point)
layerViewFrame.origin.y = topOffset;
// Compensate for the moved view by adjusting the sublayer transform on the view's layer (using flipped coords).
- CGFloat bottomOffset = documentHeight - layerViewFrame.size.height - topOffset;
- [[_private->layerHostingView layer] setSublayerTransform:CATransform3DMakeTranslation(0, -bottomOffset, 0)];
+ CATransform3D flipTransform = CATransform3DMakeTranslation(0, topOffset, 0);
+ flipTransform = CATransform3DScale(flipTransform, 1, -1, 1);
+ [[_private->layerHostingView layer] setSublayerTransform:flipTransform];
}
[_private->layerHostingView _updateLayerGeometryFromView]; // Workaround for <rdar://problem/7071636>
[_private->layerHostingView setFrame:layerViewFrame];
}
#endif // defined(BUILDING_ON_LEOPARD)
+
+- (void)drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx
+{
+ if (_private) {
+ ASSERT(!_private->drawingIntoLayer);
+ _private->drawingIntoLayer = YES;
+ }
+
+ [super drawLayer:layer inContext:ctx];
+
+ if (_private)
+ _private->drawingIntoLayer = NO;
+}
+
+- (BOOL)_web_isDrawingIntoLayer
+{
+ return _private->drawingIntoLayer;
+}
+
#endif // USE(ACCELERATED_COMPOSITING)
@end
@@ -5928,25 +6067,27 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
- (NSRect)selectionRect
{
- if ([self _hasSelection])
- return core([self _frame])->selectionBounds();
- return NSZeroRect;
+ if (![self _hasSelection])
+ return NSZeroRect;
+ return core([self _frame])->selection()->bounds();
}
- (NSArray *)selectionTextRects
{
if (![self _hasSelection])
return nil;
-
+
Vector<FloatRect> list;
if (Frame* coreFrame = core([self _frame]))
- coreFrame->selectionTextRects(list, Frame::RespectTransforms);
+ coreFrame->selection()->getClippedVisibleTextRectangles(list);
- unsigned size = list.size();
- NSMutableArray *result = [[[NSMutableArray alloc] initWithCapacity:size] autorelease];
- for (unsigned i = 0; i < size; ++i)
+ size_t size = list.size();
+
+ NSMutableArray *result = [NSMutableArray arrayWithCapacity:size];
+
+ for (size_t i = 0; i < size; ++i)
[result addObject:[NSValue valueWithRect:list[i]]];
-
+
return result;
}
@@ -5957,16 +6098,16 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
- (NSImage *)selectionImageForcingBlackText:(BOOL)forceBlackText
{
- if ([self _hasSelection])
- return core([self _frame])->selectionImage(forceBlackText);
- return nil;
+ if (![self _hasSelection])
+ return nil;
+ return core([self _frame])->selectionImage(forceBlackText);
}
- (NSRect)selectionImageRect
{
- if ([self _hasSelection])
- return core([self _frame])->selectionBounds();
- return NSZeroRect;
+ if (![self _hasSelection])
+ return NSZeroRect;
+ return core([self _frame])->selection()->bounds();
}
- (NSArray *)pasteboardTypesForSelection
@@ -6058,7 +6199,7 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
if (![string length])
return NO;
Frame* coreFrame = core([self _frame]);
- return coreFrame && coreFrame->findString(string, forward, caseFlag, wrapFlag, startInSelection);
+ return coreFrame && coreFrame->editor()->findString(string, forward, caseFlag, wrapFlag, startInSelection);
}
@end
@@ -6080,10 +6221,15 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
- (NSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(NSUInteger)limit
{
+ return [self countMatchesForText:string caseSensitive:caseFlag limit:limit markMatches:YES];
+}
+
+- (NSUInteger)countMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(NSUInteger)limit markMatches:(BOOL)markMatches
+{
Frame* coreFrame = core([self _frame]);
if (!coreFrame)
return 0;
- return coreFrame->markAllMatchesForText(string, caseFlag, limit);
+ return coreFrame->editor()->countMatchesForText(string, caseFlag, limit, markMatches);
}
- (void)setMarkedTextMatchesAreHighlighted:(BOOL)newValue
@@ -6091,13 +6237,13 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
Frame* coreFrame = core([self _frame]);
if (!coreFrame)
return;
- coreFrame->setMarkedTextMatchesAreHighlighted(newValue);
+ coreFrame->editor()->setMarkedTextMatchesAreHighlighted(newValue);
}
- (BOOL)markedTextMatchesAreHighlighted
{
Frame* coreFrame = core([self _frame]);
- return coreFrame && coreFrame->markedTextMatchesAreHighlighted();
+ return coreFrame && coreFrame->editor()->markedTextMatchesAreHighlighted();
}
- (void)unmarkAllTextMatches
@@ -6108,7 +6254,7 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
Document* document = coreFrame->document();
if (!document)
return;
- document->removeMarkers(DocumentMarker::TextMatch);
+ document->markers()->removeMarkers(DocumentMarker::TextMatch);
}
- (NSArray *)rectsForTextMatches
@@ -6120,7 +6266,7 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
if (!document)
return [NSArray array];
- Vector<IntRect> rects = document->renderedRectsForMarkers(DocumentMarker::TextMatch);
+ Vector<IntRect> rects = document->markers()->renderedRectsForMarkers(DocumentMarker::TextMatch);
unsigned count = rects.size();
NSMutableArray *result = [NSMutableArray arrayWithCapacity:count];
for (unsigned index = 0; index < count; ++index)
diff --git a/WebKit/mac/WebView/WebHTMLViewInternal.h b/WebKit/mac/WebView/WebHTMLViewInternal.h
index 3f1f50d..07a782a 100644
--- a/WebKit/mac/WebView/WebHTMLViewInternal.h
+++ b/WebKit/mac/WebView/WebHTMLViewInternal.h
@@ -59,13 +59,14 @@ namespace WebCore {
#endif
- (WebCore::CachedImage*)promisedDragTIFFDataSource;
- (void)setPromisedDragTIFFDataSource:(WebCore::CachedImage*)source;
-- (void)_web_layoutIfNeededRecursive;
+- (void)_web_updateLayoutAndStyleIfNeededRecursive;
- (void)_destroyAllWebPlugins;
- (BOOL)_needsLayout;
#if USE(ACCELERATED_COMPOSITING)
- (void)attachRootLayer:(CALayer*)layer;
- (void)detachRootLayer;
+- (BOOL)_web_isDrawingIntoLayer;
#endif
#if USE(ACCELERATED_COMPOSITING) && defined(BUILDING_ON_LEOPARD)
diff --git a/WebKit/mac/WebView/WebHTMLViewPrivate.h b/WebKit/mac/WebView/WebHTMLViewPrivate.h
index cb121d8..c62713f 100644
--- a/WebKit/mac/WebView/WebHTMLViewPrivate.h
+++ b/WebKit/mac/WebView/WebHTMLViewPrivate.h
@@ -32,6 +32,12 @@
#define ENABLE_NETSCAPE_PLUGIN_API 1
#endif
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
+#define WebCGFloat float
+#else
+#define WebCGFloat CGFloat
+#endif
+
@class DOMDocumentFragment;
@class DOMNode;
@class DOMRange;
@@ -40,12 +46,11 @@
@protocol WebHTMLHighlighter
- (NSRect)highlightRectForLine:(NSRect)lineRect representedNode:(DOMNode *)node;
- (void)paintHighlightForBox:(NSRect)boxRect onLine:(NSRect)lineRect behindText:(BOOL)text entireLine:(BOOL)line representedNode:(DOMNode *)node;
-
-// the following methods are deprecated and will be removed once Mail switches to the new methods <rdar://problem/5050528>
-- (NSRect)highlightRectForLine:(NSRect)lineRect;
-- (void)paintHighlightForBox:(NSRect)boxRect onLine:(NSRect)lineRect behindText:(BOOL)text entireLine:(BOOL)line;
@end
+extern const float _WebHTMLViewPrintingMinimumShrinkFactor;
+extern const float _WebHTMLViewPrintingMaximumShrinkFactor;
+
@interface WebHTMLView (WebPrivate)
+ (NSArray *)supportedMIMETypes;
@@ -124,7 +129,20 @@
// directly, this method must be called before paginating, or the computed height might be incorrect.
// Typically this would be called from inside an override of -[NSView knowsPageRange:].
- (void)_layoutForPrinting;
+- (WebCGFloat)_adjustedBottomOfPageWithTop:(WebCGFloat)top bottom:(WebCGFloat)bottom limit:(WebCGFloat)bottomLimit;
+- (BOOL)_isInPrintMode;
+- (BOOL)_beginPrintModeWithPageWidth:(float)pageWidth height:(float)pageHeight shrinkToFit:(BOOL)shrinkToFit;
+// Lays out to pages of the given minimum width and height or more (increasing both dimensions proportionally)
+// as needed for the content to fit, but no more than the given maximum width.
+- (BOOL)_beginPrintModeWithMinimumPageWidth:(WebCGFloat)minimumPageWidth height:(WebCGFloat)minimumPageHeight maximumPageWidth:(WebCGFloat)maximumPageWidth;
+- (void)_endPrintMode;
+
+- (BOOL)_isInScreenPaginationMode;
+- (BOOL)_beginScreenPaginationModeWithPageSize:(CGSize)pageSize shrinkToFit:(BOOL)shrinkToFit;
+- (void)_endScreenPaginationMode;
- (BOOL)_canSmartReplaceWithPasteboard:(NSPasteboard *)pasteboard;
@end
+
+#undef WebCGFloat
diff --git a/WebKit/mac/WebView/WebNavigationData.mm b/WebKit/mac/WebView/WebNavigationData.mm
index 290d8b1..753a441 100644
--- a/WebKit/mac/WebView/WebNavigationData.mm
+++ b/WebKit/mac/WebView/WebNavigationData.mm
@@ -55,7 +55,7 @@
@implementation WebNavigationData
-- (id)initWithURLString:(NSString *)url title:(NSString *)title originalRequest:(NSURLRequest *)request response:(NSURLResponse *)response hasSubstituteData:(BOOL)hasSubstituteData clientRedirectSource:(NSString *)redirectSource;
+- (id)initWithURLString:(NSString *)url title:(NSString *)title originalRequest:(NSURLRequest *)request response:(NSURLResponse *)response hasSubstituteData:(BOOL)hasSubstituteData clientRedirectSource:(NSString *)redirectSource
{
_private = [[WebNavigationDataPrivate alloc] init];
diff --git a/WebKit/mac/WebView/WebPDFDocumentExtras.mm b/WebKit/mac/WebView/WebPDFDocumentExtras.mm
index b7043df..7651dba 100644
--- a/WebKit/mac/WebView/WebPDFDocumentExtras.mm
+++ b/WebKit/mac/WebView/WebPDFDocumentExtras.mm
@@ -112,6 +112,8 @@ NSArray *allScriptsInPDFDocument(PDFDocument *document)
if (CGPDFDictionaryGetStream(javaScriptAction, "JS", &stream)) {
CGPDFDataFormat format;
data.adoptCF(CGPDFStreamCopyData(stream, &format));
+ if (!data)
+ continue;
bytes = CFDataGetBytePtr(data.get());
length = CFDataGetLength(data.get());
} else if (CGPDFDictionaryGetString(javaScriptAction, "JS", &string)) {
diff --git a/WebKit/mac/WebView/WebPDFRepresentation.mm b/WebKit/mac/WebView/WebPDFRepresentation.mm
index 36449f3..44a1362 100644
--- a/WebKit/mac/WebView/WebPDFRepresentation.mm
+++ b/WebKit/mac/WebView/WebPDFRepresentation.mm
@@ -70,15 +70,15 @@
return PDFDocumentClass;
}
-- (void)setDataSource:(WebDataSource *)dataSource;
+- (void)setDataSource:(WebDataSource *)dataSource
{
}
-- (void)receivedData:(NSData *)data withDataSource:(WebDataSource *)dataSource;
+- (void)receivedData:(NSData *)data withDataSource:(WebDataSource *)dataSource
{
}
-- (void)receivedError:(NSError *)error withDataSource:(WebDataSource *)dataSource;
+- (void)receivedError:(NSError *)error withDataSource:(WebDataSource *)dataSource
{
}
diff --git a/WebKit/mac/WebView/WebPDFView.h b/WebKit/mac/WebView/WebPDFView.h
index bdd2a6e..e480a1b 100644
--- a/WebKit/mac/WebView/WebPDFView.h
+++ b/WebKit/mac/WebView/WebPDFView.h
@@ -32,7 +32,7 @@
@class PDFView;
@class WebDataSource;
-@interface WebPDFView : NSView <WebDocumentView, WebDocumentSearching, WebDocumentIncrementalSearching, WebMultipleTextMatches, WebDocumentSelection, WebDocumentElement, _WebDocumentViewState, _WebDocumentZooming>
+@interface WebPDFView : NSView <WebDocumentView, WebDocumentSearching, WebDocumentIncrementalSearching, WebMultipleTextMatches, WebDocumentSelection, WebDocumentElement, WebDocumentPDF, _WebDocumentViewState, _WebDocumentZooming>
{
NSView *previewView;
PDFView *PDFSubview;
@@ -51,5 +51,6 @@
+ (NSBundle *)PDFKitBundle;
- (void)setPDFDocument:(PDFDocument *)doc;
+- (PDFDocument *)PDFDocument;
@end
diff --git a/WebKit/mac/WebView/WebPDFView.mm b/WebKit/mac/WebView/WebPDFView.mm
index a38412e..70fceb6 100644
--- a/WebKit/mac/WebView/WebPDFView.mm
+++ b/WebKit/mac/WebView/WebPDFView.mm
@@ -182,12 +182,18 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec
_ignoreScaleAndDisplayModeAndPageNotifications = NO;
}
+- (PDFDocument *)PDFDocument
+{
+ return [PDFSubview document];
+}
+
#pragma mark NSObject OVERRIDES
- (void)dealloc
{
[dataSource release];
[previewView release];
+ [PDFSubview setDelegate:nil];
[PDFSubview release];
[path release];
[PDFSubviewProxy release];
@@ -622,6 +628,11 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec
- (NSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(NSUInteger)limit
{
+ return [self countMatchesForText:string caseSensitive:caseFlag limit:limit markMatches:YES];
+}
+
+- (NSUInteger)countMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(NSUInteger)limit markMatches:(BOOL)markMatches
+{
PDFSelection *previousMatch = nil;
PDFSelection *nextMatch = nil;
NSMutableArray *matches = [[NSMutableArray alloc] initWithCapacity:limit];
diff --git a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
index b8e912e..5c6b530 100644
--- a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
+++ b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
@@ -51,6 +51,7 @@
#define WebKitJavaScriptEnabledPreferenceKey @"WebKitJavaScriptEnabled"
#define WebKitWebSecurityEnabledPreferenceKey @"WebKitWebSecurityEnabled"
#define WebKitAllowUniversalAccessFromFileURLsPreferenceKey @"WebKitAllowUniversalAccessFromFileURLs"
+#define WebKitAllowFileAccessFromFileURLsPreferenceKey @"WebKitAllowFileAccessFromFileURLs"
#define WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey @"WebKitJavaScriptCanOpenWindowsAutomatically"
#define WebKitPluginsEnabledPreferenceKey @"WebKitPluginsEnabled"
#define WebKitDatabasesEnabledPreferenceKey @"WebKitDatabasesEnabledPreferenceKey"
@@ -82,15 +83,24 @@
#define WebKitLocalStorageDatabasePathPreferenceKey @"WebKitLocalStorageDatabasePathPreferenceKey"
#define WebKitEnableFullDocumentTeardownPreferenceKey @"WebKitEnableFullDocumentTeardown"
#define WebKitOfflineWebApplicationCacheEnabledPreferenceKey @"WebKitOfflineWebApplicationCacheEnabled"
+#define WebKitApplicationCacheTotalQuota @"WebKitApplicationCacheTotalQuota"
+#define WebKitApplicationCacheDefaultOriginQuota @"WebKitApplicationCacheDefaultOriginQuota"
#define WebKitZoomsTextOnlyPreferenceKey @"WebKitZoomsTextOnly"
+#define WebKitJavaScriptCanAccessClipboardPreferenceKey @"WebKitJavaScriptCanAccessClipboard"
#define WebKitXSSAuditorEnabledPreferenceKey @"WebKitXSSAuditorEnabled"
#define WebKitAcceleratedCompositingEnabledPreferenceKey @"WebKitAcceleratedCompositingEnabled"
#define WebKitShowDebugBordersPreferenceKey @"WebKitShowDebugBorders"
#define WebKitShowRepaintCounterPreferenceKey @"WebKitShowRepaintCounter"
#define WebKitWebGLEnabledPreferenceKey @"WebKitWebGLEnabled"
-#define WebKitUsesProxiedOpenPanelPreferenceKey @"WebKitUsesProxiedOpenPanel"
+#define WebKitAccelerated2dCanvasEnabledPreferenceKey @"WebKitAccelerated2dCanvasEnabled"
#define WebKitPluginAllowedRunTimePreferenceKey @"WebKitPluginAllowedRunTime"
-#define WebKitFrameSetFlatteningEnabledPreferenceKey @"WebKitFrameSetFlatteningEnabled"
+#define WebKitFrameFlatteningEnabledPreferenceKey @"WebKitFrameFlatteningEnabled"
+#define WebKitSpatialNavigationEnabledPreferenceKey @"WebKitSpatialNavigationEnabled"
+#define WebKitPaginateDuringLayoutEnabledPreferenceKey @"WebKitPaginateDuringLayoutEnabled"
+#define WebKitDNSPrefetchingEnabledPreferenceKey @"WebKitDNSPrefetchingEnabled"
+#define WebKitFullScreenEnabledPreferenceKey @"WebKitFullScreenEnabled"
+#define WebKitMemoryInfoEnabledPreferenceKey @"WebKitMemoryInfoEnabled"
+#define WebKitHyperlinkAuditingEnabledPreferenceKey @"WebKitHyperlinkAuditingEnabled"
// These are private both because callers should be using the cover methods and because the
// cover methods themselves are private.
@@ -102,6 +112,8 @@
#define WebKitEditableLinkBehaviorPreferenceKey @"WebKitEditableLinkBehavior"
#define WebKitCacheModelPreferenceKey @"WebKitCacheModelPreferenceKey"
#define WebKitTextDirectionSubmenuInclusionBehaviorPreferenceKey @"WebKitTextDirectionSubmenuInclusionBehaviorPreferenceKey"
+#define WebKitEditingBehaviorPreferenceKey @"WebKitEditingBehavior"
+#define WebKitUsePreHTML5ParserQuirksKey @"WebKitUsePreHTML5ParserQuirks"
// CoreGraphics deferred updates are disabled if WebKitEnableCoalescedUpdatesPreferenceKey is set
// to NO, or has no value. For compatibility with Mac OS X 10.4.6, deferred updates are OFF by
diff --git a/WebKit/mac/WebView/WebPreferences.mm b/WebKit/mac/WebView/WebPreferences.mm
index a1176a9..ed06188 100644
--- a/WebKit/mac/WebView/WebPreferences.mm
+++ b/WebKit/mac/WebView/WebPreferences.mm
@@ -30,6 +30,7 @@
#import "WebPreferencesPrivate.h"
#import "WebPreferenceKeysPrivate.h"
+#import "WebApplicationCache.h"
#import "WebKitLogging.h"
#import "WebKitNSStringExtras.h"
#import "WebKitSystemBits.h"
@@ -37,6 +38,7 @@
#import "WebKitVersionChecks.h"
#import "WebNSDictionaryExtras.h"
#import "WebNSURLExtras.h"
+#import <WebCore/ApplicationCacheStorage.h>
NSString *WebPreferencesChangedNotification = @"WebPreferencesChangedNotification";
NSString *WebPreferencesRemovedNotification = @"WebPreferencesRemovedNotification";
@@ -170,13 +172,15 @@ static WebCacheModel cacheModelForMainBundle(void)
- (void)_setIntegerValue:(int)value forKey:(NSString *)key;
- (float)_floatValueForKey:(NSString *)key;
- (void)_setFloatValue:(float)value forKey:(NSString *)key;
+- (void)_setLongLongValue:(long long)value forKey:(NSString *)key;
+- (long long)_longLongValueForKey:(NSString *)key;
- (void)_setUnsignedLongLongValue:(unsigned long long)value forKey:(NSString *)key;
- (unsigned long long)_unsignedLongLongValueForKey:(NSString *)key;
@end
@implementation WebPreferences
-- init
+- (id)init
{
// Create fake identifier
static int instanceCount = 1;
@@ -316,6 +320,7 @@ static WebCacheModel cacheModelForMainBundle(void)
[NSNumber numberWithBool:YES], WebKitJavaScriptEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitWebSecurityEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitAllowUniversalAccessFromFileURLsPreferenceKey,
+ [NSNumber numberWithBool:YES], WebKitAllowFileAccessFromFileURLsPreferenceKey,
[NSNumber numberWithBool:YES], WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey,
[NSNumber numberWithBool:YES], WebKitPluginsEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitDatabasesEnabledPreferenceKey,
@@ -333,6 +338,7 @@ static WebCacheModel cacheModelForMainBundle(void)
@"0", WebKitPDFScaleFactorPreferenceKey,
@"0", WebKitUseSiteSpecificSpoofingPreferenceKey,
[NSNumber numberWithInt:WebKitEditableLinkDefaultBehavior], WebKitEditableLinkBehaviorPreferenceKey,
+ [NSNumber numberWithInt:WebKitEditingMacBehavior], WebKitEditingBehaviorPreferenceKey,
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
[NSNumber numberWithInt:WebTextDirectionSubmenuAutomaticallyIncluded],
#else
@@ -349,14 +355,23 @@ static WebCacheModel cacheModelForMainBundle(void)
[NSNumber numberWithBool:NO], WebKitLocalFileContentSniffingEnabledPreferenceKey,
[NSNumber numberWithBool:NO], WebKitOfflineWebApplicationCacheEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitZoomsTextOnlyPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitJavaScriptCanAccessClipboardPreferenceKey,
[NSNumber numberWithBool:YES], WebKitXSSAuditorEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitAcceleratedCompositingEnabledPreferenceKey,
[NSNumber numberWithBool:NO], WebKitShowDebugBordersPreferenceKey,
[NSNumber numberWithBool:NO], WebKitShowRepaintCounterPreferenceKey,
[NSNumber numberWithBool:NO], WebKitWebGLEnabledPreferenceKey,
- [NSNumber numberWithBool:NO], WebKitUsesProxiedOpenPanelPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitAccelerated2dCanvasEnabledPreferenceKey,
[NSNumber numberWithUnsignedInt:4], WebKitPluginAllowedRunTimePreferenceKey,
- [NSNumber numberWithBool:NO], WebKitFrameSetFlatteningEnabledPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitFrameFlatteningEnabledPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitSpatialNavigationEnabledPreferenceKey,
+ [NSNumber numberWithBool:YES], WebKitDNSPrefetchingEnabledPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitFullScreenEnabledPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitMemoryInfoEnabledPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitHyperlinkAuditingEnabledPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitUsePreHTML5ParserQuirksKey,
+ [NSNumber numberWithLongLong:WebCore::ApplicationCacheStorage::noQuota()], WebKitApplicationCacheTotalQuota,
+ [NSNumber numberWithLongLong:WebCore::ApplicationCacheStorage::noQuota()], WebKitApplicationCacheDefaultOriginQuota,
nil];
// This value shouldn't ever change, which is assumed in the initialization of WebKitPDFDisplayModePreferenceKey above
@@ -454,6 +469,23 @@ static WebCacheModel cacheModelForMainBundle(void)
[self _postPreferencesChangesNotification];
}
+- (long long)_longLongValueForKey:(NSString *)key
+{
+ id o = [self _valueForKey:key];
+ return [o respondsToSelector:@selector(longLongValue)] ? [o longLongValue] : 0;
+}
+
+- (void)_setLongLongValue:(long long)value forKey:(NSString *)key
+{
+ if ([self _longLongValueForKey:key] == value)
+ return;
+ NSString *_key = KEY(key);
+ [_private->values _webkit_setLongLong:value forKey:_key];
+ if (_private->autosaves)
+ [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithLongLong:value] forKey:_key];
+ [self _postPreferencesChangesNotification];
+}
+
- (unsigned long long)_unsignedLongLongValueForKey:(NSString *)key
{
id o = [self _valueForKey:key];
@@ -612,7 +644,10 @@ static WebCacheModel cacheModelForMainBundle(void)
} else {
locationString = [URL _web_originalDataAsString];
}
-
+
+ if (!locationString)
+ locationString = @"";
+
[self _setStringValue:locationString forKey: WebKitUserStyleSheetLocationPreferenceKey];
}
@@ -751,6 +786,16 @@ static WebCacheModel cacheModelForMainBundle(void)
@implementation WebPreferences (WebPrivate)
+- (BOOL)isDNSPrefetchingEnabled
+{
+ return [self _boolValueForKey:WebKitDNSPrefetchingEnabledPreferenceKey];
+}
+
+- (void)setDNSPrefetchingEnabled:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitDNSPrefetchingEnabledPreferenceKey];
+}
+
- (BOOL)developerExtrasEnabled
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
@@ -830,6 +875,16 @@ static WebCacheModel cacheModelForMainBundle(void)
[self _setBoolValue:flag forKey:WebKitZoomsTextOnlyPreferenceKey];
}
+- (BOOL)javaScriptCanAccessClipboard
+{
+ return [self _boolValueForKey:WebKitJavaScriptCanAccessClipboardPreferenceKey];
+}
+
+- (void)setJavaScriptCanAccessClipboard:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitJavaScriptCanAccessClipboardPreferenceKey];
+}
+
- (BOOL)isXSSAuditorEnabled
{
return [self _boolValueForKey:WebKitXSSAuditorEnabledPreferenceKey];
@@ -920,6 +975,16 @@ static WebCacheModel cacheModelForMainBundle(void)
[self _setBoolValue: flag forKey: WebKitAllowUniversalAccessFromFileURLsPreferenceKey];
}
+- (BOOL)allowFileAccessFromFileURLs
+{
+ return [self _boolValueForKey: WebKitAllowFileAccessFromFileURLsPreferenceKey];
+}
+
+- (void)setAllowFileAccessFromFileURLs:(BOOL)flag
+{
+ [self _setBoolValue: flag forKey: WebKitAllowFileAccessFromFileURLsPreferenceKey];
+}
+
- (NSTimeInterval)_backForwardCacheExpirationInterval
{
// FIXME: There's probably no good reason to read from the standard user defaults instead of self.
@@ -936,6 +1001,29 @@ static WebCacheModel cacheModelForMainBundle(void)
[self _setFloatValue:factor forKey:WebKitPDFScaleFactorPreferenceKey];
}
+- (int64_t)applicationCacheTotalQuota
+{
+ return [self _longLongValueForKey:WebKitApplicationCacheTotalQuota];
+}
+
+- (void)setApplicationCacheTotalQuota:(int64_t)quota
+{
+ [self _setLongLongValue:quota forKey:WebKitApplicationCacheTotalQuota];
+
+ // Application Cache Preferences are stored on the global cache storage manager, not in Settings.
+ [WebApplicationCache setMaximumSize:quota];
+}
+
+- (int64_t)applicationCacheDefaultOriginQuota
+{
+ return [self _longLongValueForKey:WebKitApplicationCacheDefaultOriginQuota];
+}
+
+- (void)setApplicationCacheDefaultOriginQuota:(int64_t)quota
+{
+ [self _setLongLongValue:quota forKey:WebKitApplicationCacheDefaultOriginQuota];
+}
+
- (PDFDisplayMode)PDFDisplayMode
{
PDFDisplayMode value = [self _integerValueForKey:WebKitPDFDisplayModePreferenceKey];
@@ -1086,8 +1174,8 @@ static WebCacheModel cacheModelForMainBundle(void)
{
NSString *systemEncodingName = (NSString *)CFStringConvertEncodingToIANACharSetName([self _systemCFStringEncoding]);
- // CFStringConvertEncodingToIANACharSetName() returns cp949 for kTextEncodingDOSKorean AKA "extended EUC-KR" AKA windows-939.
- // ICU uses this name for a different encoding, so we need to change the name to a value that actually gives us windows-939.
+ // CFStringConvertEncodingToIANACharSetName() returns cp949 for kTextEncodingDOSKorean AKA "extended EUC-KR" AKA windows-949.
+ // ICU uses this name for a different encoding, so we need to change the name to a value that actually gives us windows-949.
// In addition, this value must match what is used in Safari, see <rdar://problem/5579292>.
// On some OS versions, the result is CP949 (uppercase).
if ([systemEncodingName _webkit_isCaseInsensitiveEqualToString:@"cp949"])
@@ -1185,14 +1273,14 @@ static NSString *classIBCreatorID = nil;
[self _setBoolValue:enabled forKey:WebKitWebGLEnabledPreferenceKey];
}
-- (BOOL)usesProxiedOpenPanel
+- (BOOL)accelerated2dCanvasEnabled
{
- return [self _boolValueForKey:WebKitUsesProxiedOpenPanelPreferenceKey];
+ return [self _boolValueForKey:WebKitAccelerated2dCanvasEnabledPreferenceKey];
}
-- (void)setUsesProxiedOpenPanel:(BOOL)enabled
+- (void)setAccelerated2dCanvasEnabled:(BOOL)enabled
{
- [self _setBoolValue:enabled forKey:WebKitUsesProxiedOpenPanelPreferenceKey];
+ [self _setBoolValue:enabled forKey:WebKitAccelerated2dCanvasEnabledPreferenceKey];
}
- (unsigned)pluginAllowedRunTime
@@ -1205,14 +1293,74 @@ static NSString *classIBCreatorID = nil;
return [self _setIntegerValue:allowedRunTime forKey:WebKitPluginAllowedRunTimePreferenceKey];
}
-- (BOOL)isFrameSetFlatteningEnabled
+- (BOOL)isFrameFlatteningEnabled
{
- return [self _boolValueForKey:WebKitFrameSetFlatteningEnabledPreferenceKey];
+ return [self _boolValueForKey:WebKitFrameFlatteningEnabledPreferenceKey];
}
-- (void)setFrameSetFlatteningEnabled:(BOOL)flag
+- (void)setFrameFlatteningEnabled:(BOOL)flag
{
- [self _setBoolValue:flag forKey:WebKitFrameSetFlatteningEnabledPreferenceKey];
+ [self _setBoolValue:flag forKey:WebKitFrameFlatteningEnabledPreferenceKey];
+}
+
+- (BOOL)isSpatialNavigationEnabled
+{
+ return [self _boolValueForKey:WebKitSpatialNavigationEnabledPreferenceKey];
+}
+
+- (void)setSpatialNavigationEnabled:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitSpatialNavigationEnabledPreferenceKey];
+}
+
+- (BOOL)paginateDuringLayoutEnabled
+{
+ return [self _boolValueForKey:WebKitPaginateDuringLayoutEnabledPreferenceKey];
+}
+
+- (void)setPaginateDuringLayoutEnabled:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitPaginateDuringLayoutEnabledPreferenceKey];
+}
+
+- (BOOL)memoryInfoEnabled
+{
+ return [self _boolValueForKey:WebKitMemoryInfoEnabledPreferenceKey];
+}
+
+- (void)setMemoryInfoEnabled:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitMemoryInfoEnabledPreferenceKey];
+}
+
+- (BOOL)hyperlinkAuditingEnabled
+{
+ return [self _boolValueForKey:WebKitHyperlinkAuditingEnabledPreferenceKey];
+}
+
+- (void)setHyperlinkAuditingEnabled:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitHyperlinkAuditingEnabledPreferenceKey];
+}
+
+- (WebKitEditingBehavior)editingBehavior
+{
+ return static_cast<WebKitEditingBehavior>([self _integerValueForKey:WebKitEditingBehaviorPreferenceKey]);
+}
+
+- (void)setEditingBehavior:(WebKitEditingBehavior)behavior
+{
+ [self _setIntegerValue:behavior forKey:WebKitEditingBehaviorPreferenceKey];
+}
+
+- (BOOL)usePreHTML5ParserQuirks
+{
+ return [self _boolValueForKey:WebKitUsePreHTML5ParserQuirksKey];
+}
+
+- (void)setUsePreHTML5ParserQuirks:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitUsePreHTML5ParserQuirksKey];
}
- (void)didRemoveFromWebView
@@ -1235,6 +1383,21 @@ static NSString *classIBCreatorID = nil;
[self _setStringValue:value forKey:key];
}
+- (void)setFullScreenEnabled:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitFullScreenEnabledPreferenceKey];
+}
+
+- (BOOL)fullScreenEnabled
+{
+ return [self _boolValueForKey:WebKitFullScreenEnabledPreferenceKey];
+}
+
++ (void)setWebKitLinkTimeVersion:(int)version
+{
+ setWebKitLinkTimeVersion(version);
+}
+
@end
@implementation WebPreferences (WebInternal)
diff --git a/WebKit/mac/WebView/WebPreferencesPrivate.h b/WebKit/mac/WebView/WebPreferencesPrivate.h
index 7c84d8d..2ee07d7 100644
--- a/WebKit/mac/WebView/WebPreferencesPrivate.h
+++ b/WebKit/mac/WebView/WebPreferencesPrivate.h
@@ -43,6 +43,12 @@ typedef enum {
WebTextDirectionSubmenuAlwaysIncluded
} WebTextDirectionSubmenuInclusionBehavior;
+typedef enum {
+ WebKitEditingMacBehavior,
+ WebKitEditingWinBehavior,
+ WebKitEditingUnixBehavior
+} WebKitEditingBehavior;
+
extern NSString *WebPreferencesChangedNotification;
extern NSString *WebPreferencesRemovedNotification;
@@ -50,6 +56,9 @@ extern NSString *WebPreferencesRemovedNotification;
// Preferences that might be public in a future release
+- (BOOL)isDNSPrefetchingEnabled;
+- (void)setDNSPrefetchingEnabled:(BOOL)flag;
+
- (BOOL)developerExtrasEnabled;
- (void)setDeveloperExtrasEnabled:(BOOL)flag;
@@ -101,9 +110,15 @@ extern NSString *WebPreferencesRemovedNotification;
- (BOOL)allowUniversalAccessFromFileURLs;
- (void)setAllowUniversalAccessFromFileURLs:(BOOL)flag;
+- (BOOL)allowFileAccessFromFileURLs;
+- (void)setAllowFileAccessFromFileURLs:(BOOL)flag;
+
- (BOOL)zoomsTextOnly;
- (void)setZoomsTextOnly:(BOOL)zoomsTextOnly;
+- (BOOL)javaScriptCanAccessClipboard;
+- (void)setJavaScriptCanAccessClipboard:(BOOL)flag;
+
- (BOOL)isXSSAuditorEnabled;
- (void)setXSSAuditorEnabled:(BOOL)flag;
@@ -113,16 +128,28 @@ extern NSString *WebPreferencesRemovedNotification;
- (unsigned)pluginAllowedRunTime;
- (void)setPluginAllowedRunTime:(unsigned)allowedRunTime;
-- (BOOL)isFrameSetFlatteningEnabled;
-- (void)setFrameSetFlatteningEnabled:(BOOL)flag;
+- (BOOL)isFrameFlatteningEnabled;
+- (void)setFrameFlatteningEnabled:(BOOL)flag;
+
+- (BOOL)isSpatialNavigationEnabled;
+- (void)setSpatialNavigationEnabled:(BOOL)flag;
// zero means do AutoScale
- (float)PDFScaleFactor;
- (void)setPDFScaleFactor:(float)scale;
+- (int64_t)applicationCacheTotalQuota;
+- (void)setApplicationCacheTotalQuota:(int64_t)quota;
+
+- (int64_t)applicationCacheDefaultOriginQuota;
+- (void)setApplicationCacheDefaultOriginQuota:(int64_t)quota;
+
- (WebKitEditableLinkBehavior)editableLinkBehavior;
- (void)setEditableLinkBehavior:(WebKitEditableLinkBehavior)behavior;
+- (WebKitEditingBehavior)editingBehavior;
+- (void)setEditingBehavior:(WebKitEditingBehavior)behavior;
+
- (WebTextDirectionSubmenuInclusionBehavior)textDirectionSubmenuInclusionBehavior;
- (void)setTextDirectionSubmenuInclusionBehavior:(WebTextDirectionSubmenuInclusionBehavior)behavior;
@@ -161,8 +188,17 @@ extern NSString *WebPreferencesRemovedNotification;
- (BOOL)webGLEnabled;
- (void)setWebGLEnabled:(BOOL)enabled;
-- (BOOL)usesProxiedOpenPanel;
-- (void)setUsesProxiedOpenPanel:(BOOL)enabled;
+- (BOOL)accelerated2dCanvasEnabled;
+- (void)setAccelerated2dCanvasEnabled:(BOOL)enabled;
+
+- (BOOL)paginateDuringLayoutEnabled;
+- (void)setPaginateDuringLayoutEnabled:(BOOL)flag;
+
+- (BOOL)memoryInfoEnabled;
+- (void)setMemoryInfoEnabled:(BOOL)enabled;
+
+- (BOOL)hyperlinkAuditingEnabled;
+- (void)setHyperlinkAuditingEnabled:(BOOL)enabled;
// Other private methods
- (void)_postPreferencesChangesNotification;
@@ -174,7 +210,18 @@ extern NSString *WebPreferencesRemovedNotification;
+ (void)_setInitialDefaultTextEncodingToSystemEncoding;
+ (void)_setIBCreatorID:(NSString *)string;
++ (void)setWebKitLinkTimeVersion:(int)version;
+
// For WebView's use only.
- (void)willAddToWebView;
- (void)didRemoveFromWebView;
+
+// Full screen support is dependent on WebCore/WebKit being
+// compiled with ENABLE_FULLSCREEN_API.
+- (void)setFullScreenEnabled:(BOOL)flag;
+- (BOOL)fullScreenEnabled;
+
+- (void)setUsePreHTML5ParserQuirks:(BOOL)flag;
+- (BOOL)usePreHTML5ParserQuirks;
+
@end
diff --git a/WebKit/mac/WebCoreSupport/WebGeolocationMockPrivate.h b/WebKit/mac/WebView/WebRenderLayer.h
index 28895f2..e09983d 100644
--- a/WebKit/mac/WebCoreSupport/WebGeolocationMockPrivate.h
+++ b/WebKit/mac/WebView/WebRenderLayer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -13,7 +13,7 @@
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
@@ -25,9 +25,29 @@
#import <Foundation/Foundation.h>
-@interface WebGeolocationMock : NSObject {
+@class WebFrame;
+
+@interface WebRenderLayer : NSObject
+{
+ NSArray *children;
+ NSString *name;
+ NSString *compositingInfo;
+ NSRect bounds;
+ BOOL composited;
+ BOOL separator;
}
-+ (void)setPosition:(double)latitude:(double)longitude:(double)accuracy;
-+ (void)setError:(int)code:(NSString *)message;
+- (id)initWithWebFrame:(WebFrame *)frame;
+
+- (NSArray *)children;
+
+- (NSString *)name;
+- (NSString *)positionString;
+- (NSString *)widthString;
+- (NSString *)heightString;
+- (NSString *)compositingInfo;
+
+- (BOOL)isComposited;
+- (BOOL)isSeparator;
+
@end
diff --git a/WebKit/mac/WebView/WebRenderLayer.mm b/WebKit/mac/WebView/WebRenderLayer.mm
new file mode 100644
index 0000000..edffac2
--- /dev/null
+++ b/WebKit/mac/WebView/WebRenderLayer.mm
@@ -0,0 +1,280 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "WebRenderLayer.h"
+
+#import "WebFrameInternal.h"
+#import <WebCore/Frame.h>
+#import <WebCore/FrameLoaderClient.h>
+#import <WebCore/PlatformString.h>
+#import <WebCore/RenderLayer.h>
+#import <WebCore/RenderLayerBacking.h>
+#import <WebCore/RenderView.h>
+
+using namespace WebCore;
+
+
+@interface WebRenderLayer(Private)
+
+- (id)initWithRenderLayer:(RenderLayer *)layer;
+- (void)buildDescendantLayers:(RenderLayer*)rootLayer;
+
+@end
+
+@implementation WebRenderLayer
+
++ (NSString *)nameForLayer:(RenderLayer*)layer
+{
+ RenderObject* renderer = layer->renderer();
+ NSString *name = [NSString stringWithUTF8String:renderer->renderName()];
+
+ if (Node* node = renderer->node()) {
+ if (node->isElementNode())
+ name = [name stringByAppendingFormat:@" %@", (NSString *)static_cast<Element*>(node)->tagName()];
+ if (node->hasID())
+ name = [name stringByAppendingFormat:@" id=\"%@\"", (NSString *)static_cast<Element*>(node)->getIdAttribute()];
+
+ if (node->hasClass()) {
+ StyledElement* styledElement = static_cast<StyledElement*>(node);
+ String classes;
+ for (size_t i = 0; i < styledElement->classNames().size(); ++i) {
+ if (i > 0)
+ classes += " ";
+ classes += styledElement->classNames()[i];
+ }
+ name = [name stringByAppendingFormat:@" class=\"%@\"", (NSString *)classes];
+ }
+ }
+
+ if (layer->isReflection())
+ name = [name stringByAppendingString:@" (reflection)"];
+
+ return name;
+}
+
++ (NSString *)compositingInfoForLayer:(RenderLayer*)layer
+{
+ if (!layer->isComposited())
+ return @"";
+
+ NSString *layerType = @"";
+#if USE(ACCELERATED_COMPOSITING)
+ RenderLayerBacking* backing = layer->backing();
+ switch (backing->compositingLayerType()) {
+ case NormalCompositingLayer:
+ layerType = @"composited";
+ break;
+ case TiledCompositingLayer:
+ layerType = @"composited: tiled layer";
+ break;
+ case MediaCompositingLayer:
+ layerType = @"composited for plug-in, video or WebGL";
+ break;
+ case ContainerCompositingLayer:
+ layerType = @"composited: container layer";
+ break;
+ }
+
+ if (backing->hasClippingLayer())
+ layerType = [layerType stringByAppendingString:@" (clipping)"];
+
+ if (backing->hasAncestorClippingLayer())
+ layerType = [layerType stringByAppendingString:@" (clipped)"];
+#endif
+
+ return layerType;
+}
+
+- (id)initWithRenderLayer:(RenderLayer*)layer
+{
+ if ((self = [super init])) {
+ name = [[WebRenderLayer nameForLayer:layer] retain];
+ bounds = layer->absoluteBoundingBox();
+ composited = layer->isComposited();
+ compositingInfo = [[WebRenderLayer compositingInfoForLayer:layer] retain];
+ }
+
+ return self;
+}
+
+- (id)initWithName:(NSString*)layerName
+{
+ if ((self = [super init])) {
+ name = [layerName copy];
+ separator = YES;
+ }
+
+ return self;
+}
+
+// Only called on the root.
+- (id)initWithWebFrame:(WebFrame *)webFrame
+{
+ self = [super init];
+
+ Frame* frame = core(webFrame);
+ if (!frame->loader()->client()->hasHTMLView()) {
+ [self release];
+ return nil;
+ }
+
+ RenderObject* renderer = frame->contentRenderer();
+ if (!renderer) {
+ [self release];
+ return nil;
+ }
+
+ if (renderer->hasLayer()) {
+ RenderLayer* layer = toRenderBoxModelObject(renderer)->layer();
+
+ name = [[WebRenderLayer nameForLayer:layer] retain];
+ bounds = layer->absoluteBoundingBox();
+ composited = layer->isComposited();
+ compositingInfo = [[WebRenderLayer compositingInfoForLayer:layer] retain];
+
+ [self buildDescendantLayers:layer];
+ }
+
+ return self;
+}
+
+- (void)dealloc
+{
+ [children release];
+ [name release];
+ [compositingInfo release];
+ [super dealloc];
+}
+
+- (void)buildDescendantLayers:(RenderLayer*)layer
+{
+ NSMutableArray *childWebLayers = [[NSMutableArray alloc] init];
+
+ // Build children in back to front order.
+
+ if (Vector<RenderLayer*>* negZOrderList = layer->negZOrderList()) {
+ size_t listSize = negZOrderList->size();
+
+ if (listSize) {
+ WebRenderLayer* newLayer = [[WebRenderLayer alloc] initWithName:@"-ve z-order list"];
+ [childWebLayers addObject:newLayer];
+ [newLayer release];
+ }
+
+ for (size_t i = 0; i < listSize; ++i) {
+ RenderLayer* curLayer = negZOrderList->at(i);
+
+ WebRenderLayer* newLayer = [[WebRenderLayer alloc] initWithRenderLayer:curLayer];
+ [newLayer buildDescendantLayers:curLayer];
+
+ [childWebLayers addObject:newLayer];
+ [newLayer release];
+ }
+ }
+
+ if (Vector<RenderLayer*>* normalFlowList = layer->normalFlowList()) {
+ size_t listSize = normalFlowList->size();
+
+ if (listSize) {
+ WebRenderLayer* newLayer = [[WebRenderLayer alloc] initWithName:@"normal flow list"];
+ [childWebLayers addObject:newLayer];
+ [newLayer release];
+ }
+
+ for (size_t i = 0; i < listSize; ++i) {
+ RenderLayer* curLayer = normalFlowList->at(i);
+
+ WebRenderLayer* newLayer = [[WebRenderLayer alloc] initWithRenderLayer:curLayer];
+ [newLayer buildDescendantLayers:curLayer];
+
+ [childWebLayers addObject:newLayer];
+ [newLayer release];
+ }
+ }
+
+ if (Vector<RenderLayer*>* posZOrderList = layer->posZOrderList()) {
+ size_t listSize = posZOrderList->size();
+
+ if (listSize) {
+ WebRenderLayer* newLayer = [[WebRenderLayer alloc] initWithName:@"+ve z-order list"];
+ [childWebLayers addObject:newLayer];
+ [newLayer release];
+ }
+
+ for (size_t i = 0; i < listSize; ++i) {
+ RenderLayer* curLayer = posZOrderList->at(i);
+
+ WebRenderLayer* newLayer = [[WebRenderLayer alloc] initWithRenderLayer:curLayer];
+ [newLayer buildDescendantLayers:curLayer];
+
+ [childWebLayers addObject:newLayer];
+ [newLayer release];
+ }
+ }
+
+ children = childWebLayers;
+}
+
+- (NSArray *)children
+{
+ return children;
+}
+
+- (NSString *)name
+{
+ return name;
+}
+
+- (NSString *)positionString
+{
+ return [NSString stringWithFormat:@"(%.0f, %.0f)", bounds.origin.x, bounds.origin.y];
+}
+
+- (NSString *)widthString
+{
+ return [NSString stringWithFormat:@"%.0f", bounds.size.width];
+}
+
+- (NSString *)heightString
+{
+ return [NSString stringWithFormat:@"%.0f", bounds.size.height];
+}
+
+- (NSString *)compositingInfo
+{
+ return compositingInfo;
+}
+
+- (BOOL)isComposited
+{
+ return composited;
+}
+
+- (BOOL)isSeparator
+{
+ return separator;
+}
+
+@end
diff --git a/WebKit/mac/WebView/WebRenderNode.mm b/WebKit/mac/WebView/WebRenderNode.mm
index 4a839a5..eff1929 100644
--- a/WebKit/mac/WebView/WebRenderNode.mm
+++ b/WebKit/mac/WebView/WebRenderNode.mm
@@ -118,8 +118,15 @@ static WebRenderNode *copyRenderNode(RenderObject* node)
IntRect box = text->linesBoundingBox();
width = box.width();
height = box.height();
+ } else if (node->isRenderInline()) {
+ RenderBoxModelObject* inlineFlow = toRenderBoxModelObject(node);
+ IntRect boundingBox = inlineFlow->borderBoundingBox();
+ x = boundingBox.x();
+ y = boundingBox.y();
+ width = boundingBox.width();
+ height = boundingBox.height();
}
-
+
WebRenderNode *result = [[WebRenderNode alloc] _initWithName:name
position:absPos rect:NSMakeRect(x, y, width, height)
coreFrame:frame children:children];
diff --git a/WebKit/mac/WebView/WebResource.mm b/WebKit/mac/WebView/WebResource.mm
index 735e213..fd02212 100644
--- a/WebKit/mac/WebView/WebResource.mm
+++ b/WebKit/mac/WebView/WebResource.mm
@@ -43,6 +43,7 @@
#import <WebCore/ThreadCheck.h>
#import <WebCore/WebCoreObjCExtras.h>
#import <WebCore/WebCoreURLResponse.h>
+#import <wtf/Threading.h>
using namespace WebCore;
@@ -65,6 +66,7 @@ static NSString * const WebResourceResponseKey = @"WebResourceResponse"
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
@@ -275,7 +277,7 @@ static NSString * const WebResourceResponseKey = @"WebResourceResponse"
return frameName;
}
-- (id)description
+- (NSString *)description
{
return [NSString stringWithFormat:@"<%@ %@>", [self className], [self URL]];
}
diff --git a/WebKit/mac/WebView/WebResourceLoadDelegatePrivate.h b/WebKit/mac/WebView/WebResourceLoadDelegatePrivate.h
index 6dc3f2d..45d9c09 100644
--- a/WebKit/mac/WebView/WebResourceLoadDelegatePrivate.h
+++ b/WebKit/mac/WebView/WebResourceLoadDelegatePrivate.h
@@ -43,6 +43,16 @@
- (void)webView:(WebView *)webView didLoadResourceFromMemoryCache:(NSURLRequest *)request response:(NSURLResponse *)response length:(WebNSInteger)length fromDataSource:(WebDataSource *)dataSource;
- (BOOL)webView:(WebView *)webView resource:(id)identifier shouldUseCredentialStorageForDataSource:(WebDataSource *)dataSource;
+#if WEBKIT_VERSION_MAX_ALLOWED > WEBKIT_VERSION_4_0
+/*!
+ @method webView:resource:canAuthenticateAgainstProtectionSpace:forDataSource:
+ @abstract Inspect an NSURLProtectionSpace before an authentication attempt is made. Only used on Snow Leopard or newer.
+ @param protectionSpace an NSURLProtectionSpace that will be used to generate an authentication challenge
+ @result Return YES if the resource load delegate is prepared to respond to an authentication challenge generated with protectionSpace, NO otherwise
+ */
+- (BOOL)webView:(WebView *)sender resource:(id)identifier canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace forDataSource:(WebDataSource *)dataSource;
+#endif
+
@end
#undef WebNSInteger
diff --git a/WebKit/mac/WebView/WebScriptDebugDelegate.mm b/WebKit/mac/WebView/WebScriptDebugDelegate.mm
index 8489c9b..63a91a9 100644
--- a/WebKit/mac/WebView/WebScriptDebugDelegate.mm
+++ b/WebKit/mac/WebView/WebScriptDebugDelegate.mm
@@ -236,20 +236,20 @@ NSString * const WebScriptErrorLineNumberKey = @"WebScriptErrorLineNumber";
// WebScriptCallFrame. Instead, we need to set the dynamic global object
// and evaluate the JS in the global object's global call frame.
JSGlobalObject* globalObject = _private->debugger->globalObject();
- if (self == _private->debugger->globalCallFrame() && !globalObject->globalData()->dynamicGlobalObject) {
+ if (self == _private->debugger->globalCallFrame() && !globalObject->globalData().dynamicGlobalObject) {
JSGlobalObject* globalObject = _private->debugger->globalObject();
DynamicGlobalObjectScope globalObjectScope(globalObject->globalExec(), globalObject);
JSValue exception;
- JSValue result = evaluateInGlobalCallFrame(String(script), exception, globalObject);
+ JSValue result = evaluateInGlobalCallFrame(stringToUString(script), exception, globalObject);
if (exception)
return [self _convertValueToObjcValue:exception];
return result ? [self _convertValueToObjcValue:result] : nil;
}
JSValue exception;
- JSValue result = _private->debuggerCallFrame->evaluate(String(script), exception);
+ JSValue result = _private->debuggerCallFrame->evaluate(stringToUString(script), exception);
if (exception)
return [self _convertValueToObjcValue:exception];
return result ? [self _convertValueToObjcValue:result] : nil;
diff --git a/WebKit/mac/WebView/WebScriptDebugger.mm b/WebKit/mac/WebView/WebScriptDebugger.mm
index a71d78b..f67b46f 100644
--- a/WebKit/mac/WebView/WebScriptDebugger.mm
+++ b/WebKit/mac/WebView/WebScriptDebugger.mm
@@ -54,7 +54,7 @@ NSString *toNSString(const UString& s)
{
if (s.isEmpty())
return nil;
- return [NSString stringWithCharacters:reinterpret_cast<const unichar*>(s.data()) length:s.size()];
+ return [NSString stringWithCharacters:reinterpret_cast<const unichar*>(s.characters()) length:s.length()];
}
static NSString *toNSString(const SourceCode& s)
@@ -69,7 +69,7 @@ static NSURL *toNSURL(const UString& s)
{
if (s.isEmpty())
return nil;
- return KURL(ParsedURLString, s);
+ return KURL(ParsedURLString, ustringToString(s));
}
static WebFrame *toWebFrame(JSGlobalObject* globalObject)
diff --git a/WebKit/mac/WebView/WebScriptWorld.h b/WebKit/mac/WebView/WebScriptWorld.h
index 7059b76..9a05f7f 100644
--- a/WebKit/mac/WebView/WebScriptWorld.h
+++ b/WebKit/mac/WebView/WebScriptWorld.h
@@ -36,4 +36,6 @@ typedef struct OpaqueJSContext* JSGlobalContextRef;
+ (WebScriptWorld *)scriptWorldForGlobalContext:(JSGlobalContextRef)globalContext;
+- (void)unregisterWorld;
+
@end
diff --git a/WebKit/mac/WebView/WebScriptWorld.mm b/WebKit/mac/WebView/WebScriptWorld.mm
index 7dab1b3..8ca6f44 100644
--- a/WebKit/mac/WebView/WebScriptWorld.mm
+++ b/WebKit/mac/WebView/WebScriptWorld.mm
@@ -75,6 +75,11 @@ static WorldMap& allWorlds()
return [self initWithWorld:ScriptController::createWorld()];
}
+- (void)unregisterWorld
+{
+ _private->world->unregisterWorld();
+}
+
- (void)dealloc
{
ASSERT(allWorlds().contains(_private->world.get()));
diff --git a/WebKit/mac/WebView/WebSerializedJSValue.mm b/WebKit/mac/WebView/WebSerializedJSValue.mm
index af96aa4..d993790 100644
--- a/WebKit/mac/WebView/WebSerializedJSValue.mm
+++ b/WebKit/mac/WebView/WebSerializedJSValue.mm
@@ -22,7 +22,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import "WebSerializedJSValue.h"
+#import "WebSerializedJSValuePrivate.h"
#import <WebCore/SerializedScriptValue.h>
#import <wtf/RefPtr.h>
@@ -40,7 +40,7 @@ using namespace WebCore;
@implementation WebSerializedJSValue
-- (id)initWithValue:(JSValueRef)value context:(JSContextRef)sourceContext exception:(JSValueRef*)exception;
+- (id)initWithValue:(JSValueRef)value context:(JSContextRef)sourceContext exception:(JSValueRef*)exception
{
ASSERT_ARG(value, value);
ASSERT_ARG(sourceContext, sourceContext);
@@ -65,6 +65,30 @@ using namespace WebCore;
return self;
}
+- (id)initWithInternalRepresentation:(void *)internalRepresenatation
+{
+ ASSERT_ARG(internalRepresenatation, internalRepresenatation);
+
+ if (!internalRepresenatation) {
+ [self release];
+ return nil;
+ }
+
+ self = [super init];
+ if (!self)
+ return nil;
+
+ _private = [[WebSerializedJSValuePrivate alloc] init];
+
+ _private->value = ((SerializedScriptValue*)internalRepresenatation);
+ if (!_private->value) {
+ [self release];
+ return nil;
+ }
+
+ return self;
+}
+
- (JSValueRef)deserialize:(JSContextRef)destinationContext
{
if (!_private || !_private->value)
@@ -79,5 +103,12 @@ using namespace WebCore;
[super dealloc];
}
+- (void*)internalRepresentation
+{
+ if (!_private)
+ return 0;
+ return _private->value.get();
+}
+
@end
diff --git a/WebKit/mac/WebView/WebHTMLRepresentationInternal.h b/WebKit/mac/WebView/WebSerializedJSValuePrivate.h
index d42b400..217fe44 100644
--- a/WebKit/mac/WebView/WebHTMLRepresentationInternal.h
+++ b/WebKit/mac/WebView/WebSerializedJSValuePrivate.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,8 +26,9 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import <WebKit/WebHTMLRepresentationPrivate.h>
+#import <WebKit/WebSerializedJSValue.h>
-@interface WebHTMLRepresentation (WebInternal)
-+ (NSArray *)supportedNonImageMIMETypes;
+@interface WebSerializedJSValue(WebPrivate)
+- (id)initWithInternalRepresentation:(void*)internalRepresenatation;
+- (void*)internalRepresentation;
@end
diff --git a/WebKit/mac/WebView/WebTextCompletionController.mm b/WebKit/mac/WebView/WebTextCompletionController.mm
index 4f8e6e0..ab0e621 100644
--- a/WebKit/mac/WebView/WebTextCompletionController.mm
+++ b/WebKit/mac/WebView/WebTextCompletionController.mm
@@ -84,8 +84,7 @@ using namespace std;
NSRect scrollFrame = NSMakeRect(0, 0, 100, 100);
NSRect tableFrame = NSZeroRect;
tableFrame.size = [NSScrollView contentSizeForFrameSize:scrollFrame.size hasHorizontalScroller:NO hasVerticalScroller:YES borderType:NSNoBorder];
- // Added cast to work around problem with multiple Foundation initWithIdentifier: methods with different parameter types.
- NSTableColumn *column = [(NSTableColumn *)[NSTableColumn alloc] initWithIdentifier:[NSNumber numberWithInt:0]];
+ NSTableColumn *column = [[NSTableColumn alloc] init];
[column setWidth:tableFrame.size.width];
[column setEditable:NO];
@@ -173,8 +172,8 @@ using namespace std;
// Get preceeding word stem
WebFrame *frame = [_htmlView _frame];
DOMRange *selection = kit(core(frame)->selection()->toNormalizedRange().get());
- DOMRange *wholeWord = [frame _rangeByAlteringCurrentSelection:SelectionController::EXTEND
- direction:SelectionController::BACKWARD granularity:WordGranularity];
+ DOMRange *wholeWord = [frame _rangeByAlteringCurrentSelection:SelectionController::AlterationExtend
+ direction:SelectionController::DirectionBackward granularity:WordGranularity];
DOMRange *prefix = [wholeWord cloneRange];
[prefix setEnd:[selection startContainer] offset:[selection startOffset]];
diff --git a/WebKit/mac/WebView/WebTextIterator.mm b/WebKit/mac/WebView/WebTextIterator.mm
index 457bece..6029faa 100644
--- a/WebKit/mac/WebView/WebTextIterator.mm
+++ b/WebKit/mac/WebView/WebTextIterator.mm
@@ -31,6 +31,8 @@
#import <JavaScriptCore/Vector.h>
#import <WebCore/TextIterator.h>
#import <WebCore/WebCoreObjCExtras.h>
+#import <runtime/InitializeThreading.h>
+#import <wtf/Threading.h>
using namespace JSC;
using namespace WebCore;
@@ -45,6 +47,8 @@ using namespace WebCore;
+ (void)initialize
{
+ JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
diff --git a/WebKit/mac/WebView/WebUIDelegatePrivate.h b/WebKit/mac/WebView/WebUIDelegatePrivate.h
index a130b18..0b62bcb 100644
--- a/WebKit/mac/WebView/WebUIDelegatePrivate.h
+++ b/WebKit/mac/WebView/WebUIDelegatePrivate.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -32,6 +32,10 @@
#define ENABLE_DASHBOARD_SUPPORT 1
#endif
+#if !defined(ENABLE_FULLSCREEN_API)
+#define ENABLE_FULLSCREEN_API 1
+#endif
+
// Mail on Tiger expects the old value for WebMenuItemTagSearchInGoogle
#define WebMenuItemTagSearchInGoogle OldWebMenuItemTagSearchWeb
@@ -95,6 +99,15 @@ enum {
- (void)deny;
@end
+#if ENABLE_FULLSCREEN_API
+@protocol WebKitFullScreenListener<NSObject>
+- (void)webkitWillEnterFullScreen;
+- (void)webkitDidEnterFullScreen;
+- (void)webkitWillExitFullScreen;
+- (void)webkitDidExitFullScreen;
+@end
+#endif
+
@interface NSObject (WebUIDelegatePrivate)
- (void)webView:(WebView *)webView addMessageToConsole:(NSDictionary *)message;
@@ -115,6 +128,7 @@ enum {
- (void)webView:(WebView *)sender contextMenuItemSelected:(NSMenuItem *)item forElement:(NSDictionary *)element;
- (void)webView:(WebView *)sender saveFrameView:(WebFrameView *)frameView showingPanel:(BOOL)showingPanel;
- (BOOL)webView:(WebView *)sender shouldHaltPlugin:(DOMNode *)pluginNode isWindowed:(BOOL)isWindowed pluginName:(NSString *)pluginName;
+- (BOOL)webView:(WebView *)sender didPressMissingPluginButton:(DOMElement *)element;
/*!
@method webView:frame:exceededDatabaseQuotaForSecurityOrigin:database:
@param sender The WebView sending the delegate method.
@@ -124,6 +138,16 @@ enum {
*/
- (void)webView:(WebView *)sender frame:(WebFrame *)frame exceededDatabaseQuotaForSecurityOrigin:(WebSecurityOrigin *)origin database:(NSString *)databaseIdentifier;
+/*!
+ @method webView:exceededApplicationCacheOriginQuotaForSecurityOrigin:
+ @param sender The WebView sending the delegate method.
+ @param origin The security origin that needs a larger quota
+ @discussion This method is called when a page attempts to store more in the Application Cache
+ for an origin than was allowed by the quota (or default) set for the origin. This allows the
+ quota to be increased for the security origin.
+*/
+- (void)webView:(WebView *)sender exceededApplicationCacheOriginQuotaForSecurityOrigin:(WebSecurityOrigin *)origin;
+
- (WebView *)webView:(WebView *)sender createWebViewWithRequest:(NSURLRequest *)request windowFeatures:(NSDictionary *)features;
- (BOOL)webView:(WebView *)sender shouldReplaceUploadFile:(NSString *)path usingGeneratedFilename:(NSString **)filename;
@@ -141,7 +165,6 @@ enum {
frame:(WebFrame *)frame
listener:(id<WebGeolocationPolicyListener>)listener;
-- (void)webView:(WebView *)sender formStateDidChangeForNode:(DOMNode *)node;
- (void)webView:(WebView *)sender formDidFocusNode:(DOMNode *)node;
- (void)webView:(WebView *)sender formDidBlurNode:(DOMNode *)node;
@@ -154,4 +177,12 @@ enum {
*/
- (void)webView:(WebView *)sender printFrame:(WebFrame *)frame;
+#if ENABLE_FULLSCREEN_API
+- (BOOL)webView:(WebView *)sender supportsFullScreenForElement:(DOMElement *)element;
+- (void)webView:(WebView *)sender enterFullScreenForElement:(DOMElement *)element;
+- (void)webView:(WebView *)sender exitFullScreenForElement:(DOMElement *)element;
+#endif
+
+- (void)webView:(WebView *)sender didDrawFrame:(WebFrame *)frame;
+
@end
diff --git a/WebKit/mac/WebView/WebVideoFullscreenController.h b/WebKit/mac/WebView/WebVideoFullscreenController.h
index 2e0c4c3..69ba9f4 100644
--- a/WebKit/mac/WebView/WebVideoFullscreenController.h
+++ b/WebKit/mac/WebView/WebVideoFullscreenController.h
@@ -48,6 +48,9 @@ namespace WebCore {
BOOL _isEndingFullscreen;
BOOL _isWindowLoaded;
BOOL _forceDisableAnimation;
+ uint32_t _idleDisplaySleepAssertion;
+ uint32_t _idleSystemSleepAssertion;
+ NSTimer *_tickleTimer;
SystemUIMode _savedUIMode;
SystemUIOptions _savedUIOptions;
}
diff --git a/WebKit/mac/WebView/WebVideoFullscreenController.mm b/WebKit/mac/WebView/WebVideoFullscreenController.mm
index e5fde5e..2687b14 100644
--- a/WebKit/mac/WebView/WebVideoFullscreenController.mm
+++ b/WebKit/mac/WebView/WebVideoFullscreenController.mm
@@ -30,6 +30,8 @@
#import "WebTypesInternal.h"
#import "WebVideoFullscreenHUDWindowController.h"
#import "WebWindowAnimation.h"
+#import <IOKit/pwr_mgt/IOPMLib.h>
+#import <OSServices/Power.h>
#import <QTKit/QTKit.h>
#import <WebCore/HTMLMediaElement.h>
#import <WebCore/SoftLinking.h>
@@ -37,11 +39,12 @@
#import <wtf/UnusedParam.h>
SOFT_LINK_FRAMEWORK(QTKit)
-SOFT_LINK_CLASS(QTKit, QTMovieView)
+SOFT_LINK_CLASS(QTKit, QTMovieLayer)
SOFT_LINK_POINTER(QTKit, QTMovieRateDidChangeNotification, NSString *)
#define QTMovieRateDidChangeNotification getQTMovieRateDidChangeNotification()
+static const NSTimeInterval tickleTimerInterval = 1.0;
@interface WebVideoFullscreenWindow : NSWindow
#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_TIGER)
@@ -55,6 +58,13 @@ SOFT_LINK_POINTER(QTKit, QTMovieRateDidChangeNotification, NSString *)
@end
@interface WebVideoFullscreenController(HUDWindowControllerDelegate) <WebVideoFullscreenHUDWindowControllerDelegate>
+- (void)requestExitFullscreenWithAnimation:(BOOL)animation;
+- (void)updateMenuAndDockForFullscreen;
+- (void)updatePowerAssertions;
+@end
+
+@interface NSWindow(IsOnActiveSpaceAdditionForTigerAndLeopard)
+- (BOOL)isOnActiveSpace;
@end
@implementation WebVideoFullscreenController
@@ -74,6 +84,9 @@ SOFT_LINK_POINTER(QTKit, QTMovieRateDidChangeNotification, NSString *)
{
ASSERT(!_backgroundFullscreenWindow);
ASSERT(!_fadeAnimation);
+ [_tickleTimer invalidate];
+ [_tickleTimer release];
+ _tickleTimer = nil;
[[NSNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
}
@@ -85,39 +98,50 @@ SOFT_LINK_POINTER(QTKit, QTMovieRateDidChangeNotification, NSString *)
- (void)windowDidLoad
{
+#ifdef BUILDING_ON_TIGER
+ // WebVideoFullscreenController is not supported on Tiger:
+ ASSERT_NOT_REACHED();
+#else
WebVideoFullscreenWindow *window = [self fullscreenWindow];
- QTMovieView *view = [[getQTMovieViewClass() alloc] init];
- [view setFillColor:[NSColor clearColor]];
- [window setContentView:view];
- [view setControllerVisible:NO];
- [view setPreservesAspectRatio:YES];
- if (_mediaElement)
- [view setMovie:_mediaElement->platformMedia().qtMovie];
+ QTMovieLayer *layer = [[getQTMovieLayerClass() alloc] init];
+ [[window contentView] setLayer:layer];
+ [[window contentView] setWantsLayer:YES];
+ if (_mediaElement && _mediaElement->platformMedia().type == WebCore::PlatformMedia::QTMovieType)
+ [layer setMovie:_mediaElement->platformMedia().media.qtMovie];
[window setHasShadow:YES]; // This is nicer with a shadow.
[window setLevel:NSPopUpMenuWindowLevel-1];
- [view release];
+ [layer release];
+
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidResignActive:) name:NSApplicationDidResignActiveNotification object:NSApp];
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidChangeScreenParameters:) name:NSApplicationDidChangeScreenParametersNotification object:NSApp];
+#endif
}
-- (WebCore::HTMLMediaElement*)mediaElement;
+- (WebCore::HTMLMediaElement*)mediaElement
{
return _mediaElement.get();
}
-- (void)setMediaElement:(WebCore::HTMLMediaElement*)mediaElement;
+- (void)setMediaElement:(WebCore::HTMLMediaElement*)mediaElement
{
+#ifdef BUILDING_ON_TIGER
+ // WebVideoFullscreenController is not supported on Tiger:
+ ASSERT_NOT_REACHED();
+#else
_mediaElement = mediaElement;
if ([self isWindowLoaded]) {
- QTMovieView *movieView = (QTMovieView *)[[self fullscreenWindow] contentView];
- QTMovie *movie = _mediaElement->platformMedia().qtMovie;
+ QTMovie *movie = _mediaElement->platformMedia().type == WebCore::PlatformMedia::QTMovieType ? _mediaElement->platformMedia().media.qtMovie : 0;
+ QTMovieLayer *movieLayer = (QTMovieLayer *)[[[self fullscreenWindow] contentView] layer];
- ASSERT(movieView && [movieView isKindOfClass:[getQTMovieViewClass() class]]);
+ ASSERT(movieLayer && [movieLayer isKindOfClass:[getQTMovieLayerClass() class]]);
ASSERT(movie);
- [movieView setMovie:movie];
+ [movieLayer setMovie:movie];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(rateChanged:)
name:QTMovieRateDidChangeNotification
object:movie];
}
+#endif
}
- (id <WebVideoFullscreenControllerDelegate>)delegate
@@ -125,7 +149,7 @@ SOFT_LINK_POINTER(QTKit, QTMovieRateDidChangeNotification, NSString *)
return _delegate;
}
-- (void)setDelegate:(id <WebVideoFullscreenControllerDelegate>)delegate;
+- (void)setDelegate:(id <WebVideoFullscreenControllerDelegate>)delegate
{
_delegate = delegate;
}
@@ -145,7 +169,8 @@ SOFT_LINK_POINTER(QTKit, QTMovieRateDidChangeNotification, NSString *)
[self clearFadeAnimation];
[[self window] close];
[self setWindow:nil];
- SetSystemUIMode(_savedUIMode, _savedUIOptions);
+ [self updateMenuAndDockForFullscreen];
+ [self updatePowerAssertions];
[_hudController setDelegate:nil];
[_hudController release];
_hudController = nil;
@@ -165,8 +190,8 @@ SOFT_LINK_POINTER(QTKit, QTMovieRateDidChangeNotification, NSString *)
_hudController = [[WebVideoFullscreenHUDWindowController alloc] init];
[_hudController setDelegate:self];
- GetSystemUIMode(&_savedUIMode, &_savedUIOptions);
- SetSystemUIMode(kUIModeAllSuppressed , 0);
+ [self updateMenuAndDockForFullscreen];
+ [self updatePowerAssertions];
[NSCursor setHiddenUntilMouseMoves:YES];
// Give the HUD keyboard focus initially
@@ -178,6 +203,22 @@ SOFT_LINK_POINTER(QTKit, QTMovieRateDidChangeNotification, NSString *)
return _mediaElement->screenRect();
}
+- (void)applicationDidResignActive:(NSNotification*)notification
+{
+ // Check to see if the fullscreenWindow is on the active space; this function is available
+ // on 10.6 and later, so default to YES if the function is not available:
+ NSWindow* fullscreenWindow = [self fullscreenWindow];
+ BOOL isOnActiveSpace = ([fullscreenWindow respondsToSelector:@selector(isOnActiveSpace)] ? [fullscreenWindow isOnActiveSpace] : YES);
+
+ // Replicate the QuickTime Player (X) behavior when losing active application status:
+ // Is the fullscreen screen the main screen? (Note: this covers the case where only a
+ // single screen is available.) Is the fullscreen screen on the current space? IFF so,
+ // then exit fullscreen mode.
+ if ([fullscreenWindow screen] == [[NSScreen screens] objectAtIndex:0] && isOnActiveSpace)
+ [self requestExitFullscreenWithAnimation:NO];
+}
+
+
#pragma mark -
#pragma mark Exposed Interface
@@ -205,7 +246,6 @@ static NSWindow *createBackgroundFullscreenWindow(NSRect frame, int level)
[window setOpaque:YES];
[window setBackgroundColor:[NSColor blackColor]];
[window setLevel:level];
- [window setHidesOnDeactivate:YES];
[window setReleasedWhenClosed:NO];
return window;
}
@@ -221,7 +261,7 @@ static NSWindow *createBackgroundFullscreenWindow(NSRect frame, int level)
_fadeAnimation = [[WebWindowFadeAnimation alloc] initWithDuration:0.2 window:_backgroundFullscreenWindow initialAlpha:initialAlpha finalAlpha:fadeIn ? 1 : 0];
}
-- (void)enterFullscreen:(NSScreen *)screen;
+- (void)enterFullscreen:(NSScreen *)screen
{
if (!screen)
screen = [NSScreen mainScreen];
@@ -269,6 +309,119 @@ static NSWindow *createBackgroundFullscreenWindow(NSRect frame, int level)
[[self fullscreenWindow] animateFromRect:[[self window] frame] toRect:endFrame withSubAnimation:_fadeAnimation controllerAction:@selector(windowDidExitFullscreen)];
}
+- (void)applicationDidChangeScreenParameters:(NSNotification*)notification
+{
+ // The user may have changed the main screen by moving the menu bar, or they may have changed
+ // the Dock's size or location, or they may have changed the fullscreen screen's dimensions.
+ // Update our presentation parameters, and ensure that the full screen window occupies the
+ // entire screen:
+ [self updateMenuAndDockForFullscreen];
+ [[self window] setFrame:[[[self window] screen] frame] display:YES];
+}
+
+- (void)updateMenuAndDockForFullscreen
+{
+ // NSApplicationPresentationOptions is available on > 10.6 only:
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+ NSApplicationPresentationOptions options = NSApplicationPresentationDefault;
+ NSScreen* fullscreenScreen = [[self window] screen];
+
+ if (!_isEndingFullscreen) {
+ // Auto-hide the menu bar if the fullscreenScreen contains the menu bar:
+ // NOTE: if the fullscreenScreen contains the menu bar but not the dock, we must still
+ // auto-hide the dock, or an exception will be thrown.
+ if ([[NSScreen screens] objectAtIndex:0] == fullscreenScreen)
+ options |= (NSApplicationPresentationAutoHideMenuBar | NSApplicationPresentationAutoHideDock);
+ // Check if the current screen contains the dock by comparing the screen's frame to its
+ // visibleFrame; if a dock is present, the visibleFrame will differ. If the current screen
+ // contains the dock, hide it.
+ else if (!NSEqualRects([fullscreenScreen frame], [fullscreenScreen visibleFrame]))
+ options |= NSApplicationPresentationAutoHideDock;
+ }
+
+ if ([NSApp respondsToSelector:@selector(setPresentationOptions:)])
+ [NSApp setPresentationOptions:options];
+ else
+#endif
+ SetSystemUIMode(_isEndingFullscreen ? kUIModeNormal : kUIModeAllHidden, 0);
+}
+
+#if !defined(BUILDING_ON_TIGER) // IOPMAssertionCreateWithName not defined on < 10.5
+- (void)_disableIdleDisplaySleep
+{
+ if (_idleDisplaySleepAssertion == kIOPMNullAssertionID)
+#if defined(BUILDING_ON_LEOPARD) // IOPMAssertionCreateWithName is not defined in the 10.5 SDK
+ IOPMAssertionCreate(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, &_idleDisplaySleepAssertion);
+#else // IOPMAssertionCreate is depreciated in > 10.5
+ IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, CFSTR("WebKit playing a video fullscreen."), &_idleDisplaySleepAssertion);
+#endif
+}
+
+- (void)_enableIdleDisplaySleep
+{
+ if (_idleDisplaySleepAssertion != kIOPMNullAssertionID) {
+ IOPMAssertionRelease(_idleDisplaySleepAssertion);
+ _idleDisplaySleepAssertion = kIOPMNullAssertionID;
+ }
+}
+
+- (void)_disableIdleSystemSleep
+{
+ if (_idleSystemSleepAssertion == kIOPMNullAssertionID)
+#if defined(BUILDING_ON_LEOPARD) // IOPMAssertionCreateWithName is not defined in the 10.5 SDK
+ IOPMAssertionCreate(kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionLevelOn, &_idleSystemSleepAssertion);
+#else // IOPMAssertionCreate is depreciated in > 10.5
+ IOPMAssertionCreateWithName(kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionLevelOn, CFSTR("WebKit playing a video fullscreen."), &_idleSystemSleepAssertion);
+#endif
+}
+
+- (void)_enableIdleSystemSleep
+{
+ if (_idleSystemSleepAssertion != kIOPMNullAssertionID) {
+ IOPMAssertionRelease(_idleSystemSleepAssertion);
+ _idleSystemSleepAssertion = kIOPMNullAssertionID;
+ }
+}
+
+- (void)_enableTickleTimer
+{
+ [_tickleTimer invalidate];
+ [_tickleTimer release];
+ _tickleTimer = [[NSTimer scheduledTimerWithTimeInterval:tickleTimerInterval target:self selector:@selector(_tickleTimerFired) userInfo:nil repeats:YES] retain];
+}
+
+- (void)_disableTickleTimer
+{
+ [_tickleTimer invalidate];
+ [_tickleTimer release];
+ _tickleTimer = nil;
+}
+
+- (void)_tickleTimerFired
+{
+ UpdateSystemActivity(OverallAct);
+}
+#endif
+
+- (void)updatePowerAssertions
+{
+#if !defined(BUILDING_ON_TIGER)
+ float rate = 0;
+ if (_mediaElement && _mediaElement->platformMedia().type == WebCore::PlatformMedia::QTMovieType)
+ rate = [_mediaElement->platformMedia().media.qtMovie rate];
+
+ if (rate && !_isEndingFullscreen) {
+ [self _disableIdleSystemSleep];
+ [self _disableIdleDisplaySleep];
+ [self _enableTickleTimer];
+ } else {
+ [self _enableIdleSystemSleep];
+ [self _enableIdleDisplaySleep];
+ [self _disableTickleTimer];
+ }
+#endif
+}
+
#pragma mark -
#pragma mark Window callback
@@ -306,6 +459,7 @@ static NSWindow *createBackgroundFullscreenWindow(NSRect frame, int level)
{
UNUSED_PARAM(unusedNotification);
[_hudController updateRate];
+ [self updatePowerAssertions];
}
@end
@@ -320,7 +474,6 @@ static NSWindow *createBackgroundFullscreenWindow(NSRect frame, int level)
return nil;
[self setOpaque:NO];
[self setBackgroundColor:[NSColor clearColor]];
- [self setHidesOnDeactivate:YES];
[self setIgnoresMouseEvents:NO];
[self setAcceptsMouseMovedEvents:YES];
return self;
@@ -445,12 +598,6 @@ static NSWindow *createBackgroundFullscreenWindow(NSRect frame, int level)
[[self windowController] fadeHUDIn];
}
-- (void)resignKeyWindow
-{
- [super resignKeyWindow];
- [[self windowController] requestExitFullscreenWithAnimation:NO];
-}
-
@end
#endif /* ENABLE(VIDEO) */
diff --git a/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm b/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm
index 83e2d09..6907311 100644
--- a/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm
+++ b/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm
@@ -91,7 +91,6 @@ static inline CGFloat webkit_CGFloor(CGFloat value)
[self setAcceptsMouseMovedEvents:YES];
[self setIgnoresMouseEvents:NO];
[self setMovableByWindowBackground:YES];
- [self setHidesOnDeactivate:YES];
return self;
}
@@ -346,9 +345,9 @@ static NSTextField *createTimeTextField(NSRect frame)
static const CGFloat volumeButtonHeight = 16;
static const CGFloat volumeUpButtonLeftMargin = 4;
static const CGFloat volumeControlsTopMargin = 13;
- static const CGFloat exitFullScreenButtonWidth = 25;
- static const CGFloat exitFullScreenButtonHeight = 21;
- static const CGFloat exitFullScreenButtonTopMargin = 11;
+ static const CGFloat exitFullscreenButtonWidth = 25;
+ static const CGFloat exitFullscreenButtonHeight = 21;
+ static const CGFloat exitFullscreenButtonTopMargin = 11;
static const CGFloat timelineWidth = 315;
static const CGFloat timelineHeight = 14;
static const CGFloat timelineBottomMargin = 7;
@@ -380,8 +379,8 @@ static NSTextField *createTimeTextField(NSRect frame)
[_playButton setAction:@selector(togglePlaying:)];
[contentView addSubview:_playButton];
- CGFloat closeToRight = windowWidth - horizontalMargin - exitFullScreenButtonWidth;
- NSControl *exitFullscreenButton = createControlWithMediaUIControlType(WKMediaUIControlExitFullscreenButton, NSMakeRect(closeToRight, windowHeight - exitFullScreenButtonTopMargin - exitFullScreenButtonHeight, exitFullScreenButtonWidth, exitFullScreenButtonHeight));
+ CGFloat closeToRight = windowWidth - horizontalMargin - exitFullscreenButtonWidth;
+ NSControl *exitFullscreenButton = createControlWithMediaUIControlType(WKMediaUIControlExitFullscreenButton, NSMakeRect(closeToRight, windowHeight - exitFullscreenButtonTopMargin - exitFullscreenButtonHeight, exitFullscreenButtonWidth, exitFullscreenButtonHeight));
[exitFullscreenButton setAction:@selector(exitFullscreen:)];
[exitFullscreenButton setTarget:self];
[contentView addSubview:exitFullscreenButton];
diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm
index 4b449de..49bb451 100644
--- a/WebKit/mac/WebView/WebView.mm
+++ b/WebKit/mac/WebView/WebView.mm
@@ -1,6 +1,7 @@
/*
- * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
* Copyright (C) 2006 David Smith (catfish.man@gmail.com)
+ * Copyright (C) 2010 Igalia S.L
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -33,6 +34,7 @@
#import "DOMCSSStyleDeclarationInternal.h"
#import "DOMNodeInternal.h"
#import "DOMRangeInternal.h"
+#import "WebApplicationCache.h"
#import "WebBackForwardListInternal.h"
#import "WebBaseNetscapePluginView.h"
#import "WebCache.h"
@@ -45,6 +47,8 @@
#import "WebDefaultPolicyDelegate.h"
#import "WebDefaultUIDelegate.h"
#import "WebDelegateImplementationCaching.h"
+#import "WebDeviceOrientationClient.h"
+#import "WebDeviceOrientationProvider.h"
#import "WebDocument.h"
#import "WebDocumentInternal.h"
#import "WebDownload.h"
@@ -86,6 +90,7 @@
#import "WebPDFView.h"
#import "WebPanelAuthenticationHandler.h"
#import "WebPasteboardHelper.h"
+#import "WebPlatformStrategies.h"
#import "WebPluginDatabase.h"
#import "WebPluginHalterClient.h"
#import "WebPolicyDelegate.h"
@@ -101,10 +106,14 @@
#import "WebVideoFullscreenController.h"
#import <CoreFoundation/CFSet.h>
#import <Foundation/NSURLConnection.h>
+#import <JavaScriptCore/APICast.h>
+#import <JavaScriptCore/JSValueRef.h>
+#import <WebCore/AbstractDatabase.h>
#import <WebCore/ApplicationCacheStorage.h>
-#import <WebCore/BackForwardList.h>
-#import <WebCore/Cache.h>
+#import <WebCore/BackForwardListImpl.h>
+#import <WebCore/MemoryCache.h>
#import <WebCore/ColorMac.h>
+#import <WebCore/CSSComputedStyleDeclaration.h>
#import <WebCore/Cursor.h>
#import <WebCore/Document.h>
#import <WebCore/DocumentLoader.h>
@@ -123,16 +132,23 @@
#import <WebCore/HTMLNames.h>
#import <WebCore/HistoryItem.h>
#import <WebCore/IconDatabase.h>
+#import <WebCore/JSCSSStyleDeclaration.h>
+#import <WebCore/JSDocument.h>
+#import <WebCore/JSElement.h>
+#import <WebCore/JSNodeList.h>
#import <WebCore/Logging.h>
#import <WebCore/MIMETypeRegistry.h>
+#import <WebCore/NodeList.h>
#import <WebCore/Page.h>
#import <WebCore/PageCache.h>
#import <WebCore/PageGroup.h>
#import <WebCore/PlatformMouseEvent.h>
#import <WebCore/ProgressTracker.h>
+#import <WebCore/RenderView.h>
#import <WebCore/RenderWidget.h>
#import <WebCore/ResourceHandle.h>
#import <WebCore/RuntimeApplicationChecks.h>
+#import <WebCore/SchemeRegistry.h>
#import <WebCore/ScriptController.h>
#import <WebCore/ScriptValue.h>
#import <WebCore/SecurityOrigin.h>
@@ -160,6 +176,11 @@
#import <wtf/RefCountedLeakCounter.h>
#import <wtf/RefPtr.h>
#import <wtf/StdLibExtras.h>
+#import <wtf/Threading.h>
+
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#import <AppKit/NSTextChecker.h>
+#endif
#if ENABLE(DASHBOARD_SUPPORT)
#import <WebKit/WebDashboardRegion.h>
@@ -170,6 +191,10 @@
#import <WebCore/GeolocationError.h>
#endif
+#if ENABLE(GLIB_SUPPORT)
+#import <glib.h>
+#endif
+
@interface NSSpellChecker (WebNSSpellCheckerDetails)
- (void)_preflightChosenSpellServer;
@end
@@ -182,6 +207,8 @@
@interface NSWindow (WebNSWindowDetails)
- (id)_oldFirstResponderBeforeBecoming;
+- (void)_enableScreenUpdatesIfNeeded;
+- (BOOL)_wrapsCarbonWindow;
@end
using namespace WebCore;
@@ -359,6 +386,9 @@ static const char webViewIsOpen[] = "At least one WebView is still open.";
#if USE(ACCELERATED_COMPOSITING)
- (void)_clearLayerSyncLoopObserver;
#endif
+#if ENABLE(GLIB_SUPPORT)
+- (void)_clearGlibLoopObserver;
+#endif
@end
static void patchMailRemoveAttributesMethod();
@@ -374,6 +404,7 @@ NSString *WebElementLinkLabelKey = @"WebElementLinkLabel";
NSString *WebElementLinkTargetFrameKey = @"WebElementTargetFrame";
NSString *WebElementLinkTitleKey = @"WebElementLinkTitle";
NSString *WebElementLinkURLKey = @"WebElementLinkURL";
+NSString *WebElementMediaURLKey = @"WebElementMediaURL";
NSString *WebElementSpellingToolTipKey = @"WebElementSpellingToolTip";
NSString *WebElementTitleKey = @"WebElementTitle";
NSString *WebElementLinkIsLiveKey = @"WebElementLinkIsLive";
@@ -522,6 +553,21 @@ static NSString *createUserVisibleWebKitVersionString()
return [NSString stringWithFormat:@"Mozilla/5.0 (Macintosh; U; " PROCESSOR " Mac OS X %@; %@) AppleWebKit/%@ (KHTML, like Gecko)", osVersion, language, webKitVersion];
}
++ (void)_reportException:(JSValueRef)exception inContext:(JSContextRef)context
+{
+ if (!exception || !context)
+ return;
+
+ JSLock lock(SilenceAssertionsOnly);
+ JSC::ExecState* execState = toJS(context);
+
+ // Make sure the context has a DOMWindow global object, otherwise this context didn't originate from a WebView.
+ if (!toJSDOMWindow(execState->lexicalGlobalObject()))
+ return;
+
+ reportException(execState, toJS(execState, exception));
+}
+
static void WebKitInitializeApplicationCachePathIfNecessary()
{
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
@@ -558,6 +604,16 @@ static bool runningTigerMail()
return NO;
}
+static bool coreVideoHas7228836Fix()
+{
+#ifdef BUILDING_ON_LEOPARD
+ NSBundle* coreVideoFrameworkBundle = [NSBundle bundleWithPath:@"/System/Library/Frameworks/CoreVideo.framework"];
+ double version = [[coreVideoFrameworkBundle objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey] doubleValue];
+ return (version >= 48);
+#endif
+ return true;
+}
+
static bool shouldEnableLoadDeferring()
{
return !applicationIsAdobeInstaller();
@@ -583,6 +639,19 @@ static bool shouldEnableLoadDeferring()
return _private->usesDocumentViews;
}
+static NSString *leakMailQuirksUserScriptPath()
+{
+ NSString *scriptPath = [[NSBundle bundleForClass:[WebView class]] pathForResource:@"MailQuirksUserScript" ofType:@"js"];
+ return [[NSString alloc] initWithContentsOfFile:scriptPath];
+}
+
+- (void)_injectMailQuirksScript
+{
+ static NSString *mailQuirksScriptPath = leakMailQuirksUserScriptPath();
+ core(self)->group().addUserScriptToWorld(core([WebScriptWorld world]),
+ mailQuirksScriptPath, KURL(), 0, 0, InjectAtDocumentEnd, InjectInAllFrames);
+}
+
- (void)_commonInitializationWithFrameName:(NSString *)frameName groupName:(NSString *)groupName usesDocumentViews:(BOOL)usesDocumentViews
{
WebCoreThreadViolationCheckRoundTwo();
@@ -600,6 +669,7 @@ static bool shouldEnableLoadDeferring()
_private->drawsBackground = YES;
_private->backgroundColor = [[NSColor colorWithDeviceWhite:1 alpha:1] retain];
_private->usesDocumentViews = usesDocumentViews;
+ _private->includesFlattenedCompositingLayersWhenDrawingToBitmap = YES;
WebFrameView *frameView = nil;
if (_private->usesDocumentViews) {
@@ -620,16 +690,30 @@ static bool shouldEnableLoadDeferring()
#endif
WebKitInitializeApplicationCachePathIfNecessary();
patchMailRemoveAttributesMethod();
+
+ // Initialize our platform strategies.
+ WebPlatformStrategies::initialize();
+ Settings::setMinDOMTimerInterval(0.004);
+
didOneTimeInitialization = true;
}
+ Page::PageClients pageClients;
+ pageClients.chromeClient = new WebChromeClient(self);
+ pageClients.contextMenuClient = new WebContextMenuClient(self);
+ pageClients.editorClient = new WebEditorClient(self);
+ pageClients.dragClient = new WebDragClient(self);
+ pageClients.inspectorClient = new WebInspectorClient(self);
+ pageClients.pluginHalterClient = new WebPluginHalterClient(self);
#if ENABLE(CLIENT_BASED_GEOLOCATION)
- WebGeolocationControllerClient* geolocationControllerClient = new WebGeolocationControllerClient(self);
-#else
- WebGeolocationControllerClient* geolocationControllerClient = 0;
+ pageClients.geolocationControllerClient = new WebGeolocationControllerClient(self);
+#endif
+#if ENABLE(DEVICE_ORIENTATION)
+ pageClients.deviceOrientationClient = new WebDeviceOrientationClient(self);
#endif
- _private->page = new Page(new WebChromeClient(self), new WebContextMenuClient(self), new WebEditorClient(self), new WebDragClient(self), new WebInspectorClient(self), new WebPluginHalterClient(self), geolocationControllerClient);
+ _private->page = new Page(pageClients);
+ _private->page->setCanStartMedia([self window]);
_private->page->settings()->setLocalStorageDatabasePath([[self preferences] _localStorageDatabasePath]);
[WebFrame _createMainFrameWithPage:_private->page frameName:frameName frameView:frameView];
@@ -657,7 +741,8 @@ static bool shouldEnableLoadDeferring()
[frameView setNextKeyView:nextKeyView];
[super setNextKeyView:frameView];
- ++WebViewCount;
+ if ([[self class] shouldIncludeInWebKitStatistics])
+ ++WebViewCount;
[self _registerDraggedTypes];
@@ -679,6 +764,13 @@ static bool shouldEnableLoadDeferring()
if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_CONTENT_SNIFFING_FOR_FILE_URLS))
ResourceHandle::forceContentSniffing();
+
+#if ENABLE(GLIB_SUPPORT)
+ [self _scheduleGlibContextIterations];
+#endif
+
+ if (runningTigerMail() || runningLeopardMail())
+ [self _injectMailQuirksScript];
}
- (id)_initWithFrame:(NSRect)f frameName:(NSString *)frameName groupName:(NSString *)groupName usesDocumentViews:(BOOL)usesDocumentViews
@@ -739,10 +831,9 @@ static bool shouldEnableLoadDeferring()
@try {
[[self mainFrame] _drawRect:rect contentsOnly:NO];
- WebView *webView = [self _webView];
- [[webView _UIDelegateForwarder] webView:webView didDrawRect:rect];
+ [[self _UIDelegateForwarder] webView:self didDrawRect:rect];
- if (WebNodeHighlight *currentHighlight = [webView currentNodeHighlight])
+ if (WebNodeHighlight *currentHighlight = [self currentNodeHighlight])
[currentHighlight setNeedsUpdateInTargetViewRect:rect];
[NSGraphicsContext restoreGraphicsState];
@@ -781,7 +872,7 @@ static bool shouldEnableLoadDeferring()
{
Frame* frame = [self _mainCoreFrame];
if (frame && frame->view())
- frame->view()->layoutIfNeededRecursive();
+ frame->view()->updateLayoutAndStyleIfNeededRecursive();
}
#endif
@@ -841,6 +932,25 @@ static bool shouldEnableLoadDeferring()
return uniqueExtensions;
}
+static NSMutableSet *knownPluginMIMETypes()
+{
+ static NSMutableSet *mimeTypes = [[NSMutableSet alloc] init];
+
+ return mimeTypes;
+}
+
++ (void)_registerPluginMIMEType:(NSString *)MIMEType
+{
+ [WebView registerViewClass:[WebHTMLView class] representationClass:[WebHTMLRepresentation class] forMIMEType:MIMEType];
+ [knownPluginMIMETypes() addObject:MIMEType];
+}
+
++ (void)_unregisterPluginMIMEType:(NSString *)MIMEType
+{
+ [self _unregisterViewClassAndRepresentationClassForMIMEType:MIMEType];
+ [knownPluginMIMETypes() removeObject:MIMEType];
+}
+
+ (BOOL)_viewClass:(Class *)vClass andRepresentationClass:(Class *)rClass forMIMEType:(NSString *)MIMEType allowingPlugins:(BOOL)allowPlugins
{
MIMEType = [MIMEType lowercaseString];
@@ -861,11 +971,20 @@ static bool shouldEnableLoadDeferring()
}
if (viewClass && repClass) {
- // Special-case WebHTMLView for text types that shouldn't be shown.
- if (viewClass == [WebHTMLView class] &&
- repClass == [WebHTMLRepresentation class] &&
- [[WebHTMLView unsupportedTextMIMETypes] containsObject:MIMEType]) {
- return NO;
+ if (viewClass == [WebHTMLView class] && repClass == [WebHTMLRepresentation class]) {
+ // Special-case WebHTMLView for text types that shouldn't be shown.
+ if ([[WebHTMLView unsupportedTextMIMETypes] containsObject:MIMEType])
+ return NO;
+
+ // If the MIME type is a known plug-in we might not want to load it.
+ if (!allowPlugins && [knownPluginMIMETypes() containsObject:MIMEType]) {
+ BOOL isSupportedByWebKit = [[WebHTMLView supportedNonImageMIMETypes] containsObject:MIMEType] ||
+ [[WebHTMLView supportedMIMETypes] containsObject:MIMEType];
+
+ // If this is a known plug-in MIME type and WebKit can't show it natively, we don't want to show it.
+ if (!isSupportedByWebKit)
+ return NO;
+ }
}
if (vClass)
*vClass = viewClass;
@@ -879,7 +998,7 @@ static bool shouldEnableLoadDeferring()
- (BOOL)_viewClass:(Class *)vClass andRepresentationClass:(Class *)rClass forMIMEType:(NSString *)MIMEType
{
- if ([[self class] _viewClass:vClass andRepresentationClass:rClass forMIMEType:MIMEType allowingPlugins:[[[self _webView] preferences] arePlugInsEnabled]])
+ if ([[self class] _viewClass:vClass andRepresentationClass:rClass forMIMEType:MIMEType allowingPlugins:[_private->preferences arePlugInsEnabled]])
return YES;
if (_private->pluginDatabase) {
@@ -916,7 +1035,9 @@ static bool shouldEnableLoadDeferring()
DOMWindow::dispatchAllPendingUnloadEvents();
// This will close the WebViews in a random order. Change this if close order is important.
- NSEnumerator *enumerator = [(NSMutableSet *)allWebViewsSet objectEnumerator];
+ // Make a new set to avoid mutating the set we are enumerating.
+ NSSet *webViewsToClose = [NSSet setWithSet:(NSSet *)allWebViewsSet];
+ NSEnumerator *enumerator = [webViewsToClose objectEnumerator];
while (WebView *webView = [enumerator nextObject])
[webView close];
}
@@ -961,8 +1082,6 @@ static bool shouldEnableLoadDeferring()
WTF::RefCountedLeakCounter::suppressMessages("At least one WebView was closed with fast teardown.");
#endif
- _private->closed = YES;
-
[[NSDistributedNotificationCenter defaultCenter] removeObserver:self];
[[NSNotificationCenter defaultCenter] removeObserver:self];
@@ -995,6 +1114,9 @@ static bool fastDocumentTeardownEnabled()
if (!_private || _private->closed)
return;
+ _private->closed = YES;
+ [self _removeFromAllWebViewsSet];
+
[self _closingEventHandling];
#ifndef NDEBUG
@@ -1015,7 +1137,6 @@ static bool fastDocumentTeardownEnabled()
if (Frame* mainFrame = [self _mainCoreFrame])
mainFrame->loader()->detachFromParent();
- [self _removeFromAllWebViewsSet];
[self setHostWindow:nil];
[self setDownloadDelegate:nil];
@@ -1028,17 +1149,15 @@ static bool fastDocumentTeardownEnabled()
[_private->inspector webViewClosed];
- // setHostWindow:nil must be called before this value is set (see 5408186)
- _private->closed = YES;
-
// To avoid leaks, call removeDragCaret in case it wasn't called after moveDragCaretToPoint.
[self removeDragCaret];
// Deleteing the WebCore::Page will clear the page cache so we call destroy on
// all the plug-ins in the page cache to break any retain cycles.
// See comment in HistoryItem::releaseAllPendingPageCaches() for more information.
- delete _private->page;
+ Page* page = _private->page;
_private->page = 0;
+ delete page;
if (_private->hasSpellCheckerDocumentTag) {
[[NSSpellChecker sharedSpellChecker] closeSpellDocumentWithTag:_private->spellCheckerDocumentTag];
@@ -1049,6 +1168,10 @@ static bool fastDocumentTeardownEnabled()
[self _clearLayerSyncLoopObserver];
#endif
+#if ENABLE(GLIB_SUPPORT)
+ [self _clearGlibLoopObserver];
+#endif
+
[[NSDistributedNotificationCenter defaultCenter] removeObserver:self];
[[NSNotificationCenter defaultCenter] removeObserver:self];
@@ -1255,6 +1378,33 @@ static bool fastDocumentTeardownEnabled()
return needsQuirk;
}
+
+- (BOOL)_needsPreHTML5ParserQuirks
+{
+ // AOL Instant Messenger and Microsoft My Day contain markup incompatible
+ // with the new HTML5 parser. If these applications were linked against a
+ // version of WebKit prior to the introduction of the HTML5 parser, enable
+ // parser quirks to maintain compatibility. For details, see
+ // <https://bugs.webkit.org/show_bug.cgi?id=46134> and
+ // <https://bugs.webkit.org/show_bug.cgi?id=46334>.
+ static bool isApplicationNeedingParserQuirks = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_HTML5_PARSER)
+ && (applicationIsAOLInstantMessenger() || applicationIsMicrosoftMyDay());
+
+ return isApplicationNeedingParserQuirks
+#if ENABLE(DASHBOARD_SUPPORT)
+ // Pre-HTML5 parser quirks are required to remain compatible with many
+ // Dashboard widgets. See <rdar://problem/8175982>.
+ || (_private->page && _private->page->settings()->usesDashboardBackwardCompatibilityMode())
+#endif
+ || [[self preferences] usePreHTML5ParserQuirks];
+}
+
+- (BOOL)_needsUnrestrictedGetMatchedCSSRules
+{
+ static bool needsUnrestrictedGetMatchedCSSRules = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_GET_MATCHED_CSS_RULES_RESTRICTIONS) && applicationIsSafari();
+ return needsUnrestrictedGetMatchedCSSRules;
+}
+
- (void)_preferencesChangedNotification:(NSNotification *)notification
{
WebPreferences *preferences = (WebPreferences *)[notification object];
@@ -1286,11 +1436,14 @@ static bool fastDocumentTeardownEnabled()
settings->setJavaScriptEnabled([preferences isJavaScriptEnabled]);
settings->setWebSecurityEnabled([preferences isWebSecurityEnabled]);
settings->setAllowUniversalAccessFromFileURLs([preferences allowUniversalAccessFromFileURLs]);
+ settings->setAllowFileAccessFromFileURLs([preferences allowFileAccessFromFileURLs]);
settings->setJavaScriptCanOpenWindowsAutomatically([preferences javaScriptCanOpenWindowsAutomatically]);
settings->setMinimumFontSize([preferences minimumFontSize]);
settings->setMinimumLogicalFontSize([preferences minimumLogicalFontSize]);
settings->setPluginsEnabled([preferences arePlugInsEnabled]);
- settings->setDatabasesEnabled([preferences databasesEnabled]);
+#if ENABLE(DATABASE)
+ AbstractDatabase::setIsAvailable([preferences databasesEnabled]);
+#endif
settings->setLocalStorageEnabled([preferences localStorageEnabled]);
settings->setExperimentalNotificationsEnabled([preferences experimentalNotificationsEnabled]);
settings->setPrivateBrowsingEnabled([preferences privateBrowsingEnabled]);
@@ -1302,6 +1455,7 @@ static bool fastDocumentTeardownEnabled()
settings->setTextAreasAreResizable([preferences textAreasAreResizable]);
settings->setShrinksStandaloneImagesToFit([preferences shrinksStandaloneImagesToFit]);
settings->setEditableLinkBehavior(core([preferences editableLinkBehavior]));
+ settings->setEditingBehaviorType(core([preferences editingBehavior]));
settings->setTextDirectionSubmenuInclusionBehavior(core([preferences textDirectionSubmenuInclusionBehavior]));
settings->setDOMPasteAllowed([preferences isDOMPasteAllowed]);
settings->setUsesPageCache([self usesPageCache]);
@@ -1325,16 +1479,38 @@ static bool fastDocumentTeardownEnabled()
settings->setWebArchiveDebugModeEnabled([preferences webArchiveDebugModeEnabled]);
settings->setLocalFileContentSniffingEnabled([preferences localFileContentSniffingEnabled]);
settings->setOfflineWebApplicationCacheEnabled([preferences offlineWebApplicationCacheEnabled]);
- settings->setZoomsTextOnly([preferences zoomsTextOnly]);
+ settings->setJavaScriptCanAccessClipboard([preferences javaScriptCanAccessClipboard]);
settings->setXSSAuditorEnabled([preferences isXSSAuditorEnabled]);
- settings->setEnforceCSSMIMETypeInStrictMode(!WKAppVersionCheckLessThan(@"com.apple.iWeb", -1, 2.1));
- settings->setAcceleratedCompositingEnabled([preferences acceleratedCompositingEnabled]);
+ settings->setEnforceCSSMIMETypeInNoQuirksMode(!WKAppVersionCheckLessThan(@"com.apple.iWeb", -1, 2.1));
+ settings->setDNSPrefetchingEnabled([preferences isDNSPrefetchingEnabled]);
+
+ // FIXME: Enabling accelerated compositing when WebGL is enabled causes tests to fail on Leopard which expect HW compositing to be disabled.
+ // Until we fix that, I will comment out the test (CFM)
+ settings->setAcceleratedCompositingEnabled((coreVideoHas7228836Fix() || [preferences webGLEnabled] ||
+ [preferences accelerated2dCanvasEnabled]) && [preferences acceleratedCompositingEnabled]);
settings->setShowDebugBorders([preferences showDebugBorders]);
settings->setShowRepaintCounter([preferences showRepaintCounter]);
settings->setPluginAllowedRunTime([preferences pluginAllowedRunTime]);
settings->setWebGLEnabled([preferences webGLEnabled]);
+ settings->setAccelerated2dCanvasEnabled([preferences accelerated2dCanvasEnabled]);
settings->setLoadDeferringEnabled(shouldEnableLoadDeferring());
- settings->setFrameSetFlatteningEnabled([preferences isFrameSetFlatteningEnabled]);
+ settings->setFrameFlatteningEnabled([preferences isFrameFlatteningEnabled]);
+ settings->setSpatialNavigationEnabled([preferences isSpatialNavigationEnabled]);
+ settings->setPaginateDuringLayoutEnabled([preferences paginateDuringLayoutEnabled]);
+#if ENABLE(FULLSCREEN_API)
+ settings->setFullScreenEnabled([preferences fullScreenEnabled]);
+#endif
+ settings->setMemoryInfoEnabled([preferences memoryInfoEnabled]);
+ settings->setHyperlinkAuditingEnabled([preferences hyperlinkAuditingEnabled]);
+ settings->setUsePreHTML5ParserQuirks([self _needsPreHTML5ParserQuirks]);
+ settings->setCrossOriginCheckInGetMatchedCSSRulesDisabled([self _needsUnrestrictedGetMatchedCSSRules]);
+
+ // Application Cache Preferences are stored on the global cache storage manager, not in Settings.
+ [WebApplicationCache setDefaultOriginQuota:[preferences applicationCacheDefaultOriginQuota]];
+
+ BOOL zoomsTextOnly = [preferences zoomsTextOnly];
+ if (_private->zoomsTextOnly != zoomsTextOnly)
+ [self _setZoomMultiplier:_private->zoomMultiplier isTextOnly:zoomsTextOnly];
}
static inline IMP getMethod(id o, SEL s)
@@ -1357,6 +1533,9 @@ static inline IMP getMethod(id o, SEL s)
cache->didFinishLoadingFromDataSourceFunc = getMethod(delegate, @selector(webView:resource:didFinishLoadingFromDataSource:));
cache->didLoadResourceFromMemoryCacheFunc = getMethod(delegate, @selector(webView:didLoadResourceFromMemoryCache:response:length:fromDataSource:));
cache->didReceiveAuthenticationChallengeFunc = getMethod(delegate, @selector(webView:resource:didReceiveAuthenticationChallenge:fromDataSource:));
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
+ cache->canAuthenticateAgainstProtectionSpaceFunc = getMethod(delegate, @selector(webView:resource:canAuthenticateAgainstProtectionSpace:forDataSource:));
+#endif
cache->didReceiveContentLengthFunc = getMethod(delegate, @selector(webView:resource:didReceiveContentLength:fromDataSource:));
cache->didReceiveResponseFunc = getMethod(delegate, @selector(webView:resource:didReceiveResponse:fromDataSource:));
cache->identifierForRequestFunc = getMethod(delegate, @selector(webView:identifierForInitialRequest:fromDataSource:));
@@ -1790,9 +1969,38 @@ static inline IMP getMethod(id o, SEL s)
Frame* mainFrame = [self _mainCoreFrame];
if (!mainFrame)
return nil;
- NSMutableDictionary *regions = mainFrame->dashboardRegionsDictionary();
- [self _addScrollerDashboardRegions:regions];
- return regions;
+
+ const Vector<DashboardRegionValue>& regions = mainFrame->document()->dashboardRegions();
+ size_t size = regions.size();
+
+ NSMutableDictionary *webRegions = [NSMutableDictionary dictionaryWithCapacity:size];
+ for (size_t i = 0; i < size; i++) {
+ const DashboardRegionValue& region = regions[i];
+
+ if (region.type == StyleDashboardRegion::None)
+ continue;
+
+ NSString *label = region.label;
+ WebDashboardRegionType type = WebDashboardRegionTypeNone;
+ if (region.type == StyleDashboardRegion::Circle)
+ type = WebDashboardRegionTypeCircle;
+ else if (region.type == StyleDashboardRegion::Rectangle)
+ type = WebDashboardRegionTypeRectangle;
+ NSMutableArray *regionValues = [webRegions objectForKey:label];
+ if (!regionValues) {
+ regionValues = [[NSMutableArray alloc] initWithCapacity:1];
+ [webRegions setObject:regionValues forKey:label];
+ [regionValues release];
+ }
+
+ WebDashboardRegion *webRegion = [[WebDashboardRegion alloc] initWithRect:region.bounds clip:region.clip type:type];
+ [regionValues addObject:webRegion];
+ [webRegion release];
+ }
+
+ [self _addScrollerDashboardRegions:webRegions];
+
+ return webRegions;
}
- (void)_setDashboardBehavior:(WebDashboardBehavior)behavior to:(BOOL)flag
@@ -1825,6 +2033,11 @@ static inline IMP getMethod(id o, SEL s)
break;
}
}
+
+ // Pre-HTML5 parser quirks should be enabled if Dashboard is in backward
+ // compatibility mode. See <rdar://problem/8175982>.
+ if (_private->page)
+ _private->page->settings()->setUsePreHTML5ParserQuirks([self _needsPreHTML5ParserQuirks]);
}
- (BOOL)_dashboardBehavior:(WebDashboardBehavior)behavior
@@ -2119,7 +2332,7 @@ static inline IMP getMethod(id o, SEL s)
+ (NSCursor *)_pointingHandCursor
{
- return handCursor().impl();
+ return handCursor().platformCursor();
}
- (BOOL)_postsAcceleratedCompositingNotifications
@@ -2141,21 +2354,45 @@ static inline IMP getMethod(id o, SEL s)
- (BOOL)_isUsingAcceleratedCompositing
{
#if USE(ACCELERATED_COMPOSITING)
- Frame* coreFrame = [self _mainCoreFrame];
if (_private->usesDocumentViews) {
+ Frame* coreFrame = [self _mainCoreFrame];
for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) {
NSView *documentView = [[kit(frame) frameView] documentView];
if ([documentView isKindOfClass:[WebHTMLView class]] && [(WebHTMLView *)documentView _isUsingAcceleratedCompositing])
return YES;
}
}
-
- return NO;
-#else
+#endif
return NO;
+}
+
+- (BOOL)_isSoftwareRenderable
+{
+#if USE(ACCELERATED_COMPOSITING)
+ if (_private->usesDocumentViews) {
+ Frame* coreFrame = [self _mainCoreFrame];
+ for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) {
+ if (FrameView* view = frame->view()) {
+ if (!view->isSoftwareRenderable())
+ return NO;
+ }
+ }
+ }
#endif
+ return YES;
+}
+
+- (void)_setIncludesFlattenedCompositingLayersWhenDrawingToBitmap:(BOOL)flag
+{
+ _private->includesFlattenedCompositingLayersWhenDrawingToBitmap = flag;
+}
+
+- (BOOL)_includesFlattenedCompositingLayersWhenDrawingToBitmap
+{
+ return _private->includesFlattenedCompositingLayersWhenDrawingToBitmap;
}
+#if ENABLE(NETSCAPE_PLUGIN_API)
static WebBaseNetscapePluginView *_pluginViewForNode(DOMNode *node)
{
if (!node)
@@ -2179,22 +2416,33 @@ static WebBaseNetscapePluginView *_pluginViewForNode(DOMNode *node)
return (WebBaseNetscapePluginView *)view;
}
+#endif // ENABLE(NETSCAPE_PLUGIN_API)
+ (BOOL)_isNodeHaltedPlugin:(DOMNode *)node
{
+#if ENABLE(NETSCAPE_PLUGIN_API)
return [_pluginViewForNode(node) isHalted];
+#else
+ return YES;
+#endif
}
+ (BOOL)_hasPluginForNodeBeenHalted:(DOMNode *)node
{
+#if ENABLE(NETSCAPE_PLUGIN_API)
return [_pluginViewForNode(node) hasBeenHalted];
+#else
+ return YES;
+#endif
}
+ (void)_restartHaltedPluginForNode:(DOMNode *)node
{
+#if ENABLE(NETSCAPE_PLUGIN_API)
if (!node)
return;
[_pluginViewForNode(node) resumeFromHalt];
+#endif
}
- (NSPasteboard *)_insertionPasteboard
@@ -2202,14 +2450,19 @@ static WebBaseNetscapePluginView *_pluginViewForNode(DOMNode *node)
return _private ? _private->insertionPasteboard : nil;
}
-+ (void)_whiteListAccessFromOrigin:(NSString *)sourceOrigin destinationProtocol:(NSString *)destinationProtocol destinationHost:(NSString *)destinationHost allowDestinationSubdomains:(BOOL)allowDestinationSubdomains
++ (void)_addOriginAccessWhitelistEntryWithSourceOrigin:(NSString *)sourceOrigin destinationProtocol:(NSString *)destinationProtocol destinationHost:(NSString *)destinationHost allowDestinationSubdomains:(BOOL)allowDestinationSubdomains
+{
+ SecurityOrigin::addOriginAccessWhitelistEntry(*SecurityOrigin::createFromString(sourceOrigin), destinationProtocol, destinationHost, allowDestinationSubdomains);
+}
+
++ (void)_removeOriginAccessWhitelistEntryWithSourceOrigin:(NSString *)sourceOrigin destinationProtocol:(NSString *)destinationProtocol destinationHost:(NSString *)destinationHost allowDestinationSubdomains:(BOOL)allowDestinationSubdomains
{
- SecurityOrigin::whiteListAccessFromOrigin(*SecurityOrigin::createFromString(sourceOrigin), destinationProtocol, destinationHost, allowDestinationSubdomains);
+ SecurityOrigin::removeOriginAccessWhitelistEntry(*SecurityOrigin::createFromString(sourceOrigin), destinationProtocol, destinationHost, allowDestinationSubdomains);
}
-+(void)_resetOriginAccessWhiteLists
++(void)_resetOriginAccessWhitelists
{
- SecurityOrigin::resetOriginAccessWhiteLists();
+ SecurityOrigin::resetOriginAccessWhitelists();
}
- (void)_updateActiveState
@@ -2234,7 +2487,16 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
}
+ (void)_addUserScriptToGroup:(NSString *)groupName world:(WebScriptWorld *)world source:(NSString *)source url:(NSURL *)url
- whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist injectionTime:(WebUserScriptInjectionTime)injectionTime
+ whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist
+ injectionTime:(WebUserScriptInjectionTime)injectionTime
+{
+ [WebView _addUserScriptToGroup:groupName world:world source:source url:url whitelist:whitelist blacklist:blacklist injectionTime:injectionTime injectedFrames:WebInjectInAllFrames];
+}
+
++ (void)_addUserScriptToGroup:(NSString *)groupName world:(WebScriptWorld *)world source:(NSString *)source url:(NSURL *)url
+ whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist
+ injectionTime:(WebUserScriptInjectionTime)injectionTime
+ injectedFrames:(WebUserContentInjectedFrames)injectedFrames
{
String group(groupName);
if (group.isEmpty())
@@ -2245,11 +2507,19 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
return;
pageGroup->addUserScriptToWorld(core(world), source, url, toStringVector(whitelist), toStringVector(blacklist),
- injectionTime == WebInjectAtDocumentStart ? InjectAtDocumentStart : InjectAtDocumentEnd);
+ injectionTime == WebInjectAtDocumentStart ? InjectAtDocumentStart : InjectAtDocumentEnd,
+ injectedFrames == WebInjectInAllFrames ? InjectInAllFrames : InjectInTopFrameOnly);
+}
+
++ (void)_addUserStyleSheetToGroup:(NSString *)groupName world:(WebScriptWorld *)world source:(NSString *)source url:(NSURL *)url
+ whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist
+{
+ [WebView _addUserStyleSheetToGroup:groupName world:world source:source url:url whitelist:whitelist blacklist:blacklist injectedFrames:WebInjectInAllFrames];
}
+ (void)_addUserStyleSheetToGroup:(NSString *)groupName world:(WebScriptWorld *)world source:(NSString *)source url:(NSURL *)url
whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist
+ injectedFrames:(WebUserContentInjectedFrames)injectedFrames
{
String group(groupName);
if (group.isEmpty())
@@ -2259,7 +2529,7 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
if (!pageGroup)
return;
- pageGroup->addUserStyleSheetToWorld(core(world), source, url, toStringVector(whitelist), toStringVector(blacklist));
+ pageGroup->addUserStyleSheetToWorld(core(world), source, url, toStringVector(whitelist), toStringVector(blacklist), injectedFrames == WebInjectInAllFrames ? InjectInAllFrames : InjectInTopFrameOnly);
}
+ (void)_removeUserScriptFromGroup:(NSString *)groupName world:(WebScriptWorld *)world url:(NSURL *)url
@@ -2341,9 +2611,9 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
Frame* frame = core([self mainFrame]);
if (suspended)
- frame->animation()->suspendAnimations(frame->document());
+ frame->animation()->suspendAnimations();
else
- frame->animation()->resumeAnimations(frame->document());
+ frame->animation()->resumeAnimations();
}
+ (void)_setDomainRelaxationForbidden:(BOOL)forbidden forURLScheme:(NSString *)scheme
@@ -2351,6 +2621,29 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
SecurityOrigin::setDomainRelaxationForbiddenForURLScheme(forbidden, scheme);
}
++ (void)_registerURLSchemeAsSecure:(NSString *)scheme
+{
+ SchemeRegistry::registerURLSchemeAsSecure(scheme);
+}
+
+- (void)_scaleWebView:(float)scale
+{
+ Frame* coreFrame = [self _mainCoreFrame];
+ if (!coreFrame)
+ return;
+
+ coreFrame->scalePage(scale);
+}
+
+- (float)_viewScaleFactor
+{
+ Frame* coreFrame = [self _mainCoreFrame];
+ if (!coreFrame)
+ return 1;
+
+ return coreFrame->pageScaleFactor();
+}
+
@end
@implementation _WebSafeForwarder
@@ -2405,6 +2698,8 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
initialized = YES;
InitWebCoreSystemInterface();
+ JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_applicationWillTerminate) name:NSApplicationWillTerminateNotification object:NSApp];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_preferencesChangedNotification:) name:WebPreferencesChangedNotification object:nil];
@@ -2422,6 +2717,13 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
automaticTextReplacementEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:WebAutomaticTextReplacementEnabled];
automaticSpellingCorrectionEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:WebAutomaticSpellingCorrectionEnabled];
#endif
+
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ if (![[NSUserDefaults standardUserDefaults] objectForKey:WebAutomaticTextReplacementEnabled])
+ automaticTextReplacementEnabled = [NSSpellChecker isAutomaticTextReplacementEnabled];
+ if (![[NSUserDefaults standardUserDefaults] objectForKey:WebAutomaticSpellingCorrectionEnabled])
+ automaticSpellingCorrectionEnabled = [NSSpellChecker isAutomaticSpellingCorrectionEnabled];
+#endif
}
+ (void)_applicationWillTerminate
@@ -2449,7 +2751,7 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
- (BOOL)_canShowMIMEType:(NSString *)MIMEType
{
- return [[self class] _canShowMIMEType:MIMEType allowingPlugins:[[[self _webView] preferences] arePlugInsEnabled]];
+ return [[self class] _canShowMIMEType:MIMEType allowingPlugins:[_private->preferences arePlugInsEnabled]];
}
- (WebBasePluginPackage *)_pluginForMIMEType:(NSString *)MIMEType
@@ -2467,6 +2769,20 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
return nil;
}
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+- (WebBasePluginPackage *)_videoProxyPluginForMIMEType:(NSString *)MIMEType
+{
+ WebBasePluginPackage *pluginPackage = [[WebPluginDatabase sharedDatabase] pluginForMIMEType:MIMEType];
+ if (pluginPackage)
+ return pluginPackage;
+
+ if (_private->pluginDatabase)
+ return [_private->pluginDatabase pluginForMIMEType:MIMEType];
+
+ return nil;
+}
+#endif
+
- (WebBasePluginPackage *)_pluginForExtension:(NSString *)extension
{
if (![_private->preferences arePlugInsEnabled])
@@ -2566,7 +2882,7 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
+ (void)registerURLSchemeAsLocal:(NSString *)protocol
{
- SecurityOrigin::registerURLSchemeAsLocal(protocol);
+ SchemeRegistry::registerURLSchemeAsLocal(protocol);
}
- (id)_initWithArguments:(NSDictionary *) arguments
@@ -2690,7 +3006,7 @@ static bool needsWebViewInitThreadWorkaround()
LOG(Encoding, "FrameName = %@, GroupName = %@, useBackForwardList = %d\n", frameName, groupName, (int)useBackForwardList);
[result _commonInitializationWithFrameName:frameName groupName:groupName usesDocumentViews:YES];
- [result page]->backForwardList()->setEnabled(useBackForwardList);
+ static_cast<BackForwardListImpl*>([result page]->backForwardList())->setEnabled(useBackForwardList);
result->_private->allowsUndo = allowsUndo;
if (preferences)
[result setPreferences:preferences];
@@ -2714,7 +3030,7 @@ static bool needsWebViewInitThreadWorkaround()
// Restore the subviews we set aside.
_subviews = originalSubviews;
- BOOL useBackForwardList = _private->page && _private->page->backForwardList()->enabled();
+ BOOL useBackForwardList = _private->page && static_cast<BackForwardListImpl*>(_private->page->backForwardList())->enabled();
if ([encoder allowsKeyedCoding]) {
[encoder encodeObject:[[self mainFrame] name] forKey:@"FrameName"];
[encoder encodeObject:[self groupName] forKey:@"GroupName"];
@@ -2743,8 +3059,9 @@ static bool needsWebViewInitThreadWorkaround()
// this maintains our old behavior for existing applications
[self close];
- --WebViewCount;
-
+ if ([[self class] shouldIncludeInWebKitStatistics])
+ --WebViewCount;
+
if ([self _needsFrameLoadDelegateRetainQuirk])
[_private->frameLoadDelegate release];
@@ -2824,8 +3141,10 @@ static bool needsWebViewInitThreadWorkaround()
// and over, so do them when we move into a window.
[window setAcceptsMouseMovedEvents:YES];
WKSetNSWindowShouldPostEventNotifications(window, YES);
- } else
+ } else {
+ _private->page->setCanStartMedia(false);
_private->page->willMoveOffscreen();
+ }
if (window != [self window]) {
[self removeWindowObservers];
@@ -2842,8 +3161,10 @@ static bool needsWebViewInitThreadWorkaround()
if (!_private || _private->closed)
return;
- if ([self window])
+ if ([self window]) {
+ _private->page->setCanStartMedia(true);
_private->page->didMoveOnscreen();
+ }
[self _updateActiveState];
}
@@ -2927,7 +3248,7 @@ static bool needsWebViewInitThreadWorkaround()
_private->UIDelegateForwarder = nil;
}
-- UIDelegate
+- (id)UIDelegate
{
return _private->UIDelegate;
}
@@ -2938,7 +3259,7 @@ static bool needsWebViewInitThreadWorkaround()
[self _cacheResourceLoadDelegateImplementations];
}
-- resourceLoadDelegate
+- (id)resourceLoadDelegate
{
return _private->resourceProgressDelegate;
}
@@ -2949,7 +3270,7 @@ static bool needsWebViewInitThreadWorkaround()
}
-- downloadDelegate
+- (id)downloadDelegate
{
return _private->downloadDelegate;
}
@@ -2961,7 +3282,7 @@ static bool needsWebViewInitThreadWorkaround()
_private->policyDelegateForwarder = nil;
}
-- policyDelegate
+- (id)policyDelegate
{
return _private->policyDelegate;
}
@@ -2987,7 +3308,7 @@ static bool needsWebViewInitThreadWorkaround()
#endif
}
-- frameLoadDelegate
+- (id)frameLoadDelegate
{
return _private->frameLoadDelegate;
}
@@ -3020,16 +3341,17 @@ static bool needsWebViewInitThreadWorkaround()
{
if (!_private->page)
return nil;
- if (!_private->page->backForwardList()->enabled())
+ BackForwardListImpl* list = static_cast<BackForwardListImpl*>(_private->page->backForwardList());
+ if (!list->enabled())
return nil;
- return kit(_private->page->backForwardList());
+ return kit(list);
}
- (void)setMaintainsBackForwardList:(BOOL)flag
{
if (!_private->page)
return;
- _private->page->backForwardList()->setEnabled(flag);
+ static_cast<BackForwardListImpl*>(_private->page->backForwardList())->setEnabled(flag);
}
- (BOOL)goBack
@@ -3067,19 +3389,21 @@ static bool needsWebViewInitThreadWorkaround()
return [self _realZoomMultiplierIsTextOnly] ? _private->zoomMultiplier : 1.0f;
}
-- (void)_setZoomMultiplier:(float)m isTextOnly:(BOOL)isTextOnly
+- (void)_setZoomMultiplier:(float)multiplier isTextOnly:(BOOL)isTextOnly
{
// NOTE: This has no visible effect when viewing a PDF (see <rdar://problem/4737380>)
- _private->zoomMultiplier = m;
- ASSERT(_private->page);
- if (_private->page)
- _private->page->settings()->setZoomsTextOnly(isTextOnly);
-
- // FIXME: it would be nice to rework this code so that _private->zoomMultiplier doesn't exist and callers
- // all access _private->page->settings().
+ _private->zoomMultiplier = multiplier;
+ _private->zoomsTextOnly = isTextOnly;
+
+ // FIXME: It might be nice to rework this code so that _private->zoomMultiplier doesn't exist
+ // and instead the zoom factors stored in Frame are used.
Frame* coreFrame = [self _mainCoreFrame];
- if (coreFrame)
- coreFrame->setZoomFactor(m, isTextOnly);
+ if (coreFrame) {
+ if (_private->zoomsTextOnly)
+ coreFrame->setPageAndTextZoomFactors(1, multiplier);
+ else
+ coreFrame->setPageAndTextZoomFactors(multiplier, 1);
+ }
}
- (float)_zoomMultiplier:(BOOL)isTextOnly
@@ -3099,7 +3423,7 @@ static bool needsWebViewInitThreadWorkaround()
if (!_private->page)
return NO;
- return _private->page->settings()->zoomsTextOnly();
+ return _private->zoomsTextOnly;
}
#define MinimumZoomMultiplier 0.5f
@@ -3286,7 +3610,7 @@ static bool needsWebViewInitThreadWorkaround()
- (void)setHostWindow:(NSWindow *)hostWindow
{
- if (_private->closed)
+ if (_private->closed && hostWindow)
return;
if (hostWindow == _private->hostWindow)
return;
@@ -3722,7 +4046,7 @@ static WebFrame *incrementFrame(WebFrame *frame, BOOL forward, BOOL wrapFlag)
- (BOOL)canGoBack
{
- if (!_private->page)
+ if (!_private->page || _private->page->defersLoading())
return NO;
return !!_private->page->backForwardList()->backItem();
@@ -3730,7 +4054,7 @@ static WebFrame *incrementFrame(WebFrame *frame, BOOL forward, BOOL wrapFlag)
- (BOOL)canGoForward
{
- if (!_private->page)
+ if (!_private->page || _private->page->defersLoading())
return NO;
return !!_private->page->backForwardList()->forwardItem();
@@ -4089,7 +4413,7 @@ static WebFrame *incrementFrame(WebFrame *frame, BOOL forward, BOOL wrapFlag)
Frame* coreFrame = [self _mainCoreFrame];
if (!coreFrame)
return YES;
- return coreFrame->shouldClose();
+ return coreFrame->loader()->shouldClose();
}
static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue jsValue)
@@ -4098,7 +4422,7 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue jsValu
if (jsValue.isBoolean())
return [NSAppleEventDescriptor descriptorWithBoolean:jsValue.getBoolean()];
if (jsValue.isString())
- return [NSAppleEventDescriptor descriptorWithString:String(jsValue.getString(exec))];
+ return [NSAppleEventDescriptor descriptorWithString:ustringToString(jsValue.getString(exec))];
if (jsValue.isNumber()) {
double value = jsValue.uncheckedGetNumber();
int intValue = value;
@@ -4162,6 +4486,9 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue jsValu
- (BOOL)canMarkAllTextMatches
{
+ if (_private->closed)
+ return NO;
+
WebFrame *frame = [self mainFrame];
do {
id <WebDocumentView> view = [[frame frameView] documentView];
@@ -4176,15 +4503,27 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue jsValu
- (NSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag highlight:(BOOL)highlight limit:(NSUInteger)limit
{
+ if (_private->closed)
+ return 0;
+
+ return [self countMatchesForText:string caseSensitive:caseFlag highlight:highlight limit:limit markMatches:YES];
+}
+
+- (NSUInteger)countMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag highlight:(BOOL)highlight limit:(NSUInteger)limit markMatches:(BOOL)markMatches
+{
+ if (_private->closed)
+ return 0;
+
WebFrame *frame = [self mainFrame];
unsigned matchCount = 0;
do {
id <WebDocumentView> view = [[frame frameView] documentView];
if ([view conformsToProtocol:@protocol(WebMultipleTextMatches)]) {
- [(NSView <WebMultipleTextMatches>*)view setMarkedTextMatchesAreHighlighted:highlight];
+ if (markMatches)
+ [(NSView <WebMultipleTextMatches>*)view setMarkedTextMatchesAreHighlighted:highlight];
ASSERT(limit == 0 || matchCount < limit);
- matchCount += [(NSView <WebMultipleTextMatches>*)view markAllMatchesForText:string caseSensitive:caseFlag limit:limit == 0 ? 0 : limit - matchCount];
+ matchCount += [(NSView <WebMultipleTextMatches>*)view countMatchesForText:string caseSensitive:caseFlag limit:limit == 0 ? 0 : limit - matchCount markMatches:markMatches];
// Stop looking if we've reached the limit. A limit of 0 means no limit.
if (limit > 0 && matchCount >= limit)
@@ -4199,6 +4538,9 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue jsValu
- (void)unmarkAllTextMatches
{
+ if (_private->closed)
+ return;
+
WebFrame *frame = [self mainFrame];
do {
id <WebDocumentView> view = [[frame frameView] documentView];
@@ -4211,6 +4553,9 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue jsValu
- (NSArray *)rectsForTextMatches
{
+ if (_private->closed)
+ return [NSArray array];
+
NSMutableArray *result = [NSMutableArray array];
WebFrame *frame = [self mainFrame];
do {
@@ -4544,12 +4889,11 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue jsValu
Frame* mainFrame = [self _mainCoreFrame];
if (mainFrame) {
if (flag) {
- mainFrame->applyEditingStyleToBodyElement();
+ mainFrame->editor()->applyEditingStyleToBodyElement();
// If the WebView is made editable and the selection is empty, set it to something.
if (![self selectedDOMRange])
- mainFrame->setSelectionFromNone();
- } else
- mainFrame->removeEditingStyleFromBodyElement();
+ mainFrame->selection()->setSelectionFromNone();
+ }
}
}
}
@@ -4964,6 +5308,11 @@ static WebFrameView *containingFrameView(NSView *view)
@implementation WebView (WebFileInternal)
+static inline uint64_t roundUpToPowerOf2(uint64_t num)
+{
+ return powf(2.0, ceilf(log2f(num)));
+}
+
+ (void)_setCacheModel:(WebCacheModel)cacheModel
{
if (s_didSetCacheModel && cacheModel == s_cacheModel)
@@ -4973,9 +5322,7 @@ static WebFrameView *containingFrameView(NSView *view)
if (!nsurlCacheDirectory)
nsurlCacheDirectory = NSHomeDirectory();
- // As a fudge factor, use 1000 instead of 1024, in case the reported byte
- // count doesn't align exactly to a megabyte boundary.
- uint64_t memSize = WebMemorySize() / 1024 / 1000;
+ static uint64_t memSize = roundUpToPowerOf2(WebMemorySize() / 1024 / 1024);
unsigned long long diskFreeSize = WebVolumeFreeSize(nsurlCacheDirectory) / 1024 / 1000;
NSURLCache *nsurlCache = [NSURLCache sharedURLCache];
@@ -4995,10 +5342,10 @@ static WebFrameView *containingFrameView(NSView *view)
pageCacheCapacity = 0;
// Object cache capacities (in bytes)
- if (memSize >= 2048)
+ if (memSize >= 4096)
+ cacheTotalCapacity = 128 * 1024 * 1024;
+ else if (memSize >= 2048)
cacheTotalCapacity = 96 * 1024 * 1024;
- else if (memSize >= 1536)
- cacheTotalCapacity = 64 * 1024 * 1024;
else if (memSize >= 1024)
cacheTotalCapacity = 32 * 1024 * 1024;
else if (memSize >= 512)
@@ -5027,10 +5374,10 @@ static WebFrameView *containingFrameView(NSView *view)
pageCacheCapacity = 0;
// Object cache capacities (in bytes)
- if (memSize >= 2048)
+ if (memSize >= 4096)
+ cacheTotalCapacity = 128 * 1024 * 1024;
+ else if (memSize >= 2048)
cacheTotalCapacity = 96 * 1024 * 1024;
- else if (memSize >= 1536)
- cacheTotalCapacity = 64 * 1024 * 1024;
else if (memSize >= 1024)
cacheTotalCapacity = 32 * 1024 * 1024;
else if (memSize >= 512)
@@ -5079,10 +5426,10 @@ static WebFrameView *containingFrameView(NSView *view)
// (Testing indicates that value / MB depends heavily on content and
// browsing pattern. Even growth above 128MB can have substantial
// value / MB for some content / browsing patterns.)
- if (memSize >= 2048)
+ if (memSize >= 4096)
+ cacheTotalCapacity = 192 * 1024 * 1024;
+ else if (memSize >= 2048)
cacheTotalCapacity = 128 * 1024 * 1024;
- else if (memSize >= 1536)
- cacheTotalCapacity = 96 * 1024 * 1024;
else if (memSize >= 1024)
cacheTotalCapacity = 64 * 1024 * 1024;
else if (memSize >= 512)
@@ -5270,7 +5617,7 @@ static WebFrameView *containingFrameView(NSView *view)
NSDictionary *element = [sender representedObject];
ASSERT([element isKindOfClass:[NSDictionary class]]);
- WebDataSource *dataSource = [[element objectForKey:WebElementFrameKey] dataSource];
+ WebDataSource *dataSource = [(WebFrame *)[element objectForKey:WebElementFrameKey] dataSource];
NSURLRequest *request = [[dataSource request] copy];
ASSERT(request);
@@ -5331,10 +5678,27 @@ static WebFrameView *containingFrameView(NSView *view)
_private->layerSyncRunLoopObserver = 0;
}
#endif
+
+#if ENABLE(GLIB_SUPPORT)
+- (void)_clearGlibLoopObserver
+{
+ if (!_private->glibRunLoopObserver)
+ return;
+
+ CFRunLoopObserverInvalidate(_private->glibRunLoopObserver);
+ CFRelease(_private->glibRunLoopObserver);
+ _private->glibRunLoopObserver = 0;
+}
+#endif
@end
@implementation WebView (WebViewInternal)
++ (BOOL)shouldIncludeInWebKitStatistics
+{
+ return NO;
+}
+
- (BOOL)_becomingFirstResponderFromOutside
{
return _private->becomingFirstResponderFromOutside;
@@ -5539,13 +5903,44 @@ static WebFrameView *containingFrameView(NSView *view)
static void layerSyncRunLoopObserverCallBack(CFRunLoopObserverRef, CFRunLoopActivity, void* info)
{
- WebView* webView = reinterpret_cast<WebView*>(info);
- if ([webView _syncCompositingChanges])
+ WebView *webView = reinterpret_cast<WebView*>(info);
+ NSWindow *window = [webView window];
+
+ // An NSWindow may not display in the next runloop cycle after dirtying due to delayed window display logic,
+ // in which case this observer can fire first. So if the window is due for a display, don't commit
+ // layer changes, otherwise they'll show on screen before the view drawing.
+ bool viewsNeedDisplay;
+#ifndef __LP64__
+ if (window && [window _wrapsCarbonWindow])
+ viewsNeedDisplay = HIViewGetNeedsDisplay(HIViewGetRoot(static_cast<WindowRef>([window windowRef])));
+ else
+#endif
+ viewsNeedDisplay = [window viewsNeedDisplay];
+
+ if (viewsNeedDisplay)
+ return;
+
+ if ([webView _syncCompositingChanges]) {
[webView _clearLayerSyncLoopObserver];
+ // AppKit may have disabled screen updates, thinking an upcoming window flush will re-enable them.
+ // In case setNeedsDisplayInRect() has prevented the window from needing to be flushed, re-enable screen
+ // updates here.
+ if (![window isFlushWindowDisabled])
+ [window _enableScreenUpdatesIfNeeded];
+ } else {
+ // Since the WebView does not need display, -viewWillDraw will not be called. Perform pending layout now,
+ // so that the layers draw with up-to-date layout.
+ [webView _viewWillDrawInternal];
+ }
}
- (void)_scheduleCompositingLayerSync
{
+ CFRunLoopRef currentRunLoop = CFRunLoopGetCurrent();
+
+ // Make sure we wake up the loop or the observer could be delayed until some other source fires.
+ CFRunLoopWakeUp(currentRunLoop);
+
if (_private->layerSyncRunLoopObserver)
return;
@@ -5561,7 +5956,7 @@ static void layerSyncRunLoopObserverCallBack(CFRunLoopObserverRef, CFRunLoopActi
kCFRunLoopBeforeWaiting | kCFRunLoopExit, true /* repeats */,
runLoopOrder, layerSyncRunLoopObserverCallBack, &context);
- CFRunLoopAddObserver(CFRunLoopGetCurrent(), _private->layerSyncRunLoopObserver, kCFRunLoopCommonModes);
+ CFRunLoopAddObserver(currentRunLoop, _private->layerSyncRunLoopObserver, kCFRunLoopCommonModes);
}
#endif
@@ -5607,6 +6002,50 @@ static void layerSyncRunLoopObserverCallBack(CFRunLoopObserverRef, CFRunLoopActi
#endif
+#if ENABLE(GLIB_SUPPORT)
+
+static void glibContextIterationCallback(CFRunLoopObserverRef, CFRunLoopActivity, void*)
+{
+ g_main_context_iteration(0, FALSE);
+}
+
+- (void)_scheduleGlibContextIterations
+{
+ if (_private->glibRunLoopObserver)
+ return;
+
+ NSRunLoop* myRunLoop = [NSRunLoop currentRunLoop];
+
+ // Create a run loop observer and attach it to the run loop.
+ CFRunLoopObserverContext context = {0, self, 0, 0, 0};
+ _private->glibRunLoopObserver = CFRunLoopObserverCreate(kCFAllocatorDefault, kCFRunLoopBeforeWaiting, YES, 0, &glibContextIterationCallback, &context);
+
+ if (_private->glibRunLoopObserver) {
+ CFRunLoopRef cfLoop = [myRunLoop getCFRunLoop];
+ CFRunLoopAddObserver(cfLoop, _private->glibRunLoopObserver, kCFRunLoopDefaultMode);
+ }
+
+}
+#endif
+
+
+@end
+
+@implementation WebView (WebViewDeviceOrientation)
+
+- (void)_setDeviceOrientationProvider:(id<WebDeviceOrientationProvider>)deviceOrientationProvider
+{
+ if (_private)
+ _private->m_deviceOrientationProvider = deviceOrientationProvider;
+}
+
+- (id<WebDeviceOrientationProvider>)_deviceOrientationProvider
+{
+ if (_private)
+ return _private->m_deviceOrientationProvider;
+ return nil;
+}
+
@end
@implementation WebView (WebViewGeolocation)
@@ -5624,7 +6063,7 @@ static void layerSyncRunLoopObserverCallBack(CFRunLoopObserverRef, CFRunLoopActi
return nil;
}
-- (void)_geolocationDidChangePosition:(WebGeolocationPosition *)position;
+- (void)_geolocationDidChangePosition:(WebGeolocationPosition *)position
{
#if ENABLE(CLIENT_BASED_GEOLOCATION)
if (_private && _private->page)
@@ -5644,6 +6083,44 @@ static void layerSyncRunLoopObserverCallBack(CFRunLoopObserverRef, CFRunLoopActi
@end
+@implementation WebView (WebViewPrivateStyleInfo)
+
+- (JSValueRef)_computedStyleIncludingVisitedInfo:(JSContextRef)context forElement:(JSValueRef)value
+{
+ JSLock lock(SilenceAssertionsOnly);
+ ExecState* exec = toJS(context);
+ if (!value)
+ return JSValueMakeUndefined(context);
+ JSValue jsValue = toJS(exec, value);
+ if (!jsValue.inherits(&JSElement::s_info))
+ return JSValueMakeUndefined(context);
+ JSElement* jsElement = static_cast<JSElement*>(asObject(jsValue));
+ Element* element = jsElement->impl();
+ RefPtr<CSSComputedStyleDeclaration> style = computedStyle(element, true);
+ return toRef(exec, toJS(exec, jsElement->globalObject(), style.get()));
+}
+
+@end
+
+@implementation WebView (WebViewPrivateNodesFromRect)
+
+- (JSValueRef)_nodesFromRect:(JSContextRef)context forDocument:(JSValueRef)value x:(int)x y:(int)y top:(unsigned)top right:(unsigned)right bottom:(unsigned)bottom left:(unsigned)left ignoreClipping:(BOOL)ignoreClipping
+{
+ JSLock lock(SilenceAssertionsOnly);
+ ExecState* exec = toJS(context);
+ if (!value)
+ return JSValueMakeUndefined(context);
+ JSValue jsValue = toJS(exec, value);
+ if (!jsValue.inherits(&JSDocument::s_info))
+ return JSValueMakeUndefined(context);
+ JSDocument* jsDocument = static_cast<JSDocument*>(asObject(jsValue));
+ Document* document = jsDocument->impl();
+ RefPtr<NodeList> nodes = document->nodesFromRect(x, y, top, right, bottom, left, ignoreClipping);
+ return toRef(exec, toJS(exec, jsDocument->globalObject(), nodes.get()));
+}
+
+@end
+
#ifdef BUILDING_ON_LEOPARD
static IMP originalRecursivelyRemoveMailAttributesImp;
diff --git a/WebKit/mac/WebView/WebViewData.h b/WebKit/mac/WebView/WebViewData.h
index b0569a2..8b834ca 100644
--- a/WebKit/mac/WebView/WebViewData.h
+++ b/WebKit/mac/WebView/WebViewData.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 Igalia S.L
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -43,6 +44,7 @@ namespace WebCore {
@class WebPreferences;
@class WebTextCompletionController;
@protocol WebFormDelegate;
+@protocol WebDeviceOrientationProvider;
@protocol WebGeolocationProvider;
#if ENABLE(VIDEO)
@class WebVideoFullscreenController;
@@ -76,9 +78,10 @@ extern int pluginDatabaseClientCount;
BOOL allowsUndo;
float zoomMultiplier;
+ BOOL zoomsTextOnly;
NSString *applicationNameForUserAgent;
- WebCore::String userAgent;
+ WTF::String userAgent;
BOOL userAgentOverridden;
WebPreferences *preferences;
@@ -135,8 +138,10 @@ extern int pluginDatabaseClientCount;
BOOL shouldUpdateWhileOffscreen;
- // When this flag is set, we will not make any subviews underneath this WebView. This means no WebFrameViews and no WebHTMLViews.
+ // When this flag is unset, we will not make any subviews underneath this WebView. This means no WebFrameViews and no WebHTMLViews.
BOOL usesDocumentViews;
+
+ BOOL includesFlattenedCompositingLayersWhenDrawingToBitmap;
#if USE(ACCELERATED_COMPOSITING)
// When this flag is set, next time a WebHTMLView draws, it needs to temporarily disable screen updates
@@ -167,6 +172,10 @@ extern int pluginDatabaseClientCount;
WebVideoFullscreenController *fullscreenController;
#endif
+#if ENABLE(GLIB_SUPPORT)
+ CFRunLoopObserverRef glibRunLoopObserver;
+#endif
id<WebGeolocationProvider> _geolocationProvider;
+ id<WebDeviceOrientationProvider> m_deviceOrientationProvider;
}
@end
diff --git a/WebKit/mac/WebView/WebViewData.mm b/WebKit/mac/WebView/WebViewData.mm
index 21ba4c8..9794d03 100644
--- a/WebKit/mac/WebView/WebViewData.mm
+++ b/WebKit/mac/WebView/WebViewData.mm
@@ -34,6 +34,7 @@
#import <WebCore/WebCoreObjCExtras.h>
#import <objc/objc-auto.h>
#import <runtime/InitializeThreading.h>
+#import <wtf/Threading.h>
BOOL applicationIsTerminating = NO;
int pluginDatabaseClientCount = 0;
@@ -43,6 +44,7 @@ int pluginDatabaseClientCount = 0;
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
@@ -60,12 +62,17 @@ int pluginDatabaseClientCount = 0;
cssAnimationsSuspended = NO;
zoomMultiplier = 1;
+ zoomsTextOnly = NO;
#if ENABLE(DASHBOARD_SUPPORT)
dashboardBehaviorAllowWheelScrolling = YES;
#endif
- shouldCloseWithWindow = objc_collecting_enabled();
+#if !defined(BUILDING_ON_TIGER)
+ shouldCloseWithWindow = objc_collectingEnabled();
+#else
+ shouldCloseWithWindow = NO;
+#endif
smartInsertDeleteEnabled = ![[NSUserDefaults standardUserDefaults] objectForKey:WebSmartInsertDeleteEnabled]
|| [[NSUserDefaults standardUserDefaults] boolForKey:WebSmartInsertDeleteEnabled];
diff --git a/WebKit/mac/WebView/WebViewInternal.h b/WebKit/mac/WebView/WebViewInternal.h
index 6c2ae50..0a6f462 100644
--- a/WebKit/mac/WebView/WebViewInternal.h
+++ b/WebKit/mac/WebView/WebViewInternal.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 Igalia S.L
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -35,8 +36,9 @@
#ifdef __cplusplus
#import <WebCore/WebCoreKeyboardUIMode.h>
+#include <wtf/Forward.h>
+
namespace WebCore {
- class String;
class Frame;
class KURL;
class KeyboardEvent;
@@ -64,6 +66,8 @@ namespace WebCore {
@interface WebView (WebViewInternal)
++ (BOOL)shouldIncludeInWebKitStatistics;
+
- (WebCore::Frame*)_mainCoreFrame;
- (WebFrame *)_selectedOrMainFrame;
@@ -84,6 +88,10 @@ namespace WebCore {
- (void)_scheduleCompositingLayerSync;
#endif
+#if ENABLE(GLIB_SUPPORT)
+- (void)_scheduleGlibContextIterations;
+#endif
+
@end
#endif
@@ -115,6 +123,8 @@ namespace WebCore {
- (void)_didStartProvisionalLoadForFrame:(WebFrame *)frame;
+ (BOOL)_viewClass:(Class *)vClass andRepresentationClass:(Class *)rClass forMIMEType:(NSString *)MIMEType allowingPlugins:(BOOL)allowPlugins;
- (BOOL)_viewClass:(Class *)vClass andRepresentationClass:(Class *)rClass forMIMEType:(NSString *)MIMEType;
++ (void)_registerPluginMIMEType:(NSString *)MIMEType;
++ (void)_unregisterPluginMIMEType:(NSString *)MIMEType;
+ (BOOL)_canShowMIMEType:(NSString *)MIMEType allowingPlugins:(BOOL)allowPlugins;
- (BOOL)_canShowMIMEType:(NSString *)MIMEType;
+ (NSString *)_MIMETypeForFile:(NSString *)path;
@@ -138,6 +148,9 @@ namespace WebCore {
- (void)_didChangeValueForKey:(NSString *)key;
- (WebBasePluginPackage *)_pluginForMIMEType:(NSString *)MIMEType;
- (WebBasePluginPackage *)_pluginForExtension:(NSString *)extension;
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+- (WebBasePluginPackage *)_videoProxyPluginForMIMEType:(NSString *)MIMEType;
+#endif
- (void)setCurrentNodeHighlight:(WebNodeHighlight *)nodeHighlight;
- (WebNodeHighlight *)currentNodeHighlight;
@@ -172,4 +185,6 @@ namespace WebCore {
- (void)_exitFullscreen;
#endif
+- (JSValueRef)_computedStyleIncludingVisitedInfo:(JSContextRef)context forElement:(JSValueRef)value;
+
@end
diff --git a/WebKit/mac/WebView/WebViewPrivate.h b/WebKit/mac/WebView/WebViewPrivate.h
index 4d1145e..b951689 100644
--- a/WebKit/mac/WebView/WebViewPrivate.h
+++ b/WebKit/mac/WebView/WebViewPrivate.h
@@ -28,6 +28,7 @@
#import <WebKit/WebView.h>
#import <WebKit/WebFramePrivate.h>
+#import <JavaScriptCore/JSBase.h>
#if !defined(ENABLE_DASHBOARD_SUPPORT)
#define ENABLE_DASHBOARD_SUPPORT 1
@@ -43,12 +44,14 @@
@class NSError;
@class WebFrame;
+@class WebDeviceOrientation;
@class WebGeolocationPosition;
@class WebInspector;
@class WebPreferences;
@class WebScriptWorld;
@class WebTextIterator;
+@protocol WebDeviceOrientationProvider;
@protocol WebFormDelegate;
extern NSString *_WebCanGoBackKey;
@@ -64,6 +67,7 @@ extern NSString *_WebMainFrameDocumentKey;
extern NSString *WebElementTitleKey; // NSString of the title of the element (used by Safari)
extern NSString *WebElementSpellingToolTipKey; // NSString of a tooltip representing misspelling or bad grammar (used internally)
extern NSString *WebElementIsContentEditableKey; // NSNumber indicating whether the inner non-shared node is content editable (used internally)
+extern NSString *WebElementMediaURLKey; // NSURL of the media element
// other WebElementDictionary keys
extern NSString *WebElementLinkIsLiveKey; // NSNumber of BOOL indictating whether the link is live or not
@@ -87,6 +91,11 @@ typedef enum {
WebInjectAtDocumentEnd,
} WebUserScriptInjectionTime;
+typedef enum {
+ WebInjectInAllFrames,
+ WebInjectInTopFrameOnly
+} WebUserContentInjectedFrames;
+
@interface WebController : NSTreeController {
IBOutlet WebView *webView;
}
@@ -174,6 +183,7 @@ typedef enum {
// These methods are still in flux; don't rely on them yet.
- (BOOL)canMarkAllTextMatches;
- (WebNSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag highlight:(BOOL)highlight limit:(WebNSUInteger)limit;
+- (WebNSUInteger)countMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag highlight:(BOOL)highlight limit:(WebNSUInteger)limit markMatches:(BOOL)markMatches;
- (void)unmarkAllTextMatches;
- (NSArray *)rectsForTextMatches;
@@ -240,6 +250,14 @@ Could be worth adding to the API.
*/
- (void)_loadBackForwardListFromOtherView:(WebView *)otherView;
+/*
+ @method _reportException:inContext:
+ @abstract Logs the exception to the Web Inspector. This only needs called for exceptions that
+ occur while using the JavaScriptCore APIs with a context owned by a WebKit.
+ @param exception The exception value to log.
+ @param context The context the exception occured in.
+*/
++ (void)_reportException:(JSValueRef)exception inContext:(JSContextRef)context;
/*!
@method _dispatchPendingLoadRequests:
@@ -470,6 +488,13 @@ Could be worth adding to the API.
- (void)_setPostsAcceleratedCompositingNotifications:(BOOL)flag;
- (BOOL)_isUsingAcceleratedCompositing;
+// Returns YES if NSView -displayRectIgnoringOpacity:inContext: will produce a faithful representation of the content.
+- (BOOL)_isSoftwareRenderable;
+// When drawing into a bitmap context, we normally flatten compositing layers (and distort 3D transforms).
+// Clients who are able to capture their own copy of the compositing layers need to be able to disable this.
+- (void)_setIncludesFlattenedCompositingLayersWhenDrawingToBitmap:(BOOL)flag;
+- (BOOL)_includesFlattenedCompositingLayersWhenDrawingToBitmap;
+
// SPI for PluginHalter
+ (BOOL)_isNodeHaltedPlugin:(DOMNode *)node;
+ (BOOL)_hasPluginForNodeBeenHalted:(DOMNode *)node;
@@ -482,13 +507,18 @@ Could be worth adding to the API.
// - destinationProtocol: The protocol to grant access to.
// - destinationHost: The host to grant access to.
// - allowDestinationSubdomains: If host is a domain, setting this to YES will whitelist host and all its subdomains, recursively.
-+ (void)_whiteListAccessFromOrigin:(NSString *)sourceOrigin destinationProtocol:(NSString *)destinationProtocol destinationHost:(NSString *)destinationHost allowDestinationSubdomains:(BOOL)allowDestinationSubdomains;
++ (void)_addOriginAccessWhitelistEntryWithSourceOrigin:(NSString *)sourceOrigin destinationProtocol:(NSString *)destinationProtocol destinationHost:(NSString *)destinationHost allowDestinationSubdomains:(BOOL)allowDestinationSubdomains;
++ (void)_removeOriginAccessWhitelistEntryWithSourceOrigin:(NSString *)sourceOrigin destinationProtocol:(NSString *)destinationProtocol destinationHost:(NSString *)destinationHost allowDestinationSubdomains:(BOOL)allowDestinationSubdomains;
-// Removes all white list entries created with _whiteListAccessFromOrigin.
-+ (void)_resetOriginAccessWhiteLists;
+// Removes all white list entries created with _addOriginAccessWhitelistEntryWithSourceOrigin.
++ (void)_resetOriginAccessWhitelists;
+// FIXME: The following two methods are deprecated in favor of the overloads below that take the WebUserContentInjectedFrames argument. https://bugs.webkit.org/show_bug.cgi?id=41800.
+ (void)_addUserScriptToGroup:(NSString *)groupName world:(WebScriptWorld *)world source:(NSString *)source url:(NSURL *)url whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist injectionTime:(WebUserScriptInjectionTime)injectionTime;
+ (void)_addUserStyleSheetToGroup:(NSString *)groupName world:(WebScriptWorld *)world source:(NSString *)source url:(NSURL *)url whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist;
+
++ (void)_addUserScriptToGroup:(NSString *)groupName world:(WebScriptWorld *)world source:(NSString *)source url:(NSURL *)url whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist injectionTime:(WebUserScriptInjectionTime)injectionTime injectedFrames:(WebUserContentInjectedFrames)injectedFrames;
++ (void)_addUserStyleSheetToGroup:(NSString *)groupName world:(WebScriptWorld *)world source:(NSString *)source url:(NSURL *)url whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist injectedFrames:(WebUserContentInjectedFrames)injectedFrames;
+ (void)_removeUserScriptFromGroup:(NSString *)groupName world:(WebScriptWorld *)world url:(NSURL *)url;
+ (void)_removeUserStyleSheetFromGroup:(NSString *)groupName world:(WebScriptWorld *)world url:(NSURL *)url;
+ (void)_removeUserScriptsFromGroup:(NSString *)groupName world:(WebScriptWorld *)world;
@@ -510,6 +540,10 @@ Could be worth adding to the API.
- (void)setCSSAnimationsSuspended:(BOOL)suspended;
+ (void)_setDomainRelaxationForbidden:(BOOL)forbidden forURLScheme:(NSString *)scheme;
++ (void)_registerURLSchemeAsSecure:(NSString *)scheme;
+
+- (void)_scaleWebView:(float)scale;
+- (float)_viewScaleFactor;
@end
@@ -577,6 +611,11 @@ Could be worth adding to the API.
- (BOOL)_selectionIsAll;
@end
+@interface WebView (WebViewDeviceOrientation)
+- (void)_setDeviceOrientationProvider:(id<WebDeviceOrientationProvider>)deviceOrientationProvider;
+- (id<WebDeviceOrientationProvider>)_deviceOrientationProvider;
+@end
+
@protocol WebGeolocationProvider <NSObject>
- (void)registerWebView:(WebView *)webView;
- (void)unregisterWebView:(WebView *)webView;
@@ -591,6 +630,14 @@ Could be worth adding to the API.
- (void)_geolocationDidFailWithError:(NSError *)error;
@end
+@interface WebView (WebViewPrivateStyleInfo)
+- (JSValueRef)_computedStyleIncludingVisitedInfo:(JSContextRef)context forElement:(JSValueRef)value;
+@end
+
+@interface WebView (WebViewPrivateNodesFromRect)
+- (JSValueRef)_nodesFromRect:(JSContextRef)context forDocument:(JSValueRef)value x:(int)x y:(int)y top:(unsigned)top right:(unsigned)right bottom:(unsigned)bottom left:(unsigned)left ignoreClipping:(BOOL)ignoreClipping;
+@end
+
@interface NSObject (WebFrameLoadDelegatePrivate)
- (void)webView:(WebView *)sender didFirstLayoutInFrame:(WebFrame *)frame;