2011-09-14 Anders Carlsson Get rid of WebCoreViewFactory and its WebViewFactory subclass https://bugs.webkit.org/show_bug.cgi?id=68124 Reviewed by Sam Weinig. * WebCoreSupport/WebContextMenuClient.mm: * WebCoreSupport/WebViewFactory.h: Removed. * WebCoreSupport/WebViewFactory.mm: Removed. * WebView/WebFrameView.mm: (-[WebFrameView initWithFrame:]): 2011-09-14 Mark Hahnenberg Unzip initialization lists and constructors in JSCell hierarchy (6/7) https://bugs.webkit.org/show_bug.cgi?id=67692 Reviewed by Geoffrey Garen. Completed the sixth level of the refactoring to add finishCreation() methods to all classes within the JSCell hierarchy with non-trivial constructor bodies. This primarily consists of pushing the calls to finishCreation() down into the constructors of the subclasses of the fifth level of the hierarchy as well as pulling the finishCreation() calls out into the class's corresponding create() method if it has one. Doing both simultaneously allows us to maintain the invariant that the finishCreation() method chain is called exactly once during the creation of an object, since calling it any other number of times (0, 2, or more) will cause an assertion failure. * Plugins/Hosted/ProxyInstance.mm: (WebKit::ProxyRuntimeMethod::ProxyRuntimeMethod): (WebKit::ProxyRuntimeMethod::finishCreation): 2011-09-13 Eric Seidel Remove ENABLE_SVG_USE as is required by HTML5 https://bugs.webkit.org/show_bug.cgi?id=68019 Reviewed by Ryosuke Niwa. * Configurations/FeatureDefines.xcconfig: 2011-09-13 Anders Carlsson Disable C++ exceptions when building with clang https://bugs.webkit.org/show_bug.cgi?id=68031 Reviewed by Mark Rowe. * Configurations/Base.xcconfig: 2011-09-13 Eric Seidel Remove ENABLE_SVG_FOREIGN_OBJECT as it is a required part of HTML5 https://bugs.webkit.org/show_bug.cgi?id=68018 Reviewed by Ryosuke Niwa. * Configurations/FeatureDefines.xcconfig: 2011-09-09 Oliver Hunt Remove support for anonymous storage from jsobjects https://bugs.webkit.org/show_bug.cgi?id=67881 Reviewed by Sam Weinig. Remove the use of AnonymousSlotCount * Plugins/Hosted/ProxyInstance.mm: (WebKit::ProxyRuntimeMethod::createStructure): * Plugins/Hosted/ProxyRuntimeObject.h: (WebKit::ProxyRuntimeObject::createStructure): 2011-09-09 Chris Marrin requestAnimationFrame doesn't throttle on Mac https://bugs.webkit.org/show_bug.cgi?id=67171 Reviewed by Simon Fraser. Removed runLoopObserver for requestAnimationFrame. It's now done by a Timer in ScriptedAnimationController in WebCore. * WebCoreSupport/WebChromeClient.h: * WebCoreSupport/WebChromeClient.mm: * WebView/WebView.mm: (-[WebView _close]): * WebView/WebViewData.h: * WebView/WebViewInternal.h: 2011-09-09 Fady Samuel Move pageScaleFactor code from Frame.{h|cpp} to Page.{h|cpp} https://bugs.webkit.org/show_bug.cgi?id=67250 Reviewed by Simon Fraser. * WebView/WebView.mm: (-[WebView _scaleWebView:atOrigin:]): (-[WebView _viewScaleFactor]): 2011-09-09 Mark Hahnenberg Unzip initialization lists and constructors in JSCell hierarchy (5/7) https://bugs.webkit.org/show_bug.cgi?id=67420 Reviewed by Geoffrey Garen. Completed the fifth level of the refactoring to add finishCreation() methods to all classes within the JSCell hierarchy with non-trivial constructor bodies. This primarily consists of pushing the calls to finishCreation() down into the constructors of the subclasses of the second level of the hierarchy as well as pulling the finishCreation() calls out into the class's corresponding create() method if it has one. Doing both simultaneously allows us to maintain the invariant that the finishCreation() method chain is called exactly once during the creation of an object, since calling it any other number of times (0, 2, or more) will cause an assertion failure. * Plugins/Hosted/ProxyRuntimeObject.h: * Plugins/Hosted/ProxyRuntimeObject.mm: (WebKit::ProxyRuntimeObject::ProxyRuntimeObject): (WebKit::ProxyRuntimeObject::finishCreation): 2011-09-08 Sam Weinig Remove the Completion object from JSC, I have never liked it https://bugs.webkit.org/show_bug.cgi?id=67755 Reviewed by Gavin Barraclough. * Plugins/Hosted/NetscapePluginInstanceProxy.mm: (WebKit::NetscapePluginInstanceProxy::evaluate): 2011-09-07 Sheriff Bot Unreviewed, rolling out r94627 and r94632. http://trac.webkit.org/changeset/94627 http://trac.webkit.org/changeset/94632 https://bugs.webkit.org/show_bug.cgi?id=67698 It broke tests on GTK and Qt (Requested by Ossy on #webkit). * Plugins/Hosted/ProxyRuntimeObject.h: * Plugins/Hosted/ProxyRuntimeObject.mm: (WebKit::ProxyRuntimeObject::ProxyRuntimeObject): 2011-09-06 Mark Hahnenberg Unzip initialization lists and constructors in JSCell hierarchy (5/7) https://bugs.webkit.org/show_bug.cgi?id=67420 Reviewed by Geoffrey Garen. Completed the fifth level of the refactoring to add finishCreation() methods to all classes within the JSCell hierarchy with non-trivial constructor bodies. This primarily consists of pushing the calls to finishCreation() down into the constructors of the subclasses of the second level of the hierarchy as well as pulling the finishCreation() calls out into the class's corresponding create() method if it has one. Doing both simultaneously allows us to maintain the invariant that the finishCreation() method chain is called exactly once during the creation of an object, since calling it any other number of times (0, 2, or more) will cause an assertion failure. * Plugins/Hosted/ProxyRuntimeObject.h: * Plugins/Hosted/ProxyRuntimeObject.mm: (WebKit::ProxyRuntimeObject::ProxyRuntimeObject): (WebKit::ProxyRuntimeObject::finishCreation): 2011-09-06 Ryosuke Niwa Rename confirmCompositionWithoutDisturbingSelection to cancelComposition https://bugs.webkit.org/show_bug.cgi?id=67569 Reviewed by Antonio Gomes. * WebView/WebHTMLView.mm: (-[WebHTMLView _updateSelectionForInputManager]): 2011-09-05 Oliver Hunt An object's structure should reference the global object responsible for its creation https://bugs.webkit.org/show_bug.cgi?id=67624 Reviewed by Gavin Barraclough. Update for new Structure::create() globalObject parameter. * Plugins/Hosted/ProxyInstance.mm: (WebKit::ProxyRuntimeMethod::createStructure): * Plugins/Hosted/ProxyRuntimeObject.h: (WebKit::ProxyRuntimeObject::createStructure): 2011-09-01 Mark Rowe Fix the build by adding some more missing return types. * WebView/WebDashboardRegion.h: * WebView/WebDashboardRegion.mm: (-[WebDashboardRegion initWithRect:clip:type:]): 2011-09-01 Tim Horton REGRESSION: Rendering artifacts on a rotated, pattern filled shape https://bugs.webkit.org/show_bug.cgi?id=53055 Reviewed by Simon Fraser. Introduce wkCGPatternCreateWithImageAndTransform. * WebCoreSupport/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2011-08-31 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=67322 Re-name overrideBackingScaleFactor Reviewed by John Sullivan. _setOverrideBackingScaleFactor is now _setCustomBackingScaleFactor * WebView/WebView.mm: (-[WebView _setCustomBackingScaleFactor:]): (-[WebView _deviceScaleFactor]): * WebView/WebViewData.h: * WebView/WebViewPrivate.h: 2011-08-30 Dan Bernstein Add text search API for getting the DOM range of a text match https://bugs.webkit.org/show_bug.cgi?id=67230 Reviewed by Darin Adler. * WebView/WebHTMLView.mm: * WebView/WebView.mm: (coreOptions): Moved this function from WebHTMLView.mm to here and made it accessible from both this file and WebHTMLView.mm. (-[WebView DOMRangeOfString:relativeTo:options:]): Added this new API. * WebView/WebViewInternal.h: * WebView/WebViewPrivate.h: 2011-08-30 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=67150 Would like API to use a custom device scale factor for a particular WebView/WKView -and corresponding- Reviewed by Darin Adler. New API is _setOverrideBackingScaleFactor:(CGFloat) * WebView/WebView.mm: (-[WebView _setOverrideBackingScaleFactor:]): (-[WebView _deviceScaleFactor]): * WebView/WebViewData.h: * WebView/WebViewPrivate.h: 2011-08-30 Aaron Colwell Add MediaSource API to HTMLMediaElement https://bugs.webkit.org/show_bug.cgi?id=64731 Reviewed by Eric Carlson. * Configurations/FeatureDefines.xcconfig: 2011-08-29 Alexey Proskuryakov DumpRenderTree should begin each test with an empty cookie store https://bugs.webkit.org/show_bug.cgi?id=63545 Reviewed by Darin Adler. * WebView/WebPreferences.mm: (+[WebPreferences initialize]): (+[WebPreferences _switchNetworkLoaderToNewTestingSession]): (+[WebPreferences _setCurrentNetworkLoaderSessionCookieAcceptPolicy:]): * WebView/WebPreferencesPrivate.h: Exposed an SPI to use a private default session. It's separate from private browsing, because some tests enable the latter, and we don't want to mix them up. Also exposed an SPI to set cookie accept policy regardless of what session we are currently using. * WebView/WebView.mm: (-[WebView _cachedResponseForURL:]): Updated to use currentStorageSession() instead of privateBrowsingStorageSession(). 2011-08-30 Kaustubh Atrawalkar The unused ScrollView* argument can and should be removed from scrollRectIntoView. https://bugs.webkit.org/show_bug.cgi?id=67117 Reviewed by Darin Adler. * WebCoreSupport/WebChromeClient.h: * WebCoreSupport/WebChromeClient.mm: (WebChromeClient::scrollRectIntoView): 2011-08-29 Sheriff Bot Unreviewed, rolling out r93987, r93992, r93995, r93998, and r93999. http://trac.webkit.org/changeset/93987 http://trac.webkit.org/changeset/93992 http://trac.webkit.org/changeset/93995 http://trac.webkit.org/changeset/93998 http://trac.webkit.org/changeset/93999 https://bugs.webkit.org/show_bug.cgi?id=67147 Many failing tests (Requested by ap on #webkit). * WebView/WebPreferences.mm: (+[WebPreferences initialize]): * WebView/WebPreferencesPrivate.h: 2011-08-26 Alexey Proskuryakov DumpRenderTree should begin each test with an empty cookie store https://bugs.webkit.org/show_bug.cgi?id=63545 Reviewed by Darin Adler. * WebView/WebPreferences.mm: (+[WebPreferences initialize]): (+[WebPreferences _usePrivateSessionForNetworkLoading]): * WebView/WebPreferencesPrivate.h: Exposed an SPI to use a private default session. It's separate from private browsing, because some tests enable the latter, and we don't want to mix them up. 2011-08-23 Chris Marrin [mac] requestAnimationFrame support for mac port https://bugs.webkit.org/show_bug.cgi?id=59146 Reviewed by Simon Fraser. Implement requestAnimationFrame for WebKit. Add a CFRunLoopObserver to WebView, which runs just before the syncCompositingState RLO and calls into the ScriptedAnimationController if scheduleAnimation() has been called. * Configurations/FeatureDefines.xcconfig: * WebCoreSupport/WebChromeClient.h: * WebCoreSupport/WebChromeClient.mm: (WebChromeClient::scheduleAnimation): * WebView/WebView.mm: (-[WebView _close]): (-[WebView _unscheduleAnimation]): (-[WebView _scheduleCompositingLayerSync]): (requestAnimationFrameRunLoopObserverCallback): (-[WebView _scheduleAnimation]): * WebView/WebViewData.h: * WebView/WebViewInternal.h: 2011-08-24 Alexey Proskuryakov Plug-in tests are flaky on Mac https://bugs.webkit.org/show_bug.cgi?id=66822 Reviewed by Anders Carlsson. * Plugins/Hosted/NetscapePluginInstanceProxy.mm: (WebKit::NetscapePluginInstanceProxy::evaluateJavaScript): Protect objects that can be removed by a script. * WebView/WebFrame.mm: (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]): Ditto. (-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]): Ditto. Also fixed some nonsense code. 2011-08-23 Mark Hahnenberg Add checks to ensure allocation does not take place during initialization of GC-managed objects https://bugs.webkit.org/show_bug.cgi?id=65288 Reviewed by Darin Adler. Adding the new validation functionality. In its current state, it will performs checks, but they don't fail unless you do allocation in the arguments to the parent constructor in the initialization list of a class. The allocateCell() method turns on the global flag disallowing any new allocations, and the constructorBody() method in JSCell turns it off. This way, allocation is still allowed in constructor bodies while other refactoring efforts continue. * Plugins/Hosted/ProxyRuntimeObject.h: (WebKit::ProxyRuntimeObject::create): * Plugins/Hosted/ProxyRuntimeObject.mm: (WebKit::ProxyRuntimeObject::ProxyRuntimeObject): 2011-08-18 Beth Dakin Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=66495 Lion-specific scroller SPIs can use forward declaration instead of WebKitSystemInterface * WebCoreSupport/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2011-08-18 Anders Carlsson More C++0x libc++ build fixes https://bugs.webkit.org/show_bug.cgi?id=66476 Reviewed by Adam Roben. * Plugins/Hosted/NetscapePluginHostProxy.mm: (WKPCSetException): Use a WTF String here instead of an STL string. * Plugins/Hosted/NetscapePluginInstanceProxy.mm: (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::idForObject): std::make_pair now takes rvalue references, so get rid of the template arguments and let the compiler deduce them instead. 2011-08-18 Adam Roben Update the device scale factor when the WebView's window changes Fixes WebKit doesn't react when a WebView is moved between windows with different backing scale factors Reviewed by Anders Carlsson. * WebView/WebView.mm: (-[WebView viewDidMoveToWindow]): Call setDeviceScaleFactor because our new window (or no window at all) might have a different backing scale factor than the previous one. (-[WebView _deviceScaleFactor]): Moved to the WebFileInternal category. 2011-08-17 Adam Roben Make WebCore keep track of the current device scale factor Fixes WebCore requires every WebKit port to keep track of the device scale factor Reviewed by Darin Adler. * WebCoreSupport/WebChromeClient.h: * WebCoreSupport/WebChromeClient.mm: Moved code to calculate the device scale factor from here... * WebView/WebView.mm: (-[WebView _deviceScaleFactor]): ...to here. (-[WebView _windowDidChangeResolution:]): Now calls Page::setDeviceScaleFactor. 2011-08-17 Dan Bernstein Removed some code that is not needed when building for Leopard or later. Reviewed by Anders Carlsson. * WebCoreSupport/WebContextMenuClient.mm: (fixMenusToSendToOldClients): Removed check for Tiger Mail. * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::objectContentType): * WebView/WebView.mm: (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): (-[WebView _preferencesChanged:]): 2011-08-17 Dan Bernstein Eliminate the WebCGFloat compatibility definition that was needed for Tiger. Rubber-stamped by Anders Carlsson. * WebView/WebHTMLViewPrivate.h: 2011-08-17 Dan Bernstein Eliminate the WebNSInteger and WebNSUInteger compatibility definitions that were needed for Tiger. Reviewed by Darin Adler. * History/WebBackForwardList.h: * WebView/WebDocumentInternal.h: * WebView/WebHTMLRepresentation.h: * WebView/WebPreferences.h: * WebView/WebResourceLoadDelegate.h: * WebView/WebResourceLoadDelegatePrivate.h: * WebView/WebScriptDebugDelegate.h: * WebView/WebTextIterator.h: * WebView/WebUIDelegate.h: * WebView/WebView.h: * WebView/WebViewPrivate.h: 2011-08-15 Dmitry Titov FrameLoaderClient::transferLoadingResourceFromPage does not have enough parameters https://bugs.webkit.org/show_bug.cgi?id=66165 Reviewed by Darin Fisher. * WebCoreSupport/WebFrameLoaderClient.h: * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::transferLoadingResourceFromPage): 2011-08-15 Mark Hahnenberg Refactor JS objects to allocate in static create methods rather than constructors https://bugs.webkit.org/show_bug.cgi?id=65347 Reviewed by Geoffrey Garen. Removed all calls to deprecatedGetDOMObject from initialization lists as part of a larger refactoring to get rid of all allocation during initialization. * Plugins/Hosted/ProxyInstance.mm: (WebKit::ProxyRuntimeMethod::create): (WebKit::ProxyRuntimeMethod::ProxyRuntimeMethod): 2011-08-15 Adam Roben Update pages' style and content scale when the window's backing scale factor changes Unfortunately, I couldn't think of a way to test this in an automated fashion. Fixes WebKit doesn't react to device scale factor changes Reviewed by Simon Fraser. * WebView/WebView.mm: (-[WebView addWindowObserversForWindow:]): (-[WebView removeWindowObservers]): Listen for the notification that tells us the window's backing scale has changed. (-[WebView _windowDidChangeResolution:]): Tell the page about the change to the device scale factor so that, e.g., scale-factor-dependent media queries will be reevaluated. 2011-08-10 Adam Roben Clear up scale factor terminology WebKit by and large deals with two scale factors: one intrinsic to the device on which the software is running, and one that is per-Page and can be controlled via API calls. This patch names the former "deviceScaleFactor" and the latter "pageScaleFactor", and makes the code use those names. It should introduce no behavior changes. Fixes WebKit uses multiple conflicting names to refer to the device scale factor Reviewed by Simon Fraser. * Misc/WebNSControlExtras.m: (-[NSControl sizeToFitAndAdjustWindowHeight]): Updated this function to use more modern AppKit scale factor terminology. (This is unrelated to the rest of the patch.) * WebCoreSupport/WebChromeClient.h: * WebCoreSupport/WebChromeClient.mm: 2011-08-13 Dan Bernstein Changed the value of WebKitShowsToolTipOverTruncatedTextPreferenceKey to match the naming everywhere else. Reviewed by Joseph Pecoraro. * WebView/WebPreferenceKeysPrivate.h: 2011-08-13 Sam Weinig Remove unused variables from WebView/WebFullScreenController.h https://bugs.webkit.org/show_bug.cgi?id=66194 Reviewed by Dan Bernstein. * WebView/WebFullScreenController.h: Remove a few variables which were not used. 2011-08-12 Dan Bernstein Add an option to automatically show tooltips (with the full text) over truncated text https://bugs.webkit.org/show_bug.cgi?id=66178 Reviewed by Simon Fraser. * WebView/WebPreferenceKeysPrivate.h: Defined a preference key. * WebView/WebPreferences.mm: (+[WebPreferences initialize]): Added a default value of NO for the ShowsToolTipOverTruncatedText preference. (-[WebPreferences showsToolTipOverTruncatedText]): Added this getter. (-[WebPreferences setShowsToolTipOverTruncatedText:]): Added this setter. * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Added call to Settings::setShowsToolTipOverTruncatedText(). 2011-08-12 Sam Weinig Use __builtin_trap() for CRASH when building with clang https://bugs.webkit.org/show_bug.cgi?id=66152 Reviewed by Anders Carlsson. * Plugins/WebBaseNetscapePluginView.mm: (-[WebBaseNetscapePluginView setAttributeKeys:andValues:]): (-[WebBaseNetscapePluginView handleMouseMoved:]): (-[WebBaseNetscapePluginView handleMouseEntered:]): (-[WebBaseNetscapePluginView handleMouseExited:]): (-[WebBaseNetscapePluginView focusChanged]): (-[WebBaseNetscapePluginView windowFocusChanged:]): (-[WebBaseNetscapePluginView createPlugin]): (-[WebBaseNetscapePluginView loadStream]): (-[WebBaseNetscapePluginView shouldStop]): (-[WebBaseNetscapePluginView destroyPlugin]): (-[WebBaseNetscapePluginView updateAndSetWindow]): (-[WebBaseNetscapePluginView sendModifierEventWithKeyCode:character:]): (-[WebBaseNetscapePluginView pluginLayer]): (-[WebBaseNetscapePluginView getFormValue:]): Remove the ASSERT_NOT_REACHED from the base class methods. They were not adding much value and were getting in the way of making the static analyzer work. A better way to do this would be to use a formal protocol. 2011-08-12 Mark Rowe Be more forward-looking in the choice of compiler. Rubber-stamped by Jon Honeycutt. * Configurations/CompilerVersion.xcconfig: 2011-08-10 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=66004 Removing the CSS Regions and Exclusions ifdefs. Reviewed by Adam Roben. * Configurations/FeatureDefines.xcconfig: 2011-08-09 Mark Hahnenberg Add ParentClass typedef in all JSC classes https://bugs.webkit.org/show_bug.cgi?id=65731 Reviewed by Oliver Hunt. Just added the Base typedefs in all the classes that are a subclass of JSCell to point at their parent classes. This is a change to support future changes to the way constructors and destructors are implemented in JS objects, among other things. * Plugins/Hosted/ProxyInstance.mm: * Plugins/Hosted/ProxyRuntimeObject.h: 2011-08-08 Chris Marrin Logic to compute visible display rect in GraphicsLayerCA::syncCompositingState https://bugs.webkit.org/show_bug.cgi?id=65708 Supply initial display rects for the full-screen case Reviewed by Simon Fraser. * WebView/WebFullScreenController.mm: (-[WebFullScreenController enterFullscreen:]): (-[WebFullScreenController exitFullscreen]): 2011-08-06 Joseph Pecoraro Potential Leaks - RetainPtr<> over retaining Create'd objects https://bugs.webkit.org/show_bug.cgi?id=65806 Reviewed by Darin Adler. Fix a possible leak by adopting an allocation instead of retaining it. * WebView/WebView.mm: (-[WebView previousValidKeyView]): 2011-08-05 Anders Carlsson Remove PluginHalter https://bugs.webkit.org/show_bug.cgi?id=65729 Reviewed by Darin Adler. Remove plug-in halter and associated classes. * Plugins/WebBaseNetscapePluginView.h: * Plugins/WebBaseNetscapePluginView.mm: (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]): (-[WebBaseNetscapePluginView start]): (-[WebBaseNetscapePluginView stop]): * WebCoreSupport/WebPluginHalterClient.h: Removed. * WebCoreSupport/WebPluginHalterClient.mm: Removed. * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): (-[WebView _preferencesChanged:]): * WebView/WebViewPrivate.h: 2011-08-04 Mark Rowe Future-proof Xcode configuration settings. * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebKit.xcconfig: 2011-08-03 Kent Tamura Fix incorrect checks for HTMLMediaElement https://bugs.webkit.org/show_bug.cgi?id=65590 Reviewed by Dimitri Glazkov.