2010-03-09 Geoffrey Garen Reviewed by Darin Adler. Updated for FastMalloc reporting changes. * Misc/WebCoreStatistics.mm: (+[WebCoreStatistics memoryStatistics]): 2010-03-08 Simon Fraser Reviewed by Mark Rowe. Move the new method to the end of the MIG definitions file, to avoid breaking compatibility between WebKit and older versions of WebKitPluginHost. * Plugins/Hosted/WebKitPluginHost.defs: 2010-03-08 Simon Fraser Reviewed by Kevin Decker. Need to grab image snapshot of Core Animation plugins Allow plug-ins using the Core Animation drawing model to be captured when doing a flattening paint, by sending them a drawRect event as if they were software-painting. * Plugins/Hosted/NetscapePluginInstanceProxy.h: * Plugins/Hosted/NetscapePluginInstanceProxy.mm: (WebKit::NetscapePluginInstanceProxy::snapshot): New snapshot() method that calls over to the plugin host, and then draws the image that comes back. * Plugins/Hosted/WebHostedNetscapePluginView.mm: (-[WebHostedNetscapePluginView drawRect:]): If we don't have a software renderer, but we're doing a flattening paint, then call the snapshot method. * Plugins/Hosted/WebKitPluginHost.defs: Added snapshot method. * Plugins/WebBaseNetscapePluginView.h: * Plugins/WebBaseNetscapePluginView.mm: (-[WebBaseNetscapePluginView inFlatteningPaint]): New utility method that asks the FrameView whether the current paint behavior is flattening. * Plugins/WebNetscapePluginView.mm: (-[WebNetscapePluginView drawRect:]): If the plug-in is using CA but this is a flattening paint, go ahead and send a drawRect event to the plug-in. 2010-03-08 Darin Adler Reviewed by Dan Bernstein. Fix crash when you quit inside an unload handler. rdar://problem/6958347 Test: manual-tests/quit-inside-unload.html * WebView/WebView.mm: (-[WebView _closeWithFastTeardown]): Removed code to set _private->closed since _close now does this earlier, before calling this method. (-[WebView _close]): Moved code to set _private->closed to the top of this method. (-[WebView setHostWindow:]): Rewrote the code that forbade setting the host window after closing so that it only forbids non-nil host windows. That way, the code to clear away the host window can run safely after setting _private->closed, yet client code cannot set a new host window after closing. 2010-03-08 Darin Adler Roll out a file I checked in by accident. * WebView/WebView.mm: Back to previous version. 2010-03-08 Chris Marrin Reviewed by Darin Adler. Turn on HW accel on Leopard even if coreVideoHas7228836Fix() is false, when WebGL is enabled https://bugs.webkit.org/show_bug.cgi?id=35759 This allows WebGL to work on Leopard without the fix. It exposes these users to the crash that happens because of the CoreVideo bug, but it limits the exposure to those who have chosen to enable WebGL. * WebView/WebView.mm: (-[WebView _preferencesChangedNotification:]): 2010-03-02 Adam Treat Reviewed by Dave Hyatt. Adapt the mac port to the refactoring of repaint methods. https://bugs.webkit.org/show_bug.cgi?id=34214 * WebCoreSupport/WebChromeClient.h: * WebCoreSupport/WebChromeClient.mm: (WebChromeClient::invalidateContents): (WebChromeClient::invalidateWindow): (WebChromeClient::invalidateContentsAndWindow): (WebChromeClient::invalidateContentsForSlowScroll): 2010-03-08 Jian Li Reviewed by Dmitry Titov. Blob.slice support. https://bugs.webkit.org/show_bug.cgi?id=32993 Add ENABLE_BLOB_SLICE feature define. * Configurations/FeatureDefines.xcconfig: 2010-03-08 Eric Uhrhane Reviewed by David Levin. Remove the now-redundant Settings fields for the Database https://bugs.webkit.org/show_bug.cgi?id=35763 No new tests; this code isn't called. * WebView/WebView.mm: Remove the call into Settings. (-[WebView _preferencesChangedNotification:]): 2010-03-07 Mark Rowe Rubber-stamped by Cameron Zwarich. Remove unnecessary includes from header files, adding them to the handful of implementation files that need them. * Misc/WebIconDatabase.mm: 2010-03-07 Mark Rowe Rubber-stamped by Cameron Zwarich. Remove unnecessary includes from header files, adding them to the handful of implementation files that need them. * Misc/WebNSPasteboardExtras.mm: 2010-03-04 Mark Rowe Reviewed by Sam Weinig. DOMSVG.h includes a non-existent DOMSVGFEMorphologyElement.h * MigrateHeaders.make: Migrate DOMSVGFEMorphologyElement.h and DOMSVGFEMorphologyElementInternal.h. 2010-03-04 Mark Rowe Reviewed by Sam Weinig. Use a framework-style include to pull in WebInspector.h for consistency with other parts of WebKit. * WebInspector/WebInspectorPrivate.h: 2010-03-04 Brady Eidson Reviewed by Geoff Garen. REGRESSION (31281): -[WebArchive initWithCoder:] leaks and https://bugs.webkit.org/show_bug.cgi?id=35534 * WebView/WebArchive.mm: (-[WebArchive initWithCoder:]): Don't retain objects we don't own. 2010-03-03 Alexey Proskuryakov Reviewed by Timothy Hatcher. https://bugs.webkit.org/show_bug.cgi?id=35692 Crash when calling abort() on an XHR while in a windowless WebView * Panels/WebAuthenticationPanel.m: (-[WebAuthenticationPanel runAsModalDialogWithChallenge:]): Retain the challenge, just like it's done for sheet. 2010-03-02 Eric Uhrhane Reviewed by David Levin. Move database enable bit fully out of settings This is stage one of a three-stage commit [webkit, then chromium, then webkit again]. In this change I'm adding calls to Database::setIsAvailable inside Settings::setDatabaseEnabled and anywhere else that called it, and switching webkit fully over to using that flag [added in a previous checkin]. Phase two will remove Chromium's use of Settings for the Database, and phase three will remove the Setting for the Database enable entirely, leaving only Database::isAvailable/setIsAvailable. No new tests; tested by existing storage tests. https://bugs.webkit.org/show_bug.cgi?id=35310 * WebView/WebView.mm: Added a call to Database::setIsAvailable. (-[WebView _preferencesChangedNotification:]): 2010-03-02 Adam Roben Add -[WebView _registerURLSchemeAsSecure:] Fixes Expose SecurityOrigin::registerURLSchemeAsSecure as WebKit SPI Reviewed by Tim Hatcher. * WebView/WebView.mm: (+[WebView _registerURLSchemeAsSecure:]): * WebView/WebViewPrivate.h: Added. Calls through to SecurityOrigin::registerURLSchemeAsSecure. 2010-03-01 Jakob Petsovits Reviewed by Adam Barth. Adapt to the new ZoomMode enum. https://bugs.webkit.org/show_bug.cgi?id=35347 * WebView/WebView.mm: (-[WebView _preferencesChangedNotification:]): (-[WebView _setZoomMultiplier:isTextOnly:]): (-[WebView _realZoomMultiplierIsTextOnly]): 2010-02-27 Jing Jin Reviewed by Timothy Hatcher. Move implementation of Bug 35449 into WebFramePrivate. * WebView/WebFrame.h: * WebView/WebFrame.mm: (-[WebFrame setAllowScrollersToOverlapContent:]): (-[WebFrame setAlwaysHideHorizontalScroller:]): (-[WebFrame setAlwaysHideVerticalScroller:]): * WebView/WebFramePrivate.h: 2010-02-26 Jing Jin Reviewed by Timothy Hatcher. https://bugs.webkit.org/show_bug.cgi?id=35449 Add ability to hide WebFrame scrollbars and to allow scrollbars to overlap with content. * WebView/WebDynamicScrollBarsView.h: * WebView/WebDynamicScrollBarsView.mm: (-[WebDynamicScrollBarsView setAllowScrollersToOverlapContent:]): Allows scrollbars to overlap with the document and re-layouts the document. (-[WebDynamicScrollBarsView setAlwaysHideHorizontalScroller:]): Hides the horizontal scrollbar. (-[WebDynamicScrollBarsView setAlwaysHideVerticalScroller:]): Hides the vertical scrollbar. (-[WebDynamicScrollBarsView contentViewFrame]): Calculates the appropriate frame based on allowScrollersToOverlapContent. (-[WebDynamicScrollBarsView tile]): If allowScrollersToOverlapContent is YES, set the contentView's frame so it overlaps with the scrollbar. (-[WebDynamicScrollBarsView updateScrollers]): Take into account hideHorizontalScroller and hideVerticalScroller. (-[WebDynamicScrollBarsView reflectScrolledClipView:]): set drawsBackground to NO when scrollbars are overlapping with content, so we don't get trails during scrollbar draw updates. * WebView/WebDynamicScrollBarsViewInternal.h: * WebView/WebFrame.h: * WebView/WebFrame.mm: (-[WebFrame setAllowScrollersToOverlapContent:]): Hook for [WebDynamicScrollBarsView setAllowScrollersToOverlapContent:] (-[WebFrame setAlwaysHideHorizontalScroller:]): Hook for [WebDynamicScrollBarsView setAlwaysHideHorizontalScroller:] (-[WebFrame setAlwaysHideVerticalScroller:]): Hook for [WebDynamicScrollBarsView setAlwaysHideVerticalScroller:] 2010-02-26 Gavin Barraclough Reviewed by Alexey Proskuryakov. Bug 35401 - Fix handling of errors in handling calls over bridge, where base object bridge-type does not match method bridge-type. The code assumes users will only attempt to invoke a Java method on a Java base object, etc. Add language specific subclasses of RuntimeMethod, and pass the RuntimeMethod into invokeMethod, so we can typecheck before casting. Throw an exception on type mismatch. * Plugins/Hosted/ProxyInstance.h: * Plugins/Hosted/ProxyInstance.mm: (WebKit::PluginRuntimeMethod::PluginRuntimeMethod): new class to distinguish this type of RuntimeMethod. (WebKit::ProxyInstance::getMethod): create an appropriate sublclass of RuntimeMethod. (WebKit::ProxyInstance::invokeMethod): dynamically check the type of the RuntimeMethod. 2010-02-25 Alexey Proskuryakov Reviewed by Geoffrey Garen. https://bugs.webkit.org/show_bug.cgi?id=35394 Make passing objects between Java and plug-ins work Added a ProxyInstance implementation of RuntimeObject. * Plugins/Hosted/NetscapePluginInstanceProxy.mm: (WebKit::NetscapePluginInstanceProxy::addValueToArray): * Plugins/Hosted/ProxyInstance.h: * Plugins/Hosted/ProxyInstance.mm: (WebKit::ProxyInstance::newRuntimeObject): (WebKit::ProxyInstance::getClass): * Plugins/Hosted/ProxyRuntimeObject.h: Added. (WebKit::ProxyRuntimeObject::classInfo): * Plugins/Hosted/ProxyRuntimeObject.mm: Added. (WebKit::ProxyRuntimeObject::ProxyRuntimeObject): (WebKit::ProxyRuntimeObject::~ProxyRuntimeObject): (WebKit::ProxyRuntimeObject::getInternalProxyInstance): 2010-02-24 Adam Barth Reviewed by Darin Fisher. [Chromium API] Disambiguate allowJavaScript from didNotAllowScript https://bugs.webkit.org/show_bug.cgi?id=35205 Make these two callsites explicit about not running script immediately. * Plugins/Hosted/NetscapePluginInstanceProxy.mm: (WebKit::NetscapePluginInstanceProxy::getWindowNPObject): (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray): 2010-02-23 Brady Eidson Reviewed by Tim Hatcher and Pavel Feldman. Regression (r55107) - WebInspector docking is busted. https://bugs.webkit.org/show_bug.cgi?id=35274 * WebCoreSupport/WebInspectorClient.mm: (-[WebInspectorWindowController showWindow:]): Swap the order of the "should attach?" check to get the expected behavior. 2010-02-23 Dan Bernstein Reviewed by Simon Fraser. Incomplete repaint of YouTube timeline thumb while scrolling https://bugs.webkit.org/show_bug.cgi?id=34381 Test: fast/repaint/repaint-during-scroll.html NSClipView offsets any rects marked as needing display during scrolling by the scroll offset. Compensate for this when -setNeedsDisplay: is called during scrolling. * WebView/WebHTMLView.mm: (-[WebHTMLView _frameOrBoundsChanged]): Set inScrollPositionChanged to YES around to call to FrameView::scrollPositionChanged(). (-[WebHTMLView setNeedsDisplayInRect:]): When called beneath scrollPositionChanged(), adjust the rect by the inverse of the scroll offset. 2010-02-23 Steve Block Reviewed by Darin Adler. Adds ChromeClient::cancelGeolocationPermissionRequestForFrame https://bugs.webkit.org/show_bug.cgi?id=34962 This method is required so that a Geolocation object can cancel an asynchronous permission request. This allows the chrome client to cancel any UI it is showing for the permission request. * WebCoreSupport/WebChromeClient.h: (WebChromeClient::cancelGeolocationPermissionRequestForFrame): 2010-02-22 Alexey Proskuryakov Rubber-stamped by Geoff Garen. Rename RuntimeObjectImp to RuntimeObject. * Plugins/Hosted/NetscapePluginInstanceProxy.mm: (WebKit::NetscapePluginInstanceProxy::addValueToArray): (WebKit::NetscapePluginInstanceProxy::retainLocalObject): (WebKit::NetscapePluginInstanceProxy::releaseLocalObject): 2010-02-22 Brady Eidson Reviewed by Tim Hatcher. Disable WebView docking to views that are too small. and https://bugs.webkit.org/show_bug.cgi?id=35254 * WebCoreSupport/WebInspectorClient.mm: (-[WebInspectorWindowController showWindow:]): No matter the preference, don't open the inspector window attached if WebCore says it shouldn't be attached. 2010-02-22 Simon Fraser Reviewed by John Sullivan. On Leopard, we have to disable hardware acceleration if we detect that the installed Core Video framework has bug . * WebView/WebView.mm: (coreVideoHas7228836Fix): (-[WebView _preferencesChangedNotification:]): 2010-02-21 Dan Bernstein Reviewed by Darin Adler. False warnings about needing layout in -[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] https://bugs.webkit.org/show_bug.cgi?id=35218 * WebView/WebHTMLView.mm: (-[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]): Suppress the warning and the forced layout if the view is not being drawn in this display operation. 2010-02-21 Kevin Decker Reviewed by Sam Weinig. plugInViewWithArguments: API sends wrong parameter for WebPlugInBaseURLKey https://bugs.webkit.org/show_bug.cgi?id=35215 The plugInViewWithArguments: API passes a dictionary of plugin arguments. One of the parameters is WebPlugInBaseURLKey, which is a key that represents the base URL of the document containing the plug-in's view. Instead of sending the base URL, code in WebFrameLoaderClient::createPlugin would incorrectly pass the source URL of the plug-in resource. * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::createPlugin): When building the plug-in arguments dictionary, pass the real base URL for the WebPlugInBaseURLKey key. 2010-02-19 Maciej Stachowiak Reviewed by David Levin. Add an ENABLE flag for sandboxed iframes to make it possible to disable it in releases https://bugs.webkit.org/show_bug.cgi?id=35147 * Configurations/FeatureDefines.xcconfig: 2010-02-19 Alexey Proskuryakov Reviewed by Maciej Stachowiak. https://bugs.webkit.org/show_bug.cgi?id=35132 Mouse cursor sometimes flickers over Flash content (35132) * Plugins/WebNetscapePluginEventHandlerCarbon.mm: (WebNetscapePluginEventHandlerCarbon::mouseMoved): Send adjustCursor events on every mouse move. This matches Firefox, and is actually required for plug-ins to manipulate cursor wihout resorting to techniques such as fast firing timers. * Plugins/WebNetscapePluginView.mm: (-[WebNetscapePluginView handleMouseEntered:]): Some plug-ins handle mouse cursor internally, but those that don't just need to get an arrow cursor (matching Firefox). This means that e.g. a plugin inside won't get a finger mouse pointer. * Plugins/WebHostedNetscapePluginView.mm: (-[WebNetscapePluginView handleMouseEntered:]): (-[WebNetscapePluginView handleMouseExited:]): Implement this behavior here, too. Also, out of process code didn't reset mouse pointer on mouse exit, which it needed to do. * WebView/WebHTMLView.mm: (needsCursorRectsSupportAtPoint): (setCursor): (resetCursorRects): Make sure that the same workaround we have for Web content also applies to Netscape plug-ins, as AppKit would reset the mouse pointer to arrow if given a chance. (+[WebHTMLViewPrivate initialize]): Renamed setCursorIMP on Leopard and higher to prevent confusion - the method we override is completely different. (-[WebHTMLView hitTest:]): Added a FIXME about a likely bug. 2010-02-19 Simon Fraser Reviewed by Dan Bernstein. Page contents missing from snapshot on Newsweek.com article Followup to avoid capturing compositing layers twice in snapshots. Add private methods to WebView to specify whether drawing the WebView into an image will include flattened compositing layers (the default behavior) or not. * WebView/WebFrame.mm: (-[WebFrame _drawRect:contentsOnly:]): Consult the WebView flag to see if we want flattening. * WebView/WebViewPrivate.h: New methods. * WebView/WebView.mm: Ditto. (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): (-[WebView _setIncludesFlattenedCompositingLayersWhenDrawingToBitmap:]): (-[WebView _includesFlattenedCompositingLayersWhenDrawingToBitmap]): * WebView/WebViewData.h: New member variable. 2010-02-19 Alexey Proskuryakov Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=35165 plugins/set-status.html fails on Windows bot * Plugins/Hosted/NetscapePluginInstanceProxy.mm: (WebKit::NetscapePluginInstanceProxy::status): * Plugins/WebNetscapePluginView.mm: (-[WebNetscapePluginView status:]): Match Windows port behavior (and also Firefox one, in a way) - pass null status messages as empty ones to chrome. 2010-02-18 Simon Fraser Reviewed by Dan Bernstein. Page contents missing from snapshot on Newsweek.com article Add logic to determine when painting via the software rendering path will give an equivalent result to the accelerated compositing presentation. This tests for the presence of 3D transforms. Also have -[WebFrame _drawRect:contentsOnly:] set the PaintBehaviorFlattenCompositingLayers paint behavior when painting into a bitmap context, so that snapshots contain composited layers. * WebView/WebFrame.mm: (-[WebFrame _drawRect:contentsOnly:]): Set the PaintBehaviorFlattenCompositingLayers flag when painting into a bitmap context. * WebView/WebView.mm: (-[WebView _isSoftwareRenderable]): Returns YES if all frames can be software-rendered. * WebView/WebViewPrivate.h: New _isSoftwareRenderable method. 2010-02-18 Alexey Proskuryakov Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=35134 Crash when a plugin calls NPN_SetStatus(0) Test: plugins/set-status.html * Plugins/Hosted/NetscapePluginInstanceProxy.mm: (WebKit::NetscapePluginInstanceProxy::status): (WebKit::NetscapePluginInstanceProxy::loadURL): Added null checks for CFStringCreateWithCString arguments. 2010-02-17 Dmitry Titov Reviewed by David Levin, Darin Fisher, Simon Hausmann. When a live iframe element is moved between pages, it still depends on the old page. https://bugs.webkit.org/show_bug.cgi?id=34382 * WebCoreSupport/WebFrameLoaderClient.h: * WebCoreSupport/WebFrameLoaderClient.mm: Added empty implementation of a new virtual method. (WebFrameLoaderClient::didTransferChildFrameToNewDocument): 2010-02-17 Kent Tamura Reviewed by Eric Seidel. Introduces new Icon loading interface in order to support asynchronous loading. https://bugs.webkit.org/show_bug.cgi?id=32054 Add an empty implementation of ChromeClient::iconForFiles(). * WebCoreSupport/WebChromeClient.h: * WebCoreSupport/WebChromeClient.mm: (WebChromeClient::iconForFiles): 2010-02-17 Timothy Hatcher Add a way for WebView and its dependancies to be selectively included in WebKitStatistics leak tracking. By default WebView is not included and you need to subclass WebView and implement +isIncludedInWebKitStatistics to be included. rdar://problem/7567677&7572900 https://webkit.org/b/35045 Reviewed by Adam Roben. * WebView/WebDataSource.mm: (-[WebDataSource _initWithDocumentLoader:]): Increment WebDataSourceCount if the WebFrame is included in statistics. (-[WebDataSource dealloc]): Only --WebDataSourceCount if _private->includedInWebKitStatistics is YES. (-[WebDataSource finalize]): Ditto. * WebView/WebFrame.mm: (-[WebFrame _isIncludedInWebKitStatistics]): Return _private->includedInWebKitStatistics. (-[WebFrame _initWithWebFrameView:webView:]): Increment WebFrameCount if the WebView's class is included in statistics. (-[WebFrame dealloc]): Only --WebFrameCount if _private->includedInWebKitStatistics is YES. (-[WebFrame finalize]): Ditto. * WebView/WebFrameInternal.h: * WebView/WebFrameView.mm: (-[WebFrameView _setWebFrame:]): Increment WebFrameViewCount if the WebFrame is included in statistics. (-[WebFrameView initWithFrame:]): Move ++WebFrameViewCount from here since we don't know what WebFrame we belong to yet. (-[WebFrameView dealloc]): Only --WebFrameViewCount if _private->includedInWebKitStatistics is YES. (-[WebFrameView finalize]): Ditto. * WebView/WebHTMLRepresentation.mm: (-[WebHTMLRepresentation init]): Move ++WebHTMLRepresentationCount from here since we don't know what WebFrame we belong to yet. (-[WebHTMLRepresentation dealloc]): Only --WebHTMLRepresentationCount if _private->includedInWebKitStatistics is YES. (-[WebHTMLRepresentation finalize]): Ditto. (-[WebHTMLRepresentation setDataSource:]): Increment WebHTMLRepresentationCount if the WebFrame of the dataSource is included in statistics. * WebView/WebView.mm: (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): (-[WebView dealloc]): (+[WebView shouldIncludeInWebKitStatistics]): Return NO, so any WebView wont be included. Subclasses that care can return YES to be included. * WebView/WebViewInternal.h: 2010-02-16 Darin Adler Reviewed by Sam Weinig. Generalize delayed plug-in start for background tabs for use for other media https://bugs.webkit.org/show_bug.cgi?id=34981 * WebView/WebHTMLView.mm: (-[WebHTMLView viewWillMoveToWindow:]): Added comment. (-[WebHTMLView viewDidMoveToWindow]): Ditto. * WebView/WebView.mm: (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): Call setCanStartMedia right away so that if this view is not in a window, it will not start any media. (-[WebView viewWillMoveToWindow:]): Call setCanStartMedia(false) when moving to a window of nil. (-[WebView viewDidMoveToWindow]): Call setCanStartMedia(true) when moved to a window that is non-nil. 2010-02-16 Eric Carlson Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=34988 WebHTMLView.mm has two -willRemoveSubview: methods * WebView/WebHTMLView.mm: (-[WebHTMLView willRemoveSubview:]): Consolidate the two copies of this method. 2010-02-16 Alexey Proskuryakov Reviewed by Geoffrey Garen and Kevin Decker. https://bugs.webkit.org/show_bug.cgi?id=34989 Cursor disappears on scroll bars that are over plugin content This fixes event dispatch for both Cocoa and Carbon event models (mouseEntered/mouseExited in the former case, and adjustCursor in the latter). * Plugins/Hosted/WebHostedNetscapePluginView.mm: (-[WebHostedNetscapePluginView handleMouseEntered:]): (-[WebHostedNetscapePluginView handleMouseExited:]): * Plugins/WebBaseNetscapePluginView.h: * Plugins/WebBaseNetscapePluginView.mm: (-[WebBaseNetscapePluginView handleMouseEntered:]): (-[WebBaseNetscapePluginView handleMouseExited:]): * Plugins/WebNetscapePluginView.h: * Plugins/WebNetscapePluginView.mm: (-[WebNetscapePluginView handleMouseEntered:]): (-[WebNetscapePluginView handleMouseExited:]): AppKit cannot reliably dispatch events for overlapping views. We are now asking WebCore to notify plug-in views of mouse entered/exited as part of DOM event dispatch. * WebCoreSupport/WebFrameLoaderClient.mm: (NetscapePluginWidget::handleEvent): Besides mouse moved, dispatch plugin mouse entered/exit events in HTMLPlugInElement default event handler. Other mouse events are passed down by EventHandler. 2010-02-15 Alexey Proskuryakov More build fixing (for what is actually a 64-bit failure, as 32-bit apparently includes headers that aren't included in 64-bit). * Plugins/Hosted/NetscapePluginInstanceProxy.h: * Plugins/Hosted/NetscapePluginInstanceProxy.mm: (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::contains): (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::get): Move inline functions to .cpp; also made the class Noncopyable. 2010-02-15 Alexey Proskuryakov Mac release build fix attempt. * Plugins/Hosted/NetscapePluginInstanceProxy.h: * Plugins/Hosted/NetscapePluginInstanceProxy.mm: (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::~LocalObjectMap): Implement destructor in .cpp file, where necessary headers are already included. 2010-02-12 Alexey Proskuryakov Reviewed by Kevin Decker. Browser objects identity is not preserved by Safari Out of process part. To avoid excessive IPC, plugin process doesn't send each NPObject release/retain call to Safari. It only sends one when the last one is removed, and it can destroy the proxy NPObject. However, the browser may be sending the same object out to plug-in as a function call argument at the same time - neither side can know what the other one is up to. The solution is to make the "destroying object" call return a boolean result, making it possible for the browser to make plugin host keep the proxy with zero refcount for a little longer. * Plugins/Hosted/NetscapePluginHostProxy.mm: (WKPCForgetBrowserObject): This function (that used to be named ReleaseObject) is only called when plug-in releases all of its references, so renamed it. Its boolean result is returned as call success or failure. * Plugins/Hosted/NetscapePluginInstanceProxy.h: (WebKit::NetscapePluginInstanceProxy::LocalObjectMap): Made the numeric ID to JSObject map two-way. * Plugins/Hosted/NetscapePluginInstanceProxy.mm: (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::idForObject): This method is tricky in that it creates objects with refcount of 1, but doesn't increase refcount when returning found objects. This extra count accounts for the "reference" kept by plugin process. (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::retain): Only retaining for the duration of calls out to plug-in, which means that refcount is almost always equal to 1. Note that we can't use "++" here, due to how std::pair works! (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::release): Ditto. (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::clear): Clear all references when stopping plug-in. (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::forget): Like release(), but only functional when recount is 1 (meaning that the object is not being sent out to plug-in at the moment). (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy): Updated for other changes. (WebKit::NetscapePluginInstanceProxy::cleanup): Ditto. (WebKit::NetscapePluginInstanceProxy::getWindowNPObject): Ditto. (WebKit::NetscapePluginInstanceProxy::getPluginElementNPObject): Ditto. (WebKit::NetscapePluginInstanceProxy::forgetBrowserObjectID): Ditto. (WebKit::NetscapePluginInstanceProxy::evaluate): Ditto. (WebKit::NetscapePluginInstanceProxy::invoke): Ditto. (WebKit::NetscapePluginInstanceProxy::invokeDefault): Ditto. (WebKit::NetscapePluginInstanceProxy::construct): Ditto. (WebKit::NetscapePluginInstanceProxy::getProperty): Ditto. (WebKit::NetscapePluginInstanceProxy::setProperty): Ditto. (WebKit::NetscapePluginInstanceProxy::removeProperty): Ditto. (WebKit::NetscapePluginInstanceProxy::hasProperty): Ditto. (WebKit::NetscapePluginInstanceProxy::hasMethod): Ditto. (WebKit::NetscapePluginInstanceProxy::enumerate): Ditto. (WebKit::NetscapePluginInstanceProxy::addValueToArray): Ditto. (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray): Ditto. (WebKit::NetscapePluginInstanceProxy::retainLocalObject): Helper for calling retain when making calls out to plug-in. No-op for objects that aren't wrapped to be sent (i.e. for objects wrapping ProxyInstance wrappers for plug-in objects being sent bak). (WebKit::NetscapePluginInstanceProxy::releaseLocalObject): Ditto. * Plugins/Hosted/ProxyInstance.mm: (WebKit::ProxyInstance::invoke): Retain/release arguments during call. (WebKit::ProxyInstance::setFieldValue): Ditto. * Plugins/Hosted/WebKitPluginClient.defs: Renamed PCReleaseObject to PCForgetBrowserObject. 2010-02-12 Darin Adler Reviewed by Sam Weinig. Removed unneeded custom implementation of isDescendantOf. * Plugins/WebBaseNetscapePluginView.mm: (-[WebBaseNetscapePluginView shouldClipOutPlugin]): Use the -[NSView isDescendantOf:] method instead of our own method named superviewsHaveSuperviews. 2010-02-12 Dan Bernstein Reviewed by Darin Adler. REGRESSION (r48586): Loading an HTML page causes PDFKit to be loaded * WebView/WebPDFDocumentExtras.h: Removed the category declaration and addWebPDFDocumentExtras(). Declare allScriptsInPDFDocument(). * WebView/WebPDFDocumentExtras.mm: (allScriptsInPDFDocument): Changed the -_web_allScripts method into this function. * WebView/WebPDFRepresentation.mm: Removed +initialize. (-[WebPDFRepresentation finishedLoadingWithDataSource:]): Use allScriptsInPDFDocument() instead of -_web_allScripts. 2010-02-10 Geoffrey Garen Reviewed by Oliver Hunt. Exported some new JavaScript heap introspection. * Misc/WebCoreStatistics.h: * Misc/WebCoreStatistics.mm: (+[WebCoreStatistics javaScriptObjectTypeCounts]): Just like javaScriptProtectedObjectTypeCounts, except this function enumerates all live objects, not just protected objects. 2010-02-08 Maciej Stachowiak Reviewed by Cameron Zwarich. Restore ENABLE_RUBY flag so vendors can ship with Ruby disabled if they choose. https://bugs.webkit.org/show_bug.cgi?id=34698 * Configurations/FeatureDefines.xcconfig: 2010-02-09 Alexey Proskuryakov Reviewed by Geoffrey Garen. https://bugs.webkit.org/show_bug.cgi?id=34490 WebCore::ImageEventSender::dispatchPendingEvents() crashes in certain conditions * ForwardingHeaders/wtf/ValueCheck.h: Added. 2010-02-10 Jesus Sanchez-Palencia Reviewed by Kenneth Rohde Christiansen. Support frameset flattening https://bugs.webkit.org/show_bug.cgi?id=32717 Add support for enabling/disabling FrameSet Flattening on the Mac port. * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): (-[WebPreferences isFrameSetFlatteningEnabled]): (-[WebPreferences setFrameSetFlatteningEnabled:]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChangedNotification:]): 2010-02-09 Alexey Proskuryakov Reviewed by Anders Carlsson. https://bugs.webkit.org/show_bug.cgi?id=34771 A stray mouse moved event is sent to plug-ins after mouse exit * WebCoreSupport/WebFrameLoaderClient.mm: (NetscapePluginWidget::handleEvent): A mouseout DOM event is dispatched while handling NSMouseMoved - but we shouldn't be sending a mouse moved event to plug-ins at this point. 2010-02-09 Shinichiro Hamaji Reviewed by Darin Adler. Provide a way to get total number of pages to be printed https://bugs.webkit.org/show_bug.cgi?id=34699 * Misc/WebCoreStatistics.h: * Misc/WebCoreStatistics.mm: (-[WebFrame numberOfPages:pageWidthInPixels:]): 2010-02-08 Alexey Proskuryakov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=34727 Assertion crashes and freezes when plug-in property access results in an exception * Plugins/Hosted/WebKitPluginClient.defs: Made PCSetProperty and PCRemoveProperty async. A plug-in can call back whil processing this call (e.g. for NPN_SetException), so we need to listen for messages while waiting for reply. * Plugins/Hosted/NetscapePluginHostProxy.mm: (WKPCEvaluate): If there is no instance proxy, return KERN_FAILURE. This improves consistency between method implementations, and leaves us with one less IPC call to make in failure case (returning false with KERN_SUCCESS and returning KERN_FAILURE looks the same from plugin host code). (WKPCInvoke): Ditto. (WKPCInvokeDefault): Ditto. (WKPCGetProperty): Ditto. (WKPCSetProperty): Send a reply once done. (WKPCRemoveProperty): Ditto. (WKPCHasProperty): If there is no instance proxy, return KERN_FAILURE. (WKPCHasMethod): Ditto. (WKPCEnumerate): Ditto. 2010-02-08 Alexey Proskuryakov Reviewed by Anders Carlsson. OOP: Support NPN_SetException Tested by plugins/netscape-throw-exception.html (removed it from skipped list). * Plugins/Hosted/NetscapePluginHostProxy.mm: (WKPCSetException): * Plugins/Hosted/NetscapePluginInstanceProxy.h: * Plugins/Hosted/NetscapePluginInstanceProxy.mm: (WebKit::globalExceptionString): (WebKit::NetscapePluginInstanceProxy::setGlobalException): (WebKit::NetscapePluginInstanceProxy::moveGlobalExceptionToExecState): * Plugins/Hosted/ProxyInstance.mm: (WebKit::ProxyInstance::invoke): (WebKit::ProxyInstance::getPropertyNames): (WebKit::ProxyInstance::fieldValue): (WebKit::ProxyInstance::setFieldValue): * Plugins/Hosted/WebKitPluginClient.defs: Route exception string to a global that's checked after calling into plug-in (just like in in-process case). 2010-02-05 Kevin Decker Reviewed by Mark Rowe. https://bugs.webkit.org/show_bug.cgi?id=34661 REGRESSION (Safari 4.0-> Safari 4.0.4): NPP_SetWindow no longer sets a clipRect of (0,0,0,0) when it becomes hidden * Plugins/Hosted/WebHostedNetscapePluginView.mm: (-[WebHostedNetscapePluginView updateAndSetWindow]): When clipping out NPDrawingModelCoreAnimation plug-ins, provide a zero'd out clipRect. * Plugins/WebBaseNetscapePluginView.h: Moved superviewsHaveSuperviews to the base class. * Plugins/WebBaseNetscapePluginView.mm: (-[WebBaseNetscapePluginView superviewsHaveSuperviews]): Added to the base class; extracted from WebNetscapePluginView. (-[WebBaseNetscapePluginView shouldClipOutPlugin]): Added new method with code extracted from WebNetscapePluginView. * Plugins/WebNetscapePluginView.mm: (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]): When clipping out NPDrawingModelCoreAnimation plug-ins, provide a zero'd out clipRect. 2010-02-04 Mark Rowe Rubber-stamped by Dan Bernstein. Fix the ability to #include . * MigrateHeaders.make: Mark DOMBlob.h as a public header since the already-public DOMFile.h depends on it. 2010-02-04 John Sullivan https://bugs.webkit.org/show_bug.cgi?id=34611 WebLocalizedString() could use an assertion that it is being called on the main thread Reviewed by Tim Hatcher. * Misc/WebLocalizableStrings.m: Removed. * Misc/WebLocalizableStrings.mm: Copied from mac/Misc/WebLocalizableStrings.m. Renamed to use .mm extension so it can include a C++ header. (WebLocalizedString): Added an assertion that this is being called on the main thread. 2010-02-04 Dan Bernstein Reviewed by Simon Fraser. REGRESSION (r53718): When scrolling a tall window by page, the overlap between pages is too big https://bugs.webkit.org/show_bug.cgi?id=34371 * WebView/WebFrameView.mm: (-[WebFrameView _verticalPageScrollDistance]): Use Scrollbar methods instead of constants, and cap the scroll distance. (-[WebFrameView initWithFrame:]): Use Scrollbar::pixelsPerLineStep() instead of cScrollbarPixelsPerLineStep. (-[WebFrameView _horizontalPageScrollDistance]):Use Scrollbar methods instead of constants, and cap the scroll distance. 2010-02-01 Shinichiro Hamaji Reviewed by Eric Seidel. Provide a way to get page number with layoutTestController https://bugs.webkit.org/show_bug.cgi?id=33840 * Misc/WebCoreStatistics.h: * Misc/WebCoreStatistics.mm: (-[WebFrame pageNumberForElement:element:pageWidth:]): 2010-01-29 Gavin Barraclough Reviewed by Sam Weinig + Oliver Hunt. Bug 34346 - With JSC bindings, make processingUserGesture work with events in Isolated Worlds Pass processeing user gensture flag to media play/pause methods. * WebView/WebVideoFullscreenHUDWindowController.mm: (-[WebVideoFullscreenHUDWindowController setPlaying:]): 2010-02-01 Dan Bernstein Reviewed by Anders Carlsson. Crash at NetscapePlugInStreamLoader::didReceiveResponse() The crash was caused by having two streams with a streamID of 1. * Plugins/Hosted/NetscapePluginInstanceProxy.mm: (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy): Fixed a typo. Now correctly increments m_currentURLRequestID to account for the manual stream. (WebKit::NetscapePluginInstanceProxy::disconnectStream): If the stream is the manual stream, null it out instead of trying to remove it from the map. Added an assertion. (WebKit::NetscapePluginInstanceProxy::loadRequest): Added an assertion. == Rolled over to ChangeLog-2010-01-29 ==