summaryrefslogtreecommitdiffstats
path: root/WebKit/mac
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2009-08-11 17:01:47 +0100
committerBen Murdoch <benm@google.com>2009-08-11 18:21:02 +0100
commit0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5 (patch)
tree2943df35f62d885c89d01063cc528dd73b480fea /WebKit/mac
parent7e7a70bfa49a1122b2597a1e6367d89eb4035eca (diff)
downloadexternal_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.zip
external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.gz
external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.bz2
Merge in WebKit r47029.
Diffstat (limited to 'WebKit/mac')
-rw-r--r--WebKit/mac/Carbon/HIWebView.mm (renamed from WebKit/mac/Carbon/HIWebView.m)0
-rw-r--r--WebKit/mac/ChangeLog4236
-rw-r--r--WebKit/mac/ChangeLog-2007-10-1416
-rw-r--r--WebKit/mac/Configurations/Base.xcconfig48
-rw-r--r--WebKit/mac/Configurations/DebugRelease.xcconfig27
-rw-r--r--WebKit/mac/Configurations/FeatureDefines.xcconfig62
-rw-r--r--WebKit/mac/Configurations/Version.xcconfig27
-rw-r--r--WebKit/mac/Configurations/WebKit.xcconfig34
-rw-r--r--WebKit/mac/DOM/WebDOMOperations.mm39
-rw-r--r--WebKit/mac/DOM/WebDOMOperationsInternal.h (renamed from WebKit/mac/Misc/WebGraphicsExtras.h)14
-rw-r--r--WebKit/mac/DOM/WebDOMOperationsPrivate.h11
-rw-r--r--WebKit/mac/ForwardingHeaders/wtf/OwnPtrCommon.h1
-rw-r--r--WebKit/mac/ForwardingHeaders/wtf/PassOwnPtr.h1
-rw-r--r--WebKit/mac/ForwardingHeaders/wtf/VMTags.h1
-rw-r--r--WebKit/mac/History/WebBackForwardList.mm29
-rw-r--r--WebKit/mac/History/WebHistory.mm111
-rw-r--r--WebKit/mac/History/WebHistoryInternal.h2
-rw-r--r--WebKit/mac/History/WebHistoryItem.mm33
-rw-r--r--WebKit/mac/History/WebHistoryItemInternal.h2
-rw-r--r--WebKit/mac/History/WebHistoryPrivate.h9
-rw-r--r--WebKit/mac/MigrateHeaders.make38
-rw-r--r--WebKit/mac/Misc/WebCache.mm6
-rw-r--r--WebKit/mac/Misc/WebCoreStatistics.h4
-rw-r--r--WebKit/mac/Misc/WebCoreStatistics.mm34
-rw-r--r--WebKit/mac/Misc/WebDownload.mm (renamed from WebKit/mac/Misc/WebDownload.m)21
-rw-r--r--WebKit/mac/Misc/WebElementDictionary.mm7
-rw-r--r--WebKit/mac/Misc/WebIconDatabase.mm13
-rw-r--r--WebKit/mac/Misc/WebKitErrors.m4
-rw-r--r--WebKit/mac/Misc/WebKitNSStringExtras.h2
-rw-r--r--WebKit/mac/Misc/WebKitNSStringExtras.mm (renamed from WebKit/mac/Misc/WebKitNSStringExtras.m)103
-rw-r--r--WebKit/mac/Misc/WebKitVersionChecks.h3
-rw-r--r--WebKit/mac/Misc/WebNSAttributedStringExtras.mm2
-rw-r--r--WebKit/mac/Misc/WebNSFileManagerExtras.h2
-rw-r--r--WebKit/mac/Misc/WebNSFileManagerExtras.m16
-rw-r--r--WebKit/mac/Misc/WebNSObjectExtras.mm40
-rw-r--r--WebKit/mac/Misc/WebNSPasteboardExtras.mm8
-rw-r--r--WebKit/mac/Misc/WebNSURLExtras.mm10
-rw-r--r--WebKit/mac/Misc/WebStringTruncator.mm (renamed from WebKit/mac/Misc/WebStringTruncator.m)0
-rw-r--r--WebKit/mac/Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib271
-rw-r--r--WebKit/mac/Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nibbin9514 -> 9998 bytes
-rw-r--r--WebKit/mac/Panels/WebAuthenticationPanel.h1
-rw-r--r--WebKit/mac/Panels/WebAuthenticationPanel.m51
-rw-r--r--WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.h11
-rw-r--r--WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm10
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h4
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm49
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.h15
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm279
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h54
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm381
-rw-r--r--WebKit/mac/Plugins/Hosted/ProxyInstance.h22
-rw-r--r--WebKit/mac/Plugins/Hosted/ProxyInstance.mm87
-rw-r--r--WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h4
-rw-r--r--WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm104
-rw-r--r--WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs58
-rw-r--r--WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs35
-rw-r--r--WebKit/mac/Plugins/Hosted/WebKitPluginHostTypes.h2
-rw-r--r--WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm4
-rw-r--r--WebKit/mac/Plugins/WebBaseNetscapePluginView.h22
-rw-r--r--WebKit/mac/Plugins/WebBaseNetscapePluginView.mm279
-rw-r--r--WebKit/mac/Plugins/WebNetscapeContainerCheckContextInfo.h46
-rw-r--r--WebKit/mac/Plugins/WebNetscapeContainerCheckContextInfo.mm61
-rw-r--r--WebKit/mac/Plugins/WebNetscapeContainerCheckPrivate.h (renamed from WebKit/mac/Misc/WebGraphicsExtras.c)57
-rw-r--r--WebKit/mac/Plugins/WebNetscapeContainerCheckPrivate.mm48
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginEventHandler.h3
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.h5
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm13
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginEventHandlerCocoa.h5
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginEventHandlerCocoa.mm22
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginPackage.mm14
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginView.h17
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginView.mm269
-rw-r--r--WebKit/mac/Plugins/WebNullPluginView.mm3
-rw-r--r--WebKit/mac/Plugins/WebPluginContainerCheck.h19
-rw-r--r--WebKit/mac/Plugins/WebPluginContainerCheck.mm32
-rw-r--r--WebKit/mac/Plugins/WebPluginController.h3
-rw-r--r--WebKit/mac/Plugins/WebPluginController.mm84
-rw-r--r--WebKit/mac/Plugins/WebPluginDatabase.mm11
-rw-r--r--WebKit/mac/Plugins/npapi.mm41
-rw-r--r--WebKit/mac/WebCoreSupport/WebApplicationCache.h32
-rw-r--r--WebKit/mac/WebCoreSupport/WebApplicationCache.mm40
-rw-r--r--WebKit/mac/WebCoreSupport/WebChromeClient.h16
-rw-r--r--WebKit/mac/WebCoreSupport/WebChromeClient.mm88
-rw-r--r--WebKit/mac/WebCoreSupport/WebContextMenuClient.h1
-rw-r--r--WebKit/mac/WebCoreSupport/WebContextMenuClient.mm41
-rw-r--r--WebKit/mac/WebCoreSupport/WebEditorClient.h22
-rw-r--r--WebKit/mac/WebCoreSupport/WebEditorClient.mm186
-rw-r--r--WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h5
-rw-r--r--WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm149
-rw-r--r--WebKit/mac/WebCoreSupport/WebIconDatabaseClient.mm4
-rw-r--r--WebKit/mac/WebCoreSupport/WebInspectorClient.h2
-rw-r--r--WebKit/mac/WebCoreSupport/WebInspectorClient.mm54
-rw-r--r--WebKit/mac/WebCoreSupport/WebPasteboardHelper.mm10
-rw-r--r--WebKit/mac/WebCoreSupport/WebSystemInterface.m6
-rw-r--r--WebKit/mac/WebCoreSupport/WebViewFactory.mm87
-rw-r--r--WebKit/mac/WebInspector/WebNodeHighlight.mm (renamed from WebKit/mac/WebInspector/WebNodeHighlight.m)0
-rw-r--r--WebKit/mac/WebInspector/WebNodeHighlightView.mm (renamed from WebKit/mac/WebInspector/WebNodeHighlightView.m)0
-rw-r--r--WebKit/mac/WebKit.exp8
-rw-r--r--WebKit/mac/WebKit.order2972
-rw-r--r--WebKit/mac/WebKitPrefix.h8
-rw-r--r--WebKit/mac/WebView/WebDataSource.mm18
-rw-r--r--WebKit/mac/WebView/WebDelegateImplementationCaching.h121
-rw-r--r--WebKit/mac/WebView/WebDelegateImplementationCaching.mm590
-rw-r--r--WebKit/mac/WebView/WebDynamicScrollBarsView.h1
-rw-r--r--WebKit/mac/WebView/WebDynamicScrollBarsView.mm (renamed from WebKit/mac/WebView/WebDynamicScrollBarsView.m)165
-rw-r--r--WebKit/mac/WebView/WebFrame.mm281
-rw-r--r--WebKit/mac/WebView/WebFrameInternal.h21
-rw-r--r--WebKit/mac/WebView/WebFramePrivate.h12
-rw-r--r--WebKit/mac/WebView/WebFrameView.mm77
-rw-r--r--WebKit/mac/WebView/WebHTMLRepresentation.mm13
-rw-r--r--WebKit/mac/WebView/WebHTMLView.mm1133
-rw-r--r--WebKit/mac/WebView/WebHTMLViewInternal.h6
-rw-r--r--WebKit/mac/WebView/WebHTMLViewPrivate.h1
-rw-r--r--WebKit/mac/WebView/WebPDFView.h2
-rw-r--r--WebKit/mac/WebView/WebPDFView.mm30
-rw-r--r--WebKit/mac/WebView/WebPreferenceKeysPrivate.h9
-rw-r--r--WebKit/mac/WebView/WebPreferences.mm72
-rw-r--r--WebKit/mac/WebView/WebPreferencesPrivate.h15
-rw-r--r--WebKit/mac/WebView/WebRenderNode.h4
-rw-r--r--WebKit/mac/WebView/WebRenderNode.mm54
-rw-r--r--WebKit/mac/WebView/WebResource.mm6
-rw-r--r--WebKit/mac/WebView/WebScriptDebugDelegate.mm18
-rw-r--r--WebKit/mac/WebView/WebScriptDebugger.mm7
-rw-r--r--WebKit/mac/WebView/WebTextCompletionController.h45
-rw-r--r--WebKit/mac/WebView/WebTextCompletionController.mm325
-rw-r--r--WebKit/mac/WebView/WebTextIterator.mm8
-rw-r--r--WebKit/mac/WebView/WebUIDelegatePrivate.h26
-rw-r--r--WebKit/mac/WebView/WebView.mm1913
-rw-r--r--WebKit/mac/WebView/WebViewData.h161
-rw-r--r--WebKit/mac/WebView/WebViewData.mm106
-rw-r--r--WebKit/mac/WebView/WebViewInternal.h160
-rw-r--r--WebKit/mac/WebView/WebViewPrivate.h74
132 files changed, 12737 insertions, 3980 deletions
diff --git a/WebKit/mac/Carbon/HIWebView.m b/WebKit/mac/Carbon/HIWebView.mm
index b461394..b461394 100644
--- a/WebKit/mac/Carbon/HIWebView.m
+++ b/WebKit/mac/Carbon/HIWebView.mm
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index dbf2427..e35709c 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,4239 @@
+2009-08-09 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ [WML] Deck access control is completly broken
+ https://bugs.webkit.org/show_bug.cgi?id=27721
+
+ Synchronize WebFrameLoadType with FrameLoadType enum. Append 'WebFrameLoadTypeBackWMLDeckNotAccessible'.
+
+ * WebView/WebFramePrivate.h:
+
+2009-08-07 Simon Fraser <simon.fraser@apple.com>
+
+ Fix the build on 10.6.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView attachRootLayer:]):
+
+2009-08-07 Simon Fraser <simon.fraser@apple.com>
+
+ Fix a stylistic nit related to the location of the *, which, for some
+ ridiculous reason, WebKit style dictates to be different between Objective-C and C++.
+
+ * WebView/WebDynamicScrollBarsView.mm:
+ (-[WebDynamicScrollBarsView reflectScrolledClipView:]):
+
+2009-08-07 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Work around an issue on Leopard where composited layers are misplaced and squished when the page
+ gets over 4096px tall.
+ https://bugs.webkit.org/show_bug.cgi?id=27272
+ <rdar://problem/7067892> [Leopard] Composisted layers are misplaced and squished on on long pages
+ <rdar://problem/7068252> [Leopard] When switching to a tab with HW layers, they fade in
+
+ * WebView/WebDynamicScrollBarsView.mm:
+ (-[WebDynamicScrollBarsView reflectScrolledClipView:]):
+ Call -_updateLayerHostingViewPosition after scrolling.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _frameOrBoundsChanged]):
+ Call -_updateLayerHostingViewPosition after the view changes size.
+
+ (-[WebHTMLView attachRootLayer:]):
+ Turn off default animations, to avoid animations of sublayer transform, and fading-in
+ when tab switching.
+
+ * WebView/WebHTMLViewInternal.h:
+ (-[WebHTMLView _updateLayerHostingViewPosition]):
+ New method that constrains the height of the layer-hosting view to a max height
+ of 4096px, and compensates for the height restriction by placing the layer-hosting
+ view at the top of the visible part of the WebHTMLView, and adjusting the position
+ of the hosted layers via sublayer transform.
+
+2009-08-07 Anders Carlsson <andersca@apple.com>
+
+ Fix Tiger build.
+
+ * WebView/WebRenderNode.mm:
+ (-[WebRenderNode _initWithCoreFrame:]):
+
+2009-08-07 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Timothy Hatcher and Sam Weinig.
+
+ Change WebRenderNode to take a WebFrame instead of a WebFrameView.
+
+ * WebView/WebRenderNode.h:
+ * WebView/WebRenderNode.mm:
+ (-[WebRenderNode _initWithName:position:rect:coreFrame:children:]):
+ (copyRenderNode):
+ (-[WebRenderNode _initWithCoreFrame:]):
+ (-[WebRenderNode initWithWebFrame:]):
+
+2009-08-06 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler and Dan Bernstein.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::hasHTMLView):
+ Always return true when we're in viewless mode.
+
+2009-08-06 Anders Carlsson <andersca@apple.com>
+
+ Remove WebGraphicsExtras.h include.
+
+ * Plugins/WebNetscapePluginView.mm:
+
+2009-08-06 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Remove WebGraphicsExtras, it is no longer used.
+
+ * Misc/WebGraphicsExtras.c: Removed.
+ * Misc/WebGraphicsExtras.h: Removed.
+
+2009-08-06 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by David Hyatt.
+
+ Added ENABLE_3D_CANVAS flag to build, default to off
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-08-04 Michael Nordman <michaeln@google.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27821
+
+ Mods to keep up with ApplicationCacheHost refactoring.
+
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource _transferApplicationCache:]):
+
+2009-07-30 Darin Adler <darin@apple.com>
+
+ Reviewed by David Levin.
+
+ Use checked casts for render tree
+ https://bugs.webkit.org/show_bug.cgi?id=23522
+
+ * Misc/WebNSAttributedStringExtras.mm:
+ (fileWrapperForElement):
+ * Misc/WebNSPasteboardExtras.mm:
+ (imageFromElement):
+ (-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
+ * WebView/WebFrame.mm:
+ (-[WebFrame _computePageRectsWithPrintWidthScaleFactor:printHeight:]):
+ (-[WebFrame _accessibilityTree]):
+ * WebView/WebRenderNode.mm:
+ (copyRenderNode):
+ Use checked casts.
+
+2009-07-31 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Accelerated animations stutter on pages with lots of animations and 3d transforms
+ https://bugs.webkit.org/show_bug.cgi?id=27884
+
+ This patch changes the strategy for synchronizing painting view the view,
+ and compositing layer updates. Previously the strategy was to disable screen
+ updates between the time we updated the layer tree, and painted the view. That
+ left screen updates disabled for too long (hundreds of milliseconds) in some
+ cases, causing animation stutter.
+
+ The new strategy is to batch up changes to the CA layer tree, and commit them
+ all at once just before painting happens (referred to as a "sync" in the code).
+ GraphicsLayerCA now keeps a bitmask of changed properties, and then migrates
+ the values stored in GraphicsLayer into the CA layer tree at commit time.
+
+ Compositing layers are then synced in FrameView::paintContents(). However, not
+ all style/layout changes will result in painting; to deal with style changes that
+ touch only compositing properties, we set up a runloop observer that takes care
+ of comitting layer changes when no painting happens.
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::scheduleCompositingLayerSync):
+ scheduleViewUpdate() renamed to syncCompositingStateRecursive()
+
+ * WebView/WebView.mm:
+ (-[WebView _close]):
+ (-[WebView _clearLayerSyncLoopObserver]):
+ "viewUpdateRunLoopObserver" is now "layerSyncLoopObserver".
+
+ (-[WebView _syncCompositingChanges]):
+ Helper method that calls syncCompositingStateRecursive() on the FrameView.
+
+ (layerSyncRunLoopObserverCallBack):
+ (-[WebView _scheduleCompositingLayerSync]):
+ This is all about layer sycning now. Also, the run loop observer is repeating,
+ because it has to keep firing until syncCompositingStateRecursive() says that it
+ has completed.
+
+ * WebView/WebViewData.h:
+ "viewUpdateRunLoopObserver" is now "layerSyncLoopObserver".
+
+ * WebView/WebViewInternal.h:
+ _scheduleViewUpdate is now _scheduleCompositingLayerSync
+
+2009-07-30 Michael Nordman <michaeln@google.com>
+
+ Reviewed by Darin Fisher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27821
+
+ Mods to keep up with ApplicationCacheHost refactoring.
+
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource _transferApplicationCache:]):
+
+2009-07-29 David Kilzer <ddkilzer@apple.com>
+
+ <http://webkit.org/b/27788> Don't export WebPluginController.h as a private header
+
+ Reviewed by Mark Rowe.
+
+ * Plugins/WebPluginController.h: Changed #import of
+ WebPluginContainerCheck.h to use a framework-style include in
+ case other platforms wish to export WebPluginController.h as a
+ private header.
+
+2009-07-29 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Added foundation work to allow a testing infrastructure for the Web
+ Inspector.
+
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorClient::inspectorWindowObjectCleared): Send the delegate
+ callback.
+ * WebView/WebDelegateImplementationCaching.h:
+ * WebView/WebView.mm:
+ (-[WebView _cacheFrameLoadDelegateImplementations]):
+ * WebView/WebViewPrivate.h: The delegate SPI.
+
+2009-07-27 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7091036> REGRESSION: Microsoft Messenger crashes during file send/receive due to use of WebKit on non-main thread
+
+ In some situations Microsoft Messenger can attempt to manipulate the DOM from a secondary thread while
+ updating its file transfer progress bar. This results in corruption of WebCore data structures that is
+ quickly followed by a crash. We can work around this by having -[WebFrame DOMDocument] return nil when
+ called from a secondary thread by Microsoft Messenger, which has the effect of turning its attempts at
+ DOM manipulation in to no-ops.
+
+ * WebView/WebFrame.mm:
+ (needsMicrosoftMessengerDOMDocumentWorkaround):
+ (-[WebFrame DOMDocument]):
+
+2009-07-27 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27735
+ Give a helpful name to JSLock constructor argument
+
+ * Misc/WebCoreStatistics.mm:
+ (+[WebCoreStatistics javaScriptObjectsCount]):
+ (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
+ (+[WebCoreStatistics javaScriptProtectedObjectsCount]):
+ (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
+ (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
+ (+[WebCoreStatistics shouldPrintExceptions]):
+ (+[WebCoreStatistics setShouldPrintExceptions:]):
+ (+[WebCoreStatistics memoryStatistics]):
+ (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
+ * 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::hasMethod):
+ (WebKit::NetscapePluginInstanceProxy::enumerate):
+ (WebKit::NetscapePluginInstanceProxy::addValueToArray):
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (WebNetscapePluginStream::wantsAllStreams):
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView sendEvent:isDrawRect:]):
+ (-[WebNetscapePluginView setWindowIfNecessary]):
+ (-[WebNetscapePluginView createPluginScriptableObject]):
+ (-[WebNetscapePluginView evaluateJavaScriptPluginRequest:]):
+ (-[WebNetscapePluginView webFrame:didFinishLoadWithReason:]):
+ (-[WebNetscapePluginView loadPluginRequest:]):
+ (-[WebNetscapePluginView _printedPluginBitmap]):
+ * Plugins/WebPluginController.mm:
+ (+[WebPluginController plugInViewWithArguments:fromPluginPackage:]):
+ (-[WebPluginController startAllPlugins]):
+ (-[WebPluginController stopAllPlugins]):
+ (-[WebPluginController addPlugin:]):
+ (-[WebPluginController destroyPlugin:]):
+ (-[WebPluginController destroyAllPlugins]):
+ * WebView/WebFrame.mm:
+ (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame scopeChain]):
+ (-[WebScriptCallFrame evaluateWebScript:]):
+ * WebView/WebView.mm:
+ (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
+
+2009-07-24 Darin Adler <darin@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ REGRESSION (r46298): Exception after clicking on Bookmarks button in the Bookmarks Bar
+ https://bugs.webkit.org/show_bug.cgi?id=27667
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::transitionToCommittedForNewPage): Moved the code to set the
+ title here. This is late enough that both the view and representation exist.
+
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource _makeRepresentation]): Removed the code to set the title from here.
+ It's a bit too early.
+
+2009-07-24 Andrei Popescu <andreip@google.com>
+
+ Reviewed by Anders Carlsson.
+
+ ApplicationCache should have size limit
+ https://bugs.webkit.org/show_bug.cgi?id=22700
+
+ Adds the WebApplicationCache class that is
+ used by the DumpRenderTree test application to
+ configure the Application Cache maximum size.
+
+ * WebCoreSupport/WebApplicationCache.h: Added.
+ * WebCoreSupport/WebApplicationCache.mm: Added.
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::reachedMaxAppCacheSize):
+ Adds empty implementation of the reachedMaxAppCacheSize callback.
+ * WebKit.exp:
+
+2009-07-23 Darin Adler <darin@apple.com>
+
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource _makeRepresentation]): Landed a comment I forgot last time.
+
+2009-07-23 Darin Adler <darin@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ URL appears in back/forward button menu instead of title for items with custom representation
+ https://bugs.webkit.org/show_bug.cgi?id=27586
+ rdar://problem/5060337
+
+ The problem is that DocumentLoader expects to store a title, but for custom representations
+ it is never passed to the document loader.
+
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource _makeRepresentation]): Added a call to DocumentLoader::setTitle.
+ Works as long as the title does not change during the document's lifetime, which
+ is good enough for the simple cases in Safari.
+
+2009-07-20 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ REGRESSION (r39185): Safari adds ".jpeg" extension to images that already have ".JPG" extension
+ https://bugs.webkit.org/show_bug.cgi?id=27472
+
+ * WebView/WebHTMLView.mm:
+ (matchesExtensionOrEquivalent): Changed category method into a C function.
+ Made it require the leading dot when checking for the extension and do it
+ in a non-case-sensitive way.
+ (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Changed to call
+ the function.
+
+2009-07-21 Roland Steiner <rolandsteiner@google.com>
+
+ Reviewed by David Levin.
+
+ Add ENABLE_RUBY to list of build options
+ https://bugs.webkit.org/show_bug.cgi?id=27324
+
+ * Configurations/FeatureDefines.xcconfig: Added flag ENABLE_RUBY.
+
+2009-07-17 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Fix of <rdar://problem/5712795> Win: Cannot change the height of the docked Web Inspector (14272)
+ https://bugs.webkit.org/show_bug.cgi?id=14272
+
+ Removed size calculation code from [WebInspectorWindowController setInitialAttachedHeight] into
+ InspectorController.cpp to make it cross platform, and use InspectorController to store the
+ user's preferred size for an attached window, instead of NSUserDefaults.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController showWindow:]):
+ (-[WebInspectorWindowController setAttachedWindowHeight:]):
+
+2009-07-16 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by David Levin.
+
+ Add --web-sockets flag and ENABLE_WEB_SOCKETS define.
+ https://bugs.webkit.org/show_bug.cgi?id=27206
+
+ Add ENABLE_WEB_SOCKETS
+
+ * Configurations/FeatureDefines.xcconfig: add ENABLE_WEB_SOCKETS
+
+2009-07-16 Xiaomei Ji <xji@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Fix tooltip does not get its directionality from its element's directionality.
+ https://bugs.webkit.org/show_bug.cgi?id=24187
+
+ Per mitz's suggestion in comment #6, while getting the plain-text
+ title, we also get the directionality of the title. How to handle
+ the directionality is up to clients. Clients could ignore it,
+ or use attribute or unicode control characters to display the title
+ as what they want.
+
+ * Misc/WebElementDictionary.mm:
+ (-[WebElementDictionary _spellingToolTip]): Change spellingToolTip caller due to signature change.
+ (-[WebElementDictionary _title]): Change title caller due to signature change.
+ * WebCoreSupport/WebChromeClient.h: Add directionality as 2nd parameter to setToolTip().
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::setToolTip): Add directionality as 2nd parameter to setToopTip() (without handling it yet).
+
+2009-07-15 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Renamed parseURL to deprecatedParseURL.
+
+ * DOM/WebDOMOperations.mm:
+ (-[DOMDocument URLWithAttributeString:]): Renamed.
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createPlugin): Renamed.
+
+2009-07-15 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27304
+ WebKit should provide usage and eligibility information about the page cache.
+
+ * Misc/WebCoreStatistics.h:
+ * Misc/WebCoreStatistics.mm:
+ (+[WebCoreStatistics numberCachedPages]):
+ (+[WebCoreStatistics numberCachedFrames]):
+ (+[WebCoreStatistics numberAutoreleasedPages]):
+ * WebKit.exp:
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _cacheabilityDictionary]): Returns a dictionary with all the data about
+ why the frame is not cacheable. If the frame *is* cacheable, the dictionary is
+ empty.
+ * WebView/WebFramePrivate.h:
+
+2009-07-13 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein, Adam Roben.
+
+ "Unrecognized selector" console log when the Safari 4 Welcome page navigates to Top Sites.
+ <rdar://problem/6994893
+
+ attachRootGraphicsLayer() should not assume that the frameView's documentView
+ is a WebHTMLView.
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::attachRootGraphicsLayer):
+
+2009-07-13 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler and Kevin Decker.
+
+ <rdar://problem/7053687> Core Animation plug-ins continue to grow larger and larger when opening new tabs (32 bit-only)
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView setLayer:]):
+ Add a FIXME.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView setLayer:]):
+ Make sure to set the size of the layer before changing the autoresizing mask so it won't grow everytime it's inserted
+ into the layer tree.
+
+2009-07-13 Greg Bolsinga <bolsinga@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Correct these delegate methods' declarations by adding parameter names.
+
+ * WebView/WebUIDelegatePrivate.h:
+
+2009-07-13 Drew Wilson <atwilson@google.com>
+
+ Reviewed by David Levin.
+
+ Add ENABLE(SHARED_WORKERS) flag and define SharedWorker APIs
+ https://bugs.webkit.org/show_bug.cgi?id=26932
+
+ Added ENABLE(SHARED_WORKERS) flag (disabled by default).
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-07-12 Keishi Hattori <casey.hattori@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Refactor ConsoleMessage to add MessageType attribute.
+ https://bugs.webkit.org/show_bug.cgi?id=20625
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::addMessageToConsole):
+
+2009-07-11 Simon Fraser <simon.fraser@apple.com>
+
+ Enable support for accelerated compositing and 3d transforms on Leopard.
+ <https://bugs.webkit.org/show_bug.cgi?id=20166>
+ <rdar://problem/6120614>
+
+ Reviewed by Oliver Hunt.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-07-10 David Kilzer <ddkilzer@apple.com>
+
+ Bug 27007: Build fixes when ICONDATABASE is disabled
+
+ <https://bugs.webkit.org/show_bug.cgi?id=27007>
+
+ Reviewed by Sam Weinig.
+
+ * Misc/WebIconDatabase.mm:
+ (defaultClient): Return 0 if ICONDATABASE is disabled.
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::dispatchDidReceiveIcon): Commented out
+ the body of the method if ICONDATABASE is disabled.
+ (WebFrameLoaderClient::registerForIconNotification): Ditto.
+ * WebCoreSupport/WebIconDatabaseClient.mm: Added #if
+ ENABLE(ICONDATABASE)/#endif guard to source.
+ * WebView/WebView.mm:
+ (-[WebView setFrameLoadDelegate:]): Wrapped code that starts the
+ icon database machinery in #if ENABLE(ICONDATABASE)/#endif.
+ (-[WebView _registerForIconNotification:]): Wrapped method in
+ #if ENABLE(ICONDATABASE)/#endif guard.
+ (-[WebView _dispatchDidReceiveIconFromWebFrame:]): Ditto.
+ * WebView/WebViewInternal.h: Wrapped methods in #if
+ ENABLE(ICONDATABASE)/#endif guard.
+ (-[WebView _registerForIconNotification:]):
+ (-[WebView _dispatchDidReceiveIconFromWebFrame:]):
+
+2009-07-10 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Flashing as hardware layers are created and destroyed in some content
+ <rdar://problem/7032246>
+
+ There's a window of time between the end of one runloop cycle, after CA layers changes
+ have been committed, and the window display at the start of the next cycle when
+ CA may push updates to the screen before AppKit has drawn the view contents. If
+ we know that we need to do drawing synchronization (which we do when content moves
+ between a layer and the view), then we need to call -disableScreenUpdatesUntilFlush
+ from the existing runloop observer that is set up when layers need repainting to
+ ensure that layer updates don't reach the screen before view-based painting does.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView drawRect:]):
+ Tweak the comments
+
+ * WebView/WebView.mm:
+ (viewUpdateRunLoopObserverCallBack):
+ (-[WebView _scheduleViewUpdate]):
+ Add a big comment to explain the timing of things.
+ Call -disableScreenUpdatesUntilFlush when the view _needsOneShotDrawingSynchronization.
+
+ 2009-07-09 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Tim Hatcher.
+2009-07-10 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Sam Weinig with the power of Grayskull.
+
+ Enable XSSAuditor by default.
+
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+
+2009-07-10 Greg Bolsinga <bolsinga@apple.com>
+
+ Reviewed by Antti Koivisto.
+
+ Add delegate methods about focus and blur and state change
+ https://bugs.webkit.org/show_bug.cgi?id=27153
+
+ Call the appropriate private delegate methods from the ChromeClient.
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::formStateDidChange):
+ (WebChromeClient::formDidFocus):
+ (WebChromeClient::formDidBlur):
+ * WebView/WebUIDelegatePrivate.h:
+
+2009-07-09 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27141
+
+ Updated WebInspectorClient to use Web Inspector Preferences to remember whether or not it should be
+ docked or a free window instead of NSUserDefaults it used to have.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController init]):
+ (-[WebInspectorWindowController showWindow:]):
+ (-[WebInspectorWindowController attach]):
+ (-[WebInspectorWindowController detach]):
+
+2009-07-09 Drew Wilson <atwilson@google.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26903
+
+ Turned on CHANNEL_MESSAGING by default because the MessageChannel API
+ can now be implemented for Web Workers and is reasonably stable.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-07-09 Darin Adler <darin@apple.com>
+
+ Reviewed by Adele Peterson and Dan Bernstein.
+
+ <rdar://problem/7024972> Cannot set font to Helvetica Neue Light in Mail compose window
+
+ No regression test because this only affects the font panel.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _addToStyle:fontA:fontB:]): Fix code that detects whether the font would
+ survive a round trip by using the weight corresponding to "bold" or "normal" rather than
+ the actual weight number.
+
+2009-07-09 Beth Dakin and Jon Honeycutt <bdakin@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Make Widget RefCounted to fix:
+
+ <rdar://problem/7038831> REGRESSION (TOT): In Mail, a crash occurs
+ at WebCore::Widget::afterMouseDown() after clicking To Do's close
+ box
+ <rdar://problem/6978804> WER #16: Repro Access Violation in
+ WebCore::PluginView::bindingInstance (1310178023)
+ -and-
+ <rdar://problem/6991251> WER #13: Crash in WebKit!
+ WebCore::PluginView::performRequest+203 (1311461169)
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createPlugin):
+
+2009-07-09 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Steve Falkenburg.
+
+ Roll out r43848. The quirk is no longer necessary.
+
+ * WebView/WebView.mm:
+ (-[WebView WebCore::_userAgentForURL:WebCore::]):
+
+2009-07-09 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Geoff Garen.
+
+ <rdar://problem/6921671> Visit count shouldn't be incremented by redirects.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::updateGlobalHistory):
+ Do not increase visit count if there is a redirect source. As a result, only pages that were
+ explicitly visited by the user (by typing a URL, choosing one from bookmarks, or clicking
+ a link) will be counted.
+
+ * History/WebHistory.mm:
+ (-[WebHistoryPrivate visitedURL:withTitle:increaseVisitCount:]):
+ (-[WebHistory _visitedURL:withTitle:method:wasFailure:increaseVisitCount:]):
+ * History/WebHistoryInternal.h:
+ * History/WebHistoryItem.mm:
+ (-[WebHistoryItem _visitedWithTitle:increaseVisitCount:]):
+ * History/WebHistoryItemInternal.h:
+ Marshal this new argument all the way down to WebCore.
+
+2009-07-08 Greg Bolsinga <bolsinga@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Add -[WebView _isProcessingUserGesture]
+ https://bugs.webkit.org/show_bug.cgi?id=27084
+
+ Add -_isProcessingUserGesture that calls into WebCore::FrameLoader::isProcessingUserGesture()
+ so that WebView code can determine if a user gesture is in progress.
+
+ * WebView/WebView.mm:
+ (-[WebView _isProcessingUserGesture]):
+ * WebView/WebViewPrivate.h:
+
+2009-07-07 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ - Fix <rdar://problem/6544693>.
+
+ For Flash, don't cache which methods or fields in an object are missing, since they can
+ be added at any time.
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::hostForPackage):
+ * Plugins/Hosted/NetscapePluginHostProxy.h:
+ (WebKit::NetscapePluginHostProxy::shouldCacheMissingPropertiesAndMethods):
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyInstance::methodsNamed):
+ (WebKit::ProxyInstance::fieldNamed):
+
+2009-07-06 David Kilzer <ddkilzer@apple.com>
+
+ Bug 27006: Build fix when MAC_JAVA_BRIDGE is disabled
+
+ <https://bugs.webkit.org/show_bug.cgi?id=27006>
+
+ Reviewed by Darin Adler.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createJavaAppletWidget): Wrap contents of
+ the method in #if ENABLE(MAC_JAVA_BRIDGE)/#endif and return 0
+ when this feature is disabled.
+
+2009-07-06 David Kilzer <ddkilzer@apple.com>
+
+ Bug 27005: Build fixes when NETSCAPE_PLUGIN_API is disabled
+
+ <https://bugs.webkit.org/show_bug.cgi?id=27005>
+
+ Reviewed by Geoff Garen.
+
+ * Plugins/WebPluginController.mm:
+ (-[WebPluginController destroyPlugin:]): Wrap call to
+ ScriptController::cleanupScriptObjectsForPlugin() in
+ #if ENABLE(NETSCAPE_PLUGIN_API)/#endif macro.
+ (-[WebPluginController destroyAllPlugins]): Ditto.
+ * Plugins/WebPluginDatabase.mm:
+ (-[WebPluginDatabase removePluginInstanceViewsFor:]): Wrap
+ WebBaseNetscapePluginView class checks in
+ #if ENABLE(NETSCAPE_PLUGIN_API)/#endif macro.
+ (-[WebPluginDatabase destroyAllPluginInstanceViews]): Ditto.
+
+2009-07-06 David Kilzer <ddkilzer@apple.com>
+
+ BUILD FIX: Use ENABLE(NETSCAPE_PLUGIN_API) instead of USE(PLUGIN_HOST_PROCESS)
+
+ In r45579, #if/#endif macros for USE(PLUGIN_HOST_PROCESS) were
+ used, but ENABLE(NETSCAPE_PLUGIN_API) should have been used
+ instead.
+
+ * Plugins/WebNetscapeContainerCheckContextInfo.h:
+ * Plugins/WebNetscapeContainerCheckContextInfo.mm:
+ * Plugins/WebNetscapeContainerCheckPrivate.mm:
+
+2009-07-06 David Kilzer <ddkilzer@apple.com>
+
+ Bug 27004: Build fix for ENABLE(PLUGIN_PROXY_FOR_VIDEO) after r42618
+
+ <https://bugs.webkit.org/show_bug.cgi?id=27004>
+
+ Reviewed by Geoff Garen.
+
+ * Plugins/WebPluginController.mm:
+ (mediaProxyClient): Use core() method to convert from
+ DOMElement to WebCore::Element.
+
+2009-07-06 David Kilzer <ddkilzer@apple.com>
+
+ Bug 27003: Build fix when USE(PLUGIN_HOST_PROCESS) is disabled
+
+ <https://bugs.webkit.org/show_bug.cgi?id=27003>
+
+ Reviewed by Geoff Garen.
+
+ * Plugins/WebNetscapeContainerCheckContextInfo.h: Added #if
+ USE(PLUGIN_HOST_PROCESS)/#endif guards.
+ * Plugins/WebNetscapeContainerCheckContextInfo.mm: Ditto.
+ * Plugins/WebNetscapeContainerCheckPrivate.mm: Ditto.
+
+2009-07-06 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Initialize wkIsLatchingWheelEvent.
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface):
+
+2009-07-03 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ - fix <rdar://problem/6964278> REGRESSION (r42118): Scrolling redraw
+ problem in FileMaker Pro
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
+ Perform layout if needed, even on Mac OS X versions that have
+ -viewWillDraw. This prevents attempts to draw without layout in case
+ -viewWillDraw was not called due to NSView issues or the client
+ did something during the display operation that re-invalidated the
+ layout.
+
+2009-07-02 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6978783>
+ Software-rendered plug-in does not update correctly when inside a hardware layer
+
+ Replace calls to setNeedsDisplay: and setNeedsDisplayInRect: with a call to the new method
+ invalidatePluginContentRect:. This new method will ask WebCore to do the repainting, taking
+ transforms into account.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::invalidateRect):
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView pluginHostDied]):
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView windowBecameKey:]):
+ (-[WebBaseNetscapePluginView windowResignedKey:]):
+ (-[WebBaseNetscapePluginView preferencesHaveChanged:]):
+ (-[WebBaseNetscapePluginView invalidatePluginContentRect:]):
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView invalidateRect:]):
+ (-[WebNetscapePluginView invalidateRegion:]):
+ (-[WebNetscapePluginView forceRedraw]):
+
+2009-07-02 Adam Roben <aroben@apple.com>
+
+ Fix warnings from update-webkit-localizable-strings
+
+ Rubber-stamped by Eric Carlson.
+
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory mediaElementLoadingStateText]):
+ (-[WebViewFactory mediaElementLiveBroadcastStateText]):
+ Changed the localization comments to match the comments in the Windows
+ version of this file, to avoid warnings about different comments for
+ the same localized string.
+
+2009-07-02 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Compositing-related preference methods are not public API; should move to WebPreferencesPrivate.h
+ <rdar://problem/7027363>
+
+ Move accelerated-compositing pref to WebPreferencesPrivate.h
+
+ * WebView/WebPreferences.h:
+ * WebView/WebPreferences.mm:
+ (-[WebPreferences acceleratedCompositingEnabled]):
+ (-[WebPreferences setAcceleratedCompositingEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+
+2009-07-02 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/6518119>
+
+ Add localized strings for media controller status messages.
+
+ * WebCoreSupport/WebViewFactory.mm: Add new localized text.
+ (-[WebViewFactory mediaElementLoadingStateText]):
+ (-[WebViewFactory mediaElementLiveBroadcastStateText]):
+
+2009-07-01 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add a preference/setting to toggle whether content sniffing is enabled for file URLs.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences localFileContentSniffingEnabled]):
+ (-[WebPreferences setLocalFileContentSniffingEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2009-07-01 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ <rdar://problem/6998524> REGRESSION (r44474): Form text field has focus ring, looks focused,
+ even though the field is not actually focused for keyboard input
+
+ Add the concept of whether or not the Page is focused by adding a boolean to the focusController. This allows the
+ focused frame and focused node to both be cached and changed programmatically without causing errors when the Page doesn't
+ have focus.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView becomeFirstResponder]):
+ (-[WebHTMLView resignFirstResponder]):
+
+2009-06-30 Adele Peterson <adele@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix for <rdar://problem/7014389> REGRESSION(4-TOT): Hyperlinks have no tooltips in Mail unless you first click in the message body
+
+ Updated these new methods (added as part of the viewless WebKit effort) that call through to WebHTMLView to use _selectedOrMainFrame,
+ instead of just selectedFrame. When the selection changes, I don't think there is a situation where there's no selected frame, but
+ it seems better to keep these two uses the same, since if there is a case, this will be more like the old behavior, before there was
+ a version of _selectionChanged in WebView.
+
+ * WebView/WebView.mm:
+ (-[WebView _setToolTip:]):
+ (-[WebView _selectionChanged]):
+
+2009-06-30 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ <rdar://problem/7006959> 'Save as…’ does not work in Mail
+
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView initWithFrame:]): Call _needMailThreadWorkaroundIfCalledOffMainThread rather than
+ needMailThreadWorkaround, as the latter is intended to be used at the point which a workaround would
+ be applied and thus contains a main thread check. Since -initWithFrame: is called on the main thread,
+ this was causing us to not switch from exception-throwing to logging for the thread violation behavior.
+
+2009-06-30 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ - fix <rdar://problem/6946611> REGRESSION (r30673): Shade10:" D_Snap
+ to Grid" window is clipping
+
+ * Misc/WebKitVersionChecks.h: Added
+ WEBKIT_FIRST_VERSION_WITHOUT_SHADE10_QUIRK
+ * WebView/WebView.mm:
+ (-[WebView _needsLinkElementTextCSSQuirk]): Added. Returns YES if the
+ client app is a version of Shade 10 earlier than 10.6 and it was
+ linked against a version of WebKit earlier than 531.2.
+ (-[WebView _preferencesChangedNotification:]): Added a call to
+ Settings::setTreatsAnyTextCSSLinkAsStylesheet().
+
+2009-06-29 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7014813> Ask media engine if a movie is streamed or downloaded.
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface):
+ Add QTMovieGetType.
+
+2009-06-29 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Put datagrid behind an #ifdef.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-06-26 John Sullivan <sullivan@apple.com>
+
+ Added support for disabling Stop Speaking when there is no speaking to stop.
+ Also fixed Stop Speaking so that it works (formerly it would throw an exception, and
+ selecting it from the menu would perform a web search instead (!)).
+
+ Reviewed by Tim Hatcher.
+
+ * WebCoreSupport/WebContextMenuClient.h:
+ declare isSpeaking()
+
+ * WebCoreSupport/WebContextMenuClient.mm:
+ (WebContextMenuClient::isSpeaking):
+ implement by calling through to NSApplication
+ (WebContextMenuClient::stopSpeaking):
+ fixed implementation by correcting the signature of the NSApplication method
+
+2009-06-26 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser <simon.fraser@apple.com>.
+
+ Additional fix for https://bugs.webkit.org/show_bug.cgi?id=26651
+
+ The flag should always default to true to avoid it getting set
+ to false in a build with accelerated compositing turned off
+ and then disabling accelerated compositing when subsequently
+ running a build with it turned on.
+
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+
+2009-06-26 Brady Eidson <beidson@apple.com>
+
+ Fix SnowLeopard build.
+
+ * Plugins/Hosted/HostedNetscapePluginStream.mm:
+ (WebKit::HostedNetscapePluginStream::didReceiveResponse):
+
+2009-06-26 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig
+
+ <rdar://problem/6961578> REGRESSION (r43511): Opening .fdf files from Acrobat Professional fails
+
+ Replace all usage of the now obsolete [NSURLResponse _webcore_MIMEType].
+
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (WebNetscapePluginStream::didReceiveResponse):
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView pluginView:receivedData:]):
+ * Plugins/WebPluginController.mm:
+ (-[WebPluginController pluginView:receivedResponse:]):
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource _responseMIMEType]):
+ * WebView/WebResource.mm:
+ (-[WebResource _initWithData:URL:response:]):
+
+2009-06-26 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/6651201> Update lookalike character list.
+
+ * Misc/WebNSURLExtras.mm: (isLookalikeCharacter): Added more characters to the list.
+
+2009-06-25 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ <rdar://problem/6989017>
+ REGRESSION (SnowLeopard): RealPlayer content replays when opening a new tab or switching back to the RealPlayer tab
+
+ If a plug-in fails in NPP_New, we would try to recreate it whenever the preferences for a web view would change.
+
+ Fix this by setting a flag when we fail to instantiate the plug-in, so we only try once.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView start]):
+
+2009-06-25 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser <simon.fraser@apple.com>.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26651
+
+ Preference is named "WebKitAcceleratedCompositingEnabled"
+ and is a boolean value. When false, prevents compositing layers from
+ being created, which prevents hardware animation from running.
+ Also forces video to do software rendering. Added a cache for
+ the flag in RenderLayerCompositing and made it all work
+ on-the-fly when the flag is changed while a page is loaded.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences acceleratedCompositingEnabled]):
+ (-[WebPreferences setAcceleratedCompositingEnabled:]):
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2009-06-24 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Fix the most recently seen kind of crash in <rdar://problem/5983224>
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Null-check the
+ Frame.
+
+2009-06-24 Jeff Johnson <opendarwin@lapcatsoftware.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26638 WebKitErrors.m: _initWithPluginErrorCode: does not set localizedDescription
+
+ Add localized descriptions for plugin errors.
+ The localized strings already existed but were unused; now NSLocalizedDescriptionKey is added to the NSError userInfo.
+
+ * Misc/WebKitErrors.m:
+ (-[NSError _initWithPluginErrorCode:contentURL:pluginPageURL:pluginName:MIMEType:]):
+
+2009-06-23 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6950660> REGRESSION: iSale 5.5.3 crashes after I click a template to load
+
+ Due to some subtle WebKit changes - presumably some delegate callback behavior - a latent bug in
+ iSale was uncovered where they aren't properly retaining their FrameLoadDelegate, and we ended up
+ calling back to a dealloc'ed object.
+
+ * WebView/WebView.mm:
+ (-[WebView _needsAdobeFrameReloadingQuirk]): Use more intelligent C++-style initialization.
+ (-[WebView _needsKeyboardEventDisambiguationQuirks]): Ditto.
+ (-[WebView _needsFrameLoadDelegateRetainQuirk]): YES for iSale versions under 5.6
+ (-[WebView dealloc]): Release the delegate if the quirk is in effect.
+ (-[WebView setFrameLoadDelegate:]): Retain the new delegate if the quirk is in effect.
+
+2009-06-23 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - Fix <rdar://problem/6965672>
+
+ Defer calls to WKPCInvalidateRect, so we don't try to invalidate while waiting for a reply, since
+ that is too early.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.h:
+ (WebKit::NetscapePluginHostProxy::isProcessingRequests):
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
+ (WebKit::NetscapePluginHostProxy::processRequests):
+ (WKPCInvalidateRect):
+
+2009-06-22 Timothy Hatcher <timothy@apple.com>
+
+ Add Mail on Tiger and Leopard to the list of applications that need the WebView init thread workaround.
+
+ <rdar://problem/6929524> Console shows WebKit Threading Violations from Mail
+
+ Reviewed by Anders Carlsson.
+
+ * WebView/WebView.mm:
+ (clientNeedsWebViewInitThreadWorkaround): Return true for com.apple.Mail.
+
+2009-06-22 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ - speculative fix for <rdar://problem/6889082>
+ Crash at -[WebHTMLView(WebPrivate) _updateMouseoverWithEvent:]
+
+ The crash seems to happen because lastHitView points to a deleted
+ object. Since -close calls -_clearLastHitViewIfSelf, I speculate that
+ lastHitView has been set to an already-closed view.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView hitTest:]): Return nil if the view is closed.
+
+2009-06-22 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by John Sullivan.
+
+ <rdar://problem/6956606> REGRESSION (S4Beta -> Final): After the password is input,
+ Japanese can't be input.
+
+ * WebView/WebHTMLView.mm: (-[WebHTMLView _updateSelectionForInputManager]): Removed an
+ unnecessary check - the function has an early return for null frame.
+
+2009-06-22 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ - fix <rdar://problem/6990938> REGRESSION (r42787): After showing and
+ hiding the Find banner, the WebHTMLView's height is not restored
+
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView setFrameSize:]): Mark the FrameView for layout when the
+ WebFrameView's size changes.
+ * WebView/WebView.mm:
+ (-[WebView setFrameSize:]): Left the resize logic here, but only for
+ the single view model.
+
+2009-06-20 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/6964221> Need more processing of pluginspage.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createPlugin): Check protocolInHTTPFamily.
+
+2009-06-18 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26199
+
+ Added preference to enable the XSSAuditor.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences isXSSAuditorEnabled]):
+ (-[WebPreferences setXSSAuditorEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2009-06-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/6926859>
+ NPN_ConvertPoint doesn't give the right value when converting to/from NPCoordinateSpaceFlippedScreen
+
+ When inverting Y, use the height of the first screen instead of the screen the window is on.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::windowFrameChanged):
+ (WebKit::NetscapePluginInstanceProxy::mouseEvent):
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView convertFromX:andY:space:toX:andY:space:]):
+
+2009-06-16 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein
+
+ <rdar://problem/6976766> Control-click on pages with accelerated compositing
+ content does not work.
+
+ Part deux. #ifdef the use of _private->layerHostingView with
+ USE(ACCELERATED_COMPOSITING)
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView hitTest:]):
+
+2009-06-16 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein
+
+ <rdar://problem/6976766> Control-click on pages with accelerated compositing
+ content does not work.
+
+ Remove the WebLayerHostingView subclass of NSView, with its attempts to
+ forward events to the WebHTMLView, and just fix -[WebHTMLView hitTest:]
+ to ignore the layerHostingView.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView hitTest:]):
+ (-[WebHTMLView attachRootLayer:]):
+
+2009-06-15 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ <rdar://problem/6974857>
+
+ Define ENABLE_3D_RENDERING when building on 10.6, and move ENABLE_3D_RENDERING
+ switch from config.h to wtf/Platform.h.
+
+ * Configurations/FeatureDefines.xcconfig:
+ * WebKitPrefix.h:
+
+2009-06-15 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6967569>
+ CrashTracer: 15 crashes in Safari at com.apple.WebKit • WebKit::NetscapePluginHostManager::didCreateWindow + 85
+
+ Make sure to remove the entry from the plug-in host map so we won't end up with an entry that has a null value.
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::hostForPackage):
+
+2009-06-15 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ - make the source code font in the Web Inspector match Mac defaults
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController init]): Set the default monospace font
+ to 11px Menlo, except on Leopard and Tiger where it is 10px Monaco.
+
+2009-06-09 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by Eric Seidel. Landed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26281
+
+ REGRESSION: Copying from TextEdit/OmniGraffle and pasting into editable
+ region loses images
+
+ Prefer RTFD (RTF with inline images) over RTF. In
+ http://trac.webkit.org/changeset/19745 I accidently reversed their
+ order.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]):
+
+2009-06-13 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Fisher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24492
+
+ Move registerURLSchemeAsLocal from FrameLoader to SecurityOrigin
+
+ * WebView/WebView.mm:
+ (+[WebView registerURLSchemeAsLocal:]):
+
+2009-06-12 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Eric Seidel.
+
+ * ChangeLog-2007-10-14: Change pseudonym "Don Gibson" to me (was used while Google Chrome was not public); update my email address.
+
+2009-06-08 Dan Bernstein <mitz@apple.com>
+
+ Rubber-stamped by Mark Rowe.
+
+ - gave Objective-C++ files the .mm extension
+
+ * Carbon/HIWebView.m: Removed.
+ * Carbon/HIWebView.mm: Copied from WebKit/mac/Carbon/HIWebView.m.
+ * Misc/WebKitNSStringExtras.m: Removed.
+ * Misc/WebKitNSStringExtras.mm: Copied from WebKit/mac/Misc/WebKitNSStringExtras.m.
+ * Misc/WebStringTruncator.m: Removed.
+ * Misc/WebStringTruncator.mm: Copied from WebKit/mac/Misc/WebStringTruncator.m.
+ * WebInspector/WebNodeHighlight.m: Removed.
+ * WebInspector/WebNodeHighlight.mm: Copied from WebKit/mac/WebInspector/WebNodeHighlight.m.
+ * WebInspector/WebNodeHighlightView.m: Removed.
+ * WebInspector/WebNodeHighlightView.mm: Copied from WebKit/mac/WebInspector/WebNodeHighlightView.m.
+ * WebView/WebDynamicScrollBarsView.m: Removed.
+ * WebView/WebDynamicScrollBarsView.mm: Copied from WebKit/mac/WebView/WebDynamicScrollBarsView.m.
+
+2009-06-05 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26220
+
+ Update a WebView's active state when it moves to a different window.
+
+ * WebView/WebView.mm:
+ (-[WebView viewDidMoveToWindow]):
+
+2009-06-04 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Alice Liu.
+
+ Move WebView internal data into WebViewData.h/mm.
+
+ * WebView/WebDelegateImplementationCaching.mm:
+ * WebView/WebView.mm:
+ * WebView/WebViewData.h: Copied from mac/WebView/WebViewInternal.h.
+ * WebView/WebViewData.mm: Copied from mac/WebView/WebViewInternal.mm.
+ * WebView/WebViewInternal.h:
+ * WebView/WebViewInternal.mm: Removed.
+
+2009-06-04 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Remove _updateFocusedStateForFrame, since it's actually not even necessary now that I made
+ setFocusedFrame get called explicitly from become/ResignFirstResponder. setFocusedFrame does
+ the work of focusing the selection already.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::transitionToCommittedForNewPage):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView becomeFirstResponder]):
+ (-[WebHTMLView resignFirstResponder]):
+ * WebView/WebView.mm:
+ * WebView/WebViewInternal.h:
+
+2009-06-04 Dan Bernstein <mitz@apple.com>
+
+ - build fix
+
+ * WebView/WebViewInternal.mm:
+
+2009-06-03 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Reworking of focus and active state updating for WebHTMLViews so that it actually works instead of reporting wrong answers.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::transitionToCommittedForNewPage):
+ WebHTMLViews become first responders before they are able to reach their Frames/Pages. This happens because the NSClipView
+ becomes first responder when the WebHTMLView gets destroyed, and then we transfer the responder state back to the new WebHTMLView
+ when it is first connected. Once we have transitioned to a new page and have the Frame/Page available, go ahead and explicitly
+ focus the frame in WebCore and update our focused state. This change allows us to remove the updateFocusedActive timer and the
+ code from viewDidMoveToWindow.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView close]):
+ (-[WebHTMLView addWindowObservers]):
+ (-[WebHTMLView viewWillMoveToWindow:]):
+ (-[WebHTMLView viewDidMoveToWindow]):
+ (-[WebHTMLView _removeWindowObservers]):
+ Remove all the updateFocusedActiveState timer code, since it no longer exists.
+
+ (-[WebHTMLView windowDidBecomeKey:]):
+ (-[WebHTMLView windowDidResignKey:]):
+ Active state updating is no longer done by WebHTMLViews. It is handled by the WebView instead.
+
+ (-[WebHTMLView becomeFirstResponder]):
+ (-[WebHTMLView resignFirstResponder]):
+ Reworking of WebHTMLView's code for gaining/losing responder status. No longer update active state here, since the active state
+ can never change just because of responder changes. Make sure that the focused frame gets updated properly (and most importantly
+ actually cleared when a WebHTMLView resigns responder status).
+
+ * WebView/WebHTMLViewInternal.h:
+ * WebView/WebHTMLViewPrivate.h:
+ State updating for focused and active states has been made independent.
+
+ * WebView/WebView.mm:
+ (-[WebView _updateActiveState]):
+ WebView now handles updating of active state in _updateActiveState. It is now purely based off whether the window is key and nothing
+ else.
+
+ (-[WebView addWindowObserversForWindow:]):
+ (-[WebView removeWindowObservers]):
+ Start listening for the window becoming/losing key even in the usesDocumentViews case.
+
+ (-[WebView _updateFocusedStateForFrame:]):
+ Focused state updating is split into its own method now and called when WebHTMLViews gain and lose responder status.
+
+ (-[WebView _windowDidBecomeKey:]):
+ (-[WebView _windowDidResignKey:]):
+ Make sure to call _updateActiveState as the window gains/loses key.
+
+ (-[WebView _windowWillOrderOnScreen:]):
+ Run this code now that WebHTMLView no longer does it.
+
+ * WebView/WebViewInternal.h:
+ * WebView/WebViewPrivate.h:
+ Updating for the split of focused and active state updating into separate methods.
+
+2009-06-04 Mark Rowe <mrowe@apple.com>
+
+ Speculative Tiger build fix.
+
+ * WebView/WebDelegateImplementationCaching.h:
+
+2009-06-03 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ Move delegate implementation caching logic into its own files.
+
+ * WebView/WebDelegateImplementationCaching.h: Copied from mac/WebView/WebViewInternal.h.
+ * WebView/WebDelegateImplementationCaching.mm: Copied from mac/WebView/WebView.mm.
+ (WebViewGetResourceLoadDelegateImplementations):
+ (WebViewGetFrameLoadDelegateImplementations):
+ (WebViewGetScriptDebugDelegateImplementations):
+ * WebView/WebView.mm:
+ * WebView/WebViewInternal.h:
+
+2009-06-03 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ Move WebViewPrivate structure to WebViewInternal.h/mm.
+
+ * WebView/WebView.mm:
+ * WebView/WebViewInternal.h:
+ * WebView/WebViewInternal.mm: Added.
+ (+[WebViewPrivate initialize]):
+ (-[WebViewPrivate init]):
+ (-[WebViewPrivate dealloc]):
+ (-[WebViewPrivate finalize]):
+
+2009-06-03 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Small cleanup in WebView.
+ - Move global data initialization to WebView's initialization method.
+ - Move _clearViewUpdateRunLoopObserver from WebViewPrivate to WebView (FileInternal)
+
+ * WebView/WebView.mm:
+ (-[WebViewPrivate init]): Remove global initializers.
+ (-[WebViewPrivate dealloc]): Cleanup whitespace.
+ (-[WebViewPrivate finalize]): Ditto.
+ (-[WebView _close]): Call [self _clearViewUpdateRunLoopObserver] instead of
+ [_private _clearViewUpdateRunLoopObserver]
+ (+[WebView initialize]): Move global initializers here.
+ (-[WebView _clearViewUpdateRunLoopObserver]): Moved from WebViewPrivate.
+ (viewUpdateRunLoopObserverCallBack): Call [self _clearViewUpdateRunLoopObserver]
+ instead of [_private _clearViewUpdateRunLoopObserver]
+
+2009-06-03 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ - WebKit part of eliminating WebCoreTextRenderer
+
+ * Misc/WebKitNSStringExtras.m:
+ (webkit_CGCeiling): Added.
+ (-[NSString _web_drawAtPoint:font:textColor:]): Replaced the malloc()ed
+ string buffer with a Vector. Moved code from
+ WebCoreDrawTextAtPoint() to here.
+ (-[NSString _web_drawDoubledAtPoint:withTopColor:bottomColor:font:]):
+ (-[NSString _web_widthWithFont:]): Replaced the malloc()ed string buffer
+ with a Vector. Moved code from WebCoreTextFloatWidth() to here.
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _addToStyle:fontA:fontB:]): Replaced call to
+ WebCoreFindFont() with use of
+ +[WebFontCache fontWithFamily:traits:weight:size:].
+ * WebView/WebView.mm:
+ (+[WebView _setAlwaysUsesComplexTextCodePath:]): Changed to call
+ Font::setCodePath() directly.
+ (+[WebView _setShouldUseFontSmoothing:]): Changed to call
+ Font::setShouldUseSmoothing().
+ (+[WebView _shouldUseFontSmoothing]): Changed to call
+ Font::shouldUseSmoothing().
+
+2009-06-03 Dan Bernstein <mitz@apple.com>
+
+ Rubber-stamped by Mark Rowe.
+
+ - remove a private method that was used only by Safari 3.0.
+
+ * WebView/WebView.mm: Removed +_minimumRequiredSafariBuildNumber.
+ * WebView/WebViewPrivate.h: Ditto.
+
+2009-06-03 Dan Bernstein <mitz@apple.com>
+
+ - build fix
+
+ * WebView/WebHTMLView.mm:
+
+2009-06-03 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ - build fix
+
+ * WebView/WebHTMLView.mm:
+ * WebView/WebView.mm:
+
+2009-06-02 Darin Adler <darin@apple.com>
+
+ Reviewed by David Hyatt.
+
+ Bug 26112: viewless WebKit -- make events work
+ https://bugs.webkit.org/show_bug.cgi?id=26112
+
+ One change here is to make the -[WebFrame frameView] function assert if ever called
+ in viewless mode, and fix many callers that would trip that assertion.
+
+ A major change is to put some methods and data in WebView that are currently in
+ WebHTMLView, used only in viewless mode. A next step will be to use the WebView
+ methods whenever possible, even when not in the viewless mode.
+
+ Also fix FrameView to do normal reference counting instead of a strange model with
+ an explicit deref near creation time.
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::scrollRectIntoView): Add code to start in the appropriate place
+ when dealing with viewless mode. This gets triggered when visiting the Google home page.
+ (WebChromeClient::setToolTip): Changed to call WebView instead of WebHTMLView.
+ (WebChromeClient::print): Changed to use a new selector that doesn't require a
+ WebFrameView if present. Also don't even try to use the old selector in viewless mode.
+
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::respondToChangedSelection): Changed to call WebView instead of WebHTMLView.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::transitionToCommittedForNewPage): Added more code paths for
+ viewless mode to skip things we can't do in that mode, with appropriate FIXME.
+ Use Frame::create and RefPtr and eliminate the strange reference counting of FrameView.
+
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource _receivedData:]): Added a _usesDocumentViews guard around code that's
+ specific to document views.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _updateBackgroundAndUpdatesWhileOffscreen]): Added a _usesDocumentViews
+ guard around code that's specific to document views.
+ (-[WebFrame _hasSelection]): Added an implementation for viewless mode.
+ (-[WebFrame _clearSelection]): Assert we're not in viewless mode; it doesn't really
+ make sense to clear the selection in only one frame in viewless mode. Later we can
+ decide what to do.
+ (-[WebFrame _dragSourceMovedTo:]): Assert we're not in viewless mode; the dragging
+ code for viewless mode shouldn't have to involve the WebFrame object at all.
+ (-[WebFrame _dragSourceEndedAt:operation:]): Ditto.
+ (-[WebFrame frameView]): Assert we're not in viewless mode. This assertion fires
+ often, but it's a great pointer to code that needs to be changed.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView hitTest:]): Tweaked a comment.
+ (-[WebHTMLView _updateMouseoverWithEvent:]): Fixed a bug where the fake event for
+ moving the mouse out of the old view ended up overwriting the event for moving
+ the mouse within the new view.
+ (-[WebHTMLView mouseDown:]): Got rid of explicit conversion of event to
+ PlatformMouseEvent in call to sendContextMenuEvent; that's no longer possible
+ without passing another argument, and it's now handled in EventHandler.
+
+ * WebView/WebTextCompletionController.h: Copied from WebKit/mac/WebView/WebHTMLView.mm.
+ Removed everything except for the WebTextCompletionController class.
+ * WebView/WebTextCompletionController.mm: Copied from WebKit/mac/WebView/WebHTMLView.mm.
+ Ditto.
+
+ * WebView/WebUIDelegatePrivate.h: Added webView:printFrame: method.
+
+ * WebView/WebView.mm: Moved includes and fields in from WebHTMLView.
+ (-[WebView _usesDocumentViews]): Updated for name change from useDocumentViews
+ to usesDocumentViews.
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): Ditto.
+ (-[WebView drawSingleRect:]): Ditto.
+ (-[WebView isFlipped]): Ditto.
+ (-[WebView setFrameSize:]): Ditto. Also changed to use _mainCoreFrame method.
+ (-[WebView _viewWillDrawInternal]): Ditto.
+ (-[WebView viewWillDraw]): Ditto.
+ (-[WebView drawRect:]): Ditto.
+ (-[WebView _close]): Added code to nil out the lastMouseoverView global.
+ (-[WebView _dashboardRegions]): Use _mainCoreFrame.
+ (-[WebView setProhibitsMainFrameScrolling:]): Ditto.
+ (-[WebView _setInViewSourceMode:]): Ditto.
+ (-[WebView _inViewSourceMode]): Ditto.
+ (-[WebView _attachScriptDebuggerToAllFrames]): Ditto.
+ (-[WebView _detachScriptDebuggerFromAllFrames]): Ditto.
+ (-[WebView textIteratorForRect:]): Ditto.
+ (-[WebView _executeCoreCommandByName:value:]): Ditto.
+ (-[WebView addWindowObserversForWindow:]): Ditto.
+ (-[WebView removeWindowObservers]): Ditto.
+ (-[WebView _updateFocusedAndActiveState]): Ditto.
+ (-[WebView _updateFocusedAndActiveStateForFrame:]): Turned into a class method.
+ Added code to handle the viewless case without calling frameView.
+ (-[WebView _windowDidBecomeKey:]): Updated for name change from useDocumentViews
+ to usesDocumentViews.
+ (-[WebView _windowDidResignKey:]): Ditto.
+ (-[WebView _windowWillOrderOnScreen:]): Ditto.
+ (-[WebView mainFrame]): Tweaked.
+ (-[WebView selectedFrame]): Added a conditional to avoid trying to get at the
+ frame view in viewless case.
+ (-[WebView _setZoomMultiplier:isTextOnly:]): Use _mainCoreFrame.
+ (-[WebView setCustomTextEncodingName:]): Ditto.
+ (-[WebView windowScriptObject]): Ditto.
+ (-[WebView setHostWindow:]): Ditto. Also put some code that's needed only for
+ document views inside _private->usesDocumentViews.
+ (-[WebView _hitTest:dragTypes:]): Tweaked.
+ (-[WebView acceptsFirstResponder]): Added case for viewless mode along with a
+ FIXME, since it's not complete.
+ (-[WebView becomeFirstResponder]): Ditto.
+ (-[WebView _webcore_effectiveFirstResponder]): Put the body of this inside
+ a usesDocumentView check, because we don't need the first responder forwarding
+ in viewless mode.
+ (-[WebView setNextKeyView:]): Ditto.
+ (-[WebView mouseDown:]): Added. Copied from WebHTMLView. FIXME in here suggests
+ that we make WebHTMLView share this one soon, which I think is practical.
+ (-[WebView mouseUp:]): Ditto.
+ (-[WebView setHoverFeedbackSuspended:]): Added a code path for viewless mode.
+ (-[WebView shouldClose]): Use _mainCoreFrame.
+ (-[WebView aeDescByEvaluatingJavaScriptFromString:]): Ditto.
+ (-[WebView setEditable:]): Ditto.
+ (-[WebView _frameViewAtWindowPoint:]): Added an assertion that we're not in
+ viewless mode since this method makes no sense in that mode.
+ (-[WebView _setMouseDownEvent:]): Added. Copied from WebHTMLView. I plan to
+ eliminate the one in WebHTMLView soon.
+ (-[WebView _cancelUpdateMouseoverTimer]): Ditto.
+ (-[WebView _stopAutoscrollTimer]): Ditto.
+ (+[WebView _updateMouseoverWithEvent:]): Ditto.
+ (-[WebView _updateMouseoverWithFakeEvent]): Ditto.
+ (-[WebView _setToolTip:]): Added. Calls through to the WebHTMLView version.
+ (-[WebView _selectionChanged]): Ditto.
+ (-[WebView _mainCoreFrame]): Added.
+ (-[WebView _needsOneShotDrawingSynchronization]): Moved into the WebInternal
+ category.
+ (-[WebView _setNeedsOneShotDrawingSynchronization:]): Ditto.
+ (-[WebView _startedAcceleratedCompositingForFrame:]): Ditto.
+ (-[WebView _stoppedAcceleratedCompositingForFrame:]): Ditto.
+ (viewUpdateRunLoopObserverCallBack): Ditto.
+ (-[WebView _scheduleViewUpdate]): Ditto.
+
+ * WebView/WebViewInternal.h: Made most of the file not compile at all when
+ included from non-C++ source files, elminating some excess declarations and
+ typedefs. Moved more methods into the real internal category. Added new
+ methods _setMouseDownEvent, _cancelUpdateMouseoverTimer, _stopAutoscrollTimer,
+ _updateMouseoverWithFakeEvent, _selectionChanged, and _setToolTip:.
+
+2009-06-02 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Remove workaround that was added to address <rdar://problem/5488678> as it no longer affects our Tiger builds.
+
+ * Configurations/Base.xcconfig:
+
+2009-06-01 Darin Adler <darin@apple.com>
+
+ * WebView/WebTextCompletionController.mm: Fix Tiger build by adding import
+ of WebTypesInternal.h.
+
+2009-06-01 Darin Adler <darin@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Bug 26113: break WebTextCompletionController out into its own source file
+ https://bugs.webkit.org/show_bug.cgi?id=26113
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLViewPrivate dealloc]): Updated for new name.
+ (-[WebHTMLViewPrivate clear]): Ditto.
+ (-[WebHTMLView _frameOrBoundsChanged]): Ditto.
+ (-[WebHTMLView menuForEvent:]): Ditto.
+ (-[WebHTMLView windowDidResignKey:]): Ditto.
+ (-[WebHTMLView windowWillClose:]): Ditto.
+ (-[WebHTMLView mouseDown:]): Ditto.
+ (-[WebHTMLView resignFirstResponder]): Ditto.
+ (-[WebHTMLView keyDown:]): Ditto.
+ (-[WebHTMLView complete:]): Ditto. Also pass WebView to init method.
+ (-[WebHTMLView _interceptEditingKeyEvent:shouldSaveCommand:]): Ditto.
+
+ * WebView/WebTextCompletionController.h: Copied from mac/WebView/WebHTMLView.mm.
+ * WebView/WebTextCompletionController.mm: Copied from mac/WebView/WebHTMLView.mm.
+ Changed initializer to pass in a spearate WebView and WebHTMLView, to smooth the
+ way for handling viewless mode properly in the future.
+
+2009-05-30 David Kilzer <ddkilzer@apple.com>
+
+ Add JSLock to -[WebScriptCallFrame scopeChain]
+
+ Reviewed by Darin Adler.
+
+ In Debug builds of WebKit, Dashcode launching MobileSafari could
+ cause the ASSERT(JSLock::lockCount() > 0) assertion to fire in
+ JSC::Heap::heapAllocate() because the JSLock wasn't taken.
+
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame scopeChain]): Take JSLock before calling
+ into JavaScriptCore.
+
+2009-05-28 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Dan Bernstein.
+
+ Build fix. Move off a deprecated NSFileManager method.
+
+ * Misc/WebNSFileManagerExtras.h:
+ * Misc/WebNSFileManagerExtras.m:
+ (-[NSFileManager destinationOfSymbolicLinkAtPath:error:]): Implement a new-in-Leopard method for Tiger to use.
+ (-[NSFileManager attributesOfItemAtPath:error:]): Ditto.
+ * Plugins/WebNetscapePluginPackage.mm:
+ (-[WebNetscapePluginPackage _initWithPath:]): Use the new non-deprecated methods.
+
+2009-05-28 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Added new build flag --filters. More details in WebCore/ChangeLog.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-05-27 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26009
+ <rdar://problem/6925656> REGRESSION (r43973): Problems While Working With OpenVanilla
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _updateSelectionForInputManager]): Don't call updateWindows if the selection
+ is None. This routinely happens during editing, and it doesn't mean that we left an editable
+ area (in which case the selection changes to a non-editable one).
+
+2009-05-26 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Brady Eidson.
+
+ Fix for <rdar://problem/6916371>
+ iWeb 'Announce' button does nothing after publishing to MobileMe
+
+ Add linked-on-or-after check to allow older WebKit apps to use the
+ old behavior of sniffing everything (including file: urls)
+
+ * Misc/WebKitVersionChecks.h:
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+
+2009-05-26 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Ada Chan and Oliver Hunt.
+
+ Remove WebView observers in during fast teardown.
+ <rdar://problem/6922619> REGRESSION (Tiger-only?): After restoring windows from the previous session, a crash occurs while attempting to quit Safari
+
+ * WebView/WebView.mm:
+ (-[WebView _closeWithFastTeardown]):
+
+2009-05-26 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6901751>
+ REGRESSION (r35515): Tiger crash painting the selection on registration page of car2go.com
+
+ Remove WKCGContextIsSafeToClip.
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface):
+
+2009-05-26 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - fix <rdar://problem/6922371> REGRESSION (r43973): Can't type first
+ character with an umlaut, circumflex, or accent in Mail or in a wiki
+
+ * WebView/WebHTMLView.mm:
+ (isTextInput): Moved here.
+ (isInPasswordField): Moved here.
+ (-[WebHTMLView becomeFirstResponder]): Update the exposeInputContext
+ flag and let NSApplication update the input manager with the new input
+ context if necessary.
+ (-[WebHTMLView _updateSelectionForInputManager]): Changed to use the
+ NSApp global instead of +[NSApplication sharedApplication].
+
+2009-05-26 Mark Rowe <mrowe@apple.com>
+
+ Fix the Tiger build.
+
+ * Misc/WebNSObjectExtras.mm:
+ (-[NSInvocation _webkit_invokeAndHandleException:]): Rename the local variable so that
+ it doesn't conflict with a member variable on Tiger.
+
+2009-05-26 Darin Adler <darin@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ <rdar://problem/6921835> REGRESSION (r44115): Crash in Leopard Mail viewing message
+
+ Fix case where we autorelease an object on the main thread that we are returning
+ to another thread when using our _webkit_invokeOnMainThread method.
+
+ * Misc/WebNSObjectExtras.mm:
+ (returnTypeIsObject): Added.
+ (-[WebMainThreadInvoker forwardInvocation:]): Autorelease the object on the calling
+ thread, balancing a retain done on the main thread.
+ (-[NSInvocation _webkit_invokeAndHandleException:]): Retain the object on the main
+ thread.
+
+2009-05-26 David Hyatt <hyatt@apple.com>
+
+ Back out the workaround for Mail crashing. Darin is working on the real fix.
+
+ * Misc/WebNSObjectExtras.mm:
+ (-[WebMainThreadInvoker forwardInvocation:]):
+
+2009-05-26 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=25969.
+
+ Stop using notifications for boundsChanged, since the notifications are being sent too late.
+ Since subviews get resized before parents do, the notification comes in telling the WebHTMLView
+ that its size has changed *before* we've done setNeedsLayout in the WebView size change callback.
+
+ Become more like the Windows platform and just do the bounds changed immediately as our size is
+ being altered by subclassing setFrameSize in WebView.
+
+ Also patch WebDynamicScrollbarsView to detect the case where neither axis is really spilling out
+ past the viewport, so that in shrinking situations we figure out that we don't need scrollbars
+ any more.
+
+ * WebView/WebDynamicScrollBarsView.m:
+ (-[WebDynamicScrollBarsView updateScrollers]):
+ * WebView/WebView.mm:
+ (-[WebView _boundsChangedToNewSize:]):
+ (-[WebView setFrameSize:]):
+ (-[WebView viewWillMoveToWindow:]):
+ (-[WebView viewDidMoveToWindow]):
+
+2009-05-25 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ - WebKit side of <rdar://problem/6914001>.
+
+ * Plugins/Hosted/NetscapePluginHostManager.h:
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::didCreateWindow):
+ Iterate over all plug-in hosts. If one is in full-screen mode, make sure to activate the
+ WebKit app instead.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.h:
+ (WebKit::NetscapePluginHostProxy::isMenuBarVisible):
+ Add getter.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCEvaluate):
+ Add allowPopups flag.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::PluginRequest::PluginRequest):
+ (WebKit::NetscapePluginInstanceProxy::PluginRequest::allowPopups):
+ (WebKit::NetscapePluginInstanceProxy::loadURL):
+ (WebKit::NetscapePluginInstanceProxy::evaluateJavaScript):
+ (WebKit::NetscapePluginInstanceProxy::loadRequest):
+ (WebKit::NetscapePluginInstanceProxy::evaluate):
+ Use "allowPopups" instead of "userGesture".
+
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ Add allowPopups argument to Evaluate.
+
+ * Plugins/Hosted/WebKitPluginHostTypes.h:
+ Use "allowPopups" instead of "userGesture".
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::createWindow):
+ Call didCreateWindow here.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::dispatchCreatePage):
+ Ditto.
+
+2009-05-25 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ - Fix <rdar://problem/6915849>.
+
+ Release the placeholder window after -[NSApplication runModalForWindow] returns.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::NetscapePluginHostProxy::beginModal):
+ (WebKit::NetscapePluginHostProxy::endModal):
+
+2009-05-24 Dan Bernstein <mitz@apple.com>
+
+ - revert an accidental change from r43964.
+
+ * WebView/WebView.mm:
+ (+[WebView _setShouldUseFontSmoothing:]):
+
+2009-05-24 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein and Tim Hatcher.
+
+ <rdar://problem/6913045> New console message spewed by automator CLI after installing JetstreamLeo40B21a
+
+ * Misc/WebNSObjectExtras.mm:
+ (-[WebMainThreadInvoker initWithTarget:]): Tweaked argument name.
+ (-[WebMainThreadInvoker forwardInvocation:]): Removed call to retainArguments.
+ This was unneeded and in the case of a newly created but not yet fully initialized
+ NSView object it caused the abovementioned bug.
+ (-[WebMainThreadInvoker handleException:]): Tweaked argument name. Added assertion.
+ (-[NSInvocation _webkit_invokeAndHandleException:]): Tweaked name of local variable
+ that holds the exception.
+
+2009-05-23 David Kilzer <ddkilzer@apple.com>
+
+ Part 2 of 2: Bug 25495: Implement PassOwnPtr and replace uses of std::auto_ptr
+
+ <https://bugs.webkit.org/show_bug.cgi?id=25495>
+
+ Reviewed by Oliver Hunt.
+
+ * History/WebHistory.mm:
+ (-[WebHistory _visitedURL:withTitle:method:wasFailure:]): Return
+ 0 instead of an empty auto_ptr<>.
+ * History/WebHistoryItem.mm:
+ (-[WebHistoryItem initFromDictionaryRepresentation:]): Use
+ OwnPtr<> instead of auto_ptr<> for stack variable.
+ * WebCoreSupport/WebChromeClient.h:
+ (WebChromeClient::createHTMLParserQuirks): Return a PassOwnPtr<>
+ instead of a raw HTMLParserQuirks pointer.
+
+2009-05-23 David Kilzer <ddkilzer@apple.com>
+
+ Part 1 of 2: Bug 25495: Implement PassOwnPtr and replace uses of std::auto_ptr
+
+ <https://bugs.webkit.org/show_bug.cgi?id=25495>
+
+ Reviewed by Oliver Hunt.
+
+ * ForwardingHeaders/wtf/OwnPtrCommon.h: Added.
+ * ForwardingHeaders/wtf/PassOwnPtr.h: Added.
+
+2009-05-22 Darin Adler <darin@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ - Fix <rdar://problem/6913765> REGRESSION (r42331-r42334): Extra scroll
+ bars appearing on Welcome panels of iLife '09 apps
+
+ * WebView/WebView.mm:
+ (needsUnwantedScrollBarWorkaround): Added. Checks if this is a panel
+ where scroll bars are unwanted. For safety, limited to only Apple applications.
+ (-[WebView viewDidMoveToWindow]): If the workaround is needed, disallow
+ scrolling the main frame. This prevents scroll bars from appearing.
+
+2009-05-22 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25955
+
+ Remove the policyBaseURL parameter from setCookie. This parameter is
+ redudant with the document parameter.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::setCookies):
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView setVariable:forURL:value:length:]):
+
+2009-05-21 Darin Fisher <darin@chromium.org>
+
+ Fix-up coding style.
+
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::getAutoCorrectSuggestionForMisspelledWord):
+
+2009-05-20 Siddhartha Chattopadhyaya <sidchat@google.com>
+
+ Reviewed by Justin Garcia.
+
+ Add automatic spell correction support in WebKit
+
+ https://bugs.webkit.org/show_bug.cgi?id=24953
+
+ * WebCoreSupport/WebEditorClient.h:
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::getAutoCorrectSuggestionForMisspelledWord):
+
+2009-05-21 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6907542> REGRESSION (r43143): Hang in RenderLineBoxList::dirtyLinesFromChangedChild
+ when clicking link to load Flash animation (http://www.roambi.com)
+
+ * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::respondToChangedSelection):
+ Don't call -[NSApplication updateWindows] here, WebHTMLView can take care of this.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView inputContext]): Use a precomputed boolean stored in WebHTMLViewPrivate, as
+ calling isTextInput() is not always safe.
+ (-[WebHTMLView textStorage]): Ditto.
+ (-[WebHTMLView _updateSelectionForInputManager]): Update _private->exposeInputContext when
+ selection changes, and let AppKit update its cache if necessary.
+
+2009-05-21 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/5579292> REGRESSION (2-3): "Default default" encoding for Korean changed
+ from Korean (Windows, DOS) to Korean (ISO 2022-KR), which breaks some sites
+
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences _setInitialDefaultTextEncodingToSystemEncoding]): Update the existing fix
+ for the changed result of CFStringConvertEncodingToIANACharSetName().
+
+2009-05-21 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6883758> REGRESSION (r43143): First character typed with input method does
+ not go into inline hole (seen with Chinese & Kotoeri on top Chinese website www.baidu.com)
+
+ * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::respondToChangedSelection):
+ Call -[NSApplication updateWindows] to make AppKit re-fetch the input context when selection
+ changes. Since we use SelectionController to check whether the view is editable, it is
+ important not to re-fetch the context too early, e.g. from a focus changed notification.
+
+2009-05-21 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Rename DragController::dragOperation() to sourceDragOperation() for clarity
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView draggingSourceOperationMaskForLocal:]):
+
+2009-05-21 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ - WebKit part of <rdar://problem/6901751> REGRESSION (r35515): Tiger
+ crash painting the selection on registration page of car2go.com
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface): Added CGContextIsSafeToClip.
+
+2009-05-20 Stephanie Lewis <slewis@apple.com>
+
+ Update the order files. <rdar://problem/6881750> Generate new order files.
+
+ * WebKit.order:
+
+2009-05-20 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6905336> REGRESSION: "Clear History" does not save empty history to disk
+
+ * History/WebHistory.mm:
+ (-[WebHistoryPrivate data]): If there are no entries, return an empty NSData instead of nil.
+
+2009-05-20 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler and Kevin Decker.
+
+ WebKit side of <rdar://problem/6895072>
+
+ Pass the localization as a launch property.
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::spawnPluginHost):
+
+2009-05-20 Dan Bernstein <mitz@apple.com>
+
+ - fix the build after r43918
+
+ * WebCoreSupport/WebChromeClient.h:
+ (WebChromeClient::setCursor):
+
+2009-05-20 Darin Adler <darin@apple.com>
+
+ Reviewed by John Sullivan.
+
+ <rdar://problem/4023899> Shift-Tab skips key views in toolbar in Safari, although Tab
+ iterates through them properly
+
+ * WebView/WebView.mm:
+ (-[WebView previousValidKeyView]): Work around a bug in -[NSView previousValidKeyView].
+
+2009-05-19 Timothy Hatcher <timothy@apple.com>
+
+ Add a new private API method that will dispatch pending loads that have been scheduled
+ because of recent DOM additions or style changes.
+
+ <rdar://problem/6889218> REGRESSION: Some iChat transcript resources are not
+ loaded because willSendRequest doesn't happen immediately
+
+ Reviewed by Antti Koivisto.
+
+ * WebView/WebView.mm:
+ (-[WebView _dispatchPendingLoadRequests]): Call Loader::servePendingRequests().
+ * WebView/WebViewPrivate.h: Added _dispatchPendingLoadRequests.
+
+2009-05-18 Sam Weinig <sam@webkit.org>
+
+ <rdar://problem/6899044> Can't see Apple ad on nytimes.com unless I spoof the user agent
+
+ Add user agent hack for pointroll.com.
+
+ Reviewed by Steve Falkenburg.
+
+ * WebView/WebView.mm:
+ (-[WebView WebCore::_userAgentForURL:WebCore::]):
+
+2009-05-16 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig and Dan Bernstein.
+
+ Fix <rdar://problem/6889644>
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::spawnPluginHost):
+
+2009-05-16 Dan Bernstein <mitz@apple.com>
+
+ - revert an accidental change from r43802.
+
+ * WebInspector/WebInspector.mm:
+
+2009-05-16 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6895347> Mouse wheeling in the QuickTime plug-in (incorrectly) scrolls the page
+
+ Fix logic. The plug-in returns true if it handled the event.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView sendEvent:isDrawRect:]):
+
+2009-05-16 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ - fix <rdar://problem/6873305> Two distinct characters are not displayed
+ correctly with 2 of the font selections from the stickies widget
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _plainTextFromPasteboard:]): Return precomposed text.
+ This is consistent with
+ -_documentFragmentFromPasteboard:forType:inContext:subresources:.
+
+2009-05-15 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix <rdar://problem/6875398>.
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::instantiatePlugin):
+ If we failed to instantiate the plug-in, call cleanup() so that any streams created by the plug-in from its
+ NPP_New callback are destroyed.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ Make cleanup() public.
+
+2009-05-15 Darin Adler <darin@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ <rdar://problem/6889823> hash table iterator used after hash table modified in
+ ProxyInstance::fieldNamed() when viewing movie trailer
+
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyInstance::methodsNamed): Move add call after the waitForReply call.
+ Anders says that by the time we return someone else might have done the same add
+ for us.
+ (WebKit::ProxyInstance::fieldNamed): Ditto.
+
+2009-05-15 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6892055>
+ Replace WKN_GetLocation with WKN_ResolveURL (WKN_GetLocation was confusing and did not take the base URL into account)
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCResolveURL):
+ New MIG callback.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::resolveURL):
+ Use FrameLoader::complete URL here.
+
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ Add new MIG definition.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView resolvedURLStringForURL:target:]):
+ * Plugins/WebNetscapeContainerCheckPrivate.h:
+ * Plugins/WebNetscapeContainerCheckPrivate.mm:
+ (browserContainerCheckFuncs):
+ * Plugins/WebNetscapePluginView.h:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView resolveURL:forTarget:]):
+ * Plugins/npapi.mm:
+ (WKN_ResolveURL):
+
+2009-05-15 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - fix <rdar://problem/6892052> WebTextIterator should not “emit
+ characters between all visible positions”
+
+ * WebView/WebTextIterator.mm:
+ (-[WebTextIterator initWithRange:]): Changed to construct a TextIterator
+ with emitCharactersBetweenAllVisiblePositions set to false.
+
+2009-05-15 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Dave Kilzer.
+
+ Look for libWebKitSystemInterface.a in a more reasonable location.
+
+ * Configurations/DebugRelease.xcconfig:
+
+2009-05-14 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Fix for <rdar://problem/6886217> REGRESSION (S4 beta-ToT): Adium chat window contents no longer resize.
+
+ Technically this is a bug in Adium. It appears that Adium has subclassed the WebView and implemented
+ viewDidMoveToWindow in its subclass improperly. It doesn't call up to the base class WebView like it
+ should and so our boundsChanged notification never gets added.
+
+ Reduce the dependence on viewDidMoveToWindow by moving the registration of observers into
+ viewWillMoveToWindow instead.
+
+ * WebView/WebView.mm:
+ (-[WebView addSizeObserversForWindow:]):
+ (-[WebView removeWindowObservers]):
+ (-[WebView addWindowObserversForWindow:]):
+ (-[WebView viewWillMoveToWindow:]):
+ (-[WebView viewDidMoveToWindow]):
+ (-[WebView viewDidMoveToSuperview]):
+
+2009-05-14 David Levin <levin@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24704
+
+ Allow the local cache directory to be set using a defaults key.
+
+ * Misc/WebKitNSStringExtras.h:
+ * Misc/WebKitNSStringExtras.m:
+ (+[NSString _webkit_localCacheDirectoryWithBundleIdentifier:]):
+ * WebKit.exp:
+
+2009-05-14 Darin Adler <darin@apple.com>
+
+ Reviewed by Adam Roben.
+
+ <rdar://problem/6879999> Automator actions that use WebKit on a background thread fail when run outside of Automator
+
+ * WebView/WebView.mm:
+ (clientNeedsWebViewInitThreadWorkaround): Added. Contains new broader rule.
+ (needsWebViewInitThreadWorkaround): Changed to call clientNeedsWebViewInitThreadWorkaround.
+
+2009-05-14 Darin Adler <darin@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Bug 24049: Second right-click crashes safari when alert invoked
+ https://bugs.webkit.org/show_bug.cgi?id=24049
+ rdar://problem/6878977
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView rightMouseUp:]): Added a retain/autorelease of the event.
+ (-[WebHTMLView menuForEvent:]): Ditto. Also cleaned up the logic here and
+ eliminated some use of pointers that might be invalid after calling through
+ to WebCore.
+ (-[WebHTMLView scrollWheel:]): Ditto.
+ (-[WebHTMLView acceptsFirstMouse:]): Ditto.
+ (-[WebHTMLView shouldDelayWindowOrderingForEvent:]): Ditto.
+ (-[WebHTMLView mouseDown:]): Ditto.
+ (-[WebHTMLView mouseDragged:]): Ditto.
+ (-[WebHTMLView mouseUp:]): Ditto.
+ (-[WebHTMLView keyDown:]): Ditto.
+ (-[WebHTMLView keyUp:]): Ditto.
+ (-[WebHTMLView flagsChanged:]): Ditto.
+ (-[WebHTMLView performKeyEquivalent:]): Ditto.
+
+2009-05-14 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Darin Adler.
+
+ <rdar://problem/6681868> When building with Xcode 3.1.3 should be using gcc 4.2
+
+ The meaning of XCODE_VERSION_ACTUAL is more sensible in newer versions of Xcode.
+ Update our logic to select the compiler version to use the more appropriate XCODE_VERSION_MINOR
+ if the version of Xcode supports it, and fall back to XCODE_VERSION_ACTUAL if not.
+
+ * Configurations/Base.xcconfig:
+
+2009-05-13 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ WebKit side of <rdar://problem/6884476>.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCGetLocation):
+ Forward this to the plug-in instance proxy.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::getLocation):
+ Ask the plug-in view for the location.
+
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ Add MIG definition.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView locationStringForTarget:]):
+ Return the URL for a given frame.
+
+ * Plugins/WebNetscapeContainerCheckPrivate.h:
+ Bump version. Add new declaration to the vtable.
+
+ * Plugins/WebNetscapeContainerCheckPrivate.mm:
+ (browserContainerCheckFuncs):
+ Add new declaration to the vtable.
+
+ * Plugins/WebNetscapePluginView.h:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView locationForTarget:]):
+ Call the base class method.
+
+ * Plugins/npapi.mm:
+ (WKN_GetLocation):
+ Forward this to the plug-in view.
+
+2009-05-13 Douglas R. Davidson <ddavidso@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6871587> Smart Copy/Paste setting should persist as continuous
+ spell checking setting does
+
+ * WebView/WebPreferenceKeysPrivate.h: Added WebSmartInsertDeleteEnabled.
+
+ * WebView/WebView.mm:
+ (-[WebViewPrivate init]): Initialize based on WebSmartInsertDeleteEnabled
+ default.
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+ Removed code that initialized here.
+ (-[WebView setSmartInsertDeleteEnabled:]): Set default here was with
+ continuous spell checking setting.
+
+2009-05-13 Darin Adler <darin@apple.com>
+
+ Revert the parser arena change. It was a slowdown, not a speedup.
+ Better luck next time (I'll break it up into pieces).
+
+2009-05-13 Darin Adler <darin@apple.com>
+
+ Reviewed by Cameron Zwarich.
+
+ Bug 25674: syntax tree nodes should use arena allocation
+ https://bugs.webkit.org/show_bug.cgi?id=25674
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm: Updated includes.
+ New ones needed due to reducing includes of JSDOMBinding.h.
+ * WebView/WebScriptDebugger.mm: Ditto.
+
+2009-05-13 Douglas R. Davidson <ddavidso@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6879145>
+ Generate a contextual menu item allowing autocorrections to
+ easily be changed back. Refrain from re-correcting items
+ that have already been autocorrected once.
+
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory contextMenuItemTagChangeBack:]):
+ * WebView/WebUIDelegatePrivate.h:
+
+2009-05-12 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix <rdar://problem/6878105>.
+
+ When instantiating the QT plug-in under Dashboard, force "kiosk mode".
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
+
+2009-05-12 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - declare a forgotten method
+
+ * DOM/WebDOMOperationsPrivate.h: Declare -[DOMNode markupString] in the
+ WebDOMNodeOperationsPendingPublic category.
+
+2009-05-10 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6870383> Have to enter credentials twice when downloading from a protected page
+
+ * Misc/WebDownload.m: Removed.
+ * Misc/WebDownload.mm: Copied from WebKit/mac/Misc/WebDownload.m.
+ (-[WebDownloadInternal download:didReceiveAuthenticationChallenge:]): Try to use
+ credentials from WebCore storage.
+
+2009-05-08 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Not reviewed. Fix clean builds, forgot to land name() -> formControlName() rename patch in WebKit. Only landed the WebCore side.
+
+ * WebView/WebHTMLRepresentation.mm:
+ (-[WebHTMLRepresentation elementWithName:inForm:]):
+
+2009-05-08 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ - Fix <rdar://problem/6866712>.
+
+ Instead of just caching whether a plug-in object _has_ a field or method, also add an entry to the cache
+ if it _doesn't_ have a certain field or method. This way we have to make fewer calls to the plug-in host.
+
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyInstance::methodsNamed):
+ (WebKit::ProxyInstance::fieldNamed):
+
+2009-05-08 Douglas R. Davidson <ddavidso@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fixes for <rdar://problem/6852771>.
+ Disable text checking menu items if view is not editable.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
+ (-[WebHTMLView smartInsertDeleteEnabled]):
+ (-[WebHTMLView setSmartInsertDeleteEnabled:]):
+ (-[WebHTMLView toggleSmartInsertDelete:]):
+ * WebView/WebHTMLViewInternal.h:
+
+2009-05-08 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ <rdar://problem/6868773> NPN_GetAuthenticationInfo does not work with non-permanent credentials
+
+ * Plugins/WebBaseNetscapePluginView.mm: (WebKit::getAuthenticationInfo): Ask WebCore for
+ credentials first (but also ask NSURLCredentialStorage, because WebCore won't know about
+ permanent credentials).
+
+2009-05-05 Ben Murdoch <benm@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Add #if ENABLE(DATABASE) guards around database code so toggling ENABLE_DATABASE off does not break builds.
+ https://bugs.webkit.org/show_bug.cgi?id=24776
+
+ * Storage/WebDatabaseManager.mm:
+ * Storage/WebDatabaseManagerInternal.h:
+ * Storage/WebDatabaseManagerPrivate.h:
+ * Storage/WebDatabaseTrackerClient.h:
+ * Storage/WebDatabaseTrackerClient.mm:
+ * Storage/WebSecurityOrigin.mm:
+ (-[WebSecurityOrigin usage]):
+ (-[WebSecurityOrigin quota]):
+ (-[WebSecurityOrigin setQuota:]):
+ * Storage/WebSecurityOriginPrivate.h:
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+
+2009-05-04 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ Fix <rdar://problem/6797644>.
+
+ Make sure to send a reply even when an instance proxy can't be found.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCEvaluate):
+ (WKPCInvoke):
+ (WKPCInvokeDefault):
+ (WKPCGetProperty):
+ (WKPCHasProperty):
+ (WKPCHasMethod):
+ (WKPCEnumerate):
+
+2009-05-04 Darin Adler <darin@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ Bug 24924: remove Document.h include of Attr.h and HTMLCollection.h,
+ and NamedMappedAttrMap.h include of MappedAttribute.h
+ https://bugs.webkit.org/show_bug.cgi?id=24924
+
+ * WebView/WebFrame.mm: Added include of CSSMutableStyleDeclaration.h
+ and ScriptValue.h.
+
+2009-05-02 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Simplified null-ish JSValues.
+
+ Replaced calls to noValue() with calls to JSValue() (which is what
+ noValue() returned). Removed noValue().
+
+ Removed "JSValue()" initialiazers, since default construction happens...
+ by default.
+
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame evaluateWebScript:]):
+
+2009-05-02 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6741615> REGRESSION (r38629): Shortcut "Flag/Junk" in MobileMe does not work
+ when Kotoeri is used.
+
+ * WebView/WebHTMLView.mm: (-[WebHTMLView inputContext]): Return a nil input context when
+ focus is not in editable content.
+
+2009-05-01 Geoffrey Garen <ggaren@apple.com>
+
+ Rubber Stamped by Sam Weinig.
+
+ Renamed JSValuePtr => JSValue.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::evaluate):
+ (WebKit::NetscapePluginInstanceProxy::invoke):
+ (WebKit::NetscapePluginInstanceProxy::invokeDefault):
+ (WebKit::NetscapePluginInstanceProxy::construct):
+ (WebKit::NetscapePluginInstanceProxy::getProperty):
+ (WebKit::NetscapePluginInstanceProxy::setProperty):
+ (WebKit::NetscapePluginInstanceProxy::hasMethod):
+ (WebKit::NetscapePluginInstanceProxy::addValueToArray):
+ (WebKit::NetscapePluginInstanceProxy::marshalValue):
+ (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
+ (WebKit::NetscapePluginInstanceProxy::demarshalValue):
+ (WebKit::NetscapePluginInstanceProxy::demarshalValues):
+ * Plugins/Hosted/ProxyInstance.h:
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyField::valueFromInstance):
+ (WebKit::ProxyField::setValueToInstance):
+ (WebKit::ProxyInstance::invoke):
+ (WebKit::ProxyInstance::invokeMethod):
+ (WebKit::ProxyInstance::invokeDefaultMethod):
+ (WebKit::ProxyInstance::invokeConstruct):
+ (WebKit::ProxyInstance::defaultValue):
+ (WebKit::ProxyInstance::stringValue):
+ (WebKit::ProxyInstance::numberValue):
+ (WebKit::ProxyInstance::booleanValue):
+ (WebKit::ProxyInstance::valueOf):
+ (WebKit::ProxyInstance::fieldValue):
+ (WebKit::ProxyInstance::setFieldValue):
+ * WebView/WebFrame.mm:
+ (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame _convertValueToObjcValue:]):
+ (-[WebScriptCallFrame exception]):
+ (-[WebScriptCallFrame evaluateWebScript:]):
+ * WebView/WebView.mm:
+ (aeDescFromJSValue):
+ (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
+
+2009-05-01 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Add a FrameLoaderClient callback for the ResourceRetrievedByXMLHttpRequest.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25347
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest):
+
+2009-04-30 David Kilzer <ddkilzer@apple.com>
+
+ Provide a mechanism to create a quirks delegate for HTMLParser
+
+ Reviewed by David Hyatt.
+
+ * WebCoreSupport/WebChromeClient.h:
+ (WebChromeClient::createHTMLParserQuirks): Added. The default
+ implementation of this factory method returns 0.
+
+2009-04-30 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25470
+ Extend the cover of ENABLE_JAVASCRIPT_DEBUGGER to profiler.
+
+ * Configurations/FeatureDefines.xcconfig: Added ENABLE_JAVASCRIPT_DEBUGGER define.
+
+2009-04-30 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders Carlson.
+
+ <rdar://problem/6823049>
+
+ Fix an issue where some plug-ins would cause the application icon to constantly bounce
+ up and down in the Dock.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.h: Change m_placeholderWindow ivar to be
+ a subclass of NSWindow, WebPlaceholderModalWindow.
+ * Plugins/Hosted/NetscapePluginHostProxy.mm: Added WebPlaceholderModalWindow NSWindow subclass.
+ (-[WebPlaceholderModalWindow _wantsUserAttention]): Prevent NSApp from calling requestUserAttention:
+ when the window is shown modally, even if the app is inactive.
+ (WebKit::NetscapePluginHostProxy::beginModal): NSWindow -> WebPlaceholderModalWindow.
+
+2009-04-30 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25342
+ Add MessageSource and MessageLevel parameters to the ChromeClient::addMessageToConsole.
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::addMessageToConsole):
+
+2009-04-29 Mark Rowe <mrowe@apple.com>
+
+ More build fixing after r43037.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::invoke):
+ (WebKit::NetscapePluginInstanceProxy::invokeDefault):
+ (WebKit::NetscapePluginInstanceProxy::construct):
+ (WebKit::NetscapePluginInstanceProxy::demarshalValues):
+
+2009-04-29 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ - WebKit part of <rdar://problem/6609509> Select All and then Delete
+ should put Mail editing back into the same state as a new message
+
+ * WebView/WebView.mm:
+ (-[WebView _selectionIsCaret]): Added.
+ (-[WebView _selectionIsAll]): Added. Returns whether the selection
+ encompasses the entire document.
+ * WebView/WebViewPrivate.h:
+
+2009-04-29 Douglas Davidson <ddavidso@apple.com>
+
+ Reviewed by Justin Garcia.
+
+ <rdar://problem/6836921> Mail exhibits issues with text checking, e.g. menu items not always validated correctly
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
+ (-[WebHTMLView orderFrontSubstitutionsPanel:]):
+ * WebView/WebView.mm:
+ (-[WebView validateUserInterfaceItemWithoutDelegate:]):
+
+2009-04-29 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix a bug in the bounds checking for setNeedsLayout dirtying when a WebView's size changes. The superview
+ of the WebView was being incorrectly checked instead of the WebView itself.
+
+ * WebView/WebView.mm:
+ (-[WebView _boundsChanged]):
+
+2009-04-29 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders Carlson.
+
+ Allow WKN_CheckIfAllowedToLoadURL() to take an optional void* context parameter.
+
+ * Plugins/WebNetscapeContainerCheckContextInfo.h:
+ * Plugins/WebNetscapeContainerCheckContextInfo.mm:
+ (-[WebNetscapeContainerCheckContextInfo initWithCheckRequestID:callbackFunc:context:]):
+ (-[WebNetscapeContainerCheckContextInfo callback]):
+ (-[WebNetscapeContainerCheckContextInfo context]):
+ * Plugins/WebNetscapeContainerCheckPrivate.h:
+ * Plugins/WebNetscapeContainerCheckPrivate.mm:
+ (browserContainerCheckFuncs):
+ * Plugins/WebNetscapePluginView.h:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView checkIfAllowedToLoadURL:frame:callbackFunc:context:]):
+ (-[WebNetscapePluginView _containerCheckResult:contextInfo:]):
+ * Plugins/npapi.mm:
+ (WKN_CheckIfAllowedToLoadURL):
+
+2009-04-29 David Hyatt <hyatt@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Fix for <rdar://problem/6835573>, Find Banner turns invisible when WebView is resized. Make sure
+ not to resize the interior views of a WebView in response to its bounds changing when not using
+ viewless WebKit. Auto-resizing rules were already in place to handle size adjustments for us.
+ Just mark as needing layout and do nothing else.
+
+ This does mean viewless WebKit is broken with the Find Banner, and that will likely require a
+ Safari change (using a new API that will enable clients to define the edges of the content area as offsets
+ from the sides of the WebView).
+
+ * WebView/WebView.mm:
+ (-[WebView _boundsChanged]):
+
+2009-04-28 Geoffrey Garen <ggaren@apple.com>
+
+ Rubber stamped by Beth Dakin.
+
+ Removed scaffolding supporting dynamically converting between 32bit and
+ 64bit value representations.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::marshalValues):
+
+2009-04-28 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker and Darin Adler.
+
+ Fix <rdar://problem/6836132>.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCCheckIfAllowedToLoadURL):
+ Call the instance proxy.
+
+ (WKPCCancelCheckIfAllowedToLoadURL):
+ Ditto.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
+ Initialize the check ID counter.
+
+ (WebKit::NetscapePluginInstanceProxy::checkIfAllowedToLoadURL):
+ Create a WebPluginContainerCheck, add it to the map, and start it.
+
+ (WebKit::NetscapePluginInstanceProxy::cancelCheckIfAllowedToLoadURL):
+ Remove the check from the map.
+
+ (WebKit::NetscapePluginInstanceProxy::checkIfAllowedToLoadURLResult):
+ Call the WKPH MIG callback.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.h:
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]):
+ Call the instance proxy.
+
+ (-[WebHostedNetscapePluginView _containerCheckResult:contextInfo:]):
+ Ditto.
+
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ * Plugins/Hosted/WebKitPluginHost.defs:
+ Add MIG declarations.
+
+2009-04-28 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by John Sullivan.
+
+ - fix <rdar://problem/6786360> Make PDF an insertable pasteboard type
+
+ * WebCoreSupport/WebPasteboardHelper.mm:
+ (WebPasteboardHelper::insertablePasteboardTypes):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]):
+ (+[WebHTMLView _insertablePasteboardTypes]):
+ (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
+
+2009-04-27 Douglas R. Davidson <ddavidso@apple.com>
+
+ Add the various switches and context menu items needed for
+ <rdar://problem/6724106> WebViews need to implement text checking
+ and adopt updatePanels in place of old SPI _updateGrammar.
+
+ Reviewed by Justin Garcia.
+
+ * WebCoreSupport/WebContextMenuClient.mm:
+ (fixMenusReceivedFromOldClients):
+ * WebCoreSupport/WebEditorClient.h:
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::uppercaseWord):
+ (WebEditorClient::lowercaseWord):
+ (WebEditorClient::capitalizeWord):
+ (WebEditorClient::showSubstitutionsPanel):
+ (WebEditorClient::substitutionsPanelIsShowing):
+ (WebEditorClient::toggleSmartInsertDelete):
+ (WebEditorClient::isAutomaticQuoteSubstitutionEnabled):
+ (WebEditorClient::toggleAutomaticQuoteSubstitution):
+ (WebEditorClient::isAutomaticLinkDetectionEnabled):
+ (WebEditorClient::toggleAutomaticLinkDetection):
+ (WebEditorClient::isAutomaticDashSubstitutionEnabled):
+ (WebEditorClient::toggleAutomaticDashSubstitution):
+ (WebEditorClient::isAutomaticTextReplacementEnabled):
+ (WebEditorClient::toggleAutomaticTextReplacement):
+ (WebEditorClient::isAutomaticSpellingCorrectionEnabled):
+ (WebEditorClient::toggleAutomaticSpellingCorrection):
+ (WebEditorClient::checkTextOfParagraph):
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory contextMenuItemTagShowColors]):
+ (-[WebViewFactory contextMenuItemTagCorrectSpellingAutomatically]):
+ (-[WebViewFactory contextMenuItemTagSubstitutionsMenu]):
+ (-[WebViewFactory contextMenuItemTagShowSubstitutions:]):
+ (-[WebViewFactory contextMenuItemTagSmartCopyPaste]):
+ (-[WebViewFactory contextMenuItemTagSmartQuotes]):
+ (-[WebViewFactory contextMenuItemTagSmartDashes]):
+ (-[WebViewFactory contextMenuItemTagSmartLinks]):
+ (-[WebViewFactory contextMenuItemTagTextReplacement]):
+ (-[WebViewFactory contextMenuItemTagTransformationsMenu]):
+ (-[WebViewFactory contextMenuItemTagMakeUpperCase]):
+ (-[WebViewFactory contextMenuItemTagMakeLowerCase]):
+ (-[WebViewFactory contextMenuItemTagCapitalize]):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
+ (-[WebHTMLView isAutomaticQuoteSubstitutionEnabled]):
+ (-[WebHTMLView setAutomaticQuoteSubstitutionEnabled:]):
+ (-[WebHTMLView toggleAutomaticQuoteSubstitution:]):
+ (-[WebHTMLView isAutomaticLinkDetectionEnabled]):
+ (-[WebHTMLView setAutomaticLinkDetectionEnabled:]):
+ (-[WebHTMLView toggleAutomaticLinkDetection:]):
+ (-[WebHTMLView isAutomaticDashSubstitutionEnabled]):
+ (-[WebHTMLView setAutomaticDashSubstitutionEnabled:]):
+ (-[WebHTMLView toggleAutomaticDashSubstitution:]):
+ (-[WebHTMLView isAutomaticTextReplacementEnabled]):
+ (-[WebHTMLView setAutomaticTextReplacementEnabled:]):
+ (-[WebHTMLView toggleAutomaticTextReplacement:]):
+ (-[WebHTMLView isAutomaticSpellingCorrectionEnabled]):
+ (-[WebHTMLView setAutomaticSpellingCorrectionEnabled:]):
+ (-[WebHTMLView toggleAutomaticSpellingCorrection:]):
+ * WebView/WebHTMLViewInternal.h:
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebUIDelegatePrivate.h:
+ * WebView/WebView.mm:
+ (-[WebViewPrivate init]):
+ (-[WebView validateUserInterfaceItemWithoutDelegate:]):
+ (-[WebView setGrammarCheckingEnabled:]):
+ (-[WebView isAutomaticQuoteSubstitutionEnabled]):
+ (-[WebView isAutomaticLinkDetectionEnabled]):
+ (-[WebView isAutomaticDashSubstitutionEnabled]):
+ (-[WebView isAutomaticTextReplacementEnabled]):
+ (-[WebView isAutomaticSpellingCorrectionEnabled]):
+ (-[WebView setAutomaticQuoteSubstitutionEnabled:]):
+ (-[WebView toggleAutomaticQuoteSubstitution:]):
+ (-[WebView setAutomaticLinkDetectionEnabled:]):
+ (-[WebView toggleAutomaticLinkDetection:]):
+ (-[WebView setAutomaticDashSubstitutionEnabled:]):
+ (-[WebView toggleAutomaticDashSubstitution:]):
+ (-[WebView setAutomaticTextReplacementEnabled:]):
+ (-[WebView toggleAutomaticTextReplacement:]):
+ (-[WebView setAutomaticSpellingCorrectionEnabled:]):
+ (-[WebView toggleAutomaticSpellingCorrection:]):
+ * WebView/WebViewPrivate.h:
+
+2009-04-27 David Kilzer <ddkilzer@apple.com>
+
+ Consolidate runtime application checks for Apple Mail and Safari
+
+ Reviewed by Mark Rowe and Darin Adler.
+
+ * WebCoreSupport/WebContextMenuClient.mm:
+ (isAppleMail): Removed.
+ (fixMenusToSendToOldClients): Switched to use
+ applicationIsAppleMail().
+ * WebView/WebFrame.mm:
+ (-[WebFrame reload]): Switched to use applicationIsSafari().
+ * WebView/WebPDFView.mm:
+ (-[WebPDFView menuForEvent:]): Ditto.
+ * WebView/WebResource.mm:
+ (+[WebResource _needMailThreadWorkaroundIfCalledOffMainThread]):
+ Switched to use applicationIsAppleMail().
+ * WebView/WebView.mm:
+ (runningLeopardMail): Ditto.
+ (runningTigerMail): Ditto.
+ (-[WebView _needsKeyboardEventDisambiguationQuirks]): Switched
+ to use applicationIsSafari().
+
+2009-04-27 Kevin Decker <kdecker@apple.com>
+
+ Fix the Tiger build.
+
+ * Plugins/WebNetscapePluginView.mm: The base class of WebNetscapePluginView.mm, WebBaseNetscapePluginView, already implemented
+ the two methods below. But the Tiger compiler didn't know that.
+ (-[WebNetscapePluginView webView]):
+ (-[WebNetscapePluginView webFrame]):
+
+2009-04-27 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ <rdar://problem/6352982>
+
+ * Plugins/WebBaseNetscapePluginView.mm: Removed checkIfAllowedToLoadURL:frame:callbackFunc, cancelCheckIfAllowedToLoadURL, and
+ _webPluginContainerCancelCheckIfAllowedToLoadRequest from the base class. These methods now exist in the subclass WebNetscapePluginView.
+
+ Added WebNetscapeContainerCheckContextInfo, which is used as a "contextInfo" object in
+ -[WebNetscapePluginView checkIfAllowedToLoadURL:frame:callbackFunc:]
+ * Plugins/WebNetscapeContainerCheckContextInfo.h: Added.
+ * Plugins/WebNetscapeContainerCheckContextInfo.mm: Added.
+ (-[WebNetscapeContainerCheckContextInfo initWithCheckRequestID:callbackFunc:]): Added desiginated initializer.
+ (-[WebNetscapeContainerCheckContextInfo checkRequestID]): Added. Returns the checkRequestID.
+ (-[WebNetscapeContainerCheckContextInfo callback]): Added. Returns the callback.
+
+ * Plugins/WebNetscapePluginView.h: Added two new ivars: _containerChecksInProgress and _currentContainerCheckRequestID.
+ * Plugins/WebNetscapePluginView.mm: #import both WebPluginContainerCheck.h and WebNetscapeContainerCheckContextInfo.h
+
+ (-[WebNetscapePluginView checkIfAllowedToLoadURL:frame:callbackFunc:]): Added. This is the implementation of WKN_CheckIfAllowedToLoadURL.
+ Here, we increment the request ID and start the container check.
+
+ (-[WebNetscapePluginView _containerCheckResult:contextInfo:]): Added. This is a callback method for WebPluginContainerCheck.
+ It's where we actually call into the plug-in and provide the allow-or-deny result.
+
+ (-[WebNetscapePluginView cancelCheckIfAllowedToLoadURL:]): Added. This is the implementation of WKN_CancelCheckIfAllowedToLoadURL.
+ Here we lookup the check, cancel it, and remove it from _containerChecksInProgress.
+
+ (-[WebNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]): Added. WebPluginContainerCheck automatically calls
+ this method after invoking our _containerCheckResult: selector. It works this way because calling -[WebPluginContainerCheck cancel] allows
+ it to do it's teardown process.
+
+ (-[WebNetscapePluginView fini]): Release _containerChecksInProgress ivar.
+
+ * Plugins/WebPluginContainerCheck.h: Removed initWithRequest: method from header; no client was using this method directly.
+ * Plugins/WebPluginContainerCheck.mm:
+ (+[WebPluginContainerCheck checkWithRequest:target:resultObject:selector:controller:contextInfo:]): Added optional contextInfo parameter.
+ (-[WebPluginContainerCheck _continueWithPolicy:]): If there's a contextInfo object, pass it as a parameter to resultSelector.
+ (-[WebPluginContainerCheck cancel]): Release _contextInfo ivar.
+ (-[WebPluginContainerCheck contextInfo]): Added new method. Returns the contextInfo object, if one so exists.
+ * Plugins/WebPluginController.mm:
+ (-[WebPluginController _webPluginContainerCheckIfAllowedToLoadRequest:inFrame:resultObject:selector:]): Pass nil for contextInfo. WebKit-style
+ plug-ins do not need additional context information.
+
+2009-04-25 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig
+
+ Some *obvious* style cleanup in my last patch.
+
+ * History/WebBackForwardList.mm:
+ (bumperCarBackForwardHackNeeded):
+
+2009-04-25 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Oliver Hunt
+
+ <rdar://problem/6817607> BumperCar 2.2 crashes going back (invalid WebHistoryItem)
+
+ BumperCar was holding a pointer to a WebHistoryItem they never retain, then later
+ tried to go to it. In some cases it would be dealloc'ed first.
+ When WebHistoryItems were pure Objective-C they probably got away with this more often.
+ With the WebCore/Obj-C mixed WebHistoryItems it's more likely to crash.
+
+ * History/WebBackForwardList.mm:
+ (bumperCarBackForwardHackNeeded):
+ (-[WebBackForwardList backListWithLimit:]): If this is BumperCar, hang on to the
+ NSArray of WebHistoryItems until the next time this method is called.
+ (-[WebBackForwardList forwardListWithLimit:]): Ditto.
+
+ * Misc/WebKitVersionChecks.h: Added WEBKIT_FIRST_VERSION_WITHOUT_BUMPERCAR_BACK_FORWARD_QUIRK.
+
+2009-04-24 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix <rdar://problem/6761635>.
+
+ Make sure to keep an extra reference to the instance proxy in case the plug-in host crashes while
+ we're waiting for a reply.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::destroy):
+
+2009-04-24 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Dan Bernstein
+
+ Currently working on a bug where a WebHistoryItem was being used after being dealloc'ed.
+ I added this assertion to help catch the case as soon as it happens instead of random
+ issues downstream. Figured it's worth checking in by itself.
+
+ * History/WebHistoryItem.mm:
+ (core): ASSERT that the WebCore::HistoryItem inside this WebHistoryItem is supposed to have
+ this WebHistoryItem as a wrapper.
+
+2009-04-23 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for <rdar://problem/6333461> REGRESSION (r36864-r36869):
+ Dragging stocks widget scrollbar drags the whole widget
+
+ Look for our new WebCore scrollbars in the WebHTMLView and add
+ proper Dashboard regions for them.
+
+ * WebView/WebView.mm:
+ (-[WebView _addScrollerDashboardRegionsForFrameView:dashboardRegions:]):
+ (-[WebView _addScrollerDashboardRegions:from:]):
+
+2009-04-23 John Sullivan <sullivan@apple.com>
+
+ fixed <rdar://problem/6822479> Assertion failure after Reset Safari in new history-writing code
+
+ Reviewed by Oliver Hunt
+
+ * History/WebHistory.mm:
+ (-[WebHistoryPrivate data]):
+ Return nil immediately if there are no entries; this matches a recent Windows-platform fix.
+
+2009-04-23 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25313
+ Missing scroll bars in GMail.
+
+ * WebView/WebDynamicScrollBarsView.m:
+ (-[WebDynamicScrollBarsView updateScrollers]): Added check for the ScrollbarAlwaysOn
+ scroll mode.
+
+2009-04-23 Kevin Decker <kdecker@apple.com>
+
+ * Plugins/WebPluginContainerCheck.h: Fix the Tiger build.
+
+2009-04-23 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Geoffrey Garen.
+
+ Fix <rdar://problem/6821992>
+
+ Add a new m_inDestroy member variable. Set it to true when in destroy, and have all NPRuntime functions return false
+ when m_inDestroy is true.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
+ (WebKit::NetscapePluginInstanceProxy::destroy):
+ (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):
+
+2009-04-23 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Maciej.
+
+ Fix for <rdar://problem/6789879> REGRESSION (42464): Hitting assertion when loading message in Mail + TOT WebKit
+
+ Make the Mac platform the same as all the other platforms. Instead of (incorrectly) marking a FrameView for layout
+ when its underlying document view changes, just mark the outermost frame view for layout when the WebView's size changes.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _frameOrBoundsChanged]):
+ (-[WebHTMLView addSuperviewObservers]):
+ * WebView/WebView.mm:
+ (-[WebView _boundsChanged]):
+ (-[WebView removeSizeObservers]):
+ (-[WebView addSizeObservers]):
+
+2009-04-23 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Second part of the fix for <rdar://problem/6352982>
+
+ * Plugins/WebBaseNetscapePluginView.h: Make this class conform to WebPluginContainerCheckController
+ * Plugins/WebBaseNetscapePluginView.mm: Likewise.
+ (-[WebBaseNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]): Added skeleton method.
+ * Plugins/WebPluginContainerCheck.h: Added protocol for <WebPluginContainerCheckController>
+ * Plugins/WebPluginContainerCheck.mm:
+ (-[WebPluginContainerCheck initWithRequest:target:resultObject:selector:controller:]):
+ * Plugins/WebPluginController.h: Make this class conform to WebPluginContainerCheckController
+
+2009-04-23 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ First part of <rdar://problem/6352982>
+
+ * Plugins/WebBaseNetscapePluginView.h: Imported #WebNetscapeContainerCheckPrivate.h; Added two new method:
+ checkIfAllowedToLoadURL:url:frame:callbackFunc: and cancelCheckIfAllowedToLoadURL:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView checkIfAllowedToLoadURL:frame:callbackFunc:]): Added skeleton method, does nothing interesting
+ yet.
+ (-[WebBaseNetscapePluginView cancelCheckIfAllowedToLoadURL:]): Likewise.
+ * Plugins/WebNetscapeContainerCheckPrivate.h: Added.
+ * Plugins/WebNetscapeContainerCheckPrivate.mm: Added.
+ (browserContainerCheckFuncs): Added.
+ * Plugins/WebNetscapePluginView.h: Imported #WebNetscapeContainerCheckPrivate.h;
+ * Plugins/WebNetscapePluginView.mm: Imported #WebNetscapeContainerCheckPrivate.h; added WKN_CheckIfAllowedToLoadURL
+ and WKN_CancelCheckIfAllowedToLoadURL functions.
+ (-[WebNetscapePluginView getVariable:value:]): Return vtable for container check functions.
+ * Plugins/npapi.mm:
+ (WKN_CheckIfAllowedToLoadURL): Added new private function.
+ (WKN_CancelCheckIfAllowedToLoadURL): Ditto.
+
+2009-04-22 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6757346> SAP: Prevent default on mouseDown does not stop iframe from capturing subsequent mouse moves
+
+ Make mouseUP forward to the root view as we do for mouseMoves and mouseDragged:.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView mouseUp:]):
+
+2009-04-22 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6757346> SAP: Prevent default on mouseDown does not stop iframe from capturing subsequent mouse moves
+
+ Make mouseDragged forward to the root view as we do for mouseMoves.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView mouseDragged:]):
+
+2009-04-22 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Fix <rdar://problem/6792694>
+
+ When we're trying to instantiate a plug-in and the plug-in host has died, we need to invalidate the
+ instance so that it doesn't stick around and do bad things.
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::instantiatePlugin):
+
+2009-04-22 Sam Weinig <sam@webkit.org>
+
+ Rubber-stamped by Darin Adler.
+
+ Fix for <rdar://problem/6816957>
+ Turn off Geolocation by default
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-04-21 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ - Mac part of fixing for <rdar://problem/6755137> Action dictionary for
+ policy decision is missing keys when full-page zoom is used
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::actionDictionary): Use absoluteLocation() instead
+ of pageX() and pageY(), which are adjusted for zoom.
+
+2009-04-21 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler and Kevin Decker.
+
+ WebKit side of <rdar://problem/6781642>.
+
+ When we call resize with an actual changed size, block until the plug-in host is done.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::resize):
+ * Plugins/Hosted/WebHostedNetscapePluginView.h:
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView updateAndSetWindow]):
+ * Plugins/Hosted/WebKitPluginHost.defs:
+
+2009-04-17 Timothy Hatcher <timothy@apple.com>
+
+ Change how sudden termination works with WebView teardown.
+
+ <rdar://problem/6383352&6383379&6383940>
+
+ Reviewed by Darin Adler.
+
+ * WebCoreSupport/WebChromeClient.h: Remove disableSuddenTermination/enableSuddenTermination.
+ * WebCoreSupport/WebChromeClient.mm: Ditto.
+ * WebView/WebFrame.mm:
+ (-[WebFrame _pendingFrameUnloadEventCount]): Ask the DOMWindow.
+ * WebView/WebView.mm:
+ (+[WebView canCloseAllWebViews]): Call DOMWindow::dispatchAllPendingBeforeUnloadEvents.
+ (+[WebView closeAllWebViews]): Call DOMWindow::dispatchAllPendingUnloadEvents and
+ call close on all the WebViews.
+ (-[WebView _closeWithFastTeardown]): Remove code for unload event dispatch.
+ (-[WebView _close]): Correct a comment.
+ (+[WebView _applicationWillTerminate]): Call closeAllWebViews.
+ * WebView/WebViewPrivate.h: Add canCloseAllWebViews and closeAllWebViews.
+
+2009-04-21 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Tiger crash fix: Put VM tags in their own header file, and fixed up the
+ #ifdefs so they're not used on Tiger.
+
+ * ForwardingHeaders/wtf/VMTags.h: Copied from ForwardingHeaders/wtf/HashTraits.h.
+
+2009-04-17 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/6722845>
+ In the Cocoa event model, NPWindow's window field should be null
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCConvertPoint):
+ Get the instance proxy and call it's convertPoint function.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::convertPoint):
+ Call convertPoint on the plug-in view.
+
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ Add PCConvertPoint.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ Add a declaration for convertFromX:andY:space:toX:andY:space:.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView convertFromX:andY:space:toX:andY:space:]):
+ Convert a point from one coordinate system to another.
+
+ * Plugins/WebNetscapePluginEventHandler.h:
+ * Plugins/WebNetscapePluginEventHandlerCarbon.h:
+ * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
+ (WebNetscapePluginEventHandlerCarbon::drawRect):
+ * Plugins/WebNetscapePluginEventHandlerCocoa.h:
+ Add CGContextRef to drawRect.
+
+ * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
+ (WebNetscapePluginEventHandlerCocoa::drawRect):
+ Set the passed in context.
+
+ * Plugins/WebNetscapePluginPackage.mm:
+ (-[WebNetscapePluginPackage _tryLoad]):
+ Add NPN_ConvertPoint to the browserFuncs vtable.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
+ Only set the window for the Carbon event model.
+
+ (-[WebNetscapePluginView restorePortState:]):
+ It's OK for the window context to be null.
+
+ (-[WebNetscapePluginView sendDrawRectEvent:]):
+ Pass the CGContextRef to drawRect.
+
+ * Plugins/npapi.mm:
+ (NPN_ConvertPoint):
+ Call the plug-in view method.
+
+2009-04-20 Sam Weinig <sam@webkit.org>
+
+ Rubber-stamped by Tim Hatcher.
+
+ Add licenses for xcconfig files.
+
+ * Configurations/Base.xcconfig:
+ * Configurations/DebugRelease.xcconfig:
+ * Configurations/FeatureDefines.xcconfig:
+ * Configurations/Version.xcconfig:
+ * Configurations/WebKit.xcconfig:
+
+2009-04-20 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ WebKit side of <rdar://problem/6781302>
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::keyEvent):
+ Pass the event keyChar.
+
+ (WebKit::NetscapePluginInstanceProxy::syntheticKeyDownWithCommandModifier):
+ Ditto.
+
+ (WebKit::NetscapePluginInstanceProxy::flagsChanged):
+ Pass a 0 keyChar.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView flagsChanged:]):
+ Call NetscapePluginInstanceProxy::flagsChanged.
+
+ * Plugins/Hosted/WebKitPluginHost.defs:
+ Add a keyChar argument.
+
+2009-04-19 Adele Peterson <adele@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for <rdar://problem/6804809> REGRESSION: In Mail, Home and End do not scroll message
+
+ If no scrolling occurs, call tryToPerform on the next responder. Then our WebResponderChainSink
+ will correctly detect if no responders handle the selector.
+
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView _scrollToBeginningOfDocument]):
+ (-[WebFrameView _scrollToEndOfDocument]):
+ (-[WebFrameView scrollToBeginningOfDocument:]):
+ (-[WebFrameView scrollToEndOfDocument:]):
+ (-[WebFrameView scrollLineUp:]):
+ (-[WebFrameView scrollLineDown:]):
+
+2009-04-19 David Kilzer <ddkilzer@apple.com>
+
+ Make FEATURE_DEFINES completely dynamic
+
+ Reviewed by Darin Adler.
+
+ Make FEATURE_DEFINES depend on individual ENABLE_FEATURE_NAME
+ variables for each feature, making it possible to remove all
+ knowledge of FEATURE_DEFINES from build-webkit.
+
+ * Configurations/FeatureDefines.xcconfig: Extract a variable
+ from FEATURE_DEFINES for each feature setting.
+
+2009-04-18 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ <rdar://problem/6781295> video.buffered and video.seekable are not
+ the same. video.buffered should return only what is buffered and
+ not what is seekable
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface): Add wkQTMovieMaxTimeSeekable.
+
+2009-04-18 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ <rdar://problem/6747241> work around QTKit no longer reaching
+ QTMovieLoadStateComplete
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface): Init the new WKSI exported symbol.
+
+2009-04-17 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6714488>
+ REGRESSION (Safari 3-4): Edit menu commands (cut/copy/paste/select all) do not work on Flash content
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::syntheticKeyDownWithCommandModifier):
+ Send a keyDown event to the plug-in host.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView sendModifierEventWithKeyCode:character:]):
+ Call the plug-in instance proxy.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView sendModifierEventWithKeyCode:character:]):
+ Add this. Subclasses are required to override it.
+
+ (-[WebBaseNetscapePluginView cut:]):
+ (-[WebBaseNetscapePluginView copy:]):
+ (-[WebBaseNetscapePluginView paste:]):
+ (-[WebBaseNetscapePluginView selectAll:]):
+ Call sendModifierEventWithKeyCode.
+
+ * Plugins/WebNetscapePluginEventHandler.h:
+ Add syntheticKeyDownWithCommandModifier.
+
+ * Plugins/WebNetscapePluginEventHandlerCarbon.h:
+ * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
+ (WebNetscapePluginEventHandlerCarbon::syntheticKeyDownWithCommandModifier):
+ Send the synthetic event.
+
+ * Plugins/WebNetscapePluginEventHandlerCocoa.h:
+ * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
+ (WebNetscapePluginEventHandlerCocoa::syntheticKeyDownWithCommandModifier):
+ Send the synthetic event.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView sendModifierEventWithKeyCode:character:]):
+ Call the event handler.
+
+2009-04-17 David Kilzer <ddkilzer@apple.com>
+
+ Simplify FEATURE_DEFINES definition
+
+ Reviewed by Darin Adler.
+
+ This moves FEATURE_DEFINES and its related ENABLE_FEATURE_NAME
+ variables to their own FeatureDefines.xcconfig file. It also
+ extracts a new ENABLE_GEOLOCATION variable so that
+ FEATURE_DEFINES only needs to be defined once.
+
+ * Configurations/FeatureDefines.xcconfig: Added.
+ * Configurations/WebKit.xcconfig: Removed definition of
+ ENABLE_SVG_DOM_OBJC_BINDINGS and FEATURE_DEFINES. Added include
+ of FeatureDefines.xcconfig.
+
+2009-04-17 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix crashes seen in regression tests with hosted plug-ins.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::cancelStreamLoad): Check the stream for 0,
+ not the stream ID.
+
+2009-04-17 Darin Adler <darin@apple.com>
+
+ Reviewed by Antti Koivisto.
+
+ Bug 25210: don't use ObjC methods to wrap/unwrap DOM objects with ObjC
+ https://bugs.webkit.org/show_bug.cgi?id=25210
+
+ * DOM/WebDOMOperations.mm:
+ (-[DOMNode markupString]): Use the core function instead of an Objective-C method.
+ (-[DOMNode _subresourceURLs]): Ditto.
+ (-[DOMDocument _focusableNodes]): Ditto.
+ (-[DOMRange webArchive]): Ditto.
+ (-[DOMRange markupString]): Ditto.
+
+ * Misc/WebElementDictionary.mm: Added now-needed include since the core and kit
+ functions now come from the internal headers from DOM bindings.
+ * Misc/WebNSPasteboardExtras.mm: Ditto.
+ * Plugins/WebNullPluginView.mm: Ditto.
+ * Plugins/WebPluginController.mm: Ditto.
+ * WebCoreSupport/WebChromeClient.mm: Ditto.
+ * WebCoreSupport/WebInspectorClient.mm: Ditto.
+ * WebCoreSupport/WebPasteboardHelper.mm: Ditto.
+ * WebView/WebHTMLView.mm: Ditto.
+
+ * WebCoreSupport/WebEditorClient.mm: Made kit function have internal linkage
+ since it's only used in this file. Someone had instead added a declaration to
+ suppress the warning you would otherwise get. Removed the core function.
+ (WebEditorClient::textFieldDidBeginEditing): Added correct type checking.
+ Previously the function would check only that something was an HTMLElement,
+ but then cast it to HTMLInputElement. Also call kit instead of old wrap method.
+ (WebEditorClient::textFieldDidEndEditing): Ditto.
+ (WebEditorClient::textDidChangeInTextField): Ditto.
+ (WebEditorClient::doTextFieldCommandFromEvent): Ditto.
+ (WebEditorClient::textWillBeDeletedInTextField): Ditto.
+ (WebEditorClient::textDidChangeInTextArea): Ditto, but for HTMLTextAreaElement.
+
+ * WebView/WebFrame.mm: Removed the core and kit functions here which are no longer
+ needed since they're automatically generated now.
+ (-[WebFrame _nodesFromList:]): Use kit.
+ (-[WebFrame _markupStringFromRange:nodes:]): Use core.
+ (-[WebFrame _stringForRange:]): More of the same.
+ (-[WebFrame _caretRectAtNode:offset:affinity:]): Ditto.
+ (-[WebFrame _firstRectForDOMRange:]): Ditto.
+ (-[WebFrame _scrollDOMRangeToVisible:]): Ditto.
+ (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
+ Ditto.
+ (-[WebFrame _convertNSRangeToDOMRange:]): Ditto.
+ (-[WebFrame _convertDOMRangeToNSRange:]): Ditto.
+ (-[WebFrame _markDOMRange]): Ditto.
+ (-[WebFrame _smartDeleteRangeForProposedRange:]): Ditto.
+ (-[WebFrame _smartInsertForString:replacingRange:beforeString:afterString:]): Ditto.
+ (-[WebFrame _documentFragmentWithMarkupString:baseURLString:]): Ditto.
+ (-[WebFrame _documentFragmentWithNodesAsParagraphs:]): Ditto.
+ (-[WebFrame _replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]): Ditto.
+ (-[WebFrame _characterRangeAtPoint:]): Ditto.
+ (-[WebFrame _typingStyle]): Ditto.
+ (-[WebFrame _setTypingStyle:withUndoAction:]): Ditto.
+ (-[WebFrame _pauseAnimation:onNode:atTime:]): Ditto.
+ (-[WebFrame _pauseTransitionOfProperty:onNode:atTime:]): Ditto.
+ (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]): Ditto.
+
+ * WebView/WebFrameInternal.h: Removed the core and kit functions here which are no longer
+ needed since they're automatically generated now.
+
+ * WebView/WebHTMLRepresentation.mm:
+ (-[WebHTMLRepresentation attributedStringFrom:startOffset:to:endOffset:]): Use core.
+ (formElementFromDOMElement): Ditto.
+ (inputElementFromDOMElement): Ditto.
+ * WebView/WebTextIterator.mm:
+ (-[WebTextIterator initWithRange:]): Ditto.
+ (-[WebTextIterator currentRange]): Ditto.
+ (-[WebTextIterator currentNode]): Ditto.
+ * WebView/WebView.mm:
+ (-[WebView textIteratorForRect:]): Ditto.
+ (-[WebView setSelectedDOMRange:affinity:]): Ditto.
+
+2009-04-17 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ WebKit side of <rdar://problem/6449642>.
+
+ * Plugins/Hosted/HostedNetscapePluginStream.h:
+ (WebKit::HostedNetscapePluginStream::create):
+ New function that creates a stream from a frame loader.
+
+ * Plugins/Hosted/HostedNetscapePluginStream.mm:
+ (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream):
+ Add the constructor that takes a frame loader.
+
+ * Plugins/Hosted/NetscapePluginHostManager.h:
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::instantiatePlugin):
+ Pass "fullFrame" to the plug-in host.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCCancelLoadURL):
+ Call NetscapePluginInstanceProxy::cancelStreamLoad.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ (WebKit::NetscapePluginInstanceProxy::create):
+ Pass "fullFrame" to the constructor.
+
+ (WebKit::NetscapePluginInstanceProxy::manualStream):
+ New getter for the manual stream.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
+ Take the implicit request into account if we have a full frame plug-in.
+
+ (WebKit::NetscapePluginInstanceProxy::setManualStream):
+ Setter for the manual stream.
+
+ (WebKit::NetscapePluginInstanceProxy::cancelStreamLoad):
+ Cancel the manual stream if necessary.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.h:
+ WebHostedNetscapePluginView now conforms to the WebPluginManualLoader protocol.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView createPlugin]):
+ Pass "fullFrame" to instantiatePlugin.
+
+ (-[WebHostedNetscapePluginView pluginView:receivedResponse:]):
+ (-[WebHostedNetscapePluginView pluginView:receivedData:]):
+ (-[WebHostedNetscapePluginView pluginView:receivedError:]):
+ (-[WebHostedNetscapePluginView pluginViewFinishedLoading:]):
+ Call the equivalent manual stream functions.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createPlugin):
+ Use a macro for getting the plug-in view type.
+
+2009-04-14 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein
+
+ https://bugs.webkit.org/show_bug.cgi?id=25157
+
+ Move the run loop observer cleanup from -close
+ to -_close.
+
+ * WebView/WebView.mm:
+ (-[WebView _close]):
+ (-[WebView close]):
+
+2009-04-14 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ - Speculative fix for <rdar://problem/6781422>
+
+ Protect the plug-in instance proxy in case it's deleted while waiting for a reply.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::wheelEvent):
+
+2009-04-14 Adele Peterson <adele@apple.com>
+
+ Reviewed by Darin.
+
+ Initialize WebKitSystemInterface in class methods that could get called before a WebView/WebFrame is set up. This was causing Mail to crash on launch.
+
+ * Misc/WebCache.mm: (+[WebCache initialize]):
+ * WebView/WebView.mm: (+[WebView initialize]):
+
+2009-04-13 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Darin.
+
+ <rdar://problem/6784955> REGRESSION: closing a tab containing a PDF causes world leaks
+
+ Simplify the _trackFirstResponder method by just caching the value instead of retaining
+ a Cocoa object.
+
+ * WebView/WebPDFView.h: Eliminated trackedFirstResponder object and replaced it with
+ a firstResponderIsPDFDocumentView boolean.
+ * WebView/WebPDFView.mm:
+ (-[WebPDFView dealloc]): Removed no longer necessary ASSERT.
+ (-[WebPDFView viewWillMoveToWindow:]): Removed call to release and nil-out trackedFirstResponder,
+ which no longer exists. In the new code all we do now is set firstResponderIsPDFDocumentView to NO.
+ (-[WebPDFView _trackFirstResponder]): Rewrote this method to just cache the value instead
+ of retaining an object.
+
+2009-04-13 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=25125. Rework scrolling so that a layout happens first when
+ it's already needed so that the code doesn't end up making bad decisions based off invalid document sizes.
+
+ This patch also eliminates WebHTMLView's separate notion of needing a layout and just consolidates it with
+ WebCore's notion of needing layout.
+
+ * WebView/WebDynamicScrollBarsView.m:
+ (-[WebDynamicScrollBarsView updateScrollers]):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _frameOrBoundsChanged]):
+ (-[WebHTMLView initWithFrame:]):
+ (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
+ (-[WebHTMLView setNeedsLayout:]):
+ (-[WebHTMLView _layoutIfNeeded]):
+ (-[WebHTMLView _needsLayout]):
+ * WebView/WebHTMLViewInternal.h:
+
+2009-04-13 Darin Adler <darin@apple.com>
+
+ * WebView/WebViewPrivate.h: Updated comments.
+
+2009-04-13 Antti Koivisto <antti@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6740294> Increase the connection count per host
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface):
+
+2009-04-13 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Tim Hatcher
+
+ Tweak my last check-in, moving the thread violation check up to the API-level calls so the logging is more
+ useful to developers/users.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]): If not on the main thread, only
+ perform the "call on main thead" workaround, as the log/exception raising is now up at the API level.
+ (-[WebFrame loadData:MIMEType:textEncodingName:baseURL:]): Perform a thread violation check here so logging
+ is more meaningful.
+ (-[WebFrame loadHTMLString:baseURL:]): Ditto.
+ (-[WebFrame loadAlternateHTMLString:baseURL:forUnreachableURL:]): Ditto.
+
+2009-04-13 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Kevin Decker
+
+ <rdar://problem/6712063> Garmin WebUpdater crashes
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]): If not called on the main thread,
+ add a ThreadViolationCheckRoundTwo() call to either log or raise an exception. In the case where it's
+ only a log, reschedule the _loadData call to occur on the main thread.
+
+2009-04-10 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ - fix <rdar://problem/6752340> Light blue-green background in content
+ area in Mail
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+ Use device white, rather than calibrated white, as the default
+ background color.
+
+2009-04-10 Darin Adler <darin@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ <rdar://problem/6773515> crash in push_heap inside WebCore when printing
+
+ The crash was due to manipulating a timer on a different thread than the one it was created on.
+
+ * History/WebHistoryItem.mm:
+ (-[WebWindowWatcher windowWillClose:]): Call later on main thread, if called on non-main thread.
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView windowDidBecomeKey:]): Ditto.
+ (-[WebHTMLView windowDidResignKey:]): Ditto.
+ (-[WebHTMLView windowWillClose:]): Ditto.
+ (-[WebHTMLView _updateControlTints]): Added. Factored out the non-thread-safe part of
+ our override of _windowChangedKeyState.
+ (-[WebHTMLView _windowChangedKeyState]): Call _updateControlTints later on main thread, if
+ called on non-main thread.
+ * WebView/WebPreferences.mm:
+ (-[WebPreferences _postPreferencesChangesNotification]): Call later on main thread, if called
+ on non-main thread
+
+2009-04-10 Timothy Hatcher <timothy@apple.com>
+
+ Remove DOMDocumentPrivate.h now that <rdar://problem/6730996> is fixed.
+
+ Rubber-stamped by Mark Rowe.
+
+ * Misc/DOMDocumentPrivate.h: Removed.
+
+2009-04-10 Pierre d'Herbemont <pdherbemont@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ <rdar://problem/6646998> Avoid starting QTKitServer if possible
+ Add the requires symbol in the WebSystemInterface. It is used by
+ WebCore.
+
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface): Add wkQTIncludeOnlyModernMediaFileTypes.
+
+2009-04-09 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Hyatt.
+
+ <rdar://problem/4680397> tearing seen because deferred updates are disabled
+
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView initWithFrame:]): Don't call WKDisableCGDeferredUpdates on post-Leopard if
+ NSAppKitVersionNumberWithDeferredWindowDisplaySupport is defined.
+
+2009-04-09 John Sullivan <sullivan@apple.com>
+
+ <rdar://problem/6775682> WebKit's support for SnowLeopard sudden termination for
+ downloads is broken and should be removed
+
+ Reviewed by Darin Adler
+
+ * Misc/WebDownload.m:
+ (-[WebDownloadInternal downloadDidBegin:]):
+ remove disableSuddenTermination call
+ (-[WebDownloadInternal downloadDidFinish:]):
+ remove enableSuddenTermination call
+ (-[WebDownloadInternal download:didFailWithError:]):
+ remove enableSuddenTermination call
+
+2009-04-09 Darin Adler <darin@apple.com>
+
+ Reviewed by Anders Carlsson and Sam Weinig.
+
+ Part of <rdar://problem/5438063> Saving history containing 100,000 entries causes pauses of 2s while browsing
+
+ Longer term solution is to change the design so Safari doesn't read and write all of history.
+ This patch is step one: Do the serializing, which is done on the main thread, much faster.
+
+ * History/WebHistory.mm:
+ (-[WebHistoryPrivate data]): Added. Returns the NSData object containing serialized history.
+ For creating new SPI so you can get the data in memory instead of on disk. Uses WebHistoryWriter.
+ (-[WebHistoryPrivate saveToURL:error:]): Changed to call [self data
+ (-[WebHistory _data]): Added.
+ (WebHistoryWriter::WebHistoryWriter): Added.
+ (WebHistoryWriter::writeHistoryItems): Added.
+
+ * History/WebHistoryPrivate.h: Added a new _data method.
+
+2009-04-09 Mike Thole <mthole@apple.com>
+
+ Rubber-stamped by Mark Rowe.
+
+ Fix 64-bit build
+
+ * Panels/WebAuthenticationPanel.h:
+ Declare the 'separateRealmLabel' IBOutlet as an NSTextField instead of 'id'.
+ This fixes a duplicate method warning (setAutoresizingMask: on NSView and CALayer)
+
+2009-04-09 Mike Thole <mthole@apple.com>
+
+ Reviewed by Ada Chan.
+
+ <rdar://problem/5697111> Basic authentication dialog spoofing vulnerability
+
+ * Panels/WebAuthenticationPanel.h:
+ Added IBOutlet for separateRealmLabel
+ * Panels/WebAuthenticationPanel.m:
+ (-[WebAuthenticationPanel setUpForChallenge:]):
+ In the realm case, decide if it is a simple or complex realm name. A realm name
+ is considered complex if it has any whitespace or newline characters. Present
+ alternative text and layout for the complex case, where the realm name isn't inline
+ with the rest of the sheet's text.
+
+ * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib:
+ * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
+ Updated the nib with a new 'separateRealmLabel' outlet.
+ Updated the File's Owner to correctly be WebAuthenticationPanel.
+ Fixed springs on the sheet's icon to keep it from moving during a resize.
+
+2009-04-09 David Kilzer <ddkilzer@apple.com>
+
+ Reinstating <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings
+
+ Rolled r42345 back in. The build failure was caused by an
+ internal script which had not been updated the same way that
+ build-webkit was updated.
+
+ * Configurations/WebKit.xcconfig:
+ * DOM/WebDOMOperations.mm:
+ * MigrateHeaders.make:
+
+2009-04-09 Alexey Proskuryakov <ap@webkit.org>
+
+ Reverting <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings.
+ It broke Mac build, and I don't know how to fix it.
+
+ * Configurations/WebKit.xcconfig:
+ * DOM/WebDOMOperations.mm:
+ * MigrateHeaders.make:
+
+2009-04-08 David Kilzer <ddkilzer@apple.com>
+
+ <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings
+
+ Reviewed by Darin Adler and Maciej Stachowiak.
+
+ Introduce the ENABLE_SVG_DOM_OBJC_BINDINGS feature define so
+ that SVG DOM Objective-C bindings may be optionally disabled.
+
+ * Configurations/WebKit.xcconfig: Added
+ ENABLE_SVG_DOM_OBJC_BINDINGS variable and use it in
+ FEATURE_DEFINES.
+ * DOM/WebDOMOperations.mm: Removed unused header.
+ * MigrateHeaders.make: Switched from using ENABLE_SVG to using
+ ENABLE_SVG_DOM_OBJC_BINDINGS.
+
+2009-04-08 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben and Darin Adler
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=12440, fixed positioned elements end up in
+ inconsistent positions. Rewrite updateScrollers to improve the correctness.
+
+ * WebView/WebDynamicScrollBarsView.h:
+ * WebView/WebDynamicScrollBarsView.m:
+ (-[WebDynamicScrollBarsView updateScrollers]):
+
+2009-04-07 Anders Carlsson <andersca@apple.com>
+
+ Fix Tiger build for real this time.
+
+ * Plugins/WebNetscapePluginView.h:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView getVariable:forURL:value:length:]):
+ (-[WebNetscapePluginView setVariable:forURL:value:length:]):
+ (-[WebNetscapePluginView getAuthenticationInfoWithProtocol:host:port:scheme:realm:username:usernameLength:password:passwordLength:]):
+ * Plugins/npapi.mm:
+ (NPN_GetValueForURL):
+ (NPN_SetValueForURL):
+
+2009-04-07 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben
+
+ Mac portion of fix to make DumpRenderTree always produce accurate scrollbar results. Change
+ updateScrollers to call minimumContentsSize when a WebHTMLView is inside the WebDynamicScrollbarsView.
+
+ * WebView/WebDynamicScrollBarsView.m:
+ (-[WebDynamicScrollBarsView updateScrollers]):
+
+2009-04-07 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Anders Carlsson.
+
+ Trying to fix Tiger build.
+
+ * Plugins/WebNetscapePluginView.h:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView getAuthenticationInfoWithProtocol:host:port:scheme:realm:username:usernameLength:password:passwordLength:]):
+
+2009-04-07 Anders Carlsson <andersca@apple.com>
+
+ Try to fix the Leopard build once more.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView getVariable:forURL:value:length:]):
+
+2009-04-07 Anders Carlsson <andersca@apple.com>
+
+ ...and try to fix the Leopard build.
+
+ * Plugins/npapi.mm:
+ (NPN_GetAuthenticationInfo):
+
+2009-04-07 Anders Carlsson <andersca@apple.com>
+
+ Try to fix the Tiger build.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+
+2009-04-07 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/6667001>
+ NPAPI: need NPN_Get/SetValueForURL() and NPN_GetAuthenticationInfo()
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WKPCGetCookies):
+ (WKPCGetProxy):
+ (WKPCSetCookies):
+ (WKPCGetAuthenticationInfo):
+ New MIG functions to be used by the plug-in host.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::getCookies):
+ (WebKit::NetscapePluginInstanceProxy::setCookies):
+ (WebKit::NetscapePluginInstanceProxy::getProxy):
+ (WebKit::NetscapePluginInstanceProxy::getAuthenticationInfo):
+ Implement these.
+
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ Add callbacks.
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView URLWithCString:]):
+ Factor this out of URLWithCString.
+
+ (-[WebBaseNetscapePluginView requestWithURLCString:]):
+ Call URLWithCString.
+
+ (WebKit::proxiesForURL):
+ Return a string representation of proxies for a given URL.
+
+ (WebKit::getAuthenticationInfo):
+ Get the authentication info for a given host/protocol/scheme/realm/port combination.
+
+ * Plugins/WebNetscapePluginPackage.mm:
+ (-[WebNetscapePluginPackage _tryLoad]):
+ Initialize the new vtable functions.
+
+ * Plugins/WebNetscapePluginView.h:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView getVariable:forURL:value:length:]):
+ (-[WebNetscapePluginView setVariable:forURL:value:length:]):
+ (-[WebNetscapePluginView getAuthenticationInfoWithProtocol:host:port:scheme:realm:username:usernameLength:password:passwordLength:]):
+ Implement these.
+
+ * Plugins/npapi.mm:
+ (NPN_GetValueForURL):
+ (NPN_SetValueForURL):
+ (NPN_GetAuthenticationInfo):
+ Call the plug-in view functions.
+
+2009-04-03 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ <rdar://problem/6756512>
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::spawnPluginHost): Tweaked the visibleName property.
+
+2009-04-03 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Ada Chan
+
+ <rdar://problem/6755838> Removing all icons can delete other items from disk.
+
+ * Misc/WebIconDatabase.mm:
+ (importToWebCoreFormat):
+ When snooping around in various directories looking for a directory full of Safari-2-style
+ icon database information to convert and delete, bail out without doing the delete part if
+ we didn't actually find any Safari-2-style icon database information.
+
+2009-04-03 John Sullivan <sullivan@apple.com>
+
+ fixed <rdar://problem/6355573> [WebView _setCacheModel:] leaks the result of _CFURLCacheCopyCacheDirectory
+
+ Reviewed by Adam Roben
+
+ * WebView/WebView.mm:
+ (+[WebView _setCacheModel:]):
+ use WebCFAutorelease rather than autorelease on result of method that returns CFStringRef
+
+2009-04-03 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by David Hyatt.
+
+ Fixed https://bugs.webkit.org/show_bug.cgi?id=24941
+
+ This fix essentially does a -viewWillDraw call for layout. It adds
+ a CFRunLoopObserver which performs layout just before drawing on the
+ Mac platform. This makes sure layout is complete before rendering and
+ avoids a flash.
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::attachRootGraphicsLayer):
+ (WebChromeClient::setNeedsOneShotDrawingSynchronization):
+ (WebChromeClient::scheduleViewUpdate):
+ * WebView/WebView.mm:
+ (-[WebViewPrivate _clearViewUpdateRunLoopObserver]):
+ (-[WebView _viewWillDrawInternal]):
+ (-[WebView viewWillDraw]):
+ (-[WebView close]):
+ (viewUpdateRunLoopObserverCallBack):
+ (-[WebView _scheduleViewUpdate]):
+ * WebView/WebViewInternal.h:
+
+2009-04-03 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ WebKit side of <rdar://problem/6752953>.
+
+ Pass the clip rect to the plug-in host.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::resize):
+ * Plugins/Hosted/WebKitPluginHost.defs:
+
+2009-04-02 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Dan Bernstein and Timothy Hatcher.
+
+ <rdar://problem/6684745> Crash in -[WebView removeSizeObservers] when loading NIB file
+
+ The implementation of -[NSView initWithCoder:] can result in -viewWillMoveToSuperview:/-viewDidMoveToSuperview: being sent to
+ our view before we've had a chance to initialize _private, so we need to ensure it is non-nil before dereferencing it in those
+ methods.
+
+ * WebView/WebView.mm:
+ (-[WebView removeSizeObservers]): Nil-check _private before dereferencing it.
+ (-[WebView addSizeObservers]): Ditto.
+
+2009-04-02 Adele Peterson <adele@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Add a way to get a list of focusable nodes.
+
+ * DOM/WebDOMOperations.mm:
+ (-[DOMDocument _focusableNodes]):
+ * DOM/WebDOMOperationsInternal.h: Added.
+ * DOM/WebDOMOperationsPrivate.h: Make this a private header.
+ Move old methods to WebDOMOperationsInternal.h
+ * WebView/WebHTMLView.mm: Use methods from WebDOMOperationsInternal.h
+
+2009-04-01 Darin Adler <darin@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ Bug 22378: Crash submitting a form when parsing an XHTML document
+ https://bugs.webkit.org/show_bug.cgi?id=22378
+ rdar://problem/6388377
+
+ * History/WebHistoryItem.mm:
+ (-[WebHistoryItem targetItem]): Call targetItem directly instead of callling
+ isTargetItem, hasChildren, and recurseToFindTargetItem.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::dispatchWillSubmitForm): Updated for the new
+ textFieldValues function in FormState.
+
+ * WebView/WebPDFView.mm:
+ (-[WebPDFView PDFViewWillClickOnLink:withURL:]): Updated for name and
+ argument change of loadFrameRequest.
+
+2009-04-01 Greg Bolsinga <bolsinga@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24990
+ Put SECTORDER_FLAGS into xcconfig files.
+
+ * Configurations/Base.xcconfig:
+ * Configurations/DebugRelease.xcconfig:
+
+2009-03-31 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam Roben.
+
+ WebKit side of <rdar://problem/6500266>.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::wheelEvent):
+ Send the event.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView scrollWheel:]):
+ Call NetscapePluginInstanceProxy::wheelEvent. If the plug-in processed the event, don't
+ call super.
+
+ * Plugins/Hosted/WebKitPluginHost.defs:
+ Add definition.
+
+2009-03-31 Darin Adler <darin@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ <rdar://problem/6740581> REGRESSION (r41793): Page Down and Page Up don’t work in Leopard Mail
+
+ * WebView/WebHTMLView.mm:
+ (-[WebResponderChainSink tryToPerform:with:]): Added. Without this we would think we had
+ handled an event when we actually hadn't. Specifically, when -[WebFrameView scrollPageDown:]
+ calls tryToPerform on the next responder.
+
+2009-03-30 Greg Bolsinga <bolsinga@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24938
+
+ Build fixes when building --no-svg
+
+ DOMHTMLFrameElementPrivate.h and DOMHTMLIFrameElementPrivate.h are only available with ENABLE_SVG.
+
+ * MigrateHeaders.make:
+
+2009-03-29 Darin Adler <darin@apple.com>
+
+ Reviewed by Cameron Zwarich.
+
+ * Plugins/WebNullPluginView.mm: Added now-needed includes.
+ * WebView/WebHTMLRepresentation.mm: Ditto.
+ * WebView/WebHTMLView.mm: Ditto.
+
+2009-03-27 Timothy Hatcher <timothy@apple.com>
+
+ * MigrateHeaders.make: Remove DOMHTMLBodyElementPrivate.h since it
+ is not generated anymore.
+
+2009-03-27 Adam Roben <aroben@apple.com>
+
+ Don't include substitute data URLs in global history redirect chains
+
+ <rdar://6690169>
+
+ Reviewed by Darin Adler.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::updateGlobalHistory): Don't call
+ updateGlobalHistoryRedirectLinks. FrameLoader calls this for us now.
+ (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
+ Added an assertion to help catch cases where we might be adding a
+ substitute data URL into a redirect chain.
+
+2009-03-27 Darin Adler <darin@apple.com>
+
+ Reviewed by Adam Roben.
+
+ <rdar://problem/6541923> REGRESSION (r38629): Tab cycle in empty tab is broken
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _wantsKeyDownForEvent:]): Only return YES when we have a Frame.
+
+2009-03-27 Darin Adler <darin@apple.com>
+
+ Reviewed by John Sullivan and Anders Carlsson.
+
+ <rdar://problem/5987442> Pasteboard not exposed to WebEditingDelegate for WebViewInsertActionPasted (needed for system services)
+
+ Added SPI to tell which pasteboard is currently being inserted.
+ I chose to put it on WebView to be forward-looking since we're migrating things
+ from WebHTMLView to WebView in the future.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): Add calls to _setInsertionPasteboard.
+ (-[WebHTMLView _pasteAsPlainTextWithPasteboard:]): Ditto.
+ * WebView/WebView.mm:
+ (-[WebViewPrivate dealloc]): Assert the pasteboard is nil.
+ (-[WebViewPrivate finalize]): Ditto.
+ (-[WebView _insertionPasteboard]): Return the pastebaord.
+ (-[WebView _setInsertionPasteboard:]): Set the pasteboard.
+ * WebView/WebViewInternal.h: Added _setInsertionPasteboard.
+ * WebView/WebViewPrivate.h: Added _insertionPasteboard.
+
+2009-03-25 Timothy Hatcher <timothy@apple.com>
+
+ Expose new DOM methods as public Objective-C API.
+
+ <rdar://problem/5837350> Expose new DOM classes and methods
+ as public API (match the additions to the JavaScript DOM)
+
+ Reviewed by Mark Rowe and Darin Adler.
+
+ * MigrateHeaders.make:
+ * Misc/DOMDocumentPrivate.h: Added. Forwarding header for
+ <rdar://problem/6730996>.
+
2009-03-26 Jungshik Shin <jshin@chromium.org>
Reviewed by Alexey Proskuryakov.
diff --git a/WebKit/mac/ChangeLog-2007-10-14 b/WebKit/mac/ChangeLog-2007-10-14
index ccf939d..3a5c4b5 100644
--- a/WebKit/mac/ChangeLog-2007-10-14
+++ b/WebKit/mac/ChangeLog-2007-10-14
@@ -8810,7 +8810,7 @@
(WebFrameLoaderClient::dispatchDidReceiveResponse):
(WebFrameLoaderClient::incrementProgress):
-2007-01-04 Don Gibson <dgibson77@gmail.com>
+2007-01-04 Peter Kasting <pkasting@google.com>
Reviewed by Alexey.
@@ -9937,7 +9937,7 @@
* WebView/WebUnarchivingState.m:
(-[WebUnarchivingState archivedResourceForURL:]):
-2006-12-08 Don Gibson <dgibson77@gmail.com>
+2006-12-08 Peter Kasting <pkasting@google.com>
Reviewed and landed by Alexey.
@@ -10135,7 +10135,7 @@
* WebView/WebView.mm: (-[WebView selectedFrame]): Removed extra return statement.
-2006-12-04 Don Gibson <dgibson77@gmail.com>
+2006-12-04 Peter Kasting <pkasting@google.com>
Reviewed and landed by Alexey.
@@ -10196,7 +10196,7 @@
* WebKit.xcodeproj/project.pbxproj: Xcode wants what it wants.
-2006-12-01 Don Gibson <dgibson77@gmail.com>
+2006-12-01 Peter Kasting <pkasting@google.com>
Reviewed by Mitz.
@@ -10517,7 +10517,7 @@
* WebView/WebHTMLViewInternal.h: Add _lookUpInDictionaryFromMenu
* WebView/WebViewInternal.h: Add _searchWithSpotlightFromMenu
-2006-11-18 Don Gibson <dgibson77@gmail.com>
+2006-11-18 Peter Kasting <pkasting@google.com>
Reviewed by Sam Weinig.
@@ -10541,7 +10541,7 @@
(+[WebView initialize]):
(-[WebView setPreferences:]):
-2006-11-16 Don Gibson <dgibson77@gmail.com>
+2006-11-16 Peter Kasting <pkasting@google.com>
Reviewed and landed by ap.
@@ -14851,7 +14851,7 @@
(-[WebFrameLoader loadDataSource:withLoadType:formState:]): Added a local variable to avoid
calling _documentLoadState over and over again.
-2006-10-07 Don Gibson <dgibson77@gmail.com>
+2006-10-07 Peter Kasting <pkasting@google.com>
Reviewed/landed by Adam.
@@ -15245,7 +15245,7 @@
(WebFrame::loadDataSource):
(WebFrame::receivedResponse):
-2006-10-05 Don Gibson <dgibson77@gmail.com>
+2006-10-05 Peter Kasting <pkasting@google.com>
Reviewed by Darin, landed by Adam.
diff --git a/WebKit/mac/Configurations/Base.xcconfig b/WebKit/mac/Configurations/Base.xcconfig
index 8ed667f..eb16d36 100644
--- a/WebKit/mac/Configurations/Base.xcconfig
+++ b/WebKit/mac/Configurations/Base.xcconfig
@@ -1,3 +1,26 @@
+// 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.
+
DEBUG_INFORMATION_FORMAT = dwarf;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DEBUGGING_SYMBOLS = default;
@@ -8,6 +31,7 @@ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_ENABLE_OBJC_GC = supported;
GCC_ENABLE_SYMBOL_SEPARATION = NO;
GCC_FAST_OBJC_DISPATCH = YES;
+GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_MODEL_TUNING = G5;
GCC_OBJC_CALL_CXX_CDTORS = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
@@ -48,22 +72,12 @@ STRIP_INSTALLED_PRODUCT_debug = NO;
// building the MiG bindings for WebKitPluginClient even when the functions that the bindings wrap are not built.
DEAD_CODE_STRIPPING = YES;
+SECTORDER_FLAGS = -sectorder __TEXT __text mac/WebKit.order;
-GCC_VERSION = $(GCC_VERSION_$(XCODE_VERSION_ACTUAL));
+// Use GCC 4.2 with Xcode 3.1, which includes GCC 4.2 but defaults to GCC 4.0.
+// 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;
-
-
-// <rdar://problem/5488678>: Production builds on 10.4 PowerPC need to have debugging symbols disabled to prevent a huge STABS section being generated.
-// Xcode on 10.4 does not define MAC_OS_X_VERSION_MAJOR, so the default Mac OS X version is treated as 10.4.
-GCC_GENERATE_DEBUGGING_SYMBOLS = $(GCC_GENERATE_DEBUGGING_SYMBOLS_$(CURRENT_ARCH));
-GCC_GENERATE_DEBUGGING_SYMBOLS_i386 = YES;
-GCC_GENERATE_DEBUGGING_SYMBOLS_x86_64 = YES;
-GCC_GENERATE_DEBUGGING_SYMBOLS_ppc64 = YES;
-GCC_GENERATE_DEBUGGING_SYMBOLS_ppc = $(GCC_GENERATE_DEBUGGING_SYMBOLS_$(CURRENT_ARCH)_$(CONFIGURATION));
-GCC_GENERATE_DEBUGGING_SYMBOLS_ppc_Debug = YES;
-GCC_GENERATE_DEBUGGING_SYMBOLS_ppc_Release = YES;
-GCC_GENERATE_DEBUGGING_SYMBOLS_ppc_Production = $(GCC_GENERATE_DEBUGGING_SYMBOLS_$(CURRENT_ARCH)_$(CONFIGURATION)_$(MAC_OS_X_VERSION_MAJOR));
-GCC_GENERATE_DEBUGGING_SYMBOLS_ppc_Production_ = NO;
-GCC_GENERATE_DEBUGGING_SYMBOLS_ppc_Production_1040 = NO;
-GCC_GENERATE_DEBUGGING_SYMBOLS_ppc_Production_1050 = YES;
-GCC_GENERATE_DEBUGGING_SYMBOLS_ppc_Production_1060 = YES;
diff --git a/WebKit/mac/Configurations/DebugRelease.xcconfig b/WebKit/mac/Configurations/DebugRelease.xcconfig
index fab0906..50071e7 100644
--- a/WebKit/mac/Configurations/DebugRelease.xcconfig
+++ b/WebKit/mac/Configurations/DebugRelease.xcconfig
@@ -1,3 +1,26 @@
+// 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.
+
#include "Base.xcconfig"
ARCHS = $(ARCHS_$(MAC_OS_X_VERSION_MAJOR));
@@ -16,8 +39,10 @@ MACOSX_DEPLOYMENT_TARGET_1060 = 10.6;
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 = WebKitSystemInterfaceLeopard;
+WEBKIT_SYSTEM_INTERFACE_LIBRARY_1060 = WebKitSystemInterfaceSnowLeopard;
diff --git a/WebKit/mac/Configurations/FeatureDefines.xcconfig b/WebKit/mac/Configurations/FeatureDefines.xcconfig
new file mode 100644
index 0000000..63c8190
--- /dev/null
+++ b/WebKit/mac/Configurations/FeatureDefines.xcconfig
@@ -0,0 +1,62 @@
+// Copyright (C) 2009 Apple Inc. All rights reserved.
+// Copyright (C) 2009 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:
+// 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.
+
+// The contents of this file must be kept in sync with FeatureDefines.xcconfig in JavaScriptCore,
+// WebCore and WebKit. Also the default values of the ENABLE_FEATURE_NAME macros in build-webkit
+// should match the values below, but they do not need to be in the same order.
+
+// Set any ENABLE_FEATURE_NAME macro to an empty string to disable that feature.
+
+ENABLE_3D_CANVAS = ENABLE_3D_CANVAS;
+
+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_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING;
+ENABLE_DATABASE = ENABLE_DATABASE;
+ENABLE_DATAGRID = ENABLE_DATAGRID;
+ENABLE_DOM_STORAGE = ENABLE_DOM_STORAGE;
+ENABLE_FILTERS = ;
+ENABLE_GEOLOCATION = ;
+ENABLE_ICONDATABASE = ENABLE_ICONDATABASE;
+ENABLE_JAVASCRIPT_DEBUGGER = ENABLE_JAVASCRIPT_DEBUGGER;
+ENABLE_OFFLINE_WEB_APPLICATIONS = ENABLE_OFFLINE_WEB_APPLICATIONS;
+ENABLE_RUBY = ENABLE_RUBY;
+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_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_WML = ;
+ENABLE_WORKERS = ENABLE_WORKERS;
+ENABLE_XPATH = ENABLE_XPATH;
+ENABLE_XSLT = ENABLE_XSLT;
+
+FEATURE_DEFINES = $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DOM_STORAGE) $(ENABLE_FILTERS) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER) $(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_XPATH) $(ENABLE_XSLT);
diff --git a/WebKit/mac/Configurations/Version.xcconfig b/WebKit/mac/Configurations/Version.xcconfig
index ab0aa9b..d07d57f 100644
--- a/WebKit/mac/Configurations/Version.xcconfig
+++ b/WebKit/mac/Configurations/Version.xcconfig
@@ -1,5 +1,28 @@
-MAJOR_VERSION = 530;
-MINOR_VERSION = 5;
+// 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.
+
+MAJOR_VERSION = 532;
+MINOR_VERSION = 0;
TINY_VERSION = 0;
FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION);
diff --git a/WebKit/mac/Configurations/WebKit.xcconfig b/WebKit/mac/Configurations/WebKit.xcconfig
index 12d47ea..b9dbc87 100644
--- a/WebKit/mac/Configurations/WebKit.xcconfig
+++ b/WebKit/mac/Configurations/WebKit.xcconfig
@@ -1,4 +1,29 @@
+// 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.
+
+#include "FeatureDefines.xcconfig"
#include "Version.xcconfig"
+
EXPORTED_SYMBOLS_FILE = $(EXPORTED_SYMBOLS_FILE_$(CURRENT_ARCH));
EXPORTED_SYMBOLS_FILE_ = mac/WebKit.exp;
EXPORTED_SYMBOLS_FILE_i386 = mac/WebKit.exp;
@@ -22,12 +47,3 @@ WEBCORE_PRIVATE_HEADERS_DIR_macosx_Release = $(WEBCORE_PRIVATE_HEADERS_engineeri
WEBCORE_PRIVATE_HEADERS_DIR_macosx_Debug = $(WEBCORE_PRIVATE_HEADERS_engineering);
WEBCORE_PRIVATE_HEADERS_DIR_macosx_Production = $(UMBRELLA_FRAMEWORKS_DIR)/WebCore.framework/PrivateHeaders;
WEBCORE_PRIVATE_HEADERS_engineering = $(BUILT_PRODUCTS_DIR)/WebCore.framework/PrivateHeaders;
-
-// This needs to be kept sorted, and in sync with FEATURE_DEFINES in JavaScriptCore.xcconfig, WebCore.xcconfig and
-// the default settings of build-webkit to prevent needless rebuilding when using both Xcode and build-webkit.
-FEATURE_DEFINES = $(FEATURE_DEFINES_$(MAC_OS_X_VERSION_MAJOR));
-FEATURE_DEFINES_BASE = ENABLE_DATABASE ENABLE_DOM_STORAGE ENABLE_ICONDATABASE ENABLE_OFFLINE_WEB_APPLICATIONS ENABLE_SVG ENABLE_SVG_ANIMATION ENABLE_SVG_AS_IMAGE ENABLE_SVG_FONTS ENABLE_SVG_FOREIGN_OBJECT ENABLE_SVG_USE ENABLE_VIDEO ENABLE_WORKERS ENABLE_XPATH ENABLE_XSLT;
-FEATURE_DEFINES_ = $(FEATURE_DEFINES_1040);
-FEATURE_DEFINES_1040 = $(FEATURE_DEFINES_BASE);
-FEATURE_DEFINES_1050 = $(FEATURE_DEFINES_BASE);
-FEATURE_DEFINES_1060 = $(FEATURE_DEFINES_BASE) ENABLE_GEOLOCATION;
diff --git a/WebKit/mac/DOM/WebDOMOperations.mm b/WebKit/mac/DOM/WebDOMOperations.mm
index 8f5fc03..2bda67a 100644
--- a/WebKit/mac/DOM/WebDOMOperations.mm
+++ b/WebKit/mac/DOM/WebDOMOperations.mm
@@ -28,6 +28,7 @@
#import "WebDOMOperationsPrivate.h"
+#import "DOMDocumentInternal.h"
#import "DOMNodeInternal.h"
#import "DOMRangeInternal.h"
#import "WebArchiveInternal.h"
@@ -43,32 +44,29 @@
#import <WebKit/DOMHTML.h>
#import <wtf/Assertions.h>
-#if ENABLE(SVG)
-#import <WebKit/DOMSVG.h>
-#endif
-
using namespace WebCore;
@implementation DOMNode (WebDOMNodeOperations)
- (WebArchive *)webArchive
{
- return [[[WebArchive alloc] _initWithCoreLegacyWebArchive:LegacyWebArchive::create([self _node])] autorelease];
+ return [[[WebArchive alloc] _initWithCoreLegacyWebArchive:LegacyWebArchive::create(core(self))] autorelease];
}
- (NSString *)markupString
{
- return createFullMarkup([self _node]);
+ return createFullMarkup(core(self));
}
@end
-@implementation DOMNode (WebDOMNodeOperationsPrivate)
+/* This doesn't appear to be used by anyone. We should consider removing this. */
+@implementation DOMNode (WebDOMNodeOperationsInternal)
- (NSArray *)_subresourceURLs
{
ListHashSet<KURL> urls;
- [self _node]->getSubresourceURLs(urls);
+ core(self)->getSubresourceURLs(urls);
if (!urls.size())
return nil;
@@ -95,14 +93,15 @@ using namespace WebCore;
- (NSURL *)URLWithAttributeString:(NSString *)string
{
- // FIXME: Is parseURL appropriate here?
- return core(self)->completeURL(parseURL(string));
+ // FIXME: Is deprecatedParseURL appropriate here?
+ return core(self)->completeURL(deprecatedParseURL(string));
}
@end
-@implementation DOMDocument (WebDOMDocumentOperationsPrivate)
+@implementation DOMDocument (WebDOMDocumentOperationsInternal)
+/* This doesn't appear to be used by anyone. We should consider removing this. */
- (DOMRange *)_createRangeWithNode:(DOMNode *)node
{
DOMRange *range = [self createRange];
@@ -117,16 +116,30 @@ using namespace WebCore;
@end
+@implementation DOMDocument (WebDOMDocumentOperationsPrivate)
+
+- (NSArray *)_focusableNodes
+{
+ Vector<RefPtr<Node> > nodes;
+ core(self)->getFocusableNodes(nodes);
+ NSMutableArray *array = [NSMutableArray arrayWithCapacity:nodes.size()];
+ for (unsigned i = 0; i < nodes.size(); ++i)
+ [array addObject:kit(nodes[i].get())];
+ return array;
+}
+
+@end
+
@implementation DOMRange (WebDOMRangeOperations)
- (WebArchive *)webArchive
{
- return [[[WebArchive alloc] _initWithCoreLegacyWebArchive:LegacyWebArchive::create([self _range])] autorelease];
+ return [[[WebArchive alloc] _initWithCoreLegacyWebArchive:LegacyWebArchive::create(core(self))] autorelease];
}
- (NSString *)markupString
{
- return createFullMarkup([self _range]);
+ return createFullMarkup(core(self));
}
@end
diff --git a/WebKit/mac/Misc/WebGraphicsExtras.h b/WebKit/mac/DOM/WebDOMOperationsInternal.h
index 9232303..c86817d 100644
--- a/WebKit/mac/Misc/WebGraphicsExtras.h
+++ b/WebKit/mac/DOM/WebDOMOperationsInternal.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
+ * 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
@@ -26,12 +26,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifdef __cplusplus
-extern "C" {
-#endif
+#import <WebKit/WebDOMOperations.h>
-unsigned WebConvertBGRAToARGB(unsigned char *offscreenBuffer, int rowBytes, int x, int y, int width, int height);
-
-#ifdef __cplusplus
-}
-#endif
+@interface DOMDocument (WebDOMDocumentOperationsInternal)
+- (DOMRange *)_documentRange;
+@end
diff --git a/WebKit/mac/DOM/WebDOMOperationsPrivate.h b/WebKit/mac/DOM/WebDOMOperationsPrivate.h
index 19b8a7d..013a687 100644
--- a/WebKit/mac/DOM/WebDOMOperationsPrivate.h
+++ b/WebKit/mac/DOM/WebDOMOperationsPrivate.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2008, 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
@@ -28,11 +28,10 @@
#import <WebKit/WebDOMOperations.h>
-@interface DOMNode (WebDOMNodeOperationsPrivate)
-- (NSArray *)_subresourceURLs;
+@interface DOMDocument (WebDOMDocumentOperationsPrivate)
+- (NSArray *)_focusableNodes;
@end
-@interface DOMDocument (WebDOMDocumentOperationsPrivate)
-- (DOMRange *)_createRangeWithNode:(DOMNode *)node;
-- (DOMRange *)_documentRange;
+@interface DOMNode (WebDOMNodeOperationsPendingPublic)
+- (NSString *)markupString;
@end
diff --git a/WebKit/mac/ForwardingHeaders/wtf/OwnPtrCommon.h b/WebKit/mac/ForwardingHeaders/wtf/OwnPtrCommon.h
new file mode 100644
index 0000000..efffb81
--- /dev/null
+++ b/WebKit/mac/ForwardingHeaders/wtf/OwnPtrCommon.h
@@ -0,0 +1 @@
+#import <JavaScriptCore/PassOwnPtr.h>
diff --git a/WebKit/mac/ForwardingHeaders/wtf/PassOwnPtr.h b/WebKit/mac/ForwardingHeaders/wtf/PassOwnPtr.h
new file mode 100644
index 0000000..efffb81
--- /dev/null
+++ b/WebKit/mac/ForwardingHeaders/wtf/PassOwnPtr.h
@@ -0,0 +1 @@
+#import <JavaScriptCore/PassOwnPtr.h>
diff --git a/WebKit/mac/ForwardingHeaders/wtf/VMTags.h b/WebKit/mac/ForwardingHeaders/wtf/VMTags.h
new file mode 100644
index 0000000..701e514
--- /dev/null
+++ b/WebKit/mac/ForwardingHeaders/wtf/VMTags.h
@@ -0,0 +1 @@
+#import <JavaScriptCore/VMTags.h>
diff --git a/WebKit/mac/History/WebBackForwardList.mm b/WebKit/mac/History/WebBackForwardList.mm
index 2f0c214..f206fda 100644
--- a/WebKit/mac/History/WebBackForwardList.mm
+++ b/WebKit/mac/History/WebBackForwardList.mm
@@ -33,6 +33,7 @@
#import "WebHistoryItemInternal.h"
#import "WebHistoryItemPrivate.h"
#import "WebKitLogging.h"
+#import "WebKitVersionChecks.h"
#import "WebNSObjectExtras.h"
#import "WebPreferencesPrivate.h"
#import "WebTypesInternal.h"
@@ -204,18 +205,42 @@ static NSArray* vectorToNSArray(HistoryItemVector& list)
return result;
}
+static bool bumperCarBackForwardHackNeeded()
+{
+ static bool hackNeeded = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.freeverse.bumpercar"] &&
+ !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_BUMPERCAR_BACK_FORWARD_QUIRK);
+
+ return hackNeeded;
+}
+
- (NSArray *)backListWithLimit:(int)limit
{
HistoryItemVector list;
core(self)->backListWithLimit(limit, list);
- return vectorToNSArray(list);
+ NSArray *result = vectorToNSArray(list);
+
+ if (bumperCarBackForwardHackNeeded()) {
+ static NSArray *lastBackListArray = nil;
+ [lastBackListArray release];
+ lastBackListArray = [result retain];
+ }
+
+ return result;
}
- (NSArray *)forwardListWithLimit:(int)limit
{
HistoryItemVector list;
core(self)->forwardListWithLimit(limit, list);
- return vectorToNSArray(list);
+ NSArray *result = vectorToNSArray(list);
+
+ if (bumperCarBackForwardHackNeeded()) {
+ static NSArray *lastForwardListArray = nil;
+ [lastForwardListArray release];
+ lastForwardListArray = [result retain];
+ }
+
+ return result;
}
- (int)capacity
diff --git a/WebKit/mac/History/WebHistory.mm b/WebKit/mac/History/WebHistory.mm
index 313378b..e971aba 100644
--- a/WebKit/mac/History/WebHistory.mm
+++ b/WebKit/mac/History/WebHistory.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2008, 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
@@ -33,9 +33,11 @@
#import "WebNSURLExtras.h"
#import "WebTypesInternal.h"
#import <WebCore/HistoryItem.h>
+#import <WebCore/HistoryPropertyList.h>
#import <WebCore/PageGroup.h>
using namespace WebCore;
+using namespace std;
typedef int64_t WebHistoryDateKey;
typedef HashMap<WebHistoryDateKey, RetainPtr<NSMutableArray> > DateToEntriesMap;
@@ -55,6 +57,17 @@ NSString *DatesArrayKey = @"WebHistoryDates";
#define currentFileVersion 1
+class WebHistoryWriter : public HistoryPropertyListWriter {
+public:
+ WebHistoryWriter(DateToEntriesMap*);
+
+private:
+ virtual void writeHistoryItems(BinaryPropertyListObjectStream&);
+
+ DateToEntriesMap* m_entriesByDate;
+ Vector<int> m_dateKeys;
+};
+
@interface WebHistoryPrivate : NSObject {
@private
NSMutableDictionary *_entriesByURL;
@@ -66,7 +79,7 @@ NSString *DatesArrayKey = @"WebHistoryDates";
int ageInDaysLimit;
}
-- (WebHistoryItem *)visitedURL:(NSURL *)url withTitle:(NSString *)title;
+- (WebHistoryItem *)visitedURL:(NSURL *)url withTitle:(NSString *)title increaseVisitCount:(BOOL)increaseVisitCount;
- (BOOL)addItem:(WebHistoryItem *)entry discardDuplicate:(BOOL)discardDuplicate;
- (void)addItems:(NSArray *)newEntries;
@@ -256,7 +269,7 @@ static WebHistoryDateKey timeIntervalForBeginningOfDay(NSTimeInterval interval)
}
}
-- (WebHistoryItem *)visitedURL:(NSURL *)url withTitle:(NSString *)title
+- (WebHistoryItem *)visitedURL:(NSURL *)url withTitle:(NSString *)title increaseVisitCount:(BOOL)increaseVisitCount
{
ASSERT(url);
ASSERT(title);
@@ -271,7 +284,7 @@ static WebHistoryDateKey timeIntervalForBeginningOfDay(NSTimeInterval interval)
BOOL itemWasInDateCaches = [self removeItemFromDateCaches:entry];
ASSERT_UNUSED(itemWasInDateCaches, itemWasInDateCaches);
- [entry _visitedWithTitle:title];
+ [entry _visitedWithTitle:title increaseVisitCount:increaseVisitCount];
} else {
LOG(History, "Adding new global history entry for %@", url);
entry = [[WebHistoryItem alloc] initWithURLString:URLString title:title lastVisitedTimeInterval:[NSDate timeIntervalSinceReferenceDate]];
@@ -382,7 +395,7 @@ static WebHistoryDateKey timeIntervalForBeginningOfDay(NSTimeInterval interval)
for (DateToEntriesMap::const_iterator it = _entriesByDate->begin(); it != end; ++it)
daysAsTimeIntervals.append(it->first);
- std::sort(daysAsTimeIntervals.begin(), daysAsTimeIntervals.end());
+ sort(daysAsTimeIntervals.begin(), daysAsTimeIntervals.end());
size_t count = daysAsTimeIntervals.size();
_orderedLastVisitedDays = [[NSMutableArray alloc] initWithCapacity:count];
for (int i = count - 1; i >= 0; i--) {
@@ -461,30 +474,6 @@ static WebHistoryDateKey timeIntervalForBeginningOfDay(NSTimeInterval interval)
hours:0 minutes:0 seconds:0];
}
-// Return a flat array of WebHistoryItems. Ignores the date and item count limits; these are
-// respected when loading instead of when saving, so that clients can learn of discarded items
-// by listening to WebHistoryItemsDiscardedWhileLoadingNotification.
-- (NSArray *)arrayRepresentation
-{
- NSMutableArray *arrayRep = [NSMutableArray array];
-
- Vector<int> dateKeys;
- dateKeys.reserveCapacity(_entriesByDate->size());
- DateToEntriesMap::const_iterator end = _entriesByDate->end();
- for (DateToEntriesMap::const_iterator it = _entriesByDate->begin(); it != end; ++it)
- dateKeys.append(it->first);
-
- std::sort(dateKeys.begin(), dateKeys.end());
- for (int dateIndex = dateKeys.size() - 1; dateIndex >= 0; dateIndex--) {
- NSArray *entries = _entriesByDate->get(dateKeys[dateIndex]).get();
- int entryCount = [entries count];
- for (int entryIndex = 0; entryIndex < entryCount; ++entryIndex)
- [arrayRep addObject:[[entries objectAtIndex:entryIndex] dictionaryRepresentation]];
- }
-
- return arrayRep;
-}
-
- (BOOL)loadHistoryGutsFromURL:(NSURL *)URL savedItemsCount:(int *)numberOfItemsLoaded collectDiscardedItemsInto:(NSMutableArray *)discardedItems error:(NSError **)error
{
*numberOfItemsLoaded = 0;
@@ -590,23 +579,18 @@ static WebHistoryDateKey timeIntervalForBeginningOfDay(NSTimeInterval interval)
return YES;
}
-- (BOOL)saveHistoryGuts:(int *)numberOfItemsSaved URL:(NSURL *)URL error:(NSError **)error
+- (NSData *)data
{
- *numberOfItemsSaved = 0;
-
- NSArray *array = [self arrayRepresentation];
- NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:
- array, DatesArrayKey,
- [NSNumber numberWithInt:currentFileVersion], FileVersionKey,
- nil];
- NSData *data = [NSPropertyListSerialization dataFromPropertyList:dictionary format:NSPropertyListBinaryFormat_v1_0 errorDescription:nil];
- if (![data writeToURL:URL options:0 error:error]) {
- LOG_ERROR("attempt to save %@ to %@ failed", dictionary, URL);
- return NO;
+ if (_entriesByDate->isEmpty()) {
+ static NSData *emptyHistoryData = (NSData *)CFDataCreate(0, 0, 0);
+ return emptyHistoryData;
}
-
- *numberOfItemsSaved = [array count];
- return YES;
+
+ // Ignores the date and item count limits; these are respected when loading instead of when saving, so
+ // that clients can learn of discarded items by listening to WebHistoryItemsDiscardedWhileLoadingNotification.
+ WebHistoryWriter writer(_entriesByDate);
+ writer.writePropertyList();
+ return [[(NSData *)writer.releaseData().get() retain] autorelease];
}
- (BOOL)saveToURL:(NSURL *)URL error:(NSError **)error
@@ -615,16 +599,14 @@ static WebHistoryDateKey timeIntervalForBeginningOfDay(NSTimeInterval interval)
double start = CFAbsoluteTimeGetCurrent();
#endif
- int numberOfItems;
- if (![self saveHistoryGuts:&numberOfItems URL:URL error:error])
- return NO;
+ BOOL result = [[self data] writeToURL:URL options:0 error:error];
#if !LOG_DISABLED
double duration = CFAbsoluteTimeGetCurrent() - start;
- LOG(Timing, "saving %d history entries to %@ took %f seconds", numberOfItems, URL, duration);
+ LOG(Timing, "saving history to %@ took %f seconds", URL, duration);
#endif
- return YES;
+ return result;
}
- (void)addVisitedLinksToPageGroup:(PageGroup&)group
@@ -799,13 +781,18 @@ static WebHistoryDateKey timeIntervalForBeginningOfDay(NSTimeInterval interval)
return [_historyPrivate allItems];
}
+- (NSData *)_data
+{
+ return [_historyPrivate data];
+}
+
@end
@implementation WebHistory (WebInternal)
-- (void)_visitedURL:(NSURL *)url withTitle:(NSString *)title method:(NSString *)method wasFailure:(BOOL)wasFailure
+- (void)_visitedURL:(NSURL *)url withTitle:(NSString *)title method:(NSString *)method wasFailure:(BOOL)wasFailure increaseVisitCount:(BOOL)increaseVisitCount
{
- WebHistoryItem *entry = [_historyPrivate visitedURL:url withTitle:title];
+ WebHistoryItem *entry = [_historyPrivate visitedURL:url withTitle:title increaseVisitCount:increaseVisitCount];
HistoryItem* item = core(entry);
item->setLastVisitWasFailure(wasFailure);
@@ -813,7 +800,7 @@ static WebHistoryDateKey timeIntervalForBeginningOfDay(NSTimeInterval interval)
if ([method length])
item->setLastVisitWasHTTPNonGet([method caseInsensitiveCompare:@"GET"] && (![[url scheme] caseInsensitiveCompare:@"http"] || ![[url scheme] caseInsensitiveCompare:@"https"]));
- item->setRedirectURLs(std::auto_ptr<Vector<String> >());
+ item->setRedirectURLs(0);
NSArray *entries = [[NSArray alloc] initWithObjects:entry, nil];
[self _sendNotification:WebHistoryItemsAddedNotification entries:entries];
@@ -826,3 +813,23 @@ static WebHistoryDateKey timeIntervalForBeginningOfDay(NSTimeInterval interval)
}
@end
+
+WebHistoryWriter::WebHistoryWriter(DateToEntriesMap* entriesByDate)
+ : m_entriesByDate(entriesByDate)
+{
+ m_dateKeys.reserveCapacity(m_entriesByDate->size());
+ DateToEntriesMap::const_iterator end = m_entriesByDate->end();
+ for (DateToEntriesMap::const_iterator it = m_entriesByDate->begin(); it != end; ++it)
+ m_dateKeys.append(it->first);
+ sort(m_dateKeys.begin(), m_dateKeys.end());
+}
+
+void WebHistoryWriter::writeHistoryItems(BinaryPropertyListObjectStream& stream)
+{
+ for (int dateIndex = m_dateKeys.size() - 1; dateIndex >= 0; dateIndex--) {
+ NSArray *entries = m_entriesByDate->get(m_dateKeys[dateIndex]).get();
+ NSUInteger entryCount = [entries count];
+ for (NSUInteger entryIndex = 0; entryIndex < entryCount; ++entryIndex)
+ writeHistoryItem(stream, core([entries objectAtIndex:entryIndex]));
+ }
+}
diff --git a/WebKit/mac/History/WebHistoryInternal.h b/WebKit/mac/History/WebHistoryInternal.h
index b4431c5..39d91d5 100644
--- a/WebKit/mac/History/WebHistoryInternal.h
+++ b/WebKit/mac/History/WebHistoryInternal.h
@@ -33,6 +33,6 @@ namespace WebCore {
}
@interface WebHistory (WebInternal)
-- (void)_visitedURL:(NSURL *)URL withTitle:(NSString *)title method:(NSString *)method wasFailure:(BOOL)wasFailure;
+- (void)_visitedURL:(NSURL *)URL withTitle:(NSString *)title method:(NSString *)method wasFailure:(BOOL)wasFailure increaseVisitCount:(BOOL)increaseVisitCount;
- (void)_addVisitedLinksToPageGroup:(WebCore::PageGroup&)group;
@end
diff --git a/WebKit/mac/History/WebHistoryItem.mm b/WebKit/mac/History/WebHistoryItem.mm
index ca80437..3ed4e1f 100644
--- a/WebKit/mac/History/WebHistoryItem.mm
+++ b/WebKit/mac/History/WebHistoryItem.mm
@@ -218,7 +218,8 @@ void WKNotifyHistoryItemChanged()
HistoryItem* coreItem = core(_private);
NSMutableString *result = [NSMutableString stringWithFormat:@"%@ %@", [super description], (NSString*)coreItem->urlString()];
if (coreItem->target()) {
- [result appendFormat:@" in \"%@\"", (NSString*)coreItem->target()];
+ NSString *target = coreItem->target();
+ [result appendFormat:@" in \"%@\"", target];
}
if (coreItem->isTargetItem()) {
[result appendString:@" *target*"];
@@ -256,6 +257,9 @@ HistoryItem* core(WebHistoryItem *item)
{
if (!item)
return 0;
+
+ ASSERT(historyItemWrappers().get(core(item->_private)) == item);
+
return core(item->_private);
}
@@ -378,10 +382,10 @@ static WebWindowWatcher *_windowWatcher = nil;
if (NSArray *redirectURLs = [dict _webkit_arrayForKey:redirectURLsKey]) {
NSUInteger size = [redirectURLs count];
- std::auto_ptr<Vector<String> > redirectURLsVector(new Vector<String>(size));
+ OwnPtr<Vector<String> > redirectURLsVector(new Vector<String>(size));
for (NSUInteger i = 0; i < size; ++i)
(*redirectURLsVector)[i] = String([redirectURLs _webkit_stringAtIndex:i]);
- core(_private)->setRedirectURLs(redirectURLsVector);
+ core(_private)->setRedirectURLs(redirectURLsVector.release());
}
NSArray *dailyCounts = [dict _webkit_arrayForKey:dailyVisitCountKey];
@@ -417,9 +421,9 @@ static WebWindowWatcher *_windowWatcher = nil;
return core(_private)->scrollPoint();
}
-- (void)_visitedWithTitle:(NSString *)title
+- (void)_visitedWithTitle:(NSString *)title increaseVisitCount:(BOOL)increaseVisitCount
{
- core(_private)->visited(title, [NSDate timeIntervalSinceReferenceDate]);
+ core(_private)->visited(title, [NSDate timeIntervalSinceReferenceDate], increaseVisitCount ? IncreaseVisitCount : DoNotIncreaseVisitCount);
}
- (void)_recordInitialVisit
@@ -577,10 +581,7 @@ static WebWindowWatcher *_windowWatcher = nil;
- (WebHistoryItem *)targetItem
{
ASSERT_MAIN_THREAD();
- HistoryItem* coreItem = core(_private);
- if (coreItem->isTargetItem() || !coreItem->hasChildren())
- return self;
- return kit(coreItem->recurseToFindTargetItem());
+ return kit(core(_private)->targetItem());
}
+ (void)_releaseAllPendingPageCaches
@@ -644,11 +645,19 @@ static WebWindowWatcher *_windowWatcher = nil;
@end
-// FIXME: <rdar://problem/4886761>
-// This is a bizarre policy - we flush the page caches ANY time ANY window is closed?
+// FIXME: <rdar://problem/4886761>.
+// This is a bizarre policy. We flush the page caches ANY time ANY window is closed?
+
@implementation WebWindowWatcher
--(void)windowWillClose:(NSNotification *)notification
+
+- (void)windowWillClose:(NSNotification *)notification
{
+ if (!pthread_main_np()) {
+ [self performSelectorOnMainThread:_cmd withObject:notification waitUntilDone:NO];
+ return;
+ }
+
pageCache()->releaseAutoreleasedPagesNow();
}
+
@end
diff --git a/WebKit/mac/History/WebHistoryItemInternal.h b/WebKit/mac/History/WebHistoryItemInternal.h
index fe2ae1a..787eb05 100644
--- a/WebKit/mac/History/WebHistoryItemInternal.h
+++ b/WebKit/mac/History/WebHistoryItemInternal.h
@@ -51,7 +51,7 @@ extern void WKNotifyHistoryItemChanged();
- (void)_mergeAutoCompleteHints:(WebHistoryItem *)otherItem;
- (void)setTitle:(NSString *)title;
-- (void)_visitedWithTitle:(NSString *)title;
+- (void)_visitedWithTitle:(NSString *)title increaseVisitCount:(BOOL)increaseVisitCount;
- (void)_recordInitialVisit;
@end
diff --git a/WebKit/mac/History/WebHistoryPrivate.h b/WebKit/mac/History/WebHistoryPrivate.h
index c7d6a1b..4ab0924 100644
--- a/WebKit/mac/History/WebHistoryPrivate.h
+++ b/WebKit/mac/History/WebHistoryPrivate.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2008, 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
@@ -47,4 +47,11 @@ extern NSString *WebHistoryItemsDiscardedWhileLoadingNotification;
*/
- (NSArray *)allItems;
+/*!
+ @method _data
+ @result A data object with the entire history in the same format used by the saveToURL:error: method.
+*/
+- (NSData *)_data;
+
+
@end
diff --git a/WebKit/mac/MigrateHeaders.make b/WebKit/mac/MigrateHeaders.make
index 6d96623..7211aa3 100644
--- a/WebKit/mac/MigrateHeaders.make
+++ b/WebKit/mac/MigrateHeaders.make
@@ -50,7 +50,6 @@ all : \
$(INTERNAL_HEADERS_DIR)/DOMCSSStyleDeclarationInternal.h \
$(PUBLIC_HEADERS_DIR)/DOMCSSStyleRule.h \
$(PUBLIC_HEADERS_DIR)/DOMCSSStyleSheet.h \
- $(PRIVATE_HEADERS_DIR)/DOMCSSStyleSheetPrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMCSSUnknownRule.h \
$(PUBLIC_HEADERS_DIR)/DOMCSSValue.h \
$(PUBLIC_HEADERS_DIR)/DOMCSSValueList.h \
@@ -58,47 +57,39 @@ all : \
$(PUBLIC_HEADERS_DIR)/DOMComment.h \
$(PUBLIC_HEADERS_DIR)/DOMCore.h \
$(PUBLIC_HEADERS_DIR)/DOMCounter.h \
- $(PUBLIC_HEADERS_DIR)/DOMImplementation.h \
$(PUBLIC_HEADERS_DIR)/DOMDocument.h \
$(INTERNAL_HEADERS_DIR)/DOMDocumentInternal.h \
$(PUBLIC_HEADERS_DIR)/DOMDocumentFragment.h \
$(INTERNAL_HEADERS_DIR)/DOMDocumentFragmentInternal.h \
- $(PRIVATE_HEADERS_DIR)/DOMDocumentPrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMDocumentType.h \
$(PUBLIC_HEADERS_DIR)/DOMElement.h \
$(INTERNAL_HEADERS_DIR)/DOMElementInternal.h \
- $(PRIVATE_HEADERS_DIR)/DOMElementPrivate.h \
$(PRIVATE_HEADERS_DIR)/DOMElementTimeControl.h \
$(PUBLIC_HEADERS_DIR)/DOMEntity.h \
$(PUBLIC_HEADERS_DIR)/DOMEntityReference.h \
$(PUBLIC_HEADERS_DIR)/DOMEvent.h \
$(PUBLIC_HEADERS_DIR)/DOMEventException.h \
$(PUBLIC_HEADERS_DIR)/DOMEventListener.h \
- $(PRIVATE_HEADERS_DIR)/DOMEventPrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMEventTarget.h \
$(PUBLIC_HEADERS_DIR)/DOMEvents.h \
$(PUBLIC_HEADERS_DIR)/DOMException.h \
$(PUBLIC_HEADERS_DIR)/DOMExtensions.h \
+ $(PUBLIC_HEADERS_DIR)/DOMFile.h \
+ $(PUBLIC_HEADERS_DIR)/DOMFileList.h \
$(PUBLIC_HEADERS_DIR)/DOMHTML.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLAnchorElement.h \
- $(PRIVATE_HEADERS_DIR)/DOMHTMLAnchorElementPrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLAppletElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLAreaElement.h \
- $(PRIVATE_HEADERS_DIR)/DOMHTMLAreaElementPrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLBRElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLBaseElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLBaseFontElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLBodyElement.h \
- $(PRIVATE_HEADERS_DIR)/DOMHTMLBodyElementPrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLButtonElement.h \
- $(PRIVATE_HEADERS_DIR)/DOMHTMLButtonElementPrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLCollection.h \
- $(PRIVATE_HEADERS_DIR)/DOMHTMLCollectionPrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLDListElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLDirectoryElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLDivElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLDocument.h \
- $(PRIVATE_HEADERS_DIR)/DOMHTMLDocumentPrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLElement.h \
$(INTERNAL_HEADERS_DIR)/DOMHTMLElementInternal.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLEmbedElement.h \
@@ -106,27 +97,21 @@ all : \
$(PUBLIC_HEADERS_DIR)/DOMHTMLFieldSetElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLFontElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLFormElement.h \
- $(PRIVATE_HEADERS_DIR)/DOMHTMLFormElementPrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLFrameElement.h \
- $(PRIVATE_HEADERS_DIR)/DOMHTMLFrameElementPrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLFrameSetElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLHRElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLHeadElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLHeadingElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLHtmlElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLIFrameElement.h \
- $(PRIVATE_HEADERS_DIR)/DOMHTMLIFrameElementPrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLImageElement.h \
- $(PRIVATE_HEADERS_DIR)/DOMHTMLImageElementPrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLInputElement.h \
- $(PRIVATE_HEADERS_DIR)/DOMHTMLInputElementPrivate.h \
$(INTERNAL_HEADERS_DIR)/DOMHTMLInputElementInternal.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLIsIndexElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLLIElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLLabelElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLLegendElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLLinkElement.h \
- $(PRIVATE_HEADERS_DIR)/DOMHTMLLinkElementPrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLMapElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLMarqueeElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLMenuElement.h \
@@ -138,17 +123,13 @@ all : \
$(PUBLIC_HEADERS_DIR)/DOMHTMLOptGroupElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLOptionElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLOptionsCollection.h \
- $(PRIVATE_HEADERS_DIR)/DOMHTMLOptionsCollectionPrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLParagraphElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLParamElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLPreElement.h \
- $(PRIVATE_HEADERS_DIR)/DOMHTMLPreElementPrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLQuoteElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLScriptElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLSelectElement.h \
- $(PRIVATE_HEADERS_DIR)/DOMHTMLSelectElementPrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLStyleElement.h \
- $(PRIVATE_HEADERS_DIR)/DOMHTMLStyleElementPrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLTableCaptionElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLTableCellElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLTableColElement.h \
@@ -156,35 +137,29 @@ all : \
$(PUBLIC_HEADERS_DIR)/DOMHTMLTableRowElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLTableSectionElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLTextAreaElement.h \
- $(PRIVATE_HEADERS_DIR)/DOMHTMLTextAreaElementPrivate.h \
$(INTERNAL_HEADERS_DIR)/DOMHTMLTextAreaElementInternal.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLTitleElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLUListElement.h \
+ $(PUBLIC_HEADERS_DIR)/DOMImplementation.h \
$(PUBLIC_HEADERS_DIR)/DOMKeyboardEvent.h \
- $(PRIVATE_HEADERS_DIR)/DOMKeyboardEventPrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMMediaList.h \
$(PUBLIC_HEADERS_DIR)/DOMMouseEvent.h \
- $(PRIVATE_HEADERS_DIR)/DOMMouseEventPrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMMutationEvent.h \
$(PUBLIC_HEADERS_DIR)/DOMNamedNodeMap.h \
$(PUBLIC_HEADERS_DIR)/DOMNode.h \
$(INTERNAL_HEADERS_DIR)/DOMNodeInternal.h \
- $(PRIVATE_HEADERS_DIR)/DOMNodePrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMNodeFilter.h \
$(PUBLIC_HEADERS_DIR)/DOMNodeIterator.h \
- $(PRIVATE_HEADERS_DIR)/DOMNodeIteratorPrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMNodeList.h \
$(PUBLIC_HEADERS_DIR)/DOMNotation.h \
$(PUBLIC_HEADERS_DIR)/DOMObject.h \
$(PUBLIC_HEADERS_DIR)/DOMOverflowEvent.h \
$(PRIVATE_HEADERS_DIR)/DOMPrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMProcessingInstruction.h \
- $(PRIVATE_HEADERS_DIR)/DOMProcessingInstructionPrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMProgressEvent.h \
$(PUBLIC_HEADERS_DIR)/DOMRGBColor.h \
$(PUBLIC_HEADERS_DIR)/DOMRange.h \
$(INTERNAL_HEADERS_DIR)/DOMRangeInternal.h \
- $(PRIVATE_HEADERS_DIR)/DOMRangePrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMRangeException.h \
$(PUBLIC_HEADERS_DIR)/DOMRanges.h \
$(PUBLIC_HEADERS_DIR)/DOMRect.h \
@@ -192,14 +167,11 @@ all : \
$(PUBLIC_HEADERS_DIR)/DOMStyleSheetList.h \
$(PUBLIC_HEADERS_DIR)/DOMStylesheets.h \
$(PUBLIC_HEADERS_DIR)/DOMText.h \
- $(PRIVATE_HEADERS_DIR)/DOMTextPrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMTraversal.h \
$(PUBLIC_HEADERS_DIR)/DOMTreeWalker.h \
$(PUBLIC_HEADERS_DIR)/DOMUIEvent.h \
- $(PRIVATE_HEADERS_DIR)/DOMUIEventPrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMViews.h \
$(PUBLIC_HEADERS_DIR)/DOMWheelEvent.h \
- $(PRIVATE_HEADERS_DIR)/DOMWheelEventPrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMXPath.h \
$(PUBLIC_HEADERS_DIR)/DOMXPathException.h \
$(PUBLIC_HEADERS_DIR)/DOMXPathExpression.h \
@@ -212,9 +184,11 @@ all : \
$(PUBLIC_HEADERS_DIR)/npruntime.h \
#
-ifeq ($(findstring ENABLE_SVG,$(FEATURE_DEFINES)), ENABLE_SVG)
+ifeq ($(findstring ENABLE_SVG_DOM_OBJC_BINDINGS,$(FEATURE_DEFINES)), ENABLE_SVG_DOM_OBJC_BINDINGS)
all : \
+ $(PRIVATE_HEADERS_DIR)/DOMHTMLFrameElementPrivate.h \
+ $(PRIVATE_HEADERS_DIR)/DOMHTMLIFrameElementPrivate.h \
$(PRIVATE_HEADERS_DIR)/DOMSVG.h \
$(PRIVATE_HEADERS_DIR)/DOMSVGAElement.h \
$(INTERNAL_HEADERS_DIR)/DOMSVGAElementInternal.h \
diff --git a/WebKit/mac/Misc/WebCache.mm b/WebKit/mac/Misc/WebCache.mm
index 46fb341..6013a5f 100644
--- a/WebKit/mac/Misc/WebCache.mm
+++ b/WebKit/mac/Misc/WebCache.mm
@@ -26,6 +26,7 @@
#import "WebCache.h"
#import "WebPreferences.h"
+#import "WebSystemInterface.h"
#import "WebView.h"
#import "WebViewInternal.h"
#import <WebCore/ApplicationCacheStorage.h>
@@ -34,6 +35,11 @@
@implementation WebCache
++ (void)initialize
+{
+ InitWebCoreSystemInterface();
+}
+
+ (NSArray *)statistics
{
WebCore::Cache::Statistics s = WebCore::cache()->getStatistics();
diff --git a/WebKit/mac/Misc/WebCoreStatistics.h b/WebKit/mac/Misc/WebCoreStatistics.h
index a7f3fa5..d4370bf 100644
--- a/WebKit/mac/Misc/WebCoreStatistics.h
+++ b/WebKit/mac/Misc/WebCoreStatistics.h
@@ -64,6 +64,10 @@
+ (NSDictionary *)memoryStatistics;
+ (void)returnFreeMemoryToSystem;
++ (int)cachedPageCount;
++ (int)cachedFrameCount;
++ (int)autoreleasedPageCount;
+
// Deprecated, but used by older versions of Safari.
+ (void)emptyCache;
+ (void)setCacheDisabled:(BOOL)disabled;
diff --git a/WebKit/mac/Misc/WebCoreStatistics.mm b/WebKit/mac/Misc/WebCoreStatistics.mm
index 2fe5710..57b59a4 100644
--- a/WebKit/mac/Misc/WebCoreStatistics.mm
+++ b/WebKit/mac/Misc/WebCoreStatistics.mm
@@ -38,6 +38,7 @@
#import <WebCore/GlyphPageTreeNode.h>
#import <WebCore/IconDatabase.h>
#import <WebCore/JSDOMWindow.h>
+#import <WebCore/PageCache.h>
#import <WebCore/RenderTreeAsText.h>
#import <WebCore/RenderView.h>
@@ -53,31 +54,31 @@ using namespace WebCore;
+ (size_t)javaScriptObjectsCount
{
- JSLock lock(false);
+ JSLock lock(SilenceAssertionsOnly);
return JSDOMWindow::commonJSGlobalData()->heap.objectCount();
}
+ (size_t)javaScriptGlobalObjectsCount
{
- JSLock lock(false);
+ JSLock lock(SilenceAssertionsOnly);
return JSDOMWindow::commonJSGlobalData()->heap.globalObjectCount();
}
+ (size_t)javaScriptProtectedObjectsCount
{
- JSLock lock(false);
+ JSLock lock(SilenceAssertionsOnly);
return JSDOMWindow::commonJSGlobalData()->heap.protectedObjectCount();
}
+ (size_t)javaScriptProtectedGlobalObjectsCount
{
- JSLock lock(false);
+ JSLock lock(SilenceAssertionsOnly);
return JSDOMWindow::commonJSGlobalData()->heap.protectedGlobalObjectCount();
}
+ (NSCountedSet *)javaScriptProtectedObjectTypeCounts
{
- JSLock lock(false);
+ JSLock lock(SilenceAssertionsOnly);
NSCountedSet *result = [NSCountedSet set];
@@ -142,13 +143,13 @@ using namespace WebCore;
+ (BOOL)shouldPrintExceptions
{
- JSLock lock(false);
+ JSLock lock(SilenceAssertionsOnly);
return Console::shouldPrintExceptions();
}
+ (void)setShouldPrintExceptions:(BOOL)print
{
- JSLock lock(false);
+ JSLock lock(SilenceAssertionsOnly);
Console::setShouldPrintExceptions(print);
}
@@ -175,7 +176,7 @@ using namespace WebCore;
+ (NSDictionary *)memoryStatistics
{
WTF::FastMallocStatistics fastMallocStatistics = WTF::fastMallocStatistics();
- JSLock lock(false);
+ JSLock lock(SilenceAssertionsOnly);
Heap::Statistics jsHeapStatistics = JSDOMWindow::commonJSGlobalData()->heap.statistics();
return [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt:fastMallocStatistics.heapSize], @"FastMallocHeapSize",
@@ -192,6 +193,21 @@ using namespace WebCore;
WTF::releaseFastMallocFreeMemory();
}
++ (int)cachedPageCount
+{
+ return pageCache()->pageCount();
+}
+
++ (int)cachedFrameCount
+{
+ return pageCache()->frameCount();
+}
+
++ (int)autoreleasedPageCount
+{
+ return pageCache()->autoreleasedPageCount();
+}
+
// Deprecated
+ (size_t)javaScriptNoGCAllowedObjectsCount
{
@@ -200,7 +216,7 @@ using namespace WebCore;
+ (size_t)javaScriptReferencedObjectsCount
{
- JSLock lock(false);
+ JSLock lock(SilenceAssertionsOnly);
return JSDOMWindow::commonJSGlobalData()->heap.protectedObjectCount();
}
diff --git a/WebKit/mac/Misc/WebDownload.m b/WebKit/mac/Misc/WebDownload.mm
index 2c53c1b..978465a 100644
--- a/WebKit/mac/Misc/WebDownload.m
+++ b/WebKit/mac/Misc/WebDownload.mm
@@ -30,11 +30,14 @@
#import <Foundation/NSURLAuthenticationChallenge.h>
#import <Foundation/NSURLDownload.h>
+#import <WebCore/AuthenticationMac.h>
#import <WebKit/WebPanelAuthenticationHandler.h>
#import <wtf/Assertions.h>
#import "WebTypesInternal.h"
+using namespace WebCore;
+
@class NSURLConnectionDelegateProxy;
// FIXME: The following are NSURLDownload SPI - it would be nice to not have to override them at
@@ -96,9 +99,6 @@
- (void)downloadDidBegin:(NSURLDownload *)download
{
-#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
- [[NSProcessInfo processInfo] disableSuddenTermination];
-#endif
[realDelegate downloadDidBegin:download];
}
@@ -109,6 +109,15 @@
- (void)download:(NSURLDownload *)download didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
{
+ // Try previously stored credential first.
+ if (![challenge previousFailureCount]) {
+ NSURLCredential *credential = WebCoreCredentialStorage::get([challenge protectionSpace]);
+ if (credential) {
+ [[challenge sender] useCredential:credential forAuthenticationChallenge:challenge];
+ return;
+ }
+ }
+
if ([realDelegate respondsToSelector:@selector(download:didReceiveAuthenticationChallenge:)]) {
[realDelegate download:download didReceiveAuthenticationChallenge:challenge];
} else {
@@ -157,17 +166,11 @@
- (void)downloadDidFinish:(NSURLDownload *)download
{
-#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
- [[NSProcessInfo processInfo] enableSuddenTermination];
-#endif
[realDelegate downloadDidFinish:download];
}
- (void)download:(NSURLDownload *)download didFailWithError:(NSError *)error
{
-#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
- [[NSProcessInfo processInfo] enableSuddenTermination];
-#endif
[realDelegate download:download didFailWithError:error];
}
diff --git a/WebKit/mac/Misc/WebElementDictionary.mm b/WebKit/mac/Misc/WebElementDictionary.mm
index db7b5f4..aa703e0 100644
--- a/WebKit/mac/Misc/WebElementDictionary.mm
+++ b/WebKit/mac/Misc/WebElementDictionary.mm
@@ -28,6 +28,7 @@
#import "WebElementDictionary.h"
+#import "DOMNodeInternal.h"
#import "WebDOMOperations.h"
#import "WebFrame.h"
#import "WebFrameInternal.h"
@@ -191,7 +192,8 @@ static NSString* NSStringOrNil(String coreString)
- (NSString *)_spellingToolTip
{
- return NSStringOrNil(_result->spellingToolTip());
+ TextDirection dir;
+ return NSStringOrNil(_result->spellingToolTip(dir));
}
- (NSImage *)_image
@@ -218,7 +220,8 @@ static NSString* NSStringOrNil(String coreString)
- (NSString *)_title
{
- return NSStringOrNil(_result->title());
+ TextDirection dir;
+ return NSStringOrNil(_result->title(dir));
}
- (NSURL *)_absoluteLinkURL
diff --git a/WebKit/mac/Misc/WebIconDatabase.mm b/WebKit/mac/Misc/WebIconDatabase.mm
index d4df14b..62c8e2f 100644
--- a/WebKit/mac/Misc/WebIconDatabase.mm
+++ b/WebKit/mac/Misc/WebIconDatabase.mm
@@ -65,8 +65,12 @@ NSSize WebIconLargeSize = {128, 128};
static WebIconDatabaseClient* defaultClient()
{
+#if ENABLE(ICONDATABASE)
static WebIconDatabaseClient* defaultClient = new WebIconDatabaseClient();
return defaultClient;
+#else
+ return 0;
+#endif
}
@interface WebIconDatabase (WebReallyInternal)
@@ -584,6 +588,8 @@ bool importToWebCoreFormat()
// here because this code is only executed once for each icon database instance. We could
// make this configurable on a per-client basis someday if that seemed useful.
// See <rdar://problem/5320208>.
+ // FIXME: This has nothing to do with importing from the old to the new database format and should be moved elsewhere,
+ // especially because we might eventually delete all of this legacy importing code and we shouldn't delete this.
CFStringRef databasePath = iconDatabase()->databasePath().createCFString();
if (databasePath) {
CFURLRef databasePathURL = CFURLCreateWithFileSystemPath(0, databasePath, kCFURLPOSIXPathStyle, FALSE);
@@ -614,6 +620,13 @@ bool importToWebCoreFormat()
if (![pageURLToIconURL isKindOfClass:[NSMutableDictionary class]])
pageURLToIconURL = nil;
+ if (!pageURLToIconURL) {
+ // We found no Safari-2-style icon database. Bail out immediately and do not delete everything
+ // in whatever directory we ended up looking in! Return true so we won't bother to check again.
+ // FIXME: We can probably delete all of the code to convert Safari-2-style icon databases now.
+ return true;
+ }
+
NSEnumerator *enumerator = [pageURLToIconURL keyEnumerator];
NSString *url, *iconURL;
diff --git a/WebKit/mac/Misc/WebKitErrors.m b/WebKit/mac/Misc/WebKitErrors.m
index 5985d9a..ec42dc9 100644
--- a/WebKit/mac/Misc/WebKitErrors.m
+++ b/WebKit/mac/Misc/WebKitErrors.m
@@ -106,6 +106,10 @@ static NSMutableDictionary *descriptions = nil;
[[self class] _registerWebKitErrors];
NSMutableDictionary *userInfo = [[NSMutableDictionary alloc] init];
+ NSDictionary *descriptionsForWebKitErrorDomain = [descriptions objectForKey:WebKitErrorDomain];
+ NSString *localizedDescription = [descriptionsForWebKitErrorDomain objectForKey:[NSNumber numberWithInt:code]];
+ if (localizedDescription)
+ [userInfo setObject:localizedDescription forKey:NSLocalizedDescriptionKey];
if (contentURL) {
[userInfo setObject:contentURL forKey:@"NSErrorFailingURLKey"];
#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD)
diff --git a/WebKit/mac/Misc/WebKitNSStringExtras.h b/WebKit/mac/Misc/WebKitNSStringExtras.h
index 47056c6..f252430 100644
--- a/WebKit/mac/Misc/WebKitNSStringExtras.h
+++ b/WebKit/mac/Misc/WebKitNSStringExtras.h
@@ -28,6 +28,8 @@
#import <Cocoa/Cocoa.h>
+extern NSString *WebKitLocalCacheDefaultsKey;
+
@interface NSString (WebKitExtras)
- (void)_web_drawAtPoint:(NSPoint)point font:(NSFont *)font textColor:(NSColor *)textColor;
diff --git a/WebKit/mac/Misc/WebKitNSStringExtras.m b/WebKit/mac/Misc/WebKitNSStringExtras.mm
index f3077d3..5eb3e1f 100644
--- a/WebKit/mac/Misc/WebKitNSStringExtras.m
+++ b/WebKit/mac/Misc/WebKitNSStringExtras.mm
@@ -28,15 +28,25 @@
#import "WebKitNSStringExtras.h"
-#import <WebKit/WebNSObjectExtras.h>
-#import <WebKit/WebNSFileManagerExtras.h>
-
+#import <WebCore/Font.h>
+#import <WebCore/GraphicsContext.h>
#import <WebCore/WebCoreNSStringExtras.h>
-#import <WebCore/WebCoreTextRenderer.h>
-
+#import <WebKit/WebNSFileManagerExtras.h>
+#import <WebKit/WebNSObjectExtras.h>
#import <unicode/uchar.h>
#import <sys/param.h>
+NSString *WebKitLocalCacheDefaultsKey = @"WebKitLocalCache";
+
+static inline CGFloat webkit_CGCeiling(CGFloat value)
+{
+ if (sizeof(value) == sizeof(float))
+ return ceilf(value);
+ return ceil(value);
+}
+
+using namespace WebCore;
+
@implementation NSString (WebKitExtras)
static BOOL canUseFastRenderer(const UniChar *buffer, unsigned length)
@@ -54,28 +64,50 @@ static BOOL canUseFastRenderer(const UniChar *buffer, unsigned length)
{
// FIXME: Would be more efficient to change this to C++ and use Vector<UChar, 2048>.
unsigned length = [self length];
- UniChar *buffer = malloc(sizeof(UniChar) * length);
+ Vector<UniChar, 2048> buffer(length);
- [self getCharacters:buffer];
+ [self getCharacters:buffer.data()];
- if (canUseFastRenderer(buffer, length)) {
+ 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.
// If you change this, be sure to test all the text drawn this way in Safari, including
// the status bar, bookmarks bar, tab bar, and activity window.
- point.y = ceilf(point.y);
- WebCoreDrawTextAtPoint(buffer, length, point, font, textColor);
+ point.y = webkit_CGCeiling(point.y);
+
+ NSGraphicsContext *nsContext = [NSGraphicsContext currentContext];
+ CGContextRef cgContext = static_cast<CGContextRef>([nsContext graphicsPort]);
+ GraphicsContext graphicsContext(cgContext);
+
+ // Safari doesn't flip the NSGraphicsContext before calling WebKit, yet WebCore requires a flipped graphics context.
+ BOOL flipped = [nsContext isFlipped];
+ if (!flipped)
+ CGContextScaleCTM(cgContext, 1, -1);
+
+ Font webCoreFont(FontPlatformData(font), ![nsContext isDrawingToScreen]);
+ TextRun run(buffer.data(), length);
+ run.disableRoundingHacks();
+
+ CGFloat red;
+ CGFloat green;
+ 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));
+
+ webCoreFont.drawText(&graphicsContext, run, FloatPoint(point.x, (flipped ? point.y : (-1 * point.y))));
+
+ if (!flipped)
+ CGContextScaleCTM(cgContext, 1, -1);
} else {
- // WebTextRenderer assumes drawing from baseline.
+ // The given point is on the baseline.
if ([[NSView focusView] isFlipped])
point.y -= [font ascender];
- else {
+ else
point.y += [font descender];
- }
+
[self drawAtPoint:point withAttributes:[NSDictionary dictionaryWithObjectsAndKeys:font, NSFontAttributeName, textColor, NSForegroundColorAttributeName, nil]];
}
-
- free(buffer);
}
- (void)_web_drawDoubledAtPoint:(NSPoint)textPoint
@@ -85,7 +117,7 @@ static BOOL canUseFastRenderer(const UniChar *buffer, unsigned length)
{
// turn off font smoothing so translucent text draws correctly (Radar 3118455)
[NSGraphicsContext saveGraphicsState];
- CGContextSetShouldSmoothFonts([[NSGraphicsContext currentContext] graphicsPort], false);
+ CGContextSetShouldSmoothFonts(static_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]), false);
[self _web_drawAtPoint:textPoint
font:font
textColor:bottomColor];
@@ -100,19 +132,18 @@ static BOOL canUseFastRenderer(const UniChar *buffer, unsigned length)
- (float)_web_widthWithFont:(NSFont *)font
{
unsigned length = [self length];
- float width;
- UniChar *buffer = (UniChar *)malloc(sizeof(UniChar) * length);
+ Vector<UniChar, 2048> buffer(length);
- [self getCharacters:buffer];
+ [self getCharacters:buffer.data()];
- if (canUseFastRenderer(buffer, length))
- width = WebCoreTextFloatWidth(buffer, length, font);
- else
- width = [self sizeWithAttributes:[NSDictionary dictionaryWithObjectsAndKeys:font, NSFontAttributeName, nil]].width;
-
- free(buffer);
-
- return width;
+ if (canUseFastRenderer(buffer.data(), length)) {
+ Font webCoreFont(FontPlatformData(font), ![[NSGraphicsContext currentContext] isDrawingToScreen]);
+ TextRun run(buffer.data(), length);
+ run.disableRoundingHacks();
+ return webCoreFont.floatWidth(run);
+ }
+
+ return [self sizeWithAttributes:[NSDictionary dictionaryWithObjectsAndKeys:font, NSFontAttributeName, nil]].width;
}
- (NSString *)_web_stringByAbbreviatingWithTildeInPath
@@ -295,20 +326,22 @@ static BOOL canUseFastRenderer(const UniChar *buffer, unsigned length)
+ (NSString *)_webkit_localCacheDirectoryWithBundleIdentifier:(NSString*)bundleIdentifier
{
- NSString* cacheDir = nil;
-
+ NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
+ NSString *cacheDir = [defaults objectForKey:WebKitLocalCacheDefaultsKey];
+
+ if (!cacheDir || ![cacheDir isKindOfClass:[NSString class]]) {
#ifdef BUILDING_ON_TIGER
- cacheDir = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Caches"];
+ cacheDir = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Caches"];
#else
- char cacheDirectory[MAXPATHLEN];
- size_t cacheDirectoryLen = confstr(_CS_DARWIN_USER_CACHE_DIR, cacheDirectory, MAXPATHLEN);
+ char cacheDirectory[MAXPATHLEN];
+ size_t cacheDirectoryLen = confstr(_CS_DARWIN_USER_CACHE_DIR, cacheDirectory, MAXPATHLEN);
- if (cacheDirectoryLen)
- cacheDir = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:cacheDirectory length:cacheDirectoryLen - 1];
+ if (cacheDirectoryLen)
+ cacheDir = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:cacheDirectory length:cacheDirectoryLen - 1];
#endif
+ }
return [cacheDir stringByAppendingPathComponent:bundleIdentifier];
}
-
@end
diff --git a/WebKit/mac/Misc/WebKitVersionChecks.h b/WebKit/mac/Misc/WebKitVersionChecks.h
index 169b4cf..8b34c94 100644
--- a/WebKit/mac/Misc/WebKitVersionChecks.h
+++ b/WebKit/mac/Misc/WebKitVersionChecks.h
@@ -51,6 +51,9 @@
#define WEBKIT_FIRST_VERSION_WITH_RELOAD_FROM_ORIGIN 0x02100700 // 528.7.0
#define WEBKIT_FIRST_VERSION_WITHOUT_WEBVIEW_INIT_THREAD_WORKAROUND 0x02100700 // 528.7.0
#define WEBKIT_FIRST_VERSION_WITH_ROUND_TWO_MAIN_THREAD_EXCEPTIONS 0x02120400 // 530.4.0
+#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
#ifdef __cplusplus
extern "C" {
diff --git a/WebKit/mac/Misc/WebNSAttributedStringExtras.mm b/WebKit/mac/Misc/WebNSAttributedStringExtras.mm
index ef472aa..eb422f1 100644
--- a/WebKit/mac/Misc/WebNSAttributedStringExtras.mm
+++ b/WebKit/mac/Misc/WebNSAttributedStringExtras.mm
@@ -72,7 +72,7 @@ static NSFileWrapper *fileWrapperForElement(Element* e)
wrapper = [[kit(e->document()->frame()) _dataSource] _fileWrapperForURL:URL];
}
if (!wrapper) {
- RenderImage* renderer = static_cast<RenderImage*>(e->renderer());
+ RenderImage* renderer = toRenderImage(e->renderer());
if (renderer->cachedImage() && !renderer->cachedImage()->errorOccurred()) {
wrapper = [[NSFileWrapper alloc] initRegularFileWithContents:(NSData *)(renderer->cachedImage()->image()->getTIFFRepresentation())];
[wrapper setPreferredFilename:@"image.tiff"];
diff --git a/WebKit/mac/Misc/WebNSFileManagerExtras.h b/WebKit/mac/Misc/WebNSFileManagerExtras.h
index d6e26ee..c2287f9 100644
--- a/WebKit/mac/Misc/WebNSFileManagerExtras.h
+++ b/WebKit/mac/Misc/WebNSFileManagerExtras.h
@@ -50,5 +50,7 @@
- (BOOL)moveItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath error:(NSError **)error;
- (BOOL)removeItemAtPath:(NSString *)path error:(NSError **)error;
- (NSDictionary *)attributesOfFileSystemForPath:(NSString *)path error:(NSError **)error;
+- (NSString *)destinationOfSymbolicLinkAtPath:(NSString *)path error:(NSError **)error;
+- (NSDictionary *)attributesOfItemAtPath:(NSString *)path error:(NSError **)error;
@end
#endif
diff --git a/WebKit/mac/Misc/WebNSFileManagerExtras.m b/WebKit/mac/Misc/WebNSFileManagerExtras.m
index f32b4c0..5733598 100644
--- a/WebKit/mac/Misc/WebNSFileManagerExtras.m
+++ b/WebKit/mac/Misc/WebNSFileManagerExtras.m
@@ -246,6 +246,14 @@ static void *setMetaData(void* context)
return [self directoryContentsAtPath:path];
}
+- (NSString *)destinationOfSymbolicLinkAtPath:(NSString *)path error:(NSError **)error
+{
+ // We don't report errors via the NSError* output parameter, so ensure that the caller does not expect us to do so.
+ ASSERT_ARG(error, !error);
+
+ return [self pathContentOfSymbolicLinkAtPath:path];
+}
+
- (NSDictionary *)attributesOfFileSystemForPath:(NSString *)path error:(NSError **)error
{
// We don't report errors via the NSError* output parameter, so ensure that the caller does not expect us to do so.
@@ -254,6 +262,14 @@ static void *setMetaData(void* context)
return [self fileSystemAttributesAtPath:path];
}
+- (NSDictionary *)attributesOfItemAtPath:(NSString *)path error:(NSError **)error
+{
+ // We don't report errors via the NSError* output parameter, so ensure that the caller does not expect us to do so.
+ ASSERT_ARG(error, !error);
+
+ return [self fileAttributesAtPath:path traverseLink:NO];
+}
+
- (BOOL)moveItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath error:(NSError **)error
{
// The implementation of moveItemAtPath:toPath:error: interacts with the NSFileManager's delegate.
diff --git a/WebKit/mac/Misc/WebNSObjectExtras.mm b/WebKit/mac/Misc/WebNSObjectExtras.mm
index 2d682b9..3beb641 100644
--- a/WebKit/mac/Misc/WebNSObjectExtras.mm
+++ b/WebKit/mac/Misc/WebNSObjectExtras.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008, 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
@@ -28,6 +28,7 @@
#import "WebNSObjectExtras.h"
+#import <wtf/Assertions.h>
@interface WebMainThreadInvoker : NSProxy
{
@@ -36,23 +37,35 @@
}
@end
+static bool returnTypeIsObject(NSInvocation *invocation)
+{
+ // Could use either _C_ID or NSObjCObjectType, but it seems that neither is
+ // both available and non-deprecated on all versions of Mac OS X we support.
+ return strchr([[invocation methodSignature] methodReturnType], '@');
+}
+
@implementation WebMainThreadInvoker
-- (id)initWithTarget:(id)theTarget
+- (id)initWithTarget:(id)passedTarget
{
- target = theTarget;
+ target = passedTarget;
return self;
}
- (void)forwardInvocation:(NSInvocation *)invocation
{
[invocation setTarget:target];
- [invocation retainArguments];
[invocation performSelectorOnMainThread:@selector(_webkit_invokeAndHandleException:) withObject:self waitUntilDone:YES];
if (exception) {
id exceptionToThrow = [exception autorelease];
exception = nil;
@throw exceptionToThrow;
+ } else if (returnTypeIsObject(invocation)) {
+ // _webkit_invokeAndHandleException retained the return value on the main thread.
+ // Now autorelease it on the calling thread.
+ id returnValue;
+ [invocation getReturnValue:&returnValue];
+ [returnValue autorelease];
}
}
@@ -61,28 +74,35 @@
return [target methodSignatureForSelector:selector];
}
-- (void)handleException:(id)e
+- (void)handleException:(id)passedException
{
- exception = [e retain];
+ ASSERT(!exception);
+ exception = [passedException retain];
}
@end
-
@implementation NSInvocation (WebMainThreadInvoker)
- (void)_webkit_invokeAndHandleException:(WebMainThreadInvoker *)exceptionHandler
{
@try {
[self invoke];
- } @catch (id e) {
- [exceptionHandler handleException:e];
+ } @catch (id exception) {
+ [exceptionHandler handleException:exception];
+ return;
+ }
+ if (returnTypeIsObject(self)) {
+ // Retain the return value on the main thread.
+ // -[WebMainThreadInvoker forwardInvocation:] will autorelease it on the calling thread.
+ id value;
+ [self getReturnValue:&value];
+ [value retain];
}
}
@end
-
@implementation NSObject (WebNSObjectExtras)
- (id)_webkit_invokeOnMainThread
diff --git a/WebKit/mac/Misc/WebNSPasteboardExtras.mm b/WebKit/mac/Misc/WebNSPasteboardExtras.mm
index 34c39dd..3cc1c7c 100644
--- a/WebKit/mac/Misc/WebNSPasteboardExtras.mm
+++ b/WebKit/mac/Misc/WebNSPasteboardExtras.mm
@@ -28,6 +28,7 @@
#import "WebNSPasteboardExtras.h"
+#import "DOMElementInternal.h"
#import "WebArchive.h"
#import "WebFrameInternal.h"
#import "WebHTMLViewInternal.h"
@@ -211,13 +212,14 @@ static NSArray *_writableTypesForImageWithArchive (void)
}
-static CachedImage* imageFromElement(DOMElement *domElement) {
+static CachedImage* imageFromElement(DOMElement *domElement)
+{
Element* element = core(domElement);
if (!element)
return 0;
RenderObject* renderer = element->renderer();
- RenderImage* imageRenderer = static_cast<RenderImage*>(renderer);
+ RenderImage* imageRenderer = toRenderImage(renderer);
if (!imageRenderer->cachedImage() || imageRenderer->cachedImage()->errorOccurred())
return 0;
return imageRenderer->cachedImage();
@@ -266,7 +268,7 @@ static CachedImage* imageFromElement(DOMElement *domElement) {
NSString *extension = @"";
if (RenderObject* renderer = core(element)->renderer()) {
if (renderer->isImage()) {
- if (CachedImage* image = static_cast<RenderImage*>(renderer)->cachedImage()) {
+ if (CachedImage* image = toRenderImage(renderer)->cachedImage()) {
extension = image->image()->filenameExtension();
if (![extension length])
return 0;
diff --git a/WebKit/mac/Misc/WebNSURLExtras.mm b/WebKit/mac/Misc/WebNSURLExtras.mm
index a081f1a..d956f09 100644
--- a/WebKit/mac/Misc/WebNSURLExtras.mm
+++ b/WebKit/mac/Misc/WebNSURLExtras.mm
@@ -72,7 +72,10 @@ static inline BOOL isLookalikeCharacter(int charCode)
return YES;
switch (charCode) {
+ case 0x00ED: /* LATIN SMALL LETTER I WITH ACUTE */
case 0x01C3: /* LATIN LETTER RETROFLEX CLICK */
+ case 0x0251: /* LATIN SMALL LETTER ALPHA */
+ case 0x0261: /* LATIN SMALL LETTER SCRIPT G */
case 0x0337: /* COMBINING SHORT SOLIDUS OVERLAY */
case 0x0338: /* COMBINING LONG SOLIDUS OVERLAY */
case 0x05B4: /* HEBREW POINT HIRIQ */
@@ -87,8 +90,12 @@ static inline BOOL isLookalikeCharacter(int charCode)
case 0x203A: /* SINGLE RIGHT-POINTING ANGLE QUOTATION MARK */
case 0x2044: /* FRACTION SLASH */
case 0x2215: /* DIVISION SLASH */
- case 0x23ae: /* INTEGRAL EXTENSION */
+ case 0x2216: /* SET MINUS */
+ case 0x233F: /* APL FUNCTIONAL SYMBOL SLASH BAR */
+ case 0x23AE: /* INTEGRAL EXTENSION */
+ case 0x244A: /* OCR DOUBLE BACKSLASH */
case 0x2571: /* BOX DRAWINGS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT */
+ case 0x2572: /* BOX DRAWINGS LIGHT DIAGONAL UPPER LEFT TO LOWER RIGHT */
case 0x29F8: /* BIG SOLIDUS */
case 0x29f6: /* SOLIDUS WITH OVERBAR */
case 0x2AFB: /* TRIPLE SOLIDUS BINARY RELATION */
@@ -97,6 +104,7 @@ static inline BOOL isLookalikeCharacter(int charCode)
case 0x3014: /* LEFT TORTOISE SHELL BRACKET */
case 0x3015: /* RIGHT TORTOISE SHELL BRACKET */
case 0x3033: /* VERTICAL KANA REPEAT MARK UPPER HALF */
+ case 0x3035: /* VERTICAL KANA REPEAT MARK LOWER HALF */
case 0x321D: /* PARENTHESIZED KOREAN CHARACTER OJEON */
case 0x321E: /* PARENTHESIZED KOREAN CHARACTER O HU */
case 0x33DF: /* SQUARE A OVER M */
diff --git a/WebKit/mac/Misc/WebStringTruncator.m b/WebKit/mac/Misc/WebStringTruncator.mm
index fb31bbb..fb31bbb 100644
--- a/WebKit/mac/Misc/WebStringTruncator.m
+++ b/WebKit/mac/Misc/WebStringTruncator.mm
diff --git a/WebKit/mac/Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib b/WebKit/mac/Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib
index 31b269a..047952d 100644
--- a/WebKit/mac/Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib
+++ b/WebKit/mac/Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib
@@ -3,8 +3,8 @@
<data>
<int key="IBDocument.SystemTarget">1050</int>
<string key="IBDocument.SystemVersion">9G55</string>
- <string key="IBDocument.InterfaceBuilderVersion">672</string>
- <string key="IBDocument.AppKitVersion">949.43</string>
+ <string key="IBDocument.InterfaceBuilderVersion">670</string>
+ <string key="IBDocument.AppKitVersion">949.34</string>
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -17,7 +17,7 @@
<object class="NSMutableArray" key="IBDocument.RootObjects" id="563121920">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomObject" id="238662661">
- <string key="NSClassName">IFAuthenticationPanel</string>
+ <string key="NSClassName">WebAuthenticationPanel</string>
</object>
<object class="NSCustomObject" id="729335755">
<string key="NSClassName">FirstResponder</string>
@@ -28,15 +28,13 @@
<object class="NSWindowTemplate" id="118512579">
<int key="NSWindowStyleMask">1</int>
<int key="NSWindowBacking">2</int>
- <string key="NSWindowRect">{{93, 112}, {424, 239}}</string>
+ <string key="NSWindowRect">{{93, 72}, {424, 279}}</string>
<int key="NSWTFlags">1886912512</int>
<string key="NSWindowTitle">Log In</string>
<string key="NSWindowClass">NonBlockingPanel</string>
<object class="NSMutableString" key="NSViewClass">
<characters key="NS.bytes">View</characters>
</object>
- <string key="NSWindowContentMaxSize">{500, 202}</string>
- <string key="NSWindowContentMinSize">{300, 100}</string>
<object class="NSView" key="NSWindowView" id="327235052">
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
@@ -45,15 +43,14 @@
<object class="NSTextField" id="705333610">
<reference key="NSNextResponder" ref="327235052"/>
<int key="NSvFlags">266</int>
- <string key="NSFrame">{{101, 185}, {306, 34}}</string>
+ <string key="NSFrame">{{101, 225}, {306, 34}}</string>
<reference key="NSSuperview" ref="327235052"/>
<int key="NSTag">1</int>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="240004773">
<int key="NSCellFlags">69336577</int>
<int key="NSCellFlags2">4194304</int>
- <string type="base64-UTF8" key="NSContents">VG8gdmlldyB0aGlzIHBhZ2UsIHlvdSBuZWVkIHRvIGxvZyBpbiB0byBhcmVhIOKAnFNvbWUgUmVhbG3i
-gJ0gb24gd3d3LnNlcnZlci5jb20uCi4uA</string>
+ <string key="NSContents">To view this page, you must log in to this area on www.server.com:</string>
<object class="NSFont" key="NSSupport" id="897649771">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">1.300000e+01</double>
@@ -84,7 +81,7 @@ gJ0gb24gd3d3LnNlcnZlci5jb20uCi4uA</string>
<object class="NSTextField" id="199018347">
<reference key="NSNextResponder" ref="327235052"/>
<int key="NSvFlags">290</int>
- <string key="NSFrame">{{101, 157}, {291, 20}}</string>
+ <string key="NSFrame">{{101, 147}, {306, 20}}</string>
<reference key="NSSuperview" ref="327235052"/>
<int key="NSTag">2</int>
<bool key="NSEnabled">YES</bool>
@@ -152,7 +149,7 @@ gJ0gb24gd3d3LnNlcnZlci5jb20uCi4uA</string>
<object class="NSTextField" id="71972597">
<reference key="NSNextResponder" ref="327235052"/>
<int key="NSvFlags">290</int>
- <string key="NSFrame">{{174, 127}, {210, 22}}</string>
+ <string key="NSFrame">{{174, 117}, {230, 22}}</string>
<reference key="NSSuperview" ref="327235052"/>
<int key="NSTag">3</int>
<bool key="NSEnabled">YES</bool>
@@ -184,7 +181,7 @@ gJ0gb24gd3d3LnNlcnZlci5jb20uCi4uA</string>
<object class="NSTextField" id="368270689">
<reference key="NSNextResponder" ref="327235052"/>
<int key="NSvFlags">290</int>
- <string key="NSFrame">{{174, 97}, {210, 22}}</string>
+ <string key="NSFrame">{{174, 87}, {230, 22}}</string>
<reference key="NSSuperview" ref="327235052"/>
<int key="NSTag">4</int>
<bool key="NSEnabled">YES</bool>
@@ -202,14 +199,14 @@ gJ0gb24gd3d3LnNlcnZlci5jb20uCi4uA</string>
</object>
<object class="NSTextField" id="477300420">
<reference key="NSNextResponder" ref="327235052"/>
- <int key="NSvFlags">289</int>
- <string key="NSFrame">{{101, 129}, {71, 17}}</string>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{101, 119}, {68, 17}}</string>
<reference key="NSSuperview" ref="327235052"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="159596654">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">4194304</int>
- <string type="base64-UTF8" key="NSContents">TmFtZToKA</string>
+ <string key="NSContents">Name:</string>
<reference key="NSSupport" ref="897649771"/>
<reference key="NSControlView" ref="477300420"/>
<reference key="NSBackgroundColor" ref="475108766"/>
@@ -218,14 +215,14 @@ gJ0gb24gd3d3LnNlcnZlci5jb20uCi4uA</string>
</object>
<object class="NSTextField" id="833115728">
<reference key="NSNextResponder" ref="327235052"/>
- <int key="NSvFlags">289</int>
- <string key="NSFrame">{{101, 94}, {68, 22}}</string>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{101, 89}, {68, 17}}</string>
<reference key="NSSuperview" ref="327235052"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="766878508">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">4194304</int>
- <string type="base64-UTF8" key="NSContents">UGFzc3dvcmQ6Cg</string>
+ <string key="NSContents">Password:</string>
<reference key="NSSupport" ref="897649771"/>
<reference key="NSControlView" ref="833115728"/>
<reference key="NSBackgroundColor" ref="475108766"/>
@@ -234,7 +231,7 @@ gJ0gb24gd3d3LnNlcnZlci5jb20uCi4uA</string>
</object>
<object class="NSImageView" id="285173040">
<reference key="NSNextResponder" ref="327235052"/>
- <int key="NSvFlags">256</int>
+ <int key="NSvFlags">268</int>
<object class="NSMutableSet" key="NSDragTypes">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMutableArray" key="set.sortedObjects">
@@ -247,7 +244,7 @@ gJ0gb24gd3d3LnNlcnZlci5jb20uCi4uA</string>
<string>NeXT TIFF v4.0 pasteboard type</string>
</object>
</object>
- <string key="NSFrame">{{20, 155}, {64, 64}}</string>
+ <string key="NSFrame">{{20, 195}, {64, 64}}</string>
<reference key="NSSuperview" ref="327235052"/>
<bool key="NSEnabled">YES</bool>
<object class="NSImageCell" key="NSCell" id="375502905">
@@ -262,7 +259,7 @@ gJ0gb24gd3d3LnNlcnZlci5jb20uCi4uA</string>
</object>
<object class="NSButton" id="657854151">
<reference key="NSNextResponder" ref="327235052"/>
- <int key="NSvFlags">289</int>
+ <int key="NSvFlags">292</int>
<string key="NSFrame">{{102, 58}, {280, 18}}</string>
<reference key="NSSuperview" ref="327235052"/>
<bool key="NSEnabled">YES</bool>
@@ -283,13 +280,35 @@ gJ0gb24gd3d3LnNlcnZlci5jb20uCi4uA</string>
<int key="NSPeriodicInterval">25</int>
</object>
</object>
+ <object class="NSTextField" id="1000280557">
+ <reference key="NSNextResponder" ref="327235052"/>
+ <int key="NSvFlags">290</int>
+ <string key="NSFrame">{{113, 175}, {282, 42}}</string>
+ <reference key="NSSuperview" ref="327235052"/>
+ <int key="NSTag">3</int>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="96725843">
+ <int key="NSCellFlags">-2078147071</int>
+ <int key="NSCellFlags2">4194560</int>
+ <string type="base64-UTF8" key="NSContents">R29vZ2xlIEFjY291bnQgKGh0dHBzOi8vd3d3Lmdvb2dsZS5jb20vKScnIENlcnRpZmllZCBieTogVmVy
+aVNpZ24gSW5jLiBHZXQgbW9yZSBpbmZvcm1hdGlvbiBieSBjbGlja2luZyAnJ0NlcnRpZmljYXRlA</string>
+ <object class="NSFont" key="NSSupport">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">1.100000e+01</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ <int key="NSTag">3</int>
+ <reference key="NSControlView" ref="1000280557"/>
+ <reference key="NSBackgroundColor" ref="301231121"/>
+ <reference key="NSTextColor" ref="577315227"/>
+ </object>
+ </object>
</object>
- <string key="NSFrameSize">{424, 239}</string>
+ <string key="NSFrameSize">{424, 279}</string>
<reference key="NSSuperview"/>
</object>
<string key="NSScreenRect">{{0, 0}, {2560, 1578}}</string>
- <string key="NSMinSize">{300, 122}</string>
- <string key="NSMaxSize">{500, 224}</string>
+ <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
<string key="NSFrameAutosaveName">Authentication Panel</string>
</object>
</object>
@@ -432,13 +451,29 @@ gJ0gb24gd3d3LnNlcnZlci5jb20uCi4uA</string>
</object>
<int key="connectionID">100046</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">nextKeyView</string>
+ <reference key="source" ref="1000280557"/>
+ <reference key="destination" ref="368270689"/>
+ </object>
+ <int key="connectionID">100051</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">separateRealmLabel</string>
+ <reference key="source" ref="238662661"/>
+ <reference key="destination" ref="1000280557"/>
+ </object>
+ <int key="connectionID">100057</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBObjectRecord">
<int key="objectID">0</int>
- <object class="NSArray" key="object" id="0">
+ <object class="NSArray" key="object" id="498544300">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<reference key="children" ref="563121920"/>
@@ -447,19 +482,19 @@ gJ0gb24gd3d3LnNlcnZlci5jb20uCi4uA</string>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="238662661"/>
- <reference key="parent" ref="0"/>
+ <reference key="parent" ref="498544300"/>
<string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="729335755"/>
- <reference key="parent" ref="0"/>
+ <reference key="parent" ref="498544300"/>
<string key="objectName">First Responder</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-3</int>
<reference key="object" ref="239643893"/>
- <reference key="parent" ref="0"/>
+ <reference key="parent" ref="498544300"/>
<string key="objectName">Application</string>
</object>
<object class="IBObjectRecord">
@@ -469,7 +504,7 @@ gJ0gb24gd3d3LnNlcnZlci5jb20uCi4uA</string>
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="327235052"/>
</object>
- <reference key="parent" ref="0"/>
+ <reference key="parent" ref="498544300"/>
<string key="objectName">Panel</string>
</object>
<object class="IBObjectRecord">
@@ -477,8 +512,6 @@ gJ0gb24gd3d3LnNlcnZlci5jb20uCi4uA</string>
<reference key="object" ref="327235052"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="705333610"/>
- <reference ref="199018347"/>
<reference ref="305175176"/>
<reference ref="494193237"/>
<reference ref="71972597"/>
@@ -487,6 +520,9 @@ gJ0gb24gd3d3LnNlcnZlci5jb20uCi4uA</string>
<reference ref="833115728"/>
<reference ref="285173040"/>
<reference ref="657854151"/>
+ <reference ref="705333610"/>
+ <reference ref="199018347"/>
+ <reference ref="1000280557"/>
</object>
<reference key="parent" ref="118512579"/>
</object>
@@ -630,18 +666,43 @@ gJ0gb24gd3d3LnNlcnZlci5jb20uCi4uA</string>
<reference key="object" ref="358614001"/>
<reference key="parent" ref="657854151"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100047</int>
+ <reference key="object" ref="1000280557"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="96725843"/>
+ </object>
+ <reference key="parent" ref="327235052"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100050</int>
+ <reference key="object" ref="96725843"/>
+ <reference key="parent" ref="1000280557"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMutableArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
- <string>-1.IBPluginDependency</string>
- <string>-2.IBPluginDependency</string>
<string>-3.IBPluginDependency</string>
<string>-3.ImportedFromIB2</string>
<string>10.IBPluginDependency</string>
<string>10.ImportedFromIB2</string>
+ <string>100010.IBPluginDependency</string>
+ <string>100011.IBPluginDependency</string>
+ <string>100012.IBPluginDependency</string>
+ <string>100013.IBPluginDependency</string>
+ <string>100014.IBPluginDependency</string>
+ <string>100015.IBPluginDependency</string>
+ <string>100016.IBPluginDependency</string>
+ <string>100017.IBPluginDependency</string>
+ <string>100019.IBPluginDependency</string>
+ <string>100039.IBPluginDependency</string>
+ <string>100047.IBPluginDependency</string>
+ <string>100047.ImportedFromIB2</string>
+ <string>100050.IBPluginDependency</string>
<string>11.IBPluginDependency</string>
<string>11.ImportedFromIB2</string>
<string>12.IBPluginDependency</string>
@@ -663,6 +724,7 @@ gJ0gb24gd3d3LnNlcnZlci5jb20uCi4uA</string>
<string>39.ImportedFromIB2</string>
<string>5.IBEditorWindowLastContentRect</string>
<string>5.IBPluginDependency</string>
+ <string>5.IBViewEditorWindowController.showingLayoutRectangles</string>
<string>5.IBWindowTemplateEditedContentRect</string>
<string>5.ImportedFromIB2</string>
<string>5.windowTemplate.hasMaxSize</string>
@@ -675,40 +737,52 @@ gJ0gb24gd3d3LnNlcnZlci5jb20uCi4uA</string>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" id="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" id="5"/>
+ <reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <reference ref="5"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <reference ref="5"/>
+ <reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <reference ref="5"/>
+ <reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <reference ref="5"/>
+ <reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <reference ref="5"/>
+ <reference ref="9"/>
<string>NSSecureTextField</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <reference ref="5"/>
+ <reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <reference ref="5"/>
+ <reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <reference ref="5"/>
+ <reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <reference ref="5"/>
+ <reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <reference ref="5"/>
- <string>{{0, 1306}, {424, 239}}</string>
+ <reference ref="9"/>
+ <string>{{288, 709}, {424, 279}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{0, 1306}, {424, 239}}</string>
- <reference ref="5"/>
- <reference ref="5"/>
- <reference ref="5"/>
- <string>{500, 202}</string>
- <string>{300, 100}</string>
+ <integer value="1"/>
+ <string>{{288, 709}, {424, 279}}</string>
+ <reference ref="9"/>
+ <integer value="0" id="6"/>
+ <reference ref="6"/>
+ <string>{424, 282}</string>
+ <string>{424, 282}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <reference ref="5"/>
+ <reference ref="9"/>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
@@ -731,7 +805,7 @@ gJ0gb24gd3d3LnNlcnZlci5jb20uCi4uA</string>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">100046</int>
+ <int key="maxID">100057</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -745,50 +819,6 @@ gJ0gb24gd3d3LnNlcnZlci5jb20uCi4uA</string>
</object>
</object>
<object class="IBPartialClassDescription">
- <string key="className">IFAuthenticationPanel</string>
- <string key="superclassName">NSObject</string>
- <object class="NSMutableDictionary" key="actions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>cancel:</string>
- <string>logIn:</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>id</string>
- <string>id</string>
- </object>
- </object>
- <object class="NSMutableDictionary" key="outlets">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>imageView</string>
- <string>mainLabel</string>
- <string>panel</string>
- <string>password</string>
- <string>remember</string>
- <string>smallLabel</string>
- <string>username</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- </object>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBUserSource</string>
- <string key="minorKey"/>
- </object>
- </object>
- <object class="IBPartialClassDescription">
<string key="className">NSControl</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
@@ -1016,7 +1046,7 @@ gJ0gb24gd3d3LnNlcnZlci5jb20uCi4uA</string>
<object class="IBPartialClassDescription">
<string key="className">NonBlockingPanel</string>
<string key="superclassName">NSPanel</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="1064703436">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">mac/Panels/WebAuthenticationPanel.h</string>
</object>
@@ -1030,6 +1060,51 @@ gJ0gb24gd3d3LnNlcnZlci5jb20uCi4uA</string>
</object>
</object>
<object class="IBPartialClassDescription">
+ <string key="className">WebAuthenticationPanel</string>
+ <string key="superclassName">NSObject</string>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>cancel:</string>
+ <string>logIn:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>callback</string>
+ <string>imageView</string>
+ <string>mainLabel</string>
+ <string>panel</string>
+ <string>password</string>
+ <string>remember</string>
+ <string>separateRealmLabel</string>
+ <string>smallLabel</string>
+ <string>username</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ </object>
+ </object>
+ <reference key="sourceIdentifier" ref="1064703436"/>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">WebView</string>
<string key="superclassName">NSView</string>
<object class="NSMutableDictionary" key="actions">
diff --git a/WebKit/mac/Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib b/WebKit/mac/Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib
index 207cdb3..12b1f8d 100644
--- a/WebKit/mac/Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib
+++ b/WebKit/mac/Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib
Binary files differ
diff --git a/WebKit/mac/Panels/WebAuthenticationPanel.h b/WebKit/mac/Panels/WebAuthenticationPanel.h
index 3e08857..bb22dd4 100644
--- a/WebKit/mac/Panels/WebAuthenticationPanel.h
+++ b/WebKit/mac/Panels/WebAuthenticationPanel.h
@@ -40,6 +40,7 @@
IBOutlet id username;
IBOutlet id imageView;
IBOutlet id remember;
+ IBOutlet NSTextField *separateRealmLabel;
BOOL nibLoaded;
BOOL usingSheet;
id callback;
diff --git a/WebKit/mac/Panels/WebAuthenticationPanel.m b/WebKit/mac/Panels/WebAuthenticationPanel.m
index e0efef7..f207d0c 100644
--- a/WebKit/mac/Panels/WebAuthenticationPanel.m
+++ b/WebKit/mac/Panels/WebAuthenticationPanel.m
@@ -131,15 +131,23 @@
NSString *realm = [space realm];
NSString *message;
+ // Consider the realm name to be "simple" if it does not contain any whitespace or newline characters.
+ // If the realm name is determined to be complex, we will use a slightly different sheet layout, designed
+ // to keep a malicious realm name from spoofing the wording in the sheet text.
+ BOOL realmNameIsSimple = [realm rangeOfCharacterFromSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]].location == NSNotFound;
+
if ([chall previousFailureCount] == 0) {
if ([space isProxy]) {
message = [NSString stringWithFormat:UI_STRING("To view this page, you must log in to the %@ proxy server %@.",
"prompt string in authentication panel"),
[space proxyType], host];
} else {
- message = [NSString stringWithFormat:UI_STRING("To view this page, you must log in to area “%@” on %@.",
- "prompt string in authentication panel"),
- realm, host];
+ if (realmNameIsSimple)
+ message = [NSString stringWithFormat:UI_STRING("To view this page, you must log in to area “%@” on %@.",
+ "prompt string in authentication panel"), realm, host];
+ else
+ message = [NSString stringWithFormat:UI_STRING("To view this page, you must log in to this area on %@:",
+ "prompt string in authentication panel"), host];
}
} else {
if ([space isProxy]) {
@@ -147,12 +155,41 @@
"prompt string in authentication panel"),
[space proxyType], host];
} else {
- message = [NSString stringWithFormat:UI_STRING("The user name or password you entered for area “%@” on %@ was incorrect. Make sure you’re entering them correctly, and then try again.",
- "prompt string in authentication panel"),
- realm, host];
+ if (realmNameIsSimple)
+ message = [NSString stringWithFormat:UI_STRING("The user name or password you entered for area “%@” on %@ was incorrect. Make sure you’re entering them correctly, and then try again.",
+ "prompt string in authentication panel"), realm, host];
+ else
+ message = [NSString stringWithFormat:UI_STRING("The user name or password you entered for this area on %@ was incorrect. Make sure you’re entering them correctly, and then try again.",
+ "prompt string in authentication panel"), host];
}
}
-
+
+ if (![space isProxy] && !realmNameIsSimple) {
+ [separateRealmLabel setHidden:NO];
+ [separateRealmLabel setStringValue:realm];
+ [separateRealmLabel setAutoresizingMask:NSViewMinYMargin];
+ [separateRealmLabel sizeToFitAndAdjustWindowHeight];
+ [separateRealmLabel setAutoresizingMask:NSViewMaxYMargin];
+ } else {
+ // In the proxy or "simple" realm name case, we need to hide the 'separateRealmLabel'
+ // and move the rest of the contents up appropriately to fill the space.
+ NSRect mainLabelFrame = [mainLabel frame];
+ NSRect realmFrame = [separateRealmLabel frame];
+ NSRect smallLabelFrame = [smallLabel frame];
+
+ // Find the distance between the 'smallLabel' and the label above it, initially the 'separateRealmLabel'.
+ // Then, find the current distance between 'smallLabel' and 'mainLabel'. The difference between
+ // these two is how much shorter the panel needs to be after hiding the 'separateRealmLabel'.
+ CGFloat smallLabelMargin = NSMinY(realmFrame) - NSMaxY(smallLabelFrame);
+ CGFloat smallLabelToMainLabel = NSMinY(mainLabelFrame) - NSMaxY(smallLabelFrame);
+ CGFloat deltaMargin = smallLabelToMainLabel - smallLabelMargin;
+
+ [separateRealmLabel setHidden:YES];
+ NSRect windowFrame = [panel frame];
+ windowFrame.size.height -= deltaMargin;
+ [panel setFrame:windowFrame display:NO];
+ }
+
[mainLabel setStringValue:message];
[mainLabel sizeToFitAndAdjustWindowHeight];
diff --git a/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.h b/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.h
index 539372c..72e845b 100644
--- a/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.h
+++ b/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.h
@@ -51,13 +51,18 @@ public:
{
return adoptRef(new HostedNetscapePluginStream(instance, streamID, request));
}
-
+ static PassRefPtr<HostedNetscapePluginStream> create(NetscapePluginInstanceProxy* instance, WebCore::FrameLoader* frameLoader)
+ {
+ return adoptRef(new HostedNetscapePluginStream(instance, frameLoader));
+ }
+
uint32_t streamID() const { return m_streamID; }
void startStreamWithResponse(NSURLResponse *response);
void didReceiveData(WebCore::NetscapePlugInStreamLoader*, const char* bytes, int length);
void didFinishLoading(WebCore::NetscapePlugInStreamLoader*);
-
+ void didFail(WebCore::NetscapePlugInStreamLoader*, const WebCore::ResourceError&);
+
void start();
void stop();
@@ -68,6 +73,7 @@ private:
void cancelLoad(NSError *);
HostedNetscapePluginStream(NetscapePluginInstanceProxy*, uint32_t streamID, NSURLRequest *);
+ HostedNetscapePluginStream(NetscapePluginInstanceProxy*, WebCore::FrameLoader*);
void startStream(NSURL *, long long expectedContentLength, NSDate *lastModifiedDate, NSString *mimeType, NSData *headers);
@@ -75,7 +81,6 @@ private:
// NetscapePlugInStreamLoaderClient methods.
void didReceiveResponse(WebCore::NetscapePlugInStreamLoader*, const WebCore::ResourceResponse&);
- void didFail(WebCore::NetscapePlugInStreamLoader*, const WebCore::ResourceError&);
bool wantsAllStreams() const;
RefPtr<NetscapePluginInstanceProxy> m_instance;
diff --git a/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm b/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm
index c2abc92..63e18a0 100644
--- a/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm
+++ b/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm
@@ -57,6 +57,14 @@ HostedNetscapePluginStream::HostedNetscapePluginStream(NetscapePluginInstancePro
[m_request.get() _web_setHTTPReferrer:nil];
}
+HostedNetscapePluginStream::HostedNetscapePluginStream(NetscapePluginInstanceProxy* instance, WebCore::FrameLoader* frameLoader)
+ : m_instance(instance)
+ , m_streamID(1)
+ , m_isTerminated(false)
+ , m_frameLoader(frameLoader)
+{
+}
+
void HostedNetscapePluginStream::startStreamWithResponse(NSURLResponse *response)
{
didReceiveResponse(0, response);
@@ -152,7 +160,7 @@ void HostedNetscapePluginStream::didReceiveResponse(NetscapePlugInStreamLoader*,
[theHeaders appendBytes:"\0" length:1];
}
- startStream([r URL], expectedContentLength, WKGetNSURLResponseLastModifiedDate(r), [r _webcore_MIMEType], theHeaders);
+ startStream([r URL], expectedContentLength, WKGetNSURLResponseLastModifiedDate(r), [r MIMEType], theHeaders);
}
static NPReason reasonForError(NSError *error)
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h b/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h
index d550dac..a1d9bad 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h
@@ -43,12 +43,14 @@ class NetscapePluginHostManager {
public:
static NetscapePluginHostManager& shared();
- PassRefPtr<NetscapePluginInstanceProxy> instantiatePlugin(WebNetscapePluginPackage *, WebHostedNetscapePluginView *, NSString *mimeType, NSArray *attributeKeys, NSArray *attributeValues, NSString *userAgent, NSURL *sourceURL);
+ PassRefPtr<NetscapePluginInstanceProxy> instantiatePlugin(WebNetscapePluginPackage *, WebHostedNetscapePluginView *, NSString *mimeType, NSArray *attributeKeys, NSArray *attributeValues, NSString *userAgent, NSURL *sourceURL, bool fullFrame);
void pluginHostDied(NetscapePluginHostProxy*);
static void createPropertyListFile(WebNetscapePluginPackage *);
+ void didCreateWindow();
+
private:
NetscapePluginHostProxy* hostForPackage(WebNetscapePluginPackage *);
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm
index 08a6d6a..4aa290a 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm
@@ -29,6 +29,7 @@
#import "NetscapePluginHostProxy.h"
#import "NetscapePluginInstanceProxy.h"
+#import "WebLocalizableStrings.h"
#import "WebKitSystemInterface.h"
#import "WebNetscapePluginPackage.h"
#import <mach/mach_port.h>
@@ -74,17 +75,24 @@ NetscapePluginHostProxy* NetscapePluginHostManager::hostForPackage(WebNetscapePl
return result.first->second;
mach_port_t clientPort;
- if (mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &clientPort) != KERN_SUCCESS)
+ if (mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &clientPort) != KERN_SUCCESS) {
+ m_pluginHosts.remove(result.first);
return 0;
+ }
mach_port_t pluginHostPort;
ProcessSerialNumber pluginHostPSN;
if (!spawnPluginHost(package, clientPort, pluginHostPort, pluginHostPSN)) {
mach_port_destroy(mach_task_self(), clientPort);
+ m_pluginHosts.remove(result.first);
return 0;
}
- NetscapePluginHostProxy* hostProxy = new NetscapePluginHostProxy(clientPort, pluginHostPort, pluginHostPSN);
+ // 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"];
+
+ NetscapePluginHostProxy* hostProxy = new NetscapePluginHostProxy(clientPort, pluginHostPort, pluginHostPSN, shouldCacheMissingPropertiesAndMethods);
CFRetain(package);
result.first->second = hostProxy;
@@ -106,9 +114,12 @@ bool NetscapePluginHostManager::spawnPluginHost(WebNetscapePluginPackage *packag
NSString *pluginHostAppPath = [[NSBundle bundleWithIdentifier:@"com.apple.WebKit"] pathForAuxiliaryExecutable:pluginHostAppName];
NSString *pluginHostAppExecutablePath = [[NSBundle bundleWithPath:pluginHostAppPath] executablePath];
+ RetainPtr<CFStringRef> localization(AdoptCF, WKCopyCFLocalizationPreferredName(NULL));
+
NSDictionary *launchProperties = [[NSDictionary alloc] initWithObjectsAndKeys:
pluginHostAppExecutablePath, @"pluginHostPath",
[NSNumber numberWithInt:[package pluginHostArchitecture]], @"cpuType",
+ localization.get(), @"localization",
nil];
NSData *data = [NSPropertyListSerialization dataFromPropertyList:launchProperties format:NSPropertyListBinaryFormat_v1_0 errorDescription:0];
@@ -134,7 +145,10 @@ bool NetscapePluginHostManager::spawnPluginHost(WebNetscapePluginPackage *packag
return false;
}
- NSString *visibleName = [NSString stringWithFormat:@"%@ Plug-in Host - %@", [[NSProcessInfo processInfo] processName], [package filename]];
+ 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]];
NSDictionary *hostProperties = [[NSDictionary alloc] initWithObjectsAndKeys:
visibleName, @"visibleName",
@@ -197,7 +211,7 @@ void NetscapePluginHostManager::pluginHostDied(NetscapePluginHostProxy* pluginHo
}
}
-PassRefPtr<NetscapePluginInstanceProxy> NetscapePluginHostManager::instantiatePlugin(WebNetscapePluginPackage *pluginPackage, WebHostedNetscapePluginView *pluginView, NSString *mimeType, NSArray *attributeKeys, NSArray *attributeValues, NSString *userAgent, NSURL *sourceURL)
+PassRefPtr<NetscapePluginInstanceProxy> NetscapePluginHostManager::instantiatePlugin(WebNetscapePluginPackage *pluginPackage, WebHostedNetscapePluginView *pluginView, NSString *mimeType, NSArray *attributeKeys, NSArray *attributeValues, NSString *userAgent, NSURL *sourceURL, bool fullFrame)
{
NetscapePluginHostProxy* hostProxy = hostForPackage(pluginPackage);
if (!hostProxy)
@@ -220,13 +234,18 @@ PassRefPtr<NetscapePluginInstanceProxy> NetscapePluginHostManager::instantiatePl
if (sourceURL)
[properties.get() setObject:[sourceURL absoluteString] forKey:@"sourceURL"];
+ [properties.get() setObject:[NSNumber numberWithBool:fullFrame] forKey:@"fullFrame"];
+
NSData *data = [NSPropertyListSerialization dataFromPropertyList:properties.get() format:NSPropertyListBinaryFormat_v1_0 errorDescription:nil];
ASSERT(data);
- RefPtr<NetscapePluginInstanceProxy> instance = NetscapePluginInstanceProxy::create(hostProxy, pluginView);
+ RefPtr<NetscapePluginInstanceProxy> instance = NetscapePluginInstanceProxy::create(hostProxy, pluginView, fullFrame);
uint32_t requestID = instance->nextRequestID();
kern_return_t kr = _WKPHInstantiatePlugin(hostProxy->port(), requestID, (uint8_t*)[data bytes], [data length], instance->pluginID());
if (kr == MACH_SEND_INVALID_DEST) {
+ // Invalidate the instance.
+ instance->invalidate();
+
// The plug-in host must have died, but we haven't received the death notification yet.
pluginHostDied(hostProxy);
@@ -234,14 +253,14 @@ PassRefPtr<NetscapePluginInstanceProxy> NetscapePluginHostManager::instantiatePl
hostProxy = hostForPackage(pluginPackage);
// Create a new instance.
- instance = NetscapePluginInstanceProxy::create(hostProxy, pluginView);
+ instance = NetscapePluginInstanceProxy::create(hostProxy, pluginView, fullFrame);
requestID = instance->nextRequestID();
kr = _WKPHInstantiatePlugin(hostProxy->port(), requestID, (uint8_t*)[data bytes], [data length], instance->pluginID());
}
auto_ptr<NetscapePluginInstanceProxy::InstantiatePluginReply> reply = instance->waitForReply<NetscapePluginInstanceProxy::InstantiatePluginReply>(requestID);
if (!reply.get() || reply->m_resultCode != KERN_SUCCESS) {
- instance->invalidate();
+ instance->cleanup();
return 0;
}
@@ -278,6 +297,22 @@ void NetscapePluginHostManager::createPropertyListFile(WebNetscapePluginPackage
}
}
+void NetscapePluginHostManager::didCreateWindow()
+{
+ // See if any of our hosts are in full-screen mode.
+ PluginHostMap::iterator end = m_pluginHosts.end();
+ for (PluginHostMap::iterator it = m_pluginHosts.begin(); it != end; ++it) {
+ NetscapePluginHostProxy* hostProxy = it->second;
+
+ if (!hostProxy->isMenuBarVisible()) {
+ // Make ourselves the front process.
+ ProcessSerialNumber psn;
+ GetCurrentProcess(&psn);
+ SetFrontProcess(&psn);
+ return;
+ }
+ }
+}
} // namespace WebKit
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.h b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.h
index 4676f47..c3b58de 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.h
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.h
@@ -33,13 +33,15 @@
#include <wtf/RetainPtr.h>
#include <wtf/PassRefPtr.h>
+@class WebPlaceholderModalWindow;
+
namespace WebKit {
class NetscapePluginInstanceProxy;
class NetscapePluginHostProxy {
public:
- NetscapePluginHostProxy(mach_port_t clientPort, mach_port_t pluginHostPort, const ProcessSerialNumber& pluginHostPSN);
+ 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; }
@@ -49,12 +51,17 @@ public:
NetscapePluginInstanceProxy* pluginInstance(uint32_t pluginID);
+ bool isMenuBarVisible() const { return m_menuBarIsVisible; }
void setMenuBarVisible(bool);
+
void setModal(bool);
void applicationDidBecomeActive();
bool processRequests();
+ bool isProcessingRequests() const { return m_processingRequests; }
+
+ bool shouldCacheMissingPropertiesAndMethods() const { return m_shouldCacheMissingPropertiesAndMethods; }
private:
~NetscapePluginHostProxy();
@@ -80,10 +87,14 @@ private:
RetainPtr<CFMachPortRef> m_deadNameNotificationPort;
RetainPtr<id> m_activationObserver;
- RetainPtr<NSWindow *> m_placeholderWindow;
+ RetainPtr<WebPlaceholderModalWindow *> m_placeholderWindow;
unsigned m_isModal;
bool m_menuBarIsVisible;
const ProcessSerialNumber m_pluginHostPSN;
+
+ unsigned m_processingRequests;
+
+ bool m_shouldCacheMissingPropertiesAndMethods;
};
} // namespace WebKit
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
index c0beb2f..e8874cd 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
@@ -49,6 +49,18 @@ using namespace std;
using namespace JSC;
using namespace WebCore;
+@interface WebPlaceholderModalWindow : NSWindow
+@end
+
+@implementation WebPlaceholderModalWindow
+// Prevent NSApp from calling requestUserAttention: when the window is shown
+// modally, even if the app is inactive. See 6823049.
+- (BOOL)_wantsUserAttention
+{
+ return NO;
+}
+@end
+
namespace WebKit {
class PluginDestroyDeferrer {
@@ -76,13 +88,15 @@ static PluginProxyMap& pluginProxyMap()
return pluginProxyMap;
}
-NetscapePluginHostProxy::NetscapePluginHostProxy(mach_port_t clientPort, mach_port_t pluginHostPort, const ProcessSerialNumber& pluginHostPSN)
+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_pluginHostPSN(pluginHostPSN)
+ , m_processingRequests(0)
+ , m_shouldCacheMissingPropertiesAndMethods(shouldCacheMissingPropertiesAndMethods)
{
pluginProxyMap().add(m_clientPort, this);
@@ -201,7 +215,7 @@ void NetscapePluginHostProxy::beginModal()
ASSERT(!m_placeholderWindow);
ASSERT(!m_activationObserver);
- m_placeholderWindow.adoptNS([[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 1, 1) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES]);
+ m_placeholderWindow.adoptNS([[WebPlaceholderModalWindow alloc] initWithContentRect:NSMakeRect(0, 0, 1, 1) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES]);
m_activationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSApplicationWillBecomeActiveNotification object:NSApp queue:nil
usingBlock:^(NSNotification *){ applicationDidBecomeActive(); }];
@@ -210,6 +224,9 @@ void NetscapePluginHostProxy::beginModal()
CFRunLoopAddSource(CFRunLoopGetCurrent(), m_clientPortSource.get(), (CFStringRef)NSModalPanelRunLoopMode);
[NSApp runModalForWindow:m_placeholderWindow.get()];
+
+ [m_placeholderWindow.get() orderOut:nil];
+ m_placeholderWindow = 0;
}
void NetscapePluginHostProxy::endModal()
@@ -223,8 +240,6 @@ void NetscapePluginHostProxy::endModal()
CFRunLoopRemoveSource(CFRunLoopGetCurrent(), m_clientPortSource.get(), (CFStringRef)NSModalPanelRunLoopMode);
[NSApp stopModal];
- [m_placeholderWindow.get() orderOut:nil];
- m_placeholderWindow = 0;
// Make ourselves the front process.
ProcessSerialNumber psn;
@@ -248,7 +263,9 @@ void NetscapePluginHostProxy::setModal(bool modal)
bool NetscapePluginHostProxy::processRequests()
{
- if (!m_portSet) {
+ m_processingRequests++;
+
+ if (!m_portSet) {
mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_PORT_SET, &m_portSet);
mach_port_insert_member(mach_task_self(), m_clientPort, m_portSet);
mach_port_insert_member(mach_task_self(), CFMachPortGetPort(m_deadNameNotificationPort.get()), m_portSet);
@@ -262,6 +279,7 @@ bool NetscapePluginHostProxy::processRequests()
if (kr != KERN_SUCCESS) {
LOG_ERROR("Could not receive mach message, error %x", kr);
+ m_processingRequests--;
return false;
}
@@ -274,20 +292,24 @@ bool NetscapePluginHostProxy::processRequests()
if (kr != KERN_SUCCESS) {
LOG_ERROR("Could not send mach message, error %x", kr);
+ m_processingRequests--;
return false;
}
}
+ m_processingRequests--;
return true;
}
if (msg->msgh_local_port == CFMachPortGetPort(m_deadNameNotificationPort.get())) {
ASSERT(msg->msgh_id == MACH_NOTIFY_DEAD_NAME);
pluginHostDied();
+ m_processingRequests--;
return false;
}
ASSERT_NOT_REACHED();
+ m_processingRequests--;
return false;
}
@@ -368,11 +390,9 @@ kern_return_t WKPCCancelLoadURL(mach_port_t clientPort, uint32_t pluginID, uint3
if (!instanceProxy)
return KERN_FAILURE;
- HostedNetscapePluginStream* pluginStream = instanceProxy->pluginStream(streamID);
- if (!pluginStream)
+ if (!instanceProxy->cancelStreamLoad(streamID, reason))
return KERN_FAILURE;
-
- pluginStream->cancelLoad(reason);
+
return KERN_SUCCESS;
}
@@ -380,13 +400,22 @@ kern_return_t WKPCInvalidateRect(mach_port_t clientPort, uint32_t pluginID, doub
{
NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort);
if (!hostProxy)
- return KERN_FAILURE;
-
- NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID);
- if (!instanceProxy)
- return KERN_FAILURE;
+ return KERN_SUCCESS;
+
+ if (!hostProxy->isProcessingRequests()) {
+ if (NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID))
+ instanceProxy->invalidateRect(x, y, width, height);
+ return KERN_SUCCESS;
+ }
+
+ // Defer the work
+ CFRunLoopPerformBlock(CFRunLoopGetMain(), kCFRunLoopDefaultMode, ^{
+ if (NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort)) {
+ if (NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID))
+ instanceProxy->invalidateRect(x, y, width, height);
+ }
+ });
- instanceProxy->invalidateRect(x, y, width, height);
return KERN_SUCCESS;
}
@@ -500,7 +529,7 @@ kern_return_t WKPCReleaseObject(mach_port_t clientPort, uint32_t pluginID, uint3
return KERN_SUCCESS;
}
-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)
+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)
{
DataDeallocator deallocator(scriptData, scriptLength);
@@ -509,8 +538,10 @@ kern_return_t WKPCEvaluate(mach_port_t clientPort, uint32_t pluginID, uint32_t r
return KERN_FAILURE;
NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID);
- if (!instanceProxy)
- return KERN_FAILURE;
+ if (!instanceProxy) {
+ _WKPHBooleanAndDataReply(hostProxy->port(), pluginID, requestID, false, 0, 0);
+ return KERN_SUCCESS;
+ }
PluginDestroyDeferrer deferrer(instanceProxy);
@@ -518,7 +549,7 @@ 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);
+ boolean_t returnValue = instanceProxy->evaluate(objectID, script, resultData, resultLength, allowPopups);
_WKPHBooleanAndDataReply(hostProxy->port(), instanceProxy->pluginID(), requestID, returnValue, resultData, resultLength);
if (resultData)
@@ -564,8 +595,10 @@ kern_return_t WKPCInvoke(mach_port_t clientPort, uint32_t pluginID, uint32_t req
return KERN_FAILURE;
NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID);
- if (!instanceProxy)
- return KERN_FAILURE;
+ if (!instanceProxy) {
+ _WKPHBooleanAndDataReply(hostProxy->port(), pluginID, requestID, false, 0, 0);
+ return KERN_SUCCESS;
+ }
PluginDestroyDeferrer deferrer(instanceProxy);
@@ -598,8 +631,10 @@ kern_return_t WKPCInvokeDefault(mach_port_t clientPort, uint32_t pluginID, uint3
return KERN_FAILURE;
NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID);
- if (!instanceProxy)
- return KERN_FAILURE;
+ if (!instanceProxy) {
+ _WKPHBooleanAndDataReply(hostProxy->port(), pluginID, requestID, false, 0, 0);
+ return KERN_SUCCESS;
+ }
PluginDestroyDeferrer deferrer(instanceProxy);
@@ -642,12 +677,16 @@ kern_return_t WKPCGetProperty(mach_port_t clientPort, uint32_t pluginID, uint32_
return KERN_FAILURE;
NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID);
- if (!instanceProxy)
- return KERN_FAILURE;
+ if (!instanceProxy) {
+ _WKPHBooleanAndDataReply(hostProxy->port(), pluginID, requestID, false, 0, 0);
+ return KERN_SUCCESS;
+ }
IdentifierRep* identifier = reinterpret_cast<IdentifierRep*>(serverIdentifier);
- if (!IdentifierRep::isValid(identifier))
- return KERN_FAILURE;
+ if (!IdentifierRep::isValid(identifier)) {
+ _WKPHBooleanAndDataReply(hostProxy->port(), pluginID, requestID, false, 0, 0);
+ return KERN_SUCCESS;
+ }
PluginDestroyDeferrer deferrer(instanceProxy);
@@ -727,8 +766,10 @@ kern_return_t WKPCHasProperty(mach_port_t clientPort, uint32_t pluginID, uint32_
return KERN_FAILURE;
NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID);
- if (!instanceProxy)
- return KERN_FAILURE;
+ if (!instanceProxy) {
+ _WKPHBooleanReply(hostProxy->port(), pluginID, requestID, false);
+ return KERN_SUCCESS;
+ }
PluginDestroyDeferrer deferrer(instanceProxy);
@@ -757,8 +798,10 @@ kern_return_t WKPCHasMethod(mach_port_t clientPort, uint32_t pluginID, uint32_t
return KERN_FAILURE;
NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID);
- if (!instanceProxy)
- return KERN_FAILURE;
+ if (!instanceProxy) {
+ _WKPHBooleanReply(hostProxy->port(), pluginID, requestID, false);
+ return KERN_SUCCESS;
+ }
PluginDestroyDeferrer deferrer(instanceProxy);
@@ -807,8 +850,10 @@ kern_return_t WKPCEnumerate(mach_port_t clientPort, uint32_t pluginID, uint32_t
return KERN_FAILURE;
NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID);
- if (!instanceProxy)
- return KERN_FAILURE;
+ if (!instanceProxy) {
+ _WKPHBooleanAndDataReply(hostProxy->port(), pluginID, requestID, false, 0, 0);
+ return KERN_SUCCESS;
+ }
data_t resultData = 0;
mach_msg_type_number_t resultLength = 0;
@@ -844,4 +889,172 @@ kern_return_t WKPCSetModal(mach_port_t clientPort, boolean_t modal)
return KERN_SUCCESS;
}
+kern_return_t WKPCGetCookies(mach_port_t clientPort, uint32_t pluginID,
+ data_t urlData, mach_msg_type_number_t urlLength,
+ boolean_t* returnValue, data_t* cookiesData, mach_msg_type_number_t* cookiesLength)
+{
+ *cookiesData = 0;
+ *cookiesLength = 0;
+
+ DataDeallocator deallocator(urlData, urlLength);
+
+ NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort);
+ if (!hostProxy)
+ return KERN_FAILURE;
+
+ NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID);
+ if (!instanceProxy)
+ return KERN_FAILURE;
+
+ *returnValue = instanceProxy->getCookies(urlData, urlLength, *cookiesData, *cookiesLength);
+
+ return KERN_SUCCESS;
+}
+
+kern_return_t WKPCGetProxy(mach_port_t clientPort, uint32_t pluginID,
+ data_t urlData, mach_msg_type_number_t urlLength,
+ boolean_t* returnValue, data_t* proxyData, mach_msg_type_number_t* proxyLength)
+{
+ *proxyData = 0;
+ *proxyLength = 0;
+
+ DataDeallocator deallocator(urlData, urlLength);
+
+ NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort);
+ if (!hostProxy)
+ return KERN_FAILURE;
+
+ NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID);
+ if (!instanceProxy)
+ return KERN_FAILURE;
+
+ *returnValue = instanceProxy->getProxy(urlData, urlLength, *proxyData, *proxyLength);
+
+ return KERN_SUCCESS;
+}
+
+kern_return_t WKPCSetCookies(mach_port_t clientPort, uint32_t pluginID,
+ data_t urlData, mach_msg_type_number_t urlLength,
+ data_t cookiesData, mach_msg_type_number_t cookiesLength,
+ boolean_t* returnValue)
+{
+ DataDeallocator urlDeallocator(urlData, urlLength);
+ DataDeallocator cookiesDeallocator(cookiesData, cookiesLength);
+
+ NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort);
+ if (!hostProxy)
+ return KERN_FAILURE;
+
+ NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID);
+ if (!instanceProxy)
+ return KERN_FAILURE;
+
+ *returnValue = instanceProxy->setCookies(urlData, urlLength, cookiesData, cookiesLength);
+ return KERN_SUCCESS;
+}
+
+kern_return_t WKPCGetAuthenticationInfo(mach_port_t clientPort, uint32_t pluginID,
+ data_t protocolData, mach_msg_type_number_t protocolLength,
+ data_t hostData, mach_msg_type_number_t hostLength,
+ uint32_t port,
+ data_t schemeData, mach_msg_type_number_t schemeLength,
+ data_t realmData, mach_msg_type_number_t realmLength,
+ boolean_t* returnValue,
+ data_t* usernameData, mach_msg_type_number_t *usernameLength,
+ data_t* passwordData, mach_msg_type_number_t *passwordLength)
+{
+ DataDeallocator protocolDeallocator(protocolData, protocolLength);
+ DataDeallocator hostDeallocator(hostData, hostLength);
+ DataDeallocator schemeDeallocator(schemeData, schemeLength);
+ DataDeallocator realmDeallocator(realmData, realmLength);
+
+ *usernameData = 0;
+ *usernameLength = 0;
+ *passwordData = 0;
+ *passwordLength = 0;
+
+ NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort);
+ if (!hostProxy)
+ return KERN_FAILURE;
+
+ NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID);
+ if (!instanceProxy)
+ return KERN_FAILURE;
+
+ *returnValue = instanceProxy->getAuthenticationInfo(protocolData, hostData, port, schemeData, realmData, *usernameData, *usernameLength, *passwordData, *passwordLength);
+
+ return KERN_SUCCESS;
+}
+
+kern_return_t WKPCConvertPoint(mach_port_t clientPort, uint32_t pluginID,
+ double sourceX, double sourceY, uint32_t sourceSpace,
+ uint32_t destSpace, boolean_t *returnValue, double *destX, double *destY)
+{
+ NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort);
+ if (!hostProxy)
+ return KERN_FAILURE;
+
+ NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID);
+ if (!instanceProxy)
+ return KERN_FAILURE;
+
+ *returnValue = instanceProxy->convertPoint(sourceX, sourceY, static_cast<NPCoordinateSpace>(sourceSpace),
+ *destX, *destY, static_cast<NPCoordinateSpace>(destSpace));
+ return KERN_SUCCESS;
+}
+
+kern_return_t WKPCCheckIfAllowedToLoadURL(mach_port_t clientPort, uint32_t pluginID, data_t urlData, mach_msg_type_number_t urlLength,
+ data_t targetData, mach_msg_type_number_t targetLength, uint32_t *checkID)
+{
+ DataDeallocator urlDeallocator(urlData, urlLength);
+ DataDeallocator targetDeallocator(targetData, targetLength);
+
+ NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort);
+ if (!hostProxy)
+ return KERN_FAILURE;
+
+ NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID);
+ if (!instanceProxy)
+ return KERN_FAILURE;
+
+ *checkID = instanceProxy->checkIfAllowedToLoadURL(urlData, targetData);
+ return KERN_SUCCESS;
+}
+
+kern_return_t WKPCCancelCheckIfAllowedToLoadURL(mach_port_t clientPort, uint32_t pluginID, uint32_t checkID)
+{
+ NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort);
+ if (!hostProxy)
+ return KERN_FAILURE;
+
+ NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID);
+ if (!instanceProxy)
+ return KERN_FAILURE;
+
+ instanceProxy->cancelCheckIfAllowedToLoadURL(checkID);
+ return KERN_SUCCESS;
+}
+
+kern_return_t WKPCResolveURL(mach_port_t clientPort, uint32_t pluginID, data_t urlData, mach_msg_type_number_t urlLength,
+ data_t targetData, mach_msg_type_number_t targetLength,
+ data_t *resolvedURLData, mach_msg_type_number_t *resolvedURLLength)
+{
+ DataDeallocator urlDeallocator(urlData, urlLength);
+ DataDeallocator targetDeallocator(targetData, targetLength);
+
+ *resolvedURLData = 0;
+ *resolvedURLLength = 0;
+
+ NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort);
+ if (!hostProxy)
+ return KERN_FAILURE;
+
+ NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID);
+ if (!instanceProxy)
+ return KERN_FAILURE;
+
+ instanceProxy->resolveURL(urlData, targetData, *resolvedURLData, *resolvedURLLength);
+ return KERN_SUCCESS;
+}
+
#endif // USE(PLUGIN_HOST_PROCESS)
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
index 3f9132d..1841afd 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
@@ -58,9 +58,9 @@ class ProxyInstance;
class NetscapePluginInstanceProxy : public RefCounted<NetscapePluginInstanceProxy> {
public:
- static PassRefPtr<NetscapePluginInstanceProxy> create(NetscapePluginHostProxy* pluginHostProxy, WebHostedNetscapePluginView *pluginView)
+ static PassRefPtr<NetscapePluginInstanceProxy> create(NetscapePluginHostProxy* pluginHostProxy, WebHostedNetscapePluginView *pluginView, bool fullFramePlugin)
{
- return adoptRef(new NetscapePluginInstanceProxy(pluginHostProxy, pluginView));
+ return adoptRef(new NetscapePluginInstanceProxy(pluginHostProxy, pluginView, fullFramePlugin));
}
~NetscapePluginInstanceProxy();
@@ -79,12 +79,15 @@ public:
WebHostedNetscapePluginView *pluginView() const { return m_pluginView; }
NetscapePluginHostProxy* hostProxy() const { return m_pluginHostProxy; }
- HostedNetscapePluginStream *pluginStream(uint32_t streamID);
+ bool cancelStreamLoad(uint32_t streamID, NPReason);
void disconnectStream(HostedNetscapePluginStream*);
+ void setManualStream(PassRefPtr<HostedNetscapePluginStream>);
+ HostedNetscapePluginStream* manualStream() const { return m_manualStream.get(); }
+
void pluginHostDied();
- void resize(NSRect size, NSRect clipRect);
+ void resize(NSRect size, NSRect clipRect, bool sync);
void destroy();
void focusChanged(bool hasFocus);
void windowFocusChanged(bool hasFocus);
@@ -93,7 +96,9 @@ public:
void mouseEvent(NSView *pluginView, NSEvent *, NPCocoaEventType);
void keyEvent(NSView *pluginView, NSEvent *, NPCocoaEventType);
void insertText(NSString *);
-
+ bool wheelEvent(NSView *pluginView, NSEvent *);
+ void syntheticKeyDownWithCommandModifier(int keyCode, char character);
+ void flagsChanged(NSEvent *);
void print(CGContextRef, unsigned width, unsigned height);
void startTimers(bool throttleTimers);
@@ -106,7 +111,7 @@ public:
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 evaluate(uint32_t objectID, const WebCore::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);
@@ -125,14 +130,24 @@ public:
void status(const char* message);
NPError loadURL(const char* url, const char* target, const char* postData, uint32_t postDataLength, LoadURLFlags, uint32_t& requestID);
+ bool getCookies(data_t urlData, mach_msg_type_number_t urlLength, data_t& cookiesData, mach_msg_type_number_t& cookiesLength);
+ bool setCookies(data_t urlData, mach_msg_type_number_t urlLength, data_t cookiesData, mach_msg_type_number_t cookiesLength);
+
+ bool getProxy(data_t urlData, mach_msg_type_number_t urlLength, data_t& proxyData, mach_msg_type_number_t& proxyLength);
+ bool 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);
+ bool convertPoint(double sourceX, double sourceY, NPCoordinateSpace sourceSpace,
+ double& destX, double& destY, NPCoordinateSpace destSpace);
+
PassRefPtr<JSC::Bindings::Instance> createBindingsInstance(PassRefPtr<JSC::Bindings::RootObject>);
RetainPtr<NSData *> marshalValues(JSC::ExecState*, const JSC::ArgList& args);
- void marshalValue(JSC::ExecState*, JSC::JSValuePtr value, data_t& resultData, mach_msg_type_number_t& resultLength);
- JSC::JSValuePtr demarshalValue(JSC::ExecState*, const char* valueData, mach_msg_type_number_t valueLength);
+ void marshalValue(JSC::ExecState*, JSC::JSValue value, data_t& resultData, mach_msg_type_number_t& resultLength);
+ JSC::JSValue demarshalValue(JSC::ExecState*, const char* valueData, mach_msg_type_number_t valueLength);
void addInstance(ProxyInstance*);
void removeInstance(ProxyInstance*);
+ void cleanup();
void invalidate();
void willCallPluginFunction();
@@ -141,6 +156,12 @@ public:
uint32_t nextRequestID();
+ uint32_t checkIfAllowedToLoadURL(const char* url, const char* target);
+ void cancelCheckIfAllowedToLoadURL(uint32_t checkID);
+ void checkIfAllowedToLoadURLResult(uint32_t checkID, bool allowed);
+
+ void resolveURL(const char* url, const char* target, data_t& resolvedURLData, mach_msg_type_number_t& resolvedURLLength);
+
// Reply structs
struct Reply {
enum Type {
@@ -234,7 +255,7 @@ public:
}
private:
- NetscapePluginInstanceProxy(NetscapePluginHostProxy*, WebHostedNetscapePluginView *);
+ NetscapePluginInstanceProxy(NetscapePluginHostProxy*, WebHostedNetscapePluginView *, bool fullFramePlugin);
NPError loadRequest(NSURLRequest *, const char* cTarget, bool currentEventIsUserGesture, uint32_t& streamID);
@@ -245,8 +266,6 @@ private:
void stopAllStreams();
Reply* processRequestsAndWaitForReply(uint32_t requestID);
- void cleanup();
-
NetscapePluginHostProxy* m_pluginHostProxy;
WebHostedNetscapePluginView *m_pluginView;
@@ -268,10 +287,10 @@ private:
// NPRuntime
uint32_t idForObject(JSC::JSObject*);
- void addValueToArray(NSMutableArray *, JSC::ExecState* exec, JSC::JSValuePtr value);
+ void addValueToArray(NSMutableArray *, JSC::ExecState* exec, JSC::JSValue value);
- bool demarshalValueFromArray(JSC::ExecState*, NSArray *array, NSUInteger& index, JSC::JSValuePtr& result);
- void demarshalValues(JSC::ExecState*, data_t valuesData, mach_msg_type_number_t valuesLength, JSC::ArgList& result);
+ 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;
@@ -279,10 +298,17 @@ private:
typedef HashSet<ProxyInstance*> ProxyInstanceSet;
ProxyInstanceSet m_instances;
+
+ uint32_t m_urlCheckCounter;
+ typedef HashMap<uint32_t, RetainPtr<id> > URLCheckMap;
+ URLCheckMap m_urlChecks;
unsigned m_pluginFunctionCallDepth;
bool m_shouldStopSoon;
uint32_t m_currentRequestID;
+ bool m_inDestroy;
+
+ RefPtr<HostedNetscapePluginStream> m_manualStream;
};
} // namespace WebKit
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
index 2ef921a..c01ae92 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
@@ -42,16 +42,20 @@
#import "WebUIDelegatePrivate.h"
#import <mach/mach.h>
+#import <WebCore/CookieJar.h>
+#import <WebCore/CString.h>
#import <WebCore/DocumentLoader.h>
#import <WebCore/Frame.h>
#import <WebCore/FrameLoader.h>
#import <WebCore/FrameTree.h>
+#import <WebCore/KURL.h>
#import <WebCore/npruntime_impl.h>
#import <WebCore/runtime_object.h>
#import <WebCore/ScriptController.h>
#import <WebCore/ScriptValue.h>
-#include <runtime/JSLock.h>
-#include <runtime/PropertyNameArray.h>
+#import <WebKitSystemInterface.h>
+#import <runtime/JSLock.h>
+#import <runtime/PropertyNameArray.h>
#import <utility>
extern "C" {
@@ -68,29 +72,29 @@ namespace WebKit {
class NetscapePluginInstanceProxy::PluginRequest {
public:
- PluginRequest(uint32_t requestID, NSURLRequest *request, NSString *frameName, bool didStartFromUserGesture)
+ PluginRequest(uint32_t requestID, NSURLRequest *request, NSString *frameName, bool allowPopups)
: m_requestID(requestID)
, m_request(request)
, m_frameName(frameName)
- , m_didStartFromUserGesture(didStartFromUserGesture)
+ , m_allowPopups(allowPopups)
{
}
uint32_t requestID() const { return m_requestID; }
NSURLRequest *request() const { return m_request.get(); }
NSString *frameName() const { return m_frameName.get(); }
- bool didStartFromUserGesture() const { return m_didStartFromUserGesture; }
+ bool allowPopups() const { return m_allowPopups; }
private:
uint32_t m_requestID;
RetainPtr<NSURLRequest *> m_request;
RetainPtr<NSString *> m_frameName;
- bool m_didStartFromUserGesture;
+ bool m_allowPopups;
};
static uint32_t pluginIDCounter;
-NetscapePluginInstanceProxy::NetscapePluginInstanceProxy(NetscapePluginHostProxy* pluginHostProxy, WebHostedNetscapePluginView *pluginView)
+NetscapePluginInstanceProxy::NetscapePluginInstanceProxy(NetscapePluginHostProxy* pluginHostProxy, WebHostedNetscapePluginView *pluginView, bool fullFramePlugin)
: m_pluginHostProxy(pluginHostProxy)
, m_pluginView(pluginView)
, m_requestTimer(this, &NetscapePluginInstanceProxy::requestTimerFired)
@@ -99,12 +103,20 @@ NetscapePluginInstanceProxy::NetscapePluginInstanceProxy(NetscapePluginHostProxy
, m_useSoftwareRenderer(false)
, m_waitingForReply(false)
, m_objectIDCounter(0)
+ , m_urlCheckCounter(0)
, m_pluginFunctionCallDepth(0)
, m_shouldStopSoon(false)
, m_currentRequestID(0)
+ , m_inDestroy(false)
{
ASSERT(m_pluginView);
+ if (fullFramePlugin) {
+ // For full frame plug-ins, the first requestID will always be the one for the already
+ // open stream.
+ ++m_currentRequestID;
+ }
+
// Assign a plug-in ID.
do {
m_pluginID = ++pluginIDCounter;
@@ -121,9 +133,19 @@ NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy()
deleteAllValues(m_replies);
}
-void NetscapePluginInstanceProxy::resize(NSRect size, NSRect clipRect)
+void NetscapePluginInstanceProxy::resize(NSRect size, NSRect clipRect, bool sync)
{
- _WKPHResizePluginInstance(m_pluginHostProxy->port(), m_pluginID, size.origin.x, size.origin.y, size.size.width, size.size.height);
+ uint32_t requestID = 0;
+
+ if (sync)
+ 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);
}
void NetscapePluginInstanceProxy::stopAllStreams()
@@ -172,18 +194,44 @@ void NetscapePluginInstanceProxy::destroy()
{
uint32_t requestID = nextRequestID();
+ m_inDestroy = true;
+
_WKPHDestroyPluginInstance(m_pluginHostProxy->port(), m_pluginID, requestID);
+
+ // 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);
// We don't care about the reply here - we just want to block until the plug-in instance has been torn down.
waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
+ m_inDestroy = false;
+
cleanup();
invalidate();
}
-HostedNetscapePluginStream *NetscapePluginInstanceProxy::pluginStream(uint32_t streamID)
+void NetscapePluginInstanceProxy::setManualStream(PassRefPtr<HostedNetscapePluginStream> manualStream)
+{
+ ASSERT(!m_manualStream);
+
+ m_manualStream = manualStream;
+}
+
+bool NetscapePluginInstanceProxy::cancelStreamLoad(uint32_t streamID, NPReason reason)
{
- return m_streams.get(streamID).get();
+ HostedNetscapePluginStream* stream = 0;
+
+ if (m_manualStream && streamID == 1)
+ stream = m_manualStream.get();
+ else
+ stream = m_streams.get(streamID).get();
+
+ if (!stream)
+ return false;
+
+ stream->cancelLoad(reason);
+ return true;
}
void NetscapePluginInstanceProxy::disconnectStream(HostedNetscapePluginStream* stream)
@@ -213,7 +261,6 @@ void NetscapePluginInstanceProxy::windowFocusChanged(bool hasFocus)
void NetscapePluginInstanceProxy::windowFrameChanged(NSRect frame)
{
_WKPHPluginInstanceWindowFrameChanged(m_pluginHostProxy->port(), m_pluginID, frame.origin.x, frame.origin.y, frame.size.width, frame.size.height,
- // FIXME: Is it always correct to pass the rect of the first screen here?
NSMaxY([[[NSScreen screens] objectAtIndex:0] frame]));
}
@@ -239,7 +286,6 @@ void NetscapePluginInstanceProxy::mouseEvent(NSView *pluginView, NSEvent *event,
type, [event modifierFlags],
pluginPoint.x, pluginPoint.y,
screenPoint.x, screenPoint.y,
- // FIXME: Is it always correct to pass the rect of the first screen here?
NSMaxY([[[NSScreen screens] objectAtIndex:0] frame]),
[event buttonNumber], clickCount,
[event deltaX], [event deltaY], [event deltaZ]);
@@ -255,7 +301,26 @@ void NetscapePluginInstanceProxy::keyEvent(NSView *pluginView, NSEvent *event, N
type, [event modifierFlags],
const_cast<char*>(reinterpret_cast<const char*>([charactersData bytes])), [charactersData length],
const_cast<char*>(reinterpret_cast<const char*>([charactersIgnoringModifiersData bytes])), [charactersIgnoringModifiersData length],
- [event isARepeat], [event keyCode]);
+ [event isARepeat], [event keyCode], WKGetNSEventKeyChar(event));
+}
+
+void NetscapePluginInstanceProxy::syntheticKeyDownWithCommandModifier(int keyCode, char character)
+{
+ NSData *charactersData = [NSData dataWithBytes:&character length:1];
+
+ _WKPHPluginInstanceKeyboardEvent(m_pluginHostProxy->port(), m_pluginID,
+ [NSDate timeIntervalSinceReferenceDate],
+ NPCocoaEventKeyDown, NSCommandKeyMask,
+ const_cast<char*>(reinterpret_cast<const char*>([charactersData bytes])), [charactersData length],
+ const_cast<char*>(reinterpret_cast<const char*>([charactersData bytes])), [charactersData length],
+ false, keyCode, character);
+}
+
+void NetscapePluginInstanceProxy::flagsChanged(NSEvent *event)
+{
+ _WKPHPluginInstanceKeyboardEvent(m_pluginHostProxy->port(), m_pluginID,
+ [event timestamp], NPCocoaEventFlagsChanged,
+ [event modifierFlags], 0, 0, 0, 0, false, [event keyCode], 0);
}
void NetscapePluginInstanceProxy::insertText(NSString *text)
@@ -266,6 +331,26 @@ void NetscapePluginInstanceProxy::insertText(NSString *text)
const_cast<char*>(reinterpret_cast<const char*>([textData bytes])), [textData length]);
}
+bool NetscapePluginInstanceProxy::wheelEvent(NSView *pluginView, NSEvent *event)
+{
+ NSPoint pluginPoint = [pluginView convertPoint:[event locationInWindow] fromView:nil];
+
+ uint32_t requestID = nextRequestID();
+ _WKPHPluginInstanceWheelEvent(m_pluginHostProxy->port(), m_pluginID, requestID,
+ [event timestamp], [event modifierFlags],
+ 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;
+
+ return true;
+}
+
void NetscapePluginInstanceProxy::print(CGContextRef context, unsigned width, unsigned height)
{
uint32_t requestID = nextRequestID();
@@ -375,7 +460,7 @@ NPError NetscapePluginInstanceProxy::loadURL(const char* url, const char* target
[request setHTTPBody:httpBody];
}
- return loadRequest(request, target, flags & CurrentEventIsUserGesture, streamID);
+ return loadRequest(request, target, flags & AllowPopups, streamID);
}
void NetscapePluginInstanceProxy::performRequest(PluginRequest* pluginRequest)
@@ -426,7 +511,7 @@ void NetscapePluginInstanceProxy::evaluateJavaScript(PluginRequest* pluginReques
NSString *JSString = [URL _webkit_scriptIfJavaScriptURL];
ASSERT(JSString);
- NSString *result = [[m_pluginView webFrame] _stringByEvaluatingJavaScriptFromString:JSString forceUserGesture:pluginRequest->didStartFromUserGesture()];
+ NSString *result = [[m_pluginView webFrame] _stringByEvaluatingJavaScriptFromString:JSString forceUserGesture:pluginRequest->allowPopups()];
// Don't continue if stringByEvaluatingJavaScriptFromString caused the plug-in to stop.
if (!m_pluginHostProxy)
@@ -466,7 +551,7 @@ void NetscapePluginInstanceProxy::requestTimerFired(Timer<NetscapePluginInstance
delete request;
}
-NPError NetscapePluginInstanceProxy::loadRequest(NSURLRequest *request, const char* cTarget, bool currentEventIsUserGesture, uint32_t& requestID)
+NPError NetscapePluginInstanceProxy::loadRequest(NSURLRequest *request, const char* cTarget, bool allowPopups, uint32_t& requestID)
{
NSURL *URL = [request URL];
@@ -514,7 +599,7 @@ NPError NetscapePluginInstanceProxy::loadRequest(NSURLRequest *request, const ch
return NPERR_INVALID_PARAM;
}
- PluginRequest* pluginRequest = new PluginRequest(requestID, request, target, currentEventIsUserGesture);
+ PluginRequest* pluginRequest = new PluginRequest(requestID, request, target, allowPopups);
m_pluginRequests.append(pluginRequest);
m_requestTimer.startOneShot(0);
} else {
@@ -588,7 +673,7 @@ void NetscapePluginInstanceProxy::releaseObject(uint32_t objectID)
m_objects.remove(objectID);
}
-bool NetscapePluginInstanceProxy::evaluate(uint32_t objectID, const String& script, data_t& resultData, mach_msg_type_number_t& resultLength)
+bool NetscapePluginInstanceProxy::evaluate(uint32_t objectID, const String& script, data_t& resultData, mach_msg_type_number_t& resultLength, bool allowPopups)
{
resultData = 0;
resultLength = 0;
@@ -600,17 +685,22 @@ bool NetscapePluginInstanceProxy::evaluate(uint32_t objectID, const String& scri
if (!frame)
return false;
- JSLock lock(false);
+ JSLock lock(SilenceAssertionsOnly);
ProtectedPtr<JSGlobalObject> globalObject = frame->script()->globalObject();
ExecState* exec = globalObject->globalExec();
+ bool oldAllowPopups = frame->script()->allowPopupsFromPlugin();
+ frame->script()->setAllowPopupsFromPlugin(allowPopups);
+
globalObject->globalData()->timeoutChecker.start();
Completion completion = JSC::evaluate(exec, globalObject->globalScopeChain(), makeSource(script));
globalObject->globalData()->timeoutChecker.stop();
ComplType type = completion.complType();
+
+ frame->script()->setAllowPopupsFromPlugin(oldAllowPopups);
- JSValuePtr result;
+ JSValue result;
if (type == Normal)
result = completion.value();
@@ -627,6 +717,9 @@ bool NetscapePluginInstanceProxy::invoke(uint32_t objectID, const Identifier& me
resultData = 0;
resultLength = 0;
+ if (m_inDestroy)
+ return false;
+
JSObject* object = m_objects.get(objectID);
if (!object)
return false;
@@ -636,19 +729,19 @@ bool NetscapePluginInstanceProxy::invoke(uint32_t objectID, const Identifier& me
return false;
ExecState* exec = frame->script()->globalObject()->globalExec();
- JSLock lock(false);
- JSValuePtr function = object->get(exec, methodName);
+ JSLock lock(SilenceAssertionsOnly);
+ JSValue function = object->get(exec, methodName);
CallData callData;
CallType callType = function.getCallData(callData);
if (callType == CallTypeNone)
return false;
-
- ArgList argList;
+
+ MarkedArgumentBuffer argList;
demarshalValues(exec, argumentsData, argumentsLength, argList);
ProtectedPtr<JSGlobalObject> globalObject = frame->script()->globalObject();
globalObject->globalData()->timeoutChecker.start();
- JSValuePtr value = call(exec, function, callType, callData, object, argList);
+ JSValue value = call(exec, function, callType, callData, object, argList);
globalObject->globalData()->timeoutChecker.stop();
marshalValue(exec, value, resultData, resultLength);
@@ -658,6 +751,9 @@ bool NetscapePluginInstanceProxy::invoke(uint32_t objectID, const Identifier& me
bool NetscapePluginInstanceProxy::invokeDefault(uint32_t objectID, data_t argumentsData, mach_msg_type_number_t argumentsLength, data_t& resultData, mach_msg_type_number_t& resultLength)
{
+ if (m_inDestroy)
+ return false;
+
JSObject* object = m_objects.get(objectID);
if (!object)
return false;
@@ -667,18 +763,18 @@ bool NetscapePluginInstanceProxy::invokeDefault(uint32_t objectID, data_t argume
return false;
ExecState* exec = frame->script()->globalObject()->globalExec();
- JSLock lock(false);
+ JSLock lock(SilenceAssertionsOnly);
CallData callData;
CallType callType = object->getCallData(callData);
if (callType == CallTypeNone)
return false;
-
- ArgList argList;
+
+ MarkedArgumentBuffer argList;
demarshalValues(exec, argumentsData, argumentsLength, argList);
ProtectedPtr<JSGlobalObject> globalObject = frame->script()->globalObject();
globalObject->globalData()->timeoutChecker.start();
- JSValuePtr value = call(exec, object, callType, callData, object, argList);
+ JSValue value = call(exec, object, callType, callData, object, argList);
globalObject->globalData()->timeoutChecker.stop();
marshalValue(exec, value, resultData, resultLength);
@@ -688,6 +784,9 @@ bool NetscapePluginInstanceProxy::invokeDefault(uint32_t objectID, data_t argume
bool NetscapePluginInstanceProxy::construct(uint32_t objectID, data_t argumentsData, mach_msg_type_number_t argumentsLength, data_t& resultData, mach_msg_type_number_t& resultLength)
{
+ if (m_inDestroy)
+ return false;
+
JSObject* object = m_objects.get(objectID);
if (!object)
return false;
@@ -697,19 +796,19 @@ bool NetscapePluginInstanceProxy::construct(uint32_t objectID, data_t argumentsD
return false;
ExecState* exec = frame->script()->globalObject()->globalExec();
- JSLock lock(false);
+ JSLock lock(SilenceAssertionsOnly);
ConstructData constructData;
ConstructType constructType = object->getConstructData(constructData);
if (constructType == ConstructTypeNone)
return false;
-
- ArgList argList;
+
+ MarkedArgumentBuffer argList;
demarshalValues(exec, argumentsData, argumentsLength, argList);
ProtectedPtr<JSGlobalObject> globalObject = frame->script()->globalObject();
globalObject->globalData()->timeoutChecker.start();
- JSValuePtr value = JSC::construct(exec, object, constructType, constructData, argList);
+ JSValue value = JSC::construct(exec, object, constructType, constructData, argList);
globalObject->globalData()->timeoutChecker.stop();
marshalValue(exec, value, resultData, resultLength);
@@ -719,6 +818,9 @@ bool NetscapePluginInstanceProxy::construct(uint32_t objectID, data_t argumentsD
bool NetscapePluginInstanceProxy::getProperty(uint32_t objectID, const Identifier& propertyName, data_t& resultData, mach_msg_type_number_t& resultLength)
{
+ if (m_inDestroy)
+ return false;
+
JSObject* object = m_objects.get(objectID);
if (!object)
return false;
@@ -728,8 +830,8 @@ bool NetscapePluginInstanceProxy::getProperty(uint32_t objectID, const Identifie
return false;
ExecState* exec = frame->script()->globalObject()->globalExec();
- JSLock lock(false);
- JSValuePtr value = object->get(exec, propertyName);
+ JSLock lock(SilenceAssertionsOnly);
+ JSValue value = object->get(exec, propertyName);
marshalValue(exec, value, resultData, resultLength);
exec->clearException();
@@ -747,8 +849,8 @@ bool NetscapePluginInstanceProxy::getProperty(uint32_t objectID, unsigned proper
return false;
ExecState* exec = frame->script()->globalObject()->globalExec();
- JSLock lock(false);
- JSValuePtr value = object->get(exec, propertyName);
+ JSLock lock(SilenceAssertionsOnly);
+ JSValue value = object->get(exec, propertyName);
marshalValue(exec, value, resultData, resultLength);
exec->clearException();
@@ -757,6 +859,9 @@ bool NetscapePluginInstanceProxy::getProperty(uint32_t objectID, unsigned proper
bool NetscapePluginInstanceProxy::setProperty(uint32_t objectID, const Identifier& propertyName, data_t valueData, mach_msg_type_number_t valueLength)
{
+ if (m_inDestroy)
+ return false;
+
JSObject* object = m_objects.get(objectID);
if (!object)
return false;
@@ -766,9 +871,9 @@ bool NetscapePluginInstanceProxy::setProperty(uint32_t objectID, const Identifie
return false;
ExecState* exec = frame->script()->globalObject()->globalExec();
- JSLock lock(false);
+ JSLock lock(SilenceAssertionsOnly);
- JSValuePtr value = demarshalValue(exec, valueData, valueLength);
+ JSValue value = demarshalValue(exec, valueData, valueLength);
PutPropertySlot slot;
object->put(exec, propertyName, value, slot);
@@ -778,6 +883,9 @@ bool NetscapePluginInstanceProxy::setProperty(uint32_t objectID, const Identifie
bool NetscapePluginInstanceProxy::setProperty(uint32_t objectID, unsigned propertyName, data_t valueData, mach_msg_type_number_t valueLength)
{
+ if (m_inDestroy)
+ return false;
+
JSObject* object = m_objects.get(objectID);
if (!object)
return false;
@@ -787,9 +895,9 @@ bool NetscapePluginInstanceProxy::setProperty(uint32_t objectID, unsigned proper
return false;
ExecState* exec = frame->script()->globalObject()->globalExec();
- JSLock lock(false);
+ JSLock lock(SilenceAssertionsOnly);
- JSValuePtr value = demarshalValue(exec, valueData, valueLength);
+ JSValue value = demarshalValue(exec, valueData, valueLength);
object->put(exec, propertyName, value);
exec->clearException();
@@ -798,6 +906,9 @@ bool NetscapePluginInstanceProxy::setProperty(uint32_t objectID, unsigned proper
bool NetscapePluginInstanceProxy::removeProperty(uint32_t objectID, const Identifier& propertyName)
{
+ if (m_inDestroy)
+ return false;
+
JSObject* object = m_objects.get(objectID);
if (!object)
return false;
@@ -812,7 +923,7 @@ bool NetscapePluginInstanceProxy::removeProperty(uint32_t objectID, const Identi
return false;
}
- JSLock lock(false);
+ JSLock lock(SilenceAssertionsOnly);
object->deleteProperty(exec, propertyName);
exec->clearException();
return true;
@@ -820,6 +931,9 @@ bool NetscapePluginInstanceProxy::removeProperty(uint32_t objectID, const Identi
bool NetscapePluginInstanceProxy::removeProperty(uint32_t objectID, unsigned propertyName)
{
+ if (m_inDestroy)
+ return false;
+
JSObject* object = m_objects.get(objectID);
if (!object)
return false;
@@ -834,7 +948,7 @@ bool NetscapePluginInstanceProxy::removeProperty(uint32_t objectID, unsigned pro
return false;
}
- JSLock lock(false);
+ JSLock lock(SilenceAssertionsOnly);
object->deleteProperty(exec, propertyName);
exec->clearException();
return true;
@@ -842,6 +956,9 @@ bool NetscapePluginInstanceProxy::removeProperty(uint32_t objectID, unsigned pro
bool NetscapePluginInstanceProxy::hasProperty(uint32_t objectID, const Identifier& propertyName)
{
+ if (m_inDestroy)
+ return false;
+
JSObject* object = m_objects.get(objectID);
if (!object)
return false;
@@ -859,6 +976,9 @@ bool NetscapePluginInstanceProxy::hasProperty(uint32_t objectID, const Identifie
bool NetscapePluginInstanceProxy::hasProperty(uint32_t objectID, unsigned propertyName)
{
+ if (m_inDestroy)
+ return false;
+
JSObject* object = m_objects.get(objectID);
if (!object)
return false;
@@ -876,6 +996,9 @@ bool NetscapePluginInstanceProxy::hasProperty(uint32_t objectID, unsigned proper
bool NetscapePluginInstanceProxy::hasMethod(uint32_t objectID, const Identifier& methodName)
{
+ if (m_inDestroy)
+ return false;
+
JSObject* object = m_objects.get(objectID);
if (!object)
return false;
@@ -885,14 +1008,17 @@ bool NetscapePluginInstanceProxy::hasMethod(uint32_t objectID, const Identifier&
return false;
ExecState* exec = frame->script()->globalObject()->globalExec();
- JSLock lock(false);
- JSValuePtr func = object->get(exec, methodName);
+ JSLock lock(SilenceAssertionsOnly);
+ JSValue func = object->get(exec, methodName);
exec->clearException();
return !func.isUndefined();
}
bool NetscapePluginInstanceProxy::enumerate(uint32_t objectID, data_t& resultData, mach_msg_type_number_t& resultLength)
{
+ if (m_inDestroy)
+ return false;
+
JSObject* object = m_objects.get(objectID);
if (!object)
return false;
@@ -902,7 +1028,7 @@ bool NetscapePluginInstanceProxy::enumerate(uint32_t objectID, data_t& resultDat
return false;
ExecState* exec = frame->script()->globalObject()->globalExec();
- JSLock lock(false);
+ JSLock lock(SilenceAssertionsOnly);
PropertyNameArray propertyNames(exec);
object->getPropertyNames(exec, propertyNames);
@@ -927,9 +1053,9 @@ bool NetscapePluginInstanceProxy::enumerate(uint32_t objectID, data_t& resultDat
return true;
}
-void NetscapePluginInstanceProxy::addValueToArray(NSMutableArray *array, ExecState* exec, JSValuePtr value)
+void NetscapePluginInstanceProxy::addValueToArray(NSMutableArray *array, ExecState* exec, JSValue value)
{
- JSLock lock(false);
+ JSLock lock(SilenceAssertionsOnly);
if (value.isString()) {
[array addObject:[NSNumber numberWithInt:StringValueType]];
@@ -958,7 +1084,7 @@ void NetscapePluginInstanceProxy::addValueToArray(NSMutableArray *array, ExecSta
[array addObject:[NSNumber numberWithInt:VoidValueType]];
}
-void NetscapePluginInstanceProxy::marshalValue(ExecState* exec, JSValuePtr value, data_t& resultData, mach_msg_type_number_t& resultLength)
+void NetscapePluginInstanceProxy::marshalValue(ExecState* exec, JSValue value, data_t& resultData, mach_msg_type_number_t& resultLength)
{
RetainPtr<NSMutableArray*> array(AdoptNS, [[NSMutableArray alloc] init]);
@@ -978,7 +1104,7 @@ RetainPtr<NSData *> NetscapePluginInstanceProxy::marshalValues(ExecState* exec,
RetainPtr<NSMutableArray*> array(AdoptNS, [[NSMutableArray alloc] init]);
for (unsigned i = 0; i < args.size(); i++)
- addValueToArray(array.get(), exec, args.at(exec, i));
+ addValueToArray(array.get(), exec, args.at(i));
RetainPtr<NSData *> data = [NSPropertyListSerialization dataFromPropertyList:array.get() format:NSPropertyListBinaryFormat_v1_0 errorDescription:0];
ASSERT(data);
@@ -986,7 +1112,7 @@ RetainPtr<NSData *> NetscapePluginInstanceProxy::marshalValues(ExecState* exec,
return data;
}
-bool NetscapePluginInstanceProxy::demarshalValueFromArray(ExecState* exec, NSArray *array, NSUInteger& index, JSValuePtr& result)
+bool NetscapePluginInstanceProxy::demarshalValueFromArray(ExecState* exec, NSArray *array, NSUInteger& index, JSValue& result)
{
if (index == [array count])
return false;
@@ -1041,7 +1167,7 @@ bool NetscapePluginInstanceProxy::demarshalValueFromArray(ExecState* exec, NSArr
}
}
-JSValuePtr NetscapePluginInstanceProxy::demarshalValue(ExecState* exec, const char* valueData, mach_msg_type_number_t valueLength)
+JSValue NetscapePluginInstanceProxy::demarshalValue(ExecState* exec, const char* valueData, mach_msg_type_number_t valueLength)
{
RetainPtr<NSData*> data(AdoptNS, [[NSData alloc] initWithBytesNoCopy:(void*)valueData length:valueLength freeWhenDone:NO]);
@@ -1050,14 +1176,14 @@ JSValuePtr NetscapePluginInstanceProxy::demarshalValue(ExecState* exec, const ch
format:0
errorDescription:0];
NSUInteger position = 0;
- JSValuePtr value;
+ JSValue value;
bool result = demarshalValueFromArray(exec, array.get(), position, value);
ASSERT_UNUSED(result, result);
return value;
}
-void NetscapePluginInstanceProxy::demarshalValues(ExecState* exec, data_t valuesData, mach_msg_type_number_t valuesLength, ArgList& result)
+void NetscapePluginInstanceProxy::demarshalValues(ExecState* exec, data_t valuesData, mach_msg_type_number_t valuesLength, MarkedArgumentBuffer& result)
{
RetainPtr<NSData*> data(AdoptNS, [[NSData alloc] initWithBytesNoCopy:valuesData length:valuesLength freeWhenDone:NO]);
@@ -1066,7 +1192,7 @@ void NetscapePluginInstanceProxy::demarshalValues(ExecState* exec, data_t values
format:0
errorDescription:0];
NSUInteger position = 0;
- JSValuePtr value;
+ JSValue value;
while (demarshalValueFromArray(exec, array.get(), position, value))
result.append(value);
}
@@ -1145,9 +1271,150 @@ void NetscapePluginInstanceProxy::invalidateRect(double x, double y, double widt
{
ASSERT(m_pluginView);
- [m_pluginView setNeedsDisplayInRect:NSMakeRect(x, y, width, height)];
+ [m_pluginView invalidatePluginContentRect:NSMakeRect(x, y, width, height)];
}
+
+bool NetscapePluginInstanceProxy::getCookies(data_t urlData, mach_msg_type_number_t urlLength, data_t& cookiesData, mach_msg_type_number_t& cookiesLength)
+{
+ ASSERT(m_pluginView);
+
+ NSURL *url = [m_pluginView URLWithCString:urlData];
+ if (!url)
+ return false;
+
+ if (Frame* frame = core([m_pluginView webFrame])) {
+ String cookieString = cookies(frame->document(), url);
+ WebCore::CString cookieStringUTF8 = cookieString.utf8();
+ if (cookieStringUTF8.isNull())
+ return false;
+
+ cookiesLength = cookieStringUTF8.length();
+ mig_allocate(reinterpret_cast<vm_address_t*>(&cookiesData), cookiesLength);
+ memcpy(cookiesData, cookieStringUTF8.data(), cookiesLength);
+
+ return true;
+ }
+
+ return false;
+}
+
+bool NetscapePluginInstanceProxy::setCookies(data_t urlData, mach_msg_type_number_t urlLength, data_t cookiesData, mach_msg_type_number_t cookiesLength)
+{
+ ASSERT(m_pluginView);
+
+ NSURL *url = [m_pluginView URLWithCString:urlData];
+ if (!url)
+ return false;
+
+ if (Frame* frame = core([m_pluginView webFrame])) {
+ String cookieString = String::fromUTF8(cookiesData, cookiesLength);
+ if (!cookieString)
+ return false;
+
+ WebCore::setCookies(frame->document(), url, cookieString);
+ return true;
+ }
+
+ return false;
+}
+
+bool NetscapePluginInstanceProxy::getProxy(data_t urlData, mach_msg_type_number_t urlLength, data_t& proxyData, mach_msg_type_number_t& proxyLength)
+{
+ ASSERT(m_pluginView);
+ NSURL *url = [m_pluginView URLWithCString:urlData];
+ if (!url)
+ return false;
+
+ WebCore::CString proxyStringUTF8 = proxiesForURL(url);
+
+ proxyLength = proxyStringUTF8.length();
+ mig_allocate(reinterpret_cast<vm_address_t*>(&proxyData), proxyLength);
+ memcpy(proxyData, proxyStringUTF8.data(), proxyLength);
+
+ return true;
+}
+
+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;
+
+ if (!WebKit::getAuthenticationInfo(protocolData, hostData, port, schemeData, realmData, username, password))
+ return false;
+
+ usernameLength = username.length();
+ mig_allocate(reinterpret_cast<vm_address_t*>(&usernameData), usernameLength);
+ memcpy(usernameData, username.data(), usernameLength);
+
+ passwordLength = password.length();
+ mig_allocate(reinterpret_cast<vm_address_t*>(&passwordData), passwordLength);
+ memcpy(passwordData, password.data(), passwordLength);
+
+ return true;
+}
+
+bool NetscapePluginInstanceProxy::convertPoint(double sourceX, double sourceY, NPCoordinateSpace sourceSpace,
+ double& destX, double& destY, NPCoordinateSpace destSpace)
+{
+ ASSERT(m_pluginView);
+
+ return [m_pluginView convertFromX:sourceX andY:sourceY space:sourceSpace toX:&destX andY:&destY space:destSpace];
+}
+
+uint32_t NetscapePluginInstanceProxy::checkIfAllowedToLoadURL(const char* url, const char* target)
+{
+ uint32_t checkID;
+
+ // Assign a check ID
+ do {
+ checkID = ++m_urlCheckCounter;
+ } while (m_urlChecks.contains(checkID) || !m_urlCheckCounter);
+
+ NSString *frameName = target ? [NSString stringWithCString:target encoding:NSISOLatin1StringEncoding] : nil;
+
+ NSNumber *contextInfo = [[NSNumber alloc] initWithUnsignedInt:checkID];
+ WebPluginContainerCheck *check = [WebPluginContainerCheck checkWithRequest:[m_pluginView requestWithURLCString:url]
+ target:frameName
+ resultObject:m_pluginView
+ selector:@selector(_containerCheckResult:contextInfo:)
+ controller:m_pluginView
+ contextInfo:contextInfo];
+
+ [contextInfo release];
+ m_urlChecks.set(checkID, check);
+ [check start];
+
+ return checkID;
+}
+
+void NetscapePluginInstanceProxy::cancelCheckIfAllowedToLoadURL(uint32_t checkID)
+{
+ URLCheckMap::iterator it = m_urlChecks.find(checkID);
+ if (it == m_urlChecks.end())
+ return;
+
+ WebPluginContainerCheck *check = it->second.get();
+ [check cancel];
+ m_urlChecks.remove(it);
+}
+
+void NetscapePluginInstanceProxy::checkIfAllowedToLoadURLResult(uint32_t checkID, bool allowed)
+{
+ _WKPHCheckIfAllowedToLoadURLResult(m_pluginHostProxy->port(), m_pluginID, checkID, allowed);
+}
+
+void NetscapePluginInstanceProxy::resolveURL(const char* url, const char* target, data_t& resolvedURLData, mach_msg_type_number_t& resolvedURLLength)
+{
+ ASSERT(m_pluginView);
+
+ WebCore::CString resolvedURL = [m_pluginView resolvedURLStringForURL:url target:target];
+
+ resolvedURLLength = resolvedURL.length();
+ mig_allocate(reinterpret_cast<vm_address_t*>(&resolvedURLData), resolvedURLLength);
+ memcpy(resolvedURLData, resolvedURL.data(), resolvedURLLength);
+}
} // namespace WebKit
diff --git a/WebKit/mac/Plugins/Hosted/ProxyInstance.h b/WebKit/mac/Plugins/Hosted/ProxyInstance.h
index 1e2e2dc..8a07def 100644
--- a/WebKit/mac/Plugins/Hosted/ProxyInstance.h
+++ b/WebKit/mac/Plugins/Hosted/ProxyInstance.h
@@ -49,8 +49,8 @@ public:
JSC::Bindings::MethodList methodsNamed(const JSC::Identifier&);
JSC::Bindings::Field* fieldNamed(const JSC::Identifier&);
- JSC::JSValuePtr fieldValue(JSC::ExecState*, const JSC::Bindings::Field*) const;
- void setFieldValue(JSC::ExecState*, const JSC::Bindings::Field*, JSC::JSValuePtr) const;
+ JSC::JSValue fieldValue(JSC::ExecState*, const JSC::Bindings::Field*) const;
+ void setFieldValue(JSC::ExecState*, const JSC::Bindings::Field*, JSC::JSValue) const;
void invalidate();
@@ -61,24 +61,24 @@ private:
virtual JSC::Bindings::Class *getClass() const;
- virtual JSC::JSValuePtr invokeMethod(JSC::ExecState*, const JSC::Bindings::MethodList&, const JSC::ArgList& args);
+ virtual JSC::JSValue invokeMethod(JSC::ExecState*, const JSC::Bindings::MethodList&, const JSC::ArgList& args);
virtual bool supportsInvokeDefaultMethod() const;
- virtual JSC::JSValuePtr invokeDefaultMethod(JSC::ExecState*, const JSC::ArgList&);
+ virtual JSC::JSValue invokeDefaultMethod(JSC::ExecState*, const JSC::ArgList&);
virtual bool supportsConstruct() const;
- virtual JSC::JSValuePtr invokeConstruct(JSC::ExecState*, const JSC::ArgList&);
+ virtual JSC::JSValue invokeConstruct(JSC::ExecState*, const JSC::ArgList&);
- virtual JSC::JSValuePtr defaultValue(JSC::ExecState*, JSC::PreferredPrimitiveType) const;
- virtual JSC::JSValuePtr valueOf(JSC::ExecState*) const;
+ virtual JSC::JSValue defaultValue(JSC::ExecState*, JSC::PreferredPrimitiveType) const;
+ virtual JSC::JSValue valueOf(JSC::ExecState*) const;
virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&);
- JSC::JSValuePtr stringValue(JSC::ExecState*) const;
- JSC::JSValuePtr numberValue(JSC::ExecState*) const;
- JSC::JSValuePtr booleanValue() const;
+ JSC::JSValue stringValue(JSC::ExecState*) const;
+ JSC::JSValue numberValue(JSC::ExecState*) const;
+ JSC::JSValue booleanValue() const;
- JSC::JSValuePtr invoke(JSC::ExecState*, InvokeType, uint64_t identifier, const JSC::ArgList& args);
+ JSC::JSValue invoke(JSC::ExecState*, InvokeType, uint64_t identifier, const JSC::ArgList& args);
NetscapePluginInstanceProxy* m_instanceProxy;
uint32_t m_objectID;
diff --git a/WebKit/mac/Plugins/Hosted/ProxyInstance.mm b/WebKit/mac/Plugins/Hosted/ProxyInstance.mm
index 01e64ba..75bc639 100644
--- a/WebKit/mac/Plugins/Hosted/ProxyInstance.mm
+++ b/WebKit/mac/Plugins/Hosted/ProxyInstance.mm
@@ -77,18 +77,18 @@ public:
uint64_t serverIdentifier() const { return m_serverIdentifier; }
private:
- virtual JSValuePtr valueFromInstance(ExecState*, const Instance*) const;
- virtual void setValueToInstance(ExecState*, const Instance*, JSValuePtr) const;
+ virtual JSValue valueFromInstance(ExecState*, const Instance*) const;
+ virtual void setValueToInstance(ExecState*, const Instance*, JSValue) const;
uint64_t m_serverIdentifier;
};
-JSValuePtr ProxyField::valueFromInstance(ExecState* exec, const Instance* instance) const
+JSValue ProxyField::valueFromInstance(ExecState* exec, const Instance* instance) const
{
return static_cast<const ProxyInstance*>(instance)->fieldValue(exec, this);
}
-void ProxyField::setValueToInstance(ExecState* exec, const Instance* instance, JSValuePtr value) const
+void ProxyField::setValueToInstance(ExecState* exec, const Instance* instance, JSValue value) const
{
static_cast<const ProxyInstance*>(instance)->setFieldValue(exec, this, value);
}
@@ -134,7 +134,7 @@ JSC::Bindings::Class *ProxyInstance::getClass() const
return proxyClass();
}
-JSValuePtr 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 JSC::ArgList& args)
{
RetainPtr<NSData*> arguments(m_instanceProxy->marshalValues(exec, args));
@@ -151,7 +151,7 @@ JSValuePtr ProxyInstance::invoke(JSC::ExecState* exec, InvokeType type, uint64_t
return m_instanceProxy->demarshalValue(exec, (char*)CFDataGetBytePtr(reply->m_result.get()), CFDataGetLength(reply->m_result.get()));
}
-JSValuePtr ProxyInstance::invokeMethod(ExecState* exec, const MethodList& methodList, const ArgList& args)
+JSValue ProxyInstance::invokeMethod(ExecState* exec, const MethodList& methodList, const ArgList& args)
{
ASSERT(methodList.size() == 1);
@@ -176,7 +176,7 @@ bool ProxyInstance::supportsInvokeDefaultMethod() const
return false;
}
-JSValuePtr ProxyInstance::invokeDefaultMethod(ExecState* exec, const ArgList& args)
+JSValue ProxyInstance::invokeDefaultMethod(ExecState* exec, const ArgList& args)
{
return invoke(exec, InvokeDefault, 0, args);
}
@@ -197,12 +197,12 @@ bool ProxyInstance::supportsConstruct() const
return false;
}
-JSValuePtr ProxyInstance::invokeConstruct(ExecState* exec, const ArgList& args)
+JSValue ProxyInstance::invokeConstruct(ExecState* exec, const ArgList& args)
{
return invoke(exec, Construct, 0, args);
}
-JSValuePtr ProxyInstance::defaultValue(ExecState* exec, PreferredPrimitiveType hint) const
+JSValue ProxyInstance::defaultValue(ExecState* exec, PreferredPrimitiveType hint) const
{
if (hint == PreferString)
return stringValue(exec);
@@ -211,25 +211,25 @@ JSValuePtr ProxyInstance::defaultValue(ExecState* exec, PreferredPrimitiveType h
return valueOf(exec);
}
-JSValuePtr ProxyInstance::stringValue(ExecState* exec) const
+JSValue ProxyInstance::stringValue(ExecState* exec) const
{
// FIXME: Implement something sensible.
return jsString(exec, "");
}
-JSValuePtr ProxyInstance::numberValue(ExecState* exec) const
+JSValue ProxyInstance::numberValue(ExecState* exec) const
{
// FIXME: Implement something sensible.
return jsNumber(exec, 0);
}
-JSValuePtr ProxyInstance::booleanValue() const
+JSValue ProxyInstance::booleanValue() const
{
// FIXME: Implement something sensible.
return jsBoolean(false);
}
-JSValuePtr ProxyInstance::valueOf(ExecState* exec) const
+JSValue ProxyInstance::valueOf(ExecState* exec) const
{
return stringValue(exec);
}
@@ -266,12 +266,15 @@ void ProxyInstance::getPropertyNames(ExecState* exec, PropertyNameArray& nameArr
MethodList ProxyInstance::methodsNamed(const Identifier& identifier)
{
- if (Method* method = m_methods.get(identifier.ustring().rep())) {
+ // If we already have an entry in the map, use it.
+ MethodMap::iterator existingMapEntry = m_methods.find(identifier.ustring().rep());
+ if (existingMapEntry != m_methods.end()) {
MethodList methodList;
- methodList.append(method);
+ if (existingMapEntry->second)
+ methodList.append(existingMapEntry->second);
return methodList;
}
-
+
uint64_t methodName = reinterpret_cast<uint64_t>(_NPN_GetStringIdentifier(identifier.ascii()));
uint32_t requestID = m_instanceProxy->nextRequestID();
@@ -281,23 +284,29 @@ MethodList ProxyInstance::methodsNamed(const Identifier& identifier)
return MethodList();
auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = m_instanceProxy->waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
- if (reply.get() && reply->m_result) {
- Method* method = new ProxyMethod(methodName);
-
- m_methods.set(identifier.ustring().rep(), method);
-
- MethodList methodList;
- methodList.append(method);
- return methodList;
- }
+ if (!reply.get())
+ return MethodList();
- return MethodList();
+ if (!reply->m_result && !m_instanceProxy->hostProxy()->shouldCacheMissingPropertiesAndMethods())
+ 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);
+ if (mapAddResult.second && reply->m_result)
+ mapAddResult.first->second = new ProxyMethod(methodName);
+
+ MethodList methodList;
+ if (mapAddResult.first->second)
+ methodList.append(mapAddResult.first->second);
+ return methodList;
}
Field* ProxyInstance::fieldNamed(const Identifier& identifier)
{
- if (Field* field = m_fields.get(identifier.ustring().rep()))
- return field;
+ // If we already have an entry in the map, use it.
+ FieldMap::iterator existingMapEntry = m_fields.find(identifier.ustring().rep());
+ if (existingMapEntry != m_fields.end())
+ return existingMapEntry->second;
uint64_t propertyName = reinterpret_cast<uint64_t>(_NPN_GetStringIdentifier(identifier.ascii()));
uint32_t requestID = m_instanceProxy->nextRequestID();
@@ -306,20 +315,22 @@ Field* ProxyInstance::fieldNamed(const Identifier& identifier)
m_instanceProxy->pluginID(), requestID,
m_objectID, propertyName) != KERN_SUCCESS)
return 0;
-
+
auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = m_instanceProxy->waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
- if (reply.get() && reply->m_result) {
- Field* field = new ProxyField(propertyName);
-
- m_fields.set(identifier.ustring().rep(), field);
+ if (!reply.get())
+ return 0;
- return field;
- }
+ if (!reply->m_result && !m_instanceProxy->hostProxy()->shouldCacheMissingPropertiesAndMethods())
+ return 0;
- 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);
+ if (mapAddResult.second && reply->m_result)
+ mapAddResult.first->second = new ProxyField(propertyName);
+ return mapAddResult.first->second;
}
-JSC::JSValuePtr ProxyInstance::fieldValue(ExecState* exec, const Field* field) const
+JSC::JSValue ProxyInstance::fieldValue(ExecState* exec, const Field* field) const
{
uint64_t serverIdentifier = static_cast<const ProxyField*>(field)->serverIdentifier();
uint32_t requestID = m_instanceProxy->nextRequestID();
@@ -336,7 +347,7 @@ JSC::JSValuePtr ProxyInstance::fieldValue(ExecState* exec, const Field* field) c
return m_instanceProxy->demarshalValue(exec, (char*)CFDataGetBytePtr(reply->m_result.get()), CFDataGetLength(reply->m_result.get()));
}
-void ProxyInstance::setFieldValue(ExecState* exec, const Field* field, JSValuePtr value) const
+void ProxyInstance::setFieldValue(ExecState* exec, const Field* field, JSValue value) const
{
uint64_t serverIdentifier = static_cast<const ProxyField*>(field)->serverIdentifier();
uint32_t requestID = m_instanceProxy->nextRequestID();
diff --git a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h
index 8b68b7b..4ff5aba 100644
--- a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h
+++ b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h
@@ -31,10 +31,11 @@
#import <wtf/RefPtr.h>
namespace WebKit {
+ class HostedNetscapePluginStream;
class NetscapePluginInstanceProxy;
}
-@interface WebHostedNetscapePluginView : WebBaseNetscapePluginView
+@interface WebHostedNetscapePluginView : WebBaseNetscapePluginView<WebPluginManualLoader, WebPluginContainerCheckController>
{
RetainPtr<NSArray> _attributeKeys;
RetainPtr<NSArray> _attributeValues;
@@ -42,6 +43,7 @@ namespace WebKit {
RetainPtr<CALayer> _pluginLayer;
WKSoftwareCARendererRef _softwareRenderer;
+ NSSize _previousSize;
RefPtr<WebKit::NetscapePluginInstanceProxy> _proxy;
BOOL _pluginHostDied;
}
diff --git a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
index c17d249..0cce014 100644
--- a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
@@ -26,15 +26,19 @@
#import "WebHostedNetscapePluginView.h"
+#import "HostedNetscapePluginStream.h"
#import "NetscapePluginInstanceProxy.h"
#import "NetscapePluginHostManager.h"
#import "NetscapePluginHostProxy.h"
#import "WebTextInputWindowController.h"
+#import "WebFrameInternal.h"
#import "WebView.h"
#import "WebViewInternal.h"
#import "WebUIDelegate.h"
#import <CoreFoundation/CoreFoundation.h>
+#import <WebCore/Frame.h>
+#import <WebCore/FrameLoaderTypes.h>
#import <WebCore/HTMLPlugInElement.h>
#import <WebCore/runtime.h>
#import <WebCore/runtime_root.h>
@@ -42,6 +46,7 @@
#import <runtime/InitializeThreading.h>
#import <wtf/Assertions.h>
+using namespace WebCore;
using namespace WebKit;
extern "C" {
@@ -97,7 +102,7 @@ extern "C" {
NSString *userAgent = [[self webView] userAgentForURL:_baseURL.get()];
- _proxy = NetscapePluginHostManager::shared().instantiatePlugin(_pluginPackage.get(), self, _MIMEType.get(), _attributeKeys.get(), _attributeValues.get(), userAgent, _sourceURL.get());
+ _proxy = NetscapePluginHostManager::shared().instantiatePlugin(_pluginPackage.get(), self, _MIMEType.get(), _attributeKeys.get(), _attributeValues.get(), userAgent, _sourceURL.get(), _mode == NP_FULL);
if (!_proxy)
return NO;
@@ -116,6 +121,7 @@ extern "C" {
- (void)setLayer:(CALayer *)newLayer
{
+ // FIXME: This should use the same implementation as WebNetscapePluginView (and move to the base class).
[super setLayer:newLayer];
if (_pluginLayer)
@@ -140,7 +146,10 @@ extern "C" {
boundsInWindow.origin.y = borderViewHeight - NSMaxY(boundsInWindow);
visibleRectInWindow.origin.y = borderViewHeight - NSMaxY(visibleRectInWindow);
- _proxy->resize(boundsInWindow, visibleRectInWindow);
+ BOOL sizeChanged = !NSEqualSizes(_previousSize, boundsInWindow.size);
+ _previousSize = boundsInWindow.size;
+
+ _proxy->resize(boundsInWindow, visibleRectInWindow, sizeChanged);
}
- (void)windowFocusChanged:(BOOL)hasFocus
@@ -254,6 +263,17 @@ extern "C" {
_proxy->mouseEvent(self, event, NPCocoaEventMouseExited);
}
+- (void)scrollWheel:(NSEvent *)event
+{
+ bool processedEvent = false;
+
+ if (_isStarted && _proxy)
+ processedEvent = _proxy->wheelEvent(self, event);
+
+ if (!processedEvent)
+ [super scrollWheel:event];
+}
+
- (NSTextInputContext *)inputContext
{
return [[WebTextInputWindowController sharedTextInputWindowController] inputContext];
@@ -280,6 +300,18 @@ extern "C" {
_proxy->keyEvent(self, event, NPCocoaEventKeyUp);
}
+- (void)flagsChanged:(NSEvent *)event
+{
+ if (_isStarted && _proxy)
+ _proxy->flagsChanged(event);
+}
+
+- (void)sendModifierEventWithKeyCode:(int)keyCode character:(char)character
+{
+ if (_isStarted && _proxy)
+ _proxy->syntheticKeyDownWithCommandModifier(keyCode, character);
+}
+
- (void)pluginHostDied
{
_pluginHostDied = YES;
@@ -290,7 +322,7 @@ extern "C" {
// No need for us to be layer backed anymore
self.wantsLayer = NO;
- [self setNeedsDisplay:YES];
+ [self invalidatePluginContentRect:[self bounds]];
}
@@ -334,6 +366,72 @@ extern "C" {
return _proxy->createBindingsInstance(rootObject);
}
+- (void)pluginView:(NSView *)pluginView receivedResponse:(NSURLResponse *)response
+{
+ ASSERT(_loadManually);
+ if (!_proxy)
+ return;
+
+ ASSERT(!_proxy->manualStream());
+
+ _proxy->setManualStream(HostedNetscapePluginStream::create(_proxy.get(), core([self webFrame])->loader()));
+ _proxy->manualStream()->startStreamWithResponse(response);
+}
+
+- (void)pluginView:(NSView *)pluginView receivedData:(NSData *)data
+{
+ ASSERT(_loadManually);
+ if (!_proxy)
+ return;
+
+ if (HostedNetscapePluginStream* manualStream = _proxy->manualStream())
+ manualStream->didReceiveData(0, static_cast<const char*>([data bytes]), [data length]);
+}
+
+- (void)pluginView:(NSView *)pluginView receivedError:(NSError *)error
+{
+ ASSERT(_loadManually);
+ if (!_proxy)
+ return;
+
+ if (HostedNetscapePluginStream* manualStream = _proxy->manualStream())
+ manualStream->didFail(0, error);
+}
+
+- (void)pluginViewFinishedLoading:(NSView *)pluginView
+{
+ ASSERT(_loadManually);
+ if (!_proxy)
+ return;
+
+ if (HostedNetscapePluginStream* manualStream = _proxy->manualStream())
+ manualStream->didFinishLoading(0);
+}
+
+- (void)_webPluginContainerCancelCheckIfAllowedToLoadRequest:(id)webPluginContainerCheck
+{
+ ASSERT([webPluginContainerCheck isKindOfClass:[WebPluginContainerCheck class]]);
+
+ id contextInfo = [webPluginContainerCheck contextInfo];
+ ASSERT(contextInfo && [contextInfo isKindOfClass:[NSNumber class]]);
+
+ if (!_proxy)
+ return;
+
+ uint32_t checkID = [(NSNumber *)contextInfo unsignedIntValue];
+ _proxy->cancelCheckIfAllowedToLoadURL(checkID);
+}
+
+- (void)_containerCheckResult:(PolicyAction)policy contextInfo:(id)contextInfo
+{
+ ASSERT([contextInfo isKindOfClass:[NSNumber class]]);
+ if (!_proxy)
+ return;
+
+ uint32_t checkID = [(NSNumber *)contextInfo unsignedIntValue];
+ _proxy->checkIfAllowedToLoadURLResult(checkID, (policy == PolicyUse));
+}
+
@end
#endif
diff --git a/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs b/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs
index 6128517..9877d9e 100644
--- a/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs
+++ b/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs
@@ -56,6 +56,45 @@ simpleroutine PCInvalidateRect(clientPort :mach_port_t;
width :double;
height :double);
+routine PCGetCookies(clientPort :mach_port_t;
+ pluginID :uint32_t;
+ url :data_t;
+ out returnValue :boolean_t;
+ out cookies :data_t, dealloc);
+
+routine PCSetCookies(clientPort :mach_port_t;
+ pluginID :uint32_t;
+ url :data_t;
+ cookies :data_t;
+ out returnValue :boolean_t);
+
+routine PCGetProxy(clientPort :mach_port_t;
+ pluginID :uint32_t;
+ url :data_t;
+ out returnValue :boolean_t;
+ out proxy :data_t, dealloc);
+
+routine PCGetAuthenticationInfo(clientPort :mach_port_t;
+ pluginID :uint32_t;
+ protocol :data_t;
+ host :data_t;
+ port :uint32_t;
+ scheme :data_t;
+ realm :data_t;
+ out returnValue :boolean_t;
+ out username :data_t, dealloc;
+ out password :data_t, dealloc);
+
+routine PCConvertPoint(clientPort :mach_port_t;
+ pluginID :uint32_t;
+ sourceX :double;
+ sourceY :double;
+ sourceSpace :uint32_t;
+ destSpace :uint32_t;
+ out returnValue :boolean_t;
+ out destX :double;
+ out destY :double);
+
// NPRuntime
routine PCGetStringIdentifier(clientPort :mach_port_t;
@@ -81,7 +120,8 @@ simpleroutine PCEvaluate(clientPort :mach_port_t;
pluginID :uint32_t;
requestID :uint32_t;
objectID :uint32_t;
- script :data_t);
+ script :data_t;
+ allowPopups :boolean_t);
simpleroutine PCInvoke(clientPort :mach_port_t;
pluginID :uint32_t;
@@ -151,6 +191,22 @@ simpleroutine PCSetMenuBarVisible(clientPort :mach_port_t;
simpleroutine PCSetModal(clientPort :mach_port_t;
modal :boolean_t);
+routine PCCheckIfAllowedToLoadURL(clientPort :mach_port_t;
+ pluginID :uint32_t;
+ url :data_t;
+ target :data_t;
+ out checkID :uint32_t);
+
+simpleroutine PCCancelCheckIfAllowedToLoadURL(clientPort :mach_port_t;
+ pluginID :uint32_t;
+ checkID :uint32_t);
+
+routine PCResolveURL(clientPort :mach_port_t;
+ pluginID :uint32_t;
+ url :data_t;
+ target :data_t;
+ out resolvedURL :data_t, dealloc);
+
// Replies
simpleroutine PCInstantiatePluginReply(clientPort :mach_port_t;
pluginID :uint32_t;
diff --git a/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs b/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs
index c6c38aa..41d7498 100644
--- a/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs
+++ b/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs
@@ -45,11 +45,17 @@ simpleroutine PHInstantiatePlugin(pluginHostPort :mach_port_t;
pluginID :uint32_t);
simpleroutine PHResizePluginInstance(pluginHostPort :mach_port_t;
- pluginID :uint32_t;
- x :double;
- y :double;
- width :double;
- height :double);
+ pluginID :uint32_t;
+ requestID :uint32_t;
+ pluginX :double;
+ pluginY :double;
+ pluginWidth :double;
+ pluginHeight :double;
+ clipX :double;
+ clipY :double;
+ clipWidth :double;
+ clipHeight :double);
+
simpleroutine PHPluginInstanceFocusChanged(pluginHostPort :mach_port_t;
pluginID :uint32_t;
hasFocus :boolean_t);
@@ -88,7 +94,20 @@ simpleroutine PHPluginInstanceKeyboardEvent(pluginHostPort :mach_port_t;
characters :data_t;
charactersIgnoringModifiers :data_t;
isARepeat :boolean_t;
- keyCode :uint16_t);
+ keyCode :uint16_t;
+ keyChar :uint8_t);
+
+simpleroutine PHPluginInstanceWheelEvent(pluginHostPort :mach_port_t;
+ pluginID :uint32_t;
+ requestID :uint32_t;
+ timestamp :double;
+ modifierFlags :uint32_t;
+ pluginX :double;
+ pluginY :double;
+ buttonNumber :int32_t;
+ deltaX :double;
+ deltaY :double;
+ deltaZ: double);
simpleroutine PHPluginInstanceInsertText(pluginHostPort :mach_port_t;
pluginID :uint32_t;
@@ -110,6 +129,10 @@ simpleroutine PHDestroyPluginInstance(pluginHostPort :mach_port_t;
pluginID :uint32_t;
requestID :uint32_t);
+simpleroutine PHCheckIfAllowedToLoadURLResult(clientPort :mach_port_t;
+ pluginID :uint32_t;
+ checkID :uint32_t;
+ result :boolean_t);
// Streams
simpleroutine PHStartStream(pluginHostPort :mach_port_t;
diff --git a/WebKit/mac/Plugins/Hosted/WebKitPluginHostTypes.h b/WebKit/mac/Plugins/Hosted/WebKitPluginHostTypes.h
index a5efde9..e8bd82d 100644
--- a/WebKit/mac/Plugins/Hosted/WebKitPluginHostTypes.h
+++ b/WebKit/mac/Plugins/Hosted/WebKitPluginHostTypes.h
@@ -39,7 +39,7 @@ enum LoadURLFlags {
IsPost = 1 << 0,
PostDataIsFile = 1 << 1,
AllowHeadersInPostData = 1 << 2,
- CurrentEventIsUserGesture = 1 << 3,
+ AllowPopups = 1 << 3,
};
enum InvokeType {
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm b/WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm
index 96f7644..a5a8a2d 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm
+++ b/WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm
@@ -348,7 +348,7 @@ void WebNetscapePluginStream::didReceiveResponse(NetscapePlugInStreamLoader*, co
// startStreamResponseURL:... will null-terminate.
}
- startStream([r URL], expectedContentLength, WKGetNSURLResponseLastModifiedDate(r), [r _webcore_MIMEType], theHeaders);
+ startStream([r URL], expectedContentLength, WKGetNSURLResponseLastModifiedDate(r), [r MIMEType], theHeaders);
}
void WebNetscapePluginStream::startStreamWithResponse(NSURLResponse *response)
@@ -365,7 +365,7 @@ bool WebNetscapePluginStream::wantsAllStreams() const
NPError error;
{
PluginStopDeferrer deferrer(m_pluginView.get());
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
error = m_pluginFuncs->getvalue(m_plugin, NPPVpluginWantsAllNetworkStreams, &value);
}
if (error != NPERR_NO_ERROR)
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.h b/WebKit/mac/Plugins/WebBaseNetscapePluginView.h
index ec0a3df..a9fb188 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.h
+++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.h
@@ -30,7 +30,7 @@
#import <Cocoa/Cocoa.h>
#import "WebNetscapePluginPackage.h"
-
+#import "WebPluginContainerCheck.h"
#import <wtf/PassRefPtr.h>
#import <wtf/RefPtr.h>
#import <wtf/RetainPtr.h>
@@ -41,6 +41,7 @@
@class WebView;
namespace WebCore {
+ class CString;
class HTMLPlugInElement;
}
@@ -52,6 +53,7 @@ namespace WebCore {
int _mode;
+ BOOL _triedAndFailedToCreatePlugin;
BOOL _loadManually;
BOOL _shouldFireTimers;
BOOL _isStarted;
@@ -78,6 +80,7 @@ namespace WebCore {
- (WebNetscapePluginPackage *)pluginPackage;
+- (NSURL *)URLWithCString:(const char *)URLCString;
- (NSMutableURLRequest *)requestWithURLCString:(const char *)URLCString;
// Subclasses must override these.
@@ -102,7 +105,24 @@ namespace WebCore {
- (void)addWindowObservers;
- (void)removeWindowObservers;
+
+- (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;
+
+- (void)invalidatePluginContentRect:(NSRect)rect;
+
@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);
+}
+
#endif
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
index 26057fa..1345fc3 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
@@ -34,12 +34,16 @@
#import "WebKitLogging.h"
#import "WebKitNSStringExtras.h"
#import "WebKitSystemInterface.h"
+#import "WebPluginContainerCheck.h"
+#import "WebNetscapeContainerCheckContextInfo.h"
#import "WebNSURLExtras.h"
#import "WebNSURLRequestExtras.h"
#import "WebView.h"
#import "WebViewInternal.h"
#import <WebCore/WebCoreObjCExtras.h>
+#import <WebCore/AuthenticationMac.h>
+#import <WebCore/CString.h>
#import <WebCore/Document.h>
#import <WebCore/Element.h>
#import <WebCore/Frame.h>
@@ -87,14 +91,27 @@ using namespace WebCore;
_baseURL.adoptNS([baseURL copy]);
_MIMEType.adoptNS([MIME copy]);
- [self setAttributeKeys:keys andValues:values];
+#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"]) {
+ RetainPtr<NSMutableArray> mutableKeys(AdoptNS, [keys mutableCopy]);
+ RetainPtr<NSMutableArray> mutableValues(AdoptNS, [values mutableCopy]);
+
+ [mutableKeys.get() addObject:@"kioskmode"];
+ [mutableValues.get() addObject:@"true"];
+ [self setAttributeKeys:mutableKeys.get() andValues:mutableValues.get()];
+ } else
+#endif
+ [self setAttributeKeys:keys andValues:values];
+
if (loadManually)
_mode = NP_FULL;
else
_mode = NP_EMBED;
_loadManually = loadManually;
-
+
return self;
}
@@ -123,7 +140,7 @@ using namespace WebCore;
return YES;
}
-- (NSMutableURLRequest *)requestWithURLCString:(const char *)URLCString
+- (NSURL *)URLWithCString:(const char *)URLCString
{
if (!URLCString)
return nil;
@@ -137,6 +154,15 @@ using namespace WebCore;
if (!URL)
return nil;
+ return URL;
+}
+
+- (NSMutableURLRequest *)requestWithURLCString:(const char *)URLCString
+{
+ NSURL *URL = [self URLWithCString:URLCString];
+ if (!URL)
+ return nil;
+
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:URL];
Frame* frame = core([self webFrame]);
if (!frame)
@@ -193,6 +219,11 @@ using namespace WebCore;
ASSERT_NOT_REACHED();
}
+- (void)sendModifierEventWithKeyCode:(int)keyCode character:(char)character
+{
+ ASSERT_NOT_REACHED();
+}
+
- (void)removeTrackingRect
{
if (_trackingTag) {
@@ -327,6 +358,9 @@ using namespace WebCore;
if (_isStarted)
return;
+ if (_triedAndFailedToCreatePlugin)
+ return;
+
ASSERT([self webView]);
if (![[[self webView] preferences] arePlugInsEnabled])
@@ -348,8 +382,10 @@ using namespace WebCore;
if (!wasDeferring)
page->setDefersLoading(false);
- if (!result)
+ if (!result) {
+ _triedAndFailedToCreatePlugin = YES;
return;
+ }
_isStarted = YES;
[[self webView] addPluginInstanceView:self];
@@ -484,14 +520,14 @@ using namespace WebCore;
- (void)windowBecameKey:(NSNotification *)notification
{
[self sendActivateEvent:YES];
- [self setNeedsDisplay:YES];
+ [self invalidatePluginContentRect:[self bounds]];
[self restartTimers];
}
- (void)windowResignedKey:(NSNotification *)notification
{
[self sendActivateEvent:NO];
- [self setNeedsDisplay:YES];
+ [self invalidatePluginContentRect:[self bounds]];
[self restartTimers];
}
@@ -527,7 +563,7 @@ using namespace WebCore;
}
} else {
[self stop];
- [self setNeedsDisplay:YES];
+ [self invalidatePluginContentRect:[self bounds]];
}
}
}
@@ -596,26 +632,24 @@ using namespace WebCore;
return _element.get();
}
-// We want to treat these as regular keyboard events.
-
- (void)cut:(id)sender
{
- [self keyDown:[NSApp currentEvent]];
+ [self sendModifierEventWithKeyCode:7 character:'x'];
}
- (void)copy:(id)sender
{
- [self keyDown:[NSApp currentEvent]];
+ [self sendModifierEventWithKeyCode:8 character:'c'];
}
- (void)paste:(id)sender
{
- [self keyDown:[NSApp currentEvent]];
+ [self sendModifierEventWithKeyCode:9 character:'v'];
}
- (void)selectAll:(id)sender
{
- [self keyDown:[NSApp currentEvent]];
+ [self sendModifierEventWithKeyCode:0 character:'a'];
}
// AppKit doesn't call mouseDown or mouseUp on right-click. Simulate control-click
@@ -630,7 +664,226 @@ using namespace WebCore;
[self mouseUp:theEvent];
}
+
+- (BOOL)convertFromX:(double)sourceX andY:(double)sourceY space:(NPCoordinateSpace)sourceSpace
+ toX:(double *)destX andY:(double *)destY space:(NPCoordinateSpace)destSpace
+{
+ // Nothing to do
+ if (sourceSpace == destSpace)
+ return TRUE;
+
+ NSPoint sourcePoint = NSMakePoint(sourceX, sourceY);
+
+ NSPoint sourcePointInScreenSpace;
+
+ // First convert to screen space
+ switch (sourceSpace) {
+ case NPCoordinateSpacePlugin:
+ sourcePointInScreenSpace = [self convertPoint:sourcePoint toView:nil];
+ sourcePointInScreenSpace = [[self currentWindow] convertBaseToScreen:sourcePointInScreenSpace];
+ break;
+
+ case NPCoordinateSpaceWindow:
+ sourcePointInScreenSpace = [[self currentWindow] convertBaseToScreen:sourcePoint];
+ break;
+
+ case NPCoordinateSpaceFlippedWindow:
+ sourcePoint.y = [[self currentWindow] frame].size.height - sourcePoint.y;
+ sourcePointInScreenSpace = [[self currentWindow] convertBaseToScreen:sourcePoint];
+ break;
+
+ case NPCoordinateSpaceScreen:
+ sourcePointInScreenSpace = sourcePoint;
+ break;
+
+ case NPCoordinateSpaceFlippedScreen:
+ sourcePoint.y = [[[NSScreen screens] objectAtIndex:0] frame].size.height - sourcePoint.y;
+ sourcePointInScreenSpace = sourcePoint;
+ break;
+ default:
+ return FALSE;
+ }
+
+ NSPoint destPoint;
+
+ // Then convert back to the destination space
+ switch (destSpace) {
+ case NPCoordinateSpacePlugin:
+ destPoint = [[self currentWindow] convertScreenToBase:sourcePointInScreenSpace];
+ destPoint = [self convertPoint:destPoint fromView:nil];
+ break;
+
+ case NPCoordinateSpaceWindow:
+ destPoint = [[self currentWindow] convertScreenToBase:sourcePointInScreenSpace];
+ break;
+
+ case NPCoordinateSpaceFlippedWindow:
+ destPoint = [[self currentWindow] convertScreenToBase:sourcePointInScreenSpace];
+ destPoint.y = [[self currentWindow] frame].size.height - destPoint.y;
+ break;
+
+ case NPCoordinateSpaceScreen:
+ destPoint = sourcePointInScreenSpace;
+ break;
+
+ case NPCoordinateSpaceFlippedScreen:
+ destPoint = sourcePointInScreenSpace;
+ destPoint.y = [[[NSScreen screens] objectAtIndex:0] frame].size.height - destPoint.y;
+ break;
+
+ default:
+ return FALSE;
+ }
+
+ if (destX)
+ *destX = destPoint.x;
+ if (destY)
+ *destY = destPoint.y;
+
+ return TRUE;
+}
+
+
+- (CString)resolvedURLStringForURL:(const char*)url target:(const char*)target;
+{
+ String relativeURLString = String::fromUTF8(url);
+ if (relativeURLString.isNull())
+ return CString();
+
+ Frame* frame = core([self webFrame]);
+ if (!frame)
+ return CString();
+
+ Frame* targetFrame = frame->tree()->find(String::fromUTF8(target));
+ if (!targetFrame)
+ return CString();
+
+ if (!frame->document()->securityOrigin()->canAccess(targetFrame->document()->securityOrigin()))
+ return CString();
+
+ KURL absoluteURL = targetFrame->loader()->completeURL(relativeURLString);
+ return absoluteURL.string().utf8();
+}
+
+- (void)invalidatePluginContentRect:(NSRect)rect
+{
+ if (RenderBoxModelObject *renderer = toRenderBoxModelObject(_element->renderer())) {
+ IntRect contentRect(rect);
+ contentRect.move(renderer->borderLeft() + renderer->paddingLeft(), renderer->borderTop() + renderer->paddingTop());
+
+ renderer->repaintRectangle(contentRect);
+ }
+}
+
@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)
+{
+ if (strcasecmp(protocolStr, "http") != 0 &&
+ strcasecmp(protocolStr, "https") != 0)
+ return false;
+
+ NSString *host = [NSString stringWithUTF8String:hostStr];
+ if (!hostStr)
+ return false;
+
+ NSString *protocol = [NSString stringWithUTF8String:protocolStr];
+ if (!protocol)
+ return false;
+
+ NSString *realm = [NSString stringWithUTF8String:realmStr];
+ if (!realm)
+ return NPERR_GENERIC_ERROR;
+
+ NSString *authenticationMethod = NSURLAuthenticationMethodDefault;
+ if (!strcasecmp(protocolStr, "http")) {
+ if (!strcasecmp(schemeStr, "basic"))
+ authenticationMethod = NSURLAuthenticationMethodHTTPBasic;
+ else if (!strcasecmp(schemeStr, "digest"))
+ authenticationMethod = NSURLAuthenticationMethodHTTPDigest;
+ }
+
+ RetainPtr<NSURLProtectionSpace> protectionSpace(AdoptNS, [[NSURLProtectionSpace alloc] initWithHost:host port:port protocol:protocol realm:realm authenticationMethod:authenticationMethod]);
+
+ NSURLCredential *credential = WebCoreCredentialStorage::get(protectionSpace.get());
+ if (!credential)
+ credential = [[NSURLCredentialStorage sharedCredentialStorage] defaultCredentialForProtectionSpace:protectionSpace.get()];
+ if (!credential)
+ return false;
+
+ if (![credential hasPassword])
+ return false;
+
+ username = [[credential user] UTF8String];
+ password = [[credential password] UTF8String];
+
+ return true;
+}
+
+} // namespace WebKit
+
#endif // ENABLE(NETSCAPE_PLUGIN_API)
diff --git a/WebKit/mac/Plugins/WebNetscapeContainerCheckContextInfo.h b/WebKit/mac/Plugins/WebNetscapeContainerCheckContextInfo.h
new file mode 100644
index 0000000..e9b14a7
--- /dev/null
+++ b/WebKit/mac/Plugins/WebNetscapeContainerCheckContextInfo.h
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ * 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 "WebBaseNetscapePluginView.h"
+
+#if ENABLE(NETSCAPE_PLUGIN_API)
+
+@interface WebNetscapeContainerCheckContextInfo : NSObject {
+ uint32 _checkRequestID;
+ void (*_callback)(NPP npp, uint32, 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;
+- (void*)context;
+
+@end
+
+#endif // ENABLE(NETSCAPE_PLUGIN_API)
diff --git a/WebKit/mac/Plugins/WebNetscapeContainerCheckContextInfo.mm b/WebKit/mac/Plugins/WebNetscapeContainerCheckContextInfo.mm
new file mode 100644
index 0000000..34a0ec1
--- /dev/null
+++ b/WebKit/mac/Plugins/WebNetscapeContainerCheckContextInfo.mm
@@ -0,0 +1,61 @@
+/*
+ * 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 "WebNetscapeContainerCheckContextInfo.h"
+
+#if ENABLE(NETSCAPE_PLUGIN_API)
+
+@implementation WebNetscapeContainerCheckContextInfo
+
+- (id)initWithCheckRequestID:(uint32)checkRequestID callbackFunc:(void (*)(NPP npp, uint32 checkID, NPBool allowed, void* context))callbackFunc context:(void*)context
+{
+ self = [super init];
+ if (!self)
+ return nil;
+
+ _checkRequestID = checkRequestID;
+ _callback = callbackFunc;
+ _context = context;
+ return self;
+}
+
+- (uint32)checkRequestID
+{
+ return _checkRequestID;
+}
+
+- (void (*)(NPP npp, uint32, NPBool, void*))callback
+{
+ return _callback;
+}
+
+- (void*)context
+{
+ return _context;
+}
+
+@end
+
+#endif // ENABLE(NETSCAPE_PLUGIN_API)
diff --git a/WebKit/mac/Misc/WebGraphicsExtras.c b/WebKit/mac/Plugins/WebNetscapeContainerCheckPrivate.h
index 4d36b58..dfde2f7 100644
--- a/WebKit/mac/Misc/WebGraphicsExtras.c
+++ b/WebKit/mac/Plugins/WebNetscapeContainerCheckPrivate.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
+ * 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
@@ -26,32 +26,39 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import "WebGraphicsExtras.h"
+#ifndef WebNetscapeContainerCheckPrivate_h
+#define WebNetscapeContainerCheckPrivate_h
-#import <Accelerate/Accelerate.h>
-#import <dlfcn.h>
-#import <wtf/Assertions.h>
+#include <WebKit/npapi.h>
-unsigned WebConvertBGRAToARGB(unsigned char *offscreenBuffer, int rowBytes, int x, int y, int width, int height)
-{
+#ifdef __cplusplus
+extern "C" {
+#endif
- static vImage_Error (*softLink_vImagePermuteChannels_ARGB8888)(const vImage_Buffer *src, const vImage_Buffer *dest, const uint8_t permuteMap[4], vImage_Flags flags) = NULL;
-
- if (!softLink_vImagePermuteChannels_ARGB8888) {
- void *framework = dlopen("/System/Library/Frameworks/Accelerate.framework/Accelerate", RTLD_NOW);
- ASSERT(framework);
- softLink_vImagePermuteChannels_ARGB8888 = dlsym(framework, "vImagePermuteChannels_ARGB8888");
- ASSERT(softLink_vImagePermuteChannels_ARGB8888);
- }
-
- void *swizzleImageBase = offscreenBuffer + y * rowBytes + x * 4;
- vImage_Buffer vImage = { swizzleImageBase, height, width, rowBytes };
- uint8_t vImagePermuteMap[4] = { 3, 2, 1, 0 }; // Where { 0, 1, 2, 3 } would leave the channels unchanged; this map converts BGRA to ARGB
- vImage_Error vImageError = softLink_vImagePermuteChannels_ARGB8888(&vImage, &vImage, vImagePermuteMap, 0);
- if (vImageError) {
- LOG_ERROR("Could not convert BGRA image to ARGB: %zd", vImageError);
- return FALSE;
- }
+#define WKNVBrowserContainerCheckFuncs 1701
+#define WKNVBrowserContainerCheckFuncsVersion 2
+
+#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 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);
+char* WKN_ResolveURL(NPP npp, const char* url, const char* target);
+
+typedef struct _WKNBrowserContainerCheckFuncs {
+ uint16 size;
+ uint16 version;
- return TRUE;
+ WKN_CheckIfAllowedToLoadURLProcPtr checkIfAllowedToLoadURL;
+ WKN_CancelCheckIfAllowedToLoadURLProcPtr cancelCheckIfAllowedToLoadURL;
+ WKN_ResolveURLProcPtr resolveURL;
+} WKNBrowserContainerCheckFuncs;
+
+#ifdef __cplusplus
}
+#endif
+
+#endif // WebNetscapeContainerCheckPrivate_h
diff --git a/WebKit/mac/Plugins/WebNetscapeContainerCheckPrivate.mm b/WebKit/mac/Plugins/WebNetscapeContainerCheckPrivate.mm
new file mode 100644
index 0000000..d326b56
--- /dev/null
+++ b/WebKit/mac/Plugins/WebNetscapeContainerCheckPrivate.mm
@@ -0,0 +1,48 @@
+/*
+ * 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.
+ * 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 "WebNetscapeContainerCheckPrivate.h"
+
+#import "WebNetscapePluginView.h"
+
+#if ENABLE(NETSCAPE_PLUGIN_API)
+
+WKNBrowserContainerCheckFuncs *browserContainerCheckFuncs()
+{
+ static WKNBrowserContainerCheckFuncs funcs = {
+ sizeof(WKNBrowserContainerCheckFuncs),
+ WKNVBrowserContainerCheckFuncsVersion,
+ WKN_CheckIfAllowedToLoadURL,
+ WKN_CancelCheckIfAllowedToLoadURL,
+ WKN_ResolveURL
+ };
+
+ return &funcs;
+}
+
+#endif // ENABLE(NETSCAPE_PLUGIN_API)
diff --git a/WebKit/mac/Plugins/WebNetscapePluginEventHandler.h b/WebKit/mac/Plugins/WebNetscapePluginEventHandler.h
index d00796f..b9bdf7d 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginEventHandler.h
+++ b/WebKit/mac/Plugins/WebNetscapePluginEventHandler.h
@@ -40,7 +40,7 @@ public:
static WebNetscapePluginEventHandler* create(WebNetscapePluginView*);
virtual ~WebNetscapePluginEventHandler() { }
- virtual void drawRect(const NSRect&) = 0;
+ virtual void drawRect(CGContextRef, const NSRect&) = 0;
virtual void mouseDown(NSEvent*) = 0;
virtual void mouseDragged(NSEvent*) = 0;
@@ -53,6 +53,7 @@ public:
virtual void keyDown(NSEvent*) = 0;
virtual void keyUp(NSEvent*) = 0;
virtual void flagsChanged(NSEvent*) = 0;
+ virtual void syntheticKeyDownWithCommandModifier(int keyCode, char character) = 0;
virtual void focusChanged(bool hasFocus) = 0;
virtual void windowFocusChanged(bool hasFocus) = 0;
diff --git a/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.h b/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.h
index b01922a..676fd17 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.h
+++ b/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.h
@@ -37,7 +37,7 @@ class WebNetscapePluginEventHandlerCarbon : public WebNetscapePluginEventHandler
public:
WebNetscapePluginEventHandlerCarbon(WebNetscapePluginView*);
- virtual void drawRect(const NSRect&);
+ virtual void drawRect(CGContextRef, const NSRect&);
virtual void mouseDown(NSEvent*);
virtual void mouseDragged(NSEvent*);
@@ -50,7 +50,8 @@ public:
virtual void keyDown(NSEvent*);
virtual void keyUp(NSEvent*);
virtual void flagsChanged(NSEvent*);
-
+ virtual void syntheticKeyDownWithCommandModifier(int keyCode, char character);
+
virtual void windowFocusChanged(bool hasFocus);
virtual void focusChanged(bool hasFocus);
diff --git a/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm b/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm
index 7612322..d8324f7 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm
+++ b/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm
@@ -123,7 +123,7 @@ void WebNetscapePluginEventHandlerCarbon::sendNullEvent()
sendEvent(&event);
}
-void WebNetscapePluginEventHandlerCarbon::drawRect(const NSRect&)
+void WebNetscapePluginEventHandlerCarbon::drawRect(CGContextRef, const NSRect&)
{
EventRecord event;
@@ -209,6 +209,17 @@ void WebNetscapePluginEventHandlerCarbon::keyDown(NSEvent *theEvent)
WKSendKeyEventToTSM(theEvent);
}
+void WebNetscapePluginEventHandlerCarbon::syntheticKeyDownWithCommandModifier(int keyCode, char character)
+{
+ EventRecord event;
+ getCarbonEvent(&event);
+
+ event.what = ::keyDown;
+ event.modifiers |= cmdKey;
+ event.message = keyCode << 8 | character;
+ sendEvent(&event);
+}
+
static UInt32 keyMessageForEvent(NSEvent *event)
{
NSData *data = [[event characters] dataUsingEncoding:CFStringConvertEncodingToNSStringEncoding(CFStringGetSystemEncoding())];
diff --git a/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCocoa.h b/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCocoa.h
index 4613fcd..3a2f03f 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCocoa.h
+++ b/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCocoa.h
@@ -35,7 +35,7 @@ class WebNetscapePluginEventHandlerCocoa : public WebNetscapePluginEventHandler
public:
WebNetscapePluginEventHandlerCocoa(WebNetscapePluginView*);
- virtual void drawRect(const NSRect&);
+ virtual void drawRect(CGContextRef, const NSRect&);
virtual void mouseDown(NSEvent*);
virtual void mouseDragged(NSEvent*);
@@ -48,7 +48,8 @@ public:
virtual void keyDown(NSEvent*);
virtual void keyUp(NSEvent*);
virtual void flagsChanged(NSEvent*);
-
+ virtual void syntheticKeyDownWithCommandModifier(int keyCode, char character);
+
virtual void windowFocusChanged(bool hasFocus);
virtual void focusChanged(bool hasFocus);
diff --git a/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCocoa.mm b/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCocoa.mm
index e3fb362..a8ad861 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCocoa.mm
+++ b/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCocoa.mm
@@ -46,16 +46,19 @@ static inline void initializeEvent(NPCocoaEvent* event, NPCocoaEventType type)
event->version = 0;
}
-void WebNetscapePluginEventHandlerCocoa::drawRect(const NSRect& rect)
+void WebNetscapePluginEventHandlerCocoa::drawRect(CGContextRef context, const NSRect& rect)
{
NPCocoaEvent event;
initializeEvent(&event, NPCocoaEventDrawRect);
+ event.data.draw.context = context;
event.data.draw.x = rect.origin.x;
event.data.draw.y = rect.origin.y;
event.data.draw.width = rect.size.width;
event.data.draw.height = rect.size.height;
+ RetainPtr<CGContextRef> protect(context);
+
sendEvent(&event);
}
@@ -151,6 +154,23 @@ void WebNetscapePluginEventHandlerCocoa::flagsChanged(NSEvent *nsEvent)
sendEvent(&event);
}
+void WebNetscapePluginEventHandlerCocoa::syntheticKeyDownWithCommandModifier(int keyCode, char character)
+{
+ char nullTerminatedString[] = { character, '\0' };
+
+ RetainPtr<NSString> characters(AdoptNS, [[NSString alloc] initWithUTF8String:nullTerminatedString]);
+
+ NPCocoaEvent event;
+ initializeEvent(&event, NPCocoaEventKeyDown);
+ event.data.key.modifierFlags = NSCommandKeyMask;
+ event.data.key.keyCode = keyCode;
+ event.data.key.isARepeat = false;
+ event.data.key.characters = (NPNSString *)characters.get();
+ event.data.key.charactersIgnoringModifiers = (NPNSString *)characters.get();
+
+ sendEvent(&event);
+}
+
bool WebNetscapePluginEventHandlerCocoa::sendKeyEvent(NSEvent* nsEvent, NPCocoaEventType type)
{
NPCocoaEvent event;
diff --git a/WebKit/mac/Plugins/WebNetscapePluginPackage.mm b/WebKit/mac/Plugins/WebNetscapePluginPackage.mm
index 38ddddc..5c10d95 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginPackage.mm
+++ b/WebKit/mac/Plugins/WebNetscapePluginPackage.mm
@@ -31,6 +31,7 @@
#import "WebKitLogging.h"
#import "WebKitNSStringExtras.h"
+#import "WebNSFileManagerExtras.h"
#import "WebNSObjectExtras.h"
#import "WebNetscapeDeprecatedFunctions.h"
#import <WebCore/npruntime_impl.h>
@@ -216,7 +217,8 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
} else {
#ifdef SUPPORT_CFM
// Single-file plug-in with resource fork
- type = [[[NSFileManager defaultManager] fileAttributesAtPath:path traverseLink:YES] fileHFSTypeCode];
+ NSString *destinationPath = [[NSFileManager defaultManager] destinationOfSymbolicLinkAtPath:path error:0];
+ type = [[[NSFileManager defaultManager] attributesOfItemAtPath:destinationPath error:0] fileHFSTypeCode];
isBundle = NO;
isCFM = YES;
#else
@@ -455,9 +457,13 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
browserFuncs.pushpopupsenabledstate = (NPN_PushPopupsEnabledStateProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_PushPopupsEnabledState);
browserFuncs.poppopupsenabledstate = (NPN_PopPopupsEnabledStateProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_PopPopupsEnabledState);
browserFuncs.pluginthreadasynccall = (NPN_PluginThreadAsyncCallProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_PluginThreadAsyncCall);
+ browserFuncs.getvalueforurl = (NPN_GetValueForURLProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_GetValueForURL);
+ browserFuncs.setvalueforurl = (NPN_SetValueForURLProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_SetValueForURL);
+ browserFuncs.getauthenticationinfo = (NPN_GetAuthenticationInfoProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_GetAuthenticationInfo);
browserFuncs.scheduletimer = (NPN_ScheduleTimerProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_ScheduleTimer);
browserFuncs.unscheduletimer = (NPN_UnscheduleTimerProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_UnscheduleTimer);
browserFuncs.popupcontextmenu = (NPN_PopUpContextMenuProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_PopUpContextMenu);
+ browserFuncs.convertpoint = (NPN_ConvertPointProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_ConvertPoint);
browserFuncs.releasevariantvalue = (NPN_ReleaseVariantValueProcPtr)tVectorForFunctionPointer((FunctionPointer)_NPN_ReleaseVariantValue);
browserFuncs.getstringidentifier = (NPN_GetStringIdentifierProcPtr)tVectorForFunctionPointer((FunctionPointer)_NPN_GetStringIdentifier);
@@ -564,10 +570,14 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
browserFuncs.pushpopupsenabledstate = NPN_PushPopupsEnabledState;
browserFuncs.poppopupsenabledstate = NPN_PopPopupsEnabledState;
browserFuncs.pluginthreadasynccall = NPN_PluginThreadAsyncCall;
+ browserFuncs.getvalueforurl = NPN_GetValueForURL;
+ browserFuncs.setvalueforurl = NPN_SetValueForURL;
+ browserFuncs.getauthenticationinfo = NPN_GetAuthenticationInfo;
browserFuncs.scheduletimer = NPN_ScheduleTimer;
browserFuncs.unscheduletimer = NPN_UnscheduleTimer;
browserFuncs.popupcontextmenu = NPN_PopUpContextMenu;
-
+ browserFuncs.convertpoint = NPN_ConvertPoint;
+
browserFuncs.releasevariantvalue = _NPN_ReleaseVariantValue;
browserFuncs.getstringidentifier = _NPN_GetStringIdentifier;
browserFuncs.getstringidentifiers = _NPN_GetStringIdentifiers;
diff --git a/WebKit/mac/Plugins/WebNetscapePluginView.h b/WebKit/mac/Plugins/WebNetscapePluginView.h
index 783b7fb..b2583da 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginView.h
+++ b/WebKit/mac/Plugins/WebNetscapePluginView.h
@@ -30,6 +30,7 @@
#import "WebBaseNetscapePluginView.h"
+#import "WebNetscapeContainerCheckPrivate.h"
#import <WebKit/npfunctions.h>
#import <WebKit/npapi.h>
#import <wtf/HashMap.h>
@@ -57,7 +58,7 @@ typedef union PluginPort {
// for the plug-in to function correctly. (rdar://problem/4699455)
#define WebNetscapePluginView WebNetscapePluginDocumentView
-@interface WebNetscapePluginView : WebBaseNetscapePluginView<WebPluginManualLoader>
+@interface WebNetscapePluginView : WebBaseNetscapePluginView<WebPluginManualLoader, WebPluginContainerCheckController>
{
RefPtr<WebNetscapePluginStream> _manualStream;
#ifndef BUILDING_ON_TIGER
@@ -101,6 +102,9 @@ typedef union PluginPort {
BOOL _isFlash;
BOOL _isSilverlight;
+
+ NSMutableDictionary *_containerChecksInProgress;
+ uint32 _currentContainerCheckRequestID;
}
+ (WebNetscapePluginView *)currentPluginView;
@@ -139,6 +143,8 @@ 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;
@end
@@ -164,8 +170,15 @@ typedef union PluginPort {
- (uint32)scheduleTimerWithInterval:(uint32)interval repeat:(NPBool)repeat timerFunc:(void (*)(NPP npp, uint32 timerID))timerFunc;
- (void)unscheduleTimer:(uint32)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;
+- (char*)resolveURL:(const char*)url forTarget:(const char*)target;
@end
+WKNBrowserContainerCheckFuncs *browserContainerCheckFuncs();
+
#endif
diff --git a/WebKit/mac/Plugins/WebNetscapePluginView.mm b/WebKit/mac/Plugins/WebNetscapePluginView.mm
index cef33a4..24c5944 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebNetscapePluginView.mm
@@ -34,9 +34,9 @@
#import "WebDefaultUIDelegate.h"
#import "WebFrameInternal.h"
#import "WebFrameView.h"
-#import "WebGraphicsExtras.h"
#import "WebKitErrorsPrivate.h"
#import "WebKitLogging.h"
+#import "WebNetscapeContainerCheckPrivate.h"
#import "WebKitNSStringExtras.h"
#import "WebKitSystemInterface.h"
#import "WebNSDataExtras.h"
@@ -47,6 +47,8 @@
#import "WebNSViewExtras.h"
#import "WebNetscapePluginPackage.h"
#import "WebBaseNetscapePluginStream.h"
+#import "WebPluginContainerCheck.h"
+#import "WebNetscapeContainerCheckContextInfo.h"
#import "WebNetscapePluginEventHandler.h"
#import "WebNullPluginView.h"
#import "WebPreferences.h"
@@ -56,6 +58,8 @@
#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>
@@ -80,6 +84,7 @@ using std::max;
#define LoginWindowDidSwitchToUserNotification @"WebLoginWindowDidSwitchToUserNotification"
using namespace WebCore;
+using namespace WebKit;
static inline bool isDrawingModelQuickDraw(NPDrawingModel drawingModel)
{
@@ -507,14 +512,14 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
portState = (PortState)cgPortState;
cgPortState->context = context;
- // Update the plugin's window/context
-#ifdef NP_NO_CARBON
- nPort.cgPort.window = (NPNSWindow *)[self currentWindow];
-#else
- nPort.cgPort.window = _eventHandler->platformWindow([self currentWindow]);
+#ifndef NP_NO_CARBON
+ if (eventModel != NPEventModelCocoa) {
+ // Update the plugin's window/context
+ nPort.cgPort.window = windowRef;
+ nPort.cgPort.context = context;
+ window.window = &nPort.cgPort;
+ }
#endif /* NP_NO_CARBON */
- nPort.cgPort.context = context;
- window.window = &nPort.cgPort;
// Save current graphics context's state; will be restored by -restorePortState:
CGContextSaveGState(context);
@@ -539,7 +544,6 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
}
case NPDrawingModelCoreAnimation:
- window.window = [self currentWindow];
// Just set the port state to a dummy value.
portState = (PortState)1;
break;
@@ -590,12 +594,15 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
}
#endif /* NP_NO_QUICKDRAW */
- case NPDrawingModelCoreGraphics:
+ case NPDrawingModelCoreGraphics: {
ASSERT([NSView focusView] == self);
- ASSERT(((PortState_CG *)portState)->context == nPort.cgPort.context);
- CGContextRestoreGState(nPort.cgPort.context);
+
+ CGContextRef context = ((PortState_CG *)portState)->context;
+ ASSERT(!nPort.cgPort.context || (context == nPort.cgPort.context));
+ CGContextRestoreGState(context);
break;
-
+ }
+
case NPDrawingModelCoreAnimation:
ASSERT(portState == (PortState)1);
break;
@@ -661,8 +668,8 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
BOOL acceptedEvent;
[self willCallPlugInFunction];
{
- JSC::JSLock::DropAllLocks dropAllLocks(false);
- acceptedEvent = ![_pluginPackage.get() pluginFuncs]->event(plugin, event);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
+ acceptedEvent = [_pluginPackage.get() pluginFuncs]->event(plugin, event);
}
[self didCallPlugInFunction];
@@ -685,7 +692,8 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
{
ASSERT(_eventHandler);
- _eventHandler->drawRect(rect);
+ CGContextRef context = static_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]);
+ _eventHandler->drawRect(context, rect);
}
- (void)stopTimers
@@ -822,6 +830,14 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
_eventHandler->flagsChanged(theEvent);
}
+- (void)sendModifierEventWithKeyCode:(int)keyCode character:(char)character
+{
+ if (!_isStarted)
+ return;
+
+ _eventHandler->syntheticKeyDownWithCommandModifier(keyCode, character);
+}
+
#pragma mark WEB_NETSCAPE_PLUGIN
- (BOOL)isNewWindowEqualToOldWindow
@@ -956,7 +972,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
inSetWindow = YES;
[self willCallPlugInFunction];
{
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
npErr = [_pluginPackage.get() pluginFuncs]->setwindow(plugin, &window);
}
[self didCallPlugInFunction];
@@ -1077,7 +1093,8 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
{
[super setLayer:newLayer];
- if (_pluginLayer) {
+ if (newLayer && _pluginLayer) {
+ _pluginLayer.get().frame = [newLayer frame];
_pluginLayer.get().autoresizingMask = kCALayerWidthSizable | kCALayerHeightSizable;
[newLayer addSublayer:_pluginLayer.get()];
}
@@ -1196,6 +1213,83 @@ 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
+{
+ if (!_containerChecksInProgress)
+ _containerChecksInProgress = [[NSMutableDictionary alloc] init];
+
+ NSString *frameName = frameNameCString ? [NSString stringWithCString:frameNameCString encoding:NSISOLatin1StringEncoding] : nil;
+
+ ++_currentContainerCheckRequestID;
+ WebNetscapeContainerCheckContextInfo *contextInfo = [[WebNetscapeContainerCheckContextInfo alloc] initWithCheckRequestID:_currentContainerCheckRequestID
+ callbackFunc:callbackFunc
+ context:context];
+
+ WebPluginContainerCheck *check = [WebPluginContainerCheck checkWithRequest:[self requestWithURLCString:urlCString]
+ target:frameName
+ resultObject:self
+ selector:@selector(_containerCheckResult:contextInfo:)
+ controller:self
+ contextInfo:contextInfo];
+
+ [contextInfo release];
+ [_containerChecksInProgress setObject:check forKey:[NSNumber numberWithInt:_currentContainerCheckRequestID]];
+ [check start];
+
+ return _currentContainerCheckRequestID;
+}
+
+- (void)_containerCheckResult:(PolicyAction)policy contextInfo:(id)contextInfo
+{
+ ASSERT([contextInfo isKindOfClass:[WebNetscapeContainerCheckContextInfo class]]);
+ void (*pluginCallback)(NPP npp, uint32, NPBool, void*) = [contextInfo callback];
+
+ if (!pluginCallback) {
+ ASSERT_NOT_REACHED();
+ return;
+ }
+
+ pluginCallback([self plugin], [contextInfo checkRequestID], (policy == PolicyUse), [contextInfo context]);
+}
+
+- (void)cancelCheckIfAllowedToLoadURL:(uint32)checkID
+{
+ WebPluginContainerCheck *check = (WebPluginContainerCheck *)[_containerChecksInProgress objectForKey:[NSNumber numberWithInt:checkID]];
+
+ if (!check)
+ return;
+
+ [check cancel];
+ [_containerChecksInProgress removeObjectForKey:[NSNumber numberWithInt:checkID]];
+}
+
+// WebPluginContainerCheck automatically calls this method after invoking our _containerCheckResult: selector.
+// It works this way because calling -[WebPluginContainerCheck cancel] allows it to do it's teardown process.
+- (void)_webPluginContainerCancelCheckIfAllowedToLoadRequest:(id)webPluginContainerCheck
+{
+ ASSERT([webPluginContainerCheck isKindOfClass:[WebPluginContainerCheck class]]);
+ WebPluginContainerCheck *check = (WebPluginContainerCheck *)webPluginContainerCheck;
+ ASSERT([check contextInfo] && [[check contextInfo] isKindOfClass:[WebNetscapeContainerCheckContextInfo class]]);
+
+ [self cancelCheckIfAllowedToLoadURL:[[check contextInfo] checkRequestID]];
+}
+
+#ifdef BUILDING_ON_TIGER
+// The Tiger compiler requires these two methods be present. Otherwise it doesn't think WebNetscapePluginView
+// conforms to the WebPluginContainerCheckController protocol.
+- (WebView *)webView
+{
+ return [super webView];
+}
+
+- (WebFrame *)webFrame
+{
+ return [super webFrame];
+}
+#endif
+
#pragma mark NSVIEW
- (id)initWithFrame:(NSRect)frame
@@ -1248,7 +1342,9 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
if (timers) {
deleteAllValues(*timers);
delete timers;
- }
+ }
+
+ [_containerChecksInProgress release];
}
- (void)disconnectStream:(WebNetscapePluginStream*)stream
@@ -1311,7 +1407,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
NPError error;
[self willCallPlugInFunction];
{
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
error = [_pluginPackage.get() pluginFuncs]->getvalue(plugin, NPPVpluginScriptableNPObject, &value);
}
[self didCallPlugInFunction];
@@ -1369,7 +1465,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
contentURL:[response URL]
pluginPageURL:nil
pluginName:nil // FIXME: Get this from somewhere
- MIMEType:[response _webcore_MIMEType]];
+ MIMEType:[response MIMEType]];
[[self dataSource] _documentLoader]->cancelMainResourceLoad(error);
[error release];
return;
@@ -1442,7 +1538,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
if ([JSPluginRequest sendNotification]) {
[self willCallPlugInFunction];
{
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[_pluginPackage.get() pluginFuncs]->urlnotify(plugin, [URL _web_URLCString], NPRES_DONE, [JSPluginRequest notifyData]);
}
[self didCallPlugInFunction];
@@ -1474,7 +1570,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
[self willCallPlugInFunction];
{
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[_pluginPackage.get() pluginFuncs]->urlnotify(plugin, [[[pluginRequest request] URL] _web_URLCString], reason, [pluginRequest notifyData]);
}
[self didCallPlugInFunction];
@@ -1518,7 +1614,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
if ([pluginRequest sendNotification]) {
[self willCallPlugInFunction];
{
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[_pluginPackage.get() pluginFuncs]->urlnotify(plugin, [[[pluginRequest request] URL] _web_URLCString], NPERR_GENERIC_ERROR, [pluginRequest notifyData]);
}
[self didCallPlugInFunction];
@@ -1808,7 +1904,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
-(void)invalidateRect:(NPRect *)invalidRect
{
LOG(Plugins, "NPN_InvalidateRect");
- [self setNeedsDisplayInRect:NSMakeRect(invalidRect->left, invalidRect->top,
+ [self invalidatePluginContentRect:NSMakeRect(invalidRect->left, invalidRect->top,
(float)invalidRect->right - invalidRect->left, (float)invalidRect->bottom - invalidRect->top)];
}
@@ -1838,13 +1934,13 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
break;
}
- [self setNeedsDisplayInRect:invalidRect];
+ [self invalidatePluginContentRect:invalidRect];
}
-(void)forceRedraw
{
LOG(Plugins, "forceRedraw");
- [self setNeedsDisplay:YES];
+ [self invalidatePluginContentRect:[self bounds]];
[[self window] displayIfNeeded];
}
@@ -1933,6 +2029,11 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
return NPERR_NO_ERROR;
}
+ case WKNVBrowserContainerCheckFuncs:
+ {
+ *(WKNBrowserContainerCheckFuncs **)value = browserContainerCheckFuncs();
+ return NPERR_NO_ERROR;
+ }
default:
break;
}
@@ -2044,6 +2145,118 @@ 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
+{
+ switch (variable) {
+ case NPNURLVCookie: {
+ if (!value)
+ break;
+
+ NSURL *URL = [self URLWithCString:url];
+ if (!URL)
+ break;
+
+ if (Frame* frame = core([self webFrame])) {
+ String cookieString = cookies(frame->document(), URL);
+ CString cookieStringUTF8 = cookieString.utf8();
+ if (cookieStringUTF8.isNull())
+ return NPERR_GENERIC_ERROR;
+
+ *value = static_cast<char*>(NPN_MemAlloc(cookieStringUTF8.length()));
+ memcpy(*value, cookieStringUTF8.data(), cookieStringUTF8.length());
+
+ if (length)
+ *length = cookieStringUTF8.length();
+ return NPERR_NO_ERROR;
+ }
+ break;
+ }
+ case NPNURLVProxy: {
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+ if (!value)
+ break;
+
+ NSURL *URL = [self URLWithCString:url];
+ if (!URL)
+ break;
+
+ CString proxiesUTF8 = proxiesForURL(URL);
+
+ *value = static_cast<char*>(NPN_MemAlloc(proxiesUTF8.length()));
+ memcpy(*value, proxiesUTF8.data(), proxiesUTF8.length());
+
+ if (length)
+ *length = proxiesUTF8.length();
+
+ return NPERR_NO_ERROR;
+#else
+ break;
+#endif
+ }
+ }
+ return NPERR_GENERIC_ERROR;
+}
+
+- (NPError)setVariable:(NPNURLVariable)variable forURL:(const char*)url value:(const char*)value length:(uint32)length
+{
+ switch (variable) {
+ case NPNURLVCookie: {
+ NSURL *URL = [self URLWithCString:url];
+ if (!URL)
+ break;
+
+ String cookieString = String::fromUTF8(value, length);
+ if (!cookieString)
+ break;
+
+ if (Frame* frame = core([self webFrame])) {
+ setCookies(frame->document(), URL, cookieString);
+ return NPERR_NO_ERROR;
+ }
+
+ break;
+ }
+ case NPNURLVProxy:
+ // Can't set the proxy for a URL.
+ break;
+ }
+ 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
+{
+ if (!protocolStr || !hostStr || !schemeStr || !realmStr || !usernameStr || !usernameLength || !passwordStr || !passwordLength)
+ return NPERR_GENERIC_ERROR;
+
+ CString username;
+ CString password;
+ if (!getAuthenticationInfo(protocolStr, hostStr, port, schemeStr, realmStr, username, password))
+ return NPERR_GENERIC_ERROR;
+
+ *usernameLength = username.length();
+ *usernameStr = static_cast<char*>(NPN_MemAlloc(username.length()));
+ memcpy(*usernameStr, username.data(), username.length());
+
+ *passwordLength = password.length();
+ *passwordStr = static_cast<char*>(NPN_MemAlloc(password.length()));
+ memcpy(*passwordStr, password.data(), password.length());
+
+ return NPERR_NO_ERROR;
+}
+
+- (char*)resolveURL:(const char*)url forTarget:(const char*)target
+{
+ WebCore::CString location = [self resolvedURLStringForURL:url target:target];
+
+ if (location.isNull())
+ return 0;
+
+ // We use strdup here because the caller needs to free it with NPN_MemFree (which calls free).
+ return strdup(location.data());
+}
+
@end
@implementation WebNetscapePluginView (Internal)
@@ -2160,7 +2373,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
// Tell the plugin to print into the GWorld
[self willCallPlugInFunction];
{
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[_pluginPackage.get() pluginFuncs]->print(plugin, &npPrint);
}
[self didCallPlugInFunction];
diff --git a/WebKit/mac/Plugins/WebNullPluginView.mm b/WebKit/mac/Plugins/WebNullPluginView.mm
index 48e0e9d..bcc7a4b 100644
--- a/WebKit/mac/Plugins/WebNullPluginView.mm
+++ b/WebKit/mac/Plugins/WebNullPluginView.mm
@@ -28,9 +28,12 @@
#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
diff --git a/WebKit/mac/Plugins/WebPluginContainerCheck.h b/WebKit/mac/Plugins/WebPluginContainerCheck.h
index 1b7bbda..419be51 100644
--- a/WebKit/mac/Plugins/WebPluginContainerCheck.h
+++ b/WebKit/mac/Plugins/WebPluginContainerCheck.h
@@ -30,26 +30,31 @@
@class NSURLRequest;
@class NSString;
-@class WebPluginController;
+@class WebFrame;
+@class WebView;
@class WebPolicyDecisionListener;
+@protocol WebPluginContainerCheckController <NSObject>
+- (void)_webPluginContainerCancelCheckIfAllowedToLoadRequest:(id)checkIdentifier;
+- (WebFrame *)webFrame;
+- (WebView *)webView;
+@end
+
@interface WebPluginContainerCheck : NSObject
{
NSURLRequest *_request;
NSString *_target;
- WebPluginController *_controller;
+ id <WebPluginContainerCheckController> _controller;
id _resultObject;
SEL _resultSelector;
+ id _contextInfo;
BOOL _done;
WebPolicyDecisionListener *_listener;
}
-+ (id)checkWithRequest:(NSURLRequest *)request target:(NSString *)target resultObject:(id)obj selector:(SEL)selector controller:(WebPluginController *)controller;
-
-- (id)initWithRequest:(NSURLRequest *)request target:(NSString *)target resultObject:(id)obj selector:(SEL)selector controller:(WebPluginController *)controller;
-
++ (id)checkWithRequest:(NSURLRequest *)request target:(NSString *)target resultObject:(id)obj selector:(SEL)selector controller:(id <WebPluginContainerCheckController>)controller contextInfo:(id)/*optional*/contextInfo;
- (void)start;
-
- (void)cancel;
+- (id)contextInfo;
@end
diff --git a/WebKit/mac/Plugins/WebPluginContainerCheck.mm b/WebKit/mac/Plugins/WebPluginContainerCheck.mm
index 5c9ecd7..2180b02 100644
--- a/WebKit/mac/Plugins/WebPluginContainerCheck.mm
+++ b/WebKit/mac/Plugins/WebPluginContainerCheck.mm
@@ -47,27 +47,28 @@ using namespace WebCore;
@implementation WebPluginContainerCheck
-+ (id)checkWithRequest:(NSURLRequest *)request target:(NSString *)target resultObject:(id)obj selector:(SEL)selector controller:(WebPluginController *)controller
-{
- return [[[self alloc] initWithRequest:request target:target resultObject:obj selector:selector controller:controller] autorelease];
-}
-
-- (id)initWithRequest:(NSURLRequest *)request target:(NSString *)target resultObject:(id)obj selector:(SEL)selector controller:(WebPluginController *)controller
+- (id)initWithRequest:(NSURLRequest *)request target:(NSString *)target resultObject:(id)obj selector:(SEL)selector controller:(id <WebPluginContainerCheckController>)controller contextInfo:(id)contextInfo /*optional*/
{
if (!(self = [super init]))
return nil;
-
+
_request = [request copy];
_target = [target copy];
_resultObject = [obj retain];
_resultSelector = selector;
-
+ _contextInfo = [contextInfo retain];
+
// controller owns us so don't retain, to avoid cycle
_controller = controller;
-
+
return self;
}
++ (id)checkWithRequest:(NSURLRequest *)request target:(NSString *)target resultObject:(id)obj selector:(SEL)selector controller:(id <WebPluginContainerCheckController>)controller contextInfo:(id)contextInfo /*optional*/
+{
+ return [[[self alloc] initWithRequest:request target:target resultObject:obj selector:selector controller:controller contextInfo:contextInfo] autorelease];
+}
+
- (void)finalize
{
// mandatory to complete or cancel before releasing this object
@@ -84,7 +85,10 @@ using namespace WebCore;
- (void)_continueWithPolicy:(PolicyAction)policy
{
- ((void (*)(id, SEL, BOOL))objc_msgSend)(_resultObject, _resultSelector, (policy == PolicyUse));
+ if (_contextInfo)
+ ((void (*)(id, SEL, BOOL, id))objc_msgSend)(_resultObject, _resultSelector, (policy == PolicyUse), _contextInfo);
+ else
+ ((void (*)(id, SEL, BOOL))objc_msgSend)(_resultObject, _resultSelector, (policy == PolicyUse));
// this will call indirectly call cancel
[_controller _webPluginContainerCancelCheckIfAllowedToLoadRequest:self];
@@ -173,8 +177,16 @@ using namespace WebCore;
_resultObject = nil;
_controller = nil;
+
+ [_contextInfo release];
+ _contextInfo = nil;
_done = YES;
}
+- (id)contextInfo
+{
+ return _contextInfo;
+}
+
@end
diff --git a/WebKit/mac/Plugins/WebPluginController.h b/WebKit/mac/Plugins/WebPluginController.h
index 58217c3..ffc07a4 100644
--- a/WebKit/mac/Plugins/WebPluginController.h
+++ b/WebKit/mac/Plugins/WebPluginController.h
@@ -27,6 +27,7 @@
*/
#import <WebKit/WebBasePluginPackage.h>
+#import <WebKit/WebPluginContainerCheck.h>
@class WebFrame;
@class WebHTMLView;
@@ -34,7 +35,7 @@
@class WebView;
@class WebDataSource;
-@interface WebPluginController : NSObject <WebPluginManualLoader>
+@interface WebPluginController : NSObject <WebPluginManualLoader, WebPluginContainerCheckController>
{
NSView *_documentView;
WebDataSource *_dataSource;
diff --git a/WebKit/mac/Plugins/WebPluginController.mm b/WebKit/mac/Plugins/WebPluginController.mm
index 54d9615..357cf7b 100644
--- a/WebKit/mac/Plugins/WebPluginController.mm
+++ b/WebKit/mac/Plugins/WebPluginController.mm
@@ -27,12 +27,27 @@
*/
-#import <WebKit/WebPluginController.h>
-
+#import "WebPluginController.h"
+
+#import "DOMNodeInternal.h"
+#import "WebDataSourceInternal.h"
+#import "WebFrameInternal.h"
+#import "WebFrameView.h"
+#import "WebHTMLViewPrivate.h"
+#import "WebKitErrorsPrivate.h"
+#import "WebKitLogging.h"
+#import "WebNSURLExtras.h"
+#import "WebNSViewExtras.h"
+#import "WebPlugin.h"
+#import "WebPluginContainer.h"
+#import "WebPluginContainerCheck.h"
+#import "WebPluginPackage.h"
+#import "WebPluginPrivate.h"
+#import "WebPluginViewFactory.h"
+#import "WebUIDelegate.h"
+#import "WebViewInternal.h"
#import <Foundation/NSURLRequest.h>
-#import <runtime/JSLock.h>
#import <WebCore/DocumentLoader.h>
-#import <WebCore/DOMNodeInternal.h>
#import <WebCore/Frame.h>
#import <WebCore/FrameLoader.h>
#import <WebCore/HTMLMediaElement.h>
@@ -42,22 +57,7 @@
#import <WebCore/ResourceRequest.h>
#import <WebCore/ScriptController.h>
#import <WebCore/WebCoreURLResponse.h>
-#import <WebKit/WebDataSourceInternal.h>
-#import <WebKit/WebFrameInternal.h>
-#import <WebKit/WebFrameView.h>
-#import <WebKit/WebHTMLViewPrivate.h>
-#import <WebKit/WebKitErrorsPrivate.h>
-#import <WebKit/WebKitLogging.h>
-#import <WebKit/WebNSURLExtras.h>
-#import <WebKit/WebNSViewExtras.h>
-#import <WebKit/WebPlugin.h>
-#import <WebKit/WebPluginContainer.h>
-#import <WebKit/WebPluginContainerCheck.h>
-#import <WebKit/WebPluginPackage.h>
-#import <WebKit/WebPluginPrivate.h>
-#import <WebKit/WebPluginViewFactory.h>
-#import <WebKit/WebUIDelegate.h>
-#import <WebKit/WebViewInternal.h>
+#import <runtime/JSLock.h>
using namespace WebCore;
using namespace HTMLNames;
@@ -90,10 +90,10 @@ static NSMutableSet *pluginViews = nil;
NSView *view = nil;
if ([viewFactory respondsToSelector:@selector(plugInViewWithArguments:)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
view = [viewFactory plugInViewWithArguments:arguments];
} else if ([viewFactory respondsToSelector:@selector(pluginViewWithArguments:)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
view = [viewFactory pluginViewWithArguments:arguments];
}
@@ -147,10 +147,10 @@ static NSMutableSet *pluginViews = nil;
for (i = 0; i < count; i++) {
id aView = [_views objectAtIndex:i];
if ([aView respondsToSelector:@selector(webPlugInStart)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[aView webPlugInStart];
} else if ([aView respondsToSelector:@selector(pluginStart)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[aView pluginStart];
}
}
@@ -170,10 +170,10 @@ static NSMutableSet *pluginViews = nil;
for (i = 0; i < count; i++) {
id aView = [_views objectAtIndex:i];
if ([aView respondsToSelector:@selector(webPlugInStop)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[aView webPlugInStop];
} else if ([aView respondsToSelector:@selector(pluginStop)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[aView pluginStop];
}
}
@@ -197,10 +197,10 @@ static NSMutableSet *pluginViews = nil;
LOG(Plugins, "initializing plug-in %@", view);
if ([view respondsToSelector:@selector(webPlugInInitialize)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[view webPlugInInitialize];
} else if ([view respondsToSelector:@selector(pluginInitialize)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[view pluginInitialize];
}
@@ -210,15 +210,15 @@ static NSMutableSet *pluginViews = nil;
if (_started) {
LOG(Plugins, "starting plug-in %@", view);
if ([view respondsToSelector:@selector(webPlugInStart)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[view webPlugInStart];
} else if ([view respondsToSelector:@selector(pluginStart)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[view pluginStart];
}
if ([view respondsToSelector:@selector(setContainingWindow:)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[view setContainingWindow:[_documentView window]];
}
}
@@ -230,24 +230,26 @@ static NSMutableSet *pluginViews = nil;
if ([_views containsObject:view]) {
if (_started) {
if ([view respondsToSelector:@selector(webPlugInStop)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[view webPlugInStop];
} else if ([view respondsToSelector:@selector(pluginStop)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[view pluginStop];
}
}
if ([view respondsToSelector:@selector(webPlugInDestroy)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[view webPlugInDestroy];
} else if ([view respondsToSelector:@selector(pluginDestroy)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[view pluginDestroy];
}
+#if ENABLE(NETSCAPE_PLUGIN_API)
if (Frame* frame = core([self webFrame]))
frame->script()->cleanupScriptObjectsForPlugin(self);
+#endif
[pluginViews removeObject:view];
[[_documentView _webView] removePluginInstanceView:view];
@@ -289,15 +291,17 @@ static void cancelOutstandingCheck(const void *item, void *context)
for (i = 0; i < count; i++) {
id aView = [_views objectAtIndex:i];
if ([aView respondsToSelector:@selector(webPlugInDestroy)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[aView webPlugInDestroy];
} else if ([aView respondsToSelector:@selector(pluginDestroy)]) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
[aView pluginDestroy];
}
+#if ENABLE(NETSCAPE_PLUGIN_API)
if (Frame* frame = core([self webFrame]))
frame->script()->cleanupScriptObjectsForPlugin(self);
+#endif
[pluginViews removeObject:aView];
[[_documentView _webView] removePluginInstanceView:aView];
@@ -311,7 +315,7 @@ static void cancelOutstandingCheck(const void *item, void *context)
- (id)_webPluginContainerCheckIfAllowedToLoadRequest:(NSURLRequest *)request inFrame:(NSString *)target resultObject:(id)obj selector:(SEL)selector
{
- WebPluginContainerCheck *check = [WebPluginContainerCheck checkWithRequest:request target:target resultObject:obj selector:selector controller:self];
+ WebPluginContainerCheck *check = [WebPluginContainerCheck checkWithRequest:request target:target resultObject:obj selector:selector controller:self contextInfo:nil];
[_checksInProgress addObject:check];
[check start];
@@ -419,7 +423,7 @@ static void cancelOutstandingCheck(const void *item, void *context)
contentURL:[response URL]
pluginPageURL:nil
pluginName:nil // FIXME: Get this from somewhere
- MIMEType:[response _webcore_MIMEType]];
+ MIMEType:[response MIMEType]];
[_dataSource _documentLoader]->cancelMainResourceLoad(error);
[error release];
}
@@ -451,7 +455,7 @@ static WebCore::HTMLMediaElement* mediaProxyClient(DOMElement* element)
return nil;
}
- Node* node = [element _node];
+ Element* node = core(element);
if (!node || (!node->hasTagName(HTMLNames::videoTag) && !node->hasTagName(HTMLNames::audioTag))) {
LOG_ERROR("invalid media element passed");
return nil;
diff --git a/WebKit/mac/Plugins/WebPluginDatabase.mm b/WebKit/mac/Plugins/WebPluginDatabase.mm
index 4f2bdd8..1856fe1 100644
--- a/WebKit/mac/Plugins/WebPluginDatabase.mm
+++ b/WebKit/mac/Plugins/WebPluginDatabase.mm
@@ -333,7 +333,11 @@ static NSArray *additionalWebPlugInPaths;
for (subviewIndex = 0; subviewIndex < subviewCount; subviewIndex++) {
NSView *subview = [subviews objectAtIndex:subviewIndex];
- if ([subview isKindOfClass:[WebBaseNetscapePluginView class]] || [WebPluginController isPlugInView:subview])
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ if ([subview isKindOfClass:[WebBaseNetscapePluginView class]] || [WebPluginController isPlugInView:subview])
+#else
+ if ([WebPluginController isPlugInView:subview])
+#endif
[pluginInstanceViews removeObject:subview];
}
}
@@ -345,10 +349,13 @@ static NSArray *additionalWebPlugInPaths;
NSArray *pli = [pluginInstanceViews allObjects];
NSEnumerator *enumerator = [pli objectEnumerator];
while ((view = [enumerator nextObject]) != nil) {
+#if ENABLE(NETSCAPE_PLUGIN_API)
if ([view isKindOfClass:[WebBaseNetscapePluginView class]]) {
ASSERT([view respondsToSelector:@selector(stop)]);
[view performSelector:@selector(stop)];
- } else if ([WebPluginController isPlugInView:view]) {
+ } else
+#endif
+ if ([WebPluginController isPlugInView:view]) {
ASSERT([[view superview] isKindOfClass:[WebHTMLView class]]);
ASSERT([[view superview] respondsToSelector:@selector(_destroyAllWebPlugins)]);
// this will actually destroy all plugin instances for a webHTMLView and remove them from this list
diff --git a/WebKit/mac/Plugins/npapi.mm b/WebKit/mac/Plugins/npapi.mm
index 79eff2a..51c37ae 100644
--- a/WebKit/mac/Plugins/npapi.mm
+++ b/WebKit/mac/Plugins/npapi.mm
@@ -191,4 +191,45 @@ 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)
+{
+ 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)
+{
+ 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)
+{
+ return [pluginViewForInstance(instance) getAuthenticationInfoWithProtocol:protocol
+ host:host
+ port:port
+ scheme:scheme
+ realm:realm
+ username:username usernameLength:ulen
+ password:password passwordLength:plen];
+}
+
+NPBool NPN_ConvertPoint(NPP instance, double sourceX, double sourceY, NPCoordinateSpace sourceSpace, double *destX, double *destY, NPCoordinateSpace destSpace)
+{
+ 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)
+{
+ return [pluginViewForInstance(instance) checkIfAllowedToLoadURL:url frame:frame callbackFunc:callbackFunc context:context];
+}
+
+void WKN_CancelCheckIfAllowedToLoadURL(NPP instance, uint32 checkID)
+{
+ [pluginViewForInstance(instance) cancelCheckIfAllowedToLoadURL:checkID];
+}
+
+char* WKN_ResolveURL(NPP instance, const char* url, const char* target)
+{
+ return [pluginViewForInstance(instance) resolveURL:url forTarget:target];
+}
+
#endif
diff --git a/WebKit/mac/WebCoreSupport/WebApplicationCache.h b/WebKit/mac/WebCoreSupport/WebApplicationCache.h
new file mode 100644
index 0000000..282157f
--- /dev/null
+++ b/WebKit/mac/WebCoreSupport/WebApplicationCache.h
@@ -0,0 +1,32 @@
+/*
+ * 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 <Foundation/Foundation.h>
+
+@interface WebApplicationCache: NSObject {
+}
+
++ (void)setMaximumSize:(unsigned long long)size;
+@end
diff --git a/WebKit/mac/WebCoreSupport/WebApplicationCache.mm b/WebKit/mac/WebCoreSupport/WebApplicationCache.mm
new file mode 100644
index 0000000..8eb623d
--- /dev/null
+++ b/WebKit/mac/WebCoreSupport/WebApplicationCache.mm
@@ -0,0 +1,40 @@
+/*
+ * 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 "WebApplicationCache.h"
+#import <WebCore/ApplicationCacheStorage.h>
+
+using namespace WebCore;
+
+@implementation WebApplicationCache
+
++ (void)setMaximumSize:(unsigned long long)size
+{
+ cacheStorage().empty();
+ cacheStorage().vacuumDatabaseFile();
+ cacheStorage().setMaximumSize(size);
+}
+
+@end
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.h b/WebKit/mac/WebCoreSupport/WebChromeClient.h
index 6974cb1..7a1d7b3 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.h
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.h
@@ -73,7 +73,7 @@ public:
virtual void setResizable(bool);
- virtual void addMessageToConsole(const WebCore::String& message, unsigned int lineNumber, const WebCore::String& sourceURL);
+ virtual void addMessageToConsole(WebCore::MessageSource source, WebCore::MessageType type, WebCore::MessageLevel level, const WebCore::String& message, unsigned int lineNumber, const WebCore::String& sourceURL);
virtual bool canRunBeforeUnloadConfirmPanel();
virtual bool runBeforeUnloadConfirmPanel(const WebCore::String& message, WebCore::Frame* frame);
@@ -101,7 +101,7 @@ public:
virtual void mouseDidMoveOverElement(const WebCore::HitTestResult&, unsigned modifierFlags);
- virtual void setToolTip(const WebCore::String&);
+ virtual void setToolTip(const WebCore::String&, WebCore::TextDirection);
virtual void print(WebCore::Frame*);
#if ENABLE(DATABASE)
@@ -118,6 +118,8 @@ public:
virtual void runOpenPanel(WebCore::Frame*, PassRefPtr<WebCore::FileChooser>);
+ virtual bool setCursor(WebCore::PlatformCursorHandle) { return false; }
+
virtual WebCore::FloatRect customHighlightRect(WebCore::Node*, const WebCore::AtomicString& type,
const WebCore::FloatRect& lineRect);
virtual void paintCustomHighlight(WebCore::Node*, const WebCore::AtomicString& type,
@@ -134,13 +136,17 @@ public:
virtual bool shouldReplaceWithGeneratedFileForUpload(const WebCore::String& path, WebCore::String &generatedFilename);
virtual WebCore::String generateReplacementFile(const WebCore::String& path);
- virtual void enableSuddenTermination();
- virtual void disableSuddenTermination();
- virtual void formStateDidChange(const WebCore::Node*) { }
+ virtual void formStateDidChange(const WebCore::Node*);
+
+ virtual void formDidFocus(const WebCore::Node*);
+ virtual void formDidBlur(const WebCore::Node*);
+
+ virtual PassOwnPtr<WebCore::HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
#if USE(ACCELERATED_COMPOSITING)
virtual void attachRootGraphicsLayer(WebCore::Frame*, WebCore::GraphicsLayer*);
virtual void setNeedsOneShotDrawingSynchronization();
+ virtual void scheduleCompositingLayerSync();
#endif
virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*);
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.mm b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
index 2ca86d1..145255e 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
@@ -29,23 +29,26 @@
#import "WebChromeClient.h"
-#import <Foundation/Foundation.h>
+#import "DOMNodeInternal.h"
#import "WebDefaultUIDelegate.h"
+#import "WebDelegateImplementationCaching.h"
#import "WebElementDictionary.h"
#import "WebFrameInternal.h"
#import "WebFrameView.h"
#import "WebGeolocationInternal.h"
#import "WebHTMLViewInternal.h"
#import "WebHistoryInternal.h"
-#import "WebKitSystemInterface.h"
#import "WebKitPrefix.h"
+#import "WebKitSystemInterface.h"
#import "WebNSURLRequestExtras.h"
#import "WebPlugin.h"
#import "WebSecurityOriginInternal.h"
#import "WebUIDelegatePrivate.h"
#import "WebView.h"
#import "WebViewInternal.h"
+#import <Foundation/Foundation.h>
#import <WebCore/BlockExceptions.h>
+#import <WebCore/Console.h>
#import <WebCore/FileChooser.h>
#import <WebCore/FloatRect.h>
#import <WebCore/Frame.h>
@@ -67,6 +70,10 @@
#import <WebCore/GraphicsLayer.h>
#endif
+#if USE(PLUGIN_HOST_PROCESS)
+#import "NetscapePluginHostManager.h"
+#endif
+
@interface NSView (WebNSViewDetails)
- (NSView *)_findLastViewInKeyViewLoop;
@end
@@ -223,6 +230,11 @@ Page* WebChromeClient::createWindow(Frame* frame, const FrameLoadRequest& reques
} else {
newWebView = CallUIDelegate(m_webView, @selector(webView:createWebViewWithRequest:), URLRequest);
}
+
+#if USE(PLUGIN_HOST_PROCESS)
+ if (newWebView)
+ WebKit::NetscapePluginHostManager::shared().didCreateWindow();
+#endif
return core(newWebView);
}
@@ -289,7 +301,7 @@ void WebChromeClient::setResizable(bool b)
[[m_webView _UIDelegateForwarder] webView:m_webView setResizable:b];
}
-void WebChromeClient::addMessageToConsole(const String& message, unsigned int lineNumber, const String& sourceURL)
+void WebChromeClient::addMessageToConsole(MessageSource source, MessageType type, MessageLevel level, const String& message, unsigned int lineNumber, const String& sourceURL)
{
id delegate = [m_webView UIDelegate];
SEL selector = @selector(webView:addMessageToConsole:);
@@ -466,16 +478,20 @@ void WebChromeClient::scrollRectIntoView(const IntRect& r, const ScrollView* scr
// FIXME: This scrolling behavior should be under the control of the embedding client (rather than something
// we just do ourselves).
- // We have to convert back to document view coordinates in order to let the flipping conversion take place. It just
- // doesn't make sense for the scrollRectIntoView API to take document view coordinates.
IntRect scrollRect = r;
- scrollRect.move(scrollView->scrollOffset());
+ NSView *startView = m_webView;
+ if ([m_webView _usesDocumentViews]) {
+ // We have to convert back to document view coordinates.
+ // It doesn't make sense for the scrollRectIntoView API to take document view coordinates.
+ scrollRect.move(scrollView->scrollOffset());
+ startView = [[[m_webView mainFrame] frameView] documentView];
+ }
NSRect rect = scrollRect;
- for (NSView *view = [[[m_webView mainFrame] frameView] documentView]; view; view = [view superview]) {
+ for (NSView *view = startView; 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 mainFrame] frameView] documentView]]];
+ [documentView scrollRectToVisible:[documentView convertRect:rect fromView:startView]];
}
}
}
@@ -489,15 +505,18 @@ void WebChromeClient::mouseDidMoveOverElement(const HitTestResult& result, unsig
[element release];
}
-void WebChromeClient::setToolTip(const String& toolTip)
+void WebChromeClient::setToolTip(const String& toolTip, TextDirection)
{
- [(WebHTMLView *)[[[m_webView mainFrame] frameView] documentView] _setToolTip:toolTip];
+ [m_webView _setToolTip:toolTip];
}
void WebChromeClient::print(Frame* frame)
{
- WebFrameView* frameView = [kit(frame) frameView];
- CallUIDelegate(m_webView, @selector(webView:printFrameView:), frameView);
+ WebFrame *webFrame = kit(frame);
+ if ([[m_webView UIDelegate] respondsToSelector:@selector(webView:printFrame:)])
+ CallUIDelegate(m_webView, @selector(webView:printFrame:), webFrame);
+ else if ([m_webView _usesDocumentViews])
+ CallUIDelegate(m_webView, @selector(webView:printFrameView:), [webFrame frameView]);
}
#if ENABLE(DATABASE)
@@ -644,35 +663,56 @@ String WebChromeClient::generateReplacementFile(const String& path)
return [[m_webView _UIDelegateForwarder] webView:m_webView generateReplacementFile:path];
}
-void WebChromeClient::disableSuddenTermination()
+void WebChromeClient::formStateDidChange(const WebCore::Node* node)
{
-#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
- [[NSProcessInfo processInfo] disableSuddenTermination];
-#endif
+ CallUIDelegate(m_webView, @selector(webView:formStateDidChangeForNode:), kit(const_cast<WebCore::Node*>(node)));
}
-void WebChromeClient::enableSuddenTermination()
+void WebChromeClient::formDidFocus(const WebCore::Node* node)
{
-#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
- [[NSProcessInfo processInfo] enableSuddenTermination];
-#endif
+ CallUIDelegate(m_webView, @selector(webView:formStateDidFocusNode:), kit(const_cast<WebCore::Node*>(node)));
+}
+
+void WebChromeClient::formDidBlur(const WebCore::Node* node)
+{
+ CallUIDelegate(m_webView, @selector(webView:formStateDidBlurNode:), kit(const_cast<WebCore::Node*>(node)));
}
#if USE(ACCELERATED_COMPOSITING)
+
void WebChromeClient::attachRootGraphicsLayer(Frame* frame, GraphicsLayer* graphicsLayer)
{
- WebFrameView *frameView = [kit(frame) frameView];
- WebHTMLView *docView = (WebHTMLView *)[frameView documentView];
+ BEGIN_BLOCK_OBJC_EXCEPTIONS;
+
+ NSView *documentView = [[kit(frame) frameView] documentView];
+ if (![documentView isKindOfClass:[WebHTMLView class]]) {
+ // We should never be attaching when we don't have a WebHTMLView.
+ ASSERT(!graphicsLayer);
+ return;
+ }
+
+ WebHTMLView *webHTMLView = (WebHTMLView *)documentView;
if (graphicsLayer)
- [docView attachRootLayer:graphicsLayer->nativeLayer()];
+ [webHTMLView attachRootLayer:graphicsLayer->nativeLayer()];
else
- [docView detachRootLayer];
+ [webHTMLView detachRootLayer];
+ END_BLOCK_OBJC_EXCEPTIONS;
}
void WebChromeClient::setNeedsOneShotDrawingSynchronization()
{
+ BEGIN_BLOCK_OBJC_EXCEPTIONS;
[m_webView _setNeedsOneShotDrawingSynchronization:YES];
+ END_BLOCK_OBJC_EXCEPTIONS;
}
+
+void WebChromeClient::scheduleCompositingLayerSync()
+{
+ BEGIN_BLOCK_OBJC_EXCEPTIONS;
+ [m_webView _scheduleCompositingLayerSync];
+ END_BLOCK_OBJC_EXCEPTIONS;
+}
+
#endif
void WebChromeClient::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation)
diff --git a/WebKit/mac/WebCoreSupport/WebContextMenuClient.h b/WebKit/mac/WebCoreSupport/WebContextMenuClient.h
index 7ab68a2..c3ff4dd 100644
--- a/WebKit/mac/WebCoreSupport/WebContextMenuClient.h
+++ b/WebKit/mac/WebCoreSupport/WebContextMenuClient.h
@@ -42,6 +42,7 @@ public:
virtual void downloadURL(const WebCore::KURL&);
virtual void searchWithGoogle(const WebCore::Frame*);
virtual void lookUpInDictionary(WebCore::Frame*);
+ virtual bool isSpeaking();
virtual void speak(const WebCore::String&);
virtual void stopSpeaking();
virtual void searchWithSpotlight();
diff --git a/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm b/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm
index 6b5ad14..639f3c1 100644
--- a/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm
@@ -28,6 +28,7 @@
#import "WebContextMenuClient.h"
+#import "WebDelegateImplementationCaching.h"
#import "WebElementDictionary.h"
#import "WebFrame.h"
#import "WebFrameInternal.h"
@@ -42,6 +43,7 @@
#import "WebViewInternal.h"
#import <WebCore/ContextMenu.h>
#import <WebCore/KURL.h>
+#import <WebCore/RuntimeApplicationChecks.h>
#import <WebKit/DOMPrivate.h>
using namespace WebCore;
@@ -60,11 +62,6 @@ void WebContextMenuClient::contextMenuDestroyed()
delete this;
}
-static BOOL isAppleMail(void)
-{
- return [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.mail"];
-}
-
static BOOL isPreVersion3Client(void)
{
static BOOL preVersion3Client = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_3_0_CONTEXT_MENU_TAGS);
@@ -102,7 +99,7 @@ static NSMutableArray *fixMenusToSendToOldClients(NSMutableArray *defaultMenuIte
if (!preVersion3Client)
return savedItems;
- BOOL isMail = isAppleMail();
+ BOOL isMail = applicationIsAppleMail();
for (unsigned i = 0; i < defaultItemsCount; ++i) {
NSMenuItem *item = [defaultMenuItems objectAtIndex:i];
int tag = [item tag];
@@ -216,6 +213,31 @@ static void fixMenusReceivedFromOldClients(NSMutableArray *newMenuItems, NSMutab
modernTag = WebMenuItemTagLeftToRight;
else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagRightToLeft]])
modernTag = WebMenuItemTagRightToLeft;
+ else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagCorrectSpellingAutomatically]])
+ modernTag = WebMenuItemTagCorrectSpellingAutomatically;
+ else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagSubstitutionsMenu]])
+ modernTag = WebMenuItemTagSubstitutionsMenu;
+ else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagShowSubstitutions:true]]
+ || [title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagShowSubstitutions:false]])
+ modernTag = WebMenuItemTagShowSubstitutions;
+ else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagSmartCopyPaste]])
+ modernTag = WebMenuItemTagSmartCopyPaste;
+ else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagSmartQuotes]])
+ modernTag = WebMenuItemTagSmartQuotes;
+ else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagSmartDashes]])
+ modernTag = WebMenuItemTagSmartDashes;
+ else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagSmartLinks]])
+ modernTag = WebMenuItemTagSmartLinks;
+ else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagTextReplacement]])
+ modernTag = WebMenuItemTagTextReplacement;
+ else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagTransformationsMenu]])
+ modernTag = WebMenuItemTagTransformationsMenu;
+ else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagMakeUpperCase]])
+ modernTag = WebMenuItemTagMakeUpperCase;
+ else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagMakeLowerCase]])
+ modernTag = WebMenuItemTagMakeLowerCase;
+ else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagCapitalize]])
+ modernTag = WebMenuItemTagCapitalize;
else {
// We don't expect WebMenuItemTagOther for any items other than the ones we explicitly handle.
// There's nothing to prevent an app from applying this tag, but they are supposed to only
@@ -316,6 +338,11 @@ void WebContextMenuClient::lookUpInDictionary(Frame* frame)
[htmlView _lookUpInDictionaryFromMenu:nil];
}
+bool WebContextMenuClient::isSpeaking()
+{
+ return [NSApp isSpeaking];
+}
+
void WebContextMenuClient::speak(const String& string)
{
[NSApp speakString:[[(NSString*)string copy] autorelease]];
@@ -323,5 +350,5 @@ void WebContextMenuClient::speak(const String& string)
void WebContextMenuClient::stopSpeaking()
{
- [NSApp stopSpeaking];
+ [NSApp stopSpeaking:nil];
}
diff --git a/WebKit/mac/WebCoreSupport/WebEditorClient.h b/WebKit/mac/WebCoreSupport/WebEditorClient.h
index fd4b46f..d7dfdd7 100644
--- a/WebKit/mac/WebCoreSupport/WebEditorClient.h
+++ b/WebKit/mac/WebCoreSupport/WebEditorClient.h
@@ -74,6 +74,25 @@ public:
virtual NSArray* pasteboardTypesForSelection(WebCore::Frame*);
#endif
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+ virtual void uppercaseWord();
+ virtual void lowercaseWord();
+ virtual void capitalizeWord();
+ virtual void showSubstitutionsPanel(bool show);
+ virtual bool substitutionsPanelIsShowing();
+ virtual void toggleSmartInsertDelete();
+ virtual bool isAutomaticQuoteSubstitutionEnabled();
+ virtual void toggleAutomaticQuoteSubstitution();
+ virtual bool isAutomaticLinkDetectionEnabled();
+ virtual void toggleAutomaticLinkDetection();
+ virtual bool isAutomaticDashSubstitutionEnabled();
+ virtual void toggleAutomaticDashSubstitution();
+ virtual bool isAutomaticTextReplacementEnabled();
+ virtual void toggleAutomaticTextReplacement();
+ virtual bool isAutomaticSpellingCorrectionEnabled();
+ virtual void toggleAutomaticSpellingCorrection();
+#endif
+
virtual void respondToChangedContents();
virtual void respondToChangedSelection();
@@ -100,8 +119,9 @@ public:
virtual void ignoreWordInSpellDocument(const WebCore::String&);
virtual void learnWord(const WebCore::String&);
virtual void checkSpellingOfString(const UChar*, int length, int* misspellingLocation, int* misspellingLength);
+ virtual WebCore::String getAutoCorrectSuggestionForMisspelledWord(const WebCore::String&);
virtual void checkGrammarOfString(const UChar*, int length, WTF::Vector<WebCore::GrammarDetail>&, int* badGrammarLocation, int* badGrammarLength);
- virtual void checkSpellingAndGrammarOfParagraph(const UChar* text, int length, bool checkGrammar, WTF::Vector<WebCore::TextCheckingResult>& results);
+ 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 showSpellingUI(bool show);
diff --git a/WebKit/mac/WebCoreSupport/WebEditorClient.mm b/WebKit/mac/WebCoreSupport/WebEditorClient.mm
index 9911a32..e8c37d5 100644
--- a/WebKit/mac/WebCoreSupport/WebEditorClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebEditorClient.mm
@@ -29,11 +29,15 @@
#import "WebEditorClient.h"
+#import "DOMCSSStyleDeclarationInternal.h"
+#import "DOMHTMLElementInternal.h"
#import "DOMHTMLInputElementInternal.h"
#import "DOMHTMLTextAreaElementInternal.h"
+#import "DOMNodeInternal.h"
#import "DOMRangeInternal.h"
#import "WebArchive.h"
#import "WebDataSourceInternal.h"
+#import "WebDelegateImplementationCaching.h"
#import "WebDocument.h"
#import "WebEditingDelegatePrivate.h"
#import "WebFormDelegate.h"
@@ -48,6 +52,9 @@
#import <WebCore/Document.h>
#import <WebCore/EditAction.h>
#import <WebCore/EditCommand.h>
+#import <WebCore/HTMLInputElement.h>
+#import <WebCore/HTMLNames.h>
+#import <WebCore/HTMLTextAreaElement.h>
#import <WebCore/KeyboardEvent.h>
#import <WebCore/LegacyWebArchive.h>
#import <WebCore/PlatformKeyboardEvent.h>
@@ -59,15 +66,9 @@
using namespace WebCore;
using namespace WTF;
-EditorInsertAction core(WebViewInsertAction);
-WebViewInsertAction kit(EditorInsertAction);
+using namespace HTMLNames;
-EditorInsertAction core(WebViewInsertAction kitAction)
-{
- return static_cast<EditorInsertAction>(kitAction);
-}
-
-WebViewInsertAction kit(EditorInsertAction coreAction)
+static WebViewInsertAction kit(EditorInsertAction coreAction)
{
return static_cast<WebViewInsertAction>(coreAction);
}
@@ -280,9 +281,7 @@ void WebEditorClient::respondToChangedContents()
void WebEditorClient::respondToChangedSelection()
{
- NSView <WebDocumentView> *view = [[[m_webView selectedFrame] frameView] documentView];
- if ([view isKindOfClass:[WebHTMLView class]])
- [(WebHTMLView *)view _selectionChanged];
+ [m_webView _selectionChanged];
// FIXME: This quirk is needed due to <rdar://problem/5009625> - We can phase it out once Aperture can adopt the new behavior on their end
if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_APERTURE_QUIRK) && [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.Aperture"])
@@ -319,6 +318,92 @@ NSArray* WebEditorClient::pasteboardTypesForSelection(Frame* selectedFrame)
}
#endif
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+void WebEditorClient::uppercaseWord()
+{
+ [m_webView uppercaseWord:nil];
+}
+
+void WebEditorClient::lowercaseWord()
+{
+ [m_webView lowercaseWord:nil];
+}
+
+void WebEditorClient::capitalizeWord()
+{
+ [m_webView capitalizeWord:nil];
+}
+
+void WebEditorClient::showSubstitutionsPanel(bool show)
+{
+ NSPanel *spellingPanel = [[NSSpellChecker sharedSpellChecker] substitutionsPanel];
+ if (show)
+ [spellingPanel orderFront:nil];
+ else
+ [spellingPanel orderOut:nil];
+}
+
+bool WebEditorClient::substitutionsPanelIsShowing()
+{
+ return [[[NSSpellChecker sharedSpellChecker] substitutionsPanel] isVisible];
+}
+
+void WebEditorClient::toggleSmartInsertDelete()
+{
+ [m_webView toggleSmartInsertDelete:nil];
+}
+
+bool WebEditorClient::isAutomaticQuoteSubstitutionEnabled()
+{
+ return [m_webView isAutomaticQuoteSubstitutionEnabled];
+}
+
+void WebEditorClient::toggleAutomaticQuoteSubstitution()
+{
+ [m_webView toggleAutomaticQuoteSubstitution:nil];
+}
+
+bool WebEditorClient::isAutomaticLinkDetectionEnabled()
+{
+ return [m_webView isAutomaticLinkDetectionEnabled];
+}
+
+void WebEditorClient::toggleAutomaticLinkDetection()
+{
+ [m_webView toggleAutomaticLinkDetection:nil];
+}
+
+bool WebEditorClient::isAutomaticDashSubstitutionEnabled()
+{
+ return [m_webView isAutomaticDashSubstitutionEnabled];
+}
+
+void WebEditorClient::toggleAutomaticDashSubstitution()
+{
+ [m_webView toggleAutomaticDashSubstitution:nil];
+}
+
+bool WebEditorClient::isAutomaticTextReplacementEnabled()
+{
+ return [m_webView isAutomaticTextReplacementEnabled];
+}
+
+void WebEditorClient::toggleAutomaticTextReplacement()
+{
+ [m_webView toggleAutomaticTextReplacement:nil];
+}
+
+bool WebEditorClient::isAutomaticSpellingCorrectionEnabled()
+{
+ return [m_webView isAutomaticSpellingCorrectionEnabled];
+}
+
+void WebEditorClient::toggleAutomaticSpellingCorrection()
+{
+ [m_webView toggleAutomaticSpellingCorrection:nil];
+}
+#endif
+
bool WebEditorClient::shouldInsertNode(Node *node, Range* replacingRange, EditorInsertAction givenAction)
{
return [[m_webView _editingDelegateForwarder] webView:m_webView shouldInsertNode:kit(node) replacingDOMRange:kit(replacingRange) givenAction:(WebViewInsertAction)givenAction];
@@ -453,30 +538,30 @@ void WebEditorClient::handleInputMethodKeydown(KeyboardEvent* event)
void WebEditorClient::textFieldDidBeginEditing(Element* element)
{
- if (!element->isHTMLElement())
+ if (!element->hasTagName(inputTag))
return;
- DOMHTMLInputElement* inputElement = [DOMHTMLInputElement _wrapHTMLInputElement:(HTMLInputElement*)element];
+ DOMHTMLInputElement* inputElement = kit(static_cast<HTMLInputElement*>(element));
FormDelegateLog(inputElement);
CallFormDelegate(m_webView, @selector(textFieldDidBeginEditing:inFrame:), inputElement, kit(element->document()->frame()));
}
void WebEditorClient::textFieldDidEndEditing(Element* element)
{
- if (!element->isHTMLElement())
+ if (!element->hasTagName(inputTag))
return;
- DOMHTMLInputElement* inputElement = [DOMHTMLInputElement _wrapHTMLInputElement:(HTMLInputElement*)element];
+ DOMHTMLInputElement* inputElement = kit(static_cast<HTMLInputElement*>(element));
FormDelegateLog(inputElement);
CallFormDelegate(m_webView, @selector(textFieldDidEndEditing:inFrame:), inputElement, kit(element->document()->frame()));
}
void WebEditorClient::textDidChangeInTextField(Element* element)
{
- if (!element->isHTMLElement())
+ if (!element->hasTagName(inputTag))
return;
- DOMHTMLInputElement* inputElement = [DOMHTMLInputElement _wrapHTMLInputElement:(HTMLInputElement*)element];
+ DOMHTMLInputElement* inputElement = kit(static_cast<HTMLInputElement*>(element));
FormDelegateLog(inputElement);
CallFormDelegate(m_webView, @selector(textDidChangeInTextField:inFrame:), inputElement, kit(element->document()->frame()));
}
@@ -506,10 +591,10 @@ static SEL selectorForKeyEvent(KeyboardEvent* event)
bool WebEditorClient::doTextFieldCommandFromEvent(Element* element, KeyboardEvent* event)
{
- if (!element->isHTMLElement())
+ if (!element->hasTagName(inputTag))
return NO;
- DOMHTMLInputElement* inputElement = [DOMHTMLInputElement _wrapHTMLInputElement:(HTMLInputElement*)element];
+ DOMHTMLInputElement* inputElement = kit(static_cast<HTMLInputElement*>(element));
FormDelegateLog(inputElement);
if (SEL commandSelector = selectorForKeyEvent(event))
return CallFormDelegateReturningBoolean(NO, m_webView, @selector(textField:doCommandBySelector:inFrame:), inputElement, commandSelector, kit(element->document()->frame()));
@@ -518,10 +603,10 @@ bool WebEditorClient::doTextFieldCommandFromEvent(Element* element, KeyboardEven
void WebEditorClient::textWillBeDeletedInTextField(Element* element)
{
- if (!element->isHTMLElement())
+ if (!element->hasTagName(inputTag))
return;
- DOMHTMLInputElement* inputElement = [DOMHTMLInputElement _wrapHTMLInputElement:(HTMLInputElement*)element];
+ DOMHTMLInputElement* inputElement = kit(static_cast<HTMLInputElement*>(element));
FormDelegateLog(inputElement);
// We're using the deleteBackward selector for all deletion operations since the autofill code treats all deletions the same way.
CallFormDelegateReturningBoolean(NO, m_webView, @selector(textField:doCommandBySelector:inFrame:), inputElement, @selector(deleteBackward:), kit(element->document()->frame()));
@@ -529,10 +614,10 @@ void WebEditorClient::textWillBeDeletedInTextField(Element* element)
void WebEditorClient::textDidChangeInTextArea(Element* element)
{
- if (!element->isHTMLElement())
+ if (!element->hasTagName(textareaTag))
return;
- DOMHTMLTextAreaElement* textAreaElement = [DOMHTMLTextAreaElement _wrapHTMLTextAreaElement:(HTMLTextAreaElement*)element];
+ DOMHTMLTextAreaElement* textAreaElement = kit(static_cast<HTMLTextAreaElement*>(element));
FormDelegateLog(textAreaElement);
CallFormDelegate(m_webView, @selector(textDidChangeInTextArea:inFrame:), textAreaElement, kit(element->document()->frame()));
}
@@ -565,6 +650,13 @@ void WebEditorClient::checkSpellingOfString(const UChar* text, int length, int*
*misspellingLength = range.length;
}
+String WebEditorClient::getAutoCorrectSuggestionForMisspelledWord(const String& inputWord)
+{
+ // This method can be implemented using customized algorithms for the particular browser.
+ // Currently, it computes an empty string.
+ return String();
+}
+
void WebEditorClient::checkGrammarOfString(const UChar* text, int length, Vector<GrammarDetail>& details, int* badGrammarLocation, int* badGrammarLength)
{
#ifndef BUILDING_ON_TIGER
@@ -595,27 +687,26 @@ void WebEditorClient::checkGrammarOfString(const UChar* text, int length, Vector
#endif
}
-void WebEditorClient::checkSpellingAndGrammarOfParagraph(const UChar* text, int length, bool checkGrammar, Vector<TextCheckingResult>& results)
+void WebEditorClient::checkTextOfParagraph(const UChar* text, int length, uint64_t checkingTypes, Vector<TextCheckingResult>& results)
{
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
NSString *textString = [[NSString alloc] initWithCharactersNoCopy:const_cast<UChar*>(text) length:length freeWhenDone:NO];
- NSTextCheckingTypes checkingTypes = checkGrammar ? (NSTextCheckingTypeOrthography | NSTextCheckingTypeSpelling | NSTextCheckingTypeGrammar) : (NSTextCheckingTypeOrthography | NSTextCheckingTypeSpelling);
- NSArray *incomingResults = [[NSSpellChecker sharedSpellChecker] checkString:textString range:NSMakeRange(0, [textString length]) types:checkingTypes options:nil inSpellDocumentWithTag:spellCheckerDocumentTag() orthography:NULL wordCount:NULL];
+ NSArray *incomingResults = [[NSSpellChecker sharedSpellChecker] checkString:textString range:NSMakeRange(0, [textString length]) types:(checkingTypes|NSTextCheckingTypeOrthography) options:nil inSpellDocumentWithTag:spellCheckerDocumentTag() orthography:NULL wordCount:NULL];
[textString release];
for (NSTextCheckingResult *incomingResult in incomingResults) {
NSRange resultRange = [incomingResult range];
NSTextCheckingType resultType = [incomingResult resultType];
ASSERT(resultRange.location != NSNotFound && resultRange.length > 0);
- if (NSTextCheckingTypeSpelling == resultType) {
+ if (NSTextCheckingTypeSpelling == resultType && 0 != (checkingTypes & NSTextCheckingTypeSpelling)) {
TextCheckingResult result;
- result.resultType = 1;
+ result.type = TextCheckingTypeSpelling;
result.location = resultRange.location;
result.length = resultRange.length;
results.append(result);
- } else if (checkGrammar && NSTextCheckingTypeGrammar == resultType) {
+ } else if (NSTextCheckingTypeGrammar == resultType && 0 != (checkingTypes & NSTextCheckingTypeGrammar)) {
TextCheckingResult result;
NSArray *details = [incomingResult grammarDetails];
- result.resultType = 2;
+ result.type = TextCheckingTypeGrammar;
result.location = resultRange.location;
result.length = resultRange.length;
for (NSDictionary *incomingDetail in details) {
@@ -634,6 +725,41 @@ void WebEditorClient::checkSpellingAndGrammarOfParagraph(const UChar* text, int
result.details.append(detail);
}
results.append(result);
+ } else if (NSTextCheckingTypeLink == resultType && 0 != (checkingTypes & NSTextCheckingTypeLink)) {
+ TextCheckingResult result;
+ result.type = TextCheckingTypeLink;
+ result.location = resultRange.location;
+ result.length = resultRange.length;
+ result.replacement = [[incomingResult URL] absoluteString];
+ results.append(result);
+ } else if (NSTextCheckingTypeQuote == resultType && 0 != (checkingTypes & NSTextCheckingTypeQuote)) {
+ TextCheckingResult result;
+ result.type = TextCheckingTypeQuote;
+ result.location = resultRange.location;
+ result.length = resultRange.length;
+ result.replacement = [incomingResult replacementString];
+ results.append(result);
+ } else if (NSTextCheckingTypeDash == resultType && 0 != (checkingTypes & NSTextCheckingTypeDash)) {
+ TextCheckingResult result;
+ result.type = TextCheckingTypeDash;
+ result.location = resultRange.location;
+ result.length = resultRange.length;
+ result.replacement = [incomingResult replacementString];
+ results.append(result);
+ } else if (NSTextCheckingTypeReplacement == resultType && 0 != (checkingTypes & NSTextCheckingTypeReplacement)) {
+ TextCheckingResult result;
+ result.type = TextCheckingTypeReplacement;
+ result.location = resultRange.location;
+ result.length = resultRange.length;
+ result.replacement = [incomingResult replacementString];
+ results.append(result);
+ } else if (NSTextCheckingTypeCorrection == resultType && 0 != (checkingTypes & NSTextCheckingTypeCorrection)) {
+ TextCheckingResult result;
+ result.type = TextCheckingTypeCorrection;
+ result.location = resultRange.location;
+ result.length = resultRange.length;
+ result.replacement = [incomingResult replacementString];
+ results.append(result);
}
}
#endif
diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
index 823e0a4..6f0f39f 100644
--- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
+++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
@@ -122,6 +122,7 @@ private:
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();
@@ -177,11 +178,11 @@ private:
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 WebCore::Widget* createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, const Vector<WebCore::String>&,
+ 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 void redirectDataToPlugin(WebCore::Widget* pluginWidget);
- virtual WebCore::Widget* createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::KURL& baseURL,
+ virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::KURL& baseURL,
const Vector<WebCore::String>& paramNames, const Vector<WebCore::String>& paramValues);
virtual WebCore::ObjectContentType objectContentType(const WebCore::KURL& url, const WebCore::String& mimeType);
diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
index 95ac174..42b7ff8 100644
--- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
@@ -38,6 +38,7 @@
#import "WebCachedFramePlatformData.h"
#import "WebChromeClient.h"
#import "WebDataSourceInternal.h"
+#import "WebDelegateImplementationCaching.h"
#import "WebDocumentInternal.h"
#import "WebDocumentLoaderMac.h"
#import "WebDownloadInternal.h"
@@ -78,6 +79,7 @@
#import <WebCore/Document.h>
#import <WebCore/DocumentLoader.h>
#import <WebCore/EventHandler.h>
+#import <WebCore/FocusController.h>
#import <WebCore/FormState.h>
#import <WebCore/Frame.h>
#import <WebCore/FrameLoader.h>
@@ -104,6 +106,7 @@
#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>
@@ -117,6 +120,7 @@
#endif
#if USE(PLUGIN_HOST_PROCESS)
+#import "NetscapePluginHostManager.h"
#import "WebHostedNetscapePluginView.h"
#endif
@@ -216,6 +220,11 @@ void WebFrameLoaderClient::makeRepresentation(DocumentLoader* loader)
bool WebFrameLoaderClient::hasHTMLView() const
{
+ if (![getWebView(m_webFrame.get()) _usesDocumentViews]) {
+ // FIXME (Viewless): For now we just assume that all frames have an HTML view
+ return true;
+ }
+
NSView <WebDocumentView> *view = [m_webFrame->_private->webFrameView documentView];
return [view isKindOfClass:[WebHTMLView class]];
}
@@ -335,6 +344,10 @@ 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());
@@ -531,9 +544,11 @@ void WebFrameLoaderClient::dispatchWillClose()
void WebFrameLoaderClient::dispatchDidReceiveIcon()
{
+#if ENABLE(ICONDATABASE)
WebView *webView = getWebView(m_webFrame.get());
ASSERT(m_webFrame == [webView mainFrame]);
[webView _dispatchDidReceiveIconFromWebFrame:m_webFrame.get()];
+#endif
}
void WebFrameLoaderClient::dispatchDidStartProvisionalLoad()
@@ -635,6 +650,12 @@ Frame* WebFrameLoaderClient::dispatchCreatePage()
createWebViewWithRequest:nil
windowFeatures:features];
[features release];
+
+#if USE(PLUGIN_HOST_PROCESS)
+ if (newWebView)
+ WebKit::NetscapePluginHostManager::shared().didCreateWindow();
+#endif
+
return core([newWebView mainFrame]);
}
@@ -699,10 +720,11 @@ void WebFrameLoaderClient::dispatchWillSubmitForm(FramePolicyFunction function,
return;
}
- NSMutableDictionary *dictionary = [[NSMutableDictionary alloc] initWithCapacity:formState->values().size()];
- HashMap<String, String>::const_iterator end = formState->values().end();
- for (HashMap<String, String>::const_iterator it = formState->values().begin(); it != end; ++it)
- [dictionary setObject:it->second forKey:it->first];
+ const StringPairVector& textFieldValues = formState->textFieldValues();
+ size_t size = textFieldValues.size();
+ NSMutableDictionary *dictionary = [[NSMutableDictionary alloc] initWithCapacity:size];
+ for (size_t i = 0; i < size; ++i)
+ [dictionary setObject:textFieldValues[i].second forKey:textFieldValues[i].first];
CallFormDelegate(getWebView(m_webFrame.get()), @selector(frame:sourceFrame:willSubmitForm:withValues:submissionListener:), m_webFrame.get(), kit(formState->sourceFrame()), kit(formState->form()), dictionary, setUpPolicyListener(function).get());
@@ -791,14 +813,14 @@ void WebFrameLoaderClient::updateGlobalHistory()
[[WebHistory optionalSharedHistory] _visitedURL:loader->urlForHistory()
withTitle:loader->title()
method:loader->originalRequestCopy().httpMethod()
- wasFailure:loader->urlForHistoryReflectsFailure()];
-
- updateGlobalHistoryRedirectLinks();
+ wasFailure:loader->urlForHistoryReflectsFailure()
+ increaseVisitCount:!loader->clientRedirectSourceForHistory()]; // Do not increase visit count due to navigations that were not initiated by the user directly, avoiding growth from programmatic reloads.
}
void WebFrameLoaderClient::updateGlobalHistoryRedirectLinks()
{
DocumentLoader* loader = core(m_webFrame.get())->loader()->documentLoader();
+ ASSERT(loader->unreachableURL().isEmpty());
if (!loader->clientRedirectSourceForHistory().isNull()) {
if (WebHistoryItem *item = [[WebHistory optionalSharedHistory] _itemForURLString:loader->clientRedirectSourceForHistory()])
@@ -1025,28 +1047,30 @@ void WebFrameLoaderClient::transitionToCommittedFromCachedFrame(CachedFrame* cac
void WebFrameLoaderClient::transitionToCommittedForNewPage()
{
- WebFrameView *v = m_webFrame->_private->webFrameView;
- WebDataSource *ds = [m_webFrame.get() _dataSource];
+ WebView *webView = getWebView(m_webFrame.get());
+ WebDataSource *dataSource = [m_webFrame.get() _dataSource];
+ bool usesDocumentViews = [webView _usesDocumentViews];
+
+ if (usesDocumentViews) {
+ // FIXME (Viewless): I assume we want the equivalent of this optimization for viewless mode too.
+ bool willProduceHTMLView = [[WebFrameView class] _viewClassForMIMEType:[dataSource _responseMIMEType]] == [WebHTMLView class];
+ bool canSkipCreation = core(m_webFrame.get())->loader()->committingFirstRealLoad() && willProduceHTMLView;
+ if (canSkipCreation) {
+ [[m_webFrame->_private->webFrameView documentView] setDataSource:dataSource];
+ return;
+ }
- bool willProduceHTMLView = [[WebFrameView class] _viewClassForMIMEType:[ds _responseMIMEType]] == [WebHTMLView class];
- bool canSkipCreation = core(m_webFrame.get())->loader()->committingFirstRealLoad() && willProduceHTMLView;
- if (canSkipCreation) {
- [[v documentView] setDataSource:ds];
- return;
+ // Don't suppress scrollbars before the view creation if we're making the view for a non-HTML view.
+ if (!willProduceHTMLView)
+ [[m_webFrame->_private->webFrameView _scrollView] setScrollBarsSuppressed:NO repaintOnUnsuppress:NO];
}
-
- // Don't suppress scrollbars before the view creation if we're making the view for a non-HTML view.
- if (!willProduceHTMLView)
- [[v _scrollView] setScrollBarsSuppressed:NO repaintOnUnsuppress:NO];
// clean up webkit plugin instances before WebHTMLView gets freed.
- WebView *webView = getWebView(m_webFrame.get());
[webView removePluginInstanceViewsFor:(m_webFrame.get())];
- BOOL useDocumentViews = [webView _usesDocumentViews];
NSView <WebDocumentView> *documentView = nil;
- if (useDocumentViews) {
- documentView = [v _makeDocumentViewForDataSource:ds];
+ if (usesDocumentViews) {
+ documentView = [m_webFrame->_private->webFrameView _makeDocumentViewForDataSource:dataSource];
if (!documentView)
return;
}
@@ -1060,28 +1084,41 @@ void WebFrameLoaderClient::transitionToCommittedForNewPage()
if (isMainFrame && coreFrame->view())
coreFrame->view()->setParentVisible(false);
coreFrame->setView(0);
- FrameView* coreView;
- if (useDocumentViews)
- coreView = new FrameView(coreFrame);
+ RefPtr<FrameView> coreView;
+ if (usesDocumentViews)
+ coreView = FrameView::create(coreFrame);
else
- coreView = new FrameView(coreFrame, IntSize([webView bounds].size));
+ coreView = FrameView::create(coreFrame, IntSize([webView bounds].size));
coreFrame->setView(coreView);
- coreView->deref(); // FIXME: Eliminate this crazy refcounting!
[m_webFrame.get() _updateBackgroundAndUpdatesWhileOffscreen];
- [v _install];
+ if (usesDocumentViews)
+ [m_webFrame->_private->webFrameView _install];
if (isMainFrame)
coreView->setParentVisible(true);
- // Call setDataSource on the document view after it has been placed in the view hierarchy.
- // This what we for the top-level view, so should do this for views in subframes as well.
- [documentView setDataSource:ds];
-
+ if (usesDocumentViews) {
+ // Call setDataSource on the document view after it has been placed in the view hierarchy.
+ // This what we for the top-level view, so should do this for views in subframes as well.
+ [documentView setDataSource:dataSource];
+
+ // The following is a no-op for WebHTMLRepresentation, but for custom document types
+ // like the ones that Safari uses for bookmarks it is the only way the DocumentLoader
+ // will get the proper title.
+ if (DocumentLoader* documentLoader = [dataSource _documentLoader])
+ documentLoader->setTitle([dataSource pageTitle]);
+ }
+
if (HTMLFrameOwnerElement* owner = coreFrame->ownerElement())
coreFrame->view()->setCanHaveScrollbars(owner->scrollingMode() != ScrollbarAlwaysOff);
-
+
+ // If the document view implicitly became first responder, make sure to set the focused frame properly.
+ if (usesDocumentViews && [[documentView window] firstResponder] == documentView) {
+ page->focusController()->setFocusedFrame(coreFrame);
+ page->focusController()->setFocused(true);
+ }
}
RetainPtr<WebFramePolicyListener> WebFrameLoaderClient::setUpPolicyListener(FramePolicyFunction function)
@@ -1158,9 +1195,8 @@ NSDictionary *WebFrameLoaderClient::actionDictionary(const NavigationAction& act
nil];
if (const MouseEvent* mouseEvent = findMouseEvent(event)) {
- IntPoint point(mouseEvent->pageX(), mouseEvent->pageY());
WebElementDictionary *element = [[WebElementDictionary alloc]
- initWithHitTestResult:core(m_webFrame.get())->eventHandler()->hitTestResultAtPoint(point, false)];
+ initWithHitTestResult:core(m_webFrame.get())->eventHandler()->hitTestResultAtPoint(mouseEvent->absoluteLocation(), false)];
[result setObject:element forKey:WebActionElementKey];
[element release];
@@ -1375,16 +1411,13 @@ public:
#endif // ENABLE(NETSCAPE_PLUGIN_API)
-static Class netscapePluginViewClass()
-{
#if USE(PLUGIN_HOST_PROCESS)
- return [WebHostedNetscapePluginView class];
+#define NETSCAPE_PLUGIN_VIEW WebHostedNetscapePluginView
#else
- return [WebNetscapePluginView class];
+#define NETSCAPE_PLUGIN_VIEW WebNetscapePluginView
#endif
-}
-Widget* WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLPlugInElement* element, const KURL& url,
+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)
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
@@ -1413,7 +1446,7 @@ Widget* WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLPlugInElemen
[arguments release];
if (view)
- return new PluginWidget(view);
+ return adoptRef(new PluginWidget(view));
}
NSString *MIMEType;
@@ -1452,7 +1485,7 @@ Widget* WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLPlugInElemen
#if ENABLE(NETSCAPE_PLUGIN_API)
else if ([pluginPackage isKindOfClass:[WebNetscapePluginPackage class]]) {
- WebBaseNetscapePluginView *pluginView = [[[netscapePluginViewClass() alloc]
+ WebBaseNetscapePluginView *pluginView = [[[NETSCAPE_PLUGIN_VIEW alloc]
initWithFrame:NSMakeRect(0, 0, size.width(), size.height())
pluginPackage:(WebNetscapePluginPackage *)pluginPackage
URL:URL
@@ -1463,7 +1496,7 @@ Widget* WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLPlugInElemen
loadManually:loadManually
element:element] autorelease];
- return new NetscapePluginWidget(pluginView);
+ return adoptRef(new NetscapePluginWidget(pluginView));
}
#endif
} else
@@ -1473,11 +1506,11 @@ Widget* WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLPlugInElemen
errorCode = WebKitErrorCannotLoadPlugIn;
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:document->completeURL(parseURL(parameterValue(paramNames, paramValues, "pluginspage")))
- pluginName:[pluginPackage name]
- MIMEType:MIMEType];
+ 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;
@@ -1485,7 +1518,7 @@ Widget* WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLPlugInElemen
}
ASSERT(view);
- return new PluginWidget(view);
+ return adoptRef(new PluginWidget(view));
END_BLOCK_OBJC_EXCEPTIONS;
@@ -1501,8 +1534,8 @@ void WebFrameLoaderClient::redirectDataToPlugin(Widget* pluginWidget)
NSView *pluginView = pluginWidget->platformWidget();
#if ENABLE(NETSCAPE_PLUGIN_API)
- if ([pluginView isKindOfClass:[WebNetscapePluginView class]])
- [representation _redirectDataToManualLoader:(WebNetscapePluginView *)pluginView forPluginView:pluginView];
+ if ([pluginView isKindOfClass:[NETSCAPE_PLUGIN_VIEW class]])
+ [representation _redirectDataToManualLoader:(NETSCAPE_PLUGIN_VIEW *)pluginView forPluginView:pluginView];
else {
#else
{
@@ -1515,9 +1548,10 @@ void WebFrameLoaderClient::redirectDataToPlugin(Widget* pluginWidget)
END_BLOCK_OBJC_EXCEPTIONS;
}
-Widget* WebFrameLoaderClient::createJavaAppletWidget(const IntSize& size, HTMLAppletElement* element, const KURL& baseURL,
+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)
BEGIN_BLOCK_OBJC_EXCEPTIONS;
NSView *view = nil;
@@ -1545,7 +1579,7 @@ Widget* WebFrameLoaderClient::createJavaAppletWidget(const IntSize& size, HTMLAp
}
#if ENABLE(NETSCAPE_PLUGIN_API)
else if ([pluginPackage isKindOfClass:[WebNetscapePluginPackage class]]) {
- view = [[[netscapePluginViewClass() alloc] initWithFrame:NSMakeRect(0, 0, size.width(), size.height())
+ view = [[[NETSCAPE_PLUGIN_VIEW alloc] initWithFrame:NSMakeRect(0, 0, size.width(), size.height())
pluginPackage:(WebNetscapePluginPackage *)pluginPackage
URL:nil
baseURL:baseURL
@@ -1572,11 +1606,14 @@ Widget* WebFrameLoaderClient::createJavaAppletWidget(const IntSize& size, HTMLAp
}
ASSERT(view);
- return new PluginWidget(view);
+ return adoptRef(new PluginWidget(view));
END_BLOCK_OBJC_EXCEPTIONS;
- return new PluginWidget;
+ return adoptRef(new PluginWidget);
+#else
+ return 0;
+#endif // ENABLE(MAC_JAVA_BRIDGE)
}
String WebFrameLoaderClient::overrideMediaType() const
@@ -1612,7 +1649,9 @@ void WebFrameLoaderClient::windowObjectCleared()
void WebFrameLoaderClient::registerForIconNotification(bool listen)
{
+#if ENABLE(ICONDATABASE)
[[m_webFrame.get() webView] _registerForIconNotification:listen];
+#endif
}
void WebFrameLoaderClient::didPerformFirstNavigation() const
diff --git a/WebKit/mac/WebCoreSupport/WebIconDatabaseClient.mm b/WebKit/mac/WebCoreSupport/WebIconDatabaseClient.mm
index dc9ae6d..1b0c834 100644
--- a/WebKit/mac/WebCoreSupport/WebIconDatabaseClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebIconDatabaseClient.mm
@@ -29,9 +29,9 @@
#import "WebIconDatabaseClient.h"
#import "WebIconDatabaseInternal.h"
-
#import <WebCore/PlatformString.h>
+#if ENABLE(ICONDATABASE)
bool WebIconDatabaseClient::performImport()
{
@@ -55,3 +55,5 @@ void WebIconDatabaseClient::dispatchDidAddIconForPageURL(const WebCore::String&
// instead of us doing it every iteration
[[WebIconDatabase sharedIconDatabase] _sendNotificationForURL:pageURL];
}
+
+#endif // ENABLE(ICONDATABASE)
diff --git a/WebKit/mac/WebCoreSupport/WebInspectorClient.h b/WebKit/mac/WebCoreSupport/WebInspectorClient.h
index 41a8fa5..7487728 100644
--- a/WebKit/mac/WebCoreSupport/WebInspectorClient.h
+++ b/WebKit/mac/WebCoreSupport/WebInspectorClient.h
@@ -66,6 +66,8 @@ public:
virtual void storeSetting(const WebCore::String& key, const WebCore::InspectorController::Setting&);
virtual void removeSetting(const WebCore::String& key);
+ virtual void inspectorWindowObjectCleared();
+
private:
void updateWindowTitle() const;
diff --git a/WebKit/mac/WebCoreSupport/WebInspectorClient.mm b/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
index cc4cfdb..3f0b43d 100644
--- a/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
@@ -28,6 +28,8 @@
#import "WebInspectorClient.h"
+#import "DOMNodeInternal.h"
+#import "WebDelegateImplementationCaching.h"
#import "WebFrameInternal.h"
#import "WebFrameView.h"
#import "WebInspector.h"
@@ -35,16 +37,15 @@
#import "WebNodeHighlight.h"
#import "WebUIDelegate.h"
#import "WebViewInternal.h"
-
#import <WebCore/InspectorController.h>
#import <WebCore/Page.h>
-
#import <WebKit/DOMExtensions.h>
-
#import <WebKitSystemInterface.h>
using namespace WebCore;
+static const char* const inspectorStartsAttachedName = "inspectorStartsAttached";
+
@interface WebInspectorWindowController : NSWindowController <NSWindowDelegate> {
@private
WebView *_inspectedWebView;
@@ -150,10 +151,17 @@ void WebInspectorClient::updateWindowTitle() const
[[m_windowController.get() window] setTitle:title];
}
-#pragma mark -
+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);
+}
-#define WebKitInspectorAttachedKey @"WebKitInspectorAttached"
-#define WebKitInspectorAttachedViewHeightKey @"WebKitInspectorAttachedViewHeight"
+#pragma mark -
@implementation WebInspectorWindowController
- (id)init
@@ -177,6 +185,13 @@ void WebInspectorClient::updateWindowTitle() const
[preferences setTabsToLinks:NO];
[preferences setMinimumFontSize:0];
[preferences setMinimumLogicalFontSize:9];
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+ [preferences setFixedFontFamily:@"Menlo"];
+ [preferences setDefaultFixedFontSize:11];
+#else
+ [preferences setFixedFontFamily:@"Monaco"];
+ [preferences setDefaultFixedFontSize:10];
+#endif
_webView = [[WebView alloc] init];
[_webView setPreferences:preferences];
@@ -186,10 +201,6 @@ void WebInspectorClient::updateWindowTitle() const
[preferences release];
- NSNumber *attached = [[NSUserDefaults standardUserDefaults] objectForKey:WebKitInspectorAttachedKey];
- ASSERT(!attached || [attached isKindOfClass:[NSNumber class]]);
- _shouldAttach = attached ? [attached boolValue] : YES;
-
NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebCore"] pathForResource:@"inspector" ofType:@"html" inDirectory:@"inspector"];
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:[NSURL fileURLWithPath:path]];
[[_webView mainFrame] loadRequest:request];
@@ -313,6 +324,10 @@ void WebInspectorClient::updateWindowTitle() const
}
_visible = YES;
+
+ // If no preference is set - default to an attached window
+ InspectorController::Setting shouldAttach = [_inspectedWebView page]->inspectorController()->setting(inspectorStartsAttachedName);
+ _shouldAttach = (shouldAttach.type() == InspectorController::Setting::BooleanType) ? shouldAttach.booleanValue() : true;
if (_shouldAttach) {
WebFrameView *frameView = [[_inspectedWebView mainFrame] frameView];
@@ -324,8 +339,6 @@ void WebInspectorClient::updateWindowTitle() const
[frameView setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable | NSViewMinYMargin)];
_attachedToInspectedWebView = YES;
-
- [self setAttachedWindowHeight:[[NSUserDefaults standardUserDefaults] integerForKey:WebKitInspectorAttachedViewHeightKey]];
} else {
_attachedToInspectedWebView = NO;
@@ -348,15 +361,13 @@ void WebInspectorClient::updateWindowTitle() const
if (_attachedToInspectedWebView)
return;
- _shouldAttach = YES;
+ [_inspectedWebView page]->inspectorController()->setSetting(inspectorStartsAttachedName, InspectorController::Setting(true));
_movingWindows = YES;
[self close];
[self showWindow:nil];
_movingWindows = NO;
-
- [[NSUserDefaults standardUserDefaults] setBool:YES forKey:WebKitInspectorAttachedKey];
}
- (void)detach
@@ -364,7 +375,7 @@ void WebInspectorClient::updateWindowTitle() const
if (!_attachedToInspectedWebView)
return;
- _shouldAttach = NO;
+ [_inspectedWebView page]->inspectorController()->setSetting(inspectorStartsAttachedName, InspectorController::Setting(false));
_movingWindows = YES;
[self close];
@@ -372,28 +383,23 @@ void WebInspectorClient::updateWindowTitle() const
_movingWindows = NO;
- [[NSUserDefaults standardUserDefaults] setBool:NO forKey:WebKitInspectorAttachedKey];
}
- (void)setAttachedWindowHeight:(unsigned)height
{
- [[NSUserDefaults standardUserDefaults] setInteger:height forKey:WebKitInspectorAttachedViewHeightKey];
-
if (!_attachedToInspectedWebView)
return;
WebFrameView *frameView = [[_inspectedWebView mainFrame] frameView];
NSRect frameViewRect = [frameView frame];
- CGFloat attachedHeight = round(MAX(250.0, MIN(height, (NSHeight([_inspectedWebView frame]) * 0.75))));
-
// Setting the height based on the difference is done to work with
// Safari's find banner. This assumes the previous height is the Y origin.
- CGFloat heightDifference = (NSMinY(frameViewRect) - attachedHeight);
+ CGFloat heightDifference = (NSMinY(frameViewRect) - height);
frameViewRect.size.height += heightDifference;
- frameViewRect.origin.y = attachedHeight;
+ frameViewRect.origin.y = height;
- [_webView setFrame:NSMakeRect(0.0, 0.0, NSWidth(frameViewRect), attachedHeight)];
+ [_webView setFrame:NSMakeRect(0.0, 0.0, NSWidth(frameViewRect), height)];
[frameView setFrame:frameViewRect];
}
diff --git a/WebKit/mac/WebCoreSupport/WebPasteboardHelper.mm b/WebKit/mac/WebCoreSupport/WebPasteboardHelper.mm
index a8c49ff..eb6a58d 100644
--- a/WebKit/mac/WebCoreSupport/WebPasteboardHelper.mm
+++ b/WebKit/mac/WebCoreSupport/WebPasteboardHelper.mm
@@ -23,15 +23,15 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#import "WebPasteboardHelper.h"
+
#import "WebArchive.h"
#import "WebHTMLViewInternal.h"
#import "WebNSPasteboardExtras.h"
#import "WebNSURLExtras.h"
-#import "WebPasteboardHelper.h"
-
-#import <WebCore/DOMDocument.h>
-#import <WebCore/DOMDocumentFragment.h>
#import <WebCore/PlatformString.h>
+#import <WebKit/DOMDocument.h>
+#import <WebKit/DOMDocumentFragment.h>
#import <wtf/RetainPtr.h>
#import <wtf/StdLibExtras.h>
@@ -92,7 +92,7 @@ DOMDocumentFragment *WebPasteboardHelper::fragmentFromPasteboard(const NSPastebo
NSArray *WebPasteboardHelper::insertablePasteboardTypes() const
{
- DEFINE_STATIC_LOCAL(RetainPtr<NSArray>, types, ([[NSArray alloc] initWithObjects:WebArchivePboardType, NSHTMLPboardType, NSFilenamesPboardType, NSTIFFPboardType,
+ DEFINE_STATIC_LOCAL(RetainPtr<NSArray>, types, ([[NSArray alloc] initWithObjects:WebArchivePboardType, NSHTMLPboardType, NSFilenamesPboardType, NSTIFFPboardType, NSPDFPboardType,
#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD)
NSPICTPboardType,
#endif
diff --git a/WebKit/mac/WebCoreSupport/WebSystemInterface.m b/WebKit/mac/WebCoreSupport/WebSystemInterface.m
index 52f5583..f957814 100644
--- a/WebKit/mac/WebCoreSupport/WebSystemInterface.m
+++ b/WebKit/mac/WebCoreSupport/WebSystemInterface.m
@@ -59,6 +59,8 @@ void InitWebCoreSystemInterface(void)
INIT(GetPreferredExtensionForMIMEType);
INIT(GetWheelEventDeltas);
INIT(HitTestMediaUIPart);
+ INIT(InitializeMaximumHTTPConnectionCountPerHost);
+ INIT(IsLatchingWheelEvent);
INIT(MeasureMediaUIPart);
INIT(PopupMenu);
INIT(SetCGFontRenderingMode);
@@ -71,8 +73,12 @@ void InitWebCoreSystemInterface(void)
INIT(SignalCFReadStreamEnd);
INIT(SignalCFReadStreamError);
INIT(SignalCFReadStreamHasBytes);
+ INIT(QTIncludeOnlyModernMediaFileTypes);
INIT(QTMovieDataRate);
INIT(QTMovieMaxTimeLoaded);
+ INIT(QTMovieMaxTimeLoadedChangeNotification);
+ INIT(QTMovieMaxTimeSeekable);
+ INIT(QTMovieGetType);
INIT(QTMovieViewSetDrawSynchronously);
#ifndef BUILDING_ON_TIGER
diff --git a/WebKit/mac/WebCoreSupport/WebViewFactory.mm b/WebKit/mac/WebCoreSupport/WebViewFactory.mm
index ea82acc..96ebaa4 100644
--- a/WebKit/mac/WebCoreSupport/WebViewFactory.mm
+++ b/WebKit/mac/WebCoreSupport/WebViewFactory.mm
@@ -321,7 +321,7 @@
- (NSString *)contextMenuItemTagShowColors
{
- return UI_STRING("Show colors", "Show colors context menu item");
+ return UI_STRING("Show Colors", "Show colors context menu item");
}
- (NSString *)contextMenuItemTagSpeechMenu
@@ -368,6 +368,81 @@
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");
@@ -523,4 +598,14 @@
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");
+}
+
@end
diff --git a/WebKit/mac/WebInspector/WebNodeHighlight.m b/WebKit/mac/WebInspector/WebNodeHighlight.mm
index c918d2d..c918d2d 100644
--- a/WebKit/mac/WebInspector/WebNodeHighlight.m
+++ b/WebKit/mac/WebInspector/WebNodeHighlight.mm
diff --git a/WebKit/mac/WebInspector/WebNodeHighlightView.m b/WebKit/mac/WebInspector/WebNodeHighlightView.mm
index b3cd69e..b3cd69e 100644
--- a/WebKit/mac/WebInspector/WebNodeHighlightView.m
+++ b/WebKit/mac/WebInspector/WebNodeHighlightView.mm
diff --git a/WebKit/mac/WebKit.exp b/WebKit/mac/WebKit.exp
index cb26943..f32d1a8 100644
--- a/WebKit/mac/WebKit.exp
+++ b/WebKit/mac/WebKit.exp
@@ -62,6 +62,13 @@ _WebElementLinkLabelKey
_WebElementLinkTargetFrameKey
_WebElementLinkTitleKey
_WebElementLinkURLKey
+_WebFrameCanSuspendActiveDOMObjects
+_WebFrameHasPlugins
+_WebFrameHasUnloadListener
+_WebFrameMainDocumentError
+_WebFrameUsesApplicationCache
+_WebFrameUsesDatabases
+_WebFrameUsesGeolocation
_WebHistoryAllItemsRemovedNotification
_WebHistoryItemChangedNotification
_WebHistoryItemsAddedNotification
@@ -83,6 +90,7 @@ _WebKitErrorDomain
_WebKitErrorMIMETypeKey
_WebKitErrorPlugInNameKey
_WebKitErrorPlugInPageURLStringKey
+_WebKitLocalCacheDefaultsKey
_WebLocalizedString
_WebPlugInAttributesKey
_WebPlugInBaseURLKey
diff --git a/WebKit/mac/WebKit.order b/WebKit/mac/WebKit.order
index b39330e..187f66a 100644
--- a/WebKit/mac/WebKit.order
+++ b/WebKit/mac/WebKit.order
@@ -1,8 +1,8 @@
+[WebPreferences initialize]
__ZL23cacheModelForMainBundlev
__ZL8containsPKPKciS0_
-WebKitLinkedOnOrAfter
-WebKitLinkTimeVersion
+_WebKitLinkedOnOrAfter
+_WebKitLinkTimeVersion
+[WebPreferences standardPreferences]
-[WebPreferences initWithIdentifier:]
+[WebPreferences(WebInternal) _IBCreatorID]
@@ -10,9 +10,9 @@ WebKitLinkTimeVersion
+[WebPreferences(WebPrivate) _setInstance:forIdentifier:]
-[WebPreferences(WebPrivate) _postPreferencesChangesNotification]
-[WebPreferences setAutosaves:]
-+[WebIconDatabase delayDatabaseCleanup]
+[NSString(WebKitExtras) _webkit_localCacheDirectoryWithBundleIdentifier:]
-[NSString(WebKitExtras) _web_stringByAbbreviatingWithTildeInPath]
++[WebIconDatabase delayDatabaseCleanup]
+[WebIconDatabase sharedIconDatabase]
-[WebIconDatabase init]
-[WebIconDatabase(WebInternal) _startUpIconDatabase]
@@ -23,6 +23,7 @@ __ZL13defaultClientv
-[WebPreferences _integerValueForKey:]
-[WebPreferences _valueForKey:]
+[WebView initialize]
+_InitWebCoreSystemInterface
+[WebView(WebPrivate) _registerViewClass:representationClass:forURLScheme:]
+[WebView(WebPrivate) _generatedMIMETypeForURLScheme:]
+[WebView registerViewClass:representationClass:forMIMEType:]
@@ -35,39 +36,25 @@ __ZL13defaultClientv
__ZN21WebIconDatabaseClient13performImportEv
__Z21importToWebCoreFormatv
+[ThreadEnabler enableThreading]
-__ZL20objectFromPathForKeyP8NSStringP11objc_object
-[ThreadEnabler threadEnablingSelector:]
+__ZL20objectFromPathForKeyP8NSStringP11objc_object
__ZL11stringArrayRKN3WTF7HashSetIN7WebCore6StringENS1_10StringHashENS_10HashTraitsIS2_EEEE
+[WebPDFView supportedMIMETypes]
+[WebPDFRepresentation supportedMIMETypes]
+[WebPDFRepresentation postScriptMIMETypes]
+[WebDataSource(WebInternal) _repTypesAllowImageTypeOmission:]
-WebLocalizedString
+_WebLocalizedString
-[NSURL(WebNSURLExtras) _web_originalDataAsString]
-[NSURL(WebNSURLExtras) _web_originalData]
-[WebIconDatabase retainIconForURL:]
-[WebIconDatabase(WebPendingPublic) isEnabled]
++[WebView registerURLSchemeAsLocal:]
+[NSURL(WebNSURLExtras) _web_URLWithDataAsString:]
+[NSURL(WebNSURLExtras) _web_URLWithDataAsString:relativeToURL:]
-[NSString(WebKitExtras) _webkit_stringByTrimmingWhitespace]
+[NSURL(WebNSURLExtras) _web_URLWithData:relativeToURL:]
--[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:]
--[WebHistory(WebPrivate) _itemForURLString:]
--[WebHistoryPrivate itemForURLString:]
-+[WebView registerURLSchemeAsLocal:]
-[NSURL(WebNSURLExtras) _webkit_canonicalize]
-WKNSURLProtocolClassForRequest
--[NSString(WebKitExtras) _webkit_isCaseInsensitiveEqualToString:]
+_WKNSURLProtocolClassForRequest
-[WebView(WebPrivate) _initWithFrame:frameName:groupName:usesDocumentViews:]
+[WebViewPrivate initialize]
-[WebViewPrivate .cxx_construct]
@@ -75,27 +62,30 @@ WKNSURLProtocolClassForRequest
-[WebView(WebPrivate) _commonInitializationWithFrameName:groupName:usesDocumentViews:]
-[WebPreferences(WebPrivate) willAddToWebView]
-[WebFrameView initWithFrame:]
-InitWebCoreSystemInterface
+[WebViewFactory createSharedFactory]
+[WebKeyGenerator createSharedGenerator]
-WKDisableCGDeferredUpdates
-[WebClipView initWithFrame:]
-[WebFrameView visibleRect]
-[WebFrameView webFrame]
-WebKitInitializeLoggingChannelsIfNecessary
-initializeLogChannel
+_WebKitInitializeLoggingChannelsIfNecessary
+_initializeLogChannel
+[WebHistoryItem initialize]
+[WebHistoryItem(WebInternal) initWindowWatcherIfNecessary]
__Z36WebKitInitializeDatabasesIfNecessaryv
__ZN24WebDatabaseTrackerClient30sharedWebDatabaseTrackerClientEv
+__ZN24WebDatabaseTrackerClientC1Ev
__ZN24WebDatabaseTrackerClientC2Ev
__ZL47WebKitInitializeApplicationCachePathIfNecessaryv
-WKAppVersionCheckLessThan
__ZN15WebChromeClientC1EP7WebView
+__ZN15WebChromeClientC2EP7WebView
__ZN20WebContextMenuClientC1EP7WebView
+__ZN20WebContextMenuClientC2EP7WebView
__ZN15WebEditorClientC1EP7WebView
+__ZN15WebEditorClientC2EP7WebView
__ZN13WebDragClientC1EP7WebView
+__ZN13WebDragClientC2EP7WebView
__ZN18WebInspectorClientC1EP7WebView
+__ZN18WebInspectorClientC2EP7WebView
-[WebView preferences]
-[WebPreferences(WebPrivate) _localStorageDatabasePath]
-[WebPreferences _stringValueForKey:]
@@ -106,8 +96,10 @@ __Z3kitPN7WebCore4PageE
-[WebFramePrivate setWebFrameView:]
-[WebFrameView(WebInternal) _setWebFrame:]
__ZN20WebFrameLoaderClientC1EP8WebFrame
+__ZN20WebFrameLoaderClientC2EP8WebFrame
__ZN20WebFrameLoaderClient20createDocumentLoaderERKN7WebCore15ResourceRequestERKNS0_14SubstituteDataE
__ZN20WebDocumentLoaderMacC1ERKN7WebCore15ResourceRequestERKNS0_14SubstituteDataE
+__ZN20WebDocumentLoaderMacC2ERKN7WebCore15ResourceRequestERKNS0_14SubstituteDataE
-[WebDataSource(WebInternal) _initWithDocumentLoader:]
+[WebDataSourcePrivate initialize]
__Z10getWebViewP8WebFrame
@@ -146,7 +138,7 @@ __Z4coreP7WebView
-[WebView(WebPrivate) page]
-[WebDynamicScrollBarsView(WebInternal) setSuppressLayout:]
-[WebHTMLView viewWillMoveToSuperview:]
--[WebHTMLView removeSuperviewObservers]
+-[WebHTMLView(WebHTMLViewFileInternal) _removeSuperviewObservers]
-[WebHTMLView setNeedsDisplay:]
-[WebHTMLView visibleRect]
-[WebClipView hasAdditionalClip]
@@ -175,19 +167,20 @@ __Z3kitPN7WebCore5FrameE
-[WebHTMLView(WebHTMLViewFileInternal) _webView]
-[WebView(WebPrivate) _dashboardBehavior:]
__ZN15WebEditorClient23clearUndoRedoOperationsEv
-__ZN15WebChromeClient16setStatusbarTextERKN7WebCore6StringE
-__Z14CallUIDelegateP7WebViewP13objc_selectorP11objc_object
-__ZL12CallDelegateP7WebViewP11objc_objectP13objc_selectorS2_
__ZN20WebFrameLoaderClient15finishedLoadingEPN7WebCore14DocumentLoaderE
-[WebDataSource(WebInternal) _finishedLoading]
+__ZNK7WebCore17FrameLoaderClient23shouldUsePluginDocumentERKNS_6StringE
+_WKInitializeMaximumHTTPConnectionCountPerHost
+__ZNK20WebFrameLoaderClient17overrideMediaTypeEv
+-[WebView mediaStyle]
+__ZN15WebChromeClient22createHTMLParserQuirksEv
+__ZNK15WebChromeClient19contentsSizeChangedEPN7WebCore5FrameERKNS0_7IntSizeE
+__ZN20WebFrameLoaderClient24documentElementAvailableEv
__ZN20WebFrameLoaderClient18frameLoadCompletedEv
__ZN20WebFrameLoaderClient21forceLayoutForNonHTMLEv
-[WebDataSource(WebInternal) _isDocumentHTML]
+[WebView canShowMIMETypeAsHTML:]
+[WebFrameView(WebInternal) _canShowMIMETypeAsHTML:]
-__ZNK20WebFrameLoaderClient17overrideMediaTypeEv
--[WebView mediaStyle]
-__ZNK15WebChromeClient19contentsSizeChangedEPN7WebCore5FrameERKNS0_7IntSizeE
-[WebView _realZoomMultiplierIsTextOnly]
-[WebView _realZoomMultiplier]
-[WebView _setZoomMultiplier:isTextOnly:]
@@ -201,22 +194,26 @@ __ZNK15WebChromeClient19contentsSizeChangedEPN7WebCore5FrameERKNS0_7IntSizeE
-[WebPreferences cacheModel]
+[WebView(WebFileInternal) _didSetCacheModel]
+[WebView(WebFileInternal) _setCacheModel:]
-WKCopyFoundationCacheDirectory
-WebMemorySize
-initCapabilities
-WebVolumeFreeSize
+_WKCopyFoundationCacheDirectory
+_WebMemorySize
+_initCapabilities
+_WebVolumeFreeSize
-[WebView(WebPrivate) _preferencesChangedNotification:]
-[WebPreferences(WebPrivate) _useSiteSpecificSpoofing]
-[WebPreferences cursiveFontFamily]
+__ZNK20WebFrameLoaderClient11hasHTMLViewEv
-[WebPreferences defaultFixedFontSize]
-[WebPreferences defaultFontSize]
-[WebPreferences defaultTextEncodingName]
+-[WebPreferences(WebPrivate) usesEncodingDetector]
-[WebPreferences fantasyFontFamily]
-[WebPreferences fixedFontFamily]
-[WebPreferences(WebPrivate) _forceFTPDirectoryListings]
-[WebPreferences(WebPrivate) _ftpDirectoryTemplatePath]
-[WebPreferences isJavaEnabled]
-[WebPreferences isJavaScriptEnabled]
+-[WebPreferences(WebPrivate) isWebSecurityEnabled]
+-[WebPreferences(WebPrivate) allowUniversalAccessFromFileURLs]
-[WebPreferences javaScriptCanOpenWindowsAutomatically]
-[WebPreferences minimumFontSize]
-[WebPreferences minimumLogicalFontSize]
@@ -243,6 +240,7 @@ __Z4core40WebTextDirectionSubmenuInclusionBehavior
-[WebPreferences(WebPrivate) applicationChromeModeEnabled]
-[WebPreferences userStyleSheetEnabled]
-[WebView(WebPrivate) _needsAdobeFrameReloadingQuirk]
+_WKAppVersionCheckLessThan
-[WebView(WebPrivate) _needsKeyboardEventDisambiguationQuirks]
-[WebPreferences(WebPrivate) webArchiveDebugModeEnabled]
-[WebPreferences(WebPrivate) offlineWebApplicationCacheEnabled]
@@ -253,11 +251,12 @@ __Z4core40WebTextDirectionSubmenuInclusionBehavior
-[WebView backForwardList]
__Z3kitPN7WebCore15BackForwardListE
__ZL16backForwardListsv
-__ZN3WTF7HashMapIPN7WebCore15BackForwardListEP18WebBackForwardListNS_7PtrHashIS3_EENS_10HashTraitsIS3_EENS8_IS5_EEE3setERKS3_RKS5_
+__ZNK3WTF7HashMapIPN7WebCore15BackForwardListEP18WebBackForwardListNS_7PtrHashIS3_EENS_10HashTraitsIS3_EENS8_IS5_EEE3getERKS3_
+[WebBackForwardList initialize]
-[WebBackForwardList(WebBackForwardListInternal) initWithBackForwardList:]
__Z4coreP18WebBackForwardList
-__ZN3WTF9HashTableIPN7WebCore15BackForwardListESt4pairIS3_P18WebBackForwardListENS_18PairFirstExtractorIS7_EENS_7PtrHashIS3_EENS_14PairHashTraitsINS_10HashTraitsIS3_EENSD_IS6_EEEESE_E6expandEv
+__ZN3WTF7HashMapIPN7WebCore15BackForwardListEP18WebBackForwardListNS_7PtrHashIS3_EENS_10HashTraitsIS3_EENS8_IS5_EEE3setERKS3_RK
+__ZN3WTF9HashTableIPN7WebCore15BackForwardListESt4pairIS3_P18WebBackForwardListENS_18PairFirstExtractorIS7_EENS_7PtrHashIS3_EEN
-[WebBackForwardList setCapacity:]
-[WebView setFrameLoadDelegate:]
-[WebView(WebPrivate) _cacheFrameLoadDelegateImplementations]
@@ -272,21 +271,26 @@ __ZN3WTF9HashTableIPN7WebCore15BackForwardListESt4pairIS3_P18WebBackForwardListE
-[WebView(WebPrivate) _setFormDelegate:]
-[WebView setShouldUpdateWhileOffscreen:]
-[WebIconDatabase defaultIconWithSize:]
++[WebStringTruncator initialize]
++[WebStringTruncator centerTruncateString:toWidth:withFont:]
+__ZL14fontFromNSFontP6NSFont
+_WKGetGlyphsForCharacters
+_WKGetGlyphTransformedAdvances
-[WebView viewWillMoveToSuperview:]
-[WebView removeSizeObservers]
-[WebView viewDidMoveToSuperview]
--[WebView addSizeObservers]
+-[WebView addSizeObserversForWindow:]
-[WebFrameView setFrameSize:]
-[WebView(WebPrivate) isFlipped]
--[WebFrame provisionalDataSource]
-[WebFrame dataSource]
-[WebView viewWillMoveToWindow:]
-WKSetNSWindowShouldPostEventNotifications
+_WKSetNSWindowShouldPostEventNotifications
-[WebView removeWindowObservers]
+-[WebView(WebPrivate) _boundsChanged]
+-[WebView addWindowObserversForWindow:]
-[WebHTMLView viewWillMoveToWindow:]
--[WebHTMLView removeMouseMovedObserverUnconditionally]
-WKMouseMovedNotification
--[WebHTMLView removeWindowObservers]
+-[WebHTMLView(WebHTMLViewFileInternal) _removeMouseMovedObserverUnconditionally]
+-[WebHTMLView(WebHTMLViewFileInternal) _removeWindowObservers]
-[WebHTMLView(WebHTMLViewFileInternal) _cancelUpdateMouseoverTimer]
-[WebHTMLView(WebHTMLViewFileInternal) _cancelUpdateFocusedAndActiveStateTimer]
-[WebHTMLView(WebPrivate) _pluginController]
@@ -294,24 +298,19 @@ WKMouseMovedNotification
-[WebHTMLView viewDidMoveToWindow]
-[WebHTMLView(WebPrivate) _stopAutoscrollTimer]
-[WebHTMLView addWindowObservers]
-WKWindowWillOrderOnScreenNotification
+_WKWindowWillOrderOnScreenNotification
-[WebHTMLView(WebPrivate) _frameOrBoundsChanged]
--[WebHTMLView setNeedsLayout:]
-[WebPluginController startAllPlugins]
-[WebFrameView viewDidMoveToWindow]
-[WebView viewDidMoveToWindow]
--[WebView addWindowObservers]
-[NSString(WebKitExtras) _web_widthWithFont:]
-canUseFastRenderer
-WKGetGlyphsForCharacters
-WKGetGlyphTransformedAdvances
+_canUseFastRenderer
+-[WebFrame provisionalDataSource]
-[WebIconDatabase iconForURL:withSize:]
-[WebIconDatabase iconForURL:withSize:cache:]
-[NSString(WebNSURLExtras) _webkit_isFileURL]
-__Z13webGetNSImagePN7WebCore5ImageE7_NSSize
-+[WebStringTruncator initialize]
-+[WebStringTruncator centerTruncateString:toWidth:withFont:]
-__ZL14fontFromNSFontP6NSFont
+__Z13webGetNSImagePN7WebCore5ImageE6CGSize
+-[WebHTMLView(WebPrivate) hitTest:]
-[WebView setNextKeyView:]
-[WebFrameView setNextKeyView:]
-[NSView(WebExtras) _web_superviewOfClass:]
@@ -321,13 +320,13 @@ __ZN20WebFrameLoaderClient9userAgentERKN7WebCore4KURLE
+[WebView(WebPrivate) _standardUserAgentWithApplicationName:]
+[NSUserDefaults(WebNSUserDefaultsExtras) _webkit_preferredLanguageCode]
+[NSUserDefaults(WebNSUserDefaultsExtras) _webkit_ensureAndLockPreferredLanguageLock]
-makeLock
+_makeLock
-[NSString(WebNSUserDefaultsPrivate) _webkit_HTTPStyleLanguageCode]
-WKCopyCFLocalizationPreferredName
+_WKCopyCFLocalizationPreferredName
+[NSUserDefaults(WebNSUserDefaultsExtras) _webkit_addDefaultsChangeObserver]
-addDefaultsChangeObserver
+_addDefaultsChangeObserver
__ZN20WebFrameLoaderClient17cancelPolicyCheckEv
-__ZN20WebFrameLoaderClient39dispatchDecidePolicyForNavigationActionEMN7WebCore11FrameLoaderEFvNS0_12PolicyActionEERKNS0_16NavigationActionERKNS0_15ResourceRequestEN3WTF10PassRefPtrINS0_9FormStateEEE
+__ZN20WebFrameLoaderClient39dispatchDecidePolicyForNavigationActionEMN7WebCore11FrameLoaderEFvNS0_12PolicyActionEERKNS0_16Navig
-[WebView(WebPrivate) _policyDelegateForwarder]
+[WebDefaultPolicyDelegate sharedPolicyDelegate]
-[_WebSafeForwarder initWithTarget:defaultTarget:catchExceptions:]
@@ -356,7 +355,6 @@ __ZN20WebFrameLoaderClient31dispatchDidStartProvisionalLoadEv
-[WebView(WebPrivate) _willChangeBackForwardKeys]
__Z42WebViewGetFrameLoadDelegateImplementationsP7WebView
__Z21CallFrameLoadDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS2_S0_
-__ZL12CallDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS0_S2_S0_
-[WebDataSource isLoading]
-[WebDataSource request]
-[NSURL(WebNSURLExtras) _web_hostString]
@@ -366,33 +364,33 @@ __ZL12CallDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS0_S2_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]
+__ZL12mapHostNamesP8NSStringa
+__ZN3WTF6VectorItLm2048EE6shrinkEm
-[WebView mainFrameURL]
-[WebBackForwardList currentItem]
__Z3kitPN7WebCore11HistoryItemE
+-[WebView(WebPrivate) setDefersCallbacks:]
__ZN20WebFrameLoaderClient32assignIdentifierToInitialRequestEmPN7WebCore14DocumentLoaderERKNS0_15ResourceRequestE
__Z45WebViewGetResourceLoadDelegateImplementationsP7WebView
-__ZL12CallDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS0_S2_S0_S0_
--[WebView(WebViewInternal) _addObject:forIdentifier:]
-__ZNK3WTF7HashMapImNS_9RetainPtrIP11objc_objectEENS_7IntHashImEENS_10HashTraitsImEENS7_IS4_EEE3getERKm
-__ZN20WebFrameLoaderClient23dispatchWillSendRequestEPN7WebCore14DocumentLoaderEmRNS0_15ResourceRequestERKNS0_16ResourceResponseE
-__ZN20WebDocumentLoaderMac17increaseLoadCountEm
-__ZNK3WTF9HashTableImmNS_17IdentityExtractorImEENS_7IntHashImEENS_10HashTraitsImEES6_E8containsImNS_22IdentityHashTranslatorImmS4_EEEEbRKT_
-__ZN3WTF7HashSetImNS_7IntHashImEENS_10HashTraitsImEEE3addERKm
-__ZN3WTF9HashTableImmNS_17IdentityExtractorImEENS_7IntHashImEENS_10HashTraitsImEES6_E47removeAndInvalidateWithoutEntryConsistencyCheckEPm
--[WebView(WebViewInternal) _objectForIdentifier:]
__Z24CallResourceLoadDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS2_S0_S0_
-__ZL12CallDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS0_S2_S0_S0_S0_S0_
-__ZN3WTF9HashTableIN7WebCore12AtomicStringESt4pairIS2_NS1_6StringEENS_18PairFirstExtractorIS5_EENS1_15CaseFoldingHashENS_14PairHashTraitsINS_10HashTraitsIS2_EENSA_IS4_EEEESB_EaSERKSE_
-__ZN3WTF6VectorIN7WebCore6StringELm0EEaSERKS3_
-__ZN3WTF6VectorIN7WebCore6StringELm0EE6shrinkEm
-__ZNK20WebFrameLoaderClient32representationExistsForURLSchemeERKN7WebCore6StringE
-+[WebView(WebPrivate) _representationExistsForURLScheme:]
-WKCreateNSURLConnectionDelegateProxy
+-[WebView(WebViewInternal) _addObject:forIdentifier:]
+__ZN3WTF7HashMapImNS_9RetainPtrIP11objc_objectEENS_7IntHashImEENS_10HashTraitsImEENS7_IS4_EEE3setERKmRKS4_
-[WebFramePolicyListener dealloc]
+__ZN7WebCore19ResourceRequestBaseD2Ev
-[WebView(WebIBActions) canGoBack]
-[WebView(WebIBActions) canGoForward]
-[WebFrameView isOpaque]
+-[WebHTMLView windowDidBecomeKey:]
+_WKMouseMovedNotification
+-[WebHTMLView(WebPrivate) _updateFocusedAndActiveState]
+-[WebHTMLView(WebInternal) _frame]
+-[WebView _updateFocusedAndActiveStateForFrame:]
+-[WebHTMLView(WebInternal) _isResigningFirstResponder]
+-[WebHTMLView _windowChangedKeyState]
+-[WebHTMLView _updateControlTints]
-[WebHTMLView windowWillOrderOnScreen:]
-[WebView(WebPrivate) viewWillDraw]
-[WebFrameView drawRect:]
@@ -402,111 +400,105 @@ WKCreateNSURLConnectionDelegateProxy
-[WebHTMLView viewWillMoveToHostWindow:]
-[NSArray(WebHTMLView) _web_makePluginViewsPerformSelector:withObject:]
-[WebHTMLView viewDidMoveToHostWindow]
--[WebDynamicScrollBarsView(WebInternal) updateScrollers]
-+[WebView(WebFileInternal) _cacheModel]
--[WebBackForwardList dealloc]
-__ZN3WTF9HashTableIPN7WebCore15BackForwardListESt4pairIS3_P18WebBackForwardListENS_18PairFirstExtractorIS7_EENS_7PtrHashIS3_EENS_14PairHashTraitsINS_10HashTraitsIS3_EENSD_IS6_EEEESE_E4findIS3_NS_22IdentityHashTranslatorIS3_S7_SB_EEEENS_17HashTableIteratorIS3_S7_S9_SB_SG_SE_EERKT_
-[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:]
-+[WebHistoryItem(WebPrivate) _releaseAllPendingPageCaches]
--[WebView initWithFrame:]
--[WebView initWithFrame:frameName:groupName:]
-__ZL32needsWebViewInitThreadWorkaroundv
--[WebView stringByEvaluatingJavaScriptFromString:]
--[WebFrame(WebInternal) _stringByEvaluatingJavaScriptFromString:]
--[WebFrame(WebInternal) _stringByEvaluatingJavaScriptFromString:forceUserGesture:]
-__ZN20WebFrameLoaderClient19windowObjectClearedEv
--[WebView(WebPendingPublic) scriptDebugDelegate]
--[WebView dealloc]
--[WebView close]
--[WebView(WebPrivate) _close]
--[WebPreferences(WebPrivate) fullDocumentTeardownEnabled]
-__ZN20WebFrameLoaderClient19detachedFromParent2Ev
--[WebHTMLView(WebPrivate) close]
--[WebHTMLView(WebPrivate) _clearLastHitViewIfSelf]
--[WebPluginController destroyAllPlugins]
--[WebPluginController _cancelOutstandingChecks]
--[WebHTMLViewPrivate clear]
--[WebPluginController dealloc]
-__ZN20WebDocumentLoaderMac15detachFromFrameEv
-__ZN20WebDocumentLoaderMac17releaseDataSourceEv
--[WebDataSource dealloc]
--[WebDataSourcePrivate dealloc]
-__ZN20WebDocumentLoaderMac16detachDataSourceEv
-__ZN20WebFrameLoaderClient19detachedFromParent3Ev
--[WebDynamicScrollBarsView(WebInternal) setScrollBarsSuppressed:repaintOnUnsuppress:]
--[WebView(AllWebViews) _removeFromAllWebViewsSet]
--[WebView(WebPendingPublic) setScriptDebugDelegate:]
--[WebView(WebPrivate) _detachScriptDebuggerFromAllFrames]
--[WebFrame(WebInternal) _detachScriptDebugger]
--[WebView removeDragCaret]
-__ZN15WebEditorClient13pageDestroyedEv
-__ZN15WebEditorClientD1Ev
-__ZN18WebInspectorClient18inspectorDestroyedEv
-__ZN20WebContextMenuClient20contextMenuDestroyedEv
-__ZN13WebDragClient23dragControllerDestroyedEv
-__ZN13WebDragClientD1Ev
-__ZN15WebChromeClient15chromeDestroyedEv
--[WebView preferencesIdentifier]
--[WebPreferences identifier]
-+[WebPreferences(WebPrivate) _removeReferenceForIdentifier:]
--[WebPreferences(WebPrivate) didRemoveFromWebView]
--[WebView(WebPrivate) _closePluginDatabases]
--[WebViewPrivate dealloc]
--[WebViewPrivate .cxx_destruct]
--[WebFrameView dealloc]
--[WebFrameViewPrivate dealloc]
--[WebHTMLView dealloc]
--[WebHTMLViewPrivate dealloc]
-__ZN20WebFrameLoaderClient14shouldFallBackERKN7WebCore13ResourceErrorE
-__ZN20WebFrameLoaderClient20setMainDocumentErrorEPN7WebCore14DocumentLoaderERKNS0_13ResourceErrorE
--[WebDataSource(WebInternal) _setMainDocumentError:]
-__ZN20WebFrameLoaderClient27dispatchDidLoadMainResourceEPN7WebCore14DocumentLoaderE
-__ZN20WebFrameLoaderClient30dispatchDidFailProvisionalLoadERKN7WebCore13ResourceErrorE
--[WebView(WebPrivate) _didFailProvisionalLoadWithError:forFrame:]
--[WebView(WebPrivate) _didChangeBackForwardKeys]
-__Z21CallFrameLoadDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS2_S0_S0_
--[NSURL(WebNSURLExtras) _web_userVisibleString]
-__ZL10isHexDigitc
-__ZL13hexDigitValuec
-__ZL12mapHostNamesP8NSStringa
-__ZN3WTF6VectorItLm2048EE6shrinkEm
--[WebFrame loadAlternateHTMLString:baseURL:forUnreachableURL:]
--[WebFrame _loadHTMLString:baseURL:unreachableURL:]
--[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]
-__ZN20WebFrameLoaderClient22dispatchDidFailLoadingEPN7WebCore14DocumentLoaderEmRKNS0_13ResourceErrorE
-__ZL12CallDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS0_S2_S0_S0_S0_
--[WebView(WebViewInternal) _removeObjectForIdentifier:]
-__ZN3WTF9HashTableImSt4pairImNS_9RetainPtrIP11objc_objectEEENS_18PairFirstExtractorIS6_EENS_7IntHashImEENS_14PairHashTraitsINS_10HashTraitsImEENSC_IS5_EEEESD_E4findImNS_22IdentityHashTranslatorImS6_SA_EEEENS_17HashTableIteratorImS6_S8_SA_SF_SD_EERKT_
-__ZN3WTF9HashTableImSt4pairImNS_9RetainPtrIP11objc_objectEEENS_18PairFirstExtractorIS6_EENS_7IntHashImEENS_14PairHashTraitsINS_10HashTraitsImEENSC_IS5_EEEESD_E6expandEv
-__ZN20WebDocumentLoaderMac17decreaseLoadCountEm
-__ZN3WTF9HashTableImmNS_17IdentityExtractorImEENS_7IntHashImEENS_10HashTraitsImEES6_E4findImNS_22IdentityHashTranslatorImmS4_EEEENS_17HashTableIteratorImmS2_S4_S6_S6_EERKT_
-__ZN20WebDocumentLoaderMacD1Ev
--[WebView estimatedProgress]
--[WebIconDatabase(WebInternal) _iconForFileURL:withSize:]
--[WebIconDatabase(WebInternal) _scaleIcon:toSize:]
++[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:]
--[WebHTMLView(WebPrivate) hitTest:]
-__ZL41_updateFocusedAndActiveStateTimerCallbackP16__CFRunLoopTimerPv
--[WebHTMLView(WebPrivate) _updateFocusedAndActiveState]
--[WebHTMLView(WebInternal) _frame]
--[WebView _updateFocusedAndActiveStateForFrame:]
-__ZN20WebFrameLoaderClient20frameLoaderDestroyedEv
--[WebFrame(WebInternal) _clearCoreFrame]
--[WebFrame dealloc]
--[WebFramePrivate dealloc]
-__ZNK20WebFrameLoaderClient15canShowMIMETypeERKN7WebCore6StringE
+-[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
+[WebView canShowMIMEType:]
+__ZNK20WebFrameLoaderClient15canShowMIMETypeERKN7WebCore6StringE
__ZN20WebFrameLoaderClient26dispatchDidReceiveResponseEPN7WebCore14DocumentLoaderEmRKNS0_16ResourceResponseE
+__Z24CallResourceLoadDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS2_S0_S0_S0_
__ZN20WebFrameLoaderClient17dispatchWillCloseEv
__ZN20WebFrameLoaderClient18makeRepresentationEPN7WebCore14DocumentLoaderE
-[WebDataSource(WebInternal) _makeRepresentation]
@@ -514,61 +506,161 @@ __ZN20WebFrameLoaderClient18makeRepresentationEPN7WebCore14DocumentLoaderE
-[WebHTMLRepresentation init]
-[WebDataSource(WebFileInternal) _setRepresentation:]
-[WebHTMLRepresentation setDataSource:]
+__ZN20WebDocumentLoaderMac15detachFromFrameEv
+__ZN20WebDocumentLoaderMac17releaseDataSourceEv
__Z26WKNotifyHistoryItemChangedv
__ZN20WebFrameLoaderClient19updateGlobalHistoryEv
+[WebHistory optionalSharedHistory]
-[WebHistory(WebInternal) _visitedURL:withTitle:method:wasFailure:]
-[WebHistoryPrivate visitedURL:withTitle:]
--[WebHistoryItem initWithURLString:title:lastVisitedTimeInterval:]
--[WebHistoryItem(WebInternal) initWithWebCoreHistoryItem:]
-__ZL19historyItemWrappersv
-__ZN3WTF9HashTableIPN7WebCore11HistoryItemESt4pairIS3_P14WebHistoryItemENS_18PairFirstExtractorIS7_EENS_7PtrHashIS3_EENS_14PairHashTraitsINS_10HashTraitsIS3_EENSD_IS6_EEEESE_E6expandEv
--[WebHistoryItem(WebInternal) _setVisitCount:]
--[WebHistoryPrivate addItemToDateCaches:]
--[WebHistoryItem lastVisitedTimeInterval]
--[WebHistoryPrivate findKey:forDay:]
-__ZNK3WTF9HashTableIxSt4pairIxNS_9RetainPtrI14NSMutableArrayEEENS_18PairFirstExtractorIS5_EENS_7IntHashIyEENS_14PairHashTraitsINS_10HashTraitsIxEENSB_IS4_EEEESC_E8containsIxNS_22IdentityHashTranslatorIxS5_S9_EEEEbRKT_
+-[WebHistoryPrivate removeItemFromDateCaches:]
+__ZN3WTF9HashTableIxSt4pairIxNS_9RetainPtrI14NSMutableArrayEEENS_18PairFirstExtractorIS5_EENS_7IntHashIyEENS_14PairHashTraitsIN
+-[WebHistoryItem(WebInternal) _visitedWithTitle:]
__Z4coreP14WebHistoryItem
-[WebHistory _sendNotification:entries:]
--[WebHistoryItem URLString]
--[NSString(WebKitExtras) _webkit_hasCaseInsensitivePrefix:]
-__ZNK20WebFrameLoaderClient11hasHTMLViewEv
+-[WebHistoryItem originalURLString]
+__ZN20WebFrameLoaderClient32updateGlobalHistoryRedirectLinksEv
+-[WebDynamicScrollBarsView(WebInternal) setScrollBarsSuppressed:repaintOnUnsuppress:]
+-[WebDataSource dealloc]
+-[WebDataSourcePrivate dealloc]
+__ZN20WebDocumentLoaderMac16detachDataSourceEv
+__ZN20WebDocumentLoaderMacD0Ev
+__ZN15WebChromeClient16setStatusbarTextERKN7WebCore6StringE
+__Z14CallUIDelegateP7WebViewP13objc_selectorP11objc_object
__ZN20WebFrameLoaderClient13committedLoadEPN7WebCore14DocumentLoaderEPKci
-[WebDataSource(WebInternal) _receivedData:]
-[WebHTMLRepresentation receivedData:withDataSource:]
-[WebFrame(WebInternal) _receivedData:textEncodingName:]
-__ZNK7WebCore17FrameLoaderClient23shouldUsePluginDocumentERKNS_6StringE
__ZN20WebFrameLoaderClient21dispatchDidCommitLoadEv
-[WebView(WebPrivate) _didCommitLoadForFrame:]
-[WebDataSource pageTitle]
-[WebHTMLRepresentation title]
-[WebDataSource(WebInternal) _documentLoader]
-__ZN3WTF7HashMapIPN7WebCore11HistoryItemEP14WebHistoryItemNS_7PtrHashIS3_EENS_10HashTraitsIS3_EENS8_IS5_EEE3setERKS3_RKS5_
+-[WebView(WebPrivate) _setJavaScriptURLsAreAllowed:]
+__ZNK3WTF7HashMapIPN7WebCore11HistoryItemEP14WebHistoryItemNS_7PtrHashIS3_EENS_10HashTraitsIS3_EENS8_IS5_EEE3getERKS3_
-[WebFrameView becomeFirstResponder]
-[WebHTMLView acceptsFirstResponder]
-[WebHTMLView becomeFirstResponder]
-[WebView(WebPrivate) _isPerformingProgrammaticFocus]
+__ZN15WebEditorClient10isEditableEv
+-[WebView(WebViewEditing) isEditable]
-[WebHTMLView(WebInternal) _updateFontPanel]
-[WebHTMLView(WebPrivate) _canEdit]
-[WebFrame(WebInternal) _addData:]
--[WebHistoryPrivate itemForURL:]
+__ZN20WebFrameLoaderClient15willChangeTitleEPN7WebCore14DocumentLoaderE
+__ZN20WebFrameLoaderClient14didChangeTitleEPN7WebCore14DocumentLoaderE
+__ZN20WebFrameLoaderClient8setTitleERKN7WebCore6StringERKNS0_4KURLE
-[WebHistoryItem(WebInternal) setTitle:]
__ZN20WebFrameLoaderClient23dispatchDidReceiveTitleERKN7WebCore6StringE
+__Z21CallFrameLoadDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS2_S0_S0_
+__ZN20WebFrameLoaderClient19windowObjectClearedEv
+-[WebView(WebPendingPublic) scriptDebugDelegate]
+__ZN15WebChromeClient18formStateDidChangeEPKN7WebCore4NodeE
-[WebHTMLView dataSourceUpdated:]
__ZN20WebFrameLoaderClient39postProgressEstimateChangedNotificationEv
__ZN20WebFrameLoaderClient31dispatchDidReceiveContentLengthEPN7WebCore14DocumentLoaderEmi
-__Z24CallResourceLoadDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS2_S0_iS0_
-__ZL12CallDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS0_S2_S0_iS0_
+__Z24CallResourceLoadDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS2_S0_lS0_
+__ZNK20WebFrameLoaderClient17willCacheResponseEPN7WebCore14DocumentLoaderEmP19NSCachedURLResponse
-[WebHTMLRepresentation finishedLoadingWithDataSource:]
-[WebHTMLRepresentation _isDisplayingWebArchive]
--[WebView(WebViewEditing) isEditable]
__ZN20WebFrameLoaderClient29dispatchDidFinishDocumentLoadEv
+__ZN20WebFrameLoaderClient27dispatchDidLoadMainResourceEPN7WebCore14DocumentLoaderE
__ZN20WebFrameLoaderClient24dispatchDidFinishLoadingEPN7WebCore14DocumentLoaderEm
--[WebHistoryPrivate insertItem:forDateKey:]
-__ZN3WTF7HashMapIxNS_9RetainPtrI14NSMutableArrayEENS_7IntHashIyEENS_10HashTraitsIxEENS6_IS3_EEE3setERKxRKS3_
-__ZN20WebFrameLoaderClient29dispatchDidHandleOnloadEventsEv
+-[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
+-[WebHTMLView(WebNSTextInputSupport) inputContext]
+__ZL11isTextInputPN7WebCore5FrameE
+__ZN15WebChromeClient20populateVisitedLinksEv
+-[WebHistory(WebInternal) _addVisitedLinksToPageGroup:]
+-[WebHistoryPrivate addVisitedLinksToPageGroup:]
+__ZN3WTF6VectorItLm512EE6shrinkEm
+_WKSetUpFontCache
+_WKGetFontInLanguageForRange
-[WebDynamicScrollBarsView(WebInternal) setScrollingModes:vertical:andLock:]
-__ZN15WebEditorClient10isEditableEv
+-[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:]
+-[WebHTMLView mouseMovedNotification:]
+_WKGetMIMETypeForExtension
+_WKQTIncludeOnlyModernMediaFileTypes
+_WKQTMovieMaxTimeLoadedChangeNotification
+-[WebFrame childFrames]
+_WKQTMovieMaxTimeLoaded
+_maxValueForTimeRanges
-[WebView(WebPendingPublic) isHoverFeedbackSuspended]
__ZN15WebChromeClient23mouseDidMoveOverElementERKN7WebCore13HitTestResultEj
+[WebElementDictionary initialize]
@@ -576,165 +668,168 @@ __ZN15WebChromeClient23mouseDidMoveOverElementERKN7WebCore13HitTestResultEj
+[WebElementDictionary initializeLookupTable]
__ZL12addLookupKeyP8NSStringP13objc_selector
-[WebView(WebPrivate) _mouseDidMoveOverElement:modifierFlags:]
-__Z14CallUIDelegateP7WebViewP13objc_selectorP11objc_objectj
-__ZL12CallDelegateP7WebViewP11objc_objectP13objc_selectorS2_j
+__Z14CallUIDelegateP7WebViewP13objc_selectorP11objc_objectm
-[WebElementDictionary objectForKey:]
-[WebElementDictionary _absoluteLinkURL]
-[WebElementDictionary dealloc]
__ZN15WebChromeClient10setToolTipERKN7WebCore6StringE
-[WebHTMLView(WebPrivate) _setToolTip:]
--[WebView(WebPrivate) _globalHistoryItem]
--[WebHistoryItem originalURLString]
--[WebHistory orderedLastVisitedDays]
--[WebHistoryPrivate orderedLastVisitedDays]
-__ZN3WTF6VectorIiLm0EE15reserveCapacityEm
-__ZSt16__introsort_loopIPiiEvT_S1_T0_
-__ZSt22__final_insertion_sortIPiEvT_S1_
-__ZSt16__insertion_sortIPiEvT_S1_
-__ZN3WTF6VectorIiLm0EE6shrinkEm
--[WebHistory orderedItemsLastVisitedOnDay:]
--[WebHistoryPrivate orderedItemsLastVisitedOnDay:]
--[WebHistoryItem title]
-[WebHTMLView shouldDelayWindowOrderingForEvent:]
-[WebHTMLView(WebHTMLViewFileInternal) _hitViewForEvent:]
-[WebHTMLView _isSelectionEvent:]
-[WebHTMLView(WebDocumentInternalProtocols) elementAtPoint:allowShadowContent:]
-[WebElementDictionary _isSelected]
--[WebHTMLView needsPanelToBecomeKey]
--[WebHTMLView _windowChangedKeyState]
--[WebHTMLView windowDidBecomeKey:]
--[WebHTMLView acceptsFirstMouse:]
+-[WebHTMLView mouseDown:]
-[WebHTMLView(WebHTMLViewFileInternal) _setMouseDownEvent:]
-__ZL9setCursorP8NSWindowP13objc_selector8_NSPoint
--[NSWindow(BorderViewAccess) _web_borderView]
--[WebElementDictionary _domNode]
-__Z3kitPN7WebCore4NodeE
--[WebHTMLView mouseMovedNotification:]
--[WebBackForwardList forwardListCount]
--[WebBackForwardList backListCount]
--[WebBackForwardList itemAtIndex:]
--[WebView(WebPendingPublic) shouldClose]
--[WebWindowWatcher windowWillClose:]
--[WebView _windowWillClose:]
--[WebView shouldCloseWithWindow]
--[WebHTMLView windowWillClose:]
--[WebHTMLView windowDidResignKey:]
--[WebHTMLView removeMouseMovedObserver]
--[WebView(WebPrivate) _isClosed]
--[WebView(WebPrivate) _clearUndoRedoOperations]
-__ZN20WebFrameLoaderClient19saveViewStateToItemEPN7WebCore11HistoryItemE
--[WebHTMLRepresentation dealloc]
--[WebHistoryItem dealloc]
-__ZN3WTF9HashTableIPN7WebCore11HistoryItemESt4pairIS3_P14WebHistoryItemENS_18PairFirstExtractorIS7_EENS_7PtrHashIS3_EENS_14PairHashTraitsINS_10HashTraitsIS3_EENSD_IS6_EEEESE_E4findIS3_NS_22IdentityHashTranslatorIS3_S7_SB_EEEENS_17HashTableIteratorIS3_S7_S9_SB_SG_SE_EERKT_
--[WebHistory saveToURL:error:]
--[WebHistoryPrivate saveToURL:error:]
--[WebHistoryPrivate saveHistoryGuts:URL:error:]
--[WebHistoryPrivate arrayRepresentation]
--[WebHistoryItem(WebPrivate) dictionaryRepresentation]
-+[WebView(WebFileInternal) _preferencesRemovedNotification:]
-+[WebView(WebFileInternal) _maxCacheModelInAnyInstance]
--[WebHistoryPrivate historyItemLimit]
--[WebHistoryPrivate ageLimitDate]
--[WebHistoryPrivate historyAgeInDaysLimit]
--[WebHistoryItem(WebInternal) initFromDictionaryRepresentation:]
--[NSDictionary(WebNSDictionaryExtras) _webkit_stringForKey:]
--[WebHistoryItem(WebInternal) initWithURLString:title:displayTitle:lastVisitedTimeInterval:]
--[NSDictionary(WebNSDictionaryExtras) _webkit_intForKey:]
--[NSDictionary(WebNSDictionaryExtras) _webkit_numberForKey:]
--[NSDictionary(WebNSDictionaryExtras) _webkit_boolForKey:]
--[WebHistoryPrivate addItem:]
--[WebHistory itemForURL:]
--[WebHistory(WebPrivate) allItems]
--[WebHistoryPrivate allItems]
--[WebHistoryItem(WebPrivate) visitCount]
-+[NSURL(WebNSURLExtras) _web_URLWithUserTypedString:]
-+[NSURL(WebNSURLExtras) _web_URLWithUserTypedString:relativeToURL:]
--[WebHistoryItem(WebInternal) _visitedWithTitle:]
--[WebHistoryPrivate removeItemFromDateCaches:]
-__ZN3WTF9HashTableIxSt4pairIxNS_9RetainPtrI14NSMutableArrayEEENS_18PairFirstExtractorIS5_EENS_7IntHashIyEENS_14PairHashTraitsINS_10HashTraitsIxEENSB_IS4_EEEESC_E4findIxNS_22IdentityHashTranslatorIxS5_S9_EEEENS_17HashTableIteratorIxS5_S7_S9_SE_SC_EERKT_
+__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(WebPrivate) viewWillDraw]
--[WebHTMLView(WebInternal) _web_layoutIfNeededRecursive]
--[WebHTMLView(WebInternal) _layoutIfNeeded]
--[WebFrame(WebInternal) _needsLayout]
--[NSView(WebHTMLViewFileInternal) _web_addDescendantWebHTMLViewsToArray:]
--[WebHTMLView isOpaque]
--[WebHTMLView drawRect:]
--[WebView(WebPrivate) _mustDrawUnionedRect:singleRects:count:]
--[WebHTMLView drawSingleRect:]
--[WebClipView setAdditionalClip:]
--[WebHTMLView(WebPrivate) _transparentBackground]
--[WebFrame(WebInternal) _drawRect:contentsOnly:]
--[WebView(WebPrivate) _UIDelegateForwarder]
-+[WebDefaultUIDelegate sharedUIDelegate]
--[WebView currentNodeHighlight]
--[WebClipView resetAdditionalClip]
--[WebHTMLView(WebPrivate) _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
-__ZN15WebChromeClient20populateVisitedLinksEv
--[WebHistory(WebInternal) _addVisitedLinksToPageGroup:]
--[WebHistoryPrivate addVisitedLinksToPageGroup:]
-__ZN3WTF6VectorItLm512EE6shrinkEm
-WKSetUpFontCache
-__ZN20WebFrameLoaderClient38dispatchDidFirstVisuallyNonEmptyLayoutEv
-WKCGContextGetShouldSmoothFonts
-WKSetCGFontRenderingMode
+-[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_
__ZNK20WebFrameLoaderClient29generatedMIMETypeForURLSchemeERKN7WebCore6StringE
-__ZN20WebFrameLoaderClient31dispatchDecidePolicyForMIMETypeEMN7WebCore11FrameLoaderEFvNS0_12PolicyActionEERKNS0_6StringERKNS0_15ResourceRequestE
--[WebHistoryItem(WebPrivate) _lastVisitWasHTTPNonGet]
--[WebHistoryItem(WebPrivate) lastVisitWasFailure]
+__ZNK20WebFrameLoaderClient25didPerformFirstNavigationEv
+-[WebPreferences(WebPrivate) automaticallyDetectsCacheModel]
+__ZN20WebFrameLoaderClient19saveViewStateToItemEPN7WebCore11HistoryItemE
-[WebHistory removeItems:]
-[WebHistoryPrivate removeItems:]
-[WebHistoryPrivate removeItem:]
-[WebHistoryPrivate removeItemForURLString:]
-+[WebView(WebPrivate) _shouldUseFontSmoothing]
-+[WebView(WebPrivate) _setShouldUseFontSmoothing:]
-+[WebIconDatabase(WebPrivate) _checkIntegrityBeforeOpening]
--[WebView(WebPrivate) setDefersCallbacks:]
-+[WebPreferences(WebPrivate) _setInitialDefaultTextEncodingToSystemEncoding]
-+[WebPreferences(WebPrivate) _systemCFStringEncoding]
-WKGetWebDefaultCFStringEncoding
-+[WebIconDatabase allowDatabaseCleanup]
--[WebIconDatabase defaultIconForURL:withSize:]
-__ZNK20WebFrameLoaderClient17willCacheResponseEPN7WebCore14DocumentLoaderEmP19NSCachedURLResponse
-__ZN20WebFrameLoaderClient15willChangeTitleEPN7WebCore14DocumentLoaderE
-__ZN20WebFrameLoaderClient14didChangeTitleEPN7WebCore14DocumentLoaderE
-__ZN20WebFrameLoaderClient8setTitleERKN7WebCore6StringERKNS0_4KURLE
-+[NSError(WebKitExtras) _webkit_errorWithDomain:code:URL:]
--[NSError(WebKitExtras) _webkit_initWithDomain:code:URL:]
-__ZN21WebIconDatabaseClient28dispatchDidAddIconForPageURLERKN7WebCore6StringE
--[WebIconDatabase(WebInternal) _sendNotificationForURL:]
--[NSNotificationCenter(WebNSNotificationCenterExtras) postNotificationOnMainThreadWithName:object:userInfo:]
--[NSNotificationCenter(WebNSNotificationCenterExtras) postNotificationOnMainThreadWithName:object:userInfo:waitUntilDone:]
-__ZN20WebFrameLoaderClient22dispatchDidReceiveIconEv
--[WebView(WebViewInternal) _dispatchDidReceiveIconFromWebFrame:]
--[WebView(WebViewInternal) _registerForIconNotification:]
-__ZN20WebFrameLoaderClient19dispatchDidFailLoadERKN7WebCore13ResourceErrorE
--[WebView(WebPrivate) _didFailLoadWithError:forFrame:]
--[WebFrame DOMDocument]
-__Z3kitPN7WebCore8DocumentE
-__ZN20WebFrameLoaderClient32postProgressFinishedNotificationEv
-+[NSNotificationCenter(WebNSNotificationCenterExtras) _postNotificationName:]
+__ZN20WebFrameLoaderClient31dispatchDidCancelClientRedirectEv
+-[WebHistoryItem dealloc]
+-[WebHTMLView dealloc]
+-[WebHTMLView(WebPrivate) close]
+-[WebHTMLView(WebPrivate) _clearLastHitViewIfSelf]
+-[WebPluginController destroyAllPlugins]
+-[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]
+-[WebWindowWatcher windowWillClose:]
+__ZNK20WebFrameLoaderClient12canCachePageEv
+__ZN20WebFrameLoaderClient11createFrameERKN7WebCore4KURLERKNS0_6StringEPNS0_21HTMLFrameOwnerElementES6_bii
++[WebFrame(WebInternal) _createSubframeWithOwnerElement:frameName:frameView:]
+-[WebHTMLView addSubview:]
++[WebPluginController isPlugInView:]
+-[WebFrame parentFrame]
+_WKSetNSURLConnectionDefersCallbacks
+__ZL41_updateFocusedAndActiveStateTimerCallbackP16__CFRunLoopTimerPv
+_haltTimerFired
+__ZN20WebFrameLoaderClient17objectContentTypeERKN7WebCore4KURLERKNS0_6StringE
+_WKSetNSURLRequestShouldContentSniff
+__ZN20WebFrameLoaderClient39dispatchDidLoadResourceByXMLHttpRequestEmRKN7WebCore12ScriptStringE
+-[WebViewFactory pluginsInfo]
++[WebPluginDatabase sharedDatabase]
+-[WebPluginDatabase init]
++[WebPluginDatabase(Internal) _defaultPlugInPaths]
+-[WebPluginDatabase setPlugInPaths:]
+-[WebPluginDatabase refresh]
+-[WebPluginDatabase(Internal) _scanForNewPlugins]
+-[WebPluginDatabase(Internal) _plugInPaths]
++[WebBasePluginPackage initialize]
++[WebBasePluginPackage pluginWithPath:]
+-[WebPluginPackage initWithPath:]
+-[WebBasePluginPackage initWithPath:]
+-[WebBasePluginPackage pathByResolvingSymlinksAndAliasesInPath:]
+-[WebBasePluginPackage dealloc]
+-[WebNetscapePluginPackage initWithPath:]
+-[WebNetscapePluginPackage _initWithPath:]
+-[WebBasePluginPackage getPluginInfoFromPLists]
+-[WebBasePluginPackage getPluginInfoFromBundleAndMIMEDictionary:]
+-[NSArray(WebPluginExtensions) _web_lowercaseStrings]
+-[WebBasePluginPackage setMIMEToExtensionsDictionary:]
+-[WebBasePluginPackage setMIMEToDescriptionDictionary:]
+-[WebBasePluginPackage filename]
+-[WebBasePluginPackage setName:]
+-[WebBasePluginPackage setPluginDescription:]
-[WebNetscapePluginPackage getPluginInfoFromResources]
-[WebNetscapePluginPackage openResourceFile]
-[WebNetscapePluginPackage stringForStringListID:andIndex:]
+[NSString(WebKitExtras) _web_encodingForResource:]
-[WebNetscapePluginPackage closeResourceFile:]
--[WebNetscapePluginPackage(Internal) _unloadWithShutdown:]
+-[WebBasePluginPackage isNativeLibraryData:]
+__ZN3WTF6VectorIhLm512EE6shrinkEm
-[WebBasePluginPackage pListForPath:createFile:]
++[WebBasePluginPackage preferredLocalizationName]
+-[WebBasePluginPackage createPropertyListFile]
-[WebPluginPackage load]
-[WebBasePluginPackage load]
-[WebBasePluginPackage unload]
-+[WebBasePluginPackage preferredLocalizationName]
-[WebPluginDatabase(Internal) _addPlugin:]
-[WebBasePluginPackage path]
-[WebBasePluginPackage wasAddedToPluginDatabase:]
-[WebBasePluginPackage MIMETypeEnumerator]
-[WebPluginDatabase pluginForMIMEType:]
-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]
-__ZL14checkCandidatePP20WebBasePluginPackageS1_
-[WebNetscapePluginPackage executableType]
+__ZL14checkCandidatePP20WebBasePluginPackageS1_
-[WebBasePluginPackage isQuickTimePlugIn]
-[WebBasePluginPackage bundle]
-[WebBasePluginPackage isJavaPlugIn]
@@ -742,25 +837,42 @@ __ZL14checkCandidatePP20WebBasePluginPackageS1_
+[WebHTMLRepresentation supportedImageMIMETypes]
__ZN3WTF7HashSetIN7WebCore6StringENS1_10StringHashENS_10HashTraitsIS2_EEE3addERKS2_
__ZN3WTF9HashTableIN7WebCore6StringES2_NS_17IdentityExtractorIS2_EENS1_10StringHashENS_10HashTraitsIS2_EES7_E6expandEv
-__ZN3WTF9HashTableIN7WebCore6StringES2_NS_17IdentityExtractorIS2_EENS1_10StringHashENS_10HashTraitsIS2_EES7_E4findIS2_NS_22IdentityHashTranslatorIS2_S2_S5_EEEENS_17HashTableIteratorIS2_S2_S4_S5_S7_S7_EERKT_
+__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:]
-__ZN20WebFrameLoaderClient21dispatchDidFinishLoadEv
--[WebView(WebPrivate) _didFinishLoadForFrame:]
--[WebHistoryItem(WebPrivate) _transientPropertyForKey:]
--[WebHTMLView(WebDocumentPrivateProtocols) selectionView]
--[WebHTMLView(WebPrivate) _recursive:displayRectIgnoringOpacity:inContext:topView:]
--[WebHTMLView(WebNSTextInputSupport) validAttributesForMarkedText]
--[WebFrame(WebPrivate) _isFrameSet]
--[WebHTMLView(WebDocumentPrivateProtocols) string]
--[WebHTMLView(WebHTMLViewFileInternal) _documentRange]
--[DOMDocument(WebDOMDocumentOperationsPrivate) _documentRange]
--[DOMDocument(WebDOMDocumentOperationsPrivate) _createRangeWithNode:]
--[WebFrame(WebInternal) _stringForRange:]
+__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:]
@@ -770,218 +882,231 @@ __ZL14incrementFrameP8WebFrameaa
-[WebView(WebPendingPublic) unmarkAllTextMatches]
-[WebHTMLView(WebDocumentInternalProtocols) unmarkAllTextMatches]
-[WebDynamicScrollBarsView setAllowsHorizontalScrolling:]
+-[WebDynamicScrollBarsView(WebInternal) accessibilityIsIgnored]
+[NSPasteboard(WebExtras) _web_setFindPasteboardString:withOwner:]
__ZN20WebFrameLoaderClient50dispatchDidReceiveServerRedirectForProvisionalLoadEv
-__ZNK20WebFrameLoaderClient12canCachePageEv
__ZN20WebFrameLoaderClient29savePlatformDataToCachedFrameEPN7WebCore11CachedFrameE
-__ZNK20WebFrameLoaderClient25didPerformFirstNavigationEv
--[WebPreferences(WebPrivate) automaticallyDetectsCacheModel]
-WKGetFontInLanguageForRange
-WKDrawBezeledTextFieldCell
--[WebHTMLView(WebPrivate) addTrackingRect:owner:userData:assumeInside:]
--[WebHTMLView(WebPrivate) _sendToolTipMouseEntered]
--[WebHTMLView(WebPrivate) _sendToolTipMouseExited]
--[WebElementDictionary _webFrame]
--[DOMDocument(WebDOMDocumentOperations) webFrame]
-__Z4coreP11DOMDocument
--[WebElementDictionary _targetWebFrame]
--[NSURL(WebNSURLExtras) _webkit_URLByRemovingFragment]
--[NSURL(WebNSURLExtras) _webkit_URLByRemovingComponent:]
--[WebHTMLView mouseDown:]
-__ZN15WebChromeClient14firstResponderEv
--[WebHTMLView mouseUp:]
-WKSetNSURLConnectionDefersCallbacks
-haltTimerFired
-resumeTimerFired
--[WebHTMLView(WebPrivate) _removeTrackingRects:count:]
--[WebHTMLView(WebPrivate) _addTrackingRect:owner:userData:assumeInside:useTrackingNum:]
-__ZN20WebFrameLoaderClient11createFrameERKN7WebCore4KURLERKNS0_6StringEPNS0_21HTMLFrameOwnerElementES6_bii
-+[WebFrame(WebInternal) _createSubframeWithOwnerElement:frameName:frameView:]
--[WebHTMLView addSubview:]
-+[WebPluginController isPlugInView:]
--[WebFrame parentFrame]
++[WebStringTruncator centerTruncateString:toWidth:]
+__ZL15defaultMenuFontv
-[WebClipView additionalClip]
-[WebHTMLView willRemoveSubview:]
-__ZN15WebEditorClient19setInputMethodStateEb
-__ZN15WebEditorClient25shouldChangeSelectedRangeEPN7WebCore5RangeES2_NS0_9EAffinityEb
-__Z3kitPN7WebCore5RangeE
--[WebView(WebViewEditing) _shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]
--[WebView(WebPrivate) _editingDelegateForwarder]
-+[WebDefaultEditingDelegate sharedEditingDelegate]
--[WebDefaultEditingDelegate webView:shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]
-__ZN15WebEditorClient32isContinuousSpellCheckingEnabledEv
--[WebView(WebViewEditing) isContinuousSpellCheckingEnabled]
--[WebView(WebFileInternal) _continuousCheckingAllowed]
-__ZN15WebEditorClient24isGrammarCheckingEnabledEv
--[WebView(WebViewGrammarChecking) isGrammarCheckingEnabled]
-__ZN15WebEditorClient25respondToChangedSelectionEv
--[WebView selectedFrame]
--[WebView(WebFileInternal) _focusedFrame]
-__ZL19containingFrameViewP6NSView
--[WebHTMLView(WebInternal) _selectionChanged]
--[WebHTMLView(WebNSTextInputSupport) _updateSelectionForInputManager]
-__ZN15WebEditorClient33isSelectTrailingWhitespaceEnabledEv
--[WebView(WebPrivate) isSelectTrailingWhitespaceEnabled]
-+[WebHTMLView(WebPrivate) _postFlagsChangedEvent:]
--[WebHTMLView flagsChanged:]
+__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:]
-__ZN15WebEditorClient27doTextFieldCommandFromEventEPN7WebCore7ElementEPNS0_13KeyboardEventE
+-[WebHTMLView(WebNSTextInputSupport) hasMarkedText]
+-[WebHTMLView(WebNSTextInputSupport) insertText:]
+__ZN3WTF6VectorIN7WebCore15KeypressCommandELm0EE14expandCapacityEmPKS2_
+__ZN3WTF6VectorIN7WebCore15KeypressCommandELm0EE14expandCapacityEm
+__ZN3WTF6VectorIN7WebCore15KeypressCommandELm0EE15reserveCapacityEm
__ZN15WebEditorClient19handleKeyboardEventEPN7WebCore13KeyboardEventE
--[WebHTMLView validateUserInterfaceItem:]
--[WebHTMLView validateUserInterfaceItemWithoutDelegate:]
-[WebHTMLView coreCommandBySelector:]
-__ZL3kitN7WebCore8TriStateE
-__Z30CallUIDelegateReturningBooleanaP7WebViewP13objc_selectorP11objc_objecta
-__ZL28CallDelegateReturningBooleanaP7WebViewP11objc_objectP13objc_selectorS2_a
--[WebHTMLView performKeyEquivalent:]
--[WebHTMLView _handleStyleKeyEquivalent:]
--[WebPreferences(WebPrivate) respectStandardStyleKeyEquivalents]
--[WebHTMLView(WebNSTextInputSupport) doCommandBySelector:]
--[WebHTMLView copy:]
--[WebHTMLView executeCoreCommandBySelector:]
--[WebHTMLView callDelegateDoCommandBySelectorIfNeeded:]
--[WebDefaultEditingDelegate webView:doCommandBySelector:]
-__ZN15WebEditorClient24smartInsertDeleteEnabledEv
--[WebView(WebViewEditing) smartInsertDeleteEnabled]
--[WebView textSizeMultiplier]
-__ZN15WebEditorClient33didSetSelectionTypesForPasteboardEv
--[WebDefaultEditingDelegate webView:didSetSelectionTypesForPasteboard:]
-__ZN15WebEditorClient29didWriteSelectionToPasteboardEv
--[WebDefaultEditingDelegate webView:didWriteSelectionToPasteboard:]
--[WebHTMLView keyUp:]
-__ZN15WebEditorClient22textFieldDidEndEditingEPN7WebCore7ElementE
-__Z16CallFormDelegateP7WebViewP13objc_selectorP11objc_objectS4_
-WKDrawFocusRing
--[WebHTMLView(WebInternal) paste:]
__ZN15WebEditorClient16shouldInsertTextERKN7WebCore6StringEPNS0_5RangeENS0_18EditorInsertActionE
-__Z3kitN7WebCore18EditorInsertActionE
--[WebDefaultEditingDelegate webView:shouldInsertText:replacingDOMRange:givenAction:]
-__ZN15WebEditorClient24textFieldDidBeginEditingEPN7WebCore7ElementE
--[WebHTMLRepresentation formForElement:]
-__ZL26inputElementFromDOMElementP10DOMElement
-__Z3kitPN7WebCore11HTMLElementE
--[WebHTMLRepresentation controlsInForm:]
-__ZL25formElementFromDOMElementP10DOMElement
--[WebHTMLRepresentation elementIsPassword:]
--[WebHTMLRepresentation elementDoesAutoComplete:]
-__ZN15WebEditorClient24textDidChangeInTextFieldEPN7WebCore7ElementE
+-[WebView(WebViewEditing) typingStyle]
+-[WebFrame(WebInternal) _typingStyle]
__ZN15WebEditorClient22registerCommandForUndoEN3WTF10PassRefPtrIN7WebCore11EditCommandEEE
__ZN15WebEditorClient28registerCommandForUndoOrRedoEN3WTF10PassRefPtrIN7WebCore11EditCommandEEEb
--[WebView(WebViewEditing) undoManager]
+[WebEditCommand initialize]
+[WebEditCommand commandWithEditCommand:]
+-[WebEditCommand .cxx_construct]
-[WebEditCommand initWithEditCommand:]
__ZN15WebEditorClient24respondToChangedContentsEv
-__ZNK15WebChromeClient18scrollRectIntoViewERKN7WebCore7IntRectEPKNS0_10ScrollViewE
--[WebHTMLRepresentation matchLabels:againstElement:]
-__Z4coreP10DOMElement
--[WebHTMLRepresentation searchForLabels:beforeElement:]
--[WebHTMLView keyDown:]
-__ZN3WTF6VectorIN7WebCore15KeypressCommandELm0EE14expandCapacityEmPKS2_
-__ZN3WTF6VectorIN7WebCore15KeypressCommandELm0EE14expandCapacityEm
-__ZN3WTF6VectorIN7WebCore15KeypressCommandELm0EE15reserveCapacityEm
-__Z32CallFormDelegateReturningBooleanaP7WebViewP13objc_selectorP11objc_objectS2_S4_
-__ZN15WebEditorClient21checkSpellingOfStringEPKtiPiS2_
+-[WebHTMLView keyUp:]
+__ZN15WebEditorClient35isAutomaticQuoteSubstitutionEnabledEv
+-[WebView(WebViewTextChecking) isAutomaticQuoteSubstitutionEnabled]
+__ZN15WebEditorClient31isAutomaticLinkDetectionEnabledEv
+-[WebView(WebViewTextChecking) isAutomaticLinkDetectionEnabled]
+__ZN15WebEditorClient34isAutomaticDashSubstitutionEnabledEv
+-[WebView(WebViewTextChecking) isAutomaticDashSubstitutionEnabled]
+__ZN15WebEditorClient33isAutomaticTextReplacementEnabledEv
+-[WebView(WebViewTextChecking) isAutomaticTextReplacementEnabled]
+__ZN15WebEditorClient36isAutomaticSpellingCorrectionEnabledEv
+-[WebView(WebViewTextChecking) isAutomaticSpellingCorrectionEnabled]
+__ZN15WebEditorClient20checkTextOfParagraphEPKtiyRN3WTF6VectorIN7WebCore18TextCheckingResultELm0EEE
__ZN15WebEditorClient23spellCheckerDocumentTagEv
--[WebView(WebViewEditing) spellCheckerDocumentTag]
--[NSView(WebExtras) _web_dragShouldBeginFromMouseDown:withExpiration:]
--[NSView(WebExtras) _web_dragShouldBeginFromMouseDown:withExpiration:xHysteresis:yHysteresis:]
+__ZN15WebEditorClient13didEndEditingEv
-[WebEditCommand dealloc]
-__ZN26WebCachedFramePlatformData5clearEv
--[WebHTMLView(WebInternal) closeIfNotCurrentView]
+-[WebEditCommand .cxx_destruct]
-[WebHTMLView(WebPrivate) removeTrackingRect:]
-__ZN26WebCachedFramePlatformDataD1Ev
--[NSString(WebNSURLExtras) _webkit_scriptIfJavaScriptURL]
--[NSString(WebNSURLExtras) _webkit_isJavaScriptURL]
--[NSString(WebNSURLExtras) _web_isUserVisibleURL]
-__ZNK15WebChromeClient17windowResizerRectEv
--[WebViewFactory inputElementAltText]
-+[WebStringTruncator centerTruncateString:toWidth:]
-__ZL15defaultMenuFontv
--[WebHTMLView(WebHTMLViewFileInternal) _frameView]
-__ZN20WebFrameLoaderClient22dispatchWillSubmitFormEMN7WebCore11FrameLoaderEFvNS0_12PolicyActionEEN3WTF10PassRefPtrINS0_9FormStateEEE
--[WebView(WebPrivate) _formDelegate]
-__Z16CallFormDelegateP7WebViewP13objc_selectorP11objc_objectS4_S4_S4_S4_
--[WebFramePolicyListener continue]
--[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
-__ZL19isPreVersion3Clientv
-__ZL28isPreInspectElementTagClientv
-__Z14CallUIDelegateP7WebViewP13objc_selectorP11objc_objectS4_
-__ZL12CallDelegateP7WebViewP11objc_objectP13objc_selectorS2_S2_
--[WebDataSource(WebPrivate) _fileWrapperForURL:]
--[WebDataSource subresourceForURL:]
--[WebView(WebPrivate) _cachedResponseForURL:]
--[WebView userAgentForURL:]
--[NSMutableURLRequest(WebNSURLRequestExtras) _web_setHTTPUserAgent:]
--[WebElementDictionary _absoluteImageURL]
--[WebHTMLView accessibilityAttributeValue:]
--[WebFrame(WebInternal) _accessibilityTree]
--[WebView(WebIBActions) validateUserInterfaceItem:]
--[WebView(WebIBActions) validateUserInterfaceItemWithoutDelegate:]
-__ZN13WebDragClient28dragSourceActionMaskForPointERKN7WebCore8IntPointE
--[WebDefaultUIDelegate webView:dragSourceActionMaskForPoint:]
-__ZN15WebEditorClient17userVisibleStringEP5NSURL
--[WebViewFactory unregisterUniqueIdForUIElement:]
-WKUnregisterUniqueIdForElement
--[WebFrame childFrames]
--[WebHistoryItem alternateTitle]
--[WebHistoryItem setAlternateTitle:]
--[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]
-__ZN20WebFrameLoaderClient17objectContentTypeERKN7WebCore4KURLERKNS0_6StringE
-WKSetNSURLRequestShouldContentSniff
--[WebIconDatabase(WebInternal) _applicationWillTerminate:]
-+[WebView _applicationWillTerminate]
--[WebView(WebPrivate) _closeWithFastTeardown]
-+[WebPluginDatabase closeSharedDatabase]
--[WebPluginDatabase close]
--[WebPluginDatabase(Internal) _removePlugin:]
-+[WebView(WebPrivate) _unregisterViewClassAndRepresentationClassForMIMEType:]
--[WebBasePluginPackage wasRemovedFromPluginDatabase:]
--[WebNetscapePluginPackage wasRemovedFromPluginDatabase:]
--[NSString(WebKitExtras) _web_drawAtPoint:font:textColor:]
--[WebView supportsTextEncoding]
--[WebIconDatabase(WebInternal) _iconsBySplittingRepresentationsOfIcon:]
--[WebIconDatabase(WebInternal) _iconFromDictionary:forSize:cache:]
--[WebHTMLView updateCell:]
--[WebHTMLView resignFirstResponder]
--[WebHTMLView maintainsInactiveSelection]
--[WebView(WebViewEditing) maintainsInactiveSelection]
--[WebHTMLView(WebDocumentPrivateProtocols) deselectAll]
--[WebHTMLView clearFocus]
-+[WebCoreStatistics setShouldPrintExceptions:]
+-[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]
@@ -989,92 +1114,113 @@ WKSetNSURLRequestShouldContentSniff
+[WebKitStatistics HTMLRepresentationCount]
+[WebKitStatistics bridgeCount]
+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]
-WKDrawBezeledTextArea
-__ZN20WebFrameLoaderClient33dispatchWillPerformClientRedirectERKN7WebCore4KURLEdd
-__Z21CallFrameLoadDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS2_S0_dS0_S0_
-__ZL12CallDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS0_S2_S0_dS0_S0_
-__ZN20WebFrameLoaderClient31dispatchDidCancelClientRedirectEv
--[WebViewFactory defaultLanguageCode]
--[WebViewFactory pluginsInfo]
-+[WebPluginDatabase sharedDatabase]
--[WebPluginDatabase init]
-+[WebPluginDatabase(Internal) _defaultPlugInPaths]
--[WebPluginDatabase setPlugInPaths:]
--[WebPluginDatabase refresh]
--[WebPluginDatabase(Internal) _scanForNewPlugins]
--[WebPluginDatabase(Internal) _plugInPaths]
-+[WebBasePluginPackage initialize]
-+[WebBasePluginPackage pluginWithPath:]
--[WebPluginPackage initWithPath:]
--[WebBasePluginPackage initWithPath:]
--[WebBasePluginPackage pathByResolvingSymlinksAndAliasesInPath:]
--[WebBasePluginPackage dealloc]
-+[WebNetscapePluginPackage initialize]
-WebLMGetCurApRefNum
-WebLMSetCurApRefNum
--[WebNetscapePluginPackage initWithPath:]
--[WebNetscapePluginPackage _initWithPath:]
--[WebBasePluginPackage isNativeLibraryData:]
-__ZN3WTF6VectorIhLm512EE6shrinkEm
--[WebBasePluginPackage getPluginInfoFromPLists]
--[WebBasePluginPackage getPluginInfoFromBundleAndMIMEDictionary:]
--[NSArray(WebPluginExtensions) _web_lowercaseStrings]
--[WebBasePluginPackage setMIMEToExtensionsDictionary:]
--[WebBasePluginPackage setMIMEToDescriptionDictionary:]
--[WebBasePluginPackage filename]
--[WebBasePluginPackage setName:]
--[WebBasePluginPackage setPluginDescription:]
-__ZN15WebChromeClient19addMessageToConsoleERKN7WebCore6StringEjS3_
-__ZN20WebFrameLoaderClient22dispatchDidFirstLayoutEv
-__ZN15WebChromeClient7repaintERKN7WebCore7IntRectEbbb
--[WebView(WebIBActions) stopLoading:]
--[WebFrame stopLoading]
-__ZN15WebChromeClient24disableSuddenTerminationEv
-__ZN15WebChromeClient23enableSuddenTerminationEv
--[WebHTMLView mouseDragged:]
-__ZN15WebChromeClient18formStateDidChangeEPKN7WebCore4NodeE
-__ZN15WebChromeClient12createWindowEPN7WebCore5FrameERKNS0_16FrameLoadRequestERKNS0_14WindowFeaturesE
-__ZN15WebChromeClient18setToolbarsVisibleEb
-__ZN15WebChromeClient19setStatusbarVisibleEb
-__ZN15WebChromeClient20setScrollbarsVisibleEb
--[WebFrameView setAllowsScrolling:]
-__ZN15WebChromeClient17setMenubarVisibleEb
-__ZN15WebChromeClient12setResizableEb
-__ZN15WebChromeClient10windowRectEv
-__ZN15WebChromeClient8pageRectEv
-__ZN15WebChromeClient13setWindowRectERKN7WebCore9FloatRectE
-__ZN15WebChromeClient4showEv
+-[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:]
+-[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]
--[WebPreferences setJavaScriptCanOpenWindowsAutomatically:]
-__ZL32applyHostNameFunctionToURLStringP8NSStringPFvS0_8_NSRangePvES2_
-__ZL29collectRangesThatNeedEncodingP8NSString8_NSRangePv
-__ZL28collectRangesThatNeedMappingP8NSString8_NSRangePva
--[NSString(WebNSURLExtras) _web_hostNameNeedsEncodingWithRange:]
--[WebView _pluginForMIMEType:]
-__ZN20WebFrameLoaderClient12createPluginERKN7WebCore7IntSizeEPNS0_7ElementERKNS0_4KURLERKN3WTF6VectorINS0_6StringELm0EEESE_RKSB_b
-__ZL23netscapePluginViewClassv
+-[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
-+[WebNetscapePluginDocumentView initialize]
+_WKSendUserChangeNotifications
++[WebHostedNetscapePluginView initialize]
-[WebBaseNetscapePluginView .cxx_construct]
--[WebNetscapePluginDocumentView .cxx_construct]
-__Z3kitPN7WebCore7ElementE
-__ZL3kitRKN3WTF6VectorIN7WebCore6StringELm0EEE
--[WebNetscapePluginDocumentView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]
--[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]
--[WebNetscapePluginDocumentView setAttributeKeys:andValues:]
--[WebNetscapePluginPackage load]
--[WebNetscapePluginPackage _applyDjVuWorkaround]
-__ZNK7WebCore6Widget11isFrameViewEv
+-[WebHostedNetscapePluginView .cxx_construct]
+-[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]
-__ZN7WebCore6Widget16setParentVisibleEb
-[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 viewWillMoveToWindow:]
-[WebBaseNetscapePluginView removeTrackingRect]
+-[WebHostedNetscapePluginView removeWindowObservers]
-[WebBaseNetscapePluginView removeWindowObservers]
-[WebBaseNetscapePluginView setHasFocus:]
-[WebBaseNetscapePluginView viewDidMoveToWindow]
@@ -1083,45 +1229,404 @@ __ZN7WebCore6Widget16setParentVisibleEb
-[WebBaseNetscapePluginView webView]
-[WebBaseNetscapePluginView webFrame]
-[WebBaseNetscapePluginView dataSource]
+-[WebHostedNetscapePluginView createPlugin]
+-[WebView userAgentForURL:]
+__ZN6WebKit25NetscapePluginHostManager6sharedEv
+__ZN6WebKit25NetscapePluginHostManagerC1Ev
+__ZN6WebKit25NetscapePluginHostManagerC2Ev
+__ZN6WebKit25NetscapePluginHostManager17instantiatePluginEP24WebNetscapePluginPackageP27WebHostedNetscapePluginViewP8NSStringP7
+__ZN6WebKit25NetscapePluginHostManager14hostForPackageEP24WebNetscapePluginPackage
+__ZN3WTF7HashMapIP24WebNetscapePluginPackagePN6WebKit23NetscapePluginHostProxyENS_7PtrHashIS2_EENS_10HashTraitsIS2_EENS8_IS5_EE
+__ZN3WTF9HashTableIP24WebNetscapePluginPackageSt4pairIS2_PN6WebKit23NetscapePluginHostProxyEENS_18PairFirstExtractorIS7_EENS_7P
+__ZN6WebKit25NetscapePluginHostManager15spawnPluginHostEP24WebNetscapePluginPackagejRjR19ProcessSerialNumber
+__ZN6WebKit25NetscapePluginHostManager20initializeVendorPortEv
+__WKPACheckInApplication
+_WKInitializeRenderServer
+-[WebNetscapePluginPackage pluginHostArchitecture]
+__WKPASpawnPluginHost
+__WKPHCheckInWithPluginHost
+__ZN6WebKit23NetscapePluginHostProxyC1EjjRK19ProcessSerialNumber
+__ZN6WebKit23NetscapePluginHostProxyC2EjjRK19ProcessSerialNumber
+__ZN6WebKitL14pluginProxyMapEv
+__ZN3WTF7HashMapIjPN6WebKit23NetscapePluginHostProxyENS_7IntHashIjEENS_10HashTraitsIjEENS6_IS3_EEE3addERKjRKS3_
+__ZN3WTF9HashTableIjSt4pairIjPN6WebKit23NetscapePluginHostProxyEENS_18PairFirstExtractorIS5_EENS_7IntHashIjEENS_14PairHashTrait
+_WKCreateMIGServerSource
+__ZN6WebKit27NetscapePluginInstanceProxyC1EPNS_23NetscapePluginHostProxyEP27WebHostedNetscapePluginViewb
+__ZN6WebKit27NetscapePluginInstanceProxyC2EPNS_23NetscapePluginHostProxyEP27WebHostedNetscapePluginViewb
+__ZN6WebKit23NetscapePluginHostProxy14pluginInstanceEj
+__ZNK3WTF7HashMapIjNS_6RefPtrIN6WebKit27NetscapePluginInstanceProxyEEENS_7IntHashIjEENS_10HashTraitsIjEENS7_IS4_EEE3getERKj
+__ZN6WebKit23NetscapePluginHostProxy17addPluginInstanceEPNS_27NetscapePluginInstanceProxyE
+__ZN3WTF7HashMapIjNS_6RefPtrIN6WebKit27NetscapePluginInstanceProxyEEENS_7IntHashIjEENS_10HashTraitsIjEENS7_IS4_EEE3setERKjRKS4_
+__ZN6WebKit27NetscapePluginInstanceProxy13nextRequestIDEv
+__WKPHInstantiatePlugin
+__ZN6WebKit27NetscapePluginInstanceProxy30processRequestsAndWaitForReplyEj
+__ZN3WTF7HashMapIjPN6WebKit27NetscapePluginInstanceProxy5ReplyENS_7IntHashIjEENS_10HashTraitsIjEENS7_IS4_EEE4takeERKj
+__ZN3WTF9HashTableIjSt4pairIjPN6WebKit27NetscapePluginInstanceProxy5ReplyEENS_18PairFirstExtractorIS6_EENS_7IntHashIjEENS_14Pai
+__ZN6WebKit23NetscapePluginHostProxy15processRequestsEv
+_WebKitPluginClient_server
+__XPCLoadURL
+_WKPCLoadURL
+__ZNK3WTF7HashMapIjPN6WebKit23NetscapePluginHostProxyENS_7IntHashIjEENS_10HashTraitsIjEENS6_IS3_EEE3getERKj
+__ZN6WebKit27NetscapePluginInstanceProxy7loadURLEPKcS2_S2_j12LoadURLFlagsRj
+-[WebBaseNetscapePluginView requestWithURLCString:]
+-[WebBaseNetscapePluginView URLWithCString:]
+-[NSString(WebKitExtras) _web_stringByStrippingReturnCharacters]
+-[NSURL(WebNSURLExtras) _webkit_URLByRemovingResourceSpecifier]
+-[NSMutableURLRequest(WebNSURLRequestExtras) _web_setHTTPReferrer:]
+__ZN6WebKit27NetscapePluginInstanceProxy11loadRequestEP12NSURLRequestPKcbRj
+-[NSURL(WebNSURLExtras) _webkit_scriptIfJavaScriptURL]
+__ZN3WTF5DequeIPN6WebKit27NetscapePluginInstanceProxy13PluginRequestEE14expandCapacityEv
+__XPCInstantiatePluginReply
+_WKPCInstantiatePluginReply
+__ZN3WTF7HashMapIjPN6WebKit27NetscapePluginInstanceProxy5ReplyENS_7IntHashIjEENS_10HashTraitsIjEENS7_IS4_EEE3setERKjRKS4_
+__ZN6WebKit27NetscapePluginInstanceProxy22InstantiatePluginReplyD0Ev
+_WKSoftwareCARendererCreate
+_WKMakeRenderLayer
+__ZN6WebKit27NetscapePluginInstanceProxy18windowFrameChangedE6CGRect
+__WKPHPluginInstanceWindowFrameChanged
+-[WebHostedNetscapePluginView updateAndSetWindow]
+-[WebBaseNetscapePluginView currentWindow]
+__ZN6WebKit27NetscapePluginInstanceProxy6resizeE6CGRectS1_b
+__WKPHResizePluginInstance
+__XPCBooleanReply
+_WKPCBooleanReply
+__ZN6WebKit27NetscapePluginInstanceProxy12BooleanReplyD0Ev
+-[WebHostedNetscapePluginView addWindowObservers]
+-[WebBaseNetscapePluginView addWindowObservers]
+-[WebBaseNetscapePluginView sendActivateEvent:]
+-[WebHostedNetscapePluginView windowFocusChanged:]
+__ZN6WebKit27NetscapePluginInstanceProxy18windowFocusChangedEb
+__WKPHPluginInstanceWindowFocusChanged
+-[WebBaseNetscapePluginView restartTimers]
+-[WebHostedNetscapePluginView stopTimers]
+__ZN6WebKit27NetscapePluginInstanceProxy10stopTimersEv
+__WKPHPluginInstanceStopTimers
+-[WebHostedNetscapePluginView startTimers]
+__ZN6WebKit27NetscapePluginInstanceProxy11startTimersEb
+__WKPHPluginInstanceStartTimers
+-[WebHostedNetscapePluginView loadStream]
+-[WebView acceptsFirstResponder]
+-[WebHostedNetscapePluginView drawRect:]
+_WKSoftwareCARendererRender
+__ZN7WebCore5TimerIN6WebKit27NetscapePluginInstanceProxyEE5firedEv
+__ZN6WebKit27NetscapePluginInstanceProxy17requestTimerFiredEPN7WebCore5TimerIS0_EE
+__ZN6WebKit27NetscapePluginInstanceProxy14performRequestEPNS0_13PluginRequestE
+-[WebPluginDatabase removePluginInstanceViewsFor:]
+__ZN20WebFrameLoaderClient22dispatchWillSubmitFormEMN7WebCore11FrameLoaderEFvNS0_12PolicyActionEEN3WTF10PassRefPtrINS0_9FormSta
+-[WebView(WebPrivate) _formDelegate]
+__Z16CallFormDelegateP7WebViewP13objc_selectorP11objc_objectS4_S4_S4_S4_
+-[WebFramePolicyListener continue]
+-[WebBaseNetscapePluginView stop]
+-[WebHostedNetscapePluginView shouldStop]
+__ZN6WebKit27NetscapePluginInstanceProxy10shouldStopEv
+-[WebHostedNetscapePluginView destroyPlugin]
+_WKSoftwareCARendererDestroy
+__ZN6WebKit27NetscapePluginInstanceProxy7destroyEv
+__WKPHDestroyPluginInstance
+__XPCCancelLoadURL
+_WKPCCancelLoadURL
+__ZN6WebKit27NetscapePluginInstanceProxy16cancelStreamLoadEjs
+__ZNK3WTF7HashMapIjNS_6RefPtrIN6WebKit26HostedNetscapePluginStreamEEENS_7IntHashIjEENS_10HashTraitsIjEENS7_IS4_EEE3getERKj
+__ZN6WebKit27NetscapePluginInstanceProxy7cleanupEv
+__ZN6WebKit27NetscapePluginInstanceProxy14stopAllStreamsEv
+__ZN3WTF9HashTableIPN6WebKit13ProxyInstanceES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E4swapERSA_
+__ZN3WTF9HashTableIPN6WebKit13ProxyInstanceES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E15dealloca
+__ZN6WebKit27NetscapePluginInstanceProxy10invalidateEv
+__ZN6WebKit23NetscapePluginHostProxy20removePluginInstanceEPNS_27NetscapePluginInstanceProxyE
+__ZN6WebKit27NetscapePluginInstanceProxyD1Ev
+__ZN6WebKit27NetscapePluginInstanceProxyD2Ev
+__ZN3WTF20deleteAllPairSecondsIPN6WebKit27NetscapePluginInstanceProxy5ReplyEKNS_7HashMapIjS4_NS_7IntHashIjEENS_10HashTraitsIjEE
+__ZN3WTF9HashTableIjSt4pairIjNS_9RetainPtrIP11objc_objectEEENS_18PairFirstExtractorIS6_EENS_7IntHashIjEENS_14PairHashTraitsINS_
+-[WebHostedNetscapePluginView inputContext]
++[WebTextInputWindowController sharedTextInputWindowController]
+-[WebTextInputWindowController init]
+-[WebTextInputPanel init]
+_WKGetInputPanelWindowStyle
+-[WebTextInputWindowController inputContext]
+-[WebTextInputPanel _inputContext]
+__ZN20NetscapePluginWidgetD0Ev
+-[WebBaseNetscapePluginView dealloc]
+-[WebHostedNetscapePluginView .cxx_destruct]
+-[WebBaseNetscapePluginView .cxx_destruct]
+__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
+-[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) 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:]
+__XPCGetWindowNPObject
+_WKPCGetWindowNPObject
+__ZN6WebKit27NetscapePluginInstanceProxy17getWindowNPObjectERj
+__ZN6WebKit27NetscapePluginInstanceProxy11idForObjectEPN3JSC8JSObjectE
+__ZNK3WTF9HashTableIjSt4pairIjN3JSC12ProtectedPtrINS2_8JSObjectEEEENS_18PairFirstExtractorIS6_EENS_7IntHashIjEENS_14PairHashTra
+__ZN3WTF7HashMapIjN3JSC12ProtectedPtrINS1_8JSObjectEEENS_7IntHashIjEENS_10HashTraitsIjEENS7_IS4_EEE3setERKjRKS4_
+__ZN3WTF9HashTableIjSt4pairIjN3JSC12ProtectedPtrINS2_8JSObjectEEEENS_18PairFirstExtractorIS6_EENS_7IntHashIjEENS_14PairHashTrai
+__XPCEvaluate
+_WKPCEvaluate
+__ZN6WebKit27NetscapePluginInstanceProxy22willCallPluginFunctionEv
+__ZN6WebKit27NetscapePluginInstanceProxy8evaluateEjRKN7WebCore6StringERPcRj
+__ZNK3JSC21UStringSourceProvider6lengthEv
+__ZNK3JSC21UStringSourceProvider4dataEv
+__ZN6WebKit27NetscapePluginInstanceProxy12marshalValueEPN3JSC9ExecStateENS1_7JSValueERPcRj
+__ZN6WebKit27NetscapePluginInstanceProxy15addValueToArrayEP14NSMutableArrayPN3JSC9ExecStateENS3_7JSValueE
+__WKPHBooleanAndDataReply
+__ZN6WebKit27NetscapePluginInstanceProxy21didCallPluginFunctionEv
+__XPCGetStringIdentifier
+_WKPCGetStringIdentifier
+__XPCInvoke
+_WKPCInvoke
+__ZL27identifierFromIdentifierRepPN7WebCore13IdentifierRepE
+__ZN6WebKit27NetscapePluginInstanceProxy6invokeEjRKN3JSC10IdentifierEPcjRS5_Rj
+__ZNK3WTF7HashMapIjN3JSC12ProtectedPtrINS1_8JSObjectEEENS_7IntHashIjEENS_10HashTraitsIjEENS7_IS4_EEE3getERKj
+__ZN6WebKit27NetscapePluginInstanceProxy15demarshalValuesEPN3JSC9ExecStateEPcjRNS1_20MarkedArgumentBufferE
+__ZN6WebKit27NetscapePluginInstanceProxy23demarshalValueFromArrayEPN3JSC9ExecStateEP7NSArrayRmRNS1_7JSValueE
+__XPCReleaseObject
+_WKPCReleaseObject
+__ZN6WebKit27NetscapePluginInstanceProxy13releaseObjectEj
+__ZN6WebKit26HostedNetscapePluginStreamC1EPNS_27NetscapePluginInstanceProxyEjP12NSURLRequest
+__ZN6WebKit26HostedNetscapePluginStreamC2EPNS_27NetscapePluginInstanceProxyEjP12NSURLRequest
+__ZN3WTF7HashMapIjNS_6RefPtrIN6WebKit26HostedNetscapePluginStreamEEENS_7IntHashIjEENS_10HashTraitsIjEENS7_IS4_EEE3addERKjRKS4_
+__ZN3WTF9HashTableIjSt4pairIjNS_6RefPtrIN6WebKit26HostedNetscapePluginStreamEEEENS_18PairFirstExtractorIS6_EENS_7IntHashIjEENS_
+__ZN6WebKit26HostedNetscapePluginStream5startEv
+-[WebHostedNetscapePluginView createPluginBindingsInstance:]
+__ZN6WebKit27NetscapePluginInstanceProxy22createBindingsInstanceEN3WTF10PassRefPtrIN3JSC8Bindings10RootObjectEEE
+__WKPHGetScriptableNPObject
+__XPCInvalidateRect
+_WKPCInvalidateRect
+__ZN6WebKit27NetscapePluginInstanceProxy14invalidateRectEdddd
+__XPCGetScriptableNPObjectReply
+_WKPCGetScriptableNPObjectReply
+__ZN6WebKit13ProxyInstanceC1EN3WTF10PassRefPtrIN3JSC8Bindings10RootObjectEEEPNS_27NetscapePluginInstanceProxyEj
+__ZN6WebKit13ProxyInstanceC2EN3WTF10PassRefPtrIN3JSC8Bindings10RootObjectEEEPNS_27NetscapePluginInstanceProxyEj
+__ZN6WebKit27NetscapePluginInstanceProxy11addInstanceEPNS_13ProxyInstanceE
+__ZN3WTF7HashSetIPN6WebKit13ProxyInstanceENS_7PtrHashIS3_EENS_10HashTraitsIS3_EEE3addERKS3_
+__ZN3WTF9HashTableIPN6WebKit13ProxyInstanceES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E6expandEv
+__ZN3WTF9HashTableIPN6WebKit13ProxyInstanceES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E6rehashEi
+__ZN3WTF9HashTableIPN6WebKit13ProxyInstanceES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E13allocate
+__ZN6WebKit27NetscapePluginInstanceProxy26GetScriptableNPObjectReplyD0Ev
+__ZN3JSC8Bindings8Instance12virtualBeginEv
+__ZNK6WebKit13ProxyInstance8getClassEv
+__ZN6WebKitL10proxyClassEv
+__ZNK6WebKit10ProxyClass10fieldNamedERKN3JSC10IdentifierEPNS1_8Bindings8InstanceE
+__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:]
+__ZN3WTF6VectorIPN3JSC8Bindings6MethodELm0EE14expandCapacityEmPKS4_
+__ZN3WTF6VectorIPN3JSC8Bindings6MethodELm0EE14expandCapacityEm
+__ZN3WTF6VectorIPN3JSC8Bindings6MethodELm0EE15reserveCapacityEm
+__ZN3WTF6VectorIPN3JSC8Bindings6MethodELm0EE6shrinkEm
+__ZN6WebKit13ProxyInstance12invokeMethodEPN3JSC9ExecStateERKN3WTF6VectorIPNS1_8Bindings6MethodELm0EEERKNS1_7ArgListE
+__ZN6WebKit13ProxyInstance6invokeEPN3JSC9ExecStateE10InvokeTypeyRKNS1_7ArgListE
+__ZN6WebKit27NetscapePluginInstanceProxy13marshalValuesEPN3JSC9ExecStateERKNS1_7ArgListE
+__WKPHNPObjectInvoke
+__XPCBooleanAndDataReply
+_WKPCBooleanAndDataReply
+__ZN6WebKit27NetscapePluginInstanceProxy14demarshalValueEPN3JSC9ExecStateEPKcj
+__ZN6WebKit27NetscapePluginInstanceProxy19BooleanAndDataReplyD0Ev
+-[NSString(WebNSURLExtras) _webkit_stringByReplacingValidPercentEscapes]
+-[WebFrame findFrameNamed:]
+__ZN6WebKit27NetscapePluginInstanceProxy18evaluateJavaScriptEPNS0_13PluginRequestE
+-[WebHostedNetscapePluginView mouseEntered:]
+-[WebView(WebIBActions) stopLoading:]
+__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
+_NPN_UserAgent
__Z21pluginViewForInstanceP4_NPP
+[WebNetscapePluginDocumentView currentPluginView]
-[WebNetscapePluginDocumentView(WebNPPCallbacks) userAgent]
-NPN_GetValue
+_NPN_GetValue
-[WebNetscapePluginDocumentView(WebNPPCallbacks) getVariable:value:]
-NPN_SetValue
+_NPN_SetValue
-[WebNetscapePluginDocumentView(WebNPPCallbacks) setVariable:value:]
+_NPN_InvalidateRect
+-[WebNetscapePluginDocumentView(WebNPPCallbacks) invalidateRect:]
__ZN29WebNetscapePluginEventHandler6createEP29WebNetscapePluginDocumentView
-[WebNetscapePluginDocumentView eventModel]
__ZN35WebNetscapePluginEventHandlerCarbonC1EP29WebNetscapePluginDocumentView
--[WebView addPluginInstanceView:]
--[WebPluginDatabase addPluginInstanceView:]
+__ZN35WebNetscapePluginEventHandlerCarbonC2EP29WebNetscapePluginDocumentView
-[WebNetscapePluginDocumentView updateAndSetWindow]
-[WebNetscapePluginDocumentView saveAndSetNewPortState]
-[WebNetscapePluginDocumentView saveAndSetNewPortStateForUpdate:]
--[WebBaseNetscapePluginView currentWindow]
-[WebNetscapePluginDocumentView superviewsHaveSuperviews]
-__ZN35WebNetscapePluginEventHandlerCarbon14platformWindowEP8NSWindow
--[WebNetscapePluginDocumentView(WebNPPCallbacks) isOpaque]
-__ZN3WTF6VectorI6CGRectLm16EE6resizeEm
-[WebNetscapePluginDocumentView setWindowIfNecessary]
-[WebNetscapePluginDocumentView isNewWindowEqualToOldWindow]
-[WebNetscapePluginDocumentView willCallPlugInFunction]
-[WebNetscapePluginDocumentView didCallPlugInFunction]
-[WebNetscapePluginDocumentView restorePortState:]
--[WebBaseNetscapePluginView addWindowObservers]
--[WebBaseNetscapePluginView sendActivateEvent:]
-[WebNetscapePluginDocumentView windowFocusChanged:]
__ZN35WebNetscapePluginEventHandlerCarbon18windowFocusChangedEb
__ZL14getCarbonEventP11EventRecord
__ZN35WebNetscapePluginEventHandlerCarbon9sendEventEP11EventRecord
-[WebNetscapePluginDocumentView sendEvent:isDrawRect:]
--[WebBaseNetscapePluginView restartTimers]
-[WebNetscapePluginDocumentView stopTimers]
-[WebBaseNetscapePluginView stopTimers]
__ZN35WebNetscapePluginEventHandlerCarbon10stopTimersEv
@@ -1129,31 +1634,27 @@ __ZN35WebNetscapePluginEventHandlerCarbon10stopTimersEv
-[WebBaseNetscapePluginView startTimers]
__ZN35WebNetscapePluginEventHandlerCarbon11startTimersEb
-[WebNetscapePluginDocumentView loadStream]
+-[WebNetscapePluginDocumentView(Internal) _shouldCancelSrcStream]
-[NSURL(WebNSURLExtras) _web_isEmpty]
--[NSMutableURLRequest(WebNSURLRequestExtras) _web_setHTTPReferrer:]
-[WebNetscapePluginDocumentView(WebNPPCallbacks) loadRequest:inTarget:withNotifyData:sendNotification:]
--[NSURL(WebNSURLExtras) _webkit_scriptIfJavaScriptURL]
__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_10HashTraitsIS2_EENSC_IS5_EEEESD_E6expandEv
+__ZN3WTF9HashTableIP9_NPStreamSt4pairIS2_P4_NPPENS_18PairFirstExtractorIS6_EENS_7PtrHashIS2_EENS_14PairHashTraitsINS_10HashTrai
__ZN3WTF7HashSetINS_6RefPtrI23WebNetscapePluginStreamEENS_7PtrHashIS3_EENS_10HashTraitsIS3_EEE3addERKS3_
-__ZN3WTF9HashTableINS_6RefPtrI23WebNetscapePluginStreamEES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E6expandEv
+__ZN3WTF9HashTableINS_6RefPtrI23WebNetscapePluginStreamEES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES
__ZN23WebNetscapePluginStream5startEv
-NPN_InvalidateRect
--[WebNetscapePluginDocumentView(WebNPPCallbacks) invalidateRect:]
+__ZN3WTF6VectorI6CGRectLm16EE6shrinkEm
-[WebNetscapePluginDocumentView drawRect:]
-[WebNetscapePluginDocumentView sendDrawRectEvent:]
-__ZN35WebNetscapePluginEventHandlerCarbon8drawRectERK7_NSRect
-__ZN3WTF6VectorI6CGRectLm16EE6shrinkEm
+__ZN35WebNetscapePluginEventHandlerCarbon8drawRectEP9CGContextRK7_NSRect
__ZN35WebNetscapePluginEventHandlerCarbon19nullEventTimerFiredEP16__CFRunLoopTimerPv
__ZN35WebNetscapePluginEventHandlerCarbon13sendNullEventEv
__ZN23WebNetscapePluginStream18didReceiveResponseEPN7WebCore26NetscapePlugInStreamLoaderERKNS0_16ResourceResponseE
-WKGetNSURLResponseLastModifiedDate
__ZN23WebNetscapePluginStream11startStreamEP5NSURLxP6NSDateP8NSStringP6NSData
--[NSURL(WebNSURLExtras) _web_URLCString]
__ZNK23WebNetscapePluginStream15wantsAllStreamsEv
__ZN23WebNetscapePluginStream14didReceiveDataEPN7WebCore26NetscapePlugInStreamLoaderEPKci
__ZN23WebNetscapePluginStream11deliverDataEv
@@ -1161,153 +1662,41 @@ __ZN23WebNetscapePluginStream16didFinishLoadingEPN7WebCore26NetscapePlugInStream
__ZN23WebNetscapePluginStream23destroyStreamWithReasonEs
__ZN23WebNetscapePluginStream13destroyStreamEv
-[WebNetscapePluginDocumentView disconnectStream:]
-__ZN3WTF9HashTableINS_6RefPtrI23WebNetscapePluginStreamEES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E4findIS3_NS_22IdentityHashTranslatorIS3_S3_S7_EEEENS_17HashTableIteratorIS3_S3_S5_S7_S9_S9_EERKT_
-__ZN3WTF9HashTableIP9_NPStreamSt4pairIS2_P4_NPPENS_18PairFirstExtractorIS6_EENS_7PtrHashIS2_EENS_14PairHashTraitsINS_10HashTraitsIS2_EENSC_IS5_EEEESD_E4findIS2_NS_22IdentityHashTranslatorIS2_S6_SA_EEEENS_17HashTableIteratorIS2_S6_S8_SA_SF_SD_EERKT_
--[WebBaseNetscapePluginView preferencesHaveChanged:]
--[WebBaseNetscapePluginView windowResignedKey:]
-NPN_GetURLNotify
--[WebNetscapePluginDocumentView(WebNPPCallbacks) getURLNotify:target:notifyData:]
--[WebBaseNetscapePluginView requestWithURLCString:]
--[NSString(WebKitExtras) _web_stringByStrippingReturnCharacters]
--[NSURL(WebNSURLExtras) _webkit_URLByRemovingResourceSpecifier]
-NPN_PostURLNotify
+__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]
--[WebNetscapePluginDocumentView createPluginScriptableObject]
-NPN_MemFree
-__ZN15WebChromeClient11scaleFactorEv
--[WebPluginDatabase removePluginInstanceViewsFor:]
--[WebViewFactory imageTitleForFilename:width:height:]
-WKGetMIMETypeForExtension
--[WebView _pluginForExtension:]
--[WebPluginDatabase pluginForExtension:]
--[WebBasePluginPackage extensionEnumerator]
--[WebBasePluginPackage MIMETypeForExtension:]
-__ZN15WebChromeClient15closeWindowSoonEv
--[WebView(WebPrivate) _closeWindow]
--[WebBaseNetscapePluginView windowWillClose:]
--[WebBaseNetscapePluginView stop]
--[WebNetscapePluginDocumentView shouldStop]
--[WebView removePluginInstanceView:]
--[WebPluginDatabase removePluginInstanceView:]
--[WebNetscapePluginDocumentView destroyPlugin]
-__ZN3WTF6VectorINS_6RefPtrI23WebNetscapePluginStreamEELm0EE6resizeEm
--[WebNetscapePluginDocumentView(Internal) _destroyPlugin]
--[WebNetscapePluginPackage close]
-__ZN35WebNetscapePluginEventHandlerCarbonD1Ev
-__ZN20NetscapePluginWidgetD1Ev
--[WebPluginDatabase destroyAllPluginInstanceViews]
--[WebPluginDatabase dealloc]
--[WebNetscapePluginDocumentView dealloc]
--[WebNetscapePluginDocumentView fini]
--[WebBaseNetscapePluginView dealloc]
--[WebNetscapePluginDocumentView .cxx_destruct]
--[WebBaseNetscapePluginView .cxx_destruct]
-__ZN20WebFrameLoaderClient21fileDoesNotExistErrorERKN7WebCore16ResourceResponseE
-+[NSError(WebKitExtras) _webKitErrorWithDomain:code:URL:]
-+[NSError(WebKitExtras) _registerWebKitErrors]
-registerErrors
-+[NSError(WebKitExtras) _webkit_addErrorsWithCodesAndDescriptions:inDomain:]
-__ZN23WebNetscapePluginStream7didFailEPN7WebCore26NetscapePlugInStreamLoaderERKNS0_13ResourceErrorE
-__ZN23WebNetscapePluginStream22destroyStreamWithErrorEP7NSError
-__ZN23WebNetscapePluginStream14reasonForErrorEP7NSError
-__ZN20WebFrameLoaderClient14cancelledErrorERKN7WebCore15ResourceRequestE
-__ZSt25__unguarded_linear_insertIPiiEvT_T0_
--[WebHistoryItem(WebInternal) _mergeAutoCompleteHints:]
--[WebHistoryItem(WebPrivate) URL]
-__ZN20WebFrameLoaderClient27registerForIconNotificationEb
--[WebView(WebViewInternal) _receivedIconChangedNotification:]
--[WebView(WebPendingPublic) canMarkAllTextMatches]
--[WebView(WebPendingPublic) searchFor:direction:caseSensitive:wrap:startInSelection:]
--[WebView(WebFileInternal) _selectedOrMainFrame]
--[WebFrame(WebInternal) _findFrameWithSelection]
--[WebFrame(WebInternal) _hasSelection]
--[WebHTMLView(WebDocumentPrivateProtocols) searchFor:direction:caseSensitive:wrap:startInSelection:]
--[WebFrameView(WebPrivate) _contentView]
--[WebView(WebPendingPublic) rectsForTextMatches]
--[WebHTMLView(WebDocumentInternalProtocols) rectsForTextMatches]
-__ZN3WTF6VectorIN7WebCore7IntRectELm0EE6shrinkEm
--[WebHTMLView(WebDocumentPrivateProtocols) selectionRect]
--[WebHTMLView(WebPrivate) _hasSelection]
--[WebHTMLView(WebDocumentPrivateProtocols) selectionTextRects]
-__ZN3WTF6VectorIN7WebCore9FloatRectELm0EE6shrinkEm
--[WebHTMLView(WebDocumentPrivateProtocols) selectionImageForcingBlackText:]
--[WebHTMLView(WebDocumentPrivateProtocols) selectedString]
--[WebFrame(WebInternal) _selectedString]
--[WebHTMLView(WebPrivate) view:stringForToolTip:point:userData:]
--[WebHTMLView scrollWheel:]
-WKGetWheelEventDeltas
--[WebClipView scrollWheel:]
--[WebDynamicScrollBarsView(WebInternal) scrollWheel:]
--[WebDynamicScrollBarsView(WebInternal) allowsVerticalScrolling]
--[WebDynamicScrollBarsView(WebInternal) autoforwardsScrollWheelEvents]
--[WebDynamicScrollBarsView(WebInternal) allowsHorizontalScrolling]
--[WebView(WebIBActions) goBack:]
--[WebView goBack]
-__ZNK20WebFrameLoaderClient21shouldGoToHistoryItemEPN7WebCore11HistoryItemE
-__ZN20WebFrameLoaderClient16restoreViewStateEv
-__ZN15WebChromeClient13willPopUpMenuEP6NSMenu
-WKPopupMenu
--[WebHTMLView _accessibilityParentForSubview:]
--[WebDynamicScrollBarsView(WebInternal) accessibilityIsIgnored]
--[WebClipView _focusRingVisibleRect]
-__ZL10pluginViewP8WebFrameP16WebPluginPackageP7NSArrayS4_P5NSURLP10DOMElementa
--[WebPluginPackage viewFactory]
-+[WebPluginController plugInViewWithArguments:fromPluginPackage:]
--[WebPluginController webFrame]
--[WebView(WebPrivate) defersCallbacks]
--[WebPluginController addPlugin:]
-+[NSObject(WebScripting) isKeyExcludedFromWebScript:]
-+[NSObject(WebScripting) isSelectorExcludedFromWebScript:]
-__ZN20WebFrameLoaderClient35dispatchDidChangeLocationWithinPageEv
-__ZN20WebFrameLoaderClient13didFinishLoadEv
-__ZN7WebCore6Widget11handleEventEPNS_5EventE
--[WebView hostWindow]
--[WebView acceptsFirstResponder]
--[WebFrameView acceptsFirstResponder]
--[WebView becomeFirstResponder]
-__ZL14parameterValueRKN3WTF6VectorIN7WebCore6StringELm0EEES5_RKS2_
--[NSError(WebKitExtras) _initWithPluginErrorCode:contentURL:pluginPageURL:pluginName:MIMEType:]
--[WebNullPluginView initWithFrame:error:DOMElement:]
--[WebNullPluginView viewDidMoveToWindow]
--[WebNullPluginView reportFailure]
--[NSURL(WebNSURLExtras) _web_URLWithLowercasedScheme]
--[WebFramePolicyListener ignore]
-__ZN20WebFrameLoaderClient36transitionToCommittedFromCachedFrameEPN7WebCore11CachedFrameE
-__ZN20WebFrameLoaderClient11forceLayoutEv
--[WebHTMLView setNeedsToApplyStyles:]
--[WebNullPluginView dealloc]
-__ZN15WebChromeClient5focusEv
--[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:decideDestinationWithSuggestedFilename:]
--[NSFileManager(WebNSFileManagerExtras) _webkit_setMetadataURL:referrer:atPath:]
-WKSetMetadataURL
--[WebDownloadInternal download:didCreateDestination:]
--[WebDownloadInternal download:didReceiveDataOfLength:]
-+[WebStringTruncator widthOfString:font:]
--[WebDownloadInternal downloadDidFinish:]
--[WebDownload dealloc]
--[WebDownloadInternal dealloc]
--[WebHTMLRepresentation elementWithName:inForm:]
--[WebViewFactory accessibilityHandleFocusChanged]
-WKAccessibilityHandleFocusChanged
--[WebHTMLView(WebNSTextInputSupport) hasMarkedText]
--[WebHTMLView(WebNSTextInputSupport) insertText:]
-__ZN20NetscapePluginWidget11handleEventEPN7WebCore5EventE
+_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]
@@ -1317,83 +1706,46 @@ __ZN35WebNetscapePluginEventHandlerCarbon12focusChangedEb
__ZN35WebNetscapePluginEventHandlerCarbon22installKeyEventHandlerEv
-[WebNetscapePluginDocumentView mouseDown:]
__ZN35WebNetscapePluginEventHandlerCarbon9mouseDownEP7NSEvent
-__ZL14getCarbonEventP11EventRecordP7NSEvent
-WKConvertNSEventToCarbonEvent
-[WebNetscapePluginDocumentView inputContext]
--[WebNetscapePluginDocumentView mouseDragged:]
-__ZN35WebNetscapePluginEventHandlerCarbon12mouseDraggedEP7NSEvent
-[WebNetscapePluginDocumentView mouseUp:]
__ZN35WebNetscapePluginEventHandlerCarbon7mouseUpEP7NSEvent
--[WebNetscapePluginDocumentView scrollWheel:]
-__ZN35WebNetscapePluginEventHandlerCarbon11scrollWheelEP7NSEvent
-[WebNetscapePluginDocumentView mouseExited:]
__ZN35WebNetscapePluginEventHandlerCarbon11mouseExitedEP7NSEvent
--[WebBaseNetscapePluginView resignFirstResponder]
-__ZN35WebNetscapePluginEventHandlerCarbon21removeKeyEventHandlerEv
--[WebNetscapePluginDocumentView mouseEntered:]
-__ZN35WebNetscapePluginEventHandlerCarbon12mouseEnteredEP7NSEvent
-__ZN15WebEditorClient17shouldDeleteRangeEPN7WebCore5RangeE
--[WebDefaultEditingDelegate webView:shouldDeleteDOMRange:]
-__ZN15WebEditorClient28textWillBeDeletedInTextFieldEPN7WebCore7ElementE
-WKSetPatternPhaseInUserSpace
-NPN_GetURL
--[WebNetscapePluginDocumentView(WebNPPCallbacks) getURL:target:]
--[WebPluginRequest initWithRequest:frameName:notifyData:sendNotification:didStartFromUserGesture:]
--[WebNetscapePluginDocumentView(WebNPPCallbacks) loadPluginRequest:]
--[WebPluginRequest request]
--[WebPluginRequest frameName]
--[WebPluginRequest sendNotification]
--[WebPluginRequest dealloc]
--[WebNetscapePluginDocumentView flagsChanged:]
-__ZN35WebNetscapePluginEventHandlerCarbon12flagsChangedEP7NSEvent
+-[WebNetscapePluginDocumentView mouseDragged:]
+__ZN35WebNetscapePluginEventHandlerCarbon12mouseDraggedEP7NSEvent
-[WebNetscapePluginDocumentView keyDown:]
__ZN35WebNetscapePluginEventHandlerCarbon7keyDownEP7NSEvent
-WKSendKeyEventToTSM
+_WKSendKeyEventToTSM
__ZN35WebNetscapePluginEventHandlerCarbon15TSMEventHandlerEP25OpaqueEventHandlerCallRefP14OpaqueEventRefPv
-[WebNetscapePluginDocumentView keyUp:]
__ZN35WebNetscapePluginEventHandlerCarbon5keyUpEP7NSEvent
-__ZN3WTF6VectorINS_6RefPtrI23WebNetscapePluginStreamEELm0EE14expandCapacityEm
-__ZN3WTF6VectorINS_6RefPtrI23WebNetscapePluginStreamEELm0EE15reserveCapacityEm
-__ZN23WebNetscapePluginStream4stopEv
-__ZN23WebNetscapePluginStream35cancelLoadAndDestroyStreamWithErrorEP7NSError
-__ZN23WebNetscapePluginStream19cancelLoadWithErrorEP7NSError
-__ZN3WTF6VectorINS_6RefPtrI23WebNetscapePluginStreamEELm0EE6shrinkEm
--[WebBaseNetscapePluginView windowBecameKey:]
-__ZN15WebEditorClient23textDidChangeInTextAreaEPN7WebCore7ElementE
-__ZN15WebChromeClient14keyboardUIModeEv
--[WebView(WebViewInternal) _keyboardUIMode]
--[WebView(WebViewInternal) _retrieveKeyboardUIModeFromPreferences:]
--[WebPreferences tabsToLinks]
-__ZNK15WebChromeClient11tabsToLinksEv
--[NSString(WebNSURLExtras) _webkit_stringByReplacingValidPercentEscapes]
--[WebFrame findFrameNamed:]
--[WebNetscapePluginDocumentView(WebNPPCallbacks) evaluateJavaScriptPluginRequest:]
--[WebPluginRequest isCurrentEventUserGesture]
-__ZN15WebChromeClient16statusbarVisibleEv
-__Z30CallUIDelegateReturningBooleanaP7WebViewP13objc_selector
-__ZL28CallDelegateReturningBooleanaP7WebViewP11objc_objectP13objc_selector
--[WebFrame(WebPrivate) _isDescendantOfFrame:]
-__ZN15WebEditorClient18shouldBeginEditingEPN7WebCore5RangeE
--[WebDefaultEditingDelegate webView:shouldBeginEditingInDOMRange:]
-__ZN15WebEditorClient15didBeginEditingEv
-__ZN15WebEditorClient16shouldEndEditingEPN7WebCore5RangeE
--[WebDefaultEditingDelegate webView:shouldEndEditingInDOMRange:]
-__ZN15WebEditorClient13didEndEditingEv
-__ZN15WebEditorClient25shouldShowDeleteInterfaceEPN7WebCore11HTMLElementE
--[WebDefaultEditingDelegate webView:shouldShowDeleteInterfaceForElement:]
-__ZN15WebChromeClient20runJavaScriptConfirmEPN7WebCore5FrameERKNS0_6StringE
-__Z30CallUIDelegateReturningBooleanaP7WebViewP13objc_selectorP11objc_objectS4_
-__ZL28CallDelegateReturningBooleanaP7WebViewP11objc_objectP13objc_selectorS2_S2_
-__ZN20WebFrameLoaderClient38dispatchDecidePolicyForNewWindowActionEMN7WebCore11FrameLoaderEFvNS0_12PolicyActionEERKNS0_16NavigationActionERKNS0_15ResourceRequestEN3WTF10PassRefPtrINS0_9FormStateEEERKNS0_6StringE
-__ZN20WebFrameLoaderClient18dispatchCreatePageEv
-__ZN20WebFrameLoaderClient12dispatchShowEv
-WKGetFontInLanguageForCharacter
+-[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
__ZN13WebDragClient24declareAndWriteDragImageEP12NSPasteboardP10DOMElementP5NSURLP8NSStringPN7WebCore5FrameE
__ZL14getTopHTMLViewPN7WebCore5FrameE
--[DOMNode(WebDOMNodeOperations) webArchive]
--[WebArchive(WebInternal) _initWithCoreLegacyWebArchive:]
-+[WebArchivePrivate initialize]
--[WebArchivePrivate initWithCoreArchive:]
-[NSPasteboard(WebExtras) _web_declareAndWriteDragImageForElement:URL:title:archive:source:]
+[NSPasteboard(WebExtras) _web_writableTypesForImageIncludingArchive:]
__ZL33_writableTypesForImageWithArchivev
@@ -1407,114 +1759,345 @@ __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:]
--[WebView _hitTest:dragTypes:]
--[WebView draggingEntered:]
--[WebView documentViewAtWindowPoint:]
--[WebView(WebFileInternal) _frameViewAtWindowPoint:]
-__ZN13WebDragClient17actionMaskForDragEPN7WebCore8DragDataE
--[WebDefaultUIDelegate webView:dragDestinationActionMaskForDraggingInfo:]
-__ZNK19WebPasteboardHelper25insertablePasteboardTypesEv
--[WebView draggingUpdated:]
--[WebView _shouldAutoscrollForDraggingInfo:]
-[WebHTMLView draggedImage:movedTo:]
-[WebFrame(WebInternal) _dragSourceMovedTo:]
-[WebView draggingExited:]
-[WebHTMLView draggedImage:endedAt:operation:]
-[WebFrame(WebInternal) _dragSourceEndedAt:operation:]
--[WebArchive dealloc]
--[WebArchivePrivate dealloc]
-__ZN3WTF6VectorINS_6RefPtrIN7WebCore15ArchiveResourceEEELm0EE6shrinkEm
--[WebHTMLView(WebPrivate) pasteboardChangedOwner:]
-__ZN20WebFrameLoaderClient22createJavaAppletWidgetERKN7WebCore7IntSizeEPNS0_7ElementERKNS0_4KURLERKN3WTF6VectorINS0_6StringELm0EEESE_
-__ZN20WebFrameLoaderClient10javaAppletEP6NSView
--[WebPluginController webPlugInContainerShowStatus:]
-__ZN3WTF6VectorI6CGRectLm16EE14expandCapacityEm
-__ZN3WTF6VectorI6CGRectLm16EE15reserveCapacityEm
--[WebIconDatabase iconURLForURL:]
--[WebHistoryItem(WebPrivate) RSSFeedReferrer]
-__ZN15WebChromeClient7unfocusEv
--[WebDefaultUIDelegate webViewUnfocus:]
-__ZN15WebChromeClient11canRunModalEv
--[WebViewFactory refreshPlugins]
-__ZNK19WebPasteboardHelper17urlFromPasteboardEPK12NSPasteboardPN7WebCore6StringE
--[NSPasteboard(WebExtras) _web_bestURL]
--[WebView windowScriptObject]
--[WebView(WebIBActions) reload:]
--[WebFrame reload]
--[WebFramePolicyListener invalidate]
-NPN_PushPopupsEnabledState
-NPN_PopPopupsEnabledState
--[WebView(WebIBActions) goForward:]
--[WebView goForward]
-__ZNK23WebNetscapePluginStream30pluginCancelledConnectionErrorEv
--[WebBaseNetscapePluginView windowDidMiniaturize:]
--[WebBaseNetscapePluginView windowDidDeminiaturize:]
+-[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
+-[WebView _pluginForExtension:]
+-[WebPluginDatabase pluginForExtension:]
+-[WebBasePluginPackage extensionEnumerator]
+-[WebBasePluginPackage MIMETypeForExtension:]
+__ZN34WebNetscapePluginEventHandlerCocoa10mouseMovedEP7NSEvent
+__ZN34WebNetscapePluginEventHandlerCocoa14sendMouseEventEP7NSEvent16NPCocoaEventType
+__ZN34WebNetscapePluginEventHandlerCocoa11mouseExitedEP7NSEvent
+__ZN15WebChromeClient12createWindowEPN7WebCore5FrameERKNS0_16FrameLoadRequestERKNS0_14WindowFeaturesE
+__Z14CallUIDelegateP7WebViewP13objc_selectorP11objc_objectS4_
+__ZL12CallDelegateP7WebViewP11objc_objectP13objc_selectorS2_S2_
+__ZN15WebChromeClient18setToolbarsVisibleEb
+__ZN15WebChromeClient19setStatusbarVisibleEb
+__ZN15WebChromeClient20setScrollbarsVisibleEb
+__ZN15WebChromeClient17setMenubarVisibleEb
+__ZN15WebChromeClient12setResizableEb
+__ZN15WebChromeClient8pageRectEv
+__ZN15WebChromeClient13setWindowRectERKN7WebCore9FloatRectE
+__ZN15WebChromeClient4showEv
+__ZN34WebNetscapePluginEventHandlerCocoa12mouseEnteredEP7NSEvent
+__ZN34WebNetscapePluginEventHandlerCocoa12focusChangedEb
+__ZN34WebNetscapePluginEventHandlerCocoa22installKeyEventHandlerEv
+__ZN34WebNetscapePluginEventHandlerCocoa9mouseDownEP7NSEvent
+__ZN34WebNetscapePluginEventHandlerCocoa12mouseDraggedEP7NSEvent
+__ZN34WebNetscapePluginEventHandlerCocoa7mouseUpEP7NSEvent
+-[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:]
--[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:]
--[WebResource dealloc]
--[WebResourcePrivate dealloc]
--[NSView(WebExtras) _web_parentWebFrameView]
--[WebView(WebPrivate) _loadBackForwardListFromOtherView:]
-__ZL8hexDigiti
-__ZN15WebChromeClient18runJavaScriptAlertEPN7WebCore5FrameERKNS0_6StringE
+__ZN15WebChromeClient16statusbarVisibleEv
+__Z30CallUIDelegateReturningBooleanaP7WebViewP13objc_selector
-[WebIconDatabase releaseIconForURL:]
--[NSView(WebExtras) _web_dragOperationForDraggingInfo:]
--[WebElementDictionary _image]
+-[WebPreferences setSerifFontFamily:]
+-[WebPreferences setSansSerifFontFamily:]
+-[WebPreferences setCursiveFontFamily:]
+-[WebPreferences setFantasyFontFamily:]
+-[WebPreferences setTabsToLinks:]
+-[WebPreferences setUsesPageCache:]
++[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:]
+-[WebView(WebPrivate) drawRect:]
+-[WebView(WebIBActions) makeTextStandardSize:]
+-[WebView _resetZoom:isTextOnly:]
+-[WebView(WebPendingPublic) resetPageZoom:]
+-[WebView(WebPrivate) _setDashboardBehavior:to:]
+-[WebView(WebPrivate) _clearMainFrameName]
+-[WebPreferences(WebPrivate) setAuthorAndUserStylesEnabled:]
+-[WebPreferences(WebPrivate) setOfflineWebApplicationCacheEnabled:]
+-[WebPreferences(WebPrivate) setDeveloperExtrasEnabled:]
+-[WebView(WebViewEditing) setSmartInsertDeleteEnabled:]
+-[WebView(WebPrivate) setSelectTrailingWhitespaceEnabled:]
+-[WebView(WebPrivate) inspector]
+-[WebInspector initWithWebView:]
+-[WebInspector setJavaScriptProfilingEnabled:]
++[WebView(WebPrivate) _setUsesTestModeFocusRingColor:]
+-[WebDefaultPolicyDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:]
+-[WebDefaultPolicyDelegate webView:decidePolicyForMIMEType:request:frame:decisionListener:]
+-[WebFrame windowObject]
+-[WebFrame globalContext]
+-[WebHTMLView accessibilityFocusedUIElement]
+-[WebFrame(WebInternal) _accessibilityTree]
+-[WebFrame(WebPrivate) _pendingFrameUnloadEventCount]
+-[NSView(WebExtras) _web_parentWebFrameView]
-[WebHistoryItem hash]
+-[WebClipView _focusRingVisibleRect]
++[WebView(WebPrivate) _pointingHandCursor]
-[NSEvent(WebExtras) _web_isDeleteKeyEvent]
--[NSEvent(WebExtras) _web_isKeyEvent:]
--[WebFrameView keyDown:]
--[WebFrameView(WebFrameViewFileInternal) _web_frame]
-[WebFrameView allowsScrolling]
-[WebFrameView _scrollLineHorizontally:]
-[WebFrameView _scrollOverflowInDirection:granularity:]
-[WebFrameView(WebPrivate) _hasScrollBars]
-[WebFrameView(WebPrivate) _largestChildWithScrollBars]
--[WebDataSource(WebPrivate) _mainDocumentError]
--[WebBackForwardList backListWithLimit:]
-__ZL15vectorToNSArrayRN3WTF6VectorINS_6RefPtrIN7WebCore11HistoryItemEEELm0EEE
-__ZN3WTF6VectorINS_6RefPtrIN7WebCore11HistoryItemEEELm0EE6shrinkEm
--[WebHistoryItem(WebPrivate) targetItem]
--[WebHistoryItem icon]
--[WebView goToBackForwardItem:]
+-[WebHostedNetscapePluginView mouseDown:]
+-[WebHostedNetscapePluginView mouseDragged:]
+-[WebHostedNetscapePluginView mouseUp:]
+-[WebHostedNetscapePluginView scrollWheel:]
+-[WebViewFactory unregisterUniqueIdForUIElement:]
+_WKUnregisterUniqueIdForElement
+-[WebViewFactory accessibilityHandleFocusChanged]
+_WKAccessibilityHandleFocusChanged
+-[WebViewFactory textMarkerWithBytes:length:]
+_WKCreateAXTextMarker
+-[WebViewFactory objectIsTextMarker:]
+_WKGetAXTextMarkerTypeID
+-[WebViewFactory objectIsTextMarkerRange:]
+_WKGetAXTextMarkerRangeTypeID
+-[WebHTMLView accessibilityAttributeValue:]
+-[WebHTMLView _accessibilityParentForSubview:]
+-[WebViewFactory AXWebAreaText]
+-[WebViewFactory AXLinkText]
+-[WebViewFactory AXHeadingText]
+-[WebViewFactory AXDefinitionListTermText]
+-[WebViewFactory AXDefinitionListDefinitionText]
-[WebViewFactory fileButtonChooseFileLabel]
-+[WebCache empty]
--[WebBackForwardList pageCacheSize]
--[WebBackForwardList setPageCacheSize:]
--[WebView(WebPrivate) setUsesPageCache:]
--[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]
--[NSFileManager(WebNSFileManagerExtras) _webkit_pathWithUniqueFilenameForPath:]
--[NSString(WebKitExtras) _webkit_filenameByFixingIllegalCharacters]
--[WebView _autoscrollForDraggingInfo:timeDelta:]
-WKSetPatternBaseCTM
--[WebView prepareForDragOperation:]
--[WebView performDragOperation:]
-__ZN13WebDragClient32willPerformDragDestinationActionEN7WebCore21DragDestinationActionEPNS0_8DragDataE
--[WebDefaultUIDelegate webView:willPerformDragDestinationAction:forDraggingInfo:]
--[NSEvent(WebExtras) _web_isReturnOrEnterKeyEvent]
--[WebHTMLRepresentation receivedError:withDataSource:]
+-[WebViewFactory fileButtonNoFileSelectedLabel]
+-[WebViewFactory textMarkerRangeWithStart:end:]
+_WKCreateAXTextMarkerRange
+-[WebFrame(WebPrivate) _numberOfActiveAnimations]
+-[WebFrame(WebPrivate) _pauseAnimation:onNode:atTime:]
+-[WebFrame(WebKitDebug) renderTreeAsExternalRepresentation]
++[WebCoreStatistics garbageCollectJavaScriptObjects]
+-[WebNullPluginView initWithFrame:error:DOMElement:]
+-[WebNullPluginView viewDidMoveToWindow]
+-[WebNullPluginView reportFailure]
+-[WebNullPluginView dealloc]
+-[WebInspector webViewClosed]
+-[WebView(WebDebugBinding) removeObserver:forKeyPath:]
++[WebCoreStatistics emptyCache]
++[NSObject(WebScripting) isKeyExcludedFromWebScript:]
+-[WebIconDatabase iconURLForURL:]
+__ZN15WebChromeClient7repaintERKN7WebCore7IntRectEbbb
+-[WebHistoryItem(WebPrivate) RSSFeedReferrer]
+-[WebViewFactory refreshPlugins]
+-[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:]
+__ZN15WebEditorClient25shouldShowDeleteInterfaceEPN7WebCore11HTMLElementE
+__ZN15WebEditorClient16shouldEndEditingEPN7WebCore5RangeE
+-[WebView(WebPrivate) _executeCoreCommandByName:value:]
+__ZN15WebChromeClient18runJavaScriptAlertEPN7WebCore5FrameERKNS0_6StringE
+__ZNK15WebEditorClient7canUndoEv
+__ZN15WebEditorClient4undoEv
+-[WebEditorUndoTarget undoEditing:]
+-[WebEditCommand command]
+__ZN15WebEditorClient22registerCommandForRedoEN3WTF10PassRefPtrIN7WebCore11EditCommandEEE
+__ZN15WebEditorClient23textDidChangeInTextAreaEPN7WebCore7ElementE
+__ZN15WebChromeClient7unfocusEv
+-[WebDefaultUIDelegate webViewUnfocus:]
+__ZN15WebEditorClient33didSetSelectionTypesForPasteboardEv
+-[WebDefaultEditingDelegate webView:didSetSelectionTypesForPasteboard:]
+__ZN15WebEditorClient29didWriteSelectionToPasteboardEv
+-[WebDefaultEditingDelegate webView:didWriteSelectionToPasteboard:]
+-[WebHTMLView(WebInternal) paste:]
+-[WebHTMLView callDelegateDoCommandBySelectorIfNeeded:]
+-[WebHTMLView(WebHTMLViewFileInternal) _pasteWithPasteboard:allowPlainText:]
+-[WebView(WebViewInternal) _setInsertionPasteboard:]
+-[WebHTMLView(WebHTMLViewFileInternal) _documentFragmentFromPasteboard:inContext:allowPlainText:]
+-[WebHTMLView(WebPrivate) _documentFragmentFromPasteboard:forType:inContext:subresources:]
+-[WebHTMLView(WebHTMLViewFileInternal) _dataSource]
+-[WebDataSource(WebInternal) _documentFragmentWithArchive:]
+-[WebArchive(WebInternal) _coreLegacyWebArchive]
+-[WebFrame(WebInternal) _documentFragmentWithMarkupString:baseURLString:]
+-[WebHTMLView(WebHTMLViewFileInternal) _shouldInsertFragment:replacingDOMRange:givenAction:]
+-[WebHTMLView(WebPrivate) _canSmartReplaceWithPasteboard:]
+-[WebFrame(WebPrivate) _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]
+-[WebView(WebIBActions) _responderValidateUserInterfaceItem:]
+-[WebView(WebFileInternal) _responderForResponderOperations]
+-[NSView(WebExtras) _web_firstResponderIsSelfOrDescendantView]
+__ZN15WebChromeClient5printEPN7WebCore5FrameE
+__ZNK15WebEditorClient7canRedoEv
+__ZN15WebEditorClient4redoEv
+-[WebEditorUndoTarget redoEditing:]
+-[DOMDocument(WebDOMDocumentOperations) URLWithAttributeString:]
+-[WebView(WebPrivate) _catchesDelegateExceptions]
+__ZNK19WebPasteboardHelper22fragmentFromPasteboardEPK12NSPasteboard
+-[WebHTMLView(WebInternal) _documentFragmentFromPasteboard:]
+__ZN15WebEditorClient16shouldInsertNodeEPN7WebCore4NodeEPNS0_5RangeENS0_18EditorInsertActionE
+__ZN15WebEditorClient17userVisibleStringEP5NSURL
+_WKGetExtensionsForMIMEType
+-[WebHTMLView(WebPrivate) _hasHTMLDocument]
++[WebHTMLView(WebHTMLViewFileInternal) _excludedElementsForAttributedStringConversion]
++[NSURL(WebDataURL) _web_uniqueWebDataURL]
+-[WebResource initWithData:URL:MIMEType:textEncodingName:frameName:]
+-[WebResource(WebResourcePrivate) _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]
+__ZN7WebCore20ResourceResponseBaseD2Ev
+-[WebDataSource addSubresource:]
+-[WebResource(WebResourceInternal) _coreResource]
+__ZN13WebDragClient22createDragImageForLinkERN7WebCore4KURLERKNS0_6StringEPNS0_5FrameE
+-[WebHTMLView(WebPrivate) _dragImageForURL:withLabel:]
+__ZNK19WebPasteboardHelper23plainTextFromPasteboardEPK12NSPasteboard
+__ZL25uniqueURLWithRelativePartP8NSString
+-[WebDataSource(WebInternal) _documentFragmentWithImageResource:]
+-[WebDataSource(WebInternal) _imageElementWithImageResource:]
+-[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 contextMenuItemTagSpellingMenu]
+-[WebViewFactory contextMenuItemTagShowSpellingPanel:]
+-[WebViewFactory contextMenuItemTagCheckSpelling]
+-[WebViewFactory contextMenuItemTagCheckSpellingWhileTyping]
+-[WebViewFactory contextMenuItemTagCheckGrammarWithSpelling]
+-[WebViewFactory contextMenuItemTagCorrectSpellingAutomatically]
+__ZN15WebEditorClient19spellingUIIsShowingEv
+-[WebViewFactory contextMenuItemTagSubstitutionsMenu]
+-[WebViewFactory contextMenuItemTagShowSubstitutions:]
+-[WebViewFactory contextMenuItemTagSmartCopyPaste]
+-[WebViewFactory contextMenuItemTagSmartQuotes]
+-[WebViewFactory contextMenuItemTagSmartDashes]
+-[WebViewFactory contextMenuItemTagSmartLinks]
+-[WebViewFactory contextMenuItemTagTextReplacement]
+__ZN15WebEditorClient27substitutionsPanelIsShowingEv
+-[WebViewFactory contextMenuItemTagTransformationsMenu]
+-[WebViewFactory contextMenuItemTagMakeUpperCase]
+-[WebViewFactory contextMenuItemTagMakeLowerCase]
+-[WebViewFactory contextMenuItemTagCapitalize]
+-[WebViewFactory contextMenuItemTagFontMenu]
+-[WebViewFactory contextMenuItemTagShowFonts]
+-[WebViewFactory contextMenuItemTagBold]
+-[WebViewFactory contextMenuItemTagItalic]
+-[WebViewFactory contextMenuItemTagUnderline]
+-[WebViewFactory contextMenuItemTagOutline]
+-[WebViewFactory contextMenuItemTagStyles]
+-[WebViewFactory contextMenuItemTagShowColors]
+-[WebViewFactory contextMenuItemTagSpeechMenu]
+-[WebViewFactory contextMenuItemTagStartSpeaking]
+-[WebViewFactory contextMenuItemTagStopSpeaking]
+-[WebViewFactory contextMenuItemTagWritingDirectionMenu]
+-[WebViewFactory contextMenuItemTagDefaultDirection]
+-[WebViewFactory contextMenuItemTagLeftToRight]
+-[WebViewFactory contextMenuItemTagRightToLeft]
+-[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:]
+-[WebDefaultPolicyDelegate webView:shouldGoToHistoryItem:]
+-[WebView(WebPendingPublic) zoomPageIn:]
+-[WebView(WebPendingPublic) zoomPageOut:]
+-[WebView _zoomOut:isTextOnly:]
-[WebPDFRepresentation setDataSource:]
-[WebPDFView initWithFrame:]
+[WebPDFView(FileInternal) _PDFPreviewViewClass]
@@ -1529,12 +2112,10 @@ __ZN13WebDragClient32willPerformDragDestinationActionEN7WebCore21DragDestination
-[WebPDFView setDataSource:]
-[WebPDFView setNeedsLayout:]
-[WebPDFView layout]
--[WebPDFRepresentation title]
-[WebPDFView acceptsFirstResponder]
--[WebFrame(WebInternal) _clearSelectionInOtherFrames]
--[WebPDFView selectedString]
-[WebPDFRepresentation receivedData:withDataSource:]
-[WebPDFView dataSourceUpdated:]
+-[WebPDFRepresentation title]
-[WebPDFRepresentation finishedLoadingWithDataSource:]
-[WebDataSource data]
+[WebPDFRepresentation PDFDocumentClass]
@@ -1544,18 +2125,245 @@ __ZN13WebDragClient32willPerformDragDestinationActionEN7WebCore21DragDestination
-[WebPreferences(WebPrivate) PDFScaleFactor]
-[WebPreferences _floatValueForKey:]
-[WebPreferences(WebPrivate) PDFDisplayMode]
--[WebPDFView string]
-[WebPDFView selectionView]
--[WebPDFView hitTest:]
-+[WebURLsWithTitles URLsFromPasteboard:]
-+[WebView(WebPrivate) canShowFile:]
-+[WebView(WebPrivate) _MIMETypeForFile:]
+-[WebPDFView string]
+-[WebPDFView dealloc]
++[WebCoreStatistics javaScriptObjectsCount]
+-[WebBackForwardList capacity]
+-[WebBackForwardList addItem:]
+-[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:]
+-[WebKeyGenerator strengthMenuItemTitles]
+-[WebViewFactory resetButtonDefaultLabel]
+__ZL19isPreVersion3Clientv
+__ZL26fixMenusToSendToOldClientsP14NSMutableArray
+__ZL28isPreInspectElementTagClientv
+__ZN15WebChromeClient20runJavaScriptConfirmEPN7WebCore5FrameERKNS0_6StringE
+__Z30CallUIDelegateReturningBooleanaP7WebViewP13objc_selectorP11objc_objectS4_
+__ZN15WebChromeClient19runJavaScriptPromptEPN7WebCore5FrameERKNS0_6StringES5_RS3_
+__Z14CallUIDelegateP7WebViewP13objc_selectorP11objc_objectS4_S4_
+__ZN15WebChromeClient17scrollbarsVisibleEv
+__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:]
+-[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
+-[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:]
+__ZN3WTF6VectorIN7WebCore20CompositionUnderlineELm0EE14expandCapacityEmPKS2_
+__ZN3WTF6VectorIN7WebCore20CompositionUnderlineELm0EE14expandCapacityEm
+__ZN3WTF6VectorIN7WebCore20CompositionUnderlineELm0EE15reserveCapacityEm
+__ZN3WTF6VectorIN7WebCore20CompositionUnderlineELm0EE6shrinkEm
+-[WebFrame(WebPrivate) _selectNSRange:]
+-[WebHTMLView(WebNSTextInputSupport) attributedSubstringFromRange:]
+-[WebHTMLView(WebNSTextInputSupport) markedRange]
+-[WebHTMLView(WebNSTextInputSupport) unmarkText]
+-[WebHTMLView(WebNSTextInputSupport) characterIndexForPoint:]
+-[WebFrame(WebInternal) _characterRangeAtPoint:]
+-[WebFrame(WebInternal) _visiblePositionForPoint:]
+-[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
+__ZN3WTF9HashTableIPN3JSC8JSObjectES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E6rehashEi
+__ZN3WTF9HashTableIPN3JSC8JSObjectES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E13allocateTableEi
+__ZN3WTF9HashTableIPN3JSC8JSObjectES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E15deallocateTableEP
+__ZN3WTF9HashTableIPN3JSC8JSObjectES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E4findIS3_NS_22Ident
+__ZN3WTF9HashTableIPN3JSC8JSObjectES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E47removeAndInvalida
+__ZN3WTF9HashTableIPN3JSC8JSObjectES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E6removeEPS3_
+-[WebFrame(WebInternal) _convertDOMRangeToNSRange:]
+__ZNK6WebKit13ProxyInstance27supportsInvokeDefaultMethodEv
+__WKPHNPObjectHasInvokeDefaultMethod
+__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
+__XPCEnumerate
+_WKPCEnumerate
+__ZN6WebKit27NetscapePluginInstanceProxy9enumerateEjRPcRj
+__ZN3WTF9HashTableIPN3JSC7UString3RepES4_NS_17IdentityExtractorIS4_EENS_7PtrHashIS4_EENS_10HashTraitsIS4_EESA_E15deallocateTabl
+__ZN6WebKit13ProxyInstance16getPropertyNamesEPN3JSC9ExecStateERNS1_17PropertyNameArrayE
+__WKPHNPObjectEnumerate
+__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]
+-[WebDatabaseManager deleteAllDatabases]
+-[WebSecurityOrigin initWithURL:]
+-[WebSecurityOrigin port]
+-[WebSecurityOrigin host]
+-[WebSecurityOrigin protocol]
+-[WebFrame(WebPrivate) _pauseTransitionOfProperty:onNode:atTime:]
+__ZN3WTF6VectorINS_6RefPtrIN7WebCore7ArchiveEEELm0EE6shrinkEm
+-[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]
+-[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]
-__ZN13WebDragClient22createDragImageForLinkERN7WebCore4KURLERKNS0_6StringEPNS0_5FrameE
--[WebHTMLView(WebPrivate) _dragImageForURL:withLabel:]
--[NSString(WebKitExtras) _web_drawDoubledAtPoint:withTopColor:bottomColor:font:]
-+[WebURLsWithTitles titlesFromPasteboard:]
+-[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]
++[WebCoreStatistics statistics]
++[WebCache statistics]
++[WebCoreStatistics javaScriptGlobalObjectsCount]
++[WebCoreStatistics javaScriptProtectedObjectsCount]
++[WebCoreStatistics javaScriptProtectedObjectTypeCounts]
+__ZN3WTF9HashTableIPKcSt4pairIS2_jENS_18PairFirstExtractorIS4_EENS_7PtrHashIS2_EENS_14PairHashTraitsINS_10HashTraitsIS2_EENSA_I
++[WebCoreStatistics iconPageURLMappingCount]
++[WebCoreStatistics iconRetainedPageURLCount]
++[WebCoreStatistics iconRecordCount]
++[WebCoreStatistics iconsWithDataCount]
++[WebCoreStatistics cachedFontDataCount]
++[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]
@@ -1567,7 +2375,6 @@ __ZN13WebDragClient22createDragImageForLinkERN7WebCore4KURLERKNS0_6StringEPNS0_5
-[NSPrintOperation(WebKitExtras) _web_pageSetupScaleFactor]
-[WebView(WebViewPrintingPrivate) _headerHeight]
__Z28CallUIDelegateReturningFloatP7WebViewP13objc_selector
-__ZL26CallDelegateReturningFloatP7WebViewP11objc_objectP13objc_selector
-[WebView(WebViewPrintingPrivate) _footerHeight]
-[WebHTMLView _scaleFactorForPrintOperation:]
-[WebHTMLView(WebHTMLViewFileInternal) _calculatePrintHeight]
@@ -1578,193 +2385,58 @@ __ZL26CallDelegateReturningFloatP7WebViewP11objc_objectP13objc_selector
-[WebHTMLView drawPageBorderWithSize:]
-[WebView(WebViewPrintingPrivate) _drawHeaderAndFooter]
-[WebView(WebViewPrintingPrivate) _drawHeaderInRect:]
-__Z14CallUIDelegateP7WebViewP13objc_selector7_NSRect
-__ZL12CallDelegateP7WebViewP11objc_objectP13objc_selector7_NSRect
+__Z14CallUIDelegateP7WebViewP13objc_selector6CGRect
-[WebView(WebViewPrintingPrivate) _drawFooterInRect:]
-[WebHTMLView endDocument]
-[WebHTMLView _endPrintMode]
--[WebFrameView _horizontalKeyboardScrollDistance]
--[WebFrameView _scrollHorizontallyBy:]
--[WebFrameView scrollToEndOfDocument:]
--[WebFrameView _goForward]
--[WebFrameView _goBack]
--[WebHTMLView _wantsKeyDownForEvent:]
--[WebHTMLView(WebPrivate) _isEditable]
--[WebHTMLView(WebInternal) isGrammarCheckingEnabled]
--[WebHTMLView(WebDocumentPrivateProtocols) supportsTextEncoding]
--[WebView customTextEncodingName]
--[WebView _mainFrameOverrideEncoding]
-__ZN20WebFrameLoaderClient38dispatchDidLoadResourceFromMemoryCacheEPN7WebCore14DocumentLoaderERKNS0_15ResourceRequestERKNS0_16ResourceResponseEi
-__ZL12CallDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS0_S2_S0_S0_iS0_
--[NSString(WebNSURLExtras) _webkit_looksLikeAbsoluteURL]
--[NSString(WebNSURLExtras) _webkit_rangeOfURLScheme]
-__ZN20WebContextMenuClient18lookUpInDictionaryEPN7WebCore5FrameE
--[WebHTMLView(WebInternal) _lookUpInDictionaryFromMenu:]
--[WebHTMLView(WebDocumentPrivateProtocols) selectedAttributedString]
--[WebHTMLView(WebHTMLViewFileInternal) _selectedRange]
--[WebHTMLView(WebDocumentPrivateProtocols) _attributeStringFromDOMRange:]
--[WebView(WebPendingPublic) setHoverFeedbackSuspended:]
--[WebHTMLView(WebInternal) _hoverFeedbackSuspendedChanged]
--[WebView elementAtPoint:]
--[WebView _elementAtWindowPoint:]
--[WebHTMLView(WebDocumentInternalProtocols) elementAtPoint:]
--[WebPreferences userStyleSheetLocation]
--[WebView initWithCoder:]
--[WebFrameView initWithCoder:]
--[WebPreferences initWithCoder:]
-+[WebPreferences(WebInternal) _concatenateKeyWithIBCreatorID:]
--[WebView setPreferences:]
--[WebPreferences setMinimumFontSize:]
--[NSMutableDictionary(WebNSDictionaryExtras) _webkit_setInt:forKey:]
--[WebHTMLRepresentation documentSource]
--[WebFrame loadData:MIMEType:textEncodingName:baseURL:]
--[WebDefaultPolicyDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:]
--[WebDefaultEditingDelegate undoManagerForWebView:]
-+[WebPreferences(WebPrivate) _checkLastReferenceForIdentifier:]
--[WebPreferences dealloc]
--[WebPreferencesPrivate dealloc]
--[WebHTMLRepresentation canSaveAsWebArchive]
--[WebFrame(WebInternal) _canSaveAsWebArchive]
-+[WebView(WebPrivate) suggestedFileExtensionForMIMEType:]
-WKGetPreferredExtensionForMIMEType
-__ZN3WTF6VectorINS_6RefPtrIN7WebCore7ArchiveEEELm0EE6shrinkEm
--[WebNetscapePluginDocumentView(Internal) _printedPluginBitmap]
--[WebPreferences setShouldPrintBackgrounds:]
-WKGetExtensionsForMIMEType
--[WebHistoryItem(WebPrivate) _lastVisitedDate]
--[WebPreferences init]
--[WebPreferences(WebPrivate) setApplicationChromeModeEnabled:]
--[WebPreferences setLoadsImagesAutomatically:]
--[WebPreferences(WebPrivate) setAuthorAndUserStylesEnabled:]
--[WebPreferences setJavaScriptEnabled:]
--[WebPreferences setAllowsAnimatedImages:]
--[WebPreferences setPlugInsEnabled:]
--[WebPreferences setJavaEnabled:]
--[WebPreferences setUserStyleSheetEnabled:]
--[WebPreferences setTabsToLinks:]
--[WebPreferences setMinimumLogicalFontSize:]
--[WebHistoryItem(WebPrivate) _setTransientProperty:forKey:]
--[WebHistoryItem(WebPrivate) _setLastVisitWasFailure:]
--[WebBackForwardList backItem]
--[WebFrame globalContext]
--[WebFrame windowObject]
-WKAdvanceDefaultButtonPulseAnimation
--[WKAppKitDrawDecoyWindow isKeyWindow]
--[WebPDFView deselectAll]
--[WebPDFView viewState]
--[WebPDFView dealloc]
-__ZN20WebFrameLoaderClient41dispatchDidReceiveAuthenticationChallengeEPN7WebCore14DocumentLoaderEmRKNS0_23AuthenticationChallengeE
-+[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]
--[WebAuthenticationPanel logIn:]
--[WebAuthenticationPanel sheetDidEnd:returnCode:contextInfo:]
--[WebPanelAuthenticationHandler _authenticationDoneWithChallenge:result:]
--[WebAuthenticationPanel dealloc]
--[WebPanelAuthenticationHandler tryNextChallengeForWindow:]
--[WebAuthenticationPanel cancel:]
-+[WebStringTruncator rightTruncateString:toWidth:withFont:]
--[WebDownloadInternal download:shouldDecodeSourceDataOfMIMEType:]
-__ZN20WebFrameLoaderClient25pluginWillHandleLoadErrorERKN7WebCore16ResourceResponseE
-WKDrawMediaUIPart
-__Z24createCGImageRefFromDataPKhj
-__Z14drawMediaImageP9CGContext6CGRectP7CGImage
-WKDrawMediaSliderTrack
-WKQTMovieMaxTimeLoaded
-__ZN20WebContextMenuClient11downloadURLERKN7WebCore4KURLE
--[WebView(WebPrivate) _downloadURL:]
--[WebDownload _initWithRequest:delegate:directory:]
--[WebDownload initWithRequest:delegate:]
--[WebHTMLView validRequestorForSendType:returnType:]
--[WebHTMLView(WebDocumentPrivateProtocols) pasteboardTypesForSelection]
--[WebHTMLView(WebInternal) _canSmartCopyOrDelete]
--[WebPluginController _webPluginContainerCheckIfAllowedToLoadRequest:inFrame:resultObject:selector:]
-+[WebPluginContainerCheck checkWithRequest:target:resultObject:selector:controller:]
--[WebPluginContainerCheck initWithRequest:target:resultObject:selector:controller:]
--[WebPluginContainerCheck start]
--[WebPluginContainerCheck _isForbiddenFileLoad]
--[WebPluginContainerCheck _askPolicyDelegate]
--[WebPluginController webView]
--[WebPluginContainerCheck _actionInformationWithURL:]
--[WebPolicyDecisionListener _initWithTarget:action:]
--[WebPolicyDecisionListenerPrivate initWithTarget:action:]
--[WebPolicyDecisionListener use]
--[WebPolicyDecisionListener _usePolicy:]
--[WebPluginContainerCheck _continueWithPolicy:]
--[WebPluginController _webPluginContainerCancelCheckIfAllowedToLoadRequest:]
--[WebPluginContainerCheck cancel]
--[WebPolicyDecisionListener _invalidate]
--[WebPolicyDecisionListener dealloc]
--[WebPolicyDecisionListenerPrivate dealloc]
--[WebPluginContainerCheck dealloc]
--[WebPluginController destroyPlugin:]
--[WebPreferences setStandardFontFamily:]
--[WebPreferences _setStringValue:forKey:]
--[WebPreferences setDefaultFontSize:]
--[WebPreferences setFixedFontFamily:]
--[WebPreferences setDefaultFixedFontSize:]
--[WebPreferences setDefaultTextEncodingName:]
--[WebHTMLRepresentation currentForm]
-+[WebDatabaseManager sharedWebDatabaseManager]
--[WebDatabaseManager origins]
--[WebPreferences(WebPrivate) setDeveloperExtrasEnabled:]
--[WebHTMLView(WebInternal) toggleGrammarChecking:]
--[WebView(WebViewGrammarChecking) toggleGrammarChecking:]
--[WebView(WebViewGrammarChecking) setGrammarCheckingEnabled:]
-__ZN18WebInspectorClient19inspectedURLChangedERKN7WebCore6StringE
-__ZNK18WebInspectorClient17updateWindowTitleEv
--[WebView(WebPendingPublic) zoomPageIn:]
--[WebView _zoomIn:isTextOnly:]
--[WebView(WebPendingPublic) zoomPageOut:]
--[WebView _zoomOut:isTextOnly:]
+-[WebHTMLView(WebPrivate) _hasInsertionPoint]
-[WebPreferences(WebPrivate) setZoomsTextOnly:]
--[WebView(WebIBActions) canMakeTextSmaller]
-[WebView(WebIBActions) makeTextSmaller:]
--[WebView(WebIBActions) canMakeTextLarger]
--[WebView(WebIBActions) makeTextLarger:]
--[WebView(WebPendingPublic) resetPageZoom:]
--[WebView _resetZoom:isTextOnly:]
--[WebView(WebIBActions) makeTextStandardSize:]
+-[WebFrameView initWithCoder:]
+-[WebHTMLRepresentation documentSource]
-[WebView setCustomTextEncodingName:]
--[WebView(WebPrivate) inspector]
--[WebInspector initWithWebView:]
+-[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]
++[WebCoreStatistics purgeInactiveFontData]
+-[WebView(WebPrivate) _loadBackForwardListFromOtherView:]
+-[WebDatabaseManager origins]
-[WebInspector isDebuggingJavaScript]
-[WebInspector isProfilingJavaScript]
-[WebView customUserAgent]
--[WebView setCustomUserAgent:]
--[WebFrame reloadFromOrigin]
--[WebView setShouldCloseWithWindow:]
--[WebView(WebPrivate) setProhibitsMainFrameScrolling:]
--[WebDefaultPolicyDelegate webView:decidePolicyForMIMEType:request:frame:decisionListener:]
--[WebFrame(WebPrivate) _setIsDisconnected:]
--[WebDefaultUIDelegate webViewFirstResponder:]
--[WebDefaultUIDelegate webView:didDrawRect:]
-__ZN18WebInspectorClient11closeWindowEv
--[WebView(WebIBActions) _responderValidateUserInterfaceItem:]
--[WebView(WebFileInternal) _responderForResponderOperations]
--[NSView(WebExtras) _web_firstResponderIsSelfOrDescendantView]
--[WebViewFactory contextMenuItemTagInspectElement]
+-[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
+_WKNSWindowMakeBottomCornersSquare
-[WebInspectorWindowController showWindow:]
-[WebInspectorWindowController setAttachedWindowHeight:]
__ZN18WebInspectorClient12attachWindowEv
-[WebInspectorWindowController attach]
+-[WebInspector showConsole:]
+-[WebDefaultEditingDelegate webView:shouldEndEditingInDOMRange:]
__ZN18WebInspectorClient9highlightEPN7WebCore4NodeE
-[WebInspectorWindowController highlightNode:]
-[WebNodeHighlight initWithTargetView:inspectorController:]
@@ -1777,87 +2449,87 @@ __ZN18WebInspectorClient9highlightEPN7WebCore4NodeE
-[WebNodeHighlight inspectorController]
-[WebInspectorWindowController didAttachWebNodeHighlight:]
-[WebView setCurrentNodeHighlight:]
--[WebView(WebPrivate) drawRect:]
--[WebNodeHighlight targetView]
--[WebNodeHighlight setNeedsUpdateInTargetViewRect:]
-[WebNodeHighlight detach]
-[WebInspectorWindowController willDetachWebNodeHighlight:]
-[WebNodeHighlightView detachFromWebNodeHighlight]
-[WebNodeHighlight dealloc]
-[WebNodeHighlightView dealloc]
--[WebDefaultUIDelegate webView:makeFirstResponder:]
--[WebNodeHighlight highlightView]
-__ZN15WebEditorClient20checkGrammarOfStringEPKtiRN3WTF6VectorIN7WebCore13GrammarDetailELm0EEEPiS8_
-__ZN3WTF6VectorIN7WebCore13GrammarDetailELm0EE14expandCapacityEmPKS2_
-__ZN3WTF6VectorIN7WebCore13GrammarDetailELm0EE14expandCapacityEm
-__ZN3WTF6VectorIN7WebCore13GrammarDetailELm0EE15reserveCapacityEm
-__ZN3WTF6VectorIN7WebCore6StringELm0EEC1ERKS3_
__ZN18WebInspectorClient12detachWindowEv
-[WebInspectorWindowController detach]
-[WebInspectorWindowController close]
-[WebDefaultUIDelegate webViewFrame:]
-[WebDefaultUIDelegate webView:setFrame:]
--[WebDefaultUIDelegate webView:didScrollDocumentInFrameView:]
--[WebDefaultUIDelegate webViewFocus:]
+-[WebNodeHighlight highlightView]
+-[WebHTMLView _wantsKeyDownForEvent:]
-[WebInspectorWindowController windowShouldClose:]
--[WebInspector webViewClosed]
--[WebInspectorWindowController dealloc]
--[WebHistory removeAllItems]
--[WebHistoryPrivate removeAllItems]
--[WebIconDatabase(WebPendingPublic) removeAllIcons]
-__ZN21WebIconDatabaseClient25dispatchDidRemoveAllIconsEv
--[WebIconDatabase(WebInternal) _sendDidRemoveAllIconsNotification]
--[WebViewFactory resetButtonDefaultLabel]
--[WebViewFactory submitButtonDefaultLabel]
--[WebHTMLView selectAll:]
--[NSURL(WebNSURLExtras) _webkit_isJavaScriptURL]
--[WebViewFactory fileButtonNoFileSelectedLabel]
--[WebBackForwardList removeItem:]
--[WebViewFactory searchableIndexIntroduction]
-__ZN15WebEditorClient26shouldMoveRangeAfterDeleteEPN7WebCore5RangeES2_
--[WebDefaultEditingDelegate webView:shouldMoveRangeAfterDelete:replacingRange:]
-__ZN3WTF6VectorIN7WebCore6StringELm0EE14expandCapacityEmPKS2_
-__ZN3WTF6VectorIN7WebCore6StringELm0EE14expandCapacityEm
-__ZN3WTF6VectorIN7WebCore6StringELm0EE15reserveCapacityEm
-__ZNK15WebEditorClient7canUndoEv
-__ZN15WebEditorClient4undoEv
--[WebEditorUndoTarget undoEditing:]
--[WebEditCommand command]
-__ZN15WebEditorClient22registerCommandForRedoEN3WTF10PassRefPtrIN7WebCore11EditCommandEEE
-__ZN15WebChromeClient5printEPN7WebCore5FrameE
-__ZNK15WebEditorClient7canRedoEv
-__ZN15WebEditorClient4redoEv
--[WebEditorUndoTarget redoEditing:]
--[DOMDocument(WebDOMDocumentOperations) URLWithAttributeString:]
-__ZN15WebChromeClient19customHighlightRectEPN7WebCore4NodeERKNS0_12AtomicStringERKNS0_9FloatRectE
--[WebHTMLView(WebInternal) _highlighterForType:]
-__ZN15WebChromeClient20paintCustomHighlightEPN7WebCore4NodeERKNS0_12AtomicStringERKNS0_9FloatRectES8_bb
--[WebDefaultUIDelegate webViewClose:]
-__ZN15WebChromeClient19runJavaScriptPromptEPN7WebCore5FrameERKNS0_6StringES5_RS3_
-__Z14CallUIDelegateP7WebViewP13objc_selectorP11objc_objectS4_S4_
-__ZL12CallDelegateP7WebViewP11objc_objectP13objc_selectorS2_S2_S2_
--[WebJavaScriptTextInputPanel initWithPrompt:text:]
--[NSWindow(WebExtras) centerOverMainWindow]
+-[WebFrame(WebPrivate) _setIsDisconnected:]
+__ZN18WebInspectorClient11closeWindowEv
+-[WebInspector toggleDebuggingJavaScript:]
+-[WebInspector startDebuggingJavaScript:]
+-[WebInspector toggleProfilingJavaScript:]
+-[WebInspector startProfilingJavaScript:]
+-[WebInspector stopProfilingJavaScript:]
+-[WebHistoryItem(WebPrivate) setRSSFeedReferrer:]
+-[NSView(WebExtras) _web_dragOperationForDraggingInfo:]
+-[NSString(WebKitExtras) _webkit_filenameByFixingIllegalCharacters]
+-[WebIconDatabase(WebInternal) _scaleIcon:toSize:]
+-[WebPDFView hitTest:]
+-[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]
+-[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:]
--[WebJavaScriptTextInputPanel pressedOK:]
--[WebJavaScriptTextInputPanel text]
-__ZN15WebChromeClient21exceededDatabaseQuotaEPN7WebCore5FrameERKNS0_6StringE
--[WebSecurityOrigin(WebInternal) _initWithWebCoreSecurityOrigin:]
--[WebSecurityOrigin quota]
--[WebDatabaseManager detailsForDatabase:withOrigin:]
--[WebSecurityOrigin(WebInternal) _core]
--[WebSecurityOrigin setQuota:]
-__ZN24WebDatabaseTrackerClient23dispatchDidModifyOriginEPN7WebCore14SecurityOriginE
--[WebSecurityOrigin dealloc]
-__ZN24WebDatabaseTrackerClient25dispatchDidModifyDatabaseEPN7WebCore14SecurityOriginERKNS0_6StringE
-__ZN15WebChromeClient8runModalEv
-__Z14CallUIDelegateP7WebViewP13objc_selector
-__ZL12CallDelegateP7WebViewP11objc_objectP13objc_selector
-__ZN20WebFrameLoaderClient12blockedErrorERKN7WebCore15ResourceRequestE
-__ZN15WebChromeClient17scrollbarsVisibleEv
-__ZN15WebChromeClient15toolbarsVisibleEv
-__ZN15WebChromeClient14menubarVisibleEv
--[WebKeyGenerator strengthMenuItemTitles]
-__ZN15WebChromeClient12canTakeFocusEN7WebCore14FocusDirectionE
-__ZN15WebChromeClient9takeFocusEN7WebCore14FocusDirectionE
--[WebView(WebViewInternal) _becomingFirstResponderFromOutside]
+-[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]
diff --git a/WebKit/mac/WebKitPrefix.h b/WebKit/mac/WebKitPrefix.h
index 4ecd713..0edec06 100644
--- a/WebKit/mac/WebKitPrefix.h
+++ b/WebKit/mac/WebKitPrefix.h
@@ -78,11 +78,6 @@ typedef float CGFloat;
#define WTF_USE_PLUGIN_HOST_PROCESS 1
#endif
-// Accelerated compositing (also needs to be set in WebCore/config.h)
-#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
-#define WTF_USE_ACCELERATED_COMPOSITING 0
-#endif
-
/* 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 */
#define WTF_USE_JSC 1
@@ -97,3 +92,6 @@ typedef float CGFloat;
/* Work around bug with C++ library that screws up Objective-C++ when exception support is disabled. */
#undef try
#undef catch
+
+#define JS_EXPORTDATA
+#define WEBKIT_EXPORTDATA
diff --git a/WebKit/mac/WebView/WebDataSource.mm b/WebKit/mac/WebView/WebDataSource.mm
index 57347d3..b83139d 100644
--- a/WebKit/mac/WebView/WebDataSource.mm
+++ b/WebKit/mac/WebView/WebDataSource.mm
@@ -189,7 +189,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
- (NSString *)_responseMIMEType
{
- return [[self response] _webcore_MIMEType];
+ return [[self response] MIMEType];
}
- (BOOL)_transferApplicationCache:(NSString*)destinationBundleIdentifier
@@ -198,14 +198,10 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
if (!loader)
return NO;
-
- ApplicationCache* cache = loader->applicationCache();
- if (!cache)
- return YES;
-
+
NSString *cacheDir = [NSString _webkit_localCacheDirectoryWithBundleIdentifier:destinationBundleIdentifier];
- return ApplicationCacheStorage::storeCopyOfCache(cacheDir, cache);
+ return ApplicationCacheStorage::storeCopyOfCache(cacheDir, loader->applicationCacheHost());
}
@end
@@ -224,7 +220,9 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
RetainPtr<WebDataSource*> protect(self);
[[self representation] receivedData:data withDataSource:self];
- [[[[self webFrame] frameView] documentView] dataSourceUpdated:self];
+
+ if ([[self _webView] _usesDocumentViews])
+ [[[[self webFrame] frameView] documentView] dataSourceUpdated:self];
}
- (void)_setMainDocumentError:(NSError *)error
@@ -340,7 +338,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
return [WebView canShowMIMETypeAsHTML:MIMEType];
}
--(void)_makeRepresentation
+- (void)_makeRepresentation
{
Class repClass = [[self class] _representationClassForMIMEType:[self _responseMIMEType]];
@@ -350,7 +348,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
[self _setRepresentation:(id <WebDocumentRepresentation>)newRep];
[newRep release];
}
-
+
[_private->representation setDataSource:self];
}
diff --git a/WebKit/mac/WebView/WebDelegateImplementationCaching.h b/WebKit/mac/WebView/WebDelegateImplementationCaching.h
new file mode 100644
index 0000000..41e44e0
--- /dev/null
+++ b/WebKit/mac/WebView/WebDelegateImplementationCaching.h
@@ -0,0 +1,121 @@
+/*
+ * Copyright (C) 2005, 2006, 2007, 2008, 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.
+ * 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 header contains WebView declarations that can be used anywhere in WebKit, but are neither SPI nor API.
+
+#import "WebTypesInternal.h"
+
+@class WebView;
+
+struct WebResourceDelegateImplementationCache {
+ IMP didCancelAuthenticationChallengeFunc;
+ IMP didReceiveAuthenticationChallengeFunc;
+ IMP identifierForRequestFunc;
+ IMP willSendRequestFunc;
+ IMP didReceiveResponseFunc;
+ IMP didReceiveContentLengthFunc;
+ IMP didFinishLoadingFromDataSourceFunc;
+ IMP didFailLoadingWithErrorFromDataSourceFunc;
+ IMP didLoadResourceFromMemoryCacheFunc;
+ IMP willCacheResponseFunc;
+ IMP plugInFailedWithErrorFunc;
+ IMP shouldUseCredentialStorageFunc;
+};
+
+struct WebFrameLoadDelegateImplementationCache {
+ IMP didClearWindowObjectForFrameFunc;
+ IMP didClearInspectorWindowObjectForFrameFunc;
+ IMP windowScriptObjectAvailableFunc;
+ IMP didHandleOnloadEventsForFrameFunc;
+ IMP didReceiveServerRedirectForProvisionalLoadForFrameFunc;
+ IMP didCancelClientRedirectForFrameFunc;
+ IMP willPerformClientRedirectToURLDelayFireDateForFrameFunc;
+ IMP didChangeLocationWithinPageForFrameFunc;
+ IMP willCloseFrameFunc;
+ IMP didStartProvisionalLoadForFrameFunc;
+ IMP didReceiveTitleForFrameFunc;
+ IMP didCommitLoadForFrameFunc;
+ IMP didFailProvisionalLoadWithErrorForFrameFunc;
+ IMP didFailLoadWithErrorForFrameFunc;
+ IMP didFinishLoadForFrameFunc;
+ IMP didFirstLayoutInFrameFunc;
+ IMP didFirstVisuallyNonEmptyLayoutInFrameFunc;
+ IMP didReceiveIconForFrameFunc;
+ IMP didFinishDocumentLoadForFrameFunc;
+};
+
+struct WebScriptDebugDelegateImplementationCache {
+ BOOL didParseSourceExpectsBaseLineNumber;
+ IMP didParseSourceFunc;
+ IMP failedToParseSourceFunc;
+ IMP didEnterCallFrameFunc;
+ IMP willExecuteStatementFunc;
+ IMP willLeaveCallFrameFunc;
+ IMP exceptionWasRaisedFunc;
+};
+
+WebResourceDelegateImplementationCache* WebViewGetResourceLoadDelegateImplementations(WebView *);
+WebFrameLoadDelegateImplementationCache* WebViewGetFrameLoadDelegateImplementations(WebView *);
+WebScriptDebugDelegateImplementationCache* WebViewGetScriptDebugDelegateImplementations(WebView *);
+
+id CallFormDelegate(WebView *, SEL, id, id);
+id CallFormDelegate(WebView *self, SEL selector, id object1, id object2, id object3, id object4, id object5);
+BOOL CallFormDelegateReturningBoolean(BOOL, WebView *, SEL, id, SEL, id);
+
+id CallUIDelegate(WebView *, SEL);
+id CallUIDelegate(WebView *, SEL, id);
+id CallUIDelegate(WebView *, SEL, NSRect);
+id CallUIDelegate(WebView *, SEL, id, id);
+id CallUIDelegate(WebView *, SEL, id, BOOL);
+id CallUIDelegate(WebView *, SEL, id, id, id);
+id CallUIDelegate(WebView *, SEL, id, NSUInteger);
+float CallUIDelegateReturningFloat(WebView *, SEL);
+BOOL CallUIDelegateReturningBoolean(BOOL, WebView *, SEL);
+BOOL CallUIDelegateReturningBoolean(BOOL, WebView *, SEL, id);
+BOOL CallUIDelegateReturningBoolean(BOOL, WebView *, SEL, id, id);
+BOOL CallUIDelegateReturningBoolean(BOOL, WebView *, SEL, id, BOOL);
+
+id CallFrameLoadDelegate(IMP, WebView *, SEL);
+id CallFrameLoadDelegate(IMP, WebView *, SEL, id);
+id CallFrameLoadDelegate(IMP, WebView *, SEL, id, id);
+id CallFrameLoadDelegate(IMP, WebView *, SEL, id, id, id);
+id CallFrameLoadDelegate(IMP, WebView *, SEL, id, id, id, id);
+id CallFrameLoadDelegate(IMP, WebView *, SEL, id, NSTimeInterval, id, id);
+
+id CallResourceLoadDelegate(IMP, WebView *, SEL, id, id);
+id CallResourceLoadDelegate(IMP, WebView *, SEL, id, id, id);
+id CallResourceLoadDelegate(IMP, WebView *, SEL, id, id, id, id);
+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);
+
+id CallScriptDebugDelegate(IMP, WebView *, SEL, id, id, NSInteger, id);
+id CallScriptDebugDelegate(IMP, WebView *, SEL, id, NSInteger, id, NSInteger, id);
+id CallScriptDebugDelegate(IMP, WebView *, SEL, id, NSInteger, id, id, id);
+id CallScriptDebugDelegate(IMP, WebView *, SEL, id, NSInteger, NSInteger, id);
diff --git a/WebKit/mac/WebView/WebDelegateImplementationCaching.mm b/WebKit/mac/WebView/WebDelegateImplementationCaching.mm
new file mode 100644
index 0000000..441df92
--- /dev/null
+++ b/WebKit/mac/WebView/WebDelegateImplementationCaching.mm
@@ -0,0 +1,590 @@
+/*
+ * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2006 David Smith (catfish.man@gmail.com)
+ *
+ * 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 "WebDelegateImplementationCaching.h"
+
+#import "WebKitLogging.h"
+#import "WebView.h"
+#import "WebViewData.h"
+#import <objc/objc-runtime.h>
+
+@implementation WebView (WebDelegateImplementationCaching)
+
+WebResourceDelegateImplementationCache* WebViewGetResourceLoadDelegateImplementations(WebView *webView)
+{
+ static WebResourceDelegateImplementationCache empty;
+ if (!webView)
+ return &empty;
+ return &webView->_private->resourceLoadDelegateImplementations;
+}
+
+WebFrameLoadDelegateImplementationCache* WebViewGetFrameLoadDelegateImplementations(WebView *webView)
+{
+ static WebFrameLoadDelegateImplementationCache empty;
+ if (!webView)
+ return &empty;
+ return &webView->_private->frameLoadDelegateImplementations;
+}
+
+WebScriptDebugDelegateImplementationCache* WebViewGetScriptDebugDelegateImplementations(WebView *webView)
+{
+ static WebScriptDebugDelegateImplementationCache empty;
+ if (!webView)
+ return &empty;
+ return &webView->_private->scriptDebugDelegateImplementations;
+}
+
+// We use these functions to call the delegates and block exceptions. These functions are
+// declared inside a WebView category to get direct access to the delegate data memebers,
+// preventing more ObjC message dispatch and compensating for the expense of the @try/@catch.
+
+typedef float (*ObjCMsgSendFPRet)(id, SEL, ...);
+#if defined(__i386__)
+static const ObjCMsgSendFPRet objc_msgSend_float_return = reinterpret_cast<ObjCMsgSendFPRet>(objc_msgSend_fpret);
+#else
+static const ObjCMsgSendFPRet objc_msgSend_float_return = reinterpret_cast<ObjCMsgSendFPRet>(objc_msgSend);
+#endif
+
+static inline id CallDelegate(WebView *self, id delegate, SEL selector)
+{
+ if (!delegate || ![delegate respondsToSelector:selector])
+ return nil;
+ if (!self->_private->catchesDelegateExceptions)
+ return objc_msgSend(delegate, selector, self);
+ @try {
+ return objc_msgSend(delegate, selector, self);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return nil;
+}
+
+static inline id CallDelegate(WebView *self, id delegate, SEL selector, id object)
+{
+ if (!delegate || ![delegate respondsToSelector:selector])
+ return nil;
+ if (!self->_private->catchesDelegateExceptions)
+ return objc_msgSend(delegate, selector, self, object);
+ @try {
+ return objc_msgSend(delegate, selector, self, object);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return nil;
+}
+
+static inline id CallDelegate(WebView *self, id delegate, SEL selector, NSRect rect)
+{
+ if (!delegate || ![delegate respondsToSelector:selector])
+ return nil;
+ if (!self->_private->catchesDelegateExceptions)
+ return reinterpret_cast<id (*)(id, SEL, WebView *, NSRect)>(objc_msgSend)(delegate, selector, self, rect);
+ @try {
+ return reinterpret_cast<id (*)(id, SEL, WebView *, NSRect)>(objc_msgSend)(delegate, selector, self, rect);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return nil;
+}
+
+static inline id CallDelegate(WebView *self, id delegate, SEL selector, id object1, id object2)
+{
+ if (!delegate || ![delegate respondsToSelector:selector])
+ return nil;
+ if (!self->_private->catchesDelegateExceptions)
+ return objc_msgSend(delegate, selector, self, object1, object2);
+ @try {
+ return objc_msgSend(delegate, selector, self, object1, object2);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return nil;
+}
+
+static inline id CallDelegate(WebView *self, id delegate, SEL selector, id object, BOOL boolean)
+{
+ if (!delegate || ![delegate respondsToSelector:selector])
+ return nil;
+ if (!self->_private->catchesDelegateExceptions)
+ return objc_msgSend(delegate, selector, self, object, boolean);
+ @try {
+ return objc_msgSend(delegate, selector, self, object, boolean);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return nil;
+}
+
+static inline id CallDelegate(WebView *self, id delegate, SEL selector, id object1, id object2, id object3)
+{
+ if (!delegate || ![delegate respondsToSelector:selector])
+ return nil;
+ if (!self->_private->catchesDelegateExceptions)
+ return objc_msgSend(delegate, selector, self, object1, object2, object3);
+ @try {
+ return objc_msgSend(delegate, selector, self, object1, object2, object3);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return nil;
+}
+
+static inline id CallDelegate(WebView *self, id delegate, SEL selector, id object, NSUInteger integer)
+{
+ if (!delegate || ![delegate respondsToSelector:selector])
+ return nil;
+ if (!self->_private->catchesDelegateExceptions)
+ return objc_msgSend(delegate, selector, self, object, integer);
+ @try {
+ return objc_msgSend(delegate, selector, self, object, integer);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return nil;
+}
+
+static inline float CallDelegateReturningFloat(WebView *self, id delegate, SEL selector)
+{
+ if (!delegate || ![delegate respondsToSelector:selector])
+ return 0.0f;
+ if (!self->_private->catchesDelegateExceptions)
+ return objc_msgSend_float_return(delegate, selector, self);
+ @try {
+ return objc_msgSend_float_return(delegate, selector, self);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return 0.0f;
+}
+
+static inline BOOL CallDelegateReturningBoolean(BOOL result, WebView *self, id delegate, SEL selector)
+{
+ if (!delegate || ![delegate respondsToSelector:selector])
+ return result;
+ if (!self->_private->catchesDelegateExceptions)
+ return reinterpret_cast<BOOL (*)(id, SEL, WebView *)>(objc_msgSend)(delegate, selector, self);
+ @try {
+ return reinterpret_cast<BOOL (*)(id, SEL, WebView *)>(objc_msgSend)(delegate, selector, self);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return result;
+}
+
+static inline BOOL CallDelegateReturningBoolean(BOOL result, WebView *self, id delegate, SEL selector, id object)
+{
+ if (!delegate || ![delegate respondsToSelector:selector])
+ return result;
+ if (!self->_private->catchesDelegateExceptions)
+ return reinterpret_cast<BOOL (*)(id, SEL, WebView *, id)>(objc_msgSend)(delegate, selector, self, object);
+ @try {
+ return reinterpret_cast<BOOL (*)(id, SEL, WebView *, id)>(objc_msgSend)(delegate, selector, self, object);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return result;
+}
+
+static inline BOOL CallDelegateReturningBoolean(BOOL result, WebView *self, id delegate, SEL selector, id object, BOOL boolean)
+{
+ if (!delegate || ![delegate respondsToSelector:selector])
+ return result;
+ if (!self->_private->catchesDelegateExceptions)
+ return reinterpret_cast<BOOL (*)(id, SEL, WebView *, id, BOOL)>(objc_msgSend)(delegate, selector, self, object, boolean);
+ @try {
+ return reinterpret_cast<BOOL (*)(id, SEL, WebView *, id, BOOL)>(objc_msgSend)(delegate, selector, self, object, boolean);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return result;
+}
+
+static inline BOOL CallDelegateReturningBoolean(BOOL result, WebView *self, id delegate, SEL selector, id object1, id object2)
+{
+ if (!delegate || ![delegate respondsToSelector:selector])
+ return result;
+ if (!self->_private->catchesDelegateExceptions)
+ return reinterpret_cast<BOOL (*)(id, SEL, WebView *, id, id)>(objc_msgSend)(delegate, selector, self, object1, object2);
+ @try {
+ return reinterpret_cast<BOOL (*)(id, SEL, WebView *, id, id)>(objc_msgSend)(delegate, selector, self, object1, object2);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return result;
+}
+
+static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector)
+{
+ if (!delegate)
+ return nil;
+ if (!self->_private->catchesDelegateExceptions)
+ return implementation(delegate, selector, self);
+ @try {
+ return implementation(delegate, selector, self);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return nil;
+}
+
+static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector, id object)
+{
+ if (!delegate)
+ return nil;
+ if (!self->_private->catchesDelegateExceptions)
+ return implementation(delegate, selector, self, object);
+ @try {
+ return implementation(delegate, selector, self, object);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return nil;
+}
+
+static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector, id object1, id object2)
+{
+ if (!delegate)
+ return nil;
+ if (!self->_private->catchesDelegateExceptions)
+ return implementation(delegate, selector, self, object1, object2);
+ @try {
+ return implementation(delegate, selector, self, object1, object2);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return nil;
+}
+
+static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector, id object1, id object2, id object3)
+{
+ if (!delegate)
+ return nil;
+ if (!self->_private->catchesDelegateExceptions)
+ return implementation(delegate, selector, self, object1, object2, object3);
+ @try {
+ return implementation(delegate, selector, self, object1, object2, object3);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return nil;
+}
+
+static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector, id object1, id object2, id object3, id object4)
+{
+ if (!delegate)
+ return nil;
+ if (!self->_private->catchesDelegateExceptions)
+ return implementation(delegate, selector, self, object1, object2, object3, object4);
+ @try {
+ return implementation(delegate, selector, self, object1, object2, object3, object4);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return nil;
+}
+
+static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector, id object1, NSInteger integer, id object2)
+{
+ if (!delegate)
+ return nil;
+ if (!self->_private->catchesDelegateExceptions)
+ return implementation(delegate, selector, self, object1, integer, object2);
+ @try {
+ return implementation(delegate, selector, self, object1, integer, object2);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return nil;
+}
+
+static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector, id object1, NSInteger integer1, NSInteger integer2, id object2)
+{
+ if (!delegate)
+ return nil;
+ if (!self->_private->catchesDelegateExceptions)
+ return implementation(delegate, selector, self, object1, integer1, integer2, object2);
+ @try {
+ return implementation(delegate, selector, self, object1, integer1, integer2, object2);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return nil;
+}
+
+static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector, id object1, id object2, NSInteger integer, id object3)
+{
+ if (!delegate)
+ return nil;
+ if (!self->_private->catchesDelegateExceptions)
+ return implementation(delegate, selector, self, object1, object2, integer, object3);
+ @try {
+ return implementation(delegate, selector, self, object1, object2, integer, object3);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return nil;
+}
+
+static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector, id object1, NSInteger integer1, id object2, NSInteger integer2, id object3)
+{
+ if (!delegate)
+ return nil;
+ if (!self->_private->catchesDelegateExceptions)
+ return implementation(delegate, selector, self, object1, integer1, object2, integer2, object3);
+ @try {
+ return implementation(delegate, selector, self, object1, integer1, object2, integer2, object3);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return nil;
+}
+
+static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector, id object1, NSInteger integer, id object2, id object3, id object4)
+{
+ if (!delegate)
+ return nil;
+ if (!self->_private->catchesDelegateExceptions)
+ return implementation(delegate, selector, self, object1, integer, object2, object3, object4);
+ @try {
+ return implementation(delegate, selector, self, object1, integer, object2, object3, object4);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return nil;
+}
+
+static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector, id object1, NSTimeInterval interval, id object2, id object3)
+{
+ if (!delegate)
+ return nil;
+ if (!self->_private->catchesDelegateExceptions)
+ return implementation(delegate, selector, self, object1, interval, object2, object3);
+ @try {
+ return implementation(delegate, selector, self, object1, interval, object2, object3);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return nil;
+}
+
+id CallUIDelegate(WebView *self, SEL selector)
+{
+ return CallDelegate(self, self->_private->UIDelegate, selector);
+}
+
+id CallUIDelegate(WebView *self, SEL selector, id object)
+{
+ return CallDelegate(self, self->_private->UIDelegate, selector, object);
+}
+
+id CallUIDelegate(WebView *self, SEL selector, id object, BOOL boolean)
+{
+ return CallDelegate(self, self->_private->UIDelegate, selector, object, boolean);
+}
+
+id CallUIDelegate(WebView *self, SEL selector, NSRect rect)
+{
+ return CallDelegate(self, self->_private->UIDelegate, selector, rect);
+}
+
+id CallUIDelegate(WebView *self, SEL selector, id object1, id object2)
+{
+ return CallDelegate(self, self->_private->UIDelegate, selector, object1, object2);
+}
+
+id CallUIDelegate(WebView *self, SEL selector, id object1, id object2, id object3)
+{
+ return CallDelegate(self, self->_private->UIDelegate, selector, object1, object2, object3);
+}
+
+id CallUIDelegate(WebView *self, SEL selector, id object, NSUInteger integer)
+{
+ return CallDelegate(self, self->_private->UIDelegate, selector, object, integer);
+}
+
+float CallUIDelegateReturningFloat(WebView *self, SEL selector)
+{
+ return CallDelegateReturningFloat(self, self->_private->UIDelegate, selector);
+}
+
+BOOL CallUIDelegateReturningBoolean(BOOL result, WebView *self, SEL selector)
+{
+ return CallDelegateReturningBoolean(result, self, self->_private->UIDelegate, selector);
+}
+
+BOOL CallUIDelegateReturningBoolean(BOOL result, WebView *self, SEL selector, id object)
+{
+ return CallDelegateReturningBoolean(result, self, self->_private->UIDelegate, selector, object);
+}
+
+BOOL CallUIDelegateReturningBoolean(BOOL result, WebView *self, SEL selector, id object, BOOL boolean)
+{
+ return CallDelegateReturningBoolean(result, self, self->_private->UIDelegate, selector, object, boolean);
+}
+
+BOOL CallUIDelegateReturningBoolean(BOOL result, WebView *self, SEL selector, id object1, id object2)
+{
+ return CallDelegateReturningBoolean(result, self, self->_private->UIDelegate, selector, object1, object2);
+}
+
+id CallFrameLoadDelegate(IMP implementation, WebView *self, SEL selector)
+{
+ return CallDelegate(implementation, self, self->_private->frameLoadDelegate, selector);
+}
+
+id CallFrameLoadDelegate(IMP implementation, WebView *self, SEL selector, id object)
+{
+ return CallDelegate(implementation, self, self->_private->frameLoadDelegate, selector, object);
+}
+
+id CallFrameLoadDelegate(IMP implementation, WebView *self, SEL selector, id object1, id object2)
+{
+ return CallDelegate(implementation, self, self->_private->frameLoadDelegate, selector, object1, object2);
+}
+
+id CallFrameLoadDelegate(IMP implementation, WebView *self, SEL selector, id object1, id object2, id object3)
+{
+ return CallDelegate(implementation, self, self->_private->frameLoadDelegate, selector, object1, object2, object3);
+}
+
+id CallFrameLoadDelegate(IMP implementation, WebView *self, SEL selector, id object1, id object2, id object3, id object4)
+{
+ return CallDelegate(implementation, self, self->_private->frameLoadDelegate, selector, object1, object2, object3, object4);
+}
+
+id CallFrameLoadDelegate(IMP implementation, WebView *self, SEL selector, id object1, NSTimeInterval interval, id object2, id object3)
+{
+ return CallDelegate(implementation, self, self->_private->frameLoadDelegate, selector, object1, interval, object2, object3);
+}
+
+id CallResourceLoadDelegate(IMP implementation, WebView *self, SEL selector, id object1, id object2)
+{
+ return CallDelegate(implementation, self, self->_private->resourceProgressDelegate, selector, object1, object2);
+}
+
+id CallResourceLoadDelegate(IMP implementation, WebView *self, SEL selector, id object1, id object2, id object3)
+{
+ return CallDelegate(implementation, self, self->_private->resourceProgressDelegate, selector, object1, object2, object3);
+}
+
+id CallResourceLoadDelegate(IMP implementation, WebView *self, SEL selector, id object1, id object2, id object3, id object4)
+{
+ return CallDelegate(implementation, self, self->_private->resourceProgressDelegate, selector, object1, object2, object3, object4);
+}
+
+id CallResourceLoadDelegate(IMP implementation, WebView *self, SEL selector, id object1, NSInteger integer, id object2)
+{
+ return CallDelegate(implementation, self, self->_private->resourceProgressDelegate, selector, object1, integer, object2);
+}
+
+id CallResourceLoadDelegate(IMP implementation, WebView *self, SEL selector, id object1, id object2, NSInteger integer, id object3)
+{
+ return CallDelegate(implementation, self, self->_private->resourceProgressDelegate, selector, object1, object2, integer, object3);
+}
+
+BOOL CallResourceLoadDelegateReturningBoolean(BOOL result, IMP implementation, WebView *self, SEL selector, id object1, id object2)
+{
+ if (!self->_private->catchesDelegateExceptions)
+ return reinterpret_cast<BOOL (*)(id, SEL, WebView *, id, id)>(objc_msgSend)(self->_private->resourceProgressDelegate, selector, self, object1, object2);
+ @try {
+ return reinterpret_cast<BOOL (*)(id, SEL, WebView *, id, id)>(objc_msgSend)(self->_private->resourceProgressDelegate, selector, self, object1, object2);
+ } @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);
+}
+
+id CallScriptDebugDelegate(IMP implementation, WebView *self, SEL selector, id object1, NSInteger integer1, id object2, NSInteger integer2, id object3)
+{
+ return CallDelegate(implementation, self, self->_private->scriptDebugDelegate, selector, object1, integer1, object2, integer2, object3);
+}
+
+id CallScriptDebugDelegate(IMP implementation, WebView *self, SEL selector, id object1, NSInteger integer, id object2, id object3, id object4)
+{
+ return CallDelegate(implementation, self, self->_private->scriptDebugDelegate, selector, object1, integer, object2, object3, object4);
+}
+
+id CallScriptDebugDelegate(IMP implementation, WebView *self, SEL selector, id object1, NSInteger integer1, NSInteger integer2, id object2)
+{
+ return CallDelegate(implementation, self, self->_private->scriptDebugDelegate, selector, object1, integer1, integer2, object2);
+}
+
+// The form delegate needs to have it's own implementation, because the first argument is never the WebView
+
+id CallFormDelegate(WebView *self, SEL selector, id object1, id object2)
+{
+ id delegate = self->_private->formDelegate;
+ if (!delegate || ![delegate respondsToSelector:selector])
+ return nil;
+ if (!self->_private->catchesDelegateExceptions)
+ return objc_msgSend(delegate, selector, object1, object2);
+ @try {
+ return objc_msgSend(delegate, selector, object1, object2);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return nil;
+}
+
+id CallFormDelegate(WebView *self, SEL selector, id object1, id object2, id object3, id object4, id object5)
+{
+ id delegate = self->_private->formDelegate;
+ if (!delegate || ![delegate respondsToSelector:selector])
+ return nil;
+ if (!self->_private->catchesDelegateExceptions)
+ return objc_msgSend(delegate, selector, object1, object2, object3, object4, object5);
+ @try {
+ return objc_msgSend(delegate, selector, object1, object2, object3, object4, object5);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return nil;
+}
+
+BOOL CallFormDelegateReturningBoolean(BOOL result, WebView *self, SEL selector, id object1, SEL selectorArg, id object2)
+{
+ id delegate = self->_private->formDelegate;
+ if (!delegate || ![delegate respondsToSelector:selector])
+ return result;
+ if (!self->_private->catchesDelegateExceptions)
+ return reinterpret_cast<BOOL (*)(id, SEL, id, SEL, id)>(objc_msgSend)(delegate, selector, object1, selectorArg, object2);
+ @try {
+ return reinterpret_cast<BOOL (*)(id, SEL, id, SEL, id)>(objc_msgSend)(delegate, selector, object1, selectorArg, object2);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return result;
+}
+
+@end
diff --git a/WebKit/mac/WebView/WebDynamicScrollBarsView.h b/WebKit/mac/WebView/WebDynamicScrollBarsView.h
index a0f8006..ce92b33 100644
--- a/WebKit/mac/WebView/WebDynamicScrollBarsView.h
+++ b/WebKit/mac/WebView/WebDynamicScrollBarsView.h
@@ -43,6 +43,7 @@ extern const int WebCoreScrollbarAlwaysOn;
BOOL suppressLayout;
BOOL suppressScrollers;
BOOL inUpdateScrollers;
+ unsigned inUpdateScrollersLayoutPass;
}
- (void)setAllowsHorizontalScrolling:(BOOL)flag; // This method is used by Safari, so it cannot be removed.
@end
diff --git a/WebKit/mac/WebView/WebDynamicScrollBarsView.m b/WebKit/mac/WebView/WebDynamicScrollBarsView.mm
index de19ef6..0cf2a98 100644
--- a/WebKit/mac/WebView/WebDynamicScrollBarsView.m
+++ b/WebKit/mac/WebView/WebDynamicScrollBarsView.mm
@@ -29,7 +29,11 @@
#import "WebDynamicScrollBarsViewInternal.h"
#import "WebDocument.h"
+#import "WebFrameInternal.h"
#import "WebFrameView.h"
+#import "WebHTMLViewInternal.h"
+#import <WebCore/Frame.h>
+#import <WebCore/FrameView.h>
#import <WebKitSystemInterface.h>
using namespace WebCore;
@@ -81,80 +85,108 @@ const int WebCoreScrollbarAlwaysOn = ScrollbarAlwaysOn;
#endif
}
+static const unsigned cMaxUpdateScrollbarsPass = 2;
+
- (void)updateScrollers
{
- // We need to do the work below twice in the case where a scroll bar disappears,
- // making the second layout have a wider width than the first. Doing it more than
- // twice would indicate some kind of infinite loop, so we do it at most twice.
- // It's quite efficient to do this work twice in the normal case, so we don't bother
- // trying to figure out of the second pass is needed or not.
- if (inUpdateScrollers)
- return;
-
- inUpdateScrollers = true;
-
- int pass;
BOOL hasVerticalScroller = [self hasVerticalScroller];
BOOL hasHorizontalScroller = [self hasHorizontalScroller];
- BOOL oldHasVertical = hasVerticalScroller;
- BOOL oldHasHorizontal = hasHorizontalScroller;
-
- for (pass = 0; pass < 2; pass++) {
- BOOL scrollsVertically;
- BOOL scrollsHorizontally;
-
- if (!suppressLayout && !suppressScrollers && (hScroll == ScrollbarAuto || vScroll == ScrollbarAuto)) {
- // Do a layout if pending, before checking if scrollbars are needed.
- // This fixes 2969367, although may introduce a slowdown in live resize performance.
- NSView *documentView = [self documentView];
- if (!documentView) {
- scrollsHorizontally = NO;
- scrollsVertically = NO;
- } else {
- if ((hasVerticalScroller != oldHasVertical ||
- hasHorizontalScroller != oldHasHorizontal || [documentView inLiveResize]) && [documentView conformsToProtocol:@protocol(WebDocumentView)]) {
- [(id <WebDocumentView>)documentView setNeedsLayout: YES];
- [(id <WebDocumentView>)documentView layout];
- }
-
- NSSize documentSize = [documentView frame].size;
- NSSize frameSize = [self frame].size;
-
- scrollsVertically = (vScroll == ScrollbarAlwaysOn) ||
- (vScroll == ScrollbarAuto && documentSize.height > frameSize.height);
- if (scrollsVertically)
- scrollsHorizontally = (hScroll == ScrollbarAlwaysOn) ||
- (hScroll == ScrollbarAuto && documentSize.width + [NSScroller scrollerWidth] > frameSize.width);
- else {
- scrollsHorizontally = (hScroll == ScrollbarAlwaysOn) ||
- (hScroll == ScrollbarAuto && documentSize.width > frameSize.width);
- if (scrollsHorizontally)
- scrollsVertically = (vScroll == ScrollbarAlwaysOn) ||
- (vScroll == ScrollbarAuto && documentSize.height + [NSScroller scrollerWidth] > frameSize.height);
- }
- }
- } else {
- scrollsHorizontally = (hScroll == ScrollbarAuto) ? hasHorizontalScroller : (hScroll == ScrollbarAlwaysOn);
- scrollsVertically = (vScroll == ScrollbarAuto) ? hasVerticalScroller : (vScroll == ScrollbarAlwaysOn);
+
+ BOOL newHasHorizontalScroller = hasHorizontalScroller;
+ BOOL newHasVerticalScroller = hasVerticalScroller;
+
+ BOOL needsLayout = NO;
+
+ NSView *documentView = [self documentView];
+ 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 (hasHorizontalScroller != newHasHorizontalScroller)
+ [self setHasHorizontalScroller:newHasHorizontalScroller];
+ if (hasVerticalScroller != newHasVerticalScroller)
+ [self setHasVerticalScroller:newHasVerticalScroller];
+ if (suppressScrollers) {
+ [[self verticalScroller] setNeedsDisplay:NO];
+ [[self horizontalScroller] setNeedsDisplay:NO];
}
+ inUpdateScrollers = NO;
+ return;
+ }
- if (hasVerticalScroller != scrollsVertically) {
- [self setHasVerticalScroller:scrollsVertically];
- hasVerticalScroller = scrollsVertically;
+ needsLayout = NO;
+
+ // 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 ([documentView isKindOfClass:[WebHTMLView class]]) {
+ WebHTMLView* htmlView = (WebHTMLView*)documentView;
+ if ([htmlView _needsLayout]) {
+ inUpdateScrollers = YES;
+ [(id <WebDocumentView>)documentView layout];
+ inUpdateScrollers = NO;
}
+ }
- if (hasHorizontalScroller != scrollsHorizontally) {
- [self setHasHorizontalScroller:scrollsHorizontally];
- hasHorizontalScroller = scrollsHorizontally;
- }
+ NSSize documentSize = [documentView frame].size;
+ NSSize visibleSize = [self documentVisibleRect].size;
+ NSSize frameSize = [self frame].size;
+
+ if (hScroll == ScrollbarAuto) {
+ newHasHorizontalScroller = documentSize.width > visibleSize.width;
+ if (newHasHorizontalScroller && !inUpdateScrollersLayoutPass && documentSize.height <= frameSize.height && documentSize.width <= frameSize.width)
+ newHasHorizontalScroller = NO;
+ }
+
+ if (vScroll == ScrollbarAuto) {
+ newHasVerticalScroller = documentSize.height > visibleSize.height;
+ if (newHasVerticalScroller && !inUpdateScrollersLayoutPass && documentSize.height <= frameSize.height && documentSize.width <= frameSize.width)
+ newHasVerticalScroller = NO;
}
- if (suppressScrollers) {
- [[self verticalScroller] setNeedsDisplay: NO];
- [[self horizontalScroller] setNeedsDisplay: 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)
+ newHasVerticalScroller = NO;
+ if (!newHasVerticalScroller && hasVerticalScroller && hScroll != ScrollbarAlwaysOn)
+ newHasHorizontalScroller = NO;
+
+ if (hasHorizontalScroller != newHasHorizontalScroller) {
+ inUpdateScrollers = YES;
+ [self setHasHorizontalScroller:newHasHorizontalScroller];
+ inUpdateScrollers = NO;
+ needsLayout = YES;
}
- inUpdateScrollers = false;
+ if (hasVerticalScroller != newHasVerticalScroller) {
+ inUpdateScrollers = YES;
+ [self setHasVerticalScroller:newHasVerticalScroller];
+ inUpdateScrollers = NO;
+ needsLayout = YES;
+ }
+
+ if (needsLayout && inUpdateScrollersLayoutPass < cMaxUpdateScrollbarsPass &&
+ [documentView conformsToProtocol:@protocol(WebDocumentView)]) {
+ inUpdateScrollersLayoutPass++;
+ [(id <WebDocumentView>)documentView setNeedsLayout:YES];
+ [(id <WebDocumentView>)documentView layout];
+ NSSize newDocumentSize = [documentView frame].size;
+ if (NSEqualSizes(documentSize, newDocumentSize)) {
+ // The layout with the new scroll state had no impact on
+ // the document's overall size, so updateScrollers didn't get called.
+ // Recur manually.
+ [self updateScrollers];
+ }
+ inUpdateScrollersLayoutPass--;
+ }
}
// Make the horizontal and vertical scroll bars come and go as needed.
@@ -186,6 +218,15 @@ const int WebCoreScrollbarAlwaysOn = ScrollbarAlwaysOn;
[[self horizontalScroller] setNeedsDisplay: NO];
}
#endif
+
+#if USE(ACCELERATED_COMPOSITING) && defined(BUILDING_ON_LEOPARD)
+ NSView *documentView = [self documentView];
+ if ([documentView isKindOfClass:[WebHTMLView class]]) {
+ WebHTMLView *htmlView = (WebHTMLView *)documentView;
+ if ([htmlView _isUsingAcceleratedCompositing])
+ [htmlView _updateLayerHostingViewPosition];
+ }
+#endif
}
- (BOOL)allowsHorizontalScrolling
diff --git a/WebKit/mac/WebView/WebFrame.mm b/WebKit/mac/WebView/WebFrame.mm
index 2aa5fab..c03ef58 100644
--- a/WebKit/mac/WebView/WebFrame.mm
+++ b/WebKit/mac/WebView/WebFrame.mm
@@ -46,18 +46,21 @@
#import "WebIconFetcherInternal.h"
#import "WebKitStatisticsPrivate.h"
#import "WebKitVersionChecks.h"
+#import "WebNSObjectExtras.h"
#import "WebNSURLExtras.h"
#import "WebScriptDebugger.h"
#import "WebViewInternal.h"
#import <JavaScriptCore/APICast.h>
+#import <WebCore/AXObjectCache.h>
#import <WebCore/AccessibilityObject.h>
#import <WebCore/AnimationController.h>
-#import <WebCore/AXObjectCache.h>
+#import <WebCore/CSSMutableStyleDeclaration.h>
#import <WebCore/ColorMac.h>
#import <WebCore/DOMImplementation.h>
#import <WebCore/DocLoader.h>
#import <WebCore/DocumentFragment.h>
#import <WebCore/EventHandler.h>
+#import <WebCore/EventNames.h>
#import <WebCore/Frame.h>
#import <WebCore/FrameLoader.h>
#import <WebCore/FrameTree.h>
@@ -68,21 +71,22 @@
#import <WebCore/LegacyWebArchive.h>
#import <WebCore/Page.h>
#import <WebCore/PluginData.h>
+#import <WebCore/RenderLayer.h>
#import <WebCore/RenderPart.h>
#import <WebCore/RenderView.h>
-#import <WebCore/RenderLayer.h>
#import <WebCore/ReplaceSelectionCommand.h>
+#import <WebCore/RuntimeApplicationChecks.h>
+#import <WebCore/ScriptValue.h>
#import <WebCore/SmartReplace.h>
#import <WebCore/TextIterator.h>
+#import <WebCore/ThreadCheck.h>
#import <WebCore/TypingCommand.h>
#import <WebCore/htmlediting.h>
-#import <WebCore/ScriptController.h>
-#import <WebCore/ScriptValue.h>
#import <WebCore/markup.h>
#import <WebCore/visible_units.h>
#import <runtime/JSLock.h>
#import <runtime/JSValue.h>
-#include <wtf/CurrentTime.h>
+#import <wtf/CurrentTime.h>
using namespace std;
using namespace WebCore;
@@ -90,7 +94,8 @@ using namespace HTMLNames;
using JSC::JSGlobalObject;
using JSC::JSLock;
-using JSC::JSValuePtr;
+using JSC::JSValue;
+using JSC::SilenceAssertionsOnly;
/*
Here is the current behavior matrix for four types of navigations:
@@ -128,6 +133,14 @@ NSString *WebPageCacheEntryDateKey = @"WebPageCacheEntryDateKey";
NSString *WebPageCacheDataSourceKey = @"WebPageCacheDataSourceKey";
NSString *WebPageCacheDocumentViewKey = @"WebPageCacheDocumentViewKey";
+NSString *WebFrameMainDocumentError = @"WebFrameMainDocumentErrorKey";
+NSString *WebFrameHasPlugins = @"WebFrameHasPluginsKey";
+NSString *WebFrameHasUnloadListener = @"WebFrameHasUnloadListenerKey";
+NSString *WebFrameUsesDatabases = @"WebFrameUsesDatabasesKey";
+NSString *WebFrameUsesGeolocation = @"WebFrameUsesGeolocationKey";
+NSString *WebFrameUsesApplicationCache = @"WebFrameUsesApplicationCacheKey";
+NSString *WebFrameCanSuspendActiveDOMObjects = @"WebFrameCanSuspendActiveDOMObjectsKey";
+
// FIXME: Remove when this key becomes publicly defined
NSString *NSAccessibilityEnhancedUserInterfaceAttribute = @"AXEnhancedUserInterface";
@@ -158,76 +171,6 @@ NSString *NSAccessibilityEnhancedUserInterfaceAttribute = @"AXEnhancedUserInterf
@end
-CSSStyleDeclaration* core(DOMCSSStyleDeclaration *declaration)
-{
- return [declaration _CSSStyleDeclaration];
-}
-
-DOMCSSStyleDeclaration *kit(WebCore::CSSStyleDeclaration* declaration)
-{
- return [DOMCSSStyleDeclaration _wrapCSSStyleDeclaration:declaration];
-}
-
-Element* core(DOMElement *element)
-{
- return [element _element];
-}
-
-DOMElement *kit(Element* element)
-{
- return [DOMElement _wrapElement:element];
-}
-
-Node* core(DOMNode *node)
-{
- return [node _node];
-}
-
-DOMNode *kit(Node* node)
-{
- return [DOMNode _wrapNode:node];
-}
-
-Document* core(DOMDocument *document)
-{
- return [document _document];
-}
-
-DOMDocument *kit(Document* document)
-{
- return [DOMDocument _wrapDocument:document];
-}
-
-DocumentFragment* core(DOMDocumentFragment *fragment)
-{
- return [fragment _documentFragment];
-}
-
-DOMDocumentFragment *kit(DocumentFragment* fragment)
-{
- return [DOMDocumentFragment _wrapDocumentFragment:fragment];
-}
-
-HTMLElement* core(DOMHTMLElement *element)
-{
- return [element _HTMLElement];
-}
-
-DOMHTMLElement *kit(HTMLElement *element)
-{
- return [DOMHTMLElement _wrapHTMLElement:element];
-}
-
-Range* core(DOMRange *range)
-{
- return [range _range];
-}
-
-DOMRange *kit(Range* range)
-{
- return [DOMRange _wrapRange:range];
-}
-
EditableLinkBehavior core(WebKitEditableLinkBehavior editableLinkBehavior)
{
switch (editableLinkBehavior) {
@@ -385,22 +328,24 @@ WebView *getWebView(WebFrame *webFrame)
Frame* coreFrame = _private->coreFrame;
for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) {
- WebFrame *webFrame = kit(frame);
- // Don't call setDrawsBackground:YES here because it may be NO because of a load
- // in progress; WebFrameLoaderClient keeps it set to NO during the load process.
- if (!drawsBackground)
- [[[webFrame frameView] _scrollView] setDrawsBackground:NO];
- [[[webFrame frameView] _scrollView] setBackgroundColor:backgroundColor];
- id documentView = [[webFrame frameView] documentView];
- if ([documentView respondsToSelector:@selector(setDrawsBackground:)])
- [documentView setDrawsBackground:drawsBackground];
- if ([documentView respondsToSelector:@selector(setBackgroundColor:)])
- [documentView setBackgroundColor:backgroundColor];
- if (frame && frame->view()) {
- frame->view()->setTransparent(!drawsBackground);
- Color color = colorFromNSColor([backgroundColor colorUsingColorSpaceName:NSDeviceRGBColorSpace]);
- frame->view()->setBaseBackgroundColor(color);
- frame->view()->setShouldUpdateWhileOffscreen([webView shouldUpdateWhileOffscreen]);
+ if ([webView _usesDocumentViews]) {
+ // Don't call setDrawsBackground:YES here because it may be NO because of a load
+ // in progress; WebFrameLoaderClient keeps it set to NO during the load process.
+ WebFrame *webFrame = kit(frame);
+ if (!drawsBackground)
+ [[[webFrame frameView] _scrollView] setDrawsBackground:NO];
+ [[[webFrame frameView] _scrollView] setBackgroundColor:backgroundColor];
+ id documentView = [[webFrame frameView] documentView];
+ if ([documentView respondsToSelector:@selector(setDrawsBackground:)])
+ [documentView setDrawsBackground:drawsBackground];
+ if ([documentView respondsToSelector:@selector(setBackgroundColor:)])
+ [documentView setBackgroundColor:backgroundColor];
+ }
+
+ if (FrameView* view = frame->view()) {
+ view->setTransparent(!drawsBackground);
+ view->setBaseBackgroundColor(colorFromNSColor([backgroundColor colorUsingColorSpaceName:NSDeviceRGBColorSpace]));
+ view->setShouldUpdateWhileOffscreen([webView shouldUpdateWhileOffscreen]);
}
}
}
@@ -437,21 +382,27 @@ WebView *getWebView(WebFrame *webFrame)
- (BOOL)_hasSelection
{
- id documentView = [_private->webFrameView documentView];
+ if ([getWebView(self) _usesDocumentViews]) {
+ id documentView = [_private->webFrameView documentView];
- // optimization for common case to avoid creating potentially large selection string
- if ([documentView isKindOfClass:[WebHTMLView class]])
- if (Frame* coreFrame = _private->coreFrame)
- return coreFrame->selection()->isRange();
+ // optimization for common case to avoid creating potentially large selection string
+ if ([documentView isKindOfClass:[WebHTMLView class]])
+ if (Frame* coreFrame = _private->coreFrame)
+ return coreFrame->selection()->isRange();
- if ([documentView conformsToProtocol:@protocol(WebDocumentText)])
- return [[documentView selectedString] length] > 0;
-
- return NO;
+ if ([documentView conformsToProtocol:@protocol(WebDocumentText)])
+ return [[documentView selectedString] length] > 0;
+
+ return NO;
+ }
+
+ Frame* coreFrame = _private->coreFrame;
+ return coreFrame && coreFrame->selection()->isRange();
}
- (void)_clearSelection
{
+ ASSERT([getWebView(self) _usesDocumentViews]);
id documentView = [_private->webFrameView documentView];
if ([documentView conformsToProtocol:@protocol(WebDocumentText)])
[documentView deselectAll];
@@ -532,7 +483,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
size_t size = nodesVector->size();
NSMutableArray *nodes = [NSMutableArray arrayWithCapacity:size];
for (size_t i = 0; i < size; ++i)
- [nodes addObject:[DOMNode _wrapNode:(*nodesVector)[i]]];
+ [nodes addObject:kit((*nodesVector)[i])];
return nodes;
}
@@ -540,7 +491,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
{
// FIXME: This is always "for interchange". Is that right? See the previous method.
Vector<Node*> nodeList;
- NSString *markupString = createMarkup([range _range], nodes ? &nodeList : 0, AnnotateForInterchange);
+ NSString *markupString = createMarkup(core(range), nodes ? &nodeList : 0, AnnotateForInterchange);
if (nodes)
*nodes = [self _nodesFromList:&nodeList];
@@ -556,7 +507,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
{
// This will give a system malloc'd buffer that can be turned directly into an NSString
unsigned length;
- UChar* buf = plainTextToMallocAllocatedBuffer([range _range], length, true);
+ UChar* buf = plainTextToMallocAllocatedBuffer(core(range), length, true);
if (!buf)
return [NSString string];
@@ -592,7 +543,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
}
if (!_private->coreFrame || !_private->coreFrame->document() || !_private->coreFrame->view()) return pages;
- RenderView* root = static_cast<RenderView *>(_private->coreFrame->document()->renderer());
+ RenderView* root = toRenderView(_private->coreFrame->document()->renderer());
if (!root) return pages;
FrameView* view = _private->coreFrame->view();
@@ -644,7 +595,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
{
ASSERT(_private->coreFrame->document());
- JSValuePtr result = _private->coreFrame->loader()->executeScript(string, forceUserGesture).jsValue();
+ JSValue result = _private->coreFrame->loader()->executeScript(string, forceUserGesture).jsValue();
if (!_private->coreFrame) // In case the script removed our frame from the page.
return @"";
@@ -655,25 +606,25 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
if (!result || !result.isBoolean() && !result.isString() && !result.isNumber())
return @"";
- JSLock lock(false);
+ JSLock lock(SilenceAssertionsOnly);
return String(result.toString(_private->coreFrame->script()->globalObject()->globalExec()));
}
- (NSRect)_caretRectAtNode:(DOMNode *)node offset:(int)offset affinity:(NSSelectionAffinity)affinity
{
- VisiblePosition visiblePosition([node _node], offset, static_cast<EAffinity>(affinity));
+ VisiblePosition visiblePosition(core(node), offset, static_cast<EAffinity>(affinity));
return visiblePosition.absoluteCaretBounds();
}
- (NSRect)_firstRectForDOMRange:(DOMRange *)range
{
- return _private->coreFrame->firstRectForRange([range _range]);
+ return _private->coreFrame->firstRectForRange(core(range));
}
- (void)_scrollDOMRangeToVisible:(DOMRange *)range
{
NSRect rangeRect = [self _firstRectForDOMRange:range];
- Node *startNode = [[range startContainer] _node];
+ Node *startNode = core([range startContainer]);
if (startNode && startNode->renderer()) {
RenderLayer *layer = startNode->renderer()->enclosingLayer();
@@ -698,7 +649,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
if (!_private->coreFrame || !_private->coreFrame->document())
return nil;
- RenderView* root = static_cast<RenderView *>(_private->coreFrame->document()->renderer());
+ RenderView* root = toRenderView(_private->coreFrame->document()->renderer());
if (!root)
return nil;
return _private->coreFrame->document()->axObjectCache()->getOrCreate(root)->wrapper();
@@ -715,7 +666,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
SelectionController selection;
selection.setSelection(_private->coreFrame->selection()->selection());
selection.modify(alteration, direction, granularity);
- return [DOMRange _wrapRange:selection.toNormalizedRange().get()];
+ return kit(selection.toNormalizedRange().get());
}
- (TextGranularity)_selectionGranularity
@@ -777,7 +728,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
- (DOMRange *)_convertNSRangeToDOMRange:(NSRange)nsrange
{
- return [DOMRange _wrapRange:[self _convertToDOMRange:nsrange].get()];
+ return kit([self _convertToDOMRange:nsrange].get());
}
- (NSRange)convertDOMRangeToNSRange:(DOMRange *)range
@@ -788,12 +739,12 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
- (NSRange)_convertDOMRangeToNSRange:(DOMRange *)range
{
- return [self _convertToNSRange:[range _range]];
+ return [self _convertToNSRange:core(range)];
}
- (DOMRange *)_markDOMRange
{
- return [DOMRange _wrapRange:_private->coreFrame->mark().toNormalizedRange().get()];
+ return kit(_private->coreFrame->mark().toNormalizedRange().get());
}
// Given proposedRange, returns an extended range that includes adjacent whitespace that should
@@ -801,8 +752,8 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
// the text surrounding the deletion.
- (DOMRange *)_smartDeleteRangeForProposedRange:(DOMRange *)proposedRange
{
- Node *startContainer = [[proposedRange startContainer] _node];
- Node *endContainer = [[proposedRange endContainer] _node];
+ Node* startContainer = core([proposedRange startContainer]);
+ Node* endContainer = core([proposedRange endContainer]);
if (startContainer == nil || endContainer == nil)
return nil;
@@ -824,9 +775,9 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
RefPtr<Range> range = _private->coreFrame->document()->createRange();
int exception = 0;
- range->setStart(newStart.node(), newStart.m_offset, exception);
- range->setEnd(newStart.node(), newStart.m_offset, exception);
- return [DOMRange _wrapRange:range.get()];
+ range->setStart(newStart.node(), newStart.deprecatedEditingOffset(), exception);
+ range->setEnd(newStart.node(), newStart.deprecatedEditingOffset(), exception);
+ return kit(range.get());
}
// Determines whether whitespace needs to be added around aString to preserve proper spacing and
@@ -842,8 +793,8 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
*afterString = nil;
// inspect destination
- Node *startContainer = [[rangeToReplace startContainer] _node];
- Node *endContainer = [[rangeToReplace endContainer] _node];
+ Node *startContainer = core([rangeToReplace startContainer]);
+ Node *endContainer = core([rangeToReplace endContainer]);
Position startPos(startContainer, [rangeToReplace startOffset]);
Position endPos(endContainer, [rangeToReplace endOffset]);
@@ -890,28 +841,28 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
- (DOMDocumentFragment *)_documentFragmentWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString
{
if (!_private->coreFrame || !_private->coreFrame->document())
- return 0;
+ return nil;
- return [DOMDocumentFragment _wrapDocumentFragment:createFragmentFromMarkup(_private->coreFrame->document(), markupString, baseURLString).get()];
+ return kit(createFragmentFromMarkup(_private->coreFrame->document(), markupString, baseURLString).get());
}
- (DOMDocumentFragment *)_documentFragmentWithNodesAsParagraphs:(NSArray *)nodes
{
if (!_private->coreFrame || !_private->coreFrame->document())
- return 0;
+ return nil;
NSEnumerator *nodeEnum = [nodes objectEnumerator];
Vector<Node*> nodesVector;
DOMNode *node;
while ((node = [nodeEnum nextObject]))
- nodesVector.append([node _node]);
+ nodesVector.append(core(node));
- return [DOMDocumentFragment _wrapDocumentFragment:createFragmentFromNodes(_private->coreFrame->document(), nodesVector).get()];
+ return kit(createFragmentFromNodes(_private->coreFrame->document(), nodesVector).get());
}
- (void)_replaceSelectionWithNode:(DOMNode *)node selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle
{
- DOMDocumentFragment *fragment = [DOMDocumentFragment _wrapDocumentFragment:_private->coreFrame->document()->createDocumentFragment().get()];
+ DOMDocumentFragment *fragment = kit(_private->coreFrame->document()->createDocumentFragment().get());
[fragment appendChild:node];
[self _replaceSelectionWithFragment:fragment selectReplacement:selectReplacement smartReplace:smartReplace matchStyle:matchStyle];
}
@@ -939,7 +890,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
VisiblePosition previous = position.previous();
if (previous.isNotNull()) {
- DOMRange *previousCharacterRange = [DOMRange _wrapRange:makeRange(previous, position).get()];
+ DOMRange *previousCharacterRange = kit(makeRange(previous, position).get());
NSRect rect = [self _firstRectForDOMRange:previousCharacterRange];
if (NSPointInRect(point, rect))
return previousCharacterRange;
@@ -947,7 +898,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
VisiblePosition next = position.next();
if (next.isNotNull()) {
- DOMRange *nextCharacterRange = [DOMRange _wrapRange:makeRange(position, next).get()];
+ DOMRange *nextCharacterRange = kit(makeRange(position, next).get());
NSRect rect = [self _firstRectForDOMRange:nextCharacterRange];
if (NSPointInRect(point, rect))
return nextCharacterRange;
@@ -960,14 +911,14 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
{
if (!_private->coreFrame || !_private->coreFrame->typingStyle())
return nil;
- return [DOMCSSStyleDeclaration _wrapCSSStyleDeclaration:_private->coreFrame->typingStyle()->copy().get()];
+ return kit(_private->coreFrame->typingStyle()->copy().get());
}
- (void)_setTypingStyle:(DOMCSSStyleDeclaration *)style withUndoAction:(EditAction)undoAction
{
if (!_private->coreFrame)
return;
- _private->coreFrame->computeAndSetTypingStyle([style _CSSStyleDeclaration], undoAction);
+ _private->coreFrame->computeAndSetTypingStyle(core(style), undoAction);
}
- (void)_dragSourceMovedTo:(NSPoint)windowLoc
@@ -977,6 +928,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
FrameView* view = _private->coreFrame->view();
if (!view)
return;
+ ASSERT([getWebView(self) _usesDocumentViews]);
// FIXME: These are fake modifier keys here, but they should be real ones instead.
PlatformMouseEvent event(IntPoint(windowLoc), globalPoint(windowLoc, [view->platformWidget() window]),
LeftButton, MouseEventMoved, 0, false, false, false, false, currentTime());
@@ -990,6 +942,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
FrameView* view = _private->coreFrame->view();
if (!view)
return;
+ ASSERT([getWebView(self) _usesDocumentViews]);
// FIXME: These are fake modifier keys here, but they should be real ones instead.
PlatformMouseEvent event(IntPoint(windowLoc), globalPoint(windowLoc, [view->platformWidget() window]),
LeftButton, MouseEventMoved, 0, false, false, false, false, currentTime());
@@ -1097,7 +1050,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
- (unsigned)_pendingFrameUnloadEventCount
{
- return _private->coreFrame->eventHandler()->pendingFrameUnloadEventCount();
+ return _private->coreFrame->domWindow()->pendingUnloadEventListeners();
}
- (WebIconFetcher *)fetchApplicationIcon:(id)target
@@ -1150,7 +1103,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
if (!controller)
return false;
- Node* coreNode = [node _node];
+ Node* coreNode = core(node);
if (!coreNode || !coreNode->renderer())
return false;
@@ -1167,7 +1120,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
if (!controller)
return false;
- Node* coreNode = [node _node];
+ Node* coreNode = core(node);
if (!coreNode || !coreNode->renderer())
return false;
@@ -1192,7 +1145,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
if (_private->coreFrame->selection()->isNone() || !fragment)
return;
- applyCommand(ReplaceSelectionCommand::create(_private->coreFrame->document(), [fragment _documentFragment], selectReplacement, smartReplace, matchStyle));
+ applyCommand(ReplaceSelectionCommand::create(_private->coreFrame->document(), core(fragment), selectReplacement, smartReplace, matchStyle));
_private->coreFrame->revealSelection(ScrollAlignment::alignToEdgeIfNeeded);
}
@@ -1208,6 +1161,40 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
[self _replaceSelectionWithFragment:fragment selectReplacement:selectReplacement smartReplace:smartReplace matchStyle:NO];
}
+- (NSMutableDictionary *)_cacheabilityDictionary
+{
+ NSMutableDictionary *result = [NSMutableDictionary dictionary];
+
+ FrameLoader* frameLoader = _private->coreFrame->loader();
+ DocumentLoader* documentLoader = frameLoader->documentLoader();
+ if (documentLoader && !documentLoader->mainDocumentError().isNull())
+ [result setObject:(NSError *)documentLoader->mainDocumentError() forKey:WebFrameMainDocumentError];
+
+ if (frameLoader->containsPlugins())
+ [result setObject:[NSNumber numberWithBool:YES] forKey:WebFrameHasPlugins];
+
+ if (DOMWindow* domWindow = _private->coreFrame->domWindow()) {
+ if (domWindow->hasEventListener(eventNames().unloadEvent))
+ [result setObject:[NSNumber numberWithBool:YES] forKey:WebFrameHasUnloadListener];
+
+ if (domWindow->optionalApplicationCache())
+ [result setObject:[NSNumber numberWithBool:YES] forKey:WebFrameUsesApplicationCache];
+ }
+
+ if (Document* document = _private->coreFrame->document()) {
+ if (document->hasOpenDatabases())
+ [result setObject:[NSNumber numberWithBool:YES] forKey:WebFrameUsesDatabases];
+
+ if (document->usingGeolocation())
+ [result setObject:[NSNumber numberWithBool:YES] forKey:WebFrameUsesGeolocation];
+
+ if (!document->canSuspendActiveDOMObjects())
+ [result setObject:[NSNumber numberWithBool:YES] forKey:WebFrameCanSuspendActiveDOMObjects];
+ }
+
+ return result;
+}
+
@end
@implementation WebFrame
@@ -1246,6 +1233,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
- (WebFrameView *)frameView
{
+ ASSERT(!getWebView(self) || [getWebView(self) _usesDocumentViews]);
return _private->webFrameView;
}
@@ -1254,8 +1242,17 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
return getWebView(self);
}
+static bool needsMicrosoftMessengerDOMDocumentWorkaround()
+{
+ static bool needsWorkaround = applicationIsMicrosoftMessenger() && [[[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey] compare:@"7.1" options:NSNumericSearch] == NSOrderedAscending;
+ return needsWorkaround;
+}
+
- (DOMDocument *)DOMDocument
{
+ if (needsMicrosoftMessengerDOMDocumentWorkaround() && !pthread_main_np())
+ return nil;
+
Frame* coreFrame = _private->coreFrame;
if (!coreFrame)
return nil;
@@ -1314,6 +1311,9 @@ static NSURL *createUniqueWebDataURL()
- (void)_loadData:(NSData *)data MIMEType:(NSString *)MIMEType textEncodingName:(NSString *)encodingName baseURL:(NSURL *)baseURL unreachableURL:(NSURL *)unreachableURL
{
+ if (!pthread_main_np())
+ return [[self _webkit_invokeOnMainThread] _loadData:data MIMEType:MIMEType textEncodingName:encodingName baseURL:baseURL unreachableURL:unreachableURL];
+
KURL responseURL;
if (!baseURL) {
baseURL = blankURL();
@@ -1333,6 +1333,8 @@ static NSURL *createUniqueWebDataURL()
- (void)loadData:(NSData *)data MIMEType:(NSString *)MIMEType textEncodingName:(NSString *)encodingName baseURL:(NSURL *)baseURL
{
+ WebCoreThreadViolationCheckRoundTwo();
+
if (!MIMEType)
MIMEType = @"text/html";
[self _loadData:data MIMEType:MIMEType textEncodingName:encodingName baseURL:baseURL unreachableURL:nil];
@@ -1346,11 +1348,15 @@ static NSURL *createUniqueWebDataURL()
- (void)loadHTMLString:(NSString *)string baseURL:(NSURL *)baseURL
{
+ WebCoreThreadViolationCheckRoundTwo();
+
[self _loadHTMLString:string baseURL:baseURL unreachableURL:nil];
}
- (void)loadAlternateHTMLString:(NSString *)string baseURL:(NSURL *)baseURL forUnreachableURL:(NSURL *)unreachableURL
{
+ WebCoreThreadViolationCheckRoundTwo();
+
[self _loadHTMLString:string baseURL:baseURL unreachableURL:unreachableURL];
}
@@ -1369,8 +1375,7 @@ static NSURL *createUniqueWebDataURL()
- (void)reload
{
- if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_RELOAD_FROM_ORIGIN) &&
- [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.Safari"])
+ if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_RELOAD_FROM_ORIGIN) && applicationIsSafari())
_private->coreFrame->loader()->reload(GetCurrentKeyModifiers() & shiftKey);
else
_private->coreFrame->loader()->reload(false);
diff --git a/WebKit/mac/WebView/WebFrameInternal.h b/WebKit/mac/WebView/WebFrameInternal.h
index 473e691..10a3015 100644
--- a/WebKit/mac/WebView/WebFrameInternal.h
+++ b/WebKit/mac/WebView/WebFrameInternal.h
@@ -63,30 +63,9 @@ namespace WebCore {
typedef WebCore::HistoryItem WebCoreHistoryItem;
-WebCore::CSSStyleDeclaration* core(DOMCSSStyleDeclaration *);
-DOMCSSStyleDeclaration *kit(WebCore::CSSStyleDeclaration*);
-
WebCore::Frame* core(WebFrame *);
WebFrame *kit(WebCore::Frame *);
-WebCore::Element* core(DOMElement *);
-DOMElement *kit(WebCore::Element*);
-
-WebCore::Node* core(DOMNode *);
-DOMNode *kit(WebCore::Node*);
-
-WebCore::Document* core(DOMDocument *);
-DOMDocument *kit(WebCore::Document*);
-
-WebCore::DocumentFragment* core(DOMDocumentFragment *);
-DOMDocumentFragment *kit(WebCore::DocumentFragment*);
-
-WebCore::HTMLElement* core(DOMHTMLElement *);
-DOMHTMLElement *kit(WebCore::HTMLElement*);
-
-WebCore::Range* core(DOMRange *);
-DOMRange *kit(WebCore::Range*);
-
WebCore::Page* core(WebView *);
WebView *kit(WebCore::Page*);
diff --git a/WebKit/mac/WebView/WebFramePrivate.h b/WebKit/mac/WebView/WebFramePrivate.h
index e3e3540..8e7a2ef 100644
--- a/WebKit/mac/WebView/WebFramePrivate.h
+++ b/WebKit/mac/WebView/WebFramePrivate.h
@@ -45,6 +45,14 @@ extern NSString *WebPageCacheEntryDateKey;
extern NSString *WebPageCacheDataSourceKey;
extern NSString *WebPageCacheDocumentViewKey;
+extern NSString *WebFrameMainDocumentError;
+extern NSString *WebFrameHasPlugins;
+extern NSString *WebFrameHasUnloadListener;
+extern NSString *WebFrameUsesDatabases;
+extern NSString *WebFrameUsesGeolocation;
+extern NSString *WebFrameUsesApplicationCache;
+extern NSString *WebFrameCanSuspendActiveDOMObjects;
+
typedef enum {
WebFrameLoadTypeStandard,
WebFrameLoadTypeBack,
@@ -55,7 +63,8 @@ typedef enum {
WebFrameLoadTypeSame, // user loads same URL again (but not reload button)
WebFrameLoadTypeInternal, // maps to WebCore::FrameLoadTypeRedirectWithLockedBackForwardList
WebFrameLoadTypeReplace,
- WebFrameLoadTypeReloadFromOrigin
+ WebFrameLoadTypeReloadFromOrigin,
+ WebFrameLoadTypeBackWMLDeckNotAccessible
} WebFrameLoadType;
@interface WebFrame (WebPrivate)
@@ -100,4 +109,5 @@ typedef enum {
- (void)_replaceSelectionWithText:(NSString *)text selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
- (void)_replaceSelectionWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
+- (NSMutableDictionary *)_cacheabilityDictionary;
@end
diff --git a/WebKit/mac/WebView/WebFrameView.mm b/WebKit/mac/WebView/WebFrameView.mm
index bc51bb5..1a460ea 100644
--- a/WebKit/mac/WebView/WebFrameView.mm
+++ b/WebKit/mac/WebView/WebFrameView.mm
@@ -307,20 +307,21 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
[WebViewFactory createSharedFactory];
[WebKeyGenerator createSharedGenerator];
- NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
-
+// FIXME: Remove the NSAppKitVersionNumberWithDeferredWindowDisplaySupport check once
+// once AppKit's Deferred Window Display support is available.
+#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD) || !defined(NSAppKitVersionNumberWithDeferredWindowDisplaySupport)
// CoreGraphics deferred updates are disabled if WebKitEnableCoalescedUpdatesPreferenceKey is NO
- // or has no value. For compatibility with Mac OS X 10.4.6, deferred updates are off by default.
- if (![defaults boolForKey:WebKitEnableDeferredUpdatesPreferenceKey])
+ // or has no value. For compatibility with Mac OS X 10.5 and lower, deferred updates are off by default.
+ if (![[NSUserDefaults standardUserDefaults] boolForKey:WebKitEnableDeferredUpdatesPreferenceKey])
WKDisableCGDeferredUpdates();
-
+#endif
if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_MAIN_THREAD_EXCEPTIONS))
setDefaultThreadViolationBehavior(LogOnFirstThreadViolation, ThreadViolationRoundOne);
bool throwExceptionsForRoundTwo = WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_ROUND_TWO_MAIN_THREAD_EXCEPTIONS);
#ifdef MAIL_THREAD_WORKAROUND
// Even if old Mail is linked with new WebKit, don't throw exceptions.
- if (needMailThreadWorkaround())
+ if ([WebResource _needMailThreadWorkaroundIfCalledOffMainThread])
throwExceptionsForRoundTwo = false;
#endif
if (!throwExceptionsForRoundTwo)
@@ -492,9 +493,15 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
- (void)setFrameSize:(NSSize)size
{
- // See WebFrameLoaderClient::provisionalLoadStarted.
- if (!NSEqualSizes(size, [self frame].size) && [[[self webFrame] webView] drawsBackground])
- [[self _scrollView] setDrawsBackground:YES];
+ if (!NSEqualSizes(size, [self frame].size)) {
+ // See WebFrameLoaderClient::provisionalLoadStarted.
+ if ([[[self webFrame] webView] drawsBackground])
+ [[self _scrollView] setDrawsBackground:YES];
+ if (Frame* coreFrame = [self _web_frame]) {
+ if (FrameView* coreFrameView = coreFrame->view())
+ coreFrameView->setNeedsLayout();
+ }
+ }
[super setFrameSize:size];
}
@@ -518,31 +525,49 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
return frame->eventHandler()->scrollOverflow(direction, granularity);
}
-- (void)scrollToBeginningOfDocument:(id)sender
+- (BOOL)_scrollToBeginningOfDocument
{
- if (![self _scrollOverflowInDirection:ScrollUp granularity:ScrollByDocument]) {
+ if ([self _scrollOverflowInDirection:ScrollUp granularity:ScrollByDocument])
+ return YES;
+ if (![self _hasScrollBars])
+ return NO;
+ NSPoint point = [[[self _scrollView] documentView] frame].origin;
+ return [[self _contentView] _scrollTo:&point animate:YES];
+}
- if (![self _hasScrollBars]) {
- [[self _largestChildWithScrollBars] scrollToBeginningOfDocument:sender];
- return;
- }
+- (BOOL)_scrollToEndOfDocument
+{
+ if ([self _scrollOverflowInDirection:ScrollDown granularity:ScrollByDocument])
+ return YES;
+ if (![self _hasScrollBars])
+ return NO;
+ NSRect frame = [[[self _scrollView] documentView] frame];
+ NSPoint point = NSMakePoint(frame.origin.x, NSMaxY(frame));
+ return [[self _contentView] _scrollTo:&point animate:YES];
+}
- [[self _contentView] scrollPoint:[[[self _scrollView] documentView] frame].origin];
+- (void)scrollToBeginningOfDocument:(id)sender
+{
+ if ([self _scrollToBeginningOfDocument])
+ return;
+
+ if (WebFrameView *child = [self _largestChildWithScrollBars]) {
+ if ([child _scrollToBeginningOfDocument])
+ return;
}
+ [[self nextResponder] tryToPerform:@selector(scrollToBeginningOfDocument:) with:sender];
}
- (void)scrollToEndOfDocument:(id)sender
{
- if (![self _scrollOverflowInDirection:ScrollDown granularity:ScrollByDocument]) {
+ if ([self _scrollToEndOfDocument])
+ return;
- if (![self _hasScrollBars]) {
- [[self _largestChildWithScrollBars] scrollToEndOfDocument:sender];
+ if (WebFrameView *child = [self _largestChildWithScrollBars]) {
+ if ([child _scrollToEndOfDocument])
return;
- }
-
- NSRect frame = [[[self _scrollView] documentView] frame];
- [[self _contentView] scrollPoint:NSMakePoint(frame.origin.x, NSMaxY(frame))];
}
+ [[self nextResponder] tryToPerform:@selector(scrollToEndOfDocument:) with:sender];
}
- (void)_goBack
@@ -653,12 +678,14 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
- (void)scrollLineUp:(id)sender
{
- [self _scrollLineVertically:YES];
+ if (![self _scrollLineVertically:YES])
+ [[self nextResponder] tryToPerform:@selector(scrollLineUp:) with:sender];
}
- (void)scrollLineDown:(id)sender
{
- [self _scrollLineVertically:NO];
+ if (![self _scrollLineVertically:NO])
+ [[self nextResponder] tryToPerform:@selector(scrollLineDown:) with:sender];
}
- (BOOL)_firstResponderIsFormControl
diff --git a/WebKit/mac/WebView/WebHTMLRepresentation.mm b/WebKit/mac/WebView/WebHTMLRepresentation.mm
index 3f69870..39489e8 100644
--- a/WebKit/mac/WebView/WebHTMLRepresentation.mm
+++ b/WebKit/mac/WebView/WebHTMLRepresentation.mm
@@ -28,7 +28,7 @@
#import "WebHTMLRepresentation.h"
-#import "DOMNodeInternal.h"
+#import "DOMElementInternal.h"
#import "DOMRangeInternal.h"
#import "WebArchive.h"
#import "WebBasePluginPackage.h"
@@ -47,6 +47,7 @@
#import <WebCore/FrameLoader.h>
#import <WebCore/FrameLoaderClient.h>
#import <WebCore/HTMLFormControlElement.h>
+#import <WebCore/HTMLFormElement.h>
#import <WebCore/HTMLInputElement.h>
#import <WebCore/HTMLNames.h>
#import <WebCore/MIMETypeRegistry.h>
@@ -259,13 +260,13 @@ static NSArray *concatenateArrays(NSArray *first, NSArray *second)
- (NSAttributedString *)attributedStringFrom:(DOMNode *)startNode startOffset:(int)startOffset to:(DOMNode *)endNode endOffset:(int)endOffset
{
- return [NSAttributedString _web_attributedStringFromRange:Range::create([startNode _node]->document(), [startNode _node], startOffset, [endNode _node], endOffset).get()];
+ return [NSAttributedString _web_attributedStringFromRange:Range::create(core(startNode)->document(), core(startNode), startOffset, core(endNode), endOffset).get()];
}
static HTMLFormElement* formElementFromDOMElement(DOMElement *element)
{
- Node* node = [element _node];
- return node && node->hasTagName(formTag) ? static_cast<HTMLFormElement *>(node) : 0;
+ Element* node = core(element);
+ return node && node->hasTagName(formTag) ? static_cast<HTMLFormElement*>(node) : 0;
}
- (DOMElement *)elementWithName:(NSString *)name inForm:(DOMElement *)form
@@ -277,7 +278,7 @@ static HTMLFormElement* formElementFromDOMElement(DOMElement *element)
AtomicString targetName = name;
for (unsigned i = 0; i < elements.size(); i++) {
HTMLFormControlElement* elt = elements[i];
- if (elt->name() == targetName)
+ if (elt->formControlName() == targetName)
return kit(elt);
}
return nil;
@@ -285,7 +286,7 @@ static HTMLFormElement* formElementFromDOMElement(DOMElement *element)
static HTMLInputElement* inputElementFromDOMElement(DOMElement* element)
{
- Node* node = [element _node];
+ Element* node = core(element);
return node && node->hasTagName(inputTag) ? static_cast<HTMLInputElement*>(node) : 0;
}
diff --git a/WebKit/mac/WebView/WebHTMLView.mm b/WebKit/mac/WebView/WebHTMLView.mm
index c4ca174..d58c765 100644
--- a/WebKit/mac/WebView/WebHTMLView.mm
+++ b/WebKit/mac/WebView/WebHTMLView.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
* (C) 2006, 2007 Graham Dennis (graham.dennis@gmail.com)
*
* Redistribution and use in source and binary forms, with or without
@@ -29,14 +29,17 @@
#import "WebHTMLView.h"
+#import "DOMCSSStyleDeclarationInternal.h"
+#import "DOMDocumentFragmentInternal.h"
+#import "DOMDocumentInternal.h"
#import "DOMNodeInternal.h"
#import "DOMRangeInternal.h"
#import "WebArchive.h"
-#import "WebNetscapePluginView.h"
#import "WebClipView.h"
-#import "WebDOMOperationsPrivate.h"
+#import "WebDOMOperationsInternal.h"
#import "WebDataSourceInternal.h"
#import "WebDefaultUIDelegate.h"
+#import "WebDelegateImplementationCaching.h"
#import "WebDocumentInternal.h"
#import "WebDynamicScrollBarsView.h"
#import "WebEditingDelegate.h"
@@ -50,7 +53,6 @@
#import "WebKitNSStringExtras.h"
#import "WebKitVersionChecks.h"
#import "WebLocalizableStrings.h"
-#import "WebNodeHighlight.h"
#import "WebNSAttributedStringExtras.h"
#import "WebNSEventExtras.h"
#import "WebNSFileManagerExtras.h"
@@ -60,17 +62,20 @@
#import "WebNSPrintOperationExtras.h"
#import "WebNSURLExtras.h"
#import "WebNSViewExtras.h"
+#import "WebNetscapePluginView.h"
+#import "WebNodeHighlight.h"
#import "WebPluginController.h"
#import "WebPreferences.h"
#import "WebPreferencesPrivate.h"
#import "WebResourcePrivate.h"
#import "WebStringTruncator.h"
+#import "WebTextCompletionController.h"
#import "WebTypesInternal.h"
#import "WebUIDelegatePrivate.h"
#import "WebViewInternal.h"
#import <AppKit/NSAccessibility.h>
#import <ApplicationServices/ApplicationServices.h>
-#import <dlfcn.h>
+#import <WebCore/CSSMutableStyleDeclaration.h>
#import <WebCore/CachedImage.h>
#import <WebCore/CachedResourceClient.h>
#import <WebCore/ColorMac.h>
@@ -78,38 +83,38 @@
#import <WebCore/ContextMenuController.h>
#import <WebCore/Document.h>
#import <WebCore/DocumentFragment.h>
+#import <WebCore/DragController.h>
#import <WebCore/Editor.h>
#import <WebCore/EditorDeleteAction.h>
#import <WebCore/Element.h>
#import <WebCore/EventHandler.h>
#import <WebCore/ExceptionHandlers.h>
-#import <WebCore/DragController.h>
#import <WebCore/FloatRect.h>
#import <WebCore/FocusController.h>
#import <WebCore/Frame.h>
#import <WebCore/FrameLoader.h>
#import <WebCore/FrameView.h>
-#import <WebCore/HitTestResult.h>
#import <WebCore/HTMLNames.h>
+#import <WebCore/HitTestResult.h>
#import <WebCore/Image.h>
#import <WebCore/KeyboardEvent.h>
#import <WebCore/LegacyWebArchive.h>
#import <WebCore/MIMETypeRegistry.h>
#import <WebCore/Page.h>
#import <WebCore/PlatformKeyboardEvent.h>
-#import <WebCore/PlatformMouseEvent.h>
#import <WebCore/Range.h>
#import <WebCore/SelectionController.h>
#import <WebCore/SharedBuffer.h>
#import <WebCore/SimpleFontData.h>
#import <WebCore/Text.h>
#import <WebCore/WebCoreObjCExtras.h>
-#import <WebCore/WebCoreTextRenderer.h>
+#import <WebCore/WebFontCache.h>
#import <WebCore/markup.h>
#import <WebKit/DOM.h>
#import <WebKit/DOMExtensions.h>
#import <WebKit/DOMPrivate.h>
#import <WebKitSystemInterface.h>
+#import <dlfcn.h>
#import <limits>
#import <runtime/InitializeThreading.h>
@@ -144,6 +149,7 @@ using namespace WTF;
static IMP oldSetCursorIMP = NULL;
#ifdef BUILDING_ON_TIGER
+
static IMP oldResetCursorRectsIMP = NULL;
static BOOL canSetCursor = YES;
@@ -169,7 +175,9 @@ static void setCursor(NSCursor* self, SEL cmd)
if (canSetCursor)
oldSetCursorIMP(self, cmd);
}
+
#else
+
static void setCursor(NSWindow* self, SEL cmd, NSPoint point)
{
NSView* view = [[self _web_borderView] hitTest:point];
@@ -184,21 +192,8 @@ static void setCursor(NSWindow* self, SEL cmd, NSPoint point)
}
oldSetCursorIMP(self, cmd, point);
}
-#endif
-#if USE(ACCELERATED_COMPOSITING)
-@interface WebLayerHostingView : NSView
-@end
-
-@implementation WebLayerHostingView
-// Empty NSViews intercept rightMouseDown: to do context menu handling, but we need the WebLayerHostingView to
-// let right mouse clicks through.
-- (void)rightMouseDown:(NSEvent *)theEvent
-{
- [[self nextResponder] performSelector:_cmd withObject:theEvent];
-}
-@end
-#endif // USE(ACCELERATED_COMPOSITING)
+#endif
extern "C" {
@@ -206,6 +201,7 @@ extern "C" {
extern NSString *NSMarkedClauseSegmentAttributeName;
extern NSString *NSTextInputReplacementRangeAttributeName;
+
}
@interface NSView (WebNSViewDetails)
@@ -224,7 +220,6 @@ extern NSString *NSTextInputReplacementRangeAttributeName;
@interface NSWindow (WebNSWindowDetails)
- (id)_newFirstResponderAfterResigning;
-- (void)_setForceActiveControls:(BOOL)flag;
@end
@interface NSAttributedString (WebNSAttributedStringDetails)
@@ -335,6 +330,32 @@ static CachedResourceClient* promisedDataClient()
- (void)_web_clearPrintingModeRecursive;
@end
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+
+@interface WebHTMLView (WebHTMLViewTextCheckingInternal)
+- (void)orderFrontSubstitutionsPanel:(id)sender;
+- (BOOL)smartInsertDeleteEnabled;
+- (void)setSmartInsertDeleteEnabled:(BOOL)flag;
+- (void)toggleSmartInsertDelete:(id)sender;
+- (BOOL)isAutomaticQuoteSubstitutionEnabled;
+- (void)setAutomaticQuoteSubstitutionEnabled:(BOOL)flag;
+- (void)toggleAutomaticQuoteSubstitution:(id)sender;
+- (BOOL)isAutomaticLinkDetectionEnabled;
+- (void)setAutomaticLinkDetectionEnabled:(BOOL)flag;
+- (void)toggleAutomaticLinkDetection:(id)sender;
+- (BOOL)isAutomaticDashSubstitutionEnabled;
+- (void)setAutomaticDashSubstitutionEnabled:(BOOL)flag;
+- (void)toggleAutomaticDashSubstitution:(id)sender;
+- (BOOL)isAutomaticTextReplacementEnabled;
+- (void)setAutomaticTextReplacementEnabled:(BOOL)flag;
+- (void)toggleAutomaticTextReplacement:(id)sender;
+- (BOOL)isAutomaticSpellingCorrectionEnabled;
+- (void)setAutomaticSpellingCorrectionEnabled:(BOOL)flag;
+- (void)toggleAutomaticSpellingCorrection:(id)sender;
+@end
+
+#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;
@end
@@ -366,24 +387,6 @@ static CachedResourceClient* promisedDataClient()
- (void)_web_setObjectIfNotNil:(id)object forKey:(id)key;
@end
-// Handles the complete: text command
-@interface WebTextCompleteController : NSObject <NSTableViewDelegate, NSTableViewDataSource> {
-@private
- WebHTMLView *_view;
- NSWindow *_popupWindow;
- NSTableView *_tableView;
- NSArray *_completions;
- NSString *_originalString;
- int prefixLength;
-}
-- (id)initWithHTMLView:(WebHTMLView *)view;
-- (void)doCompletion;
-- (void)endRevertingChange:(BOOL)revertChange moveLeft:(BOOL)goLeft;
-- (BOOL)popupWindowIsOpen;
-- (BOOL)filterKeyDown:(NSEvent *)event;
-- (void)_reflectSelection;
-@end
-
struct WebHTMLViewInterpretKeyEventsParameters {
KeyboardEvent* event;
BOOL eventWasHandled;
@@ -396,7 +399,6 @@ struct WebHTMLViewInterpretKeyEventsParameters {
@interface WebHTMLViewPrivate : NSObject {
@public
BOOL closed;
- BOOL needsLayout;
BOOL needsToApplyStyles;
BOOL ignoringMouseDraggedEvents;
BOOL printing;
@@ -404,7 +406,6 @@ struct WebHTMLViewInterpretKeyEventsParameters {
BOOL observingMouseMovedNotifications;
BOOL observingSuperviewNotifications;
BOOL observingWindowNotifications;
- BOOL resigningFirstResponder;
id savedSubviews;
BOOL subviewsSetAside;
@@ -416,8 +417,10 @@ struct WebHTMLViewInterpretKeyEventsParameters {
NSEvent *mouseDownEvent; // Kept after handling the event.
BOOL handlingMouseDownEvent;
NSEvent *keyDownEvent; // Kept after handling the event.
-
- NSSize lastLayoutSize;
+
+ // A WebHTMLView has a single input context, but we return nil when in non-editable content to avoid making input methods do their work.
+ // This state is saved each time selection changes, because computing it causes style recalc, which is not always safe to do.
+ BOOL exposeInputContext;
NSPoint lastScrollPosition;
@@ -439,7 +442,7 @@ struct WebHTMLViewInterpretKeyEventsParameters {
BOOL nextResponderDisabledOnce;
#endif
- WebTextCompleteController *compController;
+ WebTextCompletionController *completionController;
BOOL transparentBackground;
@@ -449,7 +452,6 @@ struct WebHTMLViewInterpretKeyEventsParameters {
WebDataSource *dataSource;
WebCore::CachedImage* promisedDragTIFFDataSource;
- CFRunLoopTimerRef updateFocusedAndActiveStateTimer;
CFRunLoopTimerRef updateMouseoverTimer;
SEL selectorForDoCommandBySelector;
@@ -514,14 +516,13 @@ static NSCellStateValue kit(TriState state)
ASSERT(!autoscrollTimer);
ASSERT(!autoscrollTriggerEvent);
- ASSERT(!updateFocusedAndActiveStateTimer);
ASSERT(!updateMouseoverTimer);
[mouseDownEvent release];
[keyDownEvent release];
[pluginController release];
[toolTip release];
- [compController release];
+ [completionController release];
[dataSource release];
[highlighters release];
if (promisedDragTIFFDataSource)
@@ -546,7 +547,7 @@ static NSCellStateValue kit(TriState state)
[keyDownEvent release];
[pluginController release];
[toolTip release];
- [compController release];
+ [completionController release];
[dataSource release];
[highlighters release];
if (promisedDragTIFFDataSource)
@@ -556,7 +557,7 @@ static NSCellStateValue kit(TriState state)
keyDownEvent = nil;
pluginController = nil;
toolTip = nil;
- compController = nil;
+ completionController = nil;
dataSource = nil;
highlighters = nil;
promisedDragTIFFDataSource = 0;
@@ -684,6 +685,13 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
subresources:0]))
return fragment;
+ if ([types containsObject:NSRTFDPboardType] &&
+ (fragment = [self _documentFragmentFromPasteboard:pasteboard
+ forType:NSRTFDPboardType
+ inContext:context
+ subresources:0]))
+ return fragment;
+
if ([types containsObject:NSRTFPboardType] &&
(fragment = [self _documentFragmentFromPasteboard:pasteboard
forType:NSRTFPboardType
@@ -691,16 +699,16 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
subresources:0]))
return fragment;
- if ([types containsObject:NSRTFDPboardType] &&
+ if ([types containsObject:NSTIFFPboardType] &&
(fragment = [self _documentFragmentFromPasteboard:pasteboard
- forType:NSRTFDPboardType
+ forType:NSTIFFPboardType
inContext:context
subresources:0]))
return fragment;
- if ([types containsObject:NSTIFFPboardType] &&
+ if ([types containsObject:NSPDFPboardType] &&
(fragment = [self _documentFragmentFromPasteboard:pasteboard
- forType:NSTIFFPboardType
+ forType:NSPDFPboardType
inContext:context
subresources:0]))
return fragment;
@@ -746,7 +754,7 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
NSArray *types = [pasteboard types];
if ([types containsObject:NSStringPboardType])
- return [pasteboard stringForType:NSStringPboardType];
+ return [[pasteboard stringForType:NSStringPboardType] precomposedStringWithCanonicalMapping];
NSAttributedString *attributedString = nil;
NSString *string;
@@ -780,20 +788,29 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
- (void)_pasteWithPasteboard:(NSPasteboard *)pasteboard allowPlainText:(BOOL)allowPlainText
{
+ WebView *webView = [[self _webView] retain];
+ [webView _setInsertionPasteboard:pasteboard];
+
DOMRange *range = [self _selectedRange];
- DOMDocumentFragment *fragment = [self _documentFragmentFromPasteboard:pasteboard
- inContext:range allowPlainText:allowPlainText];
- WebFrame *frame = [self _frame];
- if (fragment && [self _shouldInsertFragment:fragment replacingDOMRange:[self _selectedRange] givenAction:WebViewInsertActionPasted]) {
- [frame _replaceSelectionWithFragment:fragment selectReplacement:NO smartReplace:[self _canSmartReplaceWithPasteboard:pasteboard] matchStyle:NO];
- }
+ 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];
+
+ [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
@@ -834,7 +851,6 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
[notificationCenter removeObserver:self name:NSWindowDidBecomeKeyNotification object:nil];
[notificationCenter removeObserver:self name:NSWindowDidResignKeyNotification object:nil];
[notificationCenter removeObserver:self name:NSWindowWillCloseNotification object:window];
- [notificationCenter removeObserver:self name:WKWindowWillOrderOnScreenNotification() object:window];
_private->observingWindowNotifications = false;
}
@@ -950,15 +966,6 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
_private->mouseDownEvent = event;
}
-- (void)_cancelUpdateFocusedAndActiveStateTimer
-{
- if (_private->updateFocusedAndActiveStateTimer) {
- CFRunLoopTimerInvalidate(_private->updateFocusedAndActiveStateTimer);
- CFRelease(_private->updateFocusedAndActiveStateTimer);
- _private->updateFocusedAndActiveStateTimer = NULL;
- }
-}
-
- (void)_cancelUpdateMouseoverTimer
{
if (_private->updateMouseoverTimer) {
@@ -1139,17 +1146,11 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
- (void)_frameOrBoundsChanged
{
- if (!NSEqualSizes(_private->lastLayoutSize, [(NSClipView *)[self superview] documentVisibleRect].size)) {
- [self setNeedsLayout:YES];
- [self setNeedsDisplay:YES];
- [_private->compController endRevertingChange:NO moveLeft:NO];
- }
-
NSPoint origin = [[self superview] bounds].origin;
if (!NSEqualPoints(_private->lastScrollPosition, origin)) {
if (Frame* coreFrame = core([self _frame]))
coreFrame->eventHandler()->sendScrollEvent();
- [_private->compController endRevertingChange:NO moveLeft:NO];
+ [_private->completionController endRevertingChange:NO moveLeft:NO];
WebView *webView = [self _webView];
[[webView _UIDelegateForwarder] webView:webView didScrollDocumentInFrameView:[self _frameView]];
@@ -1165,6 +1166,10 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
_updateMouseoverTimerCallback, &context);
CFRunLoopAddTimer(CFRunLoopGetCurrent(), _private->updateMouseoverTimer, kCFRunLoopDefaultMode);
}
+
+#if USE(ACCELERATED_COMPOSITING) && defined(BUILDING_ON_LEOPARD)
+ [self _updateLayerHostingViewPosition];
+#endif
}
- (void)_setAsideSubviews
@@ -1267,12 +1272,20 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
} else if (wasInPrintingMode)
[self _web_clearPrintingModeRecursive];
-#ifdef BUILDING_ON_TIGER
-
+#ifndef BUILDING_ON_TIGER
+ // 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
+ // 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];
+ }
+#else
// Because Tiger does not have viewWillDraw we need to do layout here.
[self _web_layoutIfNeededRecursive];
[_subviews makeObjectsPerformSelector:@selector(_propagateDirtyRectsToOpaqueAncestors)];
-
#endif
[self _setAsideSubviews];
@@ -1381,10 +1394,13 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
// when there is HTML overlapping the view, see bug 4361626)
// 4) NSAccessibilityHitTest relies on this for checking the cursor position.
// Our check for that is whether the event is NSFlagsChanged. This works
- // for VoiceOver's cntl-opt-f5 command (move focus to item under cursor)
- // and Dictionary's cmd-cntl-D (open dictionary popup for item under cursor).
+ // for VoiceOver's Control-Option-F5 command (move focus to item under cursor)
+ // and Dictionary's Command-Control-D (open dictionary popup for item under cursor).
// This is of course a hack.
+ if (_private->closed)
+ return nil;
+
BOOL captureHitsOnSubviews;
if (forceNSViewHitTest)
captureHitsOnSubviews = NO;
@@ -1398,8 +1414,14 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
|| [event type] == NSFlagsChanged);
}
- if (!captureHitsOnSubviews)
- return [super hitTest:point];
+ if (!captureHitsOnSubviews) {
+ NSView* hitView = [super hitTest:point];
+#if USE(ACCELERATED_COMPOSITING)
+ if (_private && hitView == _private->layerHostingView)
+ hitView = self;
+#endif
+ return hitView;
+ }
if ([[self superview] mouse:point inRect:[self frame]])
return self;
return nil;
@@ -1551,18 +1573,18 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
if (lastHitView != view && lastHitView && [lastHitView _frame]) {
// If we are moving out of a view (or frame), let's pretend the mouse moved
// all the way out of that view. But we have to account for scrolling, because
- // khtml doesn't understand our clipping.
+ // WebCore doesn't understand our clipping.
NSRect visibleRect = [[[[lastHitView _frame] frameView] _scrollView] documentVisibleRect];
float yScroll = visibleRect.origin.y;
float xScroll = visibleRect.origin.x;
- event = [NSEvent mouseEventWithType:NSMouseMoved
- location:NSMakePoint(-1 - xScroll, -1 - yScroll )
- modifierFlags:[[NSApp currentEvent] modifierFlags]
- timestamp:[NSDate timeIntervalSinceReferenceDate]
- windowNumber:[[view window] windowNumber]
- context:[[NSApp currentEvent] context]
- eventNumber:0 clickCount:0 pressure:0];
+ NSEvent *event = [NSEvent mouseEventWithType:NSMouseMoved
+ location:NSMakePoint(-1 - xScroll, -1 - yScroll)
+ modifierFlags:[[NSApp currentEvent] modifierFlags]
+ timestamp:[NSDate timeIntervalSinceReferenceDate]
+ windowNumber:[[view window] windowNumber]
+ context:[[NSApp currentEvent] context]
+ eventNumber:0 clickCount:0 pressure:0];
if (Frame* lastHitCoreFrame = core([lastHitView _frame]))
lastHitCoreFrame->eventHandler()->mouseMoved(event);
}
@@ -1582,7 +1604,7 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
{
static NSArray *types = nil;
if (!types) {
- types = [[NSArray alloc] initWithObjects:WebArchivePboardType, NSHTMLPboardType, NSFilenamesPboardType, NSTIFFPboardType,
+ types = [[NSArray alloc] initWithObjects:WebArchivePboardType, NSHTMLPboardType, NSFilenamesPboardType, NSTIFFPboardType, NSPDFPboardType,
#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD)
NSPICTPboardType,
#endif
@@ -1736,7 +1758,7 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
return [[self _webView] smartInsertDeleteEnabled] && [[pasteboard types] containsObject:WebSmartPastePboardType];
}
-- (void)_startAutoscrollTimer: (NSEvent *)triggerEvent
+- (void)_startAutoscrollTimer:(NSEvent *)triggerEvent
{
if (_private->autoscrollTimer == nil) {
_private->autoscrollTimer = [[NSTimer scheduledTimerWithTimeInterval:AUTOSCROLL_INTERVAL
@@ -1910,13 +1932,6 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
[_private->highlighters removeObjectForKey:type];
}
-- (void)_updateFocusedAndActiveState
-{
- [self _cancelUpdateFocusedAndActiveStateTimer];
-
- [[self _webView] _updateFocusedAndActiveStateForFrame:[self _frame]];
-}
-
- (void)_writeSelectionToPasteboard:(NSPasteboard *)pasteboard
{
ASSERT([self _hasSelection]);
@@ -1946,7 +1961,6 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
_private->closed = YES;
[self _cancelUpdateMouseoverTimer];
- [self _cancelUpdateFocusedAndActiveStateTimer];
[self _clearLastHitViewIfSelf];
[self _removeMouseMovedObserverUnconditionally];
[self _removeWindowObservers];
@@ -2057,6 +2071,16 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
[resource release];
return fragment;
}
+ if (pboardType == NSPDFPboardType) {
+ WebResource *resource = [[WebResource alloc] initWithData:[pasteboard dataForType:NSPDFPboardType]
+ URL:uniqueURLWithRelativePart(@"application.pdf")
+ MIMEType:@"application/pdf"
+ textEncodingName:nil
+ frameName:nil];
+ DOMDocumentFragment *fragment = [[self _dataSource] _documentFragmentWithImageResource:resource];
+ [resource release];
+ return fragment;
+ }
#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD)
if (pboardType == NSPICTPboardType) {
WebResource *resource = [[WebResource alloc] initWithData:[pasteboard dataForType:NSPICTPboardType]
@@ -2173,23 +2197,14 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
@end
-@interface NSString (WebHTMLViewFileInternal)
-- (BOOL)matchesExtensionEquivalent:(NSString *)extension;
-@end
-
-@implementation NSString (WebHTMLViewFileInternal)
-
-- (BOOL)matchesExtensionEquivalent:(NSString *)extension
+static bool matchesExtensionOrEquivalent(NSString *filename, NSString *extension)
{
- if ([self hasSuffix:extension])
- return YES;
- else if ([extension isEqualToString:@"jpeg"] && [self hasSuffix:@"jpg"])
- return YES;
- return NO;
+ NSString *extensionAsSuffix = [@"." stringByAppendingString:extension];
+ return [filename _webkit_hasCaseInsensitiveSuffix:extensionAsSuffix]
+ || ([extension _webkit_isCaseInsensitiveEqualToString:@"jpeg"]
+ && [filename _webkit_hasCaseInsensitiveSuffix:@".jpg"]);
}
-@end
-
#ifdef BUILDING_ON_TIGER
// The following is a workaround for
@@ -2245,7 +2260,6 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
_private = [[WebHTMLViewPrivate alloc] init];
_private->pluginController = [[WebPluginController alloc] initWithDocumentView:self];
- _private->needsLayout = YES;
return self;
}
@@ -2637,6 +2651,58 @@ WEBCORE_COMMAND(yankAndSelect)
return YES;
}
#endif
+
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+ if (action == @selector(orderFrontSubstitutionsPanel:)) {
+ NSMenuItem *menuItem = (NSMenuItem *)item;
+ if ([menuItem isKindOfClass:[NSMenuItem class]]) {
+ BOOL panelShowing = [[[NSSpellChecker sharedSpellChecker] substitutionsPanel] isVisible];
+ [menuItem setTitle:panelShowing
+ ? UI_STRING("Hide Substitutions", "menu item title")
+ : UI_STRING("Show Substitutions", "menu item title")];
+ }
+ return [self _canEdit];
+ }
+ // FIXME 4799134: WebView is the bottleneck for this logic, but we must validate
+ // the selector here because we implement it here, and we must implement it here because the AppKit
+ // code checks the first responder.
+ if (action == @selector(toggleSmartInsertDelete:)) {
+ NSMenuItem *menuItem = (NSMenuItem *)item;
+ if ([menuItem isKindOfClass:[NSMenuItem class]])
+ [menuItem setState:[self smartInsertDeleteEnabled] ? NSOnState : NSOffState];
+ return [self _canEdit];
+ }
+ if (action == @selector(toggleAutomaticQuoteSubstitution:)) {
+ NSMenuItem *menuItem = (NSMenuItem *)item;
+ if ([menuItem isKindOfClass:[NSMenuItem class]])
+ [menuItem setState:[self isAutomaticQuoteSubstitutionEnabled] ? NSOnState : NSOffState];
+ return [self _canEdit];
+ }
+ if (action == @selector(toggleAutomaticLinkDetection:)) {
+ NSMenuItem *menuItem = (NSMenuItem *)item;
+ if ([menuItem isKindOfClass:[NSMenuItem class]])
+ [menuItem setState:[self isAutomaticLinkDetectionEnabled] ? NSOnState : NSOffState];
+ return [self _canEdit];
+ }
+ if (action == @selector(toggleAutomaticDashSubstitution:)) {
+ NSMenuItem *menuItem = (NSMenuItem *)item;
+ if ([menuItem isKindOfClass:[NSMenuItem class]])
+ [menuItem setState:[self isAutomaticDashSubstitutionEnabled] ? NSOnState : NSOffState];
+ return [self _canEdit];
+ }
+ if (action == @selector(toggleAutomaticTextReplacement:)) {
+ NSMenuItem *menuItem = (NSMenuItem *)item;
+ if ([menuItem isKindOfClass:[NSMenuItem class]])
+ [menuItem setState:[self isAutomaticTextReplacementEnabled] ? NSOnState : NSOffState];
+ return [self _canEdit];
+ }
+ if (action == @selector(toggleAutomaticSpellingCorrection:)) {
+ NSMenuItem *menuItem = (NSMenuItem *)item;
+ if ([menuItem isKindOfClass:[NSMenuItem class]])
+ [menuItem setState:[self isAutomaticSpellingCorrectionEnabled] ? NSOnState : NSOffState];
+ return [self _canEdit];
+ }
+#endif
Editor::Command command = [self coreCommandBySelector:action];
if (command.isSupported()) {
@@ -2745,14 +2811,6 @@ WEBCORE_COMMAND(yankAndSelect)
- (void)addSuperviewObservers
{
- // We watch the bounds of our superview, so that we can do a layout when the size
- // of the superview changes. This is different from other scrollable things that don't
- // need this kind of thing because their layout doesn't change.
-
- // We need to pay attention to both height and width because our "layout" has to change
- // to extend the background the full height of the space and because some elements have
- // sizes that are based on the total size of the view.
-
if (_private->observingSuperviewNotifications)
return;
@@ -2765,7 +2823,7 @@ WEBCORE_COMMAND(yankAndSelect)
[notificationCenter addObserver:self selector:@selector(_frameOrBoundsChanged) name:NSViewBoundsDidChangeNotification object:superview];
// In addition to registering for frame/bounds change notifications, call -_frameOrBoundsChanged.
- // It will check the current size/scroll against the previous layout's size/scroll. We need to
+ // It will check the current scroll against the previous layout's scroll. We need to
// do this here to catch the case where the WebView is laid out at one size, removed from its
// window, resized, and inserted into another window. Our frame/bounds changed notifications
// will not be sent in that situation, since we only watch for changes while in the view hierarchy.
@@ -2787,7 +2845,6 @@ WEBCORE_COMMAND(yankAndSelect)
[notificationCenter addObserver:self selector:@selector(windowDidBecomeKey:) name:NSWindowDidBecomeKeyNotification object:nil];
[notificationCenter addObserver:self selector:@selector(windowDidResignKey:) name:NSWindowDidResignKeyNotification object:nil];
[notificationCenter addObserver:self selector:@selector(windowWillClose:) name:NSWindowWillCloseNotification object:window];
- [notificationCenter addObserver:self selector:@selector(windowWillOrderOnScreen:) name:WKWindowWillOrderOnScreenNotification() object:window];
_private->observingWindowNotifications = true;
}
@@ -2803,12 +2860,6 @@ WEBCORE_COMMAND(yankAndSelect)
[self addSuperviewObservers];
}
-static void _updateFocusedAndActiveStateTimerCallback(CFRunLoopTimerRef timer, void *info)
-{
- WebHTMLView *view = (WebHTMLView *)info;
- [view _updateFocusedAndActiveState];
-}
-
- (void)viewWillMoveToWindow:(NSWindow *)window
{
// Don't do anything if we aren't initialized. This happens
@@ -2823,7 +2874,6 @@ static void _updateFocusedAndActiveStateTimerCallback(CFRunLoopTimerRef timer, v
[self _removeWindowObservers];
[self _removeSuperviewObservers];
[self _cancelUpdateMouseoverTimer];
- [self _cancelUpdateFocusedAndActiveStateTimer];
[[self _pluginController] stopAllPlugins];
}
@@ -2844,19 +2894,6 @@ static void _updateFocusedAndActiveStateTimerCallback(CFRunLoopTimerRef timer, v
[self addSuperviewObservers];
[self addMouseMovedObserver];
- // Schedule this update, rather than making the call right now.
- // The reason is that placing the caret in the just-installed view requires
- // the HTML/XML document to be available on the WebCore side, but it is not
- // at the time this code is running. However, it will be there on the next
- // crank of the run loop. Doing this helps to make a blinking caret appear
- // in a new, empty window "automatic".
- if (!_private->updateFocusedAndActiveStateTimer) {
- CFRunLoopTimerContext context = { 0, self, NULL, NULL, NULL };
- _private->updateFocusedAndActiveStateTimer = CFRunLoopTimerCreate(NULL, CFAbsoluteTimeGetCurrent(), 0, 0, 0,
- _updateFocusedAndActiveStateTimerCallback, &context);
- CFRunLoopAddTimer(CFRunLoopGetCurrent(), _private->updateFocusedAndActiveStateTimer, kCFRunLoopDefaultMode);
- }
-
[[self _pluginController] startAllPlugins];
_private->lastScrollPosition = NSZeroPoint;
@@ -2921,7 +2958,7 @@ static void _updateFocusedAndActiveStateTimerCallback(CFRunLoopTimerRef timer, v
{
[self reapplyStyles];
- if (!_private->needsLayout && ![[self _frame] _needsLayout])
+ if (![self _needsLayout])
return;
#ifdef LOG_TIMES
@@ -2931,10 +2968,8 @@ static void _updateFocusedAndActiveStateTimerCallback(CFRunLoopTimerRef timer, v
LOG(View, "%@ doing layout", self);
Frame* coreFrame = core([self _frame]);
- if (!coreFrame) {
- _private->needsLayout = NO;
+ if (!coreFrame)
return;
- }
if (FrameView* coreView = coreFrame->view()) {
if (minPageWidth > 0.0)
@@ -2945,11 +2980,7 @@ static void _updateFocusedAndActiveStateTimerCallback(CFRunLoopTimerRef timer, v
coreView->adjustViewSize();
}
}
- _private->needsLayout = NO;
- if (!_private->printing)
- _private->lastLayoutSize = [(NSClipView *)[self superview] documentVisibleRect].size;
-
#ifdef LOG_TIMES
double thisTime = CFAbsoluteTimeGetCurrent() - start;
LOG(Timing, "%s layout seconds = %f", [self URL], thisTime);
@@ -2964,49 +2995,64 @@ static void _updateFocusedAndActiveStateTimerCallback(CFRunLoopTimerRef timer, v
// Deliver mouseup events to the DOM for button 2.
- (void)rightMouseUp:(NSEvent *)event
{
+ // There's a chance that if we run a nested event loop the event will be released.
+ // Retaining and then autoreleasing prevents that from causing a problem later here or
+ // inside AppKit code.
+ [[event retain] autorelease];
+
[super rightMouseUp:event];
+
if (Frame* coreframe = core([self _frame]))
coreframe->eventHandler()->mouseUp(event);
}
- (NSMenu *)menuForEvent:(NSEvent *)event
{
- [_private->compController endRevertingChange:NO moveLeft:NO];
+ // There's a chance that if we run a nested event loop the event will be released.
+ // Retaining and then autoreleasing prevents that from causing a problem later here or
+ // inside AppKit code.
+ [[event retain] autorelease];
- _private->handlingMouseDownEvent = YES;
- BOOL handledEvent = NO;
- Frame* coreFrame = core([self _frame]);
+ [_private->completionController endRevertingChange:NO moveLeft:NO];
- if (!coreFrame) {
- _private->handlingMouseDownEvent = NO;
+ RefPtr<Frame> coreFrame = core([self _frame]);
+ if (!coreFrame)
return nil;
- }
Page* page = coreFrame->page();
if (!page)
return nil;
+ // Match behavior of other browsers by sending a mousedown event for right clicks.
+ _private->handlingMouseDownEvent = YES;
page->contextMenuController()->clearContextMenu();
- // Match behavior of other browsers by sending an onmousedown event for right clicks.
coreFrame->eventHandler()->mouseDown(event);
- handledEvent = coreFrame->eventHandler()->sendContextMenuEvent(PlatformMouseEvent(event));
+ BOOL handledEvent = coreFrame->eventHandler()->sendContextMenuEvent(event);
_private->handlingMouseDownEvent = NO;
if (!handledEvent)
return nil;
+ // Re-get page, since it might have gone away during event handling.
+ page = coreFrame->page();
+ if (!page)
+ return nil;
+
ContextMenu* coreMenu = page->contextMenuController()->contextMenu();
if (!coreMenu)
return nil;
NSArray* menuItems = coreMenu->platformDescription();
- NSMenu* menu = nil;
- if (menuItems && [menuItems count] > 0) {
- menu = [[[NSMenu alloc] init] autorelease];
- for (unsigned i = 0; i < [menuItems count]; i++)
- [menu addItem:[menuItems objectAtIndex:i]];
- }
+ if (!menuItems)
+ return nil;
+ NSUInteger count = [menuItems count];
+ if (!count)
+ return nil;
+
+ NSMenu* menu = [[[NSMenu alloc] init] autorelease];
+ for (NSUInteger i = 0; i < count; i++)
+ [menu addItem:[menuItems objectAtIndex:i]];
return menu;
}
@@ -3041,7 +3087,14 @@ static void _updateFocusedAndActiveStateTimerCallback(CFRunLoopTimerRef timer, v
- (void)setNeedsLayout: (BOOL)flag
{
LOG(View, "%@ setNeedsLayout:%@", self, flag ? @"YES" : @"NO");
- _private->needsLayout = flag;
+ if (!flag)
+ return; // There's no way to say you don't need a layout.
+ if (Frame* frame = core([self _frame])) {
+ if (frame->document() && frame->document()->inPageCache())
+ return;
+ if (FrameView* view = frame->view())
+ view->setNeedsLayout();
+ }
}
- (void)setNeedsToApplyStyles: (BOOL)flag
@@ -3123,9 +3176,13 @@ static void _updateFocusedAndActiveStateTimerCallback(CFRunLoopTimerRef timer, v
#if USE(ACCELERATED_COMPOSITING)
if ([[self _webView] _needsOneShotDrawingSynchronization]) {
- // Disable screen updates so that drawing into the NSView and
- // CALayer updates appear on the screen at the same time.
+ // 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.
[[self window] disableScreenUpdatesUntilFlush];
+
+ // Make sure any layer changes that happened as a result of layout
+ // via -viewWillDraw are committed.
[CATransaction flush];
[[self _webView] _setNeedsOneShotDrawingSynchronization:NO];
}
@@ -3159,47 +3216,54 @@ static void _updateFocusedAndActiveStateTimerCallback(CFRunLoopTimerRef timer, v
- (void)windowDidBecomeKey:(NSNotification *)notification
{
+ if (!pthread_main_np()) {
+ [self performSelectorOnMainThread:_cmd withObject:notification waitUntilDone:NO];
+ return;
+ }
+
NSWindow *keyWindow = [notification object];
if (keyWindow == [self window])
[self addMouseMovedObserver];
-
- if (keyWindow == [self window] || keyWindow == [[self window] attachedSheet])
- [self _updateFocusedAndActiveState];
}
- (void)windowDidResignKey:(NSNotification *)notification
{
+ if (!pthread_main_np()) {
+ [self performSelectorOnMainThread:_cmd withObject:notification waitUntilDone:NO];
+ return;
+ }
+
NSWindow *formerKeyWindow = [notification object];
if (formerKeyWindow == [self window])
[self removeMouseMovedObserver];
- if (formerKeyWindow == [self window] || formerKeyWindow == [[self window] attachedSheet]) {
- [self _updateFocusedAndActiveState];
- [_private->compController endRevertingChange:NO moveLeft:NO];
- }
+ if (formerKeyWindow == [self window] || formerKeyWindow == [[self window] attachedSheet])
+ [_private->completionController endRevertingChange:NO moveLeft:NO];
}
- (void)windowWillClose:(NSNotification *)notification
{
- [_private->compController endRevertingChange:NO moveLeft:NO];
- [[self _pluginController] destroyAllPlugins];
-}
+ if (!pthread_main_np()) {
+ [self performSelectorOnMainThread:_cmd withObject:notification waitUntilDone:NO];
+ return;
+ }
-- (void)windowWillOrderOnScreen:(NSNotification *)notification
-{
- if (![[self _webView] shouldUpdateWhileOffscreen])
- [self setNeedsDisplay:YES];
+ [_private->completionController endRevertingChange:NO moveLeft:NO];
+ [[self _pluginController] destroyAllPlugins];
}
- (void)scrollWheel:(NSEvent *)event
{
- [self retain];
+ // There's a chance that responding to this event will run a nested event loop, and
+ // fetching a new event might release the old one. Retaining and then autoreleasing
+ // the current event prevents that from causing a problem inside WebKit or AppKit code.
+ [[event retain] autorelease];
+
Frame* frame = core([self _frame]);
if (!frame || !frame->eventHandler()->wheelEvent(event))
[super scrollWheel:event];
- [self release];
}
- (BOOL)_isSelectionEvent:(NSEvent *)event
@@ -3210,6 +3274,11 @@ static void _updateFocusedAndActiveStateTimerCallback(CFRunLoopTimerRef timer, v
- (BOOL)acceptsFirstMouse:(NSEvent *)event
{
+ // There's a chance that responding to this event will run a nested event loop, and
+ // fetching a new event might release the old one. Retaining and then autoreleasing
+ // the current event prevents that from causing a problem inside WebKit or AppKit code.
+ [[event retain] autorelease];
+
NSView *hitView = [self _hitViewForEvent:event];
WebHTMLView *hitHTMLView = [hitView isKindOfClass:[self class]] ? (WebHTMLView *)hitView : nil;
@@ -3234,16 +3303,22 @@ static void _updateFocusedAndActiveStateTimerCallback(CFRunLoopTimerRef timer, v
- (BOOL)shouldDelayWindowOrderingForEvent:(NSEvent *)event
{
+ // There's a chance that responding to this event will run a nested event loop, and
+ // fetching a new event might release the old one. Retaining and then autoreleasing
+ // the current event prevents that from causing a problem inside WebKit or AppKit code.
+ [[event retain] autorelease];
+
NSView *hitView = [self _hitViewForEvent:event];
WebHTMLView *hitHTMLView = [hitView isKindOfClass:[self class]] ? (WebHTMLView *)hitView : nil;
if (hitHTMLView) {
bool result = false;
- if ([hitHTMLView _isSelectionEvent:event])
+ if ([hitHTMLView _isSelectionEvent:event]) {
if (Frame* coreFrame = core([hitHTMLView _frame])) {
[hitHTMLView _setMouseDownEvent:event];
result = coreFrame->eventHandler()->eventMayStartDrag(event);
[hitHTMLView _setMouseDownEvent:nil];
}
+ }
return result;
}
return [hitView shouldDelayWindowOrderingForEvent:event];
@@ -3251,6 +3326,11 @@ static void _updateFocusedAndActiveStateTimerCallback(CFRunLoopTimerRef timer, v
- (void)mouseDown:(NSEvent *)event
{
+ // There's a chance that responding to this event will run a nested event loop, and
+ // fetching a new event might release the old one. Retaining and then autoreleasing
+ // the current event prevents that from causing a problem inside WebKit or AppKit code.
+ [[event retain] autorelease];
+
RetainPtr<WebHTMLView> protector = self;
if ([[self inputContext] wantsToHandleMouseEvents] && [[self inputContext] handleMouseEvent:event])
return;
@@ -3264,7 +3344,7 @@ static void _updateFocusedAndActiveStateTimerCallback(CFRunLoopTimerRef timer, v
if ([currentInputManager wantsToHandleMouseEvents] && [currentInputManager handleMouseEvent:event])
goto done;
- [_private->compController endRevertingChange:NO moveLeft:NO];
+ [_private->completionController endRevertingChange:NO moveLeft:NO];
// If the web page handles the context menu event and menuForEvent: returns nil, we'll get control click events here.
// We don't want to pass them along to KHTML a second time.
@@ -3298,15 +3378,23 @@ done:
- (void)mouseDragged:(NSEvent *)event
{
+ // There's a chance that responding to this event will run a nested event loop, and
+ // fetching a new event might release the old one. Retaining and then autoreleasing
+ // the current event prevents that from causing a problem inside WebKit or AppKit code.
+ [[event retain] autorelease];
+
NSInputManager *currentInputManager = [NSInputManager currentInputManager];
if ([currentInputManager wantsToHandleMouseEvents] && [currentInputManager handleMouseEvent:event])
return;
[self retain];
- if (!_private->ignoringMouseDraggedEvents)
- if (Frame* coreframe = core([self _frame]))
- coreframe->eventHandler()->mouseDragged(event);
+ if (!_private->ignoringMouseDraggedEvents) {
+ if (Frame* frame = core([self _frame])) {
+ if (Page* page = frame->page())
+ page->mainFrame()->eventHandler()->mouseDragged(event);
+ }
+ }
[self release];
}
@@ -3315,15 +3403,15 @@ done:
{
ASSERT(![self _webView] || [self _isTopHTMLView]);
- Page *page = core([self _webView]);
-
+ Page* page = core([self _webView]);
if (!page)
return NSDragOperationNone;
-
- if (page->dragController()->dragOperation() == DragOperationNone)
+
+ // FIXME: Why do we override the source provided operation here? Why not in DragController::startDrag
+ if (page->dragController()->sourceDragOperation() == DragOperationNone)
return NSDragOperationGeneric | NSDragOperationCopy;
-
- return (NSDragOperation)page->dragController()->dragOperation();
+
+ return (NSDragOperation)page->dragController()->sourceDragOperation();
}
- (void)draggedImage:(NSImage *)image movedTo:(NSPoint)screenLoc
@@ -3388,7 +3476,7 @@ done:
wrapper = [[[NSFileWrapper alloc] initRegularFileWithContents:data] autorelease];
NSString* filename = [response suggestedFilename];
NSString* trueExtension(tiffResource->image()->filenameExtension());
- if (![filename matchesExtensionEquivalent:trueExtension])
+ if (!matchesExtensionOrEquivalent(filename, trueExtension))
filename = [[filename stringByAppendingString:@"."] stringByAppendingString:trueExtension];
[wrapper setPreferredFilename:filename];
}
@@ -3431,6 +3519,11 @@ noPromisedData:
- (void)mouseUp:(NSEvent *)event
{
+ // There's a chance that responding to this event will run a nested event loop, and
+ // fetching a new event might release the old one. Retaining and then autoreleasing
+ // the current event prevents that from causing a problem inside WebKit or AppKit code.
+ [[event retain] autorelease];
+
[self _setMouseDownEvent:nil];
NSInputManager *currentInputManager = [NSInputManager currentInputManager];
@@ -3440,8 +3533,10 @@ noPromisedData:
[self retain];
[self _stopAutoscrollTimer];
- if (Frame* coreframe = core([self _frame]))
- coreframe->eventHandler()->mouseUp(event);
+ if (Frame* frame = core([self _frame])) {
+ if (Page* page = frame->page())
+ page->mainFrame()->eventHandler()->mouseUp(event);
+ }
[self _updateMouseoverWithFakeEvent];
[self release];
@@ -3459,29 +3554,50 @@ noPromisedData:
return YES;
}
+// Utility function to make sure we don't return anything through the NSTextInput
+// API when an editable region is not currently focused.
+static BOOL isTextInput(Frame* coreFrame)
+{
+ return coreFrame && !coreFrame->selection()->isNone() && coreFrame->selection()->isContentEditable();
+}
+
+static BOOL isInPasswordField(Frame* coreFrame)
+{
+ return coreFrame && coreFrame->selection()->isInPasswordField();
+}
+
- (BOOL)becomeFirstResponder
{
NSSelectionDirection direction = NSDirectSelection;
if (![[self _webView] _isPerformingProgrammaticFocus])
direction = [[self window] keyViewSelectionDirection];
- [self _updateFocusedAndActiveState];
[self _updateFontPanel];
Frame* frame = core([self _frame]);
if (!frame)
return YES;
-
- frame->editor()->setStartNewKillRingSequence(true);
- if (direction == NSDirectSelection)
- return YES;
+ BOOL exposeInputContext = isTextInput(frame) && !isInPasswordField(frame);
+ if (exposeInputContext != _private->exposeInputContext) {
+ _private->exposeInputContext = exposeInputContext;
+ [NSApp updateWindows];
+ }
+
+ frame->editor()->setStartNewKillRingSequence(true);
Page* page = frame->page();
if (!page)
return YES;
- page->focusController()->setFocusedFrame(frame);
+ if (![[self _webView] _isPerformingProgrammaticFocus])
+ page->focusController()->setFocusedFrame(frame);
+
+ page->focusController()->setFocused(true);
+
+ if (direction == NSDirectSelection)
+ return YES;
+
if (Document* document = frame->document())
document->setFocusedNode(0);
page->focusController()->setInitialFocus(direction == NSSelectingNext ? FocusDirectionForward : FocusDirectionBackward,
@@ -3493,15 +3609,24 @@ noPromisedData:
{
BOOL resign = [super resignFirstResponder];
if (resign) {
- _private->resigningFirstResponder = YES;
- [_private->compController endRevertingChange:NO moveLeft:NO];
+ [_private->completionController endRevertingChange:NO moveLeft:NO];
+ Frame* coreFrame = core([self _frame]);
+ if (!coreFrame)
+ return resign;
+ Page* page = coreFrame->page();
+ if (!page)
+ return resign;
if (![self maintainsInactiveSelection]) {
[self deselectAll];
if (![[self _webView] _isPerformingProgrammaticFocus])
[self clearFocus];
}
- [self _updateFocusedAndActiveState];
- _private->resigningFirstResponder = NO;
+
+ id nextResponder = [[self window] _newFirstResponderAfterResigning];
+ bool nextResponderIsInWebView = [nextResponder isKindOfClass:[NSView class]]
+ && [nextResponder isDescendantOf:[[[self _webView] mainFrame] frameView]];
+ if (!nextResponderIsInWebView)
+ page->focusController()->setFocused(false);
}
return resign;
}
@@ -3582,8 +3707,10 @@ noPromisedData:
[self _setPrinting:YES minimumPageWidth:0.0f maximumPageWidth:0.0f adjustViewSize:NO];
float newBottomFloat = *newBottom;
- if (FrameView* view = core([self _frame])->view())
- view->adjustPageHeight(&newBottomFloat, oldTop, oldBottom, bottomLimit);
+ if (Frame* frame = core([self _frame])) {
+ if (FrameView* view = frame->view())
+ view->adjustPageHeight(&newBottomFloat, oldTop, oldBottom, bottomLimit);
+ }
#ifdef __LP64__
// If the new bottom is equal to the old bottom (when both are treated as floats), we just copy
@@ -3781,6 +3908,11 @@ noPromisedData:
- (void)keyDown:(NSEvent *)event
{
+ // There's a chance that responding to this event will run a nested event loop, and
+ // fetching a new event might release the old one. Retaining and then autoreleasing
+ // the current event prevents that from causing a problem inside WebKit or AppKit code.
+ [[event retain] autorelease];
+
RetainPtr<WebHTMLView> selfProtector = self;
BOOL eventWasSentToWebCore = (_private->keyDownEvent == event);
@@ -3789,15 +3921,15 @@ noPromisedData:
[_private->keyDownEvent release];
_private->keyDownEvent = [event retain];
- BOOL completionPopupWasOpen = _private->compController && [_private->compController popupWindowIsOpen];
+ BOOL completionPopupWasOpen = _private->completionController && [_private->completionController popupWindowIsOpen];
Frame* coreFrame = core([self _frame]);
if (!eventWasSentToWebCore && coreFrame && coreFrame->eventHandler()->keyEvent(event)) {
// WebCore processed a key event, bail on any preexisting complete: UI
if (completionPopupWasOpen)
- [_private->compController endRevertingChange:YES moveLeft:NO];
- } else if (!_private->compController || ![_private->compController filterKeyDown:event]) {
+ [_private->completionController endRevertingChange:YES moveLeft:NO];
+ } else if (!_private->completionController || ![_private->completionController filterKeyDown:event]) {
// Not consumed by complete: popup window
- [_private->compController endRevertingChange:YES moveLeft:NO];
+ [_private->completionController endRevertingChange:YES moveLeft:NO];
callSuper = YES;
}
if (callSuper)
@@ -3808,6 +3940,11 @@ noPromisedData:
- (void)keyUp:(NSEvent *)event
{
+ // There's a chance that responding to this event will run a nested event loop, and
+ // fetching a new event might release the old one. Retaining and then autoreleasing
+ // the current event prevents that from causing a problem inside WebKit or AppKit code.
+ [[event retain] autorelease];
+
BOOL eventWasSentToWebCore = (_private->keyDownEvent == event);
RetainPtr<WebHTMLView> selfProtector = self;
@@ -3820,6 +3957,11 @@ noPromisedData:
- (void)flagsChanged:(NSEvent *)event
{
+ // There's a chance that responding to this event will run a nested event loop, and
+ // fetching a new event might release the old one. Retaining and then autoreleasing
+ // the current event prevents that from causing a problem inside WebKit or AppKit code.
+ [[event retain] autorelease];
+
Frame* coreFrame = core([self _frame]);
if (coreFrame)
coreFrame->eventHandler()->capsLockStateMayHaveChanged();
@@ -4052,6 +4194,11 @@ noPromisedData:
- (BOOL)performKeyEquivalent:(NSEvent *)event
{
+ // There's a chance that responding to this event will run a nested event loop, and
+ // fetching a new event might release the old one. Retaining and then autoreleasing
+ // the current event prevents that from causing a problem inside WebKit or AppKit code.
+ [[event retain] autorelease];
+
if ([self _handleStyleKeyEquivalent:event])
return YES;
@@ -4144,6 +4291,8 @@ noPromisedData:
BOOL aIsItalic = ([fm traitsOfFont:a] & NSItalicFontMask) != 0;
BOOL bIsItalic = ([fm traitsOfFont:b] & NSItalicFontMask) != 0;
+ BOOL aIsBold = aWeight > MIN_BOLD_WEIGHT;
+
if ([aFamilyName isEqualToString:bFamilyName]) {
NSString *familyNameForCSS = aFamilyName;
@@ -4153,7 +4302,8 @@ noPromisedData:
// Find the font the same way the rendering code would later if it encountered this CSS.
NSFontTraitMask traits = aIsItalic ? NSFontItalicTrait : 0;
- NSFont *foundFont = WebCoreFindFont(aFamilyName, traits, aWeight, aPointSize);
+ int weight = aIsBold ? STANDARD_BOLD_WEIGHT : STANDARD_WEIGHT;
+ NSFont *foundFont = [WebFontCache fontWithFamily:aFamilyName traits:traits weight:weight size:aPointSize];
// If we don't find a font with the same Postscript name, then we'll have to use the
// Postscript name to make the CSS specific enough.
@@ -4173,8 +4323,9 @@ noPromisedData:
else if (aPointSize > soa)
[style _setFontSizeDelta:@"1px"];
+ // FIXME: Map to the entire range of CSS weight values.
if (aWeight == bWeight)
- [style setFontWeight:aWeight > MIN_BOLD_WEIGHT ? @"bold" : @"normal"];
+ [style setFontWeight:aIsBold ? @"bold" : @"normal"];
if (aIsItalic == bIsItalic)
[style setFontStyle:aIsItalic ? @"italic" : @"normal"];
@@ -4408,9 +4559,9 @@ NSStrokeColorAttributeName /* NSColor, default nil: same as foreground co
if (![self _canEdit])
return;
- if (!_private->compController)
- _private->compController = [[WebTextCompleteController alloc] initWithHTMLView:self];
- [_private->compController doCompletion];
+ if (!_private->completionController)
+ _private->completionController = [[WebTextCompletionController alloc] initWithWebView:[self _webView] HTMLView:self];
+ [_private->completionController doCompletion];
}
- (void)checkSpelling:(id)sender
@@ -4630,7 +4781,13 @@ static BOOL writingDirectionKeyBindingsEnabled()
// support them via the key bindings mechanism.
- (BOOL)_wantsKeyDownForEvent:(NSEvent *)event
{
- return YES;
+ bool haveWebCoreFrame = core([self _frame]);
+
+ // If we have a frame, our keyDown method will handle key bindings after sending
+ // the event through the DOM, so ask AppKit not to do its early special key binding
+ // mapping. If we don't have a frame, just let things work the normal way without
+ // a keyDown.
+ return haveWebCoreFrame;
}
#else
@@ -4704,15 +4861,28 @@ static BOOL writingDirectionKeyBindingsEnabled()
#endif
+- (void)_updateControlTints
+{
+ Frame* frame = core([self _frame]);
+ if (!frame)
+ return;
+ FrameView* view = frame->view();
+ if (!view)
+ return;
+ view->updateControlTints();
+}
+
// Despite its name, this is called at different times than windowDidBecomeKey is.
// It takes into account all the other factors that determine when NSCell draws
// with different tints, so it's the right call to use for control tints. We'd prefer
// to do this with API. <rdar://problem/5136760>
- (void)_windowChangedKeyState
{
- if (Frame* frame = core([self _frame]))
- if (FrameView* view = frame->view())
- view->updateControlTints();
+ if (pthread_main_np())
+ [self _updateControlTints];
+ else
+ [self performSelectorOnMainThread:@selector(_updateControlTints) withObject:nil waitUntilDone:NO];
+
[super _windowChangedKeyState];
}
@@ -4902,6 +5072,121 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point)
#endif
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+
+- (void)orderFrontSubstitutionsPanel:(id)sender
+{
+ COMMAND_PROLOGUE
+
+ NSSpellChecker *checker = [NSSpellChecker sharedSpellChecker];
+ if (!checker) {
+ LOG_ERROR("No NSSpellChecker");
+ return;
+ }
+
+ NSPanel *substitutionsPanel = [checker substitutionsPanel];
+ if ([substitutionsPanel isVisible]) {
+ [substitutionsPanel orderOut:sender];
+ return;
+ }
+ [substitutionsPanel orderFront:sender];
+}
+
+// FIXME 4799134: WebView is the bottleneck for this logic, but we must implement these methods here because
+// the AppKit code checks the first responder.
+
+- (BOOL)smartInsertDeleteEnabled
+{
+ return [[self _webView] smartInsertDeleteEnabled];
+}
+
+- (void)setSmartInsertDeleteEnabled:(BOOL)flag
+{
+ [[self _webView] setSmartInsertDeleteEnabled:flag];
+}
+
+- (void)toggleSmartInsertDelete:(id)sender
+{
+ [[self _webView] toggleSmartInsertDelete:sender];
+}
+
+- (BOOL)isAutomaticQuoteSubstitutionEnabled
+{
+ return [[self _webView] isAutomaticQuoteSubstitutionEnabled];
+}
+
+- (void)setAutomaticQuoteSubstitutionEnabled:(BOOL)flag
+{
+ [[self _webView] setAutomaticQuoteSubstitutionEnabled:flag];
+}
+
+- (void)toggleAutomaticQuoteSubstitution:(id)sender
+{
+ [[self _webView] toggleAutomaticQuoteSubstitution:sender];
+}
+
+- (BOOL)isAutomaticLinkDetectionEnabled
+{
+ return [[self _webView] isAutomaticLinkDetectionEnabled];
+}
+
+- (void)setAutomaticLinkDetectionEnabled:(BOOL)flag
+{
+ [[self _webView] setAutomaticLinkDetectionEnabled:flag];
+}
+
+- (void)toggleAutomaticLinkDetection:(id)sender
+{
+ [[self _webView] toggleAutomaticLinkDetection:sender];
+}
+
+- (BOOL)isAutomaticDashSubstitutionEnabled
+{
+ return [[self _webView] isAutomaticDashSubstitutionEnabled];
+}
+
+- (void)setAutomaticDashSubstitutionEnabled:(BOOL)flag
+{
+ [[self _webView] setAutomaticDashSubstitutionEnabled:flag];
+}
+
+- (void)toggleAutomaticDashSubstitution:(id)sender
+{
+ [[self _webView] toggleAutomaticDashSubstitution:sender];
+}
+
+- (BOOL)isAutomaticTextReplacementEnabled
+{
+ return [[self _webView] isAutomaticTextReplacementEnabled];
+}
+
+- (void)setAutomaticTextReplacementEnabled:(BOOL)flag
+{
+ [[self _webView] setAutomaticTextReplacementEnabled:flag];
+}
+
+- (void)toggleAutomaticTextReplacement:(id)sender
+{
+ [[self _webView] toggleAutomaticTextReplacement:sender];
+}
+
+- (BOOL)isAutomaticSpellingCorrectionEnabled
+{
+ return [[self _webView] isAutomaticSpellingCorrectionEnabled];
+}
+
+- (void)setAutomaticSpellingCorrectionEnabled:(BOOL)flag
+{
+ [[self _webView] setAutomaticSpellingCorrectionEnabled:flag];
+}
+
+- (void)toggleAutomaticSpellingCorrection:(id)sender
+{
+ [[self _webView] toggleAutomaticSpellingCorrection:sender];
+}
+
+#endif
+
- (void)_lookUpInDictionaryFromMenu:(id)sender
{
// Dictionary API will accept a whitespace-only string and display UI as if it were real text,
@@ -4929,7 +5214,6 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point)
return;
#endif
-
// We soft link to get the function that displays the dictionary (either pop-up window or app) to avoid the performance
// penalty of linking to another framework. This function changed signature as well as framework between Tiger and Leopard,
// so the two cases are handled separately.
@@ -5002,7 +5286,7 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point)
if (const PlatformKeyboardEvent* platformEvent = event->keyEvent()) {
NSEvent *macEvent = platformEvent->macEvent();
- if ([macEvent type] == NSKeyDown && [_private->compController filterKeyDown:macEvent])
+ if ([macEvent type] == NSKeyDown && [_private->completionController filterKeyDown:macEvent])
return true;
if ([macEvent type] == NSFlagsChanged)
@@ -5065,9 +5349,7 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point)
{
ASSERT(!_private->subviewsSetAside);
- if ([[self _frame] _needsLayout])
- _private->needsLayout = YES;
- if (_private->needsToApplyStyles || _private->needsLayout)
+ if (_private->needsToApplyStyles || [self _needsLayout])
[self layout];
}
@@ -5099,17 +5381,19 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point)
[[self _pluginController] destroyAllPlugins];
}
-- (BOOL)_isResigningFirstResponder
+- (BOOL)_needsLayout
{
- return _private->resigningFirstResponder;
+ return [[self _frame] _needsLayout];
}
#if USE(ACCELERATED_COMPOSITING)
- (void)attachRootLayer:(CALayer*)layer
{
if (!_private->layerHostingView) {
- WebLayerHostingView* hostingView = [[WebLayerHostingView alloc] initWithFrame:[self bounds]];
+ NSView* hostingView = [[NSView alloc] initWithFrame:[self bounds]];
+#if !defined(BUILDING_ON_LEOPARD)
[hostingView setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
+#endif
[self addSubview:hostingView];
[hostingView release];
// hostingView is owned by being a subview of self
@@ -5117,13 +5401,35 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point)
[[self _webView] _startedAcceleratedCompositingForFrame:[self _frame]];
}
- // Make a container layer, which will get sized/positioned by AppKit and CA
+ // Make a container layer, which will get sized/positioned by AppKit and CA.
CALayer* viewLayer = [CALayer layer];
+
+#if defined(BUILDING_ON_LEOPARD)
+ // Turn off default animations.
+ NSNull *nullValue = [NSNull null];
+ NSDictionary *actions = [NSDictionary dictionaryWithObjectsAndKeys:
+ nullValue, @"anchorPoint",
+ nullValue, @"bounds",
+ nullValue, @"contents",
+ nullValue, @"contentsRect",
+ nullValue, @"opacity",
+ nullValue, @"position",
+ nullValue, @"sublayerTransform",
+ nullValue, @"sublayers",
+ nullValue, @"transform",
+ nil];
+ [viewLayer setStyle:[NSDictionary dictionaryWithObject:actions forKey:@"actions"]];
+#endif
+
[_private->layerHostingView setLayer:viewLayer];
[_private->layerHostingView setWantsLayer:YES];
// Parent our root layer in the container layer
[viewLayer addSublayer:layer];
+
+#if defined(BUILDING_ON_LEOPARD)
+ [self _updateLayerHostingViewPosition];
+#endif
}
- (void)detachRootLayer
@@ -5136,7 +5442,37 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point)
[[self _webView] _stoppedAcceleratedCompositingForFrame:[self _frame]];
}
}
-#endif
+
+#if defined(BUILDING_ON_LEOPARD)
+// This method is necessary on Leopard to work around <rdar://problem/7067892>.
+- (void)_updateLayerHostingViewPosition
+{
+ if (!_private->layerHostingView)
+ return;
+
+ const CGFloat maxHeight = 4096;
+ NSRect layerViewFrame = [self bounds];
+
+ if (layerViewFrame.size.height > maxHeight) {
+ CGFloat documentHeight = layerViewFrame.size.height;
+
+ // Clamp the size of the view to <= 4096px to avoid the bug.
+ layerViewFrame.size.height = maxHeight;
+ NSRect visibleRect = [[self enclosingScrollView] documentVisibleRect];
+
+ // Place the top of the layer-hosting view at the top of the visibleRect.
+ CGFloat topOffset = NSMinY(visibleRect);
+ 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)];
+ }
+
+ [_private->layerHostingView setFrame:layerViewFrame];
+}
+#endif // defined(BUILDING_ON_LEOPARD)
+#endif // USE(ACCELERATED_COMPOSITING)
@end
@@ -5160,22 +5496,14 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point)
return validAttributes;
}
-// Utility function to make sure we don't return anything through the NSTextInput
-// API when an editable region is not currently focused.
-static BOOL isTextInput(Frame* coreFrame)
-{
- return coreFrame && !coreFrame->selection()->isNone() && coreFrame->selection()->isContentEditable();
-}
-
-static BOOL isInPasswordField(Frame* coreFrame)
+- (NSTextInputContext *)inputContext
{
- return coreFrame && coreFrame->selection()->isInPasswordField();
+ return _private->exposeInputContext ? [super inputContext] : nil;
}
- (NSAttributedString *)textStorage
{
- Frame* coreFrame = core([self _frame]);
- if (!isTextInput(coreFrame) || isInPasswordField(coreFrame)) {
+ if (!_private->exposeInputContext) {
LOG(TextInput, "textStorage -> nil");
return nil;
}
@@ -5524,6 +5852,15 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
if (!coreFrame)
return;
+ BOOL exposeInputContext = isTextInput(coreFrame) && !isInPasswordField(coreFrame);
+ if (exposeInputContext != _private->exposeInputContext) {
+ _private->exposeInputContext = exposeInputContext;
+ // Let AppKit cache a potentially changed input context.
+ // WebCore routinely sets the selection to None when editing, and IMs become unhappy when an input context suddenly turns nil, see bug 26009.
+ if (!coreFrame->selection()->isNone())
+ [NSApp updateWindows];
+ }
+
if (!coreFrame->editor()->hasComposition())
return;
@@ -5542,292 +5879,6 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
@end
-/*
- This class runs the show for handing the complete: NSTextView operation. It counts on its HTML view
- to call endRevertingChange: whenever the current completion needs to be aborted.
-
- The class is in one of two modes: PopupWindow showing, or not. It is shown when a completion yields
- more than one match. If a completion yields one or zero matches, it is not shown, and **there is no
- state carried across to the next completion**.
- */
-
-@implementation WebTextCompleteController
-
-- (id)initWithHTMLView:(WebHTMLView *)view
-{
- self = [super init];
- if (!self)
- return nil;
- _view = view;
- return self;
-}
-
-- (void)dealloc
-{
- [_popupWindow release];
- [_completions release];
- [_originalString release];
-
- [super dealloc];
-}
-
-- (void)_insertMatch:(NSString *)match
-{
- // FIXME: 3769654 - We should preserve case of string being inserted, even in prefix (but then also be
- // able to revert that). Mimic NSText.
- WebFrame *frame = [_view _frame];
- NSString *newText = [match substringFromIndex:prefixLength];
- [frame _replaceSelectionWithText:newText selectReplacement:YES smartReplace:NO];
-}
-
-// mostly lifted from NSTextView_KeyBinding.m
-- (void)_buildUI
-{
- 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]];
- [column setWidth:tableFrame.size.width];
- [column setEditable:NO];
-
- _tableView = [[NSTableView alloc] initWithFrame:tableFrame];
- [_tableView setAutoresizingMask:NSViewWidthSizable];
- [_tableView addTableColumn:column];
- [column release];
- [_tableView setGridStyleMask:NSTableViewGridNone];
- [_tableView setCornerView:nil];
- [_tableView setHeaderView:nil];
- [_tableView setColumnAutoresizingStyle:NSTableViewUniformColumnAutoresizingStyle];
- [_tableView setDelegate:self];
- [_tableView setDataSource:self];
- [_tableView setTarget:self];
- [_tableView setDoubleAction:@selector(tableAction:)];
-
- NSScrollView *scrollView = [[NSScrollView alloc] initWithFrame:scrollFrame];
- [scrollView setBorderType:NSNoBorder];
- [scrollView setHasVerticalScroller:YES];
- [scrollView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
- [scrollView setDocumentView:_tableView];
- [_tableView release];
-
- _popupWindow = [[NSWindow alloc] initWithContentRect:scrollFrame styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO];
- [_popupWindow setAlphaValue:0.88f];
- [_popupWindow setContentView:scrollView];
- [scrollView release];
- [_popupWindow setHasShadow:YES];
- [_popupWindow setOneShot:YES];
- [_popupWindow _setForceActiveControls:YES];
- [_popupWindow setReleasedWhenClosed:NO];
-}
-
-// mostly lifted from NSTextView_KeyBinding.m
-- (void)_placePopupWindow:(NSPoint)topLeft
-{
- int numberToShow = [_completions count];
- if (numberToShow > 20) {
- numberToShow = 20;
- }
-
- NSRect windowFrame;
- NSPoint wordStart = topLeft;
- windowFrame.origin = [[_view window] convertBaseToScreen:[_view convertPoint:wordStart toView:nil]];
- windowFrame.size.height = numberToShow * [_tableView rowHeight] + (numberToShow + 1) * [_tableView intercellSpacing].height;
- windowFrame.origin.y -= windowFrame.size.height;
- NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys:[NSFont systemFontOfSize:12.0f], NSFontAttributeName, nil];
- float maxWidth = 0.0f;
- int maxIndex = -1;
- int i;
- for (i = 0; i < numberToShow; i++) {
- float width = ceilf([[_completions objectAtIndex:i] sizeWithAttributes:attributes].width);
- if (width > maxWidth) {
- maxWidth = width;
- maxIndex = i;
- }
- }
- windowFrame.size.width = 100;
- if (maxIndex >= 0) {
- maxWidth = ceilf([NSScrollView frameSizeForContentSize:NSMakeSize(maxWidth, 100.0f) hasHorizontalScroller:NO hasVerticalScroller:YES borderType:NSNoBorder].width);
- maxWidth = ceilf([NSWindow frameRectForContentRect:NSMakeRect(0.0f, 0.0f, maxWidth, 100.0f) styleMask:NSBorderlessWindowMask].size.width);
- maxWidth += 5.0f;
- windowFrame.size.width = MAX(maxWidth, windowFrame.size.width);
- maxWidth = MIN(400.0f, windowFrame.size.width);
- }
- [_popupWindow setFrame:windowFrame display:NO];
-
- [_tableView reloadData];
- [_tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:0] byExtendingSelection:NO];
- [_tableView scrollRowToVisible:0];
- [self _reflectSelection];
- [_popupWindow setLevel:NSPopUpMenuWindowLevel];
- [_popupWindow orderFront:nil];
- [[_view window] addChildWindow:_popupWindow ordered:NSWindowAbove];
-}
-
-- (void)doCompletion
-{
- if (!_popupWindow) {
- NSSpellChecker *checker = [NSSpellChecker sharedSpellChecker];
- if (!checker) {
- LOG_ERROR("No NSSpellChecker");
- return;
- }
-
- // Get preceeding word stem
- WebFrame *frame = [_view _frame];
- DOMRange *selection = kit(core(frame)->selection()->toNormalizedRange().get());
- DOMRange *wholeWord = [frame _rangeByAlteringCurrentSelection:SelectionController::EXTEND
- direction:SelectionController::BACKWARD granularity:WordGranularity];
- DOMRange *prefix = [wholeWord cloneRange];
- [prefix setEnd:[selection startContainer] offset:[selection startOffset]];
-
- // Reject some NOP cases
- if ([prefix collapsed]) {
- NSBeep();
- return;
- }
- NSString *prefixStr = [frame _stringForRange:prefix];
- NSString *trimmedPrefix = [prefixStr stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
- if ([trimmedPrefix length] == 0) {
- NSBeep();
- return;
- }
- prefixLength = [prefixStr length];
-
- // Lookup matches
- [_completions release];
- _completions = [checker completionsForPartialWordRange:NSMakeRange(0, [prefixStr length]) inString:prefixStr language:nil inSpellDocumentWithTag:[[_view _webView] spellCheckerDocumentTag]];
- [_completions retain];
-
- if (!_completions || [_completions count] == 0) {
- NSBeep();
- } else if ([_completions count] == 1) {
- [self _insertMatch:[_completions objectAtIndex:0]];
- } else {
- ASSERT(!_originalString); // this should only be set IFF we have a popup window
- _originalString = [[frame _stringForRange:selection] retain];
- [self _buildUI];
- NSRect wordRect = [frame _caretRectAtNode:[wholeWord startContainer] offset:[wholeWord startOffset] affinity:NSSelectionAffinityDownstream];
- // +1 to be under the word, not the caret
- // FIXME - 3769652 - Wrong positioning for right to left languages. We should line up the upper
- // right corner with the caret instead of upper left, and the +1 would be a -1.
- NSPoint wordLowerLeft = { NSMinX(wordRect)+1, NSMaxY(wordRect) };
- [self _placePopupWindow:wordLowerLeft];
- }
- } else {
- [self endRevertingChange:YES moveLeft:NO];
- }
-}
-
-- (void)endRevertingChange:(BOOL)revertChange moveLeft:(BOOL)goLeft
-{
- if (_popupWindow) {
- // tear down UI
- [[_view window] removeChildWindow:_popupWindow];
- [_popupWindow orderOut:self];
- // Must autorelease because event tracking code may be on the stack touching UI
- [_popupWindow autorelease];
- _popupWindow = nil;
-
- if (revertChange) {
- WebFrame *frame = [_view _frame];
- [frame _replaceSelectionWithText:_originalString selectReplacement:YES smartReplace:NO];
- } else if ([_view _hasSelection]) {
- if (goLeft)
- [_view moveBackward:nil];
- else
- [_view moveForward:nil];
- }
- [_originalString release];
- _originalString = nil;
- }
- // else there is no state to abort if the window was not up
-}
-
-- (BOOL)popupWindowIsOpen
-{
- return _popupWindow != nil;
-}
-
-// WebHTMLView gives us a crack at key events it sees. Return whether we consumed the event.
-// The features for the various keys mimic NSTextView.
-- (BOOL)filterKeyDown:(NSEvent *)event
-{
- if (!_popupWindow)
- return NO;
- NSString *string = [event charactersIgnoringModifiers];
- if (![string length])
- return NO;
- unichar c = [string characterAtIndex:0];
- if (c == NSUpArrowFunctionKey) {
- int selectedRow = [_tableView selectedRow];
- if (0 < selectedRow) {
- [_tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:selectedRow - 1] byExtendingSelection:NO];
- [_tableView scrollRowToVisible:selectedRow - 1];
- }
- return YES;
- }
- if (c == NSDownArrowFunctionKey) {
- int selectedRow = [_tableView selectedRow];
- if (selectedRow < (int)[_completions count] - 1) {
- [_tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:selectedRow + 1] byExtendingSelection:NO];
- [_tableView scrollRowToVisible:selectedRow + 1];
- }
- return YES;
- }
- if (c == NSRightArrowFunctionKey || c == '\n' || c == '\r' || c == '\t') {
- // FIXME: What about backtab?
- [self endRevertingChange:NO moveLeft:NO];
- return YES;
- }
- if (c == NSLeftArrowFunctionKey) {
- [self endRevertingChange:NO moveLeft:YES];
- return YES;
- }
- if (c == 0x1B || c == NSF5FunctionKey) {
- // FIXME: F5?
- [self endRevertingChange:YES moveLeft:NO];
- return YES;
- }
- if (c == ' ' || c >= 0x21 && c <= 0x2F || c >= 0x3A && c <= 0x40 || c >= 0x5B && c <= 0x60 || c >= 0x7B && c <= 0x7D) {
- // FIXME: Is the above list of keys really definitive?
- // Originally this code called ispunct; aren't there other punctuation keys on international keyboards?
- [self endRevertingChange:NO moveLeft:NO];
- return NO; // let the char get inserted
- }
- return NO;
-}
-
-- (void)_reflectSelection
-{
- int selectedRow = [_tableView selectedRow];
- ASSERT(selectedRow >= 0 && selectedRow < (int)[_completions count]);
- [self _insertMatch:[_completions objectAtIndex:selectedRow]];
-}
-
-- (void)tableAction:(id)sender
-{
- [self _reflectSelection];
- [self endRevertingChange:NO moveLeft:NO];
-}
-
-- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView
-{
- return [_completions count];
-}
-
-- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row
-{
- return [_completions objectAtIndex:row];
-}
-
-- (void)tableViewSelectionDidChange:(NSNotification *)notification
-{
- [self _reflectSelection];
-}
-
-@end
-
@implementation WebHTMLView (WebDocumentPrivateProtocols)
- (NSRect)selectionRect
@@ -6082,4 +6133,10 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
_receivedUnhandledCommand = YES;
}
+- (BOOL)tryToPerform:(SEL)action with:(id)object
+{
+ _receivedUnhandledCommand = YES;
+ return YES;
+}
+
@end
diff --git a/WebKit/mac/WebView/WebHTMLViewInternal.h b/WebKit/mac/WebView/WebHTMLViewInternal.h
index a32df02..b5ec1c0 100644
--- a/WebKit/mac/WebView/WebHTMLViewInternal.h
+++ b/WebKit/mac/WebView/WebHTMLViewInternal.h
@@ -58,11 +58,15 @@ namespace WebCore {
- (void)setPromisedDragTIFFDataSource:(WebCore::CachedImage*)source;
- (void)_web_layoutIfNeededRecursive;
- (void)_destroyAllWebPlugins;
-- (BOOL)_isResigningFirstResponder;
+- (BOOL)_needsLayout;
#if USE(ACCELERATED_COMPOSITING)
- (void)attachRootLayer:(CALayer*)layer;
- (void)detachRootLayer;
#endif
+#if USE(ACCELERATED_COMPOSITING) && defined(BUILDING_ON_LEOPARD)
+- (void)_updateLayerHostingViewPosition;
+#endif
+
@end
diff --git a/WebKit/mac/WebView/WebHTMLViewPrivate.h b/WebKit/mac/WebView/WebHTMLViewPrivate.h
index 0d73884..bb59a7b 100644
--- a/WebKit/mac/WebView/WebHTMLViewPrivate.h
+++ b/WebKit/mac/WebView/WebHTMLViewPrivate.h
@@ -118,7 +118,6 @@
#endif
// SPI for DumpRenderTree
-- (void)_updateFocusedAndActiveState;
- (BOOL)_isUsingAcceleratedCompositing;
// SPI for printing (should be converted to API someday). When the WebHTMLView isn't being printed
diff --git a/WebKit/mac/WebView/WebPDFView.h b/WebKit/mac/WebView/WebPDFView.h
index 55d2a08..bdd2a6e 100644
--- a/WebKit/mac/WebView/WebPDFView.h
+++ b/WebKit/mac/WebView/WebPDFView.h
@@ -37,7 +37,7 @@
NSView *previewView;
PDFView *PDFSubview;
NSString *path;
- id trackedFirstResponder;
+ BOOL firstResponderIsPDFDocumentView;
BOOL written;
BOOL _ignoreScaleAndDisplayModeAndPageNotifications;
BOOL _willUpdatePreferencesSoon;
diff --git a/WebKit/mac/WebView/WebPDFView.mm b/WebKit/mac/WebView/WebPDFView.mm
index 0c872b9..dea3819 100644
--- a/WebKit/mac/WebView/WebPDFView.mm
+++ b/WebKit/mac/WebView/WebPDFView.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2006, 2007, 2008, 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
@@ -29,6 +29,7 @@
#import "WebPDFView.h"
#import "WebDataSourceInternal.h"
+#import "WebDelegateImplementationCaching.h"
#import "WebDocumentInternal.h"
#import "WebDocumentPrivate.h"
#import "WebFrame.h"
@@ -47,13 +48,16 @@
#import "WebViewInternal.h"
#import <PDFKit/PDFKit.h>
#import <WebCore/EventNames.h>
+#import <WebCore/FormState.h>
#import <WebCore/Frame.h>
-#import <WebCore/FrameLoader.h>
#import <WebCore/FrameLoadRequest.h>
+#import <WebCore/FrameLoader.h>
+#import <WebCore/HTMLFormElement.h>
#import <WebCore/KURL.h>
#import <WebCore/KeyboardEvent.h>
#import <WebCore/MouseEvent.h>
#import <WebCore/PlatformKeyboardEvent.h>
+#import <WebCore/RuntimeApplicationChecks.h>
#import <wtf/Assertions.h>
using namespace WebCore;
@@ -182,7 +186,6 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec
- (void)dealloc
{
- ASSERT(!trackedFirstResponder);
[dataSource release];
[previewView release];
[PDFSubview release];
@@ -373,7 +376,7 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec
// (1) the symptom is fairly minor, and (2) we suspect that non-Safari clients are probably using the entire
// set of default items, rather than manually choosing from them. We can remove this code entirely when we
// ship a version of Safari that includes the fix for radar 3796579.
- if (![self _anyPDFTagsFoundInMenu:menu] && [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.Safari"]) {
+ if (![self _anyPDFTagsFoundInMenu:menu] && applicationIsSafari()) {
[menu addItem:[NSMenuItem separatorItem]];
NSEnumerator *e = [items objectEnumerator];
NSMenuItem *menuItem;
@@ -468,8 +471,7 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec
name:NSViewBoundsDidChangeNotification
object:[self _clipViewForPDFDocumentView]];
- [trackedFirstResponder release];
- trackedFirstResponder = nil;
+ firstResponderIsPDFDocumentView = NO;
}
#pragma mark NSUserInterfaceValidations PROTOCOL IMPLEMENTATION
@@ -941,16 +943,17 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec
default:
break;
}
- if (button != noButton)
+ if (button != noButton) {
event = MouseEvent::create(eventNames().clickEvent, true, true, 0, [nsEvent clickCount], 0, 0, 0, 0,
[nsEvent modifierFlags] & NSControlKeyMask,
[nsEvent modifierFlags] & NSAlternateKeyMask,
[nsEvent modifierFlags] & NSShiftKeyMask,
[nsEvent modifierFlags] & NSCommandKeyMask,
button, 0, 0, true);
+ }
// Call to the frame loader because this is where our security checks are made.
- core([dataSource webFrame])->loader()->loadFrameRequestWithFormAndValues(ResourceRequest(URL), false, false, event.get(), 0, HashMap<String, String>());
+ core([dataSource webFrame])->loader()->loadFrameRequest(ResourceRequest(URL), false, false, event.get(), 0);
}
- (void)PDFViewOpenPDFInNativeApplication:(PDFView *)sender
@@ -1385,20 +1388,17 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec
- (void)_trackFirstResponder
{
ASSERT([self window]);
-
- id newFirstResponder = [[self window] firstResponder];
- if (newFirstResponder == trackedFirstResponder)
+ BOOL newFirstResponderIsPDFDocumentView = [[self window] firstResponder] == [PDFSubview documentView];
+ if (newFirstResponderIsPDFDocumentView == firstResponderIsPDFDocumentView)
return;
// This next clause is the entire purpose of _trackFirstResponder. In other WebDocument
// view classes this is done in a resignFirstResponder override, but in this case the
// first responder view is a PDFKit class that we can't subclass.
- if (trackedFirstResponder == [PDFSubview documentView] && ![[dataSource _webView] maintainsInactiveSelection])
+ if (newFirstResponderIsPDFDocumentView && ![[dataSource _webView] maintainsInactiveSelection])
[self deselectAll];
-
- [trackedFirstResponder release];
- trackedFirstResponder = [newFirstResponder retain];
+ firstResponderIsPDFDocumentView = newFirstResponderIsPDFDocumentView;
}
- (void)_updatePreferences:(WebPreferences *)prefs
diff --git a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
index e22113c..6565c09 100644
--- a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
+++ b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
@@ -61,8 +61,14 @@
#define WebKitBackForwardCacheExpirationIntervalKey @"WebKitBackForwardCacheExpirationIntervalKey"
#define WebKitTabToLinksPreferenceKey @"WebKitTabToLinksPreferenceKey"
#define WebKitPrivateBrowsingEnabledPreferenceKey @"WebKitPrivateBrowsingEnabled"
+#define WebSmartInsertDeleteEnabled @"WebSmartInsertDeleteEnabled"
#define WebContinuousSpellCheckingEnabled @"WebContinuousSpellCheckingEnabled"
#define WebGrammarCheckingEnabled @"WebGrammarCheckingEnabled"
+#define WebAutomaticQuoteSubstitutionEnabled @"WebAutomaticQuoteSubstitutionEnabled"
+#define WebAutomaticLinkDetectionEnabled @"WebAutomaticLinkDetectionEnabled"
+#define WebAutomaticDashSubstitutionEnabled @"WebAutomaticDashSubstitutionEnabled"
+#define WebAutomaticTextReplacementEnabled @"WebAutomaticTextReplacementEnabled"
+#define WebAutomaticSpellingCorrectionEnabled @"WebAutomaticSpellingCorrectionEnabled"
#define WebKitDOMPasteAllowedPreferenceKey @"WebKitDOMPasteAllowedPreferenceKey"
#define WebKitUsesPageCachePreferenceKey @"WebKitUsesPageCachePreferenceKey"
#define WebKitFTPDirectoryTemplatePath @"WebKitFTPDirectoryTemplatePath"
@@ -71,10 +77,13 @@
#define WebKitAuthorAndUserStylesEnabledPreferenceKey @"WebKitAuthorAndUserStylesEnabledPreferenceKey"
#define WebKitApplicationChromeModeEnabledPreferenceKey @"WebKitApplicationChromeModeEnabledPreferenceKey"
#define WebKitWebArchiveDebugModeEnabledPreferenceKey @"WebKitWebArchiveDebugModeEnabledPreferenceKey"
+#define WebKitLocalFileContentSniffingEnabledPreferenceKey @"WebKitLocalFileContentSniffingEnabledPreferenceKey"
#define WebKitLocalStorageDatabasePathPreferenceKey @"WebKitLocalStorageDatabasePathPreferenceKey"
#define WebKitEnableFullDocumentTeardownPreferenceKey @"WebKitEnableFullDocumentTeardown"
#define WebKitOfflineWebApplicationCacheEnabledPreferenceKey @"WebKitOfflineWebApplicationCacheEnabled"
#define WebKitZoomsTextOnlyPreferenceKey @"WebKitZoomsTextOnly"
+#define WebKitXSSAuditorEnabledPreferenceKey @"WebKitXSSAuditorEnabled"
+#define WebKitAcceleratedCompositingEnabledPreferenceKey @"WebKitAcceleratedCompositingEnabled"
// These are private both because callers should be using the cover methods and because the
// cover methods themselves are private.
diff --git a/WebKit/mac/WebView/WebPreferences.mm b/WebKit/mac/WebView/WebPreferences.mm
index 6db14bd..378b280 100644
--- a/WebKit/mac/WebView/WebPreferences.mm
+++ b/WebKit/mac/WebView/WebPreferences.mm
@@ -345,13 +345,11 @@ static WebCacheModel cacheModelForMainBundle(void)
[NSNumber numberWithBool:YES], WebKitAuthorAndUserStylesEnabledPreferenceKey,
[NSNumber numberWithBool:NO], WebKitApplicationChromeModeEnabledPreferenceKey,
[NSNumber numberWithBool:NO], WebKitWebArchiveDebugModeEnabledPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitLocalFileContentSniffingEnabledPreferenceKey,
[NSNumber numberWithBool:NO], WebKitOfflineWebApplicationCacheEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitZoomsTextOnlyPreferenceKey,
-#ifndef NDEBUG
- // In Release and Production we skip a lot of object teardown during quit to speed up shutdown time. This breaks
- // our RefCount Leak tracking, and so for Debug we will use the full document teardown.
- [NSNumber numberWithBool:YES], WebKitEnableFullDocumentTeardownPreferenceKey,
-#endif
+ [NSNumber numberWithBool:YES], WebKitXSSAuditorEnabledPreferenceKey,
+ [NSNumber numberWithBool:YES], WebKitAcceleratedCompositingEnabledPreferenceKey,
nil];
// This value shouldn't ever change, which is assumed in the initialization of WebKitPDFDisplayModePreferenceKey above
@@ -795,6 +793,16 @@ static WebCacheModel cacheModelForMainBundle(void)
[self _setBoolValue:flag forKey:WebKitWebArchiveDebugModeEnabledPreferenceKey];
}
+- (BOOL)localFileContentSniffingEnabled
+{
+ return [self _boolValueForKey:WebKitLocalFileContentSniffingEnabledPreferenceKey];
+}
+
+- (void)setLocalFileContentSniffingEnabled:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitLocalFileContentSniffingEnabledPreferenceKey];
+}
+
- (BOOL)offlineWebApplicationCacheEnabled
{
return [self _boolValueForKey:WebKitOfflineWebApplicationCacheEnabledPreferenceKey];
@@ -815,6 +823,16 @@ static WebCacheModel cacheModelForMainBundle(void)
[self _setBoolValue:flag forKey:WebKitZoomsTextOnlyPreferenceKey];
}
+- (BOOL)isXSSAuditorEnabled
+{
+ return [self _boolValueForKey:WebKitXSSAuditorEnabledPreferenceKey];
+}
+
+- (void)setXSSAuditorEnabled:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitXSSAuditorEnabledPreferenceKey];
+}
+
- (BOOL)respectStandardStyleKeyEquivalents
{
return [self _boolValueForKey:WebKitRespectStandardStyleKeyEquivalentsPreferenceKey];
@@ -1032,6 +1050,11 @@ static WebCacheModel cacheModelForMainBundle(void)
- (void)_postPreferencesChangesNotification
{
+ if (!pthread_main_np()) {
+ [self performSelectorOnMainThread:_cmd withObject:nil waitUntilDone:NO];
+ return;
+ }
+
[[NSNotificationCenter defaultCenter]
postNotificationName:WebPreferencesChangedNotification object:self
userInfo:nil];
@@ -1046,10 +1069,11 @@ static WebCacheModel cacheModelForMainBundle(void)
{
NSString *systemEncodingName = (NSString *)CFStringConvertEncodingToIANACharSetName([self _systemCFStringEncoding]);
- // CFStringConvertEncodingToIANACharSetName() returns CP949 for kTextEncodingDOSKorean AKA "extended EUC-KR" AKA windows-939.
+ // 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.
// In addition, this value must match what is used in Safari, see <rdar://problem/5579292>.
- if ([systemEncodingName isEqualToString:@"CP949"])
+ // On some OS versions, the result is CP949 (uppercase).
+ if ([systemEncodingName _webkit_isCaseInsensitiveEqualToString:@"cp949"])
systemEncodingName = @"ks_c_5601-1987";
[[NSUserDefaults standardUserDefaults] registerDefaults:
[NSDictionary dictionaryWithObject:systemEncodingName forKey:WebKitDefaultTextEncodingNamePreferenceKey]];
@@ -1074,11 +1098,6 @@ static NSString *classIBCreatorID = nil;
[self _setBoolValue:DOMPasteAllowed forKey:WebKitDOMPasteAllowedPreferenceKey];
}
-- (void)_setFTPDirectoryTemplatePath:(NSString *)path
-{
- [self _setStringValue:[path stringByStandardizingPath] forKey:WebKitFTPDirectoryTemplatePath];
-}
-
- (NSString *)_localStorageDatabasePath
{
return [[self _stringValueForKey:WebKitLocalStorageDatabasePathPreferenceKey] stringByStandardizingPath];
@@ -1094,9 +1113,9 @@ static NSString *classIBCreatorID = nil;
return [[self _stringValueForKey:WebKitFTPDirectoryTemplatePath] stringByStandardizingPath];
}
-- (void)_setForceFTPDirectoryListings:(BOOL)force
+- (void)_setFTPDirectoryTemplatePath:(NSString *)path
{
- [self _setBoolValue:force forKey:WebKitForceFTPDirectoryListings];
+ [self _setStringValue:[path stringByStandardizingPath] forKey:WebKitFTPDirectoryTemplatePath];
}
- (BOOL)_forceFTPDirectoryListings
@@ -1104,6 +1123,21 @@ static NSString *classIBCreatorID = nil;
return [self _boolValueForKey:WebKitForceFTPDirectoryListings];
}
+- (void)_setForceFTPDirectoryListings:(BOOL)force
+{
+ [self _setBoolValue:force forKey:WebKitForceFTPDirectoryListings];
+}
+
+- (BOOL)acceleratedCompositingEnabled
+{
+ return [self _boolValueForKey:WebKitAcceleratedCompositingEnabledPreferenceKey];
+}
+
+- (void)setAcceleratedCompositingEnabled:(BOOL)enabled
+{
+ [self _setBoolValue:enabled forKey:WebKitAcceleratedCompositingEnabledPreferenceKey];
+}
+
- (void)didRemoveFromWebView
{
ASSERT(_private->numWebViews);
@@ -1118,16 +1152,6 @@ static NSString *classIBCreatorID = nil;
{
++_private->numWebViews;
}
-
-- (void)setFullDocumentTeardownEnabled:(BOOL)fullDocumentTeardownEnabled
-{
- [self _setBoolValue:fullDocumentTeardownEnabled forKey:WebKitEnableFullDocumentTeardownPreferenceKey];
-}
-
-- (BOOL)fullDocumentTeardownEnabled
-{
- return [self _boolValueForKey:WebKitEnableFullDocumentTeardownPreferenceKey];
-}
@end
@implementation WebPreferences (WebInternal)
diff --git a/WebKit/mac/WebView/WebPreferencesPrivate.h b/WebKit/mac/WebView/WebPreferencesPrivate.h
index ae94cce..d571869 100644
--- a/WebKit/mac/WebView/WebPreferencesPrivate.h
+++ b/WebKit/mac/WebView/WebPreferencesPrivate.h
@@ -83,6 +83,9 @@ extern NSString *WebPreferencesRemovedNotification;
- (BOOL)webArchiveDebugModeEnabled;
- (void)setWebArchiveDebugModeEnabled:(BOOL)webArchiveDebugModeEnabled;
+- (BOOL)localFileContentSniffingEnabled;
+- (void)setLocalFileContentSniffingEnabled:(BOOL)localFileContentSniffingEnabled;
+
- (BOOL)offlineWebApplicationCacheEnabled;
- (void)setOfflineWebApplicationCacheEnabled:(BOOL)offlineWebApplicationCacheEnabled;
@@ -101,6 +104,9 @@ extern NSString *WebPreferencesRemovedNotification;
- (BOOL)zoomsTextOnly;
- (void)setZoomsTextOnly:(BOOL)zoomsTextOnly;
+- (BOOL)isXSSAuditorEnabled;
+- (void)setXSSAuditorEnabled:(BOOL)flag;
+
// zero means do AutoScale
- (float)PDFScaleFactor;
- (void)setPDFScaleFactor:(float)scale;
@@ -123,11 +129,16 @@ extern NSString *WebPreferencesRemovedNotification;
- (NSString *)_ftpDirectoryTemplatePath;
- (void)_setFTPDirectoryTemplatePath:(NSString *)path;
+
- (void)_setForceFTPDirectoryListings:(BOOL)force;
- (BOOL)_forceFTPDirectoryListings;
+
- (NSString *)_localStorageDatabasePath;
- (void)_setLocalStorageDatabasePath:(NSString *)path;
+- (BOOL)acceleratedCompositingEnabled;
+- (void)setAcceleratedCompositingEnabled:(BOOL)enabled;
+
// Other private methods
- (void)_postPreferencesChangesNotification;
+ (WebPreferences *)_getInstanceForIdentifier:(NSString *)identifier;
@@ -141,8 +152,4 @@ extern NSString *WebPreferencesRemovedNotification;
// For WebView's use only.
- (void)willAddToWebView;
- (void)didRemoveFromWebView;
-
-// Force document tear down at application quit
-- (void)setFullDocumentTeardownEnabled:(BOOL)fullDocumentTeardownEnabled;
-- (BOOL)fullDocumentTeardownEnabled;
@end
diff --git a/WebKit/mac/WebView/WebRenderNode.h b/WebKit/mac/WebView/WebRenderNode.h
index 8e6b40f..901b2cc 100644
--- a/WebKit/mac/WebView/WebRenderNode.h
+++ b/WebKit/mac/WebView/WebRenderNode.h
@@ -28,7 +28,7 @@
#import <Foundation/Foundation.h>
-@class WebFrameView;
+@class WebFrame;
@interface WebRenderNode : NSObject
{
@@ -38,7 +38,7 @@
NSPoint absolutePosition;
}
-- (id)initWithWebFrameView:(WebFrameView *)view;
+- (id)initWithWebFrame:(WebFrame *)frame;
- (NSArray *)children;
diff --git a/WebKit/mac/WebView/WebRenderNode.mm b/WebKit/mac/WebView/WebRenderNode.mm
index 65ee13c..4a839a5 100644
--- a/WebKit/mac/WebView/WebRenderNode.mm
+++ b/WebKit/mac/WebView/WebRenderNode.mm
@@ -29,9 +29,8 @@
#import "WebRenderNode.h"
#import "WebFrameInternal.h"
-#import "WebFrameView.h"
-#import "WebHTMLView.h"
#import <WebCore/Frame.h>
+#import <WebCore/FrameLoaderClient.h>
#import <WebCore/RenderText.h>
#import <WebCore/RenderWidget.h>
#import <WebCore/RenderView.h>
@@ -39,9 +38,25 @@
using namespace WebCore;
+static WebRenderNode *copyRenderNode(RenderObject*);
+
@implementation WebRenderNode
-- (id)initWithName:(NSString *)n position:(NSPoint)p rect:(NSRect)r view:(NSView *)view children:(NSArray *)c
+- (id)_initWithCoreFrame:(Frame *)frame
+{
+ [self release];
+
+ if (!frame->loader()->client()->hasHTMLView())
+ return nil;
+
+ RenderObject* renderer = frame->contentRenderer();
+ if (!renderer)
+ return nil;
+
+ return copyRenderNode(renderer);
+}
+
+- (id)_initWithName:(NSString *)n position:(NSPoint)p rect:(NSRect)r coreFrame:(Frame*)coreFrame children:(NSArray *)c
{
NSMutableArray *collectChildren;
@@ -55,13 +70,8 @@ using namespace WebCore;
rect = r;
absolutePosition = p;
- if ([view isKindOfClass:[NSScrollView class]]) {
- NSScrollView *scrollView = (NSScrollView *)view;
- view = [scrollView superview];
- }
- if ([view isKindOfClass:[WebFrameView class]]) {
- WebFrameView *webFrameView = (WebFrameView *)view;
- WebRenderNode *node = [[WebRenderNode alloc] initWithWebFrameView:webFrameView];
+ if (coreFrame) {
+ WebRenderNode *node = [[WebRenderNode alloc] _initWithCoreFrame:coreFrame];
[collectChildren addObject:node];
[node release];
}
@@ -83,9 +93,10 @@ static WebRenderNode *copyRenderNode(RenderObject* node)
NSString *name = [[NSString alloc] initWithUTF8String:node->renderName()];
- RenderWidget* renderWidget = node->isWidget() ? static_cast<RenderWidget*>(node) : 0;
+ RenderWidget* renderWidget = node->isWidget() ? toRenderWidget(node) : 0;
Widget* widget = renderWidget ? renderWidget->widget() : 0;
- NSView *view = widget ? widget->platformWidget() : nil;
+ FrameView* frameView = widget && widget->isFrameView() ? static_cast<FrameView*>(widget) : 0;
+ Frame* frame = frameView ? frameView->frame() : 0;
// FIXME: broken with transforms
FloatPoint absPos = node->localToAbsolute(FloatPoint());
@@ -109,9 +120,9 @@ static WebRenderNode *copyRenderNode(RenderObject* node)
height = box.height();
}
- WebRenderNode *result = [[WebRenderNode alloc] initWithName:name
- position:absPos rect:NSMakeRect(x, y, width, height)
- view:view children:children];
+ WebRenderNode *result = [[WebRenderNode alloc] _initWithName:name
+ position:absPos rect:NSMakeRect(x, y, width, height)
+ coreFrame:frame children:children];
[name release];
[children release];
@@ -119,18 +130,9 @@ static WebRenderNode *copyRenderNode(RenderObject* node)
return result;
}
-- (id)initWithWebFrameView:(WebFrameView *)view
+- (id)initWithWebFrame:(WebFrame *)frame
{
- [self release];
-
- if (![[view documentView] isMemberOfClass:[WebHTMLView class]])
- return nil;
-
- RenderObject* renderer = core([view webFrame])->contentRenderer();
- if (!renderer)
- return nil;
-
- return copyRenderNode(renderer);
+ return [self _initWithCoreFrame:core(frame)];
}
- (void)dealloc
diff --git a/WebKit/mac/WebView/WebResource.mm b/WebKit/mac/WebView/WebResource.mm
index e62ed1e..735e213 100644
--- a/WebKit/mac/WebView/WebResource.mm
+++ b/WebKit/mac/WebView/WebResource.mm
@@ -38,6 +38,7 @@
#import <JavaScriptCore/PassRefPtr.h>
#import <WebCore/ArchiveResource.h>
#import <WebCore/LegacyWebArchive.h>
+#import <WebCore/RuntimeApplicationChecks.h>
#import <WebCore/TextEncoding.h>
#import <WebCore/ThreadCheck.h>
#import <WebCore/WebCoreObjCExtras.h>
@@ -365,7 +366,7 @@ static NSString * const WebResourceResponseKey = @"WebResourceResponse"
// Copying it will also cause a performance regression.
return [self _initWithData:data
URL:URL
- MIMEType:[response _webcore_MIMEType]
+ MIMEType:[response MIMEType]
textEncodingName:[response textEncodingName]
frameName:nil
response:response
@@ -441,8 +442,7 @@ static const double newMailBundleVersion = 1050.0;
+ (BOOL)_needMailThreadWorkaroundIfCalledOffMainThread
{
- static BOOL isOldMail = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.mail"]
- && [[[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey] doubleValue] < newMailBundleVersion;
+ static BOOL isOldMail = applicationIsAppleMail() && [[[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey] doubleValue] < newMailBundleVersion;
return isOldMail;
}
diff --git a/WebKit/mac/WebView/WebScriptDebugDelegate.mm b/WebKit/mac/WebView/WebScriptDebugDelegate.mm
index 0b47e26..8489c9b 100644
--- a/WebKit/mac/WebView/WebScriptDebugDelegate.mm
+++ b/WebKit/mac/WebView/WebScriptDebugDelegate.mm
@@ -55,7 +55,7 @@ NSString * const WebScriptErrorLineNumberKey = @"WebScriptErrorLineNumber";
@interface WebScriptCallFrame (WebScriptDebugDelegateInternal)
-- (id)_convertValueToObjcValue:(JSValuePtr)value;
+- (id)_convertValueToObjcValue:(JSValue)value;
@end
@@ -113,7 +113,7 @@ NSString * const WebScriptErrorLineNumberKey = @"WebScriptErrorLineNumber";
_private->debuggerCallFrame = 0;
}
-- (id)_convertValueToObjcValue:(JSValuePtr)value
+- (id)_convertValueToObjcValue:(JSValue)value
{
if (!value)
return nil;
@@ -174,6 +174,8 @@ NSString * const WebScriptErrorLineNumberKey = @"WebScriptErrorLineNumber";
if (!_private->debuggerCallFrame)
return [NSArray array];
+ JSLock lock(SilenceAssertionsOnly);
+
const ScopeChainNode* scopeChain = _private->debuggerCallFrame->scopeChain();
if (!scopeChain->next) // global frame
return [NSArray arrayWithObject:_private->globalObject];
@@ -212,7 +214,7 @@ NSString * const WebScriptErrorLineNumberKey = @"WebScriptErrorLineNumber";
if (!_private->debuggerCallFrame)
return nil;
- JSValuePtr exception = _private->debuggerCallFrame->exception();
+ JSValue exception = _private->debuggerCallFrame->exception();
return exception ? [self _convertValueToObjcValue:exception] : nil;
}
@@ -227,7 +229,7 @@ NSString * const WebScriptErrorLineNumberKey = @"WebScriptErrorLineNumber";
if (!_private->debuggerCallFrame)
return nil;
- JSLock lock(false);
+ JSLock lock(SilenceAssertionsOnly);
// If this is the global call frame and there is no dynamic global object,
// Dashcode is attempting to execute JS in the evaluator using a stale
@@ -239,15 +241,15 @@ NSString * const WebScriptErrorLineNumberKey = @"WebScriptErrorLineNumber";
DynamicGlobalObjectScope globalObjectScope(globalObject->globalExec(), globalObject);
- JSValuePtr exception = noValue();
- JSValuePtr result = evaluateInGlobalCallFrame(String(script), exception, globalObject);
+ JSValue exception;
+ JSValue result = evaluateInGlobalCallFrame(String(script), exception, globalObject);
if (exception)
return [self _convertValueToObjcValue:exception];
return result ? [self _convertValueToObjcValue:result] : nil;
}
- JSValuePtr exception = noValue();
- JSValuePtr result = _private->debuggerCallFrame->evaluate(String(script), exception);
+ JSValue exception;
+ JSValue result = _private->debuggerCallFrame->evaluate(String(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 384f826..76bdf58 100644
--- a/WebKit/mac/WebView/WebScriptDebugger.mm
+++ b/WebKit/mac/WebView/WebScriptDebugger.mm
@@ -28,16 +28,17 @@
#import "WebScriptDebugger.h"
+#import "WebDelegateImplementationCaching.h"
#import "WebFrameInternal.h"
-#import "WebViewInternal.h"
#import "WebScriptDebugDelegate.h"
-#import <runtime/JSGlobalObject.h>
-#import <debugger/DebuggerCallFrame.h>
+#import "WebViewInternal.h"
#import <WebCore/DOMWindow.h>
#import <WebCore/Frame.h>
#import <WebCore/JSDOMWindow.h>
#import <WebCore/KURL.h>
#import <WebCore/ScriptController.h>
+#import <debugger/DebuggerCallFrame.h>
+#import <runtime/JSGlobalObject.h>
using namespace JSC;
using namespace WebCore;
diff --git a/WebKit/mac/WebView/WebTextCompletionController.h b/WebKit/mac/WebView/WebTextCompletionController.h
new file mode 100644
index 0000000..158e9b8
--- /dev/null
+++ b/WebKit/mac/WebView/WebTextCompletionController.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2005, 2006, 2007, 2008, 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.
+ */
+
+@class WebView;
+@class WebHTMLView;
+
+@interface WebTextCompletionController : NSObject <NSTableViewDelegate, NSTableViewDataSource> {
+@private
+ WebView *_view;
+ WebHTMLView *_htmlView;
+ NSWindow *_popupWindow;
+ NSTableView *_tableView;
+ NSArray *_completions;
+ NSString *_originalString;
+ int prefixLength;
+}
+- (id)initWithWebView:(WebView *)view HTMLView:(WebHTMLView *)htmlView;
+- (void)doCompletion;
+- (void)endRevertingChange:(BOOL)revertChange moveLeft:(BOOL)goLeft;
+- (BOOL)popupWindowIsOpen;
+- (BOOL)filterKeyDown:(NSEvent *)event;
+- (void)_reflectSelection;
+@end
diff --git a/WebKit/mac/WebView/WebTextCompletionController.mm b/WebKit/mac/WebView/WebTextCompletionController.mm
new file mode 100644
index 0000000..f7c172f
--- /dev/null
+++ b/WebKit/mac/WebView/WebTextCompletionController.mm
@@ -0,0 +1,325 @@
+/*
+ * Copyright (C) 2005, 2006, 2007, 2008, 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.
+ * 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 "WebTextCompletionController.h"
+
+#import "DOMRangeInternal.h"
+#import "WebFrameInternal.h"
+#import "WebHTMLViewInternal.h"
+#import "WebTypesInternal.h"
+#import <WebCore/Frame.h>
+
+@interface NSWindow (WebNSWindowDetails)
+- (void)_setForceActiveControls:(BOOL)flag;
+@end
+
+using namespace WebCore;
+
+// This class handles the complete: operation.
+// It counts on its host view to call endRevertingChange: whenever the current completion needs to be aborted.
+
+// The class is in one of two modes: Popup window showing, or not.
+// It is shown when a completion yields more than one match.
+// If a completion yields one or zero matches, it is not shown, and there is no state carried across to the next completion.
+
+@implementation WebTextCompletionController
+
+- (id)initWithWebView:(WebView *)view HTMLView:(WebHTMLView *)htmlView
+{
+ self = [super init];
+ if (!self)
+ return nil;
+ _view = view;
+ _htmlView = htmlView;
+ return self;
+}
+
+- (void)dealloc
+{
+ [_popupWindow release];
+ [_completions release];
+ [_originalString release];
+
+ [super dealloc];
+}
+
+- (void)_insertMatch:(NSString *)match
+{
+ // FIXME: 3769654 - We should preserve case of string being inserted, even in prefix (but then also be
+ // able to revert that). Mimic NSText.
+ WebFrame *frame = [_htmlView _frame];
+ NSString *newText = [match substringFromIndex:prefixLength];
+ [frame _replaceSelectionWithText:newText selectReplacement:YES smartReplace:NO];
+}
+
+// mostly lifted from NSTextView_KeyBinding.m
+- (void)_buildUI
+{
+ 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]];
+ [column setWidth:tableFrame.size.width];
+ [column setEditable:NO];
+
+ _tableView = [[NSTableView alloc] initWithFrame:tableFrame];
+ [_tableView setAutoresizingMask:NSViewWidthSizable];
+ [_tableView addTableColumn:column];
+ [column release];
+ [_tableView setGridStyleMask:NSTableViewGridNone];
+ [_tableView setCornerView:nil];
+ [_tableView setHeaderView:nil];
+ [_tableView setColumnAutoresizingStyle:NSTableViewUniformColumnAutoresizingStyle];
+ [_tableView setDelegate:self];
+ [_tableView setDataSource:self];
+ [_tableView setTarget:self];
+ [_tableView setDoubleAction:@selector(tableAction:)];
+
+ NSScrollView *scrollView = [[NSScrollView alloc] initWithFrame:scrollFrame];
+ [scrollView setBorderType:NSNoBorder];
+ [scrollView setHasVerticalScroller:YES];
+ [scrollView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
+ [scrollView setDocumentView:_tableView];
+ [_tableView release];
+
+ _popupWindow = [[NSWindow alloc] initWithContentRect:scrollFrame styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO];
+ [_popupWindow setAlphaValue:0.88f];
+ [_popupWindow setContentView:scrollView];
+ [scrollView release];
+ [_popupWindow setHasShadow:YES];
+ [_popupWindow setOneShot:YES];
+ [_popupWindow _setForceActiveControls:YES];
+ [_popupWindow setReleasedWhenClosed:NO];
+}
+
+// mostly lifted from NSTextView_KeyBinding.m
+- (void)_placePopupWindow:(NSPoint)topLeft
+{
+ int numberToShow = [_completions count];
+ if (numberToShow > 20)
+ numberToShow = 20;
+
+ NSRect windowFrame;
+ NSPoint wordStart = topLeft;
+ windowFrame.origin = [[_view window] convertBaseToScreen:[_htmlView convertPoint:wordStart toView:nil]];
+ windowFrame.size.height = numberToShow * [_tableView rowHeight] + (numberToShow + 1) * [_tableView intercellSpacing].height;
+ windowFrame.origin.y -= windowFrame.size.height;
+ NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys:[NSFont systemFontOfSize:12.0f], NSFontAttributeName, nil];
+ float maxWidth = 0.0f;
+ int maxIndex = -1;
+ int i;
+ for (i = 0; i < numberToShow; i++) {
+ float width = ceilf([[_completions objectAtIndex:i] sizeWithAttributes:attributes].width);
+ if (width > maxWidth) {
+ maxWidth = width;
+ maxIndex = i;
+ }
+ }
+ windowFrame.size.width = 100;
+ if (maxIndex >= 0) {
+ maxWidth = ceilf([NSScrollView frameSizeForContentSize:NSMakeSize(maxWidth, 100.0f) hasHorizontalScroller:NO hasVerticalScroller:YES borderType:NSNoBorder].width);
+ maxWidth = ceilf([NSWindow frameRectForContentRect:NSMakeRect(0.0f, 0.0f, maxWidth, 100.0f) styleMask:NSBorderlessWindowMask].size.width);
+ maxWidth += 5.0f;
+ windowFrame.size.width = MAX(maxWidth, windowFrame.size.width);
+ maxWidth = MIN(400.0f, windowFrame.size.width);
+ }
+ [_popupWindow setFrame:windowFrame display:NO];
+
+ [_tableView reloadData];
+ [_tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:0] byExtendingSelection:NO];
+ [_tableView scrollRowToVisible:0];
+ [self _reflectSelection];
+ [_popupWindow setLevel:NSPopUpMenuWindowLevel];
+ [_popupWindow orderFront:nil];
+ [[_view window] addChildWindow:_popupWindow ordered:NSWindowAbove];
+}
+
+- (void)doCompletion
+{
+ if (!_popupWindow) {
+ NSSpellChecker *checker = [NSSpellChecker sharedSpellChecker];
+ if (!checker) {
+ LOG_ERROR("No NSSpellChecker");
+ return;
+ }
+
+ // 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 *prefix = [wholeWord cloneRange];
+ [prefix setEnd:[selection startContainer] offset:[selection startOffset]];
+
+ // Reject some NOP cases
+ if ([prefix collapsed]) {
+ NSBeep();
+ return;
+ }
+ NSString *prefixStr = [frame _stringForRange:prefix];
+ NSString *trimmedPrefix = [prefixStr stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
+ if ([trimmedPrefix length] == 0) {
+ NSBeep();
+ return;
+ }
+ prefixLength = [prefixStr length];
+
+ // Lookup matches
+ [_completions release];
+ _completions = [checker completionsForPartialWordRange:NSMakeRange(0, [prefixStr length]) inString:prefixStr language:nil inSpellDocumentWithTag:[_view spellCheckerDocumentTag]];
+ [_completions retain];
+
+ if (!_completions || [_completions count] == 0) {
+ NSBeep();
+ } else if ([_completions count] == 1) {
+ [self _insertMatch:[_completions objectAtIndex:0]];
+ } else {
+ ASSERT(!_originalString); // this should only be set IFF we have a popup window
+ _originalString = [[frame _stringForRange:selection] retain];
+ [self _buildUI];
+ NSRect wordRect = [frame _caretRectAtNode:[wholeWord startContainer] offset:[wholeWord startOffset] affinity:NSSelectionAffinityDownstream];
+ // +1 to be under the word, not the caret
+ // FIXME - 3769652 - Wrong positioning for right to left languages. We should line up the upper
+ // right corner with the caret instead of upper left, and the +1 would be a -1.
+ NSPoint wordLowerLeft = { NSMinX(wordRect)+1, NSMaxY(wordRect) };
+ [self _placePopupWindow:wordLowerLeft];
+ }
+ } else {
+ [self endRevertingChange:YES moveLeft:NO];
+ }
+}
+
+- (void)endRevertingChange:(BOOL)revertChange moveLeft:(BOOL)goLeft
+{
+ if (_popupWindow) {
+ // tear down UI
+ [[_view window] removeChildWindow:_popupWindow];
+ [_popupWindow orderOut:self];
+ // Must autorelease because event tracking code may be on the stack touching UI
+ [_popupWindow autorelease];
+ _popupWindow = nil;
+
+ if (revertChange) {
+ WebFrame *frame = [_htmlView _frame];
+ [frame _replaceSelectionWithText:_originalString selectReplacement:YES smartReplace:NO];
+ } else if ([_htmlView _hasSelection]) {
+ if (goLeft)
+ [_htmlView moveBackward:nil];
+ else
+ [_htmlView moveForward:nil];
+ }
+ [_originalString release];
+ _originalString = nil;
+ }
+ // else there is no state to abort if the window was not up
+}
+
+- (BOOL)popupWindowIsOpen
+{
+ return _popupWindow != nil;
+}
+
+// WebHTMLView gives us a crack at key events it sees. Return whether we consumed the event.
+// The features for the various keys mimic NSTextView.
+- (BOOL)filterKeyDown:(NSEvent *)event
+{
+ if (!_popupWindow)
+ return NO;
+ NSString *string = [event charactersIgnoringModifiers];
+ if (![string length])
+ return NO;
+ unichar c = [string characterAtIndex:0];
+ if (c == NSUpArrowFunctionKey) {
+ int selectedRow = [_tableView selectedRow];
+ if (0 < selectedRow) {
+ [_tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:selectedRow - 1] byExtendingSelection:NO];
+ [_tableView scrollRowToVisible:selectedRow - 1];
+ }
+ return YES;
+ }
+ if (c == NSDownArrowFunctionKey) {
+ int selectedRow = [_tableView selectedRow];
+ if (selectedRow < (int)[_completions count] - 1) {
+ [_tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:selectedRow + 1] byExtendingSelection:NO];
+ [_tableView scrollRowToVisible:selectedRow + 1];
+ }
+ return YES;
+ }
+ if (c == NSRightArrowFunctionKey || c == '\n' || c == '\r' || c == '\t') {
+ // FIXME: What about backtab?
+ [self endRevertingChange:NO moveLeft:NO];
+ return YES;
+ }
+ if (c == NSLeftArrowFunctionKey) {
+ [self endRevertingChange:NO moveLeft:YES];
+ return YES;
+ }
+ if (c == 0x1B || c == NSF5FunctionKey) {
+ // FIXME: F5?
+ [self endRevertingChange:YES moveLeft:NO];
+ return YES;
+ }
+ if (c == ' ' || c >= 0x21 && c <= 0x2F || c >= 0x3A && c <= 0x40 || c >= 0x5B && c <= 0x60 || c >= 0x7B && c <= 0x7D) {
+ // FIXME: Is the above list of keys really definitive?
+ // Originally this code called ispunct; aren't there other punctuation keys on international keyboards?
+ [self endRevertingChange:NO moveLeft:NO];
+ return NO; // let the char get inserted
+ }
+ return NO;
+}
+
+- (void)_reflectSelection
+{
+ int selectedRow = [_tableView selectedRow];
+ ASSERT(selectedRow >= 0 && selectedRow < (int)[_completions count]);
+ [self _insertMatch:[_completions objectAtIndex:selectedRow]];
+}
+
+- (void)tableAction:(id)sender
+{
+ [self _reflectSelection];
+ [self endRevertingChange:NO moveLeft:NO];
+}
+
+- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView
+{
+ return [_completions count];
+}
+
+- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row
+{
+ return [_completions objectAtIndex:row];
+}
+
+- (void)tableViewSelectionDidChange:(NSNotification *)notification
+{
+ [self _reflectSelection];
+}
+
+@end
diff --git a/WebKit/mac/WebView/WebTextIterator.mm b/WebKit/mac/WebView/WebTextIterator.mm
index 15eeb5f..457bece 100644
--- a/WebKit/mac/WebView/WebTextIterator.mm
+++ b/WebKit/mac/WebView/WebTextIterator.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2008, 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
@@ -67,7 +67,7 @@ using namespace WebCore;
return self;
_private = [[WebTextIteratorPrivate alloc] init];
- _private->_textIterator.set(new TextIterator([range _range], true, false));
+ _private->_textIterator.set(new TextIterator(core(range)));
return self;
}
@@ -83,7 +83,7 @@ using namespace WebCore;
- (DOMRange *)currentRange
{
- return [DOMRange _wrapRange:_private->_textIterator->range().get()];
+ return kit(_private->_textIterator->range().get());
}
- (const unichar *)currentTextPointer
@@ -102,7 +102,7 @@ using namespace WebCore;
- (DOMNode *)currentNode
{
- return [DOMNode _wrapNode:_private->_textIterator->node()];
+ return kit(_private->_textIterator->node());
}
- (NSString *)currentText
diff --git a/WebKit/mac/WebView/WebUIDelegatePrivate.h b/WebKit/mac/WebView/WebUIDelegatePrivate.h
index 8e67963..717cf01 100644
--- a/WebKit/mac/WebView/WebUIDelegatePrivate.h
+++ b/WebKit/mac/WebView/WebUIDelegatePrivate.h
@@ -72,6 +72,19 @@ enum {
WebMenuItemTagTextDirectionDefault,
WebMenuItemTagTextDirectionLeftToRight,
WebMenuItemTagTextDirectionRightToLeft,
+ WebMenuItemTagCorrectSpellingAutomatically,
+ WebMenuItemTagSubstitutionsMenu,
+ WebMenuItemTagShowSubstitutions,
+ WebMenuItemTagSmartCopyPaste,
+ WebMenuItemTagSmartQuotes,
+ WebMenuItemTagSmartDashes,
+ WebMenuItemTagSmartLinks,
+ WebMenuItemTagTextReplacement,
+ WebMenuItemTagTransformationsMenu,
+ WebMenuItemTagMakeUpperCase,
+ WebMenuItemTagMakeLowerCase,
+ WebMenuItemTagCapitalize,
+ WebMenuItemTagChangeBack,
WebMenuItemTagBaseApplication = 10000
};
@class WebGeolocation;
@@ -113,4 +126,17 @@ enum {
- (BOOL)webView:(WebView *)sender frame:(WebFrame *)frame requestGeolocationPermission:(WebGeolocation *)geolocation securityOrigin:(WebSecurityOrigin *)origin;
+- (void)webView:(WebView *)sender formStateDidChangeForNode:(DOMNode *)node;
+- (void)webView:(WebView *)sender formStateDidFocusNode:(DOMNode *)node;
+- (void)webView:(WebView *)sender formStateDidBlurNode:(DOMNode *)node;
+
+/*!
+ @method webView:printFrame:
+ @abstract Informs that a WebFrame needs to be printed
+ @param webView The WebView sending the delegate method
+ @param frameView The WebFrame needing to be printed
+ @discussion This method is called when a script or user requests the page to be printed.
+*/
+- (void)webView:(WebView *)sender printFrame:(WebFrame *)frame;
+
@end
diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm
index eabbc9d..20f2712 100644
--- a/WebKit/mac/WebView/WebView.mm
+++ b/WebKit/mac/WebView/WebView.mm
@@ -28,7 +28,10 @@
*/
#import "WebViewInternal.h"
+#import "WebViewData.h"
+#import "DOMCSSStyleDeclarationInternal.h"
+#import "DOMNodeInternal.h"
#import "DOMRangeInternal.h"
#import "WebBackForwardListInternal.h"
#import "WebCache.h"
@@ -40,6 +43,7 @@
#import "WebDefaultEditingDelegate.h"
#import "WebDefaultPolicyDelegate.h"
#import "WebDefaultUIDelegate.h"
+#import "WebDelegateImplementationCaching.h"
#import "WebDocument.h"
#import "WebDocumentInternal.h"
#import "WebDownload.h"
@@ -64,7 +68,6 @@
#import "WebKitSystemBits.h"
#import "WebKitVersionChecks.h"
#import "WebLocalizableStrings.h"
-#import "WebNodeHighlight.h"
#import "WebNSDataExtras.h"
#import "WebNSDataExtrasPrivate.h"
#import "WebNSDictionaryExtras.h"
@@ -76,6 +79,7 @@
#import "WebNSURLRequestExtras.h"
#import "WebNSUserDefaultsExtras.h"
#import "WebNSViewExtras.h"
+#import "WebNodeHighlight.h"
#import "WebPDFView.h"
#import "WebPanelAuthenticationHandler.h"
#import "WebPasteboardHelper.h"
@@ -84,6 +88,8 @@
#import "WebPreferenceKeysPrivate.h"
#import "WebPreferencesPrivate.h"
#import "WebScriptDebugDelegate.h"
+#import "WebSystemInterface.h"
+#import "WebTextCompletionController.h"
#import "WebTextIterator.h"
#import "WebUIDelegate.h"
#import "WebUIDelegatePrivate.h"
@@ -103,8 +109,8 @@
#import <WebCore/FocusController.h>
#import <WebCore/Frame.h>
#import <WebCore/FrameLoader.h>
-#import <WebCore/FrameView.h>
#import <WebCore/FrameTree.h>
+#import <WebCore/FrameView.h>
#import <WebCore/GCController.h>
#import <WebCore/HTMLNames.h>
#import <WebCore/HistoryItem.h>
@@ -116,15 +122,18 @@
#import <WebCore/PageGroup.h>
#import <WebCore/PlatformMouseEvent.h>
#import <WebCore/ProgressTracker.h>
+#import <WebCore/ResourceHandle.h>
+#import <WebCore/RuntimeApplicationChecks.h>
#import <WebCore/ScriptController.h>
#import <WebCore/ScriptValue.h>
+#import <WebCore/SecurityOrigin.h>
#import <WebCore/SelectionController.h>
#import <WebCore/Settings.h>
#import <WebCore/TextResourceDecoder.h>
#import <WebCore/ThreadCheck.h>
#import <WebCore/WebCoreObjCExtras.h>
-#import <WebCore/WebCoreTextRenderer.h>
#import <WebCore/WebCoreView.h>
+#import <WebCore/Widget.h>
#import <WebKit/DOM.h>
#import <WebKit/DOMExtensions.h>
#import <WebKit/DOMPrivate.h>
@@ -147,6 +156,26 @@
#import <WebKit/WebDashboardRegion.h>
#endif
+@class NSTextInputContext;
+
+@interface NSResponder (WebNSResponderDetails)
+- (NSTextInputContext *)inputContext;
+@end
+
+@interface NSSpellChecker (WebNSSpellCheckerDetails)
+- (void)_preflightChosenSpellServer;
+@end
+
+@interface NSView (WebNSViewDetails)
+- (NSView *)_hitTest:(NSPoint *)aPoint dragTypes:(NSSet *)types;
+- (void)_autoscrollForDraggingInfo:(id)dragInfo timeDelta:(NSTimeInterval)repeatDelta;
+- (BOOL)_shouldAutoscrollForDraggingInfo:(id)dragInfo;
+@end
+
+@interface NSWindow (WebNSWindowDetails)
+- (id)_oldFirstResponderBeforeBecoming;
+@end
+
using namespace WebCore;
using namespace JSC;
@@ -247,6 +276,7 @@ macro(moveWordLeftAndModifySelection) \
macro(moveWordRight) \
macro(moveWordRightAndModifySelection) \
macro(outdent) \
+macro(orderFrontSubstitutionsPanel) \
macro(pageDown) \
macro(pageDownAndModifySelection) \
macro(pageUp) \
@@ -295,32 +325,23 @@ macro(yankAndSelect) \
#define UsingAcceleratedCompositingProperty @"_isUsingAcceleratedCompositing"
#endif
-
static BOOL s_didSetCacheModel;
static WebCacheModel s_cacheModel = WebCacheModelDocumentViewer;
-static BOOL applicationIsTerminating;
-static int pluginDatabaseClientCount = 0;
+static WebView *lastMouseoverView;
#ifndef NDEBUG
static const char webViewIsOpen[] = "At least one WebView is still open.";
#endif
-@interface NSSpellChecker (AppKitSecretsIKnow)
-- (void)_preflightChosenSpellServer;
-@end
-
-@interface NSView (AppKitSecretsIKnow)
-- (NSView *)_hitTest:(NSPoint *)aPoint dragTypes:(NSSet *)types;
-- (void)_autoscrollForDraggingInfo:(id)dragInfo timeDelta:(NSTimeInterval)repeatDelta;
-- (BOOL)_shouldAutoscrollForDraggingInfo:(id)dragInfo;
-@end
-
-@interface NSWindow (AppKitSecretsIKnow)
-- (id)_oldFirstResponderBeforeBecoming;
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+@interface NSObject (NSTextInputContextDetails)
+- (BOOL)wantsToHandleMouseEvents;
+- (BOOL)handleMouseEvent:(NSEvent *)event;
@end
+#endif
-@interface NSObject (ValidateWithoutDelegate)
+@interface NSObject (WebValidateWithoutDelegate)
- (BOOL)validateUserInterfaceItemWithoutDelegate:(id <NSValidatedUserInterfaceItem>)item;
@end
@@ -333,99 +354,6 @@ static const char webViewIsOpen[] = "At least one WebView is still open.";
- (id)initWithTarget:(id)target defaultTarget:(id)defaultTarget catchExceptions:(BOOL)catchExceptions;
@end
-@interface WebViewPrivate : NSObject {
-@public
- Page* page;
-
- id UIDelegate;
- id UIDelegateForwarder;
- id resourceProgressDelegate;
- id downloadDelegate;
- id policyDelegate;
- id policyDelegateForwarder;
- id frameLoadDelegate;
- id frameLoadDelegateForwarder;
- id <WebFormDelegate> formDelegate;
- id editingDelegate;
- id editingDelegateForwarder;
- id scriptDebugDelegate;
-
- WebInspector *inspector;
- WebNodeHighlight *currentNodeHighlight;
-
- BOOL allowsUndo;
-
- float zoomMultiplier;
-
- NSString *applicationNameForUserAgent;
- String userAgent;
- BOOL userAgentOverridden;
-
- WebPreferences *preferences;
- BOOL useSiteSpecificSpoofing;
-
- NSWindow *hostWindow;
-
- int programmaticFocusCount;
-
- WebResourceDelegateImplementationCache resourceLoadDelegateImplementations;
- WebFrameLoadDelegateImplementationCache frameLoadDelegateImplementations;
- WebScriptDebugDelegateImplementationCache scriptDebugDelegateImplementations;
-
- void *observationInfo;
-
- BOOL closed;
- BOOL shouldCloseWithWindow;
- BOOL mainFrameDocumentReady;
- BOOL drawsBackground;
- BOOL editable;
- BOOL tabKeyCyclesThroughElementsChanged;
- BOOL becomingFirstResponder;
- BOOL becomingFirstResponderFromOutside;
- BOOL hoverFeedbackSuspended;
- BOOL usesPageCache;
- BOOL catchesDelegateExceptions;
-
- NSColor *backgroundColor;
-
- NSString *mediaStyle;
-
- BOOL hasSpellCheckerDocumentTag;
- NSInteger spellCheckerDocumentTag;
-
- BOOL smartInsertDeleteEnabled;
- BOOL selectTrailingWhitespaceEnabled;
-
-#if ENABLE(DASHBOARD_SUPPORT)
- BOOL dashboardBehaviorAlwaysSendMouseEventsToAllWindows;
- BOOL dashboardBehaviorAlwaysSendActiveNullEventsToPlugIns;
- BOOL dashboardBehaviorAlwaysAcceptsFirstMouse;
- BOOL dashboardBehaviorAllowWheelScrolling;
-#endif
-
- // WebKit has both a global plug-in database and a separate, per WebView plug-in database. Dashboard uses the per WebView database.
- WebPluginDatabase *pluginDatabase;
-
- HashMap<unsigned long, RetainPtr<id> > identifierMap;
-
- BOOL _keyboardUIModeAccessed;
- KeyboardUIMode _keyboardUIMode;
-
- BOOL shouldUpdateWhileOffscreen;
-
- // When this flag is set, we will not make any subviews underneath this WebView. This means no WebFrameViews and no WebHTMLViews.
- BOOL useDocumentViews;
-
-#if USE(ACCELERATED_COMPOSITING)
- // When this flag is set, next time a WebHTMLView draws, it needs to temporarily disable screen updates
- // so that the NSView drawing is visually synchronized with CALayer updates.
- BOOL needsOneShotDrawingSynchronization;
- // Number of WebHTMLViews using accelerated compositing. Used to implement _isUsingAcceleratedCompositing.
- int acceleratedFramesCount;
-#endif
-}
-@end
-
@interface WebView (WebFileInternal)
- (WebFrame *)_selectedOrMainFrame;
- (BOOL)_isLoading;
@@ -434,9 +362,9 @@ static const char webViewIsOpen[] = "At least one WebView is still open.";
+ (void)_preflightSpellChecker;
- (BOOL)_continuousCheckingAllowed;
- (NSResponder *)_responderForResponderOperations;
-@end
-
-@interface WebView (WebCallDelegateFunctions)
+#if USE(ACCELERATED_COMPOSITING)
+- (void)_clearLayerSyncLoopObserver;
+#endif
@end
static void patchMailRemoveAttributesMethod();
@@ -497,75 +425,13 @@ static BOOL continuousSpellCheckingEnabled;
#ifndef BUILDING_ON_TIGER
static BOOL grammarCheckingEnabled;
#endif
-
-@implementation WebViewPrivate
-
-+ (void)initialize
-{
- JSC::initializeThreading();
-#ifndef BUILDING_ON_TIGER
- WebCoreObjCFinalizeOnMainThread(self);
-#endif
-}
-
-- init
-{
- self = [super init];
- if (!self)
- return nil;
- JSC::initializeThreading();
- allowsUndo = YES;
- zoomMultiplier = 1;
-#if ENABLE(DASHBOARD_SUPPORT)
- dashboardBehaviorAllowWheelScrolling = YES;
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+static BOOL automaticQuoteSubstitutionEnabled;
+static BOOL automaticLinkDetectionEnabled;
+static BOOL automaticDashSubstitutionEnabled;
+static BOOL automaticTextReplacementEnabled;
+static BOOL automaticSpellingCorrectionEnabled;
#endif
- shouldCloseWithWindow = objc_collecting_enabled();
- continuousSpellCheckingEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:WebContinuousSpellCheckingEnabled];
-
-#ifndef BUILDING_ON_TIGER
- grammarCheckingEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:WebGrammarCheckingEnabled];
-#endif
-
- usesPageCache = YES;
-
- pluginDatabaseClientCount++;
-
- shouldUpdateWhileOffscreen = YES;
-
- return self;
-}
-
-- (void)dealloc
-{
- ASSERT(applicationIsTerminating || !page);
- ASSERT(applicationIsTerminating || !preferences);
-
- [applicationNameForUserAgent release];
- [backgroundColor release];
-
- [inspector release];
- [currentNodeHighlight release];
-
- [hostWindow release];
-
- [policyDelegateForwarder release];
- [UIDelegateForwarder release];
- [frameLoadDelegateForwarder release];
- [editingDelegateForwarder release];
-
- [mediaStyle release];
-
- [super dealloc];
-}
-
-- (void)finalize
-{
- ASSERT_MAIN_THREAD();
-
- [super finalize];
-}
-
-@end
@implementation WebView (AllWebViews)
@@ -680,7 +546,7 @@ static void WebKitInitializeApplicationCachePathIfNecessary()
static bool runningLeopardMail()
{
#ifdef BUILDING_ON_LEOPARD
- return [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.mail"];
+ return applicationIsAppleMail();
#endif
return NO;
}
@@ -688,11 +554,16 @@ static bool runningLeopardMail()
static bool runningTigerMail()
{
#ifdef BUILDING_ON_TIGER
- return [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.mail"];
+ return applicationIsAppleMail();
#endif
return NO;
}
+- (void)_dispatchPendingLoadRequests
+{
+ cache()->loader()->servePendingRequests();
+}
+
- (void)_registerDraggedTypes
{
NSArray *editableTypes = [WebHTMLView _insertablePasteboardTypes];
@@ -705,7 +576,7 @@ static bool runningTigerMail()
- (BOOL)_usesDocumentViews
{
- return _private->useDocumentViews;
+ return _private->usesDocumentViews;
}
- (void)_commonInitializationWithFrameName:(NSString *)frameName groupName:(NSString *)groupName usesDocumentViews:(BOOL)usesDocumentViews
@@ -723,12 +594,11 @@ static bool runningTigerMail()
_private->catchesDelegateExceptions = YES;
_private->mainFrameDocumentReady = NO;
_private->drawsBackground = YES;
- _private->smartInsertDeleteEnabled = YES;
- _private->backgroundColor = [[NSColor whiteColor] retain];
- _private->useDocumentViews = usesDocumentViews;
+ _private->backgroundColor = [[NSColor colorWithDeviceWhite:1 alpha:1] retain];
+ _private->usesDocumentViews = usesDocumentViews;
WebFrameView *frameView = nil;
- if (_private->useDocumentViews) {
+ if (_private->usesDocumentViews) {
NSRect f = [self frame];
frameView = [[WebFrameView alloc] initWithFrame: NSMakeRect(0,0,f.size.width,f.size.height)];
[frameView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
@@ -797,6 +667,9 @@ static bool runningTigerMail()
// with substitute data.
FrameLoader::setLocalLoadPolicy(FrameLoader::AllowLocalLoadsForLocalAndSubstituteData);
}
+
+ if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_CONTENT_SNIFFING_FOR_FILE_URLS))
+ ResourceHandle::forceContentSniffing();
}
- (id)_initWithFrame:(NSRect)f frameName:(NSString *)frameName groupName:(NSString *)groupName usesDocumentViews:(BOOL)usesDocumentViews
@@ -823,15 +696,6 @@ static bool runningTigerMail()
return self;
}
-- (void)_boundsChanged
-{
- Frame* frame = core([self mainFrame]);
- IntSize oldSize = frame->view()->frameRect().size();
- frame->view()->resize([self bounds].size.width, [self bounds].size.height);
- if (oldSize != frame->view()->frameRect().size())
- [self setNeedsDisplay: YES];
-}
-
- (BOOL)_mustDrawUnionedRect:(NSRect)rect singleRects:(const NSRect *)rects count:(NSInteger)count
{
// If count == 0 here, use the rect passed in for drawing. This is a workaround for:
@@ -858,7 +722,7 @@ static bool runningTigerMail()
- (void)drawSingleRect:(NSRect)rect
{
- ASSERT(!_private->useDocumentViews);
+ ASSERT(!_private->usesDocumentViews);
[NSGraphicsContext saveGraphicsState];
NSRectClip(rect);
@@ -882,18 +746,43 @@ static bool runningTigerMail()
- (BOOL)isFlipped
{
- return _private && !_private->useDocumentViews;
+ return _private && !_private->usesDocumentViews;
+}
+
+- (void)setFrameSize:(NSSize)size
+{
+ if (!_private->usesDocumentViews && !NSEqualSizes(_private->lastLayoutSize, size)) {
+ Frame* frame = [self _mainCoreFrame];
+ // FIXME: Viewless WebKit is broken with Safari banners (e.g., the Find banner). We'll have to figure out a way for
+ // Safari to communicate that this space is being consumed. For WebKit with document views, there's no
+ // need to do an explicit resize, since WebFrameViews have auto resizing turned on and will handle changing
+ // their bounds automatically. See <rdar://problem/6835573> for details.
+ frame->view()->resize(IntSize(size));
+ frame->view()->setNeedsLayout();
+ [self setNeedsDisplay:YES];
+ _private->lastLayoutSize = size;
+ }
+
+ [super setFrameSize:size];
+}
+
+#if USE(ACCELERATED_COMPOSITING) || !defined(BUILDING_ON_TIGER)
+
+- (void)_viewWillDrawInternal
+{
+ Frame* frame = [self _mainCoreFrame];
+ if (frame && frame->view())
+ frame->view()->layoutIfNeededRecursive();
}
+#endif
+
#ifndef BUILDING_ON_TIGER
- (void)viewWillDraw
{
- if (!_private->useDocumentViews) {
- Frame* frame = core([self mainFrame]);
- if (frame && frame->view())
- frame->view()->layoutIfNeededRecursive();
- }
+ if (!_private->usesDocumentViews)
+ [self _viewWillDrawInternal];
[super viewWillDraw];
}
@@ -902,7 +791,7 @@ static bool runningTigerMail()
- (void)drawRect:(NSRect)rect
{
- if (_private->useDocumentViews)
+ if (_private->usesDocumentViews)
return [super drawRect:rect];
ASSERT_MAIN_THREAD();
@@ -1002,7 +891,22 @@ static bool runningTigerMail()
+ (void)_setAlwaysUsesComplexTextCodePath:(BOOL)f
{
- WebCoreSetAlwaysUsesComplexTextCodePath(f);
+ Font::setCodePath(f ? Font::Complex : Font::Auto);
+}
+
++ (BOOL)canCloseAllWebViews
+{
+ return DOMWindow::dispatchAllPendingBeforeUnloadEvents();
+}
+
++ (void)closeAllWebViews
+{
+ DOMWindow::dispatchAllPendingUnloadEvents();
+
+ // This will close the WebViews in a random order. Change this if close order is important.
+ NSEnumerator *enumerator = [(NSMutableSet *)allWebViewsSet objectEnumerator];
+ while (WebView *webView = [enumerator nextObject])
+ [webView close];
}
+ (BOOL)canShowFile:(NSString *)path
@@ -1045,18 +949,33 @@ static bool runningTigerMail()
WTF::RefCountedLeakCounter::suppressMessages("At least one WebView was closed with fast teardown.");
#endif
- // Dispatch unload events.
- // FIXME: Shouldn't have to use a RefPtr here -- keeping the frame alive while stopping it
- // should be WebCore's responsibility -- but we do as of the time this comment was written.
- RefPtr<Frame> mainFrame = core([self mainFrame]);
- if (mainFrame && mainFrame->page() && mainFrame->page()->pendingUnloadEventCount())
- mainFrame->loader()->stopLoading(true);
-
_private->closed = YES;
+
+ [[NSDistributedNotificationCenter defaultCenter] removeObserver:self];
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
[self _closePluginDatabases];
}
+static bool fastDocumentTeardownEnabled()
+{
+#ifdef NDEBUG
+ static bool enabled = ![[NSUserDefaults standardUserDefaults] boolForKey:WebKitEnableFullDocumentTeardownPreferenceKey];
+#else
+ static bool initialized = false;
+ static bool enabled = false;
+ if (!initialized) {
+ // This allows debug builds to default to not have fast teardown, so leak checking still works.
+ // But still allow the WebKitEnableFullDocumentTeardown default to override it if present.
+ NSNumber *setting = [[NSUserDefaults standardUserDefaults] objectForKey:WebKitEnableFullDocumentTeardownPreferenceKey];
+ if (setting)
+ enabled = ![setting boolValue];
+ initialized = true;
+ }
+#endif
+ return enabled;
+}
+
// _close is here only for backward compatibility; clients and subclasses should use
// public method -close instead.
- (void)_close
@@ -1064,22 +983,21 @@ static bool runningTigerMail()
if (!_private || _private->closed)
return;
+ if (lastMouseoverView == self)
+ lastMouseoverView = nil;
+
#ifndef NDEBUG
WTF::RefCountedLeakCounter::cancelMessageSuppression(webViewIsOpen);
#endif
-
- WebPreferences *preferences = _private->preferences;
- BOOL fullDocumentTeardown = [preferences fullDocumentTeardownEnabled];
-
- // To quit the apps fast we skip document teardown. Two exceptions:
- // 1) plugins need to be destroyed and unloaded
- // 2) unload events need to be called
- if (applicationIsTerminating && !fullDocumentTeardown) {
+
+ // To quit the apps fast we skip document teardown, except plugins
+ // need to be destroyed and unloaded.
+ if (applicationIsTerminating && fastDocumentTeardownEnabled()) {
[self _closeWithFastTeardown];
return;
}
- if (Frame* mainFrame = core([self mainFrame]))
+ if (Frame* mainFrame = [self _mainCoreFrame])
mainFrame->loader()->detachFromParent();
[self _removeFromAllWebViewsSet];
@@ -1111,12 +1029,17 @@ static bool runningTigerMail()
[[NSSpellChecker sharedSpellChecker] closeSpellDocumentWithTag:_private->spellCheckerDocumentTag];
_private->hasSpellCheckerDocumentTag = NO;
}
+
+#if USE(ACCELERATED_COMPOSITING)
+ [self _clearLayerSyncLoopObserver];
+#endif
[[NSDistributedNotificationCenter defaultCenter] removeObserver:self];
[[NSNotificationCenter defaultCenter] removeObserver:self];
[WebPreferences _removeReferenceForIdentifier:[self preferencesIdentifier]];
+ WebPreferences *preferences = _private->preferences;
_private->preferences = nil;
[preferences didRemoveFromWebView];
[preferences release];
@@ -1132,6 +1055,13 @@ static bool runningTigerMail()
#endif
}
+// Indicates if the WebView is in the midst of a user gesture.
+- (BOOL)_isProcessingUserGesture
+{
+ WebFrame *frame = [self mainFrame];
+ return core(frame)->loader()->isProcessingUserGesture();
+}
+
+ (NSString *)_MIMETypeForFile:(NSString *)path
{
NSString *extension = [path pathExtension];
@@ -1277,13 +1207,7 @@ static bool runningTigerMail()
- (BOOL)_needsAdobeFrameReloadingQuirk
{
- static BOOL checked = NO;
- static BOOL needsQuirk = NO;
-
- if (checked)
- return needsQuirk;
-
- needsQuirk = WKAppVersionCheckLessThan(@"com.adobe.Acrobat", -1, 9.0)
+ static BOOL needsQuirk = WKAppVersionCheckLessThan(@"com.adobe.Acrobat", -1, 9.0)
|| WKAppVersionCheckLessThan(@"com.adobe.Acrobat.Pro", -1, 9.0)
|| WKAppVersionCheckLessThan(@"com.adobe.Reader", -1, 9.0)
|| WKAppVersionCheckLessThan(@"com.adobe.distiller", -1, 9.0)
@@ -1293,26 +1217,29 @@ static bool runningTigerMail()
|| WKAppVersionCheckLessThan(@"com.adobe.InCopy", -1, 5.1)
|| WKAppVersionCheckLessThan(@"com.adobe.InDesign", -1, 5.1)
|| WKAppVersionCheckLessThan(@"com.adobe.Soundbooth", -1, 2);
- checked = YES;
return needsQuirk;
}
-- (BOOL)_needsKeyboardEventDisambiguationQuirks
+- (BOOL)_needsLinkElementTextCSSQuirk
{
- static BOOL checked = NO;
- static BOOL needsQuirks = NO;
-
- if (checked)
- return needsQuirks;
-
- needsQuirks = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_IE_COMPATIBLE_KEYBOARD_EVENT_DISPATCH)
- && ![[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.Safari"];
- checked = YES;
+ static BOOL needsQuirk = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_LINK_ELEMENT_TEXT_CSS_QUIRK)
+ && WKAppVersionCheckLessThan(@"com.e-frontier.shade10", -1, 10.6);
+ return needsQuirk;
+}
+- (BOOL)_needsKeyboardEventDisambiguationQuirks
+{
+ static BOOL needsQuirks = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_IE_COMPATIBLE_KEYBOARD_EVENT_DISPATCH) && !applicationIsSafari();
return needsQuirks;
}
+- (BOOL)_needsFrameLoadDelegateRetainQuirk
+{
+ static BOOL needsQuirk = WKAppVersionCheckLessThan(@"com.equinux.iSale5", -1, 5.6);
+ return needsQuirk;
+}
+
- (void)_preferencesChangedNotification:(NSNotification *)notification
{
WebPreferences *preferences = (WebPreferences *)[notification object];
@@ -1372,14 +1299,18 @@ static bool runningTigerMail()
} else
settings->setUserStyleSheetLocation([NSURL URLWithString:@""]);
settings->setNeedsAdobeFrameReloadingQuirk([self _needsAdobeFrameReloadingQuirk]);
+ settings->setTreatsAnyTextCSSLinkAsStylesheet([self _needsLinkElementTextCSSQuirk]);
settings->setNeedsKeyboardEventDisambiguationQuirks([self _needsKeyboardEventDisambiguationQuirks]);
settings->setNeedsLeopardMailQuirks(runningLeopardMail());
settings->setNeedsTigerMailQuirks(runningTigerMail());
settings->setNeedsSiteSpecificQuirks(_private->useSiteSpecificSpoofing);
settings->setWebArchiveDebugModeEnabled([preferences webArchiveDebugModeEnabled]);
+ settings->setLocalFileContentSniffingEnabled([preferences localFileContentSniffingEnabled]);
settings->setOfflineWebApplicationCacheEnabled([preferences offlineWebApplicationCacheEnabled]);
settings->setZoomsTextOnly([preferences zoomsTextOnly]);
+ settings->setXSSAuditorEnabled([preferences isXSSAuditorEnabled]);
settings->setEnforceCSSMIMETypeInStrictMode(!WKAppVersionCheckLessThan(@"com.apple.iWeb", -1, 2.1));
+ settings->setAcceleratedCompositingEnabled([preferences acceleratedCompositingEnabled]);
}
static inline IMP getMethod(id o, SEL s)
@@ -1411,14 +1342,6 @@ static inline IMP getMethod(id o, SEL s)
cache->shouldUseCredentialStorageFunc = getMethod(delegate, @selector(webView:resource:shouldUseCredentialStorageForDataSource:));
}
-WebResourceDelegateImplementationCache* WebViewGetResourceLoadDelegateImplementations(WebView *webView)
-{
- static WebResourceDelegateImplementationCache empty;
- if (!webView)
- return &empty;
- return &webView->_private->resourceLoadDelegateImplementations;
-}
-
- (void)_cacheFrameLoadDelegateImplementations
{
WebFrameLoadDelegateImplementationCache *cache = &_private->frameLoadDelegateImplementations;
@@ -1432,6 +1355,7 @@ WebResourceDelegateImplementationCache* WebViewGetResourceLoadDelegateImplementa
cache->didCancelClientRedirectForFrameFunc = getMethod(delegate, @selector(webView:didCancelClientRedirectForFrame:));
cache->didChangeLocationWithinPageForFrameFunc = getMethod(delegate, @selector(webView:didChangeLocationWithinPageForFrame:));
cache->didClearWindowObjectForFrameFunc = getMethod(delegate, @selector(webView:didClearWindowObject:forFrame:));
+ cache->didClearInspectorWindowObjectForFrameFunc = getMethod(delegate, @selector(webView:didClearInspectorWindowObject:forFrame:));
cache->didCommitLoadForFrameFunc = getMethod(delegate, @selector(webView:didCommitLoadForFrame:));
cache->didFailLoadWithErrorForFrameFunc = getMethod(delegate, @selector(webView:didFailLoadWithError:forFrame:));
cache->didFailProvisionalLoadWithErrorForFrameFunc = getMethod(delegate, @selector(webView:didFailProvisionalLoadWithError:forFrame:));
@@ -1449,14 +1373,6 @@ WebResourceDelegateImplementationCache* WebViewGetResourceLoadDelegateImplementa
cache->windowScriptObjectAvailableFunc = getMethod(delegate, @selector(webView:windowScriptObjectAvailable:));
}
-WebFrameLoadDelegateImplementationCache* WebViewGetFrameLoadDelegateImplementations(WebView *webView)
-{
- static WebFrameLoadDelegateImplementationCache empty;
- if (!webView)
- return &empty;
- return &webView->_private->frameLoadDelegateImplementations;
-}
-
- (void)_cacheScriptDebugDelegateImplementations
{
WebScriptDebugDelegateImplementationCache *cache = &_private->scriptDebugDelegateImplementations;
@@ -1480,14 +1396,6 @@ WebFrameLoadDelegateImplementationCache* WebViewGetFrameLoadDelegateImplementati
cache->exceptionWasRaisedFunc = getMethod(delegate, @selector(webView:exceptionWasRaised:sourceId:line:forWebFrame:));
}
-WebScriptDebugDelegateImplementationCache* WebViewGetScriptDebugDelegateImplementations(WebView *webView)
-{
- static WebScriptDebugDelegateImplementationCache empty;
- if (!webView)
- return &empty;
- return &webView->_private->scriptDebugDelegateImplementations;
-}
-
- (id)_policyDelegateForwarder
{
if (!_private->policyDelegateForwarder)
@@ -1758,42 +1666,72 @@ WebScriptDebugDelegateImplementationCache* WebViewGetScriptDebugDelegateImplemen
#define DASHBOARD_CONTROL_LABEL @"control"
+- (void)_addControlRect:(NSRect)bounds clip:(NSRect)clip fromView:(NSView *)view toDashboardRegions:(NSMutableDictionary *)regions
+{
+ NSRect adjustedBounds = bounds;
+ adjustedBounds.origin = [self convertPoint:bounds.origin fromView:view];
+ adjustedBounds.origin.y = [self bounds].size.height - adjustedBounds.origin.y;
+ adjustedBounds.size = bounds.size;
+
+ NSRect adjustedClip;
+ adjustedClip.origin = [self convertPoint:clip.origin fromView:view];
+ adjustedClip.origin.y = [self bounds].size.height - adjustedClip.origin.y;
+ adjustedClip.size = clip.size;
+
+ WebDashboardRegion *region = [[WebDashboardRegion alloc] initWithRect:adjustedBounds
+ clip:adjustedClip type:WebDashboardRegionTypeScrollerRectangle];
+ NSMutableArray *scrollerRegions = [regions objectForKey:DASHBOARD_CONTROL_LABEL];
+ if (!scrollerRegions) {
+ scrollerRegions = [[NSMutableArray alloc] init];
+ [regions setObject:scrollerRegions forKey:DASHBOARD_CONTROL_LABEL];
+ [scrollerRegions release];
+ }
+ [scrollerRegions addObject:region];
+ [region release];
+}
+
+- (void)_addScrollerDashboardRegionsForFrameView:(FrameView*)frameView dashboardRegions:(NSMutableDictionary *)regions
+{
+ NSView *documentView = [[kit(frameView->frame()) frameView] documentView];
+
+ const HashSet<RefPtr<Widget> >* children = frameView->children();
+ HashSet<RefPtr<Widget> >::const_iterator end = children->end();
+ for (HashSet<RefPtr<Widget> >::const_iterator it = children->begin(); it != end; ++it) {
+ Widget* widget = (*it).get();
+ if (widget->isFrameView()) {
+ [self _addScrollerDashboardRegionsForFrameView:static_cast<FrameView*>(widget) dashboardRegions:regions];
+ continue;
+ }
+
+ if (!widget->isScrollbar())
+ continue;
+
+ // FIXME: This should really pass an appropriate clip, but our first try got it wrong, and
+ // it's not common to need this to be correct in Dashboard widgets.
+ NSRect bounds = widget->frameRect();
+ [self _addControlRect:bounds clip:bounds fromView:documentView toDashboardRegions:regions];
+ }
+}
+
- (void)_addScrollerDashboardRegions:(NSMutableDictionary *)regions from:(NSArray *)views
{
- // Add scroller regions for NSScroller and KWQScrollBar
- int i, count = [views count];
-
- for (i = 0; i < count; i++) {
- NSView *aView = [views objectAtIndex:i];
+ // Add scroller regions for NSScroller and WebCore scrollbars
+ NSUInteger count = [views count];
+ for (NSUInteger i = 0; i < count; i++) {
+ NSView *view = [views objectAtIndex:i];
- if ([aView isKindOfClass:[NSScroller class]] ||
- [aView isKindOfClass:NSClassFromString (@"KWQScrollBar")]) {
- NSRect bounds = [aView bounds];
- NSRect adjustedBounds;
- adjustedBounds.origin = [self convertPoint:bounds.origin fromView:aView];
- adjustedBounds.origin.y = [self bounds].size.height - adjustedBounds.origin.y;
-
- // AppKit has horrible hack of placing absent scrollers at -100,-100
- if (adjustedBounds.origin.y == -100)
- continue;
- adjustedBounds.size = bounds.size;
- NSRect clip = [aView visibleRect];
- NSRect adjustedClip;
- adjustedClip.origin = [self convertPoint:clip.origin fromView:aView];
- adjustedClip.origin.y = [self bounds].size.height - adjustedClip.origin.y;
- adjustedClip.size = clip.size;
- WebDashboardRegion *aRegion =
- [[[WebDashboardRegion alloc] initWithRect:adjustedBounds
- clip:adjustedClip type:WebDashboardRegionTypeScrollerRectangle] autorelease];
- NSMutableArray *scrollerRegions;
- scrollerRegions = [regions objectForKey:DASHBOARD_CONTROL_LABEL];
- if (!scrollerRegions) {
- scrollerRegions = [NSMutableArray array];
- [regions setObject:scrollerRegions forKey:DASHBOARD_CONTROL_LABEL];
+ if ([view isKindOfClass:[WebHTMLView class]]) {
+ if (Frame* coreFrame = core([(WebHTMLView*)view _frame])) {
+ if (FrameView* coreView = coreFrame->view())
+ [self _addScrollerDashboardRegionsForFrameView:coreView dashboardRegions:regions];
}
- [scrollerRegions addObject:aRegion];
+ } else if ([view isKindOfClass:[NSScroller class]]) {
+ // AppKit places absent scrollers at -100,-100
+ if ([view frame].origin.y < 0)
+ continue;
+ [self _addControlRect:[view bounds] clip:[view visibleRect] fromView:view toDashboardRegions:regions];
}
- [self _addScrollerDashboardRegions:regions from:[aView subviews]];
+ [self _addScrollerDashboardRegions:regions from:[view subviews]];
}
}
@@ -1805,7 +1743,7 @@ WebScriptDebugDelegateImplementationCache* WebViewGetScriptDebugDelegateImplemen
- (NSDictionary *)_dashboardRegions
{
// Only return regions from main frame.
- Frame* mainFrame = core([self mainFrame]);
+ Frame* mainFrame = [self _mainCoreFrame];
if (!mainFrame)
return nil;
NSMutableDictionary *regions = mainFrame->dashboardRegionsDictionary();
@@ -1871,12 +1809,12 @@ WebScriptDebugDelegateImplementationCache* WebViewGetScriptDebugDelegateImplemen
+ (void)_setShouldUseFontSmoothing:(BOOL)f
{
- WebCoreSetShouldUseFontSmoothing(f);
+ Font::setShouldUseSmoothing(f);
}
+ (BOOL)_shouldUseFontSmoothing
{
- return WebCoreShouldUseFontSmoothing();
+ return Font::shouldUseSmoothing();
}
+ (void)_setUsesTestModeFocusRingColor:(BOOL)f
@@ -1889,12 +1827,6 @@ WebScriptDebugDelegateImplementationCache* WebViewGetScriptDebugDelegateImplemen
return usesTestModeFocusRingColor();
}
-// This is only used by versions of Safari up to and including 3.0 and should be removed in a future release.
-+ (NSString *)_minimumRequiredSafariBuildNumber
-{
- return @"420+";
-}
-
- (void)setAlwaysShowVerticalScroller:(BOOL)flag
{
WebDynamicScrollBarsView *scrollview = [[[self mainFrame] frameView] _scrollView];
@@ -1925,8 +1857,7 @@ WebScriptDebugDelegateImplementationCache* WebViewGetScriptDebugDelegateImplemen
- (void)setProhibitsMainFrameScrolling:(BOOL)prohibits
{
- Frame* mainFrame = core([self mainFrame]);
- if (mainFrame)
+ if (Frame* mainFrame = [self _mainCoreFrame])
mainFrame->view()->setProhibitsScrolling(prohibits);
}
@@ -1938,14 +1869,13 @@ WebScriptDebugDelegateImplementationCache* WebViewGetScriptDebugDelegateImplemen
- (void)_setInViewSourceMode:(BOOL)flag
{
- Frame* mainFrame = core([self mainFrame]);
- if (mainFrame)
+ if (Frame* mainFrame = [self _mainCoreFrame])
mainFrame->setInViewSourceMode(flag);
}
- (BOOL)_inViewSourceMode
{
- Frame* mainFrame = core([self mainFrame]);
+ Frame* mainFrame = [self _mainCoreFrame];
return mainFrame && mainFrame->inViewSourceMode();
}
@@ -1988,13 +1918,13 @@ WebScriptDebugDelegateImplementationCache* WebViewGetScriptDebugDelegateImplemen
- (void)_attachScriptDebuggerToAllFrames
{
- for (Frame* frame = core([self mainFrame]); frame; frame = frame->tree()->traverseNext())
+ for (Frame* frame = [self _mainCoreFrame]; frame; frame = frame->tree()->traverseNext())
[kit(frame) _attachScriptDebugger];
}
- (void)_detachScriptDebuggerFromAllFrames
{
- for (Frame* frame = core([self mainFrame]); frame; frame = frame->tree()->traverseNext())
+ for (Frame* frame = [self _mainCoreFrame]; frame; frame = frame->tree()->traverseNext())
[kit(frame) _detachScriptDebugger];
}
@@ -2057,13 +1987,13 @@ WebScriptDebugDelegateImplementationCache* WebViewGetScriptDebugDelegateImplemen
IntPoint rectStart(rect.origin.x, rect.origin.y);
IntPoint rectEnd(rect.origin.x + rect.size.width, rect.origin.y + rect.size.height);
- Frame* coreFrame = core([self mainFrame]);
+ Frame* coreFrame = [self _mainCoreFrame];
if (!coreFrame)
return nil;
VisibleSelection selectionInsideRect(coreFrame->visiblePositionForPoint(rectStart), coreFrame->visiblePositionForPoint(rectEnd));
- return [[[WebTextIterator alloc] initWithRange:[DOMRange _wrapRange:selectionInsideRect.toNormalizedRange().get()]] autorelease];
+ return [[[WebTextIterator alloc] initWithRange:kit(selectionInsideRect.toNormalizedRange().get())] autorelease];
}
- (void)handleAuthenticationForResource:(id)identifier challenge:(NSURLAuthenticationChallenge *)challenge fromDataSource:(WebDataSource *)dataSource
@@ -2091,7 +2021,7 @@ WebScriptDebugDelegateImplementationCache* WebViewGetScriptDebugDelegateImplemen
- (void)_executeCoreCommandByName:(NSString *)name value:(NSString *)value
{
- Frame* coreFrame = core([self mainFrame]);
+ Frame* coreFrame = [self _mainCoreFrame];
if (!coreFrame)
return;
coreFrame->editor()->command(name).execute(value);
@@ -2148,47 +2078,25 @@ WebScriptDebugDelegateImplementationCache* WebViewGetScriptDebugDelegateImplemen
return handCursor().impl();
}
-#if USE(ACCELERATED_COMPOSITING)
-- (BOOL)_needsOneShotDrawingSynchronization
-{
- return _private->needsOneShotDrawingSynchronization;
-}
-
-- (void)_setNeedsOneShotDrawingSynchronization:(BOOL)needsSynchronization
+- (BOOL)_isUsingAcceleratedCompositing
{
- _private->needsOneShotDrawingSynchronization = needsSynchronization;
+#if USE(ACCELERATED_COMPOSITING)
+ return _private->acceleratedFramesCount > 0;
+#else
+ return NO;
+#endif
}
-- (void)_startedAcceleratedCompositingForFrame:(WebFrame*)webFrame
+- (NSPasteboard *)_insertionPasteboard
{
- BOOL entering = _private->acceleratedFramesCount == 0;
- if (entering)
- [self willChangeValueForKey:UsingAcceleratedCompositingProperty];
- ++_private->acceleratedFramesCount;
- if (entering)
- [self didChangeValueForKey:UsingAcceleratedCompositingProperty];
+ return _private ? _private->insertionPasteboard : nil;
}
-- (void)_stoppedAcceleratedCompositingForFrame:(WebFrame*)webFrame
-{
- BOOL leaving = _private->acceleratedFramesCount == 1;
- ASSERT(_private->acceleratedFramesCount > 0);
-
- if (leaving)
- [self willChangeValueForKey:UsingAcceleratedCompositingProperty];
- --_private->acceleratedFramesCount;
- if (leaving)
- [self didChangeValueForKey:UsingAcceleratedCompositingProperty];
-}
-#endif
-- (BOOL)_isUsingAcceleratedCompositing
+- (void)_updateActiveState
{
-#if USE(ACCELERATED_COMPOSITING)
- return _private->acceleratedFramesCount > 0;
-#else
- return NO;
-#endif
+ if (_private && _private->page)
+ _private->page->focusController()->setActive([[self window] isKeyWindow]);
}
@end
@@ -2244,14 +2152,33 @@ WebScriptDebugDelegateImplementationCache* WebViewGetScriptDebugDelegateImplemen
return;
initialized = YES;
+ InitWebCoreSystemInterface();
+
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_applicationWillTerminate) name:NSApplicationWillTerminateNotification object:NSApp];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_preferencesChangedNotification:) name:WebPreferencesChangedNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_preferencesRemovedNotification:) name:WebPreferencesRemovedNotification object:nil];
+
+ continuousSpellCheckingEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:WebContinuousSpellCheckingEnabled];
+#ifndef BUILDING_ON_TIGER
+ grammarCheckingEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:WebGrammarCheckingEnabled];
+#endif
+
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+ automaticQuoteSubstitutionEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:WebAutomaticQuoteSubstitutionEnabled];
+ automaticLinkDetectionEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:WebAutomaticLinkDetectionEnabled];
+ automaticDashSubstitutionEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:WebAutomaticDashSubstitutionEnabled];
+ automaticTextReplacementEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:WebAutomaticTextReplacementEnabled];
+ automaticSpellingCorrectionEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:WebAutomaticSpellingCorrectionEnabled];
+#endif
}
+ (void)_applicationWillTerminate
{
applicationIsTerminating = YES;
+
+ if (fastDocumentTeardownEnabled())
+ [self closeAllWebViews];
+
if (!pluginDatabaseClientCount)
[WebPluginDatabase closeSharedDatabase];
@@ -2368,7 +2295,7 @@ WebScriptDebugDelegateImplementationCache* WebViewGetScriptDebugDelegateImplemen
+ (void)registerURLSchemeAsLocal:(NSString *)protocol
{
- FrameLoader::registerURLSchemeAsLocal(protocol);
+ SecurityOrigin::registerURLSchemeAsLocal(protocol);
}
- (id)_initWithArguments:(NSDictionary *) arguments
@@ -2388,11 +2315,41 @@ WebScriptDebugDelegateImplementationCache* WebViewGetScriptDebugDelegateImplemen
return self;
}
+static bool clientNeedsWebViewInitThreadWorkaround()
+{
+ if (WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_WEBVIEW_INIT_THREAD_WORKAROUND))
+ return false;
+
+ NSString *bundleIdentifier = [[NSBundle mainBundle] bundleIdentifier];
+
+ // Installer.
+ if ([bundleIdentifier _webkit_isCaseInsensitiveEqualToString:@"com.apple.installer"])
+ return true;
+
+ // Automator.
+ if ([bundleIdentifier _webkit_isCaseInsensitiveEqualToString:@"com.apple.Automator"])
+ return true;
+
+ // Automator Runner.
+ if ([bundleIdentifier _webkit_isCaseInsensitiveEqualToString:@"com.apple.AutomatorRunner"])
+ return true;
+
+ // Automator workflows.
+ if ([bundleIdentifier _webkit_hasCaseInsensitivePrefix:@"com.apple.Automator."])
+ return true;
+
+#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD)
+ // Mail.
+ if ([bundleIdentifier _webkit_isCaseInsensitiveEqualToString:@"com.apple.Mail"])
+ return true;
+#endif
+
+ return false;
+}
+
static bool needsWebViewInitThreadWorkaround()
{
- static BOOL isOldClient = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_WEBVIEW_INIT_THREAD_WORKAROUND)
- && ([[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.installer"] ||
- [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.Automator"]);
+ static bool isOldClient = clientNeedsWebViewInitThreadWorkaround();
return isOldClient && !pthread_main_np();
}
@@ -2517,6 +2474,9 @@ static bool needsWebViewInitThreadWorkaround()
--WebViewCount;
+ if ([self _needsFrameLoadDelegateRetainQuirk])
+ [_private->frameLoadDelegate release];
+
[_private release];
// [super dealloc] can end up dispatching against _private (3466082)
_private = nil;
@@ -2549,31 +2509,9 @@ static bool needsWebViewInitThreadWorkaround()
return _private->shouldCloseWithWindow;
}
-- (void)removeSizeObservers
-{
- if (!_private->useDocumentViews && [self window]) {
- [[NSNotificationCenter defaultCenter] removeObserver:self
- name:NSViewFrameDidChangeNotification object:self];
- [[NSNotificationCenter defaultCenter] removeObserver:self
- name:NSViewBoundsDidChangeNotification object:self];
- }
-}
-
-- (void)addSizeObservers
+- (void)addWindowObserversForWindow:(NSWindow *)window
{
- if (!_private->useDocumentViews && [self window]) {
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_boundsChanged)
- name:NSViewFrameDidChangeNotification object:self];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_boundsChanged)
- name:NSViewBoundsDidChangeNotification object:self];
- [self _boundsChanged];
- }
-}
-
-- (void)addWindowObservers
-{
- NSWindow *window = [self window];
- if (!_private->useDocumentViews && window) {
+ if (window) {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowDidBecomeKey:)
name:NSWindowDidBecomeKeyNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowDidResignKey:)
@@ -2586,7 +2524,7 @@ static bool needsWebViewInitThreadWorkaround()
- (void)removeWindowObservers
{
NSWindow *window = [self window];
- if (!_private->useDocumentViews && window) {
+ if (window) {
[[NSNotificationCenter defaultCenter] removeObserver:self
name:NSWindowDidBecomeKeyNotification object:nil];
[[NSNotificationCenter defaultCenter] removeObserver:self
@@ -2601,10 +2539,7 @@ static bool needsWebViewInitThreadWorkaround()
// Don't do anything if the WebView isn't initialized.
// This happens when decoding a WebView in a nib.
// FIXME: What sets up the observer of NSWindowWillCloseNotification in this case?
- if (!_private)
- return;
-
- if (_private->closed)
+ if (!_private || _private->closed)
return;
if ([self window] && [self window] != [self hostWindow])
@@ -2618,11 +2553,13 @@ static bool needsWebViewInitThreadWorkaround()
// and over, so do them when we move into a window.
[window setAcceptsMouseMovedEvents:YES];
WKSetNSWindowShouldPostEventNotifications(window, YES);
-
- [self removeWindowObservers];
- [self removeSizeObservers];
} else
_private->page->willMoveOffscreen();
+
+ if (window != [self window]) {
+ [self removeWindowObservers];
+ [self addWindowObserversForWindow:window];
+ }
}
- (void)viewDidMoveToWindow
@@ -2633,66 +2570,29 @@ static bool needsWebViewInitThreadWorkaround()
// initialized. The stub views are discarded by WebView.
if (!_private || _private->closed)
return;
-
- if ([self window]) {
- [self addWindowObservers];
- [self addSizeObservers];
- _private->page->didMoveOnscreen();
- }
-}
-- (void)_updateFocusedAndActiveState
-{
- ASSERT(!_private->useDocumentViews);
- [self _updateFocusedAndActiveStateForFrame:[self mainFrame]];
-}
-
-- (void)_updateFocusedAndActiveStateForFrame:(WebFrame *)webFrame
-{
- Frame* frame = core(webFrame);
- if (!frame)
- return;
+ if ([self window])
+ _private->page->didMoveOnscreen();
- Page* page = frame->page();
- if (!page)
- return;
-
- NSWindow *window = [self window];
- BOOL windowIsKey = [window isKeyWindow];
- BOOL windowOrSheetIsKey = windowIsKey || [[window attachedSheet] isKeyWindow];
-
- WebFrameView *mainFrameView = [[self mainFrame] frameView];
- id <WebDocumentView> documentView = [mainFrameView documentView];
- BOOL documentViewIsResigningFirstResponder = [documentView isKindOfClass:[WebHTMLView class]] && [(WebHTMLView *)documentView _isResigningFirstResponder];
-
- NSResponder *firstResponder = [window firstResponder];
- if ([firstResponder isKindOfClass:[NSView class]]
- && [(NSView *)firstResponder isDescendantOf:mainFrameView])
- page->focusController()->setActive(windowIsKey && !documentViewIsResigningFirstResponder);
-
- Frame* focusedFrame = page->focusController()->focusedOrMainFrame();
- frame->selection()->setFocused(frame == focusedFrame && windowOrSheetIsKey);
+ [self _updateActiveState];
}
- (void)_windowDidBecomeKey:(NSNotification *)notification
{
- ASSERT(!_private->useDocumentViews);
NSWindow *keyWindow = [notification object];
if (keyWindow == [self window] || keyWindow == [[self window] attachedSheet])
- [self _updateFocusedAndActiveState];
+ [self _updateActiveState];
}
- (void)_windowDidResignKey:(NSNotification *)notification
{
- ASSERT(!_private->useDocumentViews);
NSWindow *formerKeyWindow = [notification object];
if (formerKeyWindow == [self window] || formerKeyWindow == [[self window] attachedSheet])
- [self _updateFocusedAndActiveState];
+ [self _updateActiveState];
}
- (void)_windowWillOrderOnScreen:(NSNotification *)notification
{
- ASSERT(!_private->useDocumentViews);
if (![self shouldUpdateWhileOffscreen])
[self setNeedsDisplay:YES];
}
@@ -2797,12 +2697,23 @@ static bool needsWebViewInitThreadWorkaround()
- (void)setFrameLoadDelegate:delegate
{
+ // <rdar://problem/6950660> - Due to some subtle WebKit changes - presumably to delegate callback behavior - we've
+ // unconvered a latent bug in at least one WebKit app where the delegate wasn't properly retained by the app and
+ // was dealloc'ed before being cleared.
+ // This is an effort to keep such apps working for now.
+ if ([self _needsFrameLoadDelegateRetainQuirk]) {
+ [delegate retain];
+ [_private->frameLoadDelegate release];
+ }
+
_private->frameLoadDelegate = delegate;
[self _cacheFrameLoadDelegateImplementations];
+#if ENABLE(ICONDATABASE)
// If this delegate wants callbacks for icons, fire up the icon database.
if (_private->frameLoadDelegateImplementations.didReceiveIconForFrameFunc)
[WebIconDatabase sharedIconDatabase];
+#endif
}
- frameLoadDelegate
@@ -2813,21 +2724,21 @@ static bool needsWebViewInitThreadWorkaround()
- (WebFrame *)mainFrame
{
// This can be called in initialization, before _private has been set up (3465613)
- if (!_private)
- return nil;
- if (!_private->page)
+ if (!_private || !_private->page)
return nil;
return kit(_private->page->mainFrame());
}
- (WebFrame *)selectedFrame
{
- // If the first responder is a view in our tree, we get the frame containing the first responder.
- // This is faster than searching the frame hierarchy, and will give us a result even in the case
- // where the focused frame doesn't actually contain a selection.
- WebFrame *focusedFrame = [self _focusedFrame];
- if (focusedFrame)
- return focusedFrame;
+ if (_private->usesDocumentViews) {
+ // If the first responder is a view in our tree, we get the frame containing the first responder.
+ // This is faster than searching the frame hierarchy, and will give us a result even in the case
+ // where the focused frame doesn't actually contain a selection.
+ WebFrame *focusedFrame = [self _focusedFrame];
+ if (focusedFrame)
+ return focusedFrame;
+ }
// If the first responder is outside of our view tree, we search for a frame containing a selection.
// There should be at most only one of these.
@@ -2843,7 +2754,7 @@ static bool needsWebViewInitThreadWorkaround()
return kit(_private->page->backForwardList());
}
-- (void)setMaintainsBackForwardList: (BOOL)flag
+- (void)setMaintainsBackForwardList:(BOOL)flag
{
if (!_private->page)
return;
@@ -2895,7 +2806,7 @@ static bool needsWebViewInitThreadWorkaround()
// FIXME: it would be nice to rework this code so that _private->zoomMultiplier doesn't exist and callers
// all access _private->page->settings().
- Frame* coreFrame = core([self mainFrame]);
+ Frame* coreFrame = [self _mainCoreFrame];
if (coreFrame)
coreFrame->setZoomFactor(m, isTextOnly);
}
@@ -2990,17 +2901,6 @@ static bool needsWebViewInitThreadWorkaround()
[self _setZoomMultiplier:1.0f isTextOnly:isTextOnly];
}
-- (void)viewWillMoveToSuperview:(NSView *)newSuperview
-{
- [self removeSizeObservers];
-}
-
-- (void)viewDidMoveToSuperview
-{
- if ([self superview] != nil)
- [self addSizeObservers];
-}
-
- (void)setApplicationNameForUserAgent:(NSString *)applicationName
{
NSString *name = [applicationName copy];
@@ -3053,7 +2953,7 @@ static bool needsWebViewInitThreadWorkaround()
NSString *oldEncoding = [self customTextEncodingName];
if (encoding == oldEncoding || [encoding isEqualToString:oldEncoding])
return;
- if (Frame* mainFrame = core([self mainFrame]))
+ if (Frame* mainFrame = [self _mainCoreFrame])
mainFrame->loader()->reloadWithOverrideEncoding(encoding);
}
@@ -3094,7 +2994,7 @@ static bool needsWebViewInitThreadWorkaround()
- (WebScriptObject *)windowScriptObject
{
- Frame* coreFrame = core([self mainFrame]);
+ Frame* coreFrame = [self _mainCoreFrame];
if (!coreFrame)
return nil;
return coreFrame->script()->windowScriptObject();
@@ -3113,17 +3013,21 @@ static bool needsWebViewInitThreadWorkaround()
if (hostWindow == _private->hostWindow)
return;
- Frame* coreFrame = core([self mainFrame]);
- for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame))
- [[[kit(frame) frameView] documentView] viewWillMoveToHostWindow:hostWindow];
+ Frame* coreFrame = [self _mainCoreFrame];
+ if (_private->usesDocumentViews) {
+ for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame))
+ [[[kit(frame) frameView] documentView] viewWillMoveToHostWindow:hostWindow];
+ }
if (_private->hostWindow && [self window] != _private->hostWindow)
[[NSNotificationCenter defaultCenter] removeObserver:self name:NSWindowWillCloseNotification object:_private->hostWindow];
if (hostWindow)
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowWillClose:) name:NSWindowWillCloseNotification object:hostWindow];
[_private->hostWindow release];
_private->hostWindow = [hostWindow retain];
- for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame))
- [[[kit(frame) frameView] documentView] viewDidMoveToHostWindow];
+ if (_private->usesDocumentViews) {
+ for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame))
+ [[[kit(frame) frameView] documentView] viewDidMoveToHostWindow];
+ }
}
- (NSWindow *)hostWindow
@@ -3159,7 +3063,7 @@ static bool needsWebViewInitThreadWorkaround()
return [self _elementAtWindowPoint:[self convertPoint:point toView:nil]];
}
-// The following 2 internal NSView methods are called on the drag destination by make scrolling while dragging work.
+// The following 2 internal NSView methods are called on the drag destination to make scrolling while dragging work.
// Scrolling while dragging will only work if the drag destination is in a scroll view. The WebView is the drag destination.
// When dragging to a WebView, the document subview should scroll, but it doesn't because it is not the drag destination.
// Forward these calls to the document subview to make its scroll view scroll.
@@ -3228,87 +3132,98 @@ static bool needsWebViewInitThreadWorkaround()
return core(self)->dragController()->performDrag(&dragData);
}
-- (NSView *)_hitTest:(NSPoint *)aPoint dragTypes:(NSSet *)types
+- (NSView *)_hitTest:(NSPoint *)point dragTypes:(NSSet *)types
{
- NSView *hitView = [super _hitTest:aPoint dragTypes:types];
- if (!hitView && [[self superview] mouse:*aPoint inRect:[self frame]]) {
+ NSView *hitView = [super _hitTest:point dragTypes:types];
+ if (!hitView && [[self superview] mouse:*point inRect:[self frame]])
return self;
- } else {
- return hitView;
- }
+ return hitView;
}
- (BOOL)acceptsFirstResponder
{
- return [[[self mainFrame] frameView] acceptsFirstResponder];
+ if (_private->usesDocumentViews)
+ return [[[self mainFrame] frameView] acceptsFirstResponder];
+
+ // FIXME (Viewless): Need more code from WebHTMLView here.
+ return YES;
}
- (BOOL)becomeFirstResponder
{
- if (_private->becomingFirstResponder) {
- // Fix for unrepro infinite recursion reported in radar 4448181. If we hit this assert on
- // a debug build, we should figure out what causes the problem and do a better fix.
- ASSERT_NOT_REACHED();
- return NO;
- }
-
- // This works together with setNextKeyView to splice the WebView into
- // the key loop similar to the way NSScrollView does this. Note that
- // WebFrameView has very similar code.
- NSWindow *window = [self window];
- WebFrameView *mainFrameView = [[self mainFrame] frameView];
+ if (_private->usesDocumentViews) {
+ if (_private->becomingFirstResponder) {
+ // Fix for unrepro infinite recursion reported in Radar 4448181. If we hit this assert on
+ // a debug build, we should figure out what causes the problem and do a better fix.
+ ASSERT_NOT_REACHED();
+ return NO;
+ }
+
+ // This works together with setNextKeyView to splice the WebView into
+ // the key loop similar to the way NSScrollView does this. Note that
+ // WebFrameView has very similar code.
+ NSWindow *window = [self window];
+ WebFrameView *mainFrameView = [[self mainFrame] frameView];
+
+ NSResponder *previousFirstResponder = [[self window] _oldFirstResponderBeforeBecoming];
+ BOOL fromOutside = ![previousFirstResponder isKindOfClass:[NSView class]] || (![(NSView *)previousFirstResponder isDescendantOf:self] && previousFirstResponder != self);
+
+ if ([window keyViewSelectionDirection] == NSSelectingPrevious) {
+ NSView *previousValidKeyView = [self previousValidKeyView];
+ if (previousValidKeyView != self && previousValidKeyView != mainFrameView) {
+ _private->becomingFirstResponder = YES;
+ _private->becomingFirstResponderFromOutside = fromOutside;
+ [window makeFirstResponder:previousValidKeyView];
+ _private->becomingFirstResponderFromOutside = NO;
+ _private->becomingFirstResponder = NO;
+ return YES;
+ }
+ return NO;
+ }
- NSResponder *previousFirstResponder = [[self window] _oldFirstResponderBeforeBecoming];
- BOOL fromOutside = ![previousFirstResponder isKindOfClass:[NSView class]] || (![(NSView *)previousFirstResponder isDescendantOf:self] && previousFirstResponder != self);
-
- if ([window keyViewSelectionDirection] == NSSelectingPrevious) {
- NSView *previousValidKeyView = [self previousValidKeyView];
- if ((previousValidKeyView != self) && (previousValidKeyView != mainFrameView)) {
+ if ([mainFrameView acceptsFirstResponder]) {
_private->becomingFirstResponder = YES;
_private->becomingFirstResponderFromOutside = fromOutside;
- [window makeFirstResponder:previousValidKeyView];
+ [window makeFirstResponder:mainFrameView];
_private->becomingFirstResponderFromOutside = NO;
_private->becomingFirstResponder = NO;
return YES;
- } else {
- return NO;
- }
+ }
+
+ return NO;
}
-
- if ([mainFrameView acceptsFirstResponder]) {
- _private->becomingFirstResponder = YES;
- _private->becomingFirstResponderFromOutside = fromOutside;
- [window makeFirstResponder:mainFrameView];
- _private->becomingFirstResponderFromOutside = NO;
- _private->becomingFirstResponder = NO;
- return YES;
- }
-
- return NO;
+
+ // FIXME (Viewless): Need more code from WebHTMLView here.
+ return YES;
}
- (NSView *)_webcore_effectiveFirstResponder
{
- WebFrameView *frameView = [[self mainFrame] frameView];
- return frameView ? [frameView _webcore_effectiveFirstResponder] : [super _webcore_effectiveFirstResponder];
+ if (_private && _private->usesDocumentViews) {
+ if (WebFrameView *frameView = [[self mainFrame] frameView])
+ return [frameView _webcore_effectiveFirstResponder];
+ }
+ return [super _webcore_effectiveFirstResponder];
}
-- (void)setNextKeyView:(NSView *)aView
+- (void)setNextKeyView:(NSView *)view
{
- // This works together with becomeFirstResponder to splice the WebView into
- // the key loop similar to the way NSScrollView does this. Note that
- // WebFrameView has very similar code.
- WebFrameView *mainFrameView = [[self mainFrame] frameView];
- if (mainFrameView != nil) {
- [mainFrameView setNextKeyView:aView];
- } else {
- [super setNextKeyView:aView];
+ if (_private && _private->usesDocumentViews) {
+ // This works together with becomeFirstResponder to splice the WebView into
+ // the key loop similar to the way NSScrollView does this. Note that
+ // WebFrameView has similar code.
+ if (WebFrameView *mainFrameView = [[self mainFrame] frameView]) {
+ [mainFrameView setNextKeyView:view];
+ return;
+ }
}
+
+ [super setNextKeyView:view];
}
-static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
+static WebFrame *incrementFrame(WebFrame *frame, BOOL forward, BOOL wrapFlag)
{
- Frame* coreFrame = core(curr);
+ Frame* coreFrame = core(frame);
return kit(forward
? coreFrame->tree()->traverseNextWithWrap(wrapFlag)
: coreFrame->tree()->traversePreviousWithWrap(wrapFlag));
@@ -3349,7 +3264,6 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
{
if (!_private->page)
return 0.0;
-
return _private->page->progress()->estimatedProgress();
}
@@ -3487,6 +3401,117 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
return _private->currentNodeHighlight;
}
+- (NSView *)previousValidKeyView
+{
+ NSView *result = [super previousValidKeyView];
+
+ // Work around AppKit bug 6905484. If the result is a view that's inside this one, it's
+ // possible it is the wrong answer, because the fact that it's a descendant causes the
+ // code that implements key view redirection to fail; this means we won't redirect to
+ // the toolbar, for example, when we hit the edge of a window. Since the bug is specific
+ // to cases where the receiver of previousValidKeyView is an ancestor of the last valid
+ // key view in the loop, we can sidestep it by walking along previous key views until
+ // we find one that is not a superview, then using that to call previousValidKeyView.
+
+ if (![result isDescendantOf:self])
+ return result;
+
+ // Use a visited set so we don't loop indefinitely when walking crazy key loops.
+ // AppKit uses such sets internally and we want our loop to be as robust as its loops.
+ RetainPtr<CFMutableSetRef> visitedViews = CFSetCreateMutable(0, 0, 0);
+ CFSetAddValue(visitedViews.get(), result);
+
+ NSView *previousView = self;
+ do {
+ CFSetAddValue(visitedViews.get(), previousView);
+ previousView = [previousView previousKeyView];
+ if (!previousView || CFSetGetValue(visitedViews.get(), previousView))
+ return result;
+ } while ([result isDescendantOf:previousView]);
+ return [previousView previousValidKeyView];
+}
+
+- (void)mouseDown:(NSEvent *)event
+{
+ // FIXME (Viewless): This method should be shared with WebHTMLView, which needs to
+ // do the same work in the usesDocumentViews case. We don't want to maintain two
+ // duplicate copies of this method.
+
+ if (_private->usesDocumentViews) {
+ [super mouseDown:event];
+ return;
+ }
+
+ // There's a chance that responding to this event will run a nested event loop, and
+ // fetching a new event might release the old one. Retaining and then autoreleasing
+ // the current event prevents that from causing a problem inside WebKit or AppKit code.
+ [[event retain] autorelease];
+
+ RetainPtr<WebView> protector = self;
+ if ([[self inputContext] wantsToHandleMouseEvents] && [[self inputContext] handleMouseEvent:event])
+ return;
+
+ _private->handlingMouseDownEvent = YES;
+
+ // Record the mouse down position so we can determine drag hysteresis.
+ [self _setMouseDownEvent:event];
+
+ NSInputManager *currentInputManager = [NSInputManager currentInputManager];
+ if ([currentInputManager wantsToHandleMouseEvents] && [currentInputManager handleMouseEvent:event])
+ goto done;
+
+ [_private->completionController endRevertingChange:NO moveLeft:NO];
+
+ // If the web page handles the context menu event and menuForEvent: returns nil, we'll get control click events here.
+ // We don't want to pass them along to KHTML a second time.
+ if (!([event modifierFlags] & NSControlKeyMask)) {
+ _private->ignoringMouseDraggedEvents = NO;
+
+ // Don't do any mouseover while the mouse is down.
+ [self _cancelUpdateMouseoverTimer];
+
+ // Let WebCore get a chance to deal with the event. This will call back to us
+ // to start the autoscroll timer if appropriate.
+ if (Frame* frame = [self _mainCoreFrame])
+ frame->eventHandler()->mouseDown(event);
+ }
+
+done:
+ _private->handlingMouseDownEvent = NO;
+}
+
+- (void)mouseUp:(NSEvent *)event
+{
+ // FIXME (Viewless): This method should be shared with WebHTMLView, which needs to
+ // do the same work in the usesDocumentViews case. We don't want to maintain two
+ // duplicate copies of this method.
+
+ if (_private->usesDocumentViews) {
+ [super mouseUp:event];
+ return;
+ }
+
+ // There's a chance that responding to this event will run a nested event loop, and
+ // fetching a new event might release the old one. Retaining and then autoreleasing
+ // the current event prevents that from causing a problem inside WebKit or AppKit code.
+ [[event retain] autorelease];
+
+ [self _setMouseDownEvent:nil];
+
+ NSInputManager *currentInputManager = [NSInputManager currentInputManager];
+ if ([currentInputManager wantsToHandleMouseEvents] && [currentInputManager handleMouseEvent:event])
+ return;
+
+ [self retain];
+
+ [self _stopAutoscrollTimer];
+ if (Frame* frame = [self _mainCoreFrame])
+ frame->eventHandler()->mouseUp(event);
+ [self _updateMouseoverWithFakeEvent];
+
+ [self release];
+}
+
@end
@implementation WebView (WebIBActions)
@@ -3627,6 +3652,13 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
[menuItem setState:checkMark ? NSOnState : NSOffState];
}
return retVal;
+ } else if (action == @selector(toggleSmartInsertDelete:)) {
+ BOOL checkMark = [self smartInsertDeleteEnabled];
+ if ([(NSObject *)item isKindOfClass:[NSMenuItem class]]) {
+ NSMenuItem *menuItem = (NSMenuItem *)item;
+ [menuItem setState:checkMark ? NSOnState : NSOffState];
+ }
+ return YES;
#ifndef BUILDING_ON_TIGER
} else if (action == @selector(toggleGrammarChecking:)) {
BOOL checkMark = [self isGrammarCheckingEnabled];
@@ -3636,6 +3668,43 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
}
return YES;
#endif
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+ } else if (action == @selector(toggleAutomaticQuoteSubstitution:)) {
+ BOOL checkMark = [self isAutomaticQuoteSubstitutionEnabled];
+ if ([(NSObject *)item isKindOfClass:[NSMenuItem class]]) {
+ NSMenuItem *menuItem = (NSMenuItem *)item;
+ [menuItem setState:checkMark ? NSOnState : NSOffState];
+ }
+ return YES;
+ } else if (action == @selector(toggleAutomaticLinkDetection:)) {
+ BOOL checkMark = [self isAutomaticLinkDetectionEnabled];
+ if ([(NSObject *)item isKindOfClass:[NSMenuItem class]]) {
+ NSMenuItem *menuItem = (NSMenuItem *)item;
+ [menuItem setState:checkMark ? NSOnState : NSOffState];
+ }
+ return YES;
+ } else if (action == @selector(toggleAutomaticDashSubstitution:)) {
+ BOOL checkMark = [self isAutomaticDashSubstitutionEnabled];
+ if ([(NSObject *)item isKindOfClass:[NSMenuItem class]]) {
+ NSMenuItem *menuItem = (NSMenuItem *)item;
+ [menuItem setState:checkMark ? NSOnState : NSOffState];
+ }
+ return YES;
+ } else if (action == @selector(toggleAutomaticTextReplacement:)) {
+ BOOL checkMark = [self isAutomaticTextReplacementEnabled];
+ if ([(NSObject *)item isKindOfClass:[NSMenuItem class]]) {
+ NSMenuItem *menuItem = (NSMenuItem *)item;
+ [menuItem setState:checkMark ? NSOnState : NSOffState];
+ }
+ return YES;
+ } else if (action == @selector(toggleAutomaticSpellingCorrection:)) {
+ BOOL checkMark = [self isAutomaticSpellingCorrectionEnabled];
+ if ([(NSObject *)item isKindOfClass:[NSMenuItem class]]) {
+ NSMenuItem *menuItem = (NSMenuItem *)item;
+ [menuItem setState:checkMark ? NSOnState : NSOffState];
+ }
+ return YES;
+#endif
}
FOR_EACH_RESPONDER_SELECTOR(VALIDATE)
@@ -3737,15 +3806,21 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
return;
_private->hoverFeedbackSuspended = newValue;
- id <WebDocumentView> documentView = [[[self mainFrame] frameView] documentView];
- // FIXME: in a perfect world we'd do this in a general way that worked with any document view,
- // such as by calling a protocol method or using respondsToSelector or sending a notification.
- // But until there is any need for these more general solutions, we'll just hardwire it to work
- // with WebHTMLView.
- // Note that _hoverFeedbackSuspendedChanged needs to be called only on the main WebHTMLView, not
- // on each subframe separately.
- if ([documentView isKindOfClass:[WebHTMLView class]])
- [(WebHTMLView *)documentView _hoverFeedbackSuspendedChanged];
+
+ if (_private->usesDocumentViews) {
+ id <WebDocumentView> documentView = [[[self mainFrame] frameView] documentView];
+ // FIXME: in a perfect world we'd do this in a general way that worked with any document view,
+ // such as by calling a protocol method or using respondsToSelector or sending a notification.
+ // But until there is any need for these more general solutions, we'll just hardwire it to work
+ // with WebHTMLView.
+ // Note that _hoverFeedbackSuspendedChanged needs to be called only on the main WebHTMLView, not
+ // on each subframe separately.
+ if ([documentView isKindOfClass:[WebHTMLView class]])
+ [(WebHTMLView *)documentView _hoverFeedbackSuspendedChanged];
+ return;
+ }
+
+ [self _updateMouseoverWithFakeEvent];
}
- (BOOL)isHoverFeedbackSuspended
@@ -3803,13 +3878,13 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
- (BOOL)shouldClose
{
- Frame* coreFrame = core([self mainFrame]);
+ Frame* coreFrame = [self _mainCoreFrame];
if (!coreFrame)
return YES;
return coreFrame->shouldClose();
}
-static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValuePtr jsValue)
+static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue jsValue)
{
NSAppleEventDescriptor* aeDesc = 0;
if (jsValue.isBoolean())
@@ -3851,7 +3926,7 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValuePtr jsV
return aeDesc;
}
}
- JSValuePtr primitive = object->toPrimitive(exec);
+ JSValue primitive = object->toPrimitive(exec);
if (exec->hadException()) {
exec->clearException();
return [NSAppleEventDescriptor nullDescriptor];
@@ -3866,15 +3941,15 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValuePtr jsV
- (NSAppleEventDescriptor *)aeDescByEvaluatingJavaScriptFromString:(NSString *)script
{
- Frame* coreFrame = core([self mainFrame]);
+ Frame* coreFrame = [self _mainCoreFrame];
if (!coreFrame)
return nil;
if (!coreFrame->document())
return nil;
- JSValuePtr result = coreFrame->loader()->executeScript(script, true).jsValue();
+ JSValue result = coreFrame->loader()->executeScript(script, true).jsValue();
if (!result) // FIXME: pass errors
return 0;
- JSLock lock(false);
+ JSLock lock(SilenceAssertionsOnly);
return aeDescFromJSValue(coreFrame->script()->globalObject()->globalExec(), result);
}
@@ -4215,7 +4290,7 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValuePtr jsV
if (!coreFrame)
return;
- coreFrame->selection()->setSelectedRange([range _range], core(selectionAffinity), true);
+ coreFrame->selection()->setSelectedRange(core(range), core(selectionAffinity), true);
}
}
@@ -4241,7 +4316,7 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValuePtr jsV
_private->editable = flag;
if (!_private->tabKeyCyclesThroughElementsChanged && _private->page)
_private->page->setTabKeyCyclesThroughElements(!flag);
- Frame* mainFrame = core([self mainFrame]);
+ Frame* mainFrame = [self _mainCoreFrame];
if (mainFrame) {
if (flag) {
mainFrame->applyEditingStyleToBodyElement();
@@ -4273,7 +4348,10 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValuePtr jsV
- (void)setSmartInsertDeleteEnabled:(BOOL)flag
{
- _private->smartInsertDeleteEnabled = flag;
+ if (_private->smartInsertDeleteEnabled != flag) {
+ _private->smartInsertDeleteEnabled = flag;
+ [[NSUserDefaults standardUserDefaults] setBool:_private->smartInsertDeleteEnabled forKey:WebSmartInsertDeleteEnabled];
+ }
if (flag)
[self setSelectTrailingWhitespaceEnabled:false];
}
@@ -4393,10 +4471,13 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValuePtr jsV
grammarCheckingEnabled = flag;
[[NSUserDefaults standardUserDefaults] setBool:grammarCheckingEnabled forKey:WebGrammarCheckingEnabled];
- // FIXME 4811447: workaround for lack of API
+#ifndef BUILDING_ON_LEOPARD
+ [[NSSpellChecker sharedSpellChecker] updatePanels];
+#else
NSSpellChecker *spellChecker = [NSSpellChecker sharedSpellChecker];
if ([spellChecker respondsToSelector:@selector(_updateGrammar)])
[spellChecker performSelector:@selector(_updateGrammar)];
+#endif
// We call _preflightSpellChecker when turning continuous spell checking on, but we don't need to do that here
// because grammar checking only occurs on code paths that already preflight spell checking appropriately.
@@ -4414,6 +4495,129 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValuePtr jsV
@end
+@implementation WebView (WebViewTextChecking)
+
+- (BOOL)isAutomaticQuoteSubstitutionEnabled
+{
+#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD)
+ return NO;
+#else
+ return automaticQuoteSubstitutionEnabled;
+#endif
+}
+
+- (BOOL)isAutomaticLinkDetectionEnabled
+{
+#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD)
+ return NO;
+#else
+ return automaticLinkDetectionEnabled;
+#endif
+}
+
+- (BOOL)isAutomaticDashSubstitutionEnabled
+{
+#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD)
+ return NO;
+#else
+ return automaticDashSubstitutionEnabled;
+#endif
+}
+
+- (BOOL)isAutomaticTextReplacementEnabled
+{
+#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD)
+ return NO;
+#else
+ return automaticTextReplacementEnabled;
+#endif
+}
+
+- (BOOL)isAutomaticSpellingCorrectionEnabled
+{
+#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD)
+ return NO;
+#else
+ return automaticSpellingCorrectionEnabled;
+#endif
+}
+
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+
+- (void)setAutomaticQuoteSubstitutionEnabled:(BOOL)flag
+{
+ if (automaticQuoteSubstitutionEnabled == flag)
+ return;
+ automaticQuoteSubstitutionEnabled = flag;
+ [[NSUserDefaults standardUserDefaults] setBool:automaticQuoteSubstitutionEnabled forKey:WebAutomaticQuoteSubstitutionEnabled];
+ [[NSSpellChecker sharedSpellChecker] updatePanels];
+}
+
+- (void)toggleAutomaticQuoteSubstitution:(id)sender
+{
+ [self setAutomaticQuoteSubstitutionEnabled:![self isAutomaticQuoteSubstitutionEnabled]];
+}
+
+- (void)setAutomaticLinkDetectionEnabled:(BOOL)flag
+{
+ if (automaticLinkDetectionEnabled == flag)
+ return;
+ automaticLinkDetectionEnabled = flag;
+ [[NSUserDefaults standardUserDefaults] setBool:automaticLinkDetectionEnabled forKey:WebAutomaticLinkDetectionEnabled];
+ [[NSSpellChecker sharedSpellChecker] updatePanels];
+}
+
+- (void)toggleAutomaticLinkDetection:(id)sender
+{
+ [self setAutomaticLinkDetectionEnabled:![self isAutomaticLinkDetectionEnabled]];
+}
+
+- (void)setAutomaticDashSubstitutionEnabled:(BOOL)flag
+{
+ if (automaticDashSubstitutionEnabled == flag)
+ return;
+ automaticDashSubstitutionEnabled = flag;
+ [[NSUserDefaults standardUserDefaults] setBool:automaticDashSubstitutionEnabled forKey:WebAutomaticDashSubstitutionEnabled];
+ [[NSSpellChecker sharedSpellChecker] updatePanels];
+}
+
+- (void)toggleAutomaticDashSubstitution:(id)sender
+{
+ [self setAutomaticDashSubstitutionEnabled:![self isAutomaticDashSubstitutionEnabled]];
+}
+
+- (void)setAutomaticTextReplacementEnabled:(BOOL)flag
+{
+ if (automaticTextReplacementEnabled == flag)
+ return;
+ automaticTextReplacementEnabled = flag;
+ [[NSUserDefaults standardUserDefaults] setBool:automaticTextReplacementEnabled forKey:WebAutomaticTextReplacementEnabled];
+ [[NSSpellChecker sharedSpellChecker] updatePanels];
+}
+
+- (void)toggleAutomaticTextReplacement:(id)sender
+{
+ [self setAutomaticTextReplacementEnabled:![self isAutomaticTextReplacementEnabled]];
+}
+
+- (void)setAutomaticSpellingCorrectionEnabled:(BOOL)flag
+{
+ if (automaticSpellingCorrectionEnabled == flag)
+ return;
+ automaticSpellingCorrectionEnabled = flag;
+ [[NSUserDefaults standardUserDefaults] setBool:automaticSpellingCorrectionEnabled forKey:WebAutomaticSpellingCorrectionEnabled];
+ [[NSSpellChecker sharedSpellChecker] updatePanels];
+}
+
+- (void)toggleAutomaticSpellingCorrection:(id)sender
+{
+ [self setAutomaticSpellingCorrectionEnabled:![self isAutomaticSpellingCorrectionEnabled]];
+}
+
+#endif
+
+@end
+
@implementation WebView (WebViewUndoableEditing)
- (void)replaceSelectionWithNode:(DOMNode *)node
@@ -4508,6 +4712,22 @@ FOR_EACH_RESPONDER_SELECTOR(FORWARD)
[[self _selectedOrMainFrame] _replaceSelectionWithNode:node selectReplacement:YES smartReplace:NO matchStyle:matchStyle];
}
+- (BOOL)_selectionIsCaret
+{
+ Frame* coreFrame = core([self _selectedOrMainFrame]);
+ if (!coreFrame)
+ return NO;
+ return coreFrame->selection()->isCaret();
+}
+
+- (BOOL)_selectionIsAll
+{
+ Frame* coreFrame = core([self _selectedOrMainFrame]);
+ if (!coreFrame)
+ return NO;
+ return coreFrame->selection()->isAll(MayLeaveEditableContent);
+}
+
@end
static WebFrameView *containingFrameView(NSView *view)
@@ -4524,7 +4744,7 @@ static WebFrameView *containingFrameView(NSView *view)
if (s_didSetCacheModel && cacheModel == s_cacheModel)
return;
- NSString *nsurlCacheDirectory = [(NSString *)WKCopyFoundationCacheDirectory() autorelease];
+ NSString *nsurlCacheDirectory = (NSString *)WebCFAutorelease(WKCopyFoundationCacheDirectory());
if (!nsurlCacheDirectory)
nsurlCacheDirectory = NSHomeDirectory();
@@ -4773,6 +4993,7 @@ static WebFrameView *containingFrameView(NSView *view)
{
if (_private->closed)
return nil;
+ ASSERT(_private->usesDocumentViews);
NSView *view = [self hitTest:[[self superview] convertPoint:point fromView:nil]];
if (![view isDescendantOf:[[self mainFrame] frameView]])
return nil;
@@ -4878,6 +5099,18 @@ static WebFrameView *containingFrameView(NSView *view)
(void)HISearchWindowShow((CFStringRef)selectedString, kNilOptions);
}
+
+#if USE(ACCELERATED_COMPOSITING)
+- (void)_clearLayerSyncLoopObserver
+{
+ if (!_private->layerSyncRunLoopObserver)
+ return;
+
+ CFRunLoopObserverInvalidate(_private->layerSyncRunLoopObserver);
+ CFRelease(_private->layerSyncRunLoopObserver);
+ _private->layerSyncRunLoopObserver = 0;
+}
+#endif
@end
@implementation WebView (WebViewInternal)
@@ -4887,6 +5120,7 @@ static WebFrameView *containingFrameView(NSView *view)
return _private->becomingFirstResponderFromOutside;
}
+#if ENABLE(ICONDATABASE)
- (void)_receivedIconChangedNotification:(NSNotification *)notification
{
// Get the URL for this notification
@@ -4927,6 +5161,7 @@ static WebFrameView *containingFrameView(NSView *view)
[self _didChangeValueForKey:_WebMainFrameIconKey];
}
+#endif // ENABLE(ICONDATABASE)
// Get the appropriate user-agent string for a particular URL.
- (WebCore::String)_userAgentForURL:(const WebCore::KURL&)url
@@ -5009,536 +5244,230 @@ static WebFrameView *containingFrameView(NSView *view)
return _private->_keyboardUIMode;
}
-@end
-
-// We use these functions to call the delegates and block exceptions. These functions are
-// declared inside a WebView category to get direct access to the delegate data memebers,
-// preventing more ObjC message dispatch and compensating for the expense of the @try/@catch.
-
-@implementation WebView (WebCallDelegateFunctions)
-
-typedef float (*ObjCMsgSendFPRet)(id, SEL, ...);
-#if defined(__i386__)
-static const ObjCMsgSendFPRet objc_msgSend_float_return = reinterpret_cast<ObjCMsgSendFPRet>(objc_msgSend_fpret);
-#else
-static const ObjCMsgSendFPRet objc_msgSend_float_return = reinterpret_cast<ObjCMsgSendFPRet>(objc_msgSend);
-#endif
-
-static inline id CallDelegate(WebView *self, id delegate, SEL selector)
-{
- if (!delegate || ![delegate respondsToSelector:selector])
- return nil;
- if (!self->_private->catchesDelegateExceptions)
- return objc_msgSend(delegate, selector, self);
- @try {
- return objc_msgSend(delegate, selector, self);
- } @catch(id exception) {
- ReportDiscardedDelegateException(selector, exception);
- }
- return nil;
-}
-
-static inline id CallDelegate(WebView *self, id delegate, SEL selector, id object)
-{
- if (!delegate || ![delegate respondsToSelector:selector])
- return nil;
- if (!self->_private->catchesDelegateExceptions)
- return objc_msgSend(delegate, selector, self, object);
- @try {
- return objc_msgSend(delegate, selector, self, object);
- } @catch(id exception) {
- ReportDiscardedDelegateException(selector, exception);
- }
- return nil;
-}
-
-static inline id CallDelegate(WebView *self, id delegate, SEL selector, NSRect rect)
-{
- if (!delegate || ![delegate respondsToSelector:selector])
- return nil;
- if (!self->_private->catchesDelegateExceptions)
- return reinterpret_cast<id (*)(id, SEL, WebView *, NSRect)>(objc_msgSend)(delegate, selector, self, rect);
- @try {
- return reinterpret_cast<id (*)(id, SEL, WebView *, NSRect)>(objc_msgSend)(delegate, selector, self, rect);
- } @catch(id exception) {
- ReportDiscardedDelegateException(selector, exception);
- }
- return nil;
-}
-
-static inline id CallDelegate(WebView *self, id delegate, SEL selector, id object1, id object2)
-{
- if (!delegate || ![delegate respondsToSelector:selector])
- return nil;
- if (!self->_private->catchesDelegateExceptions)
- return objc_msgSend(delegate, selector, self, object1, object2);
- @try {
- return objc_msgSend(delegate, selector, self, object1, object2);
- } @catch(id exception) {
- ReportDiscardedDelegateException(selector, exception);
- }
- return nil;
-}
-
-static inline id CallDelegate(WebView *self, id delegate, SEL selector, id object, BOOL boolean)
-{
- if (!delegate || ![delegate respondsToSelector:selector])
- return nil;
- if (!self->_private->catchesDelegateExceptions)
- return objc_msgSend(delegate, selector, self, object, boolean);
- @try {
- return objc_msgSend(delegate, selector, self, object, boolean);
- } @catch(id exception) {
- ReportDiscardedDelegateException(selector, exception);
- }
- return nil;
-}
-
-static inline id CallDelegate(WebView *self, id delegate, SEL selector, id object1, id object2, id object3)
-{
- if (!delegate || ![delegate respondsToSelector:selector])
- return nil;
- if (!self->_private->catchesDelegateExceptions)
- return objc_msgSend(delegate, selector, self, object1, object2, object3);
- @try {
- return objc_msgSend(delegate, selector, self, object1, object2, object3);
- } @catch(id exception) {
- ReportDiscardedDelegateException(selector, exception);
- }
- return nil;
-}
-
-static inline id CallDelegate(WebView *self, id delegate, SEL selector, id object, NSUInteger integer)
-{
- if (!delegate || ![delegate respondsToSelector:selector])
- return nil;
- if (!self->_private->catchesDelegateExceptions)
- return objc_msgSend(delegate, selector, self, object, integer);
- @try {
- return objc_msgSend(delegate, selector, self, object, integer);
- } @catch(id exception) {
- ReportDiscardedDelegateException(selector, exception);
- }
- return nil;
-}
-
-static inline float CallDelegateReturningFloat(WebView *self, id delegate, SEL selector)
+- (void)_setInsertionPasteboard:(NSPasteboard *)pasteboard
{
- if (!delegate || ![delegate respondsToSelector:selector])
- return 0.0f;
- if (!self->_private->catchesDelegateExceptions)
- return objc_msgSend_float_return(delegate, selector, self);
- @try {
- return objc_msgSend_float_return(delegate, selector, self);
- } @catch(id exception) {
- ReportDiscardedDelegateException(selector, exception);
- }
- return 0.0f;
+ _private->insertionPasteboard = pasteboard;
}
-static inline BOOL CallDelegateReturningBoolean(BOOL result, WebView *self, id delegate, SEL selector)
+- (void)_setMouseDownEvent:(NSEvent *)event
{
- if (!delegate || ![delegate respondsToSelector:selector])
- return result;
- if (!self->_private->catchesDelegateExceptions)
- return reinterpret_cast<BOOL (*)(id, SEL, WebView *)>(objc_msgSend)(delegate, selector, self);
- @try {
- return reinterpret_cast<BOOL (*)(id, SEL, WebView *)>(objc_msgSend)(delegate, selector, self);
- } @catch(id exception) {
- ReportDiscardedDelegateException(selector, exception);
- }
- return result;
-}
+ ASSERT(!event || [event type] == NSLeftMouseDown || [event type] == NSRightMouseDown || [event type] == NSOtherMouseDown);
-static inline BOOL CallDelegateReturningBoolean(BOOL result, WebView *self, id delegate, SEL selector, id object)
-{
- if (!delegate || ![delegate respondsToSelector:selector])
- return result;
- if (!self->_private->catchesDelegateExceptions)
- return reinterpret_cast<BOOL (*)(id, SEL, WebView *, id)>(objc_msgSend)(delegate, selector, self, object);
- @try {
- return reinterpret_cast<BOOL (*)(id, SEL, WebView *, id)>(objc_msgSend)(delegate, selector, self, object);
- } @catch(id exception) {
- ReportDiscardedDelegateException(selector, exception);
- }
- return result;
-}
+ if (event == _private->mouseDownEvent)
+ return;
-static inline BOOL CallDelegateReturningBoolean(BOOL result, WebView *self, id delegate, SEL selector, id object, BOOL boolean)
-{
- if (!delegate || ![delegate respondsToSelector:selector])
- return result;
- if (!self->_private->catchesDelegateExceptions)
- return reinterpret_cast<BOOL (*)(id, SEL, WebView *, id, BOOL)>(objc_msgSend)(delegate, selector, self, object, boolean);
- @try {
- return reinterpret_cast<BOOL (*)(id, SEL, WebView *, id, BOOL)>(objc_msgSend)(delegate, selector, self, object, boolean);
- } @catch(id exception) {
- ReportDiscardedDelegateException(selector, exception);
- }
- return result;
+ [event retain];
+ [_private->mouseDownEvent release];
+ _private->mouseDownEvent = event;
}
-static inline BOOL CallDelegateReturningBoolean(BOOL result, WebView *self, id delegate, SEL selector, id object1, id object2)
+- (void)_cancelUpdateMouseoverTimer
{
- if (!delegate || ![delegate respondsToSelector:selector])
- return result;
- if (!self->_private->catchesDelegateExceptions)
- return reinterpret_cast<BOOL (*)(id, SEL, WebView *, id, id)>(objc_msgSend)(delegate, selector, self, object1, object2);
- @try {
- return reinterpret_cast<BOOL (*)(id, SEL, WebView *, id, id)>(objc_msgSend)(delegate, selector, self, object1, object2);
- } @catch(id exception) {
- ReportDiscardedDelegateException(selector, exception);
+ if (_private->updateMouseoverTimer) {
+ CFRunLoopTimerInvalidate(_private->updateMouseoverTimer);
+ CFRelease(_private->updateMouseoverTimer);
+ _private->updateMouseoverTimer = NULL;
}
- return result;
}
-static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector)
+- (void)_stopAutoscrollTimer
{
- if (!delegate)
- return nil;
- if (!self->_private->catchesDelegateExceptions)
- return implementation(delegate, selector, self);
- @try {
- return implementation(delegate, selector, self);
- } @catch(id exception) {
- ReportDiscardedDelegateException(selector, exception);
- }
- return nil;
+ NSTimer *timer = _private->autoscrollTimer;
+ _private->autoscrollTimer = nil;
+ [_private->autoscrollTriggerEvent release];
+ _private->autoscrollTriggerEvent = nil;
+ [timer invalidate];
+ [timer release];
}
-static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector, id object)
++ (void)_updateMouseoverWithEvent:(NSEvent *)event
{
- if (!delegate)
- return nil;
- if (!self->_private->catchesDelegateExceptions)
- return implementation(delegate, selector, self, object);
- @try {
- return implementation(delegate, selector, self, object);
- } @catch(id exception) {
- ReportDiscardedDelegateException(selector, exception);
- }
- return nil;
-}
+ WebView *oldView = lastMouseoverView;
-static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector, id object1, id object2)
-{
- if (!delegate)
- return nil;
- if (!self->_private->catchesDelegateExceptions)
- return implementation(delegate, selector, self, object1, object2);
- @try {
- return implementation(delegate, selector, self, object1, object2);
- } @catch(id exception) {
- ReportDiscardedDelegateException(selector, exception);
- }
- return nil;
-}
+ lastMouseoverView = nil;
-static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector, id object1, id object2, id object3)
-{
- if (!delegate)
- return nil;
- if (!self->_private->catchesDelegateExceptions)
- return implementation(delegate, selector, self, object1, object2, object3);
- @try {
- return implementation(delegate, selector, self, object1, object2, object3);
- } @catch(id exception) {
- ReportDiscardedDelegateException(selector, exception);
+ NSView *contentView = [[event window] contentView];
+ NSPoint locationForHitTest = [[contentView superview] convertPoint:[event locationInWindow] fromView:nil];
+ for (NSView *hitView = [contentView hitTest:locationForHitTest]; hitView; hitView = [hitView superview]) {
+ if ([hitView isKindOfClass:[WebView class]]) {
+ lastMouseoverView = static_cast<WebView *>(hitView);
+ break;
+ }
}
- return nil;
-}
-static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector, id object1, id object2, id object3, id object4)
-{
- if (!delegate)
- return nil;
- if (!self->_private->catchesDelegateExceptions)
- return implementation(delegate, selector, self, object1, object2, object3, object4);
- @try {
- return implementation(delegate, selector, self, object1, object2, object3, object4);
- } @catch(id exception) {
- ReportDiscardedDelegateException(selector, exception);
+ if (lastMouseoverView && lastMouseoverView->_private->hoverFeedbackSuspended)
+ lastMouseoverView = nil;
+
+ if (lastMouseoverView != oldView) {
+ if (Frame* oldCoreFrame = [oldView _mainCoreFrame]) {
+ NSEvent *oldViewEvent = [NSEvent mouseEventWithType:NSMouseMoved
+ location:NSMakePoint(-1, -1)
+ modifierFlags:[[NSApp currentEvent] modifierFlags]
+ timestamp:[NSDate timeIntervalSinceReferenceDate]
+ windowNumber:[[oldView window] windowNumber]
+ context:[[NSApp currentEvent] context]
+ eventNumber:0 clickCount:0 pressure:0];
+ oldCoreFrame->eventHandler()->mouseMoved(oldViewEvent);
+ }
}
- return nil;
-}
-static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector, id object1, NSInteger integer, id object2)
-{
- if (!delegate)
- return nil;
- if (!self->_private->catchesDelegateExceptions)
- return implementation(delegate, selector, self, object1, integer, object2);
- @try {
- return implementation(delegate, selector, self, object1, integer, object2);
- } @catch(id exception) {
- ReportDiscardedDelegateException(selector, exception);
- }
- return nil;
-}
+ if (!lastMouseoverView)
+ return;
-static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector, id object1, NSInteger integer1, NSInteger integer2, id object2)
-{
- if (!delegate)
- return nil;
- if (!self->_private->catchesDelegateExceptions)
- return implementation(delegate, selector, self, object1, integer1, integer2, object2);
- @try {
- return implementation(delegate, selector, self, object1, integer1, integer2, object2);
- } @catch(id exception) {
- ReportDiscardedDelegateException(selector, exception);
- }
- return nil;
+ if (Frame* coreFrame = core([lastMouseoverView mainFrame]))
+ coreFrame->eventHandler()->mouseMoved(event);
}
-static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector, id object1, id object2, NSInteger integer, id object3)
+- (void)_updateMouseoverWithFakeEvent
{
- if (!delegate)
- return nil;
- if (!self->_private->catchesDelegateExceptions)
- return implementation(delegate, selector, self, object1, object2, integer, object3);
- @try {
- return implementation(delegate, selector, self, object1, object2, integer, object3);
- } @catch(id exception) {
- ReportDiscardedDelegateException(selector, exception);
- }
- return nil;
+ [self _cancelUpdateMouseoverTimer];
+
+ NSEvent *fakeEvent = [NSEvent mouseEventWithType:NSMouseMoved
+ location:[[self window] convertScreenToBase:[NSEvent mouseLocation]]
+ modifierFlags:[[NSApp currentEvent] modifierFlags]
+ timestamp:[NSDate timeIntervalSinceReferenceDate]
+ windowNumber:[[self window] windowNumber]
+ context:[[NSApp currentEvent] context]
+ eventNumber:0 clickCount:0 pressure:0];
+
+ [[self class] _updateMouseoverWithEvent:fakeEvent];
}
-static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector, id object1, NSInteger integer1, id object2, NSInteger integer2, id object3)
+- (void)_setToolTip:(NSString *)toolTip
{
- if (!delegate)
- return nil;
- if (!self->_private->catchesDelegateExceptions)
- return implementation(delegate, selector, self, object1, integer1, object2, integer2, object3);
- @try {
- return implementation(delegate, selector, self, object1, integer1, object2, integer2, object3);
- } @catch(id exception) {
- ReportDiscardedDelegateException(selector, exception);
+ if (_private->usesDocumentViews) {
+ id documentView = [[[self _selectedOrMainFrame] frameView] documentView];
+ if ([documentView isKindOfClass:[WebHTMLView class]])
+ [documentView _setToolTip:toolTip];
+ return;
}
- return nil;
-}
-static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector, id object1, NSInteger integer, id object2, id object3, id object4)
-{
- if (!delegate)
- return nil;
- if (!self->_private->catchesDelegateExceptions)
- return implementation(delegate, selector, self, object1, integer, object2, object3, object4);
- @try {
- return implementation(delegate, selector, self, object1, integer, object2, object3, object4);
- } @catch(id exception) {
- ReportDiscardedDelegateException(selector, exception);
- }
- return nil;
+ // FIXME (Viewless): Code to handle tooltips needs to move into WebView.
}
-static inline id CallDelegate(IMP implementation, WebView *self, id delegate, SEL selector, id object1, NSTimeInterval interval, id object2, id object3)
+- (void)_selectionChanged
{
- if (!delegate)
- return nil;
- if (!self->_private->catchesDelegateExceptions)
- return implementation(delegate, selector, self, object1, interval, object2, object3);
- @try {
- return implementation(delegate, selector, self, object1, interval, object2, object3);
- } @catch(id exception) {
- ReportDiscardedDelegateException(selector, exception);
+ if (_private->usesDocumentViews) {
+ id documentView = [[[self _selectedOrMainFrame] frameView] documentView];
+ if ([documentView isKindOfClass:[WebHTMLView class]])
+ [documentView _selectionChanged];
+ return;
}
- return nil;
-}
-id CallUIDelegate(WebView *self, SEL selector)
-{
- return CallDelegate(self, self->_private->UIDelegate, selector);
-}
-
-id CallUIDelegate(WebView *self, SEL selector, id object)
-{
- return CallDelegate(self, self->_private->UIDelegate, selector, object);
+ // FIXME (Viewless): We'll need code here.
}
-id CallUIDelegate(WebView *self, SEL selector, id object, BOOL boolean)
+- (Frame*)_mainCoreFrame
{
- return CallDelegate(self, self->_private->UIDelegate, selector, object, boolean);
+ return (_private && _private->page) ? _private->page->mainFrame() : 0;
}
-id CallUIDelegate(WebView *self, SEL selector, NSRect rect)
-{
- return CallDelegate(self, self->_private->UIDelegate, selector, rect);
-}
-
-id CallUIDelegate(WebView *self, SEL selector, id object1, id object2)
-{
- return CallDelegate(self, self->_private->UIDelegate, selector, object1, object2);
-}
-
-id CallUIDelegate(WebView *self, SEL selector, id object1, id object2, id object3)
-{
- return CallDelegate(self, self->_private->UIDelegate, selector, object1, object2, object3);
-}
-
-id CallUIDelegate(WebView *self, SEL selector, id object, NSUInteger integer)
-{
- return CallDelegate(self, self->_private->UIDelegate, selector, object, integer);
-}
-
-float CallUIDelegateReturningFloat(WebView *self, SEL selector)
-{
- return CallDelegateReturningFloat(self, self->_private->UIDelegate, selector);
-}
-
-BOOL CallUIDelegateReturningBoolean(BOOL result, WebView *self, SEL selector)
-{
- return CallDelegateReturningBoolean(result, self, self->_private->UIDelegate, selector);
-}
-
-BOOL CallUIDelegateReturningBoolean(BOOL result, WebView *self, SEL selector, id object)
-{
- return CallDelegateReturningBoolean(result, self, self->_private->UIDelegate, selector, object);
-}
-
-BOOL CallUIDelegateReturningBoolean(BOOL result, WebView *self, SEL selector, id object, BOOL boolean)
-{
- return CallDelegateReturningBoolean(result, self, self->_private->UIDelegate, selector, object, boolean);
-}
-
-BOOL CallUIDelegateReturningBoolean(BOOL result, WebView *self, SEL selector, id object1, id object2)
-{
- return CallDelegateReturningBoolean(result, self, self->_private->UIDelegate, selector, object1, object2);
-}
-
-id CallFrameLoadDelegate(IMP implementation, WebView *self, SEL selector)
-{
- return CallDelegate(implementation, self, self->_private->frameLoadDelegate, selector);
-}
-
-id CallFrameLoadDelegate(IMP implementation, WebView *self, SEL selector, id object)
-{
- return CallDelegate(implementation, self, self->_private->frameLoadDelegate, selector, object);
-}
-
-id CallFrameLoadDelegate(IMP implementation, WebView *self, SEL selector, id object1, id object2)
-{
- return CallDelegate(implementation, self, self->_private->frameLoadDelegate, selector, object1, object2);
-}
-
-id CallFrameLoadDelegate(IMP implementation, WebView *self, SEL selector, id object1, id object2, id object3)
-{
- return CallDelegate(implementation, self, self->_private->frameLoadDelegate, selector, object1, object2, object3);
-}
-
-id CallFrameLoadDelegate(IMP implementation, WebView *self, SEL selector, id object1, id object2, id object3, id object4)
-{
- return CallDelegate(implementation, self, self->_private->frameLoadDelegate, selector, object1, object2, object3, object4);
-}
-
-id CallFrameLoadDelegate(IMP implementation, WebView *self, SEL selector, id object1, NSTimeInterval interval, id object2, id object3)
-{
- return CallDelegate(implementation, self, self->_private->frameLoadDelegate, selector, object1, interval, object2, object3);
-}
+#if USE(ACCELERATED_COMPOSITING)
-id CallResourceLoadDelegate(IMP implementation, WebView *self, SEL selector, id object1, id object2)
+- (BOOL)_needsOneShotDrawingSynchronization
{
- return CallDelegate(implementation, self, self->_private->resourceProgressDelegate, selector, object1, object2);
+ return _private->needsOneShotDrawingSynchronization;
}
-id CallResourceLoadDelegate(IMP implementation, WebView *self, SEL selector, id object1, id object2, id object3)
+- (void)_setNeedsOneShotDrawingSynchronization:(BOOL)needsSynchronization
{
- return CallDelegate(implementation, self, self->_private->resourceProgressDelegate, selector, object1, object2, object3);
+ _private->needsOneShotDrawingSynchronization = needsSynchronization;
}
-id CallResourceLoadDelegate(IMP implementation, WebView *self, SEL selector, id object1, id object2, id object3, id object4)
+- (void)_startedAcceleratedCompositingForFrame:(WebFrame*)webFrame
{
- return CallDelegate(implementation, self, self->_private->resourceProgressDelegate, selector, object1, object2, object3, object4);
+ BOOL entering = _private->acceleratedFramesCount == 0;
+ if (entering)
+ [self willChangeValueForKey:UsingAcceleratedCompositingProperty];
+ ++_private->acceleratedFramesCount;
+ if (entering)
+ [self didChangeValueForKey:UsingAcceleratedCompositingProperty];
}
-id CallResourceLoadDelegate(IMP implementation, WebView *self, SEL selector, id object1, NSInteger integer, id object2)
+- (void)_stoppedAcceleratedCompositingForFrame:(WebFrame*)webFrame
{
- return CallDelegate(implementation, self, self->_private->resourceProgressDelegate, selector, object1, integer, object2);
+ BOOL leaving = _private->acceleratedFramesCount == 1;
+ ASSERT(_private->acceleratedFramesCount > 0);
+
+ if (leaving)
+ [self willChangeValueForKey:UsingAcceleratedCompositingProperty];
+ --_private->acceleratedFramesCount;
+ if (leaving)
+ [self didChangeValueForKey:UsingAcceleratedCompositingProperty];
}
-id CallResourceLoadDelegate(IMP implementation, WebView *self, SEL selector, id object1, id object2, NSInteger integer, id object3)
+- (BOOL)_syncCompositingChanges
{
- return CallDelegate(implementation, self, self->_private->resourceProgressDelegate, selector, object1, object2, integer, object3);
-}
+ Frame* frame = [self _mainCoreFrame];
+ if (frame && frame->view())
+ return frame->view()->syncCompositingStateRecursive();
-BOOL CallResourceLoadDelegateReturningBoolean(BOOL result, IMP implementation, WebView *self, SEL selector, id object1, id object2)
-{
- if (!self->_private->catchesDelegateExceptions)
- return reinterpret_cast<BOOL (*)(id, SEL, WebView *, id, id)>(objc_msgSend)(self->_private->resourceProgressDelegate, selector, self, object1, object2);
- @try {
- return reinterpret_cast<BOOL (*)(id, SEL, WebView *, id, id)>(objc_msgSend)(self->_private->resourceProgressDelegate, selector, self, object1, object2);
- } @catch(id exception) {
- ReportDiscardedDelegateException(selector, exception);
- }
- return result;
+ return YES;
}
-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);
-}
+/*
+ The order of events with compositing updates is this:
+
+ Start of runloop End of runloop
+ | |
+ --|-------------------------------------------------------|--
+ ^ ^ ^
+ | | |
+ NSWindow update, | CA commit
+ NSView drawing |
+ flush |
+ layerSyncRunLoopObserverCallBack
+
+ To avoid flashing, we have to ensure that compositing changes (rendered via
+ the CoreAnimation rendering display link) appear on screen at the same time
+ as content painted into the window via the normal WebCore rendering path.
+
+ CoreAnimation will commit any layer changes at the end of the runloop via
+ its "CA commit" observer. Those changes can then appear onscreen at any time
+ when the display link fires, which can result in unsynchronized rendering.
+
+ To fix this, the GraphicsLayerCA code in WebCore does not change the CA
+ layer tree during style changes and layout; it stores up all changes and
+ commits them via syncCompositingState(). There are then two situations in
+ which we can call syncCompositingState():
+
+ 1. When painting. FrameView::paintContents() makes a call to syncCompositingState().
+
+ 2. When style changes/layout have made changes to the layer tree which do not
+ result in painting. In this case we need a run loop observer to do a
+ syncCompositingState() at an appropriate time. The observer will keep firing
+ until the time is right (essentially when there are no more pending layouts).
+
+*/
-id CallScriptDebugDelegate(IMP implementation, WebView *self, SEL selector, id object1, NSInteger integer1, id object2, NSInteger integer2, id object3)
+static void layerSyncRunLoopObserverCallBack(CFRunLoopObserverRef, CFRunLoopActivity, void* info)
{
- return CallDelegate(implementation, self, self->_private->scriptDebugDelegate, selector, object1, integer1, object2, integer2, object3);
+ WebView* webView = reinterpret_cast<WebView*>(info);
+ if ([webView _syncCompositingChanges])
+ [webView _clearLayerSyncLoopObserver];
}
-id CallScriptDebugDelegate(IMP implementation, WebView *self, SEL selector, id object1, NSInteger integer, id object2, id object3, id object4)
+- (void)_scheduleCompositingLayerSync
{
- return CallDelegate(implementation, self, self->_private->scriptDebugDelegate, selector, object1, integer, object2, object3, object4);
-}
+ if (_private->layerSyncRunLoopObserver)
+ return;
-id CallScriptDebugDelegate(IMP implementation, WebView *self, SEL selector, id object1, NSInteger integer1, NSInteger integer2, id object2)
-{
- return CallDelegate(implementation, self, self->_private->scriptDebugDelegate, selector, object1, integer1, integer2, object2);
-}
+ // Run after AppKit does its window update. If we do any painting, we'll commit
+ // layer changes from FrameView::paintContents(), otherwise we'll commit via
+ // _syncCompositingChanges when this observer fires.
+ const CFIndex runLoopOrder = NSDisplayWindowRunLoopOrdering + 1;
-// The form delegate needs to have it's own implementation, because the first argument is never the WebView
+ // The WebView always outlives the observer, so no need to retain/release.
+ CFRunLoopObserverContext context = { 0, self, 0, 0, 0 };
-id CallFormDelegate(WebView *self, SEL selector, id object1, id object2)
-{
- id delegate = self->_private->formDelegate;
- if (!delegate || ![delegate respondsToSelector:selector])
- return nil;
- if (!self->_private->catchesDelegateExceptions)
- return objc_msgSend(delegate, selector, object1, object2);
- @try {
- return objc_msgSend(delegate, selector, object1, object2);
- } @catch(id exception) {
- ReportDiscardedDelegateException(selector, exception);
- }
- return nil;
-}
+ _private->layerSyncRunLoopObserver = CFRunLoopObserverCreate(NULL,
+ kCFRunLoopBeforeWaiting | kCFRunLoopExit, true /* repeats */,
+ runLoopOrder, layerSyncRunLoopObserverCallBack, &context);
-id CallFormDelegate(WebView *self, SEL selector, id object1, id object2, id object3, id object4, id object5)
-{
- id delegate = self->_private->formDelegate;
- if (!delegate || ![delegate respondsToSelector:selector])
- return nil;
- if (!self->_private->catchesDelegateExceptions)
- return objc_msgSend(delegate, selector, object1, object2, object3, object4, object5);
- @try {
- return objc_msgSend(delegate, selector, object1, object2, object3, object4, object5);
- } @catch(id exception) {
- ReportDiscardedDelegateException(selector, exception);
- }
- return nil;
+ CFRunLoopAddObserver(CFRunLoopGetCurrent(), _private->layerSyncRunLoopObserver, kCFRunLoopCommonModes);
}
-BOOL CallFormDelegateReturningBoolean(BOOL result, WebView *self, SEL selector, id object1, SEL selectorArg, id object2)
-{
- id delegate = self->_private->formDelegate;
- if (!delegate || ![delegate respondsToSelector:selector])
- return result;
- if (!self->_private->catchesDelegateExceptions)
- return reinterpret_cast<BOOL (*)(id, SEL, id, SEL, id)>(objc_msgSend)(delegate, selector, object1, selectorArg, object2);
- @try {
- return reinterpret_cast<BOOL (*)(id, SEL, id, SEL, id)>(objc_msgSend)(delegate, selector, object1, selectorArg, object2);
- } @catch(id exception) {
- ReportDiscardedDelegateException(selector, exception);
- }
- return result;
-}
+#endif
@end
diff --git a/WebKit/mac/WebView/WebViewData.h b/WebKit/mac/WebView/WebViewData.h
new file mode 100644
index 0000000..91d83a7
--- /dev/null
+++ b/WebKit/mac/WebView/WebViewData.h
@@ -0,0 +1,161 @@
+/*
+ * Copyright (C) 2005, 2006, 2007, 2008, 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.
+ * 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 "WebTypesInternal.h"
+#import "WebDelegateImplementationCaching.h"
+#import <WebCore/PlatformString.h>
+#import <WebCore/WebCoreKeyboardUIMode.h>
+#import <wtf/HashMap.h>
+#import <wtf/RetainPtr.h>
+
+namespace WebCore {
+ class Page;
+}
+
+@class WebInspector;
+@class WebNodeHighlight;
+@class WebPluginDatabase;
+@class WebPreferences;
+@class WebTextCompletionController;
+@protocol WebFormDelegate;
+
+extern BOOL applicationIsTerminating;
+extern int pluginDatabaseClientCount;
+
+// FIXME: This should be renamed to WebViewData.
+@interface WebViewPrivate : NSObject {
+@public
+ WebCore::Page* page;
+
+ id UIDelegate;
+ id UIDelegateForwarder;
+ id resourceProgressDelegate;
+ id downloadDelegate;
+ id policyDelegate;
+ id policyDelegateForwarder;
+ id frameLoadDelegate;
+ id frameLoadDelegateForwarder;
+ id <WebFormDelegate> formDelegate;
+ id editingDelegate;
+ id editingDelegateForwarder;
+ id scriptDebugDelegate;
+
+ WebInspector *inspector;
+ WebNodeHighlight *currentNodeHighlight;
+
+ BOOL allowsUndo;
+
+ float zoomMultiplier;
+
+ NSString *applicationNameForUserAgent;
+ WebCore::String userAgent;
+ BOOL userAgentOverridden;
+
+ WebPreferences *preferences;
+ BOOL useSiteSpecificSpoofing;
+
+ NSWindow *hostWindow;
+
+ int programmaticFocusCount;
+
+ WebResourceDelegateImplementationCache resourceLoadDelegateImplementations;
+ WebFrameLoadDelegateImplementationCache frameLoadDelegateImplementations;
+ WebScriptDebugDelegateImplementationCache scriptDebugDelegateImplementations;
+
+ void *observationInfo;
+
+ BOOL closed;
+ BOOL shouldCloseWithWindow;
+ BOOL mainFrameDocumentReady;
+ BOOL drawsBackground;
+ BOOL editable;
+ BOOL tabKeyCyclesThroughElementsChanged;
+ BOOL becomingFirstResponder;
+ BOOL becomingFirstResponderFromOutside;
+ BOOL hoverFeedbackSuspended;
+ BOOL usesPageCache;
+ BOOL catchesDelegateExceptions;
+
+ NSColor *backgroundColor;
+
+ NSString *mediaStyle;
+
+ BOOL hasSpellCheckerDocumentTag;
+ NSInteger spellCheckerDocumentTag;
+
+ BOOL smartInsertDeleteEnabled;
+ BOOL selectTrailingWhitespaceEnabled;
+
+#if ENABLE(DASHBOARD_SUPPORT)
+ BOOL dashboardBehaviorAlwaysSendMouseEventsToAllWindows;
+ BOOL dashboardBehaviorAlwaysSendActiveNullEventsToPlugIns;
+ BOOL dashboardBehaviorAlwaysAcceptsFirstMouse;
+ BOOL dashboardBehaviorAllowWheelScrolling;
+#endif
+
+ // WebKit has both a global plug-in database and a separate, per WebView plug-in database. Dashboard uses the per WebView database.
+ WebPluginDatabase *pluginDatabase;
+
+ HashMap<unsigned long, RetainPtr<id> > identifierMap;
+
+ BOOL _keyboardUIModeAccessed;
+ WebCore::KeyboardUIMode _keyboardUIMode;
+
+ BOOL shouldUpdateWhileOffscreen;
+
+ // When this flag is set, we will not make any subviews underneath this WebView. This means no WebFrameViews and no WebHTMLViews.
+ BOOL usesDocumentViews;
+
+#if USE(ACCELERATED_COMPOSITING)
+ // When this flag is set, next time a WebHTMLView draws, it needs to temporarily disable screen updates
+ // so that the NSView drawing is visually synchronized with CALayer updates.
+ BOOL needsOneShotDrawingSynchronization;
+ // Number of WebHTMLViews using accelerated compositing. Used to implement _isUsingAcceleratedCompositing.
+ int acceleratedFramesCount;
+ // Run loop observer used to implement the compositing equivalent of -viewWillDraw
+ CFRunLoopObserverRef layerSyncRunLoopObserver;
+#endif
+
+ NSPasteboard *insertionPasteboard;
+
+ NSSize lastLayoutSize;
+
+ BOOL ignoringMouseDraggedEvents;
+
+ NSEvent *mouseDownEvent; // Kept after handling the event.
+ BOOL handlingMouseDownEvent;
+ NSEvent *keyDownEvent; // Kept after handling the event.
+
+ WebTextCompletionController *completionController;
+
+ NSTimer *autoscrollTimer;
+ NSEvent *autoscrollTriggerEvent;
+
+ CFRunLoopTimerRef updateMouseoverTimer;
+}
+@end
diff --git a/WebKit/mac/WebView/WebViewData.mm b/WebKit/mac/WebView/WebViewData.mm
new file mode 100644
index 0000000..48e7f6c
--- /dev/null
+++ b/WebKit/mac/WebView/WebViewData.mm
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2006 David Smith (catfish.man@gmail.com)
+ *
+ * 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 "WebViewData.h"
+
+#import "WebKitLogging.h"
+#import "WebPreferenceKeysPrivate.h"
+#import <WebCore/WebCoreObjCExtras.h>
+#import <objc/objc-auto.h>
+#import <runtime/InitializeThreading.h>
+
+BOOL applicationIsTerminating = NO;
+int pluginDatabaseClientCount = 0;
+
+@implementation WebViewPrivate
+
++ (void)initialize
+{
+ JSC::initializeThreading();
+#ifndef BUILDING_ON_TIGER
+ WebCoreObjCFinalizeOnMainThread(self);
+#endif
+}
+
+- (id)init
+{
+ self = [super init];
+ if (!self)
+ return nil;
+
+ allowsUndo = YES;
+ usesPageCache = YES;
+ shouldUpdateWhileOffscreen = YES;
+
+ zoomMultiplier = 1;
+
+#if ENABLE(DASHBOARD_SUPPORT)
+ dashboardBehaviorAllowWheelScrolling = YES;
+#endif
+
+ shouldCloseWithWindow = objc_collecting_enabled();
+
+ smartInsertDeleteEnabled = ![[NSUserDefaults standardUserDefaults] objectForKey:WebSmartInsertDeleteEnabled]
+ || [[NSUserDefaults standardUserDefaults] boolForKey:WebSmartInsertDeleteEnabled];
+
+
+ pluginDatabaseClientCount++;
+
+ return self;
+}
+
+- (void)dealloc
+{
+ ASSERT(applicationIsTerminating || !page);
+ ASSERT(applicationIsTerminating || !preferences);
+ ASSERT(!insertionPasteboard);
+
+ [applicationNameForUserAgent release];
+ [backgroundColor release];
+ [inspector release];
+ [currentNodeHighlight release];
+ [hostWindow release];
+ [policyDelegateForwarder release];
+ [UIDelegateForwarder release];
+ [frameLoadDelegateForwarder release];
+ [editingDelegateForwarder release];
+ [mediaStyle release];
+
+ [super dealloc];
+}
+
+- (void)finalize
+{
+ ASSERT_MAIN_THREAD();
+ ASSERT(!insertionPasteboard);
+
+ [super finalize];
+}
+
+@end
diff --git a/WebKit/mac/WebView/WebViewInternal.h b/WebKit/mac/WebView/WebViewInternal.h
index ad4f19c..b8266c5 100644
--- a/WebKit/mac/WebView/WebViewInternal.h
+++ b/WebKit/mac/WebView/WebViewInternal.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2006, 2007, 2008, 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
@@ -34,28 +34,24 @@
#ifdef __cplusplus
#import <WebCore/WebCoreKeyboardUIMode.h>
-#endif
-#ifdef __cplusplus
namespace WebCore {
- class KeyboardEvent;
+ class String;
+ class Frame;
class KURL;
+ class KeyboardEvent;
class Page;
- class String;
}
-typedef WebCore::KeyboardEvent WebCoreKeyboardEvent;
-typedef WebCore::Page WebCorePage;
-#else
-@class WebCoreKeyboardEvent;
-@class WebCorePage;
#endif
@class WebBasePluginPackage;
@class WebDownload;
@class WebNodeHighlight;
+#ifdef __cplusplus
+
@interface WebView (WebViewEditingExtras)
-- (BOOL)_interceptEditingKeyEvent:(WebCoreKeyboardEvent *)event shouldSaveCommand:(BOOL)shouldSave;
+- (BOOL)_interceptEditingKeyEvent:(WebCore::KeyboardEvent*)event shouldSaveCommand:(BOOL)shouldSave;
- (BOOL)_shouldChangeSelectedDOMRange:(DOMRange *)currentRange toDOMRange:(DOMRange *)proposedRange affinity:(NSSelectionAffinity)selectionAffinity stillSelecting:(BOOL)flag;
@end
@@ -66,17 +62,48 @@ typedef WebCore::Page WebCorePage;
@end
@interface WebView (WebViewInternal)
-#ifdef __cplusplus
+
+- (WebCore::Frame*)_mainCoreFrame;
+
- (WebCore::String)_userAgentForURL:(const WebCore::KURL&)url;
- (WebCore::KeyboardUIMode)_keyboardUIMode;
+
+- (BOOL)_becomingFirstResponderFromOutside;
+
+#if ENABLE(ICONDATABASE)
+- (void)_registerForIconNotification:(BOOL)listen;
+- (void)_dispatchDidReceiveIconFromWebFrame:(WebFrame *)webFrame;
+#endif
+
+- (void)_setMouseDownEvent:(NSEvent *)event;
+- (void)_cancelUpdateMouseoverTimer;
+- (void)_stopAutoscrollTimer;
+- (void)_updateMouseoverWithFakeEvent;
+- (void)_selectionChanged;
+- (void)_setToolTip:(NSString *)toolTip;
+
+#if USE(ACCELERATED_COMPOSITING)
+- (BOOL)_needsOneShotDrawingSynchronization;
+- (void)_setNeedsOneShotDrawingSynchronization:(BOOL)needsSynchronization;
+- (void)_startedAcceleratedCompositingForFrame:(WebFrame*)webFrame;
+- (void)_stoppedAcceleratedCompositingForFrame:(WebFrame*)webFrame;
+- (void)_scheduleCompositingLayerSync;
#endif
+
@end
-@interface WebView (WebViewMiscInternal)
+#endif
+
+// FIXME: Temporary way to expose methods that are in the wrong category inside WebView.
+@interface WebView (WebViewOtherInternal)
+ (void)_setCacheModel:(WebCacheModel)cacheModel;
+ (WebCacheModel)_cacheModel;
-- (WebCorePage*)page;
+
+#ifdef __cplusplus
+- (WebCore::Page*)page;
+#endif
+
- (NSMenu *)_menuForElement:(NSDictionary *)element defaultItems:(NSArray *)items;
- (id)_UIDelegateForwarder;
- (id)_editingDelegateForwarder;
@@ -123,12 +150,8 @@ typedef WebCore::Page WebCorePage;
- (void)_addObject:(id)object forIdentifier:(unsigned long)identifier;
- (id)_objectForIdentifier:(unsigned long)identifier;
- (void)_removeObjectForIdentifier:(unsigned long)identifier;
-- (BOOL)_becomingFirstResponderFromOutside;
-
-- (void)_registerForIconNotification:(BOOL)listen;
-- (void)_dispatchDidReceiveIconFromWebFrame:(WebFrame *)webFrame;
-- (void)_setZoomMultiplier:(float)m isTextOnly:(BOOL)isTextOnly;
+- (void)_setZoomMultiplier:(float)multiplier isTextOnly:(BOOL)isTextOnly;
- (float)_zoomMultiplier:(BOOL)isTextOnly;
- (float)_realZoomMultiplier;
- (BOOL)_realZoomMultiplierIsTextOnly;
@@ -140,106 +163,9 @@ typedef WebCore::Page WebCorePage;
- (IBAction)_resetZoom:(id)sender isTextOnly:(BOOL)isTextOnly;
- (BOOL)_mustDrawUnionedRect:(NSRect)rect singleRects:(const NSRect *)rects count:(NSInteger)count;
-- (void)_updateFocusedAndActiveStateForFrame:(WebFrame *)webFrame;
+ (BOOL)_canHandleRequest:(NSURLRequest *)request forMainFrame:(BOOL)forMainFrame;
-#if USE(ACCELERATED_COMPOSITING)
-- (BOOL)_needsOneShotDrawingSynchronization;
-- (void)_setNeedsOneShotDrawingSynchronization:(BOOL)needsSynchronization;
-- (void)_startedAcceleratedCompositingForFrame:(WebFrame*)webFrame;
-- (void)_stoppedAcceleratedCompositingForFrame:(WebFrame*)webFrame;
-#endif
+- (void)_setInsertionPasteboard:(NSPasteboard *)pasteboard;
@end
-
-typedef struct _WebResourceDelegateImplementationCache {
- IMP didCancelAuthenticationChallengeFunc;
- IMP didReceiveAuthenticationChallengeFunc;
- IMP identifierForRequestFunc;
- IMP willSendRequestFunc;
- IMP didReceiveResponseFunc;
- IMP didReceiveContentLengthFunc;
- IMP didFinishLoadingFromDataSourceFunc;
- IMP didFailLoadingWithErrorFromDataSourceFunc;
- IMP didLoadResourceFromMemoryCacheFunc;
- IMP willCacheResponseFunc;
- IMP plugInFailedWithErrorFunc;
- IMP shouldUseCredentialStorageFunc;
-} WebResourceDelegateImplementationCache;
-
-typedef struct _WebFrameLoadDelegateImplementationCache {
- IMP didClearWindowObjectForFrameFunc;
- IMP windowScriptObjectAvailableFunc;
- IMP didHandleOnloadEventsForFrameFunc;
- IMP didReceiveServerRedirectForProvisionalLoadForFrameFunc;
- IMP didCancelClientRedirectForFrameFunc;
- IMP willPerformClientRedirectToURLDelayFireDateForFrameFunc;
- IMP didChangeLocationWithinPageForFrameFunc;
- IMP willCloseFrameFunc;
- IMP didStartProvisionalLoadForFrameFunc;
- IMP didReceiveTitleForFrameFunc;
- IMP didCommitLoadForFrameFunc;
- IMP didFailProvisionalLoadWithErrorForFrameFunc;
- IMP didFailLoadWithErrorForFrameFunc;
- IMP didFinishLoadForFrameFunc;
- IMP didFirstLayoutInFrameFunc;
- IMP didFirstVisuallyNonEmptyLayoutInFrameFunc;
- IMP didReceiveIconForFrameFunc;
- IMP didFinishDocumentLoadForFrameFunc;
-} WebFrameLoadDelegateImplementationCache;
-
-typedef struct _WebScriptDebugDelegateImplementationCache {
- BOOL didParseSourceExpectsBaseLineNumber;
- IMP didParseSourceFunc;
- IMP failedToParseSourceFunc;
- IMP didEnterCallFrameFunc;
- IMP willExecuteStatementFunc;
- IMP willLeaveCallFrameFunc;
- IMP exceptionWasRaisedFunc;
-} WebScriptDebugDelegateImplementationCache;
-
-WebResourceDelegateImplementationCache* WebViewGetResourceLoadDelegateImplementations(WebView *webView);
-WebFrameLoadDelegateImplementationCache* WebViewGetFrameLoadDelegateImplementations(WebView *webView);
-WebScriptDebugDelegateImplementationCache* WebViewGetScriptDebugDelegateImplementations(WebView *webView);
-
-#ifdef __cplusplus
-
-id CallFormDelegate(WebView *, SEL, id, id);
-id CallFormDelegate(WebView *self, SEL selector, id object1, id object2, id object3, id object4, id object5);
-BOOL CallFormDelegateReturningBoolean(BOOL, WebView *, SEL, id, SEL, id);
-
-id CallUIDelegate(WebView *, SEL);
-id CallUIDelegate(WebView *, SEL, id);
-id CallUIDelegate(WebView *, SEL, NSRect);
-id CallUIDelegate(WebView *, SEL, id, id);
-id CallUIDelegate(WebView *, SEL, id, BOOL);
-id CallUIDelegate(WebView *, SEL, id, id, id);
-id CallUIDelegate(WebView *, SEL, id, NSUInteger);
-float CallUIDelegateReturningFloat(WebView *, SEL);
-BOOL CallUIDelegateReturningBoolean(BOOL, WebView *, SEL);
-BOOL CallUIDelegateReturningBoolean(BOOL, WebView *, SEL, id);
-BOOL CallUIDelegateReturningBoolean(BOOL, WebView *, SEL, id, id);
-BOOL CallUIDelegateReturningBoolean(BOOL, WebView *, SEL, id, BOOL);
-
-id CallFrameLoadDelegate(IMP, WebView *, SEL);
-id CallFrameLoadDelegate(IMP, WebView *, SEL, id);
-id CallFrameLoadDelegate(IMP, WebView *, SEL, id, id);
-id CallFrameLoadDelegate(IMP, WebView *, SEL, id, id, id);
-id CallFrameLoadDelegate(IMP, WebView *, SEL, id, id, id, id);
-id CallFrameLoadDelegate(IMP, WebView *, SEL, id, NSTimeInterval, id, id);
-
-id CallResourceLoadDelegate(IMP, WebView *, SEL, id, id);
-id CallResourceLoadDelegate(IMP, WebView *, SEL, id, id, id);
-id CallResourceLoadDelegate(IMP, WebView *, SEL, id, id, id, id);
-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);
-
-id CallScriptDebugDelegate(IMP, WebView *, SEL, id, id, NSInteger, id);
-id CallScriptDebugDelegate(IMP, WebView *, SEL, id, NSInteger, id, NSInteger, id);
-id CallScriptDebugDelegate(IMP, WebView *, SEL, id, NSInteger, id, id, id);
-id CallScriptDebugDelegate(IMP, WebView *, SEL, id, NSInteger, NSInteger, id);
-
-#endif
diff --git a/WebKit/mac/WebView/WebViewPrivate.h b/WebKit/mac/WebView/WebViewPrivate.h
index ada0e01..362b2e6 100644
--- a/WebKit/mac/WebView/WebViewPrivate.h
+++ b/WebKit/mac/WebView/WebViewPrivate.h
@@ -206,12 +206,21 @@ typedef enum {
/*!
Could be worth adding to the API.
- @method loadItemsFromOtherView:
+ @method _loadBackForwardListFromOtherView:
@abstract Loads the view with the contents of the other view, including its backforward list.
@param otherView The WebView from which to copy contents.
*/
- (void)_loadBackForwardListFromOtherView:(WebView *)otherView;
+
+/*!
+ @method _dispatchPendingLoadRequests:
+ @abstract Dispatches any pending load requests that have been scheduled because of recent DOM additions or style changes.
+ @discussion You only need to call this method if you require synchronous notification of loads through the resource load delegate.
+ Otherwise the resource load delegate will be notified about loads during a future run loop iteration.
+ */
+- (void)_dispatchPendingLoadRequests;
+
+ (NSArray *)_supportedFileExtensions;
/*!
@@ -231,6 +240,13 @@ Could be worth adding to the API.
+ (NSString *)_standardUserAgentWithApplicationName:(NSString *)applicationName;
+/*!
+ @method canCloseAllWebViews
+ @abstract Checks if all the open WebViews can be closed (by dispatching the beforeUnload event to the pages).
+ @result YES if all the WebViews can be closed.
+*/
++ (BOOL)canCloseAllWebViews;
+
// May well become public
- (void)_setFormDelegate:(id<WebFormDelegate>)delegate;
- (id<WebFormDelegate>)_formDelegate;
@@ -241,6 +257,12 @@ Could be worth adding to the API.
// until callers can be weaned off of it.
- (void)_close;
+// Indicates if the WebView is in the midst of a user gesture.
+- (BOOL)_isProcessingUserGesture;
+
+// SPI for DumpRenderTree
+- (void)_updateActiveState;
+
/*!
@method _registerViewClass:representationClass:forURLScheme:
@discussion Register classes that implement WebDocumentView and WebDocumentRepresentation respectively.
@@ -295,8 +317,6 @@ Could be worth adding to the API.
+ (void)_setUsesTestModeFocusRingColor:(BOOL)f;
+ (BOOL)_usesTestModeFocusRingColor;
-+ (NSString *)_minimumRequiredSafariBuildNumber;
-
/*!
@method setAlwaysShowVerticalScroller:
@result Forces the vertical scroller to be visible if flag is YES, otherwise
@@ -369,15 +389,22 @@ Could be worth adding to the API.
- (WebHistoryItem *)_globalHistoryItem;
/*!
- @method textIteratorForRect:
- @param rectangle from which we want the WebTextIterator to load text from
- @result a WebtextIterator object.
+ @method textIteratorForRect:
+ @param rect The rectangle of the document that we're interested in text from.
+ @result WebTextIterator object, initialized with a range that corresponds to
+ the passed-in rectangle.
+ @abstract This method gives the text for the approximate range of the document
+ corresponding to the rectangle. The range is determined by using hit testing at
+ the top left and bottom right of the rectangle. Because of that, there can be
+ text visible in the rectangle that is not included in the iterator. If you need
+ a guarantee of iterating all text that is visible, then you need to instead make
+ a WebTextIterator with a DOMRange that covers the entire document.
*/
- (WebTextIterator *)textIteratorForRect:(NSRect)rect;
#if ENABLE_DASHBOARD_SUPPORT
-// <rdar://problem/5217124> Clients other than dashboard, don't use this.
-// Do not remove until Dashboard has moved off it
+// <rdar://problem/5217124> Clients other than Dashboard, don't use this.
+// As of this writing, Dashboard uses this on Tiger, but not on Leopard or newer.
- (void)handleAuthenticationForResource:(id)identifier challenge:(NSURLAuthenticationChallenge *)challenge fromDataSource:(WebDataSource *)dataSource;
#endif
@@ -413,6 +440,9 @@ Could be worth adding to the API.
// SPI for DumpRenderTree
- (BOOL)_isUsingAcceleratedCompositing;
+// Which pasteboard text is coming from in editing delegate methods such as shouldInsertNode.
+- (NSPasteboard *)_insertionPasteboard;
+
@end
@interface WebView (WebViewPrintingPrivate)
@@ -447,11 +477,36 @@ Could be worth adding to the API.
// FIXME: This method should be merged into WebIBActions when we're not in API freeze
- (void)toggleGrammarChecking:(id)sender;
#endif
+
+@end
+
+@interface WebView (WebViewTextChecking)
+
+- (BOOL)isAutomaticQuoteSubstitutionEnabled;
+- (BOOL)isAutomaticLinkDetectionEnabled;
+- (BOOL)isAutomaticDashSubstitutionEnabled;
+- (BOOL)isAutomaticTextReplacementEnabled;
+- (BOOL)isAutomaticSpellingCorrectionEnabled;
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+- (void)setAutomaticQuoteSubstitutionEnabled:(BOOL)flag;
+- (void)toggleAutomaticQuoteSubstitution:(id)sender;
+- (void)setAutomaticLinkDetectionEnabled:(BOOL)flag;
+- (void)toggleAutomaticLinkDetection:(id)sender;
+- (void)setAutomaticDashSubstitutionEnabled:(BOOL)flag;
+- (void)toggleAutomaticDashSubstitution:(id)sender;
+- (void)setAutomaticTextReplacementEnabled:(BOOL)flag;
+- (void)toggleAutomaticTextReplacement:(id)sender;
+- (void)setAutomaticSpellingCorrectionEnabled:(BOOL)flag;
+- (void)toggleAutomaticSpellingCorrection:(id)sender;
+#endif
+
@end
@interface WebView (WebViewEditingInMail)
- (void)_insertNewlineInQuotedContent;
- (void)_replaceSelectionWithNode:(DOMNode *)node matchStyle:(BOOL)matchStyle;
+- (BOOL)_selectionIsCaret;
+- (BOOL)_selectionIsAll;
@end
@interface NSObject (WebFrameLoadDelegatePrivate)
@@ -467,6 +522,9 @@ Could be worth adding to the API.
- (void)webView:(WebView *)sender didFirstVisuallyNonEmptyLayoutInFrame:(WebFrame *)frame;
+// For implementing the WebInspector's test harness
+- (void)webView:(WebView *)webView didClearInspectorWindowObject:(WebScriptObject *)windowObject forFrame:(WebFrame *)frame;
+
@end
@interface NSObject (WebResourceLoadDelegatePrivate)