1. 21 Jan, 2014 3 commits
  2. 20 Jan, 2014 1 commit
    • andersca@apple.com's avatar
      Give each page a UserContentController · 2e7006b1
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=127315
      
      Reviewed by Andreas Kling.
      
      Add a UserContentController object to PageGroup and have the page group set it on any
      pages that are added to the page group.
      
      This is another step towards moving handling of user content away from PageGroup and make it
      possible for each page to have different user content.
      
      * page/Page.cpp:
      (WebCore::Page::~Page):
      (WebCore::Page::setUserContentController):
      * page/Page.h:
      (WebCore::Page::userContentController):
      * page/PageGroup.cpp:
      (WebCore::PageGroup::PageGroup):
      (WebCore::PageGroup::addPage):
      (WebCore::PageGroup::removePage):
      * page/PageGroup.h:
      * page/UserContentController.cpp:
      (WebCore::UserContentController::addPage):
      (WebCore::UserContentController::removePage):
      * page/UserContentController.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162380 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2e7006b1
  3. 27 Dec, 2013 1 commit
    • dbates@webkit.org's avatar
      [iOS] Upstream WebCore/page changes · 4da1af80
      dbates@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=126180
      
      Reviewed by Darin Adler.
      
      Source/WebCore:
      
      * WebCore.xcodeproj/project.pbxproj:
      * dom/EventNames.h:
      (WebCore::EventNames::isGestureEventType): Added.
      * page/AlternativeTextClient.h: Do not define WTF_USE_DICTATION_ALTERNATIVES when building for iOS.
      * page/Chrome.cpp:
      (WebCore::Chrome::Chrome):
      (WebCore::Chrome::dispatchViewportPropertiesDidChange): Added; guarded by PLATFORM(IOS).
      (WebCore::Chrome::setCursor): Make this an empty function when building for iOS.
      (WebCore::Chrome::setCursorHiddenUntilMouseMoves): Ditto.
      (WebCore::Chrome::didReceiveDocType): Added; iOS-specific.
      * page/Chrome.h:
      (WebCore::Chrome::setDispatchViewportDataDidChangeSuppressed): Added; guarded by PLATFORM(IOS).
      * page/ChromeClient.h:
      (WebCore::ChromeClient::didFlushCompositingLayers): Added; guarded by PLATFORM(IOS).
      (WebCore::ChromeClient::fetchCustomFixedPositionLayoutRect): Added; guarded by PLATFORM(IOS).
      (WebCore::ChromeClient::updateViewportConstrainedLayers): Added; guarded by PLATFORM(IOS).
      * page/DOMTimer.cpp:
      (WebCore::DOMTimer::install): Added iOS-specific code.
      (WebCore::DOMTimer::fired): Ditto.
      * page/DOMWindow.cpp:
      (WebCore::DOMWindow::DOMWindow): Ditto.
      (WebCore::DOMWindow::innerHeight): Ditto.
      (WebCore::DOMWindow::innerWidth): Ditto.
      (WebCore::DOMWindow::scrollX): Ditto.
      (WebCore::DOMWindow::scrollY): Ditto.
      (WebCore::DOMWindow::scrollBy): Ditto.
      (WebCore::DOMWindow::scrollTo): Ditto.
      (WebCore::DOMWindow::clearTimeout): Ditto.
      (WebCore::DOMWindow::addEventListener): Ditto.
      (WebCore::DOMWindow::incrementScrollEventListenersCount): Added; guarded by PLATFORM(IOS).
      (WebCore::DOMWindow::decrementScrollEventListenersCount): Added; guarded by PLATFORM(IOS).
      (WebCore::DOMWindow::resetAllGeolocationPermission): Added; Also added FIXME comment.
      (WebCore::DOMWindow::removeEventListener): Added iOS-specific code.
      (WebCore::DOMWindow::dispatchEvent): Modified to prevent dispatching duplicate pageshow and pagehide
      events per <http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#event-pageshow>.
      (WebCore::DOMWindow::removeAllEventListeners): Added iOS-specific code.
      * page/DOMWindow.h:
      * page/DOMWindow.idl: Added IOS_GESTURE_EVENTS-guarded attributes: ongesture{change, end, start}. Also
      added IOS_TOUCH_EVENTS-guarded attributes: {Touch, TouchList}Constructor.
      * page/EditorClient.h:
      * page/EventHandler.cpp:
      (WebCore::EventHandler::EventHandler): Added iOS-specific code.
      (WebCore::EventHandler::clear): Ditto.
      (WebCore::EventHandler::startPanScrolling): Make this an empty function when building for iOS.
      (WebCore::EventHandler::handleMousePressEvent): Modified to invalidate a click when the clicked node is
      null. Also, opt out of code for updating the scrollbars as UIKit manages scrollbars on iOS.
      (WebCore::EventHandler::handleMouseMoveEvent): Opt of code for updating the scrollbars and cursor when building on iOS.
      (WebCore::hitTestResultInFrame): Made this a file-local static function since it's only used in EventHandler.cpp.
      (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled): Added iOS-specific code.
      * page/EventHandler.h:
      * page/FocusController.h:
      * page/Frame.cpp:
      (WebCore::Frame::Frame): Added iOS-specific code.
      (WebCore::Frame::scrollOverflowLayer): Added; iOS-specific.
      (WebCore::Frame::overflowAutoScrollTimerFired): Added; iOS-specific.
      (WebCore::Frame::startOverflowAutoScroll): Added; iOS-specific.
      (WebCore::Frame::checkOverflowScroll): Added; iOS-specific.
      (WebCore::Frame::willDetachPage): Added iOS-specific code.
      (WebCore::Frame::createView): Ditto.
      (WebCore::Frame::setSelectionChangeCallbacksDisabled): Added; iOS-specific.
      (WebCore::Frame::selectionChangeCallbacksDisabled): Added; iOS-specific.
      * page/Frame.h:
      (WebCore::Frame::timersPaused): Added; guarded by PLATFORM(IOS).
      * page/FrameView.cpp:
      (WebCore::FrameView::FrameView): Added iOS-specific code.
      (WebCore::FrameView::clear): Ditto.
      (WebCore::FrameView::flushCompositingStateForThisFrame): Ditto.
      (WebCore::FrameView::graphicsLayerForPlatformWidget): Added.
      (WebCore::FrameView::scheduleLayerFlushAllowingThrottling): Added.
      (WebCore::FrameView::layout): Added iOS-specific code.
      (WebCore::countRenderedCharactersInRenderObjectWithThreshold): Added; helper function used by FrameView::renderedCharactersExceed().
      Also added FIXME comment.
      (WebCore::FrameView::renderedCharactersExceed): Added.
      (WebCore::FrameView::visibleContentsResized): Added iOS-specific code.
      (WebCore::FrameView::adjustTiledBackingCoverage): Ditto.
      (WebCore::FrameView::performPostLayoutTasks): Ditto.
      (WebCore::FrameView::sendResizeEventIfNeeded): Ditto.
      (WebCore::FrameView::paintContents): Added iOS-specific code. Also added FIXME comments.
      (WebCore::FrameView::setUseCustomFixedPositionLayoutRect): Added; iOS-specific.
      (WebCore::FrameView::setCustomFixedPositionLayoutRect): Added; iOS-specific.
      (WebCore::FrameView::updateFixedPositionLayoutRect): Added; iOS-specific.
      * page/FrameView.h:
      * page/Navigator.cpp:
      (WebCore::Navigator::standalone): Added; iOS-specific.
      * page/Navigator.h:
      * page/Navigator.idl: Added WTF_PLATFORM_IOS-guarded attribute: standalone. Also added FIXME comment.
      * page/NavigatorBase.cpp:
      (WebCore::NavigatorBase::platform): Added iOS-specific code.
      * page/Page.h:
      (WebCore::Page::hasCustomHTMLTokenizerTimeDelay): Added; guarded by PLATFORM(IOS). Also added FIXME comment
      to remove this method.
      (WebCore::Page::customHTMLTokenizerTimeDelay): Added; guarded by PLATFORM(IOS). Also added FIXME comment
      to remove this method.
      * page/PageGroup.cpp:
      (WebCore::PageGroup::removeVisitedLink): Added.
      * page/PageGroup.h:
      * page/Settings.cpp:
      (WebCore::Settings::Settings):
      (WebCore::Settings::setScriptEnabled): Added; guarded by PLATFORM(IOS).
      (WebCore::Settings::setStandalone): Added; guarded by PLATFORM(IOS).
      (WebCore::Settings::setAudioSessionCategoryOverride): Added; guarded by PLATFORM(IOS).
      (WebCore::Settings::audioSessionCategoryOverride): Added; guarded by PLATFORM(IOS).
      (WebCore::Settings::setNetworkDataUsageTrackingEnabled): Added; guarded by PLATFORM(IOS).
      (WebCore::Settings::networkDataUsageTrackingEnabled): Added; guarded by PLATFORM(IOS).
      (WebCore::sharedNetworkInterfaceNameGlobal): Added; guarded by PLATFORM(IOS).
      (WebCore::Settings::setNetworkInterfaceName): Added; guarded by PLATFORM(IOS).
      (WebCore::Settings::networkInterfaceName): Added; guarded by PLATFORM(IOS).
      * page/Settings.h:
      (WebCore::Settings::setMaxParseDuration): Added; guarded by PLATFORM(IOS). Also added FIXME comment.
      (WebCore::Settings::maxParseDuration): Added; guarded by PLATFORM(IOS). Also added FIXME comment.
      (WebCore::Settings::standalone): Added; guarded by PLATFORM(IOS).
      (WebCore::Settings::setTelephoneNumberParsingEnabled): Added; guarded by PLATFORM(IOS).
      (WebCore::Settings::telephoneNumberParsingEnabled): Added; guarded by PLATFORM(IOS).
      (WebCore::Settings::setMediaDataLoadsAutomatically): Added; guarded by PLATFORM(IOS).
      (WebCore::Settings::mediaDataLoadsAutomatically): Added; guarded by PLATFORM(IOS).
      (WebCore::Settings::setShouldTransformsAffectOverflow): Added; guarded by PLATFORM(IOS).
      (WebCore::Settings::shouldTransformsAffectOverflow): Added; guarded by PLATFORM(IOS).
      (WebCore::Settings::setShouldDispatchJavaScriptWindowOnErrorEvents): Added; guarded by PLATFORM(IOS).
      (WebCore::Settings::shouldDispatchJavaScriptWindowOnErrorEvents): Added; guarded by PLATFORM(IOS).
      (WebCore::Settings::setAlwaysUseBaselineOfPrimaryFont): Added; guarded by PLATFORM(IOS).
      (WebCore::Settings::alwaysUseBaselineOfPrimaryFont): Added; guarded by PLATFORM(IOS).
      (WebCore::Settings::setAlwaysUseAcceleratedOverflowScroll): Added; guarded by PLATFORM(IOS).
      (WebCore::Settings::alwaysUseAcceleratedOverflowScroll): Added; guarded by PLATFORM(IOS).
      * page/Settings.in: Added IOS_AIRPLAY-guarded setting: mediaPlaybackAllowsAirPlay.
      * page/animation/CSSPropertyAnimation.cpp:
      (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): Added iOS-specific code and FIXME comment.
      * page/ios/EventHandlerIOS.mm: Added.
      * page/ios/FrameIOS.mm: Added.
      * page/mac/ChromeMac.mm:
      * page/mac/PageMac.cpp:
      (WebCore::Page::addSchedulePair): Opt out of code when building for iOS.
      (WebCore::Page::removeSchedulePair): Ditto.
      * page/mac/SettingsMac.mm:
      (WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault): Added iOS-specific code.
      * page/mac/WebCoreFrameView.h:
      
      Source/WebKit/ios:
      
      * WebCoreSupport/WebChromeClientIOS.mm: Substitute ENABLE(IOS_TOUCH_EVENTS) for ENABLE(TOUCH_EVENTS).
      
      Source/WebKit2:
      
      * WebProcess/WebCoreSupport/WebChromeClient.h:
      * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm: Added.
      * WebProcess/WebPage/WebPage.cpp: Include header <WebCore/HitTestResult.h>.
      
      Source/WTF:
      
      * wtf/FeatureDefines.h: Define ENABLE_IOS_TOUCH_EVENTS to be enabled by default
      when building iOS with ENABLE(TOUCH_EVENTS).
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161106 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4da1af80
  4. 02 Oct, 2013 2 commits
    • weinig@apple.com's avatar
      CTTE: DOMWrapperWorlds should be passed around by reference · 8f716033
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122206
      
      Reviewed by Andreas Kling.
      
      ../WebCore: 
      
      * bindings/js/DOMWrapperWorld.cpp:
      (WebCore::DOMWrapperWorld::DOMWrapperWorld):
      (WebCore::DOMWrapperWorld::~DOMWrapperWorld):
      (WebCore::DOMWrapperWorld::clearWrappers):
      (WebCore::normalWorld):
      (WebCore::mainThreadNormalWorld):
      * bindings/js/DOMWrapperWorld.h:
      (WebCore::debuggerWorld):
      (WebCore::pluginWorld):
      (WebCore::currentWorld):
      * bindings/js/JSCSSStyleDeclarationCustom.cpp:
      (WebCore::JSCSSStyleDeclaration::getPropertyCSSValue):
      * bindings/js/JSCSSValueCustom.cpp:
      (WebCore::JSCSSValueOwner::finalize):
      * bindings/js/JSDOMBinding.h:
      (WebCore::wrapperOwner):
      (WebCore::wrapperContext):
      (WebCore::getInlineCachedWrapper):
      (WebCore::setInlineCachedWrapper):
      (WebCore::clearInlineCachedWrapper):
      (WebCore::getCachedWrapper):
      (WebCore::cacheWrapper):
      (WebCore::uncacheWrapper):
      (WebCore::jsStringWithCache):
      * bindings/js/JSDOMGlobalObject.cpp:
      (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
      (WebCore::toJSDOMGlobalObject):
      * bindings/js/JSDOMGlobalObject.h:
      (WebCore::JSDOMGlobalObject::world):
      * bindings/js/JSDOMWindowBase.cpp:
      (WebCore::JSDOMWindowBase::JSDOMWindowBase):
      (WebCore::toJSDOMWindow):
      * bindings/js/JSDOMWindowBase.h:
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore::JSDOMWindowShell::JSDOMWindowShell):
      (WebCore::JSDOMWindowShell::setWindow):
      (WebCore::toJSDOMWindowShell):
      * bindings/js/JSDOMWindowShell.h:
      (WebCore::JSDOMWindowShell::create):
      (WebCore::JSDOMWindowShell::world):
      * bindings/js/JSErrorHandler.cpp:
      (WebCore::JSErrorHandler::JSErrorHandler):
      * bindings/js/JSErrorHandler.h:
      (WebCore::JSErrorHandler::create):
      * bindings/js/JSEventListener.cpp:
      (WebCore::JSEventListener::JSEventListener):
      (WebCore::JSEventListener::handleEvent):
      * bindings/js/JSEventListener.h:
      (WebCore::JSEventListener::create):
      (WebCore::JSEventListener::isolatedWorld):
      * bindings/js/JSInjectedScriptHostCustom.cpp:
      (WebCore::getJSListenerFunctions):
      * bindings/js/JSLazyEventListener.cpp:
      (WebCore::JSLazyEventListener::JSLazyEventListener):
      * bindings/js/JSLazyEventListener.h:
      * bindings/js/JSMutationCallback.cpp:
      (WebCore::JSMutationCallback::JSMutationCallback):
      (WebCore::JSMutationCallback::call):
      * bindings/js/JSNodeCustom.cpp:
      (WebCore::JSNodeOwner::finalize):
      * bindings/js/JSPluginElementFunctions.h:
      (WebCore::pluginElementCustomGetOwnPropertySlot):
      * bindings/js/JSWorkerGlobalScopeBase.cpp:
      (WebCore::JSWorkerGlobalScopeBase::JSWorkerGlobalScopeBase):
      * bindings/js/ScheduledAction.cpp:
      (WebCore::ScheduledAction::create):
      (WebCore::ScheduledAction::ScheduledAction):
      (WebCore::ScheduledAction::execute):
      * bindings/js/ScheduledAction.h:
      (WebCore::ScheduledAction::ScheduledAction):
      * bindings/js/ScriptCachedFrameData.cpp:
      (WebCore::ScriptCachedFrameData::restore):
      * bindings/js/ScriptCachedFrameData.h:
      * bindings/js/ScriptController.cpp:
      (WebCore::ScriptController::~ScriptController):
      (WebCore::ScriptController::destroyWindowShell):
      (WebCore::ScriptController::createWindowShell):
      (WebCore::ScriptController::evaluateInWorld):
      (WebCore::ScriptController::getAllWorlds):
      (WebCore::ScriptController::initScript):
      (WebCore::ScriptController::executeScriptInWorld):
      (WebCore::ScriptController::shouldBypassMainWorldContentSecurityPolicy):
      * bindings/js/ScriptController.h:
      (WebCore::ScriptController::windowShell):
      (WebCore::ScriptController::existingWindowShell):
      (WebCore::ScriptController::globalObject):
      * bindings/js/ScriptDebugServer.cpp:
      (WebCore::ScriptDebugServer::isContentScript):
      * bindings/js/ScriptState.cpp:
      (WebCore::execStateFromNode):
      (WebCore::execStateFromPage):
      * bindings/js/ScriptState.h:
      * bindings/js/SerializedScriptValue.cpp:
      (WebCore::SerializedScriptValue::transferArrayBuffers):
      * bindings/js/WebCoreJSClientData.h:
      (WebCore::WebCoreJSClientData::WebCoreJSClientData):
      (WebCore::WebCoreJSClientData::normalWorld):
      (WebCore::WebCoreJSClientData::getAllWorlds):
      (WebCore::WebCoreJSClientData::rememberWorld):
      (WebCore::WebCoreJSClientData::forgetWorld):
      * bindings/js/WebCoreTypedArrayController.cpp:
      (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader):
      (GenerateImplementation):
      * dom/Document.cpp:
      (WebCore::Document::ensurePlugInsInjectedScript):
      * dom/Document.h:
      * dom/DocumentStyleSheetCollection.cpp:
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::ensureIsolatedWorld):
      (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript):
      (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
      * html/HTMLMediaElement.h:
      * html/HTMLPlugInImageElement.cpp:
      (WebCore::plugInImageElementIsolatedWorld):
      (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
      * inspector/InspectorAgent.cpp:
      (WebCore::InspectorAgent::didClearWindowObjectInWorld):
      * inspector/InspectorAgent.h:
      * inspector/InspectorController.cpp:
      (WebCore::InspectorController::didClearWindowObjectInWorld):
      * inspector/InspectorController.h:
      * inspector/InspectorDOMAgent.cpp:
      (WebCore::InspectorDOMAgent::buildObjectForEventListener):
      * inspector/InspectorInstrumentation.cpp:
      (WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
      * inspector/InspectorInstrumentation.h:
      (WebCore::InspectorInstrumentation::didClearWindowObjectInWorld):
      * inspector/InspectorPageAgent.cpp:
      (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
      * inspector/InspectorPageAgent.h:
      * loader/EmptyClients.h:
      (WebCore::EmptyFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::dispatchDidClearWindowObjectsInAllWorlds):
      (WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
      (WebCore::FrameLoader::dispatchGlobalObjectAvailableInAllWorlds):
      * loader/FrameLoader.h:
      * loader/FrameLoaderClient.h:
      (WebCore::FrameLoaderClient::dispatchGlobalObjectAvailable):
      * page/CaptionUserPreferencesMediaAF.cpp:
      * page/DOMWindowExtension.cpp:
      (WebCore::DOMWindowExtension::DOMWindowExtension):
      * page/DOMWindowExtension.h:
      (WebCore::DOMWindowExtension::create):
      (WebCore::DOMWindowExtension::world):
      * page/Frame.cpp:
      (WebCore::Frame::injectUserScripts):
      (WebCore::Frame::injectUserScriptsForWorld):
      * page/Frame.h:
      * page/PageGroup.cpp:
      (WebCore::PageGroup::addUserScriptToWorld):
      (WebCore::PageGroup::addUserStyleSheetToWorld):
      (WebCore::PageGroup::removeUserScriptFromWorld):
      (WebCore::PageGroup::removeUserStyleSheetFromWorld):
      (WebCore::PageGroup::removeUserScriptsFromWorld):
      (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
      * page/PageGroup.h:
      
      ../WebKit/efl: 
      
      * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
      (DumpRenderTreeSupportEfl::evaluateScriptInIsolatedWorld):
      * WebCoreSupport/FrameLoaderClientEfl.cpp:
      (WebCore::FrameLoaderClientEfl::dispatchDidClearWindowObjectInWorld):
      * WebCoreSupport/FrameLoaderClientEfl.h:
      
      ../WebKit/gtk: 
      
      * WebCoreSupport/FrameLoaderClientGtk.cpp:
      (WebKit::FrameLoaderClient::dispatchDidClearWindowObjectInWorld):
      * WebCoreSupport/FrameLoaderClientGtk.h:
      
      ../WebKit/mac: 
      
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
      (WebKit::NetscapePluginInstanceProxy::getPluginElementNPObject):
      (WebKit::NetscapePluginInstanceProxy::evaluate):
      * WebCoreSupport/WebFrameLoaderClient.h:
      * WebCoreSupport/WebFrameLoaderClient.mm:
      * WebView/WebFrame.mm:
      (-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]):
      (-[WebFrame _globalContextForScriptWorld:]):
      (-[WebFrame jsWrapperForNode:inScriptWorld:]):
      * WebView/WebScriptWorld.mm:
      (+[WebScriptWorld standardWorld]):
      (+[WebScriptWorld findOrCreateWorld:]):
      * WebView/WebScriptWorldInternal.h:
      * WebView/WebView.mm:
      (-[WebView _injectOutlookQuirksScript]):
      (+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:injectedFrames:]):
      (+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:injectedFrames:]):
      (+[WebView _removeUserScriptFromGroup:world:url:]):
      (+[WebView _removeUserStyleSheetFromGroup:world:url:]):
      (+[WebView _removeUserScriptsFromGroup:world:]):
      (+[WebView _removeUserStyleSheetsFromGroup:world:]):
      
      ../WebKit/win: 
      
      * WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
      * WebCoreSupport/WebFrameLoaderClient.h:
      * WebScriptWorld.cpp:
      (WebScriptWorld::standardWorld):
      (WebScriptWorld::findOrCreateWorld):
      * WebScriptWorld.h:
      (WebScriptWorld::world):
      
      ../WebKit/wince: 
      
      * WebCoreSupport/FrameLoaderClientWinCE.cpp:
      (WebKit::FrameLoaderClientWinCE::dispatchDidClearWindowObjectInWorld):
      * WebCoreSupport/FrameLoaderClientWinCE.h:
      
      ../WebKit2: 
      
      * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
      (WebKit::InjectedBundlePageLoaderClient::didClearWindowObjectForFrame):
      (WebKit::InjectedBundlePageLoaderClient::globalObjectIsAvailableForFrame):
      * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
      * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
      (WebKit::InjectedBundleScriptWorld::getOrCreate):
      (WebKit::InjectedBundleScriptWorld::normalWorld):
      (WebKit::InjectedBundleScriptWorld::coreWorld):
      * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
      * WebProcess/Plugins/PluginView.cpp:
      (WebKit::PluginView::windowScriptNPObject):
      (WebKit::PluginView::pluginElementNPObject):
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
      (WebKit::WebFrameLoaderClient::dispatchGlobalObjectAvailable):
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8f716033
    • weinig@apple.com's avatar
      Convert PageGroup to using std::unique_ptr · e8dfefaf
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122184
      
      Reviewed by Anders Carlsson.
      
      * page/CaptionUserPreferences.cpp:
      * page/CaptionUserPreferences.h:
      * page/CaptionUserPreferencesMediaAF.cpp:
      * page/CaptionUserPreferencesMediaAF.h:
      * page/Frame.cpp:
      * page/GroupSettings.h:
      * page/Page.cpp:
      * page/PageGroup.cpp:
      * page/PageGroup.h:
      * page/UserScriptTypes.h:
      * page/UserStyleSheetTypes.h:
      * workers/DedicatedWorkerGlobalScope.h:
      * workers/DedicatedWorkerThread.cpp:
      * workers/DedicatedWorkerThread.h:
      * workers/SharedWorkerGlobalScope.cpp:
      * workers/SharedWorkerGlobalScope.h:
      * workers/SharedWorkerThread.cpp:
      * workers/SharedWorkerThread.h:
      * workers/WorkerGlobalScope.cpp:
      * workers/WorkerGlobalScope.h:
      * workers/WorkerThread.cpp:
      * workers/WorkerThread.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156751 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e8dfefaf
  5. 30 Sep, 2013 1 commit
  6. 27 Sep, 2013 2 commits
    • darin@apple.com's avatar
      rename KURL to URL · 5ffbb5c7
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=16214
      
      Reviewed by Andreas Kling.
      
      Source/WebCore:
      
      * many files: Renamed, using script.
      
      Source/WebKit:
      
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
      Let the script to try to rename here.
      
      Source/WebKit/blackberry:
      
      * many files: Renamed, using script.
      
      Source/WebKit/efl:
      
      * many files: Renamed, using script.
      
      Source/WebKit/gtk:
      
      * many files: Renamed, using script.
      
      Source/WebKit/mac:
      
      * many files: Renamed, using script.
      
      Source/WebKit/qt:
      
      * many files: Renamed, using script.
      
      Source/WebKit/win:
      
      * many files: Renamed, using script.
      
      Source/WebKit/wince:
      
      * many files: Renamed, using script.
      
      Source/WebKit2:
      
      * many files: Renamed, using script.
      
      Tools:
      
      * many files: Renamed, using script.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156550 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5ffbb5c7
    • darin@apple.com's avatar
      Add empty MainFrame class · ade301ac
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121770
      
      Reviewed by Andreas Kling.
      
      Source/WebCore:
      
      For now, MainFrame simply derives from Frame and adds nothing.
      Next, we will make each Frame point back to its MainFrame.
      
      * CMakeLists.txt: Added MainFrame.cpp/h.
      * GNUmakefile.list.am: Ditto.
      * Target.pri: Ditto.
      * WebCore.exp.in: Ditto.
      * WebCore.vcxproj/WebCore.vcxproj: Ditto.
      * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
      * WebCore.xcodeproj/project.pbxproj: Ditto.
      
      * page/Frame.cpp:
      (WebCore::Frame::Frame): Use references instead of pointers for constructor.
      (WebCore::Frame::create): Pass references instead of pointers to constructor.
      * page/Frame.h: Made constructor protected instead of private, and marked
      destructor virtual explicitly. Also marked virtual functions OVERRIDE and FINAL.
      
      * page/MainFrame.cpp: Added.
      * page/MainFrame.h: Added.
      
      * page/Page.cpp:
      (WebCore::Page::Page): Use MainFrame::create instead of Frame::create.
      (WebCore::Page::frameIsMainFrame): Moved here, no longer inline.
      (WebCore::Page::renderTreeSize): Use const Frame* instead of Frame*.
      (WebCore::Page::checkSubframeCountConsistency): Ditto.
      * page/Page.h: Changed mainFrame() to return MainFrame& and m_mainFrame to
      be a RefPtr<MainFrame>.
      
      * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
      * bindings/js/PageScriptDebugServer.cpp:
      * bindings/js/ScriptProfiler.cpp:
      * bindings/js/ScriptState.cpp:
      * css/MediaQueryEvaluator.cpp:
      * dom/Document.cpp:
      * history/CachedFrame.cpp:
      * history/CachedPage.cpp:
      * history/PageCache.cpp:
      * html/HTMLPlugInImageElement.cpp:
      * inspector/InspectorAgent.cpp:
      * inspector/InspectorCanvasAgent.cpp:
      * inspector/InspectorClient.cpp:
      * inspector/InspectorDOMAgent.cpp:
      * inspector/InspectorFrontendClientLocal.cpp:
      * inspector/InspectorFrontendHost.cpp:
      * inspector/InspectorInputAgent.cpp:
      * inspector/InspectorInstrumentation.cpp:
      * inspector/InspectorOverlay.cpp:
      * inspector/InspectorPageAgent.cpp:
      * inspector/PageRuntimeAgent.cpp:
      * loader/FrameLoader.cpp:
      * loader/HistoryController.cpp:
      * loader/archive/mhtml/MHTMLArchive.cpp:
      * page/AutoscrollController.cpp:
      * page/Chrome.cpp:
      * page/ContextMenuController.cpp:
      * page/DOMWindow.cpp:
      * page/DragController.cpp:
      * page/EventHandler.cpp:
      * page/FocusController.cpp:
      * page/FrameTree.cpp:
      * page/FrameView.cpp:
      * page/GestureTapHighlighter.cpp:
      * page/PageGroup.cpp:
      * page/PageGroupLoadDeferrer.cpp:
      * page/PageSerializer.cpp:
      * page/PageThrottler.cpp:
      * page/Settings.cpp:
      * page/SpatialNavigation.cpp:
      * page/mac/DragControllerMac.mm:
      * page/mac/PageMac.cpp:
      * page/scrolling/ScrollingCoordinator.cpp:
      * page/scrolling/mac/ScrollingCoordinatorMac.mm:
      * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
      * plugins/DOMMimeType.cpp:
      * storage/StorageEventDispatcher.cpp:
      * svg/graphics/SVGImage.cpp:
      * testing/InternalSettings.cpp:
      * testing/Internals.cpp:
      Include MainFrame.h instead of Frame.h as needed.
      
      Source/WebKit/efl:
      
      * WebCoreSupport/AcceleratedCompositingContextEfl.cpp:
      * WebCoreSupport/InspectorClientEfl.cpp:
      * ewk/ewk_view.cpp:
      Include MainFrame.h instead of Frame.h as needed.
      
      Source/WebKit/gtk:
      
      * WebCoreSupport/AcceleratedCompositingContextGL.cpp:
      * WebCoreSupport/ChromeClientGtk.cpp:
      * WebCoreSupport/FrameLoaderClientGtk.cpp:
      * WebCoreSupport/GtkAdjustmentWatcher.cpp:
      * webkit/webkitwebframe.cpp:
      * webkit/webkitwebview.cpp:
      * webkit/webkitviewportattributes.cpp:
      Include MainFrame.h instead of Frame.h as needed.
      
      Source/WebKit/mac:
      
      * WebCoreSupport/WebDragClient.mm:
      * WebCoreSupport/WebInspectorClient.mm:
      * WebCoreSupport/WebPlatformStrategies.mm:
      * WebView/WebFrame.mm:
      * WebView/WebHTMLView.mm:
      * WebView/WebView.mm:
      Include MainFrame.h instead of Frame.h as needed.
      
      Source/WebKit/qt:
      
      * Source/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp:
      * Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp:
      * Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp:
      * Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp:
      * Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp:
      * Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp:
      Include MainFrame.h instead of Frame.h as needed.
      
      Source/WebKit/win:
      
      * win/WebCoreSupport/WebDragClient.cpp:
      * win/WebCoreSupport/WebContextMenuClient.cpp:
      * win/WebDropSource.cpp:
      * win/WebFrame.cpp:
      * win/WebView.cpp:
      Include MainFrame.h instead of Frame.h as needed.
      
      Source/WebKit2:
      
      * WebProcess/FullScreen/WebFullScreenManager.cpp:
      * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
      * WebProcess/InjectedBundle/InjectedBundle.cpp:
      * WebProcess/Plugins/PluginView.cpp:
      * WebProcess/Storage/StorageAreaMap.cpp:
      * WebProcess/WebCoreSupport/WebChromeClient.cpp:
      * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
      * WebProcess/WebPage/FindController.cpp:
      * WebProcess/WebPage/PageOverlay.cpp:
      * WebProcess/WebPage/WebInspector.cpp:
      * WebProcess/WebPage/WebPage.cpp:
      * WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp:
      * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
      * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
      * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
      * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
      * WebProcess/WebPage/mac/WebPageMac.mm:
      Include MainFrame.h instead of Frame.h as needed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156543 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ade301ac
  7. 25 Sep, 2013 1 commit
    • benjamin@webkit.org's avatar
      Tie the life of DocumentStyleSheetCollection and Document together · 23358d72
      benjamin@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=121892
      
      Reviewed by Andreas Kling.
      
      DocumentStyleSheetCollection had an odd destruction pattern for no apparent reason.
      
      The two objects strictly depend on eachother, this patch make that explicit by making
      DocumentStyleSheetCollection a plain object in Document's memory space.
      
      * css/CSSStyleSheet.cpp:
      (WebCore::CSSStyleSheet::didMutateRules):
      * css/DocumentRuleSets.cpp:
      (WebCore::DocumentRuleSets::initUserStyle):
      * css/DocumentRuleSets.h:
      * css/InspectorCSSOMWrappers.cpp:
      (WebCore::InspectorCSSOMWrappers::collectFromDocumentStyleSheetCollection):
      (WebCore::InspectorCSSOMWrappers::getWrapperForRuleInSheets):
      * css/InspectorCSSOMWrappers.h:
      * css/SelectorChecker.cpp:
      (WebCore::SelectorChecker::matchRecursively):
      (WebCore::SelectorChecker::checkOne):
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::StyleResolver):
      * css/StyleSheetList.cpp:
      (WebCore::StyleSheetList::styleSheets):
      (WebCore::StyleSheetList::detachFromDocument):
      * dom/Document.cpp:
      (WebCore::Document::Document):
      (WebCore::Document::~Document):
      (WebCore::Document::setCompatibilityMode):
      (WebCore::Document::recalcStyle):
      (WebCore::Document::createStyleResolver):
      (WebCore::Document::processHttpEquiv):
      (WebCore::Document::preferredStylesheetSet):
      (WebCore::Document::selectedStylesheetSet):
      (WebCore::Document::setSelectedStylesheetSet):
      (WebCore::Document::scheduleOptimizedStyleSheetUpdate):
      (WebCore::Document::styleResolverChanged):
      (WebCore::Document::haveStylesheetsLoaded):
      * dom/Document.h:
      (WebCore::Document::styleSheetCollection):
      * dom/DocumentStyleSheetCollection.cpp:
      (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
      (WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
      (WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
      (WebCore::DocumentStyleSheetCollection::pageUserSheet):
      (WebCore::DocumentStyleSheetCollection::clearPageUserSheet):
      (WebCore::DocumentStyleSheetCollection::updatePageUserSheet):
      (WebCore::DocumentStyleSheetCollection::updateInjectedStyleSheetCache):
      (WebCore::DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache):
      (WebCore::DocumentStyleSheetCollection::addAuthorSheet):
      (WebCore::DocumentStyleSheetCollection::addUserSheet):
      (WebCore::DocumentStyleSheetCollection::removePendingSheet):
      (WebCore::DocumentStyleSheetCollection::addStyleSheetCandidateNode):
      (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
      (WebCore::DocumentStyleSheetCollection::analyzeStyleSheetChange):
      (WebCore::collectActiveCSSStyleSheetsFromSeamlessParents):
      (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
      * dom/DocumentStyleSheetCollection.h:
      * dom/Element.cpp:
      (WebCore::Element::createPseudoElementIfNeeded):
      * dom/InlineStyleSheetOwner.cpp:
      (WebCore::InlineStyleSheetOwner::insertedIntoDocument):
      (WebCore::InlineStyleSheetOwner::removedFromDocument):
      (WebCore::InlineStyleSheetOwner::clearDocumentData):
      (WebCore::InlineStyleSheetOwner::createSheet):
      (WebCore::InlineStyleSheetOwner::sheetLoaded):
      (WebCore::InlineStyleSheetOwner::startLoadingDynamicSheet):
      * dom/ProcessingInstruction.cpp:
      (WebCore::ProcessingInstruction::~ProcessingInstruction):
      (WebCore::ProcessingInstruction::checkStyleSheet):
      (WebCore::ProcessingInstruction::sheetLoaded):
      (WebCore::ProcessingInstruction::insertedInto):
      (WebCore::ProcessingInstruction::removedFrom):
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::~HTMLLinkElement):
      (WebCore::HTMLLinkElement::insertedInto):
      (WebCore::HTMLLinkElement::removedFrom):
      (WebCore::HTMLLinkElement::addPendingSheet):
      (WebCore::HTMLLinkElement::removePendingSheet):
      * html/HTMLQuoteElement.cpp:
      (WebCore::HTMLQuoteElement::insertedInto):
      * html/HTMLViewSourceDocument.cpp:
      (WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument):
      * inspector/InspectorCSSAgent.cpp:
      (WebCore::InspectorCSSAgent::willMatchRule):
      * inspector/InspectorCSSAgent.h:
      * inspector/InspectorInstrumentation.cpp:
      (WebCore::InspectorInstrumentation::willMatchRuleImpl):
      * inspector/InspectorInstrumentation.h:
      (WebCore::InspectorInstrumentation::willMatchRule):
      * mathml/MathMLMathElement.cpp:
      (WebCore::MathMLMathElement::insertedInto):
      * page/Page.cpp:
      (WebCore::Page::userStyleSheetLocationChanged):
      * page/PageGroup.cpp:
      (WebCore::PageGroup::invalidateInjectedStyleSheetCacheInAllFrames):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::lineHeight):
      (WebCore::RenderBlock::updateFirstLetter):
      * rendering/RenderInline.cpp:
      (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
      (WebCore::RenderInline::lineHeight):
      * rendering/RenderLineBreak.cpp:
      (WebCore::RenderLineBreak::lineHeight):
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::uncachedFirstLineStyle):
      (WebCore::RenderObject::cachedFirstLineStyle):
      * rendering/RenderObject.h:
      (WebCore::RenderObject::firstLineStyle):
      * rendering/RootInlineBox.cpp:
      (WebCore::RootInlineBox::verticalPositionForBox):
      * style/StyleResolveTree.cpp:
      (WebCore::Style::resolveLocal):
      * testing/Internals.cpp:
      (WebCore::Internals::insertAuthorCSS):
      (WebCore::Internals::insertUserCSS):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156422 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      23358d72
  8. 18 Sep, 2013 1 commit
    • andersca@apple.com's avatar
      RefPtrHashMap should work with move only types · 1895f48b
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121564
      
      Reviewed by Andreas Kling.
      
      Source/JavaScriptCore:
      
      * runtime/VM.cpp:
      (JSC::VM::addSourceProviderCache):
      
      Source/WebCore:
      
      * bridge/IdentifierRep.cpp:
      (WebCore::IdentifierRep::get):
      * page/PageGroup.cpp:
      (WebCore::PageGroup::transientLocalStorage):
      
      Source/WebKit/mac:
      
      * Plugins/Hosted/ProxyInstance.mm:
      (WebKit::ProxyInstance::methodNamed):
      (WebKit::ProxyInstance::fieldNamed):
      
      Source/WebKit2:
      
      * UIProcess/Storage/StorageManager.cpp:
      (WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea):
      (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
      * WebProcess/Storage/StorageNamespaceImpl.cpp:
      (WebKit::StorageNamespaceImpl::storageArea):
      
      Source/WTF:
      
      Add the same rvalue references and std::forward calls that already exist in HashMap.
      
      * wtf/RefPtrHashMap.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156056 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1895f48b
  9. 13 Sep, 2013 1 commit
    • andersca@apple.com's avatar
      Use nullptr instead of 0 in calls to HashMap::add · b9b4add1
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121322
      
      Reviewed by Sam Weinig.
      
      Source/JavaScriptCore:
      
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::emitLoad):
      (JSC::BytecodeGenerator::addStringConstant):
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::cellConstant):
      
      Source/WebCore:
      
      * bridge/IdentifierRep.cpp:
      (WebCore::IdentifierRep::get):
      * css/CSSFontFaceSource.cpp:
      (WebCore::CSSFontFaceSource::getFontData):
      * css/CSSFontSelector.cpp:
      (WebCore::CSSFontSelector::getFontFace):
      * css/CSSSegmentedFontFace.cpp:
      (WebCore::CSSSegmentedFontFace::getFontData):
      * css/CSSValuePool.cpp:
      (WebCore::CSSValuePool::createFontFamilyValue):
      (WebCore::CSSValuePool::createFontFaceValue):
      * dom/ChildListMutationScope.cpp:
      (WebCore::ChildListMutationAccumulator::getOrCreate):
      * dom/Document.cpp:
      (WebCore::Document::getCSSCanvasElement):
      * dom/NodeRareData.h:
      (WebCore::NodeListsNodeData::addCacheWithAtomicName):
      (WebCore::NodeListsNodeData::addCacheWithName):
      (WebCore::NodeListsNodeData::addCacheWithQualifiedName):
      * loader/appcache/ApplicationCacheStorage.cpp:
      (WebCore::ApplicationCacheStorage::findOrCreateCacheGroup):
      * page/PageGroup.cpp:
      (WebCore::PageGroup::pageGroup):
      * page/animation/AnimationController.cpp:
      (WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
      * platform/mac/ScrollbarThemeMac.mm:
      (WebCore::ScrollbarThemeMac::registerScrollbar):
      * storage/StorageNamespaceImpl.cpp:
      (WebCore::StorageNamespaceImpl::localStorageNamespace):
      
      Source/WebKit/mac:
      
      * Plugins/Hosted/NetscapePluginHostManager.mm:
      (WebKit::NetscapePluginHostManager::hostForPlugin):
      
      Source/WebKit2:
      
      * Platform/CoreIPC/Connection.cpp:
      (CoreIPC::Connection::SyncMessageState::getOrCreate):
      * UIProcess/Storage/StorageManager.cpp:
      (WebKit::StorageManager::createLocalStorageMap):
      (WebKit::StorageManager::createSessionStorageMap):
      (WebKit::StorageManager::getOrCreateLocalStorageNamespace):
      * UIProcess/WebProcessProxy.cpp:
      (WebKit::WebProcessProxy::addBackForwardItem):
      * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
      (WebKit::InjectedBundleNodeHandle::getOrCreate):
      * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
      (WebKit::InjectedBundleRangeHandle::getOrCreate):
      * WebProcess/Storage/StorageNamespaceImpl.cpp:
      (WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::createWebPage):
      (WebKit::WebProcess::webPageGroup):
      
      Tools:
      
      * DumpRenderTree/mac/TestRunnerMac.mm:
      (TestRunner::evaluateScriptInIsolatedWorld):
      * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
      (WTR::TestRunner::evaluateScriptInIsolatedWorld):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155729 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b9b4add1
  10. 03 Sep, 2013 1 commit
    • darin@apple.com's avatar
      Cut down on double hashing and code needlessly using hash table iterators · 78bf2d4c
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120611
      
      Reviewed by Andreas Kling.
      
      Source/WebCore:
      
      Some of these changes are primarily code cleanup, but others could provide
      a small code size and speed improvement by avoiding extra hashing.
      
      * Modules/geolocation/Geolocation.cpp:
      (WebCore::Geolocation::Watchers::find): Use get instead of find.
      (WebCore::Geolocation::Watchers::remove): Use take instead of find.
      (WebCore::Geolocation::makeCachedPositionCallbacks): Use the return
      value from remove to avoid hashing twice.
      
      * Modules/webaudio/AudioContext.cpp:
      (WebCore::AudioContext::addAutomaticPullNode): Use the return value from
      add to avoid hashing twice.
      (WebCore::AudioContext::removeAutomaticPullNode): Use the return value
      from remove to avoid hashing twice.
      
      * Modules/webaudio/AudioNodeInput.cpp:
      (WebCore::AudioNodeInput::connect): Use the return value from add to avoid
      hashing twice.
      (WebCore::AudioNodeInput::disconnect): Use the return value from remove
      to avoid hashing twice.
      
      * Modules/webaudio/AudioParam.cpp:
      (WebCore::AudioParam::connect): Use the return value from add to avoid
      hashing twice.
      (WebCore::AudioParam::disconnect): Use the return value from remove to
      avoid hashing twice.
      
      * bridge/NP_jsobject.cpp:
      (ObjectMap::remove): Use remove instead of find/remove.
      
      * dom/Node.cpp:
      (WebCore::Node::~Node): Use the return value from remove instead of
      find/remove.
      
      * inspector/InspectorProfilerAgent.cpp:
      (WebCore::InspectorProfilerAgent::removeProfile): Remove needless
      calls to contains.
      
      * loader/DocumentLoader.cpp:
      (WebCore::DocumentLoader::removeSubresourceLoader): Use the return
      value from remove instead of find/remove.
      
      * loader/ResourceLoadScheduler.cpp:
      (WebCore::ResourceLoadScheduler::HostInformation::remove): Use the
      return value from remove to avoid hashing twice.
      
      * loader/appcache/ApplicationCacheGroup.cpp:
      (WebCore::ApplicationCacheGroup::disassociateDocumentLoader): Use
      remove instead of find/remove.
      (WebCore::ApplicationCacheGroup::cacheDestroyed): Removed a needless
      call to contains to avoid hashing twice. It's fine to do the check
      for an empty hash table unconditionally.
      
      * page/DOMWindow.cpp:
      (WebCore::addUnloadEventListener): Eliminated a local variable for clarity.
      (WebCore::removeUnloadEventListener): Ditto. Also use remove instead
      of find/remove.
      (WebCore::removeAllUnloadEventListeners): Ditto. Also use removeAll instead
      of find/removeAll.
      (WebCore::addBeforeUnloadEventListener): Ditto.
      (WebCore::removeBeforeUnloadEventListener): Ditto.
      (WebCore::removeAllBeforeUnloadEventListeners): Ditto.
      
      * page/FrameView.cpp:
      (WebCore::FrameView::removeViewportConstrainedObject): Use the return
      value from remove to avoid hashing twice.
      (WebCore::FrameView::removeScrollableArea): Use the return value from
      remove instead of find/remove.
      (WebCore::FrameView::containsScrollableArea): Use && instead of an if
      statement in a way that is idiomatic for this kind of function.
      
      * page/Page.cpp:
      (WebCore::Page::addRelevantRepaintedObject): Use the return value from
      remove instead of find/remove.
      
      * page/PageGroup.cpp:
      (WebCore::PageGroup::removeUserScriptsFromWorld): Use remove instead
      of find/remove.
      (WebCore::PageGroup::removeUserStyleSheetsFromWorld): Use the return
      value from remove instead of find/remove.
      
      * page/PerformanceUserTiming.cpp:
      (WebCore::clearPeformanceEntries): Removed a needless call to contains.
      
      * platform/graphics/DisplayRefreshMonitor.cpp:
      (WebCore::DisplayRefreshMonitor::removeClient): Use the return value
      from remove instead of find/remove.
      (WebCore::DisplayRefreshMonitorManager::displayDidRefresh): Use remove
      instead of find/remove.
      
      * platform/graphics/blackberry/LayerRenderer.cpp:
      (WebCore::LayerRenderer::removeLayer): Use the return value from remove
      instead of find/remove.
      
      * platform/win/WindowMessageBroadcaster.cpp:
      (WebCore::WindowMessageBroadcaster::removeListener): Use remove instead
      of find/remove. It's fine to do the check for an empty hash table unconditionally.
      
      * plugins/PluginDatabase.cpp:
      (WebCore::PluginDatabase::removeDisabledPluginFile): Use the return value
      from remove instead of find/remove.
      
      * rendering/style/StyleCustomFilterProgramCache.cpp:
      (WebCore::StyleCustomFilterProgramCache::lookup): Use get instead of find.
      (WebCore::StyleCustomFilterProgramCache::add): Use contains instead of find
      in an assertion.
      (WebCore::StyleCustomFilterProgramCache::remove): Use remove instead of
      find/remove.
      
      * svg/SVGCursorElement.cpp:
      (WebCore::SVGCursorElement::removeClient): Use the return value from remove
      instead of find/remove.
      
      * svg/SVGDocumentExtensions.cpp:
      (WebCore::SVGDocumentExtensions::removeResource): Removed an unneeded call
      to contains.
      (WebCore::SVGDocumentExtensions::removeAllTargetReferencesForElement): Use
      remove instead of find/remove. It's fine to do the check for an empty hash
      table unconditionally.
      (WebCore::SVGDocumentExtensions::removeAllElementReferencesForTarget): Use
      remove instead of find/remove. Also removed unhelpful assertions. One is
      already done by HashMap, and the other is just checking a basic invariant
      of every HashMap that doesn't need to be checked.
      
      * svg/graphics/SVGImageCache.cpp:
      (WebCore::SVGImageCache::removeClientFromCache): Removed an unneeded call
      to contains.
      
      * svg/properties/SVGAnimatedProperty.cpp:
      (WebCore::SVGAnimatedProperty::~SVGAnimatedProperty): Use the version of
      remove that takes an iterator rather than the one that takes a key, so
      we don't need to redo the hashing.
      
      Source/WebKit2:
      
      * Platform/CoreIPC/Connection.cpp:
      (CoreIPC::Connection::waitForMessage): Use take instead of find/remove.
      
      * UIProcess/WebPreferences.cpp:
      (WebKit::WebPreferences::removePageGroup): Use the return value from remove
      instead of find/remove.
      
      * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
      (WebKit::GeolocationPermissionRequestManager::cancelRequestForGeolocation):
      (WebKit::GeolocationPermissionRequestManager::didReceiveGeolocationPermissionDecision):
      Use take instead of find/remove.
      
      * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
      (WebKit::NetscapePlugin::frameDidFinishLoading): Use take instead of find/remove.
      (WebKit::NetscapePlugin::frameDidFail): Use take instead of find/remove.
      
      * WebProcess/WebPage/WebBackForwardListProxy.cpp:
      (WebKit::WebBackForwardListProxy::removeItem): Use take instead of find/remove.
      
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::didFinishCheckingText): Use take instead of get/remove so we
      hash only once.
      (WebKit::WebPage::didCancelCheckingText): Ditto.
      (WebKit::WebPage::stopExtendingIncrementalRenderingSuppression): Use the return
      value from remove instead of contains/remove so we hash only once.
      
      Source/WTF:
      
      Double hashing is common in code that needs to combine a remove with some
      action to only be done if the code is removed. The only way to avoid it is
      to write code using find and a hash table iterator. To help with this, add
      a boolean return value to remove functions to indicate if anything was removed.
      
      Double hashing also happens in code that does a get followed by a remove.
      The take function is helpful in this case. To help with this, add a takeFirst
      funciton to ListHashSet.
      
      * wtf/HashCountedSet.h:
      (WTF::HashCountedSet::removeAll): Added a boolean return value, analogous to the one
      that the HashCountedSet::remove function already has.
      
      * wtf/HashMap.h:
      (WTF::HashMap::remove): Added a boolean return value, true if something was removed.
      * wtf/HashSet.h:
      (WTF::HashSet::remove): Ditto.
      * wtf/RefPtrHashMap.h:
      (WTF::RefPtrHashMap::remove): Ditto.
      
      * wtf/ListHashSet.h:
      (WTF::ListHashSet::takeFirst): Added.
      (WTF::ListHashSet::takeLast): Added.
      (WTF::ListHashSet::remove): Added a boolean return value, true if something was removed.
      
      * wtf/WTFThreadData.h:
      (JSC::IdentifierTable::remove): Use the new remove return value to get rid of most of
      the code in this function.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154967 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      78bf2d4c
  11. 27 Aug, 2013 1 commit
  12. 25 Aug, 2013 1 commit
    • darin@apple.com's avatar
      Frame::tree should return a reference instead of a pointer · fed4d16e
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120259
      
      Reviewed by Andreas Kling.
      
      Source/WebCore:
      
      * page/Frame.h:
      (WebCore::Frame::tree): Return a reference instead of a pointer.
      
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::childFrameGetter):
      (WebCore::indexGetter):
      (WebCore::JSDOMWindow::getOwnPropertySlot):
      (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
      (WebCore::JSDOMWindow::setLocation):
      * bindings/js/PageScriptDebugServer.cpp:
      (WebCore::PageScriptDebugServer::setJavaScriptPaused):
      * dom/Document.cpp:
      (WebCore::canAccessAncestor):
      (WebCore::Document::adoptNode):
      (WebCore::Document::canNavigate):
      (WebCore::Document::findUnsafeParentScrollPropagationBoundary):
      (WebCore::Document::notifySeamlessChildDocumentsOfStylesheetUpdate):
      (WebCore::Document::openSearchDescriptionURL):
      (WebCore::Document::setDesignMode):
      (WebCore::Document::parentDocument):
      (WebCore::Document::initSecurityContext):
      (WebCore::Document::initContentSecurityPolicy):
      (WebCore::Document::requestFullScreenForElement):
      (WebCore::Document::webkitExitFullscreen):
      (WebCore::Document::didRemoveTouchEventHandler):
      * dom/TreeScope.cpp:
      (WebCore::focusedFrameOwnerElement):
      * editing/FrameSelection.cpp:
      (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected):
      * history/CachedFrame.cpp:
      (WebCore::CachedFrameBase::CachedFrameBase):
      (WebCore::CachedFrameBase::restore):
      (WebCore::CachedFrame::CachedFrame):
      * history/CachedPage.cpp:
      (WebCore::CachedPage::restore):
      * history/PageCache.cpp:
      (WebCore::logCanCacheFrameDecision):
      (WebCore::PageCache::canCachePageContainingThisFrame):
      * html/HTMLDocument.cpp:
      (WebCore::HTMLDocument::hasFocus):
      * html/HTMLPlugInImageElement.cpp:
      (WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):
      * inspector/InspectorApplicationCacheAgent.cpp:
      (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
      * inspector/InspectorCanvasAgent.cpp:
      (WebCore::InspectorCanvasAgent::findFramesWithUninstrumentedCanvases):
      (WebCore::InspectorCanvasAgent::frameNavigated):
      * inspector/InspectorDOMAgent.cpp:
      (WebCore::InspectorDOMAgent::documents):
      * inspector/InspectorFileSystemAgent.cpp:
      (WebCore::InspectorFileSystemAgent::assertScriptExecutionContextForOrigin):
      * inspector/InspectorPageAgent.cpp:
      (WebCore::InspectorPageAgent::getCookies):
      (WebCore::InspectorPageAgent::deleteCookie):
      (WebCore::InspectorPageAgent::searchInResources):
      (WebCore::InspectorPageAgent::findFrameWithSecurityOrigin):
      (WebCore::InspectorPageAgent::buildObjectForFrame):
      (WebCore::InspectorPageAgent::buildObjectForFrameTree):
      * inspector/PageRuntimeAgent.cpp:
      (WebCore::PageRuntimeAgent::reportExecutionContextCreation):
      * loader/DocumentLoader.cpp:
      (WebCore::DocumentLoader::willSendRequest):
      (WebCore::DocumentLoader::mainResource):
      * loader/DocumentWriter.cpp:
      (WebCore::DocumentWriter::createDecoderIfNeeded):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::submitForm):
      (WebCore::FrameLoader::allChildrenAreComplete):
      (WebCore::FrameLoader::allAncestorsAreComplete):
      (WebCore::FrameLoader::loadURLIntoChildFrame):
      (WebCore::FrameLoader::outgoingReferrer):
      (WebCore::FrameLoader::updateFirstPartyForCookies):
      (WebCore::FrameLoader::setFirstPartyForCookies):
      (WebCore::FrameLoader::completed):
      (WebCore::FrameLoader::started):
      (WebCore::FrameLoader::loadURL):
      (WebCore::FrameLoader::loadWithDocumentLoader):
      (WebCore::FrameLoader::stopAllLoaders):
      (WebCore::FrameLoader::commitProvisionalLoad):
      (WebCore::FrameLoader::closeOldDataSources):
      (WebCore::FrameLoader::prepareForCachedPageRestore):
      (WebCore::FrameLoader::subframeIsLoading):
      (WebCore::FrameLoader::subresourceCachePolicy):
      (WebCore::FrameLoader::detachChildren):
      (WebCore::FrameLoader::closeAndRemoveChild):
      (WebCore::FrameLoader::checkLoadComplete):
      (WebCore::FrameLoader::numPendingOrLoadingRequests):
      (WebCore::FrameLoader::detachFromParent):
      (WebCore::FrameLoader::shouldClose):
      (WebCore::FrameLoader::handleBeforeUnloadEvent):
      (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
      (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
      (WebCore::FrameLoader::findFrameForNavigation):
      (WebCore::FrameLoader::effectiveSandboxFlags):
      (WebCore::createWindow):
      * loader/HistoryController.cpp:
      (WebCore::HistoryController::saveDocumentState):
      (WebCore::HistoryController::saveDocumentAndScrollState):
      (WebCore::HistoryController::restoreDocumentState):
      (WebCore::HistoryController::goToItem):
      (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
      (WebCore::HistoryController::recursiveUpdateForCommit):
      (WebCore::HistoryController::recursiveUpdateForSameDocumentNavigation):
      (WebCore::HistoryController::initializeItem):
      (WebCore::HistoryController::createItemTree):
      (WebCore::HistoryController::recursiveSetProvisionalItem):
      (WebCore::HistoryController::recursiveGoToItem):
      (WebCore::HistoryController::currentFramesMatchItem):
      * loader/NavigationScheduler.cpp:
      (WebCore::NavigationScheduler::mustLockBackForwardList):
      (WebCore::NavigationScheduler::scheduleFormSubmission):
      * loader/ProgressTracker.cpp:
      (WebCore::ProgressTracker::progressStarted):
      (WebCore::ProgressTracker::progressCompleted):
      (WebCore::ProgressTracker::isMainLoadProgressing):
      * loader/appcache/ApplicationCacheGroup.cpp:
      (WebCore::ApplicationCacheGroup::selectCache):
      (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
      * loader/archive/cf/LegacyWebArchive.cpp:
      (WebCore::LegacyWebArchive::create):
      * loader/cache/CachedResourceLoader.cpp:
      (WebCore::CachedResourceLoader::checkInsecureContent):
      * loader/icon/IconController.cpp:
      (WebCore::IconController::urlsForTypes):
      (WebCore::IconController::startLoader):
      * page/Chrome.cpp:
      (WebCore::canRunModalIfDuringPageDismissal):
      (WebCore::Chrome::windowScreenDidChange):
      * page/DOMWindow.cpp:
      (WebCore::DOMWindow::length):
      (WebCore::DOMWindow::name):
      (WebCore::DOMWindow::setName):
      (WebCore::DOMWindow::parent):
      (WebCore::DOMWindow::top):
      (WebCore::DOMWindow::open):
      * page/EventHandler.cpp:
      (WebCore::EventHandler::scrollRecursively):
      (WebCore::EventHandler::logicalScrollRecursively):
      (WebCore::EventHandler::handleMouseMoveEvent):
      * page/FocusController.cpp:
      (WebCore::FocusController::setContainingWindowIsVisible):
      * page/Frame.cpp:
      (WebCore::parentPageZoomFactor):
      (WebCore::parentTextZoomFactor):
      (WebCore::Frame::setPrinting):
      (WebCore::Frame::shouldUsePrintingLayout):
      (WebCore::Frame::dispatchVisibilityStateChangeEvent):
      (WebCore::Frame::willDetachPage):
      (WebCore::Frame::setPageAndTextZoomFactors):
      (WebCore::Frame::deviceOrPageScaleFactorChanged):
      (WebCore::Frame::notifyChromeClientWheelEventHandlerCountChanged):
      (WebCore::Frame::isURLAllowed):
      * page/FrameTree.cpp:
      (WebCore::FrameTree::~FrameTree):
      (WebCore::FrameTree::setName):
      (WebCore::FrameTree::transferChild):
      (WebCore::FrameTree::appendChild):
      (WebCore::FrameTree::actuallyAppendChild):
      (WebCore::FrameTree::removeChild):
      (WebCore::FrameTree::uniqueChildName):
      (WebCore::FrameTree::scopedChild):
      (WebCore::FrameTree::scopedChildCount):
      (WebCore::FrameTree::childCount):
      (WebCore::FrameTree::child):
      (WebCore::FrameTree::find):
      (WebCore::FrameTree::isDescendantOf):
      (WebCore::FrameTree::traverseNext):
      (WebCore::FrameTree::traversePreviousWithWrap):
      (WebCore::FrameTree::deepLastChild):
      (WebCore::FrameTree::top):
      (printFrames):
      (showFrameTree):
      * page/FrameView.cpp:
      (WebCore::FrameView::setFrameRect):
      (WebCore::FrameView::hasCompositedContentIncludingDescendants):
      (WebCore::FrameView::hasCompositingAncestor):
      (WebCore::FrameView::flushCompositingStateIncludingSubframes):
      (WebCore::FrameView::updateCanBlitOnScrollRecursively):
      (WebCore::FrameView::setIsOverlapped):
      (WebCore::FrameView::shouldUseLoadTimeDeferredRepaintDelay):
      (WebCore::FrameView::updateLayerFlushThrottlingInAllFrames):
      (WebCore::FrameView::serviceScriptedAnimations):
      (WebCore::FrameView::updateBackgroundRecursively):
      (WebCore::FrameView::parentFrameView):
      (WebCore::FrameView::paintContentsForSnapshot):
      (WebCore::FrameView::setTracksRepaints):
      (WebCore::FrameView::notifyWidgetsInAllFrames):
      * page/Location.cpp:
      (WebCore::Location::ancestorOrigins):
      * page/Page.cpp:
      (WebCore::networkStateChanged):
      (WebCore::Page::~Page):
      (WebCore::Page::renderTreeSize):
      (WebCore::Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment):
      (WebCore::Page::setNeedsRecalcStyleInAllFrames):
      (WebCore::Page::refreshPlugins):
      (WebCore::Page::takeAnyMediaCanStartListener):
      (WebCore::incrementFrame):
      (WebCore::Page::setDefersLoading):
      (WebCore::Page::setMediaVolume):
      (WebCore::Page::setDeviceScaleFactor):
      (WebCore::Page::setShouldSuppressScrollbarAnimations):
      (WebCore::Page::didMoveOnscreen):
      (WebCore::Page::willMoveOffscreen):
      (WebCore::Page::setIsInWindow):
      (WebCore::Page::suspendScriptedAnimations):
      (WebCore::Page::resumeScriptedAnimations):
      (WebCore::Page::userStyleSheetLocationChanged):
      (WebCore::Page::allVisitedStateChanged):
      (WebCore::Page::visitedStateChanged):
      (WebCore::Page::setDebugger):
      (WebCore::Page::setMemoryCacheClientCallsEnabled):
      (WebCore::Page::setMinimumTimerInterval):
      (WebCore::Page::setTimerAlignmentInterval):
      (WebCore::Page::dnsPrefetchingStateChanged):
      (WebCore::Page::collectPluginViews):
      (WebCore::Page::storageBlockingStateChanged):
      (WebCore::Page::privateBrowsingStateChanged):
      (WebCore::Page::checkSubframeCountConsistency):
      (WebCore::Page::suspendActiveDOMObjectsAndAnimations):
      (WebCore::Page::resumeActiveDOMObjectsAndAnimations):
      (WebCore::Page::captionPreferencesChanged):
      * page/PageGroup.cpp:
      (WebCore::PageGroup::invalidateInjectedStyleSheetCacheInAllFrames):
      * page/PageGroupLoadDeferrer.cpp:
      (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
      (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
      * page/PageSerializer.cpp:
      (WebCore::PageSerializer::serializeFrame):
      * page/PageThrottler.cpp:
      (WebCore::PageThrottler::throttlePage):
      (WebCore::PageThrottler::unthrottlePage):
      * page/Settings.cpp:
      (WebCore::setImageLoadingSettings):
      (WebCore::Settings::setTextAutosizingFontScaleFactor):
      * page/SpatialNavigation.cpp:
      (WebCore::rectToAbsoluteCoordinates):
      * page/animation/AnimationController.cpp:
      (WebCore::AnimationControllerPrivate::suspendAnimations):
      (WebCore::AnimationControllerPrivate::resumeAnimations):
      * page/mac/PageMac.cpp:
      (WebCore::Page::addSchedulePair):
      (WebCore::Page::removeSchedulePair):
      * page/scrolling/ScrollingCoordinator.cpp:
      (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
      (WebCore::ScrollingCoordinator::computeCurrentWheelEventHandlerCount):
      * plugins/PluginView.cpp:
      (WebCore::PluginView::performRequest):
      (WebCore::PluginView::load):
      * rendering/HitTestResult.cpp:
      (WebCore::HitTestResult::targetFrame):
      * rendering/RenderLayerCompositor.cpp:
      (WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers):
      (WebCore::RenderLayerCompositor::updateCompositingLayers):
      (WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange):
      * rendering/TextAutosizer.cpp:
      (WebCore::TextAutosizer::processSubtree):
      * storage/StorageEventDispatcher.cpp:
      (WebCore::StorageEventDispatcher::dispatchSessionStorageEvents):
      (WebCore::StorageEventDispatcher::dispatchLocalStorageEvents):
      * svg/SVGSVGElement.cpp:
      (WebCore::SVGSVGElement::currentScale):
      (WebCore::SVGSVGElement::setCurrentScale):
      * testing/Internals.cpp:
      (WebCore::Internals::formControlStateOfPreviousHistoryItem):
      (WebCore::Internals::setFormControlStateOfPreviousHistoryItem):
      (WebCore::Internals::numberOfScrollableAreas):
      * xml/parser/XMLDocumentParserLibxml2.cpp:
      (WebCore::hasNoStyleInformation):
      Use tree(). instead of tree()->.
      
      Source/WebKit/blackberry:
      
      * Api/WebPage.cpp:
      (BlackBerry::WebKit::closeURLRecursively):
      (BlackBerry::WebKit::enableCrossSiteXHRRecursively):
      (BlackBerry::WebKit::WebPagePrivate::setScreenOrientation):
      * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
      (WebCore::FrameLoaderClientBlackBerry::createFrame):
      * WebKitSupport/DOMSupport.cpp:
      (BlackBerry::WebKit::DOMSupport::convertPointToFrame):
      (BlackBerry::WebKit::DOMSupport::incrementFrame):
      Use tree(). instead of tree()->.
      
      Source/WebKit/efl:
      
      * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
      (DumpRenderTreeSupportEfl::clearFrameName):
      (DumpRenderTreeSupportEfl::frameChildren):
      (DumpRenderTreeSupportEfl::frameParent):
      * ewk/ewk_frame.cpp:
      (_ewk_frame_children_iterator_next):
      (ewk_frame_child_find):
      (ewk_frame_name_get):
      (ewk_frame_child_add):
      * ewk/ewk_view.cpp:
      (ewk_view_frame_create):
      Use tree(). instead of tree()->.
      
      Source/WebKit/gtk:
      
      * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
      (DumpRenderTreeSupportGtk::getFrameChildren):
      (DumpRenderTreeSupportGtk::clearMainFrameName):
      * WebCoreSupport/FrameLoaderClientGtk.cpp:
      (WebKit::FrameLoaderClient::createFrame):
      * webkit/webkitwebframe.cpp:
      (webkit_web_frame_get_name):
      (webkit_web_frame_get_parent):
      (webkit_web_frame_find_frame):
      * webkit/webkitwebview.cpp:
      (webkit_web_view_set_highlight_text_matches):
      Use tree(). instead of tree()->.
      
      Source/WebKit/mac:
      
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::performRequest):
      * Plugins/WebBaseNetscapePluginView.mm:
      (-[WebBaseNetscapePluginView resolvedURLStringForURL:target:]):
      * Plugins/WebNetscapePluginView.mm:
      (-[WebNetscapePluginView loadPluginRequest:]):
      * WebCoreSupport/WebFrameLoaderClient.mm:
      (applyAppleDictionaryApplicationQuirkNonInlinePart):
      (WebFrameLoaderClient::prepareForDataSourceReplacement):
      (WebFrameLoaderClient::createFrame):
      * WebView/WebFrame.mm:
      (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]):
      (-[WebFrame _updateBackgroundAndUpdatesWhileOffscreen]):
      (-[WebFrame _unmarkAllBadGrammar]):
      (-[WebFrame _unmarkAllMisspellings]):
      (-[WebFrame _atMostOneFrameHasSelection]):
      (-[WebFrame _findFrameWithSelection]):
      (-[WebFrame _drawRect:contentsOnly:]):
      (-[WebFrame _isDescendantOfFrame:]):
      (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
      (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
      (-[WebFrame name]):
      (-[WebFrame findFrameNamed:]):
      (-[WebFrame parentFrame]):
      (-[WebFrame childFrames]):
      * WebView/WebView.mm:
      (-[WebView _attachScriptDebuggerToAllFrames]):
      (-[WebView _detachScriptDebuggerFromAllFrames]):
      (-[WebView _clearMainFrameName]):
      (-[WebView _isUsingAcceleratedCompositing]):
      (-[WebView _isSoftwareRenderable]):
      (-[WebView setHostWindow:]):
      (incrementFrame):
      Use tree(). instead of tree()->.
      
      Source/WebKit/qt:
      
      * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
      (DumpRenderTreeSupportQt::clearFrameName):
      * WebCoreSupport/FrameLoaderClientQt.cpp:
      (drtDescriptionSuitableForTestResult):
      (WebCore::FrameLoaderClientQt::dispatchDidCommitLoad):
      (WebCore::FrameLoaderClientQt::dispatchDidFinishDocumentLoad):
      (WebCore::FrameLoaderClientQt::postProgressStartedNotification):
      (WebCore::FrameLoaderClientQt::didPerformFirstNavigation):
      (WebCore::FrameLoaderClientQt::createFrame):
      * WebCoreSupport/QWebFrameAdapter.cpp:
      (QWebFrameData::QWebFrameData):
      (QWebFrameAdapter::load):
      (QWebFrameAdapter::uniqueName):
      (QWebFrameAdapter::childFrames):
      * WebCoreSupport/QWebPageAdapter.cpp:
      (QWebPageAdapter::findText):
      Use tree(). instead of tree()->.
      
      Source/WebKit/win:
      
      * WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebFrameLoaderClient::createFrame):
      * WebFrame.cpp:
      (WebFrame::name):
      (WebFrame::findFrameNamed):
      (WebFrame::parentFrame):
      (EnumChildFrames::EnumChildFrames):
      (EnumChildFrames::Next):
      (EnumChildFrames::Skip):
      (EnumChildFrames::Reset):
      (WebFrame::isDescendantOfFrame):
      (WebFrame::unmarkAllMisspellings):
      (WebFrame::unmarkAllBadGrammar):
      * WebView.cpp:
      (WebView::initWithFrame):
      (incrementFrame):
      (WebView::clearMainFrameName):
      Use tree(). instead of tree()->.
      
      Source/WebKit/wince:
      
      * WebView.cpp:
      (WebView::createFrame):
      Use tree(). instead of tree()->.
      
      Source/WebKit2:
      
      * WebProcess/Plugins/PluginView.cpp:
      (WebKit::PluginView::performJavaScriptURLRequest):
      * WebProcess/Storage/StorageAreaMap.cpp:
      (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
      (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebKit::WebFrameLoaderClient::createFrame):
      * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
      (WebKit::WebContextMenuClient::searchWithSpotlight):
      * WebProcess/WebPage/FindController.cpp:
      (WebKit::frameWithSelection):
      (WebKit::FindController::rectsForTextMatches):
      * WebProcess/WebPage/WebFrame.cpp:
      (WebKit::WebFrame::init):
      (WebKit::WebFrame::contentsAsString):
      (WebKit::WebFrame::name):
      (WebKit::WebFrame::childFrames):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::clearMainFrameName):
      (WebKit::WebPage::setDrawsBackground):
      (WebKit::WebPage::setDrawsTransparentBackground):
      (WebKit::WebPage::setWindowResizerSize):
      (WebKit::frameWithSelection):
      (WebKit::WebPage::unmarkAllMisspellings):
      (WebKit::WebPage::unmarkAllBadGrammar):
      (WebKit::pageContainsAnyHorizontalScrollbars):
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
      (WebKit::TiledCoreAnimationDrawingArea::forceRepaint):
      Use tree(). instead of tree()->.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154558 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fed4d16e
  13. 19 Aug, 2013 1 commit
  14. 07 Aug, 2013 1 commit
    • antti@apple.com's avatar
      2.5% regression on page cycler moz · dacb7b8e
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=102822
      
      Source/WebCore: 
      
      Reviewed by Andreas Kling.
      
      DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache() triggers a style recalc for quirks mode
      documents in the beginning of document parsing via Document::setCompatibilityMode. This often coalesces 
      with style recalc triggered by stylesheet loading. However on very simple documents it can generate genuinely
      unnecessary work.
      
      * dom/DocumentStyleSheetCollection.cpp:
      (WebCore::DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache):
              
          Check that we actually have cached injected stylesheets before triggering style recalc.
                  
      * page/PageGroup.cpp:
      (WebCore::PageGroup::addUserStyleSheetToWorld):
      (WebCore::PageGroup::removeUserStyleSheetFromWorld):
      (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
      (WebCore::PageGroup::removeAllUserContent):
              
          Fix a misspelling.
      
      (WebCore::PageGroup::invalidateInjectedStyleSheetCacheInAllFrames):
              
          Always invalidate style when user sheets change since we don't do that in
          DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache anymore.
      
      * page/PageGroup.h:
      
      LayoutTests: 
      
      Reviewed by Andreas Kling.
              
      This is a progression.
      
      * inspector/timeline/timeline-script-tag-1-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153788 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dacb7b8e
  15. 26 Jun, 2013 1 commit
  16. 17 May, 2013 1 commit
    • akling@apple.com's avatar
      Page::chrome() should return a reference. · bd774814
      akling@apple.com authored
      <http://webkit.org/b/116185>
      
      Source/WebCore:
      
      Reviewed by Anders Carlsson.
      
      A Page's chrome() can never be null. Change Page::chrome() to return a reference to reflect this.
      Also, make Page::m_chrome a const member variable so nobody will accidentally set it to null.
      
      Source/WebKit/blackberry:
      
      Reviewed by Anders Carlsson.
      
      Source/WebKit/efl:
      
      Reviewed by Anders Carlsson.
      
      Source/WebKit/gtk:
      
      Reviewed by Anders Carlsson.
      
      Source/WebKit/mac:
      
      Reviewed by Anders Carlsson.
      
      Source/WebKit/qt:
      
      Reviewed by Anders Carlsson.
      
      Source/WebKit/win:
      
      Reviewed by Anders Carlsson.
      
      Source/WebKit2:
      
      Reviewed by Anders Carlsson.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150214 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bd774814
  17. 09 May, 2013 1 commit
    • andersca@apple.com's avatar
      Add a StorageStrategy hook for creating transient local storage namespaces · 668179f9
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=115870
      
      Reviewed by Geoffrey Garen.
      
      * WebCore.exp.in:
      Export symbol needed by WebKit2.
      
      * dom/Document.cpp:
      (WebCore::Document::topOrigin):
      * dom/Document.h:
      * dom/ScriptExecutionContext.h:
      * workers/WorkerContext.h:
      Remove const qualifier from topOrigin() to avoid ugly const_casts when assigning into a RefPtr<SecurityOrigin> variable.
      
      * page/PageGroup.cpp:
      (WebCore::PageGroup::transientLocalStorage):
      Do a single hash lookup instead of three and use the SecurityOrigin itself as the hash key instead of a string representation of it.
      
      * page/PageGroup.h:
      Update HashMap declaration.
      
      * storage/StorageNamespace.cpp:
      (WebCore::StorageNamespace::transientLocalStorageNamespace):
      Add new implementation that will optionally call out to the storage strategy.
      
      * storage/StorageNamespaceImpl.cpp:
      (WebCore::StorageNamespaceImpl::transientLocalStorageNamespace):
      Move the default implementation here from PageGroup.
      
      * storage/StorageStrategy.cpp:
      (WebCore::StorageStrategy::transientLocalStorageNamespace):
      Call the default implementation.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149840 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      668179f9
  18. 07 May, 2013 1 commit
    • mikhail.pozdnyakov@intel.com's avatar
      HashTraits<RefPtr<P> >::PeekType should be raw pointer for better performance · 7e3c2cf0
      mikhail.pozdnyakov@intel.com authored
      https://bugs.webkit.org/show_bug.cgi?id=115646
      
      Reviewed by Darin Adler.
      
      Source/JavaScriptCore:
      
      * bytecompiler/StaticPropertyAnalyzer.h:
      (JSC::StaticPropertyAnalyzer::putById):
          Updated accordingly to new HashMap<.., RefPtr>::get() semantics.
      
      Source/WebCore:
      
      No new tests, no new functionality.
      
      * accessibility/AXObjectCache.cpp:
      (WebCore::AXObjectCache::get):
      (WebCore::AXObjectCache::remove):
      * accessibility/AXObjectCache.h:
      (WebCore::AXObjectCache::objectFromAXID):
      * css/CSSImageGeneratorValue.cpp:
      (WebCore::CSSImageGeneratorValue::getImage):
      * css/InspectorCSSOMWrappers.cpp:
      (WebCore::InspectorCSSOMWrappers::getWrapperForRuleInSheets):
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::loadPendingSVGDocuments):
      * html/HTMLAnchorElement.cpp:
      (WebCore::HTMLAnchorElement::rootEditableElementForSelectionOnMouseDown):
      * html/HTMLFormElement.cpp:
      (WebCore::HTMLFormElement::elementForAlias):
      * html/shadow/ContentDistributor.cpp:
      (WebCore::ContentDistributor::findInsertionPointFor):
      * loader/appcache/ApplicationCache.cpp:
      (WebCore::ApplicationCache::resourceForURL):
      * loader/archive/ArchiveResourceCollection.cpp:
      (WebCore::ArchiveResourceCollection::archiveResourceForURL):
      * page/PageGroup.cpp:
      (WebCore::PageGroup::transientLocalStorage):
      * page/animation/CompositeAnimation.cpp:
      (WebCore::CompositeAnimation::updateTransitions):
      (WebCore::CompositeAnimation::pauseTransitionAtTime):
      * platform/graphics/ca/GraphicsLayerCA.cpp:
      (WebCore::GraphicsLayerCA::updateMaskLayer):
      * platform/network/BlobRegistryImpl.cpp:
      (WebCore::BlobRegistryImpl::getBlobDataFromURL):
      * plugins/PluginDatabase.cpp:
      (WebCore::PluginDatabase::pluginForMIMEType):
      (WebCore::PluginDatabase::MIMETypeForExtension):
      * rendering/RenderCounter.cpp:
      (WebCore::makeCounterNode):
      (showCounterRendererTree):
      * svg/graphics/filters/SVGFilterBuilder.cpp:
      (WebCore::SVGFilterBuilder::getEffectById):
          Updated accordingly to new HashMap<.., RefPtr>::get() semantics.
      
      Source/WebKit/mac:
      
      * Plugins/Hosted/NetscapePluginHostProxy.mm:
      (WebKit::NetscapePluginHostProxy::pluginInstance):
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::cancelStreamLoad):
          Updated accordingly to new HashMap<.., RefPtr>::get() semantics.
      
      Source/WebKit2:
      
      * NetworkProcess/NetworkConnectionToWebProcess.cpp:
      (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
      * NetworkProcess/NetworkResourceLoadScheduler.cpp:
      (WebKit::NetworkResourceLoadScheduler::hostForURL):
      * Shared/ImmutableDictionary.h:
      (WebKit::ImmutableDictionary::get):
      * UIProcess/Storage/StorageManager.cpp:
      (WebKit::StorageManager::createSessionStorageMap):
      (WebKit::StorageManager::cloneSessionStorageNamespaceInternal):
      (WebKit::StorageManager::findStorageArea):
      * UIProcess/WebContext.h:
      (WebKit::WebContext::supplement):
      * UIProcess/WebProcessProxy.cpp:
      (WebKit::WebProcessProxy::webBackForwardItem):
      (WebKit::WebProcessProxy::webFrame):
      * UIProcess/efl/DownloadManagerEfl.cpp:
      (WebKit::DownloadManagerEfl::ewkDownloadJob):
      * WebProcess/Network/WebResourceLoadScheduler.h:
      (WebKit::WebResourceLoadScheduler::webResourceLoaderForIdentifier):
      * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
      (WebKit::NetscapePlugin::streamFromID):
      * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
      (WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
      * WebProcess/Plugins/PluginView.cpp:
      (WebKit::PluginView::cancelStreamLoad):
      * WebProcess/WebPage/EventDispatcher.cpp:
      (WebKit::EventDispatcher::wheelEvent):
      * WebProcess/WebPage/WebBackForwardListProxy.cpp:
      (WebKit::WebBackForwardListProxy::itemForID):
      (WebKit::WebBackForwardListProxy::itemAtIndex):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::webUndoStep):
      (WebKit::WebPage::didFinishCheckingText):
      (WebKit::WebPage::didCancelCheckingText):
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::webPage):
      (WebKit::WebProcess::webPageGroup):
          Updated accordingly to new HashMap<.., RefPtr>::get() semantics.
      
      Source/WTF:
      
      HashTraits<RefPtr<P> >::PeekType should be raw pointer so that we
      can obviate multiple RefPtr copying when invoking HashMap<.., RefPtr>::get()
      method.
      
      * wtf/HashTraits.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149665 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7e3c2cf0
  19. 29 Apr, 2013 1 commit
    • jpfau@apple.com's avatar
      Change approach to third-party blocking for LocalStorage · 6093191a
      jpfau@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=115004
      
      Reviewed by Maciej Stachowiak.
      
      Source/WebCore:
      
      Instead of outright blocking LocalStorage that's used in a third-party
      context, silently partition it based on the origin of the top context.
      These partitions are then discarded when the page group is unloaded.
      
      No new tests; modified existing tests to account for changes.
      
      * page/DOMWindow.cpp:
      (WebCore::DOMWindow::localStorage):
      * page/PageGroup.cpp:
      (WebCore::PageGroup::localStorage):
      (WebCore):
      (WebCore::PageGroup::transientLocalStorage):
      * page/PageGroup.h:
      (PageGroup):
      * page/SecurityOrigin.cpp:
      (WebCore::SecurityOrigin::canAccessStorage):
      
      LayoutTests:
      
      * http/tests/security/cross-origin-local-storage-allowed-expected.txt:
      * http/tests/security/cross-origin-local-storage-allowed.html:
      * http/tests/security/cross-origin-local-storage-expected.txt:
      * http/tests/security/cross-origin-local-storage-wk1.html:
      * http/tests/security/cross-origin-local-storage-wk1-expected.txt:
      * http/tests/security/cross-origin-local-storage.html:
      * http/tests/security/resources/cross-origin-iframe-for-local-storage.html:
      * http/tests/security/resources/load-local-storage.html: Added.
      * platform/mac-wk2/http/tests/security/cross-origin-local-storage-wk1-expected.txt:
      * platform/mac/http/tests/security/cross-origin-local-storage-wk1-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149326 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6093191a
  20. 18 Apr, 2013 1 commit
    • andersca@apple.com's avatar
      Change storage factory functions to take a PageGroup and Page respectively · e44d33f5
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114776
      
      Reviewed by Beth Dakin.
      
      Source/WebCore:
      
      Change StorageNamespace::localStorageNamespace to take a PageGroup since WebKit2 needs
      to know which local storage namespace belongs to which page group. Also remove the quota parameter from
      the sessionStorageNamespace function since that's trivial to get from the Page.
      
      * WebCore.exp.in:
      * page/Page.cpp:
      (WebCore::Page::sessionStorage):
      * page/PageGroup.cpp:
      (WebCore::PageGroup::localStorage):
      * storage/StorageNamespace.cpp:
      (WebCore::StorageNamespace::localStorageNamespace):
      (WebCore::StorageNamespace::sessionStorageNamespace):
      * storage/StorageNamespace.h:
      * storage/StorageNamespaceImpl.cpp:
      (WebCore::StorageNamespaceImpl::localStorageNamespace):
      (WebCore::StorageNamespaceImpl::sessionStorageNamespace):
      * storage/StorageNamespaceImpl.h:
      * storage/StorageStrategy.cpp:
      (WebCore::StorageStrategy::localStorageNamespace):
      (WebCore::StorageStrategy::sessionStorageNamespace):
      * storage/StorageStrategy.h:
      
      Source/WebKit2:
      
      Update for WebCore changes.
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::localStorageNamespace):
      (WebKit::WebPlatformStrategies::sessionStorageNamespace):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148683 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e44d33f5
  21. 14 Apr, 2013 1 commit
    • weinig@apple.com's avatar
      Make Frame's ScriptController an OwnPtr and remove the #include · 123e4aae
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114105
      
      Reviewed by Dean Jackson.
      
      Source/WebCore: 
      
      * Modules/websockets/WebSocket.cpp:
      * bindings/generic/BindingSecurity.cpp:
      * bindings/js/JSEventListener.cpp:
      * bindings/js/JSLazyEventListener.cpp:
      * bindings/js/PageScriptDebugServer.cpp:
      * bindings/js/ScriptEventListener.cpp:
      * bindings/js/ScriptState.cpp:
      * bindings/objc/DOM.mm:
      * bindings/objc/DOMAbstractView.mm:
      * bindings/objc/DOMInternal.mm:
      * dom/DocumentStyleSheetCollection.cpp:
      * dom/EventTarget.cpp:
      * dom/ScriptElement.cpp:
      * history/CachedFrame.cpp:
      * html/HTMLCanvasElement.cpp:
      * html/HTMLDocument.cpp:
      * html/HTMLElement.cpp:
      * html/HTMLFormElement.cpp:
      * html/HTMLPlugInElement.cpp:
      * html/HTMLPlugInImageElement.cpp:
      * html/parser/HTMLParserOptions.cpp:
      * inspector/InspectorAgent.cpp:
      * inspector/InspectorController.cpp:
      * inspector/InspectorFrontendClientLocal.cpp:
      * inspector/InspectorFrontendHost.cpp:
      * inspector/InspectorInstrumentation.cpp:
      * inspector/InspectorOverlay.cpp:
      * inspector/InspectorPageAgent.cpp:
      * inspector/PageRuntimeAgent.cpp:
      * loader/DocumentWriter.cpp:
      * loader/NavigationScheduler.cpp:
      * loader/SubframeLoader.cpp:
      * loader/cache/CachedResourceLoader.cpp:
      * page/DOMWindow.cpp:
      * page/EventSource.cpp:
      * page/Frame.cpp:
      * page/Frame.h:
      * page/Navigator.cpp:
      * page/Page.cpp:
      * page/PageGroup.cpp:
      * xml/XMLHttpRequest.cpp:
      * xml/XMLTreeViewer.cpp:
      
      Source/WebKit/mac: 
      
      * Plugins/Hosted/HostedNetscapePluginStream.mm:
      * Plugins/WebNetscapePluginStream.mm:
      * Plugins/WebPluginContainerCheck.mm:
      * WebCoreSupport/WebGeolocationClient.mm:
      * WebCoreSupport/WebInspectorClient.mm:
      * WebView/WebFrame.mm:
      
      Source/WebKit2: 
      
      * Shared/WebHitTestResult.cpp:
      * Shared/WebHitTestResult.h:
      * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
      * UIProcess/WebContext.h:
      * UIProcess/WebPageProxy.h:
      * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
      * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
      * WebProcess/Plugins/Netscape/NPJSObject.cpp:
      * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
      * WebProcess/Plugins/PDF/PDFPlugin.h:
      * WebProcess/Plugins/PluginView.cpp:
      * WebProcess/Storage/StorageAreaImpl.cpp:
      * WebProcess/Storage/StorageAreaMap.cpp:
      * WebProcess/WebPage/WebFrame.cpp:
      * WebProcess/WebPage/WebPage.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148373 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      123e4aae
  22. 05 Apr, 2013 1 commit
    • rniwa@webkit.org's avatar
      Remove Chromium code from WebCore/page · 70c7d4da
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=114013
      
      Reviewed by Anders Carlsson.
      
      Removed.
      
      * page/Console.cpp:
      (WebCore::Console::time):
      (WebCore::Console::timeEnd):
      * page/EventHandler.cpp:
      (WebCore::shouldGesturesTriggerActive):
      (WebCore::EventHandler::handleMouseReleaseEvent):
      (WebCore):
      (WebCore::EventHandler::sendScrollEventToView):
      * page/FeatureObserver.cpp:
      (WebCore::FeatureObserver::updateMeasurements):
      * page/FrameView.cpp:
      (WebCore::FrameView::layout):
      (WebCore::FrameView::useSlowRepaints):
      * page/PageConsole.cpp:
      * page/PageGroup.cpp:
      (WebCore::PageGroup::isLinkVisited):
      (WebCore::PageGroup::addVisitedLink):
      * page/Settings.cpp:
      (WebCore):
      * page/android: Removed.
      * page/chromium: Removed.
      * page/chromium/ChromeClientChromium.h: Removed.
      * page/chromium/DragControllerChromium.cpp: Removed.
      * page/chromium/EventHandlerChromium.cpp: Removed.
      * page/scrolling/ScrollingCoordinator.cpp:
      (WebCore::ScrollingCoordinator::create):
      (WebCore):
      * page/scrolling/ScrollingCoordinator.h:
      (ScrollingCoordinator):
      * page/scrolling/ScrollingTree.cpp:
      (WebCore):
      * page/scrolling/ScrollingTree.h:
      (ScrollingTree):
      * page/scrolling/chromium: Removed.
      * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp: Removed.
      * page/scrolling/chromium/ScrollingCoordinatorChromium.h: Removed.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      70c7d4da
  23. 14 Mar, 2013 1 commit
    • jer.noble@apple.com's avatar
      Crash in DumpRenderTree at com.apple.WebCore:... · c3419e02
      jer.noble@apple.com authored
      Crash in DumpRenderTree at com.apple.WebCore: WebCore::CaptionUserPreferences::captionPreferencesChanged + 185
      https://bugs.webkit.org/show_bug.cgi?id=112051
      
      Reviewed by Eric Carlson.
      
      No new tests; fixes a crash during media/video-controls-captions-trackmenu.html.
      
      Instead of relying on a registration system which can fail when an element's document does not have a page,
      Elements will register for captionPreferencesChanged() notifications directly with their owning Document.
      CaptionUserPreferences, in turn, will notify all Documents in its PageGroup, rather than only directly
      registered listeners.
      
      * dom/Document.cpp:
      (WebCore::Document::registerForCaptionPreferencesChangedCallbacks): Added. Notify the CaptionUserPreferences that someone
          is interested in captionPreferencesChanged notfications.
      (WebCore::Document::unregisterForCaptionPreferencesChangedCallbacks): Added.
      (WebCore::Document::captionPreferencesChanged): Added. Pass to all registered elements.
      * dom/Document.h:
      * dom/Element.h:
      (WebCore::Element::captionPreferencesChanged): Added. Empty; intended
          to be overridden by subclasses.
      * history/CachedPage.cpp:
      (WebCore::CachedPage::CachedPage): Initialize m_needsCaptionPreferenceChanged member.
      (WebCore::CachedPage::restore): Call captionPreferencesChanged() if necessary.
      * history/CachedPage.h:
      (WebCore::CachedPage::markForCaptionPreferencesChanged): Set the m_needsCaptionPreferenceChanged member.
      * history/PageCache.cpp:
      (WebCore::PageCache::markPagesForCaptionPreferencesChanged): Pass to every CachedPage.
      * history/PageCache.h:
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::HTMLMediaElement): Register with the Document.
      (WebCore::HTMLMediaElement::~HTMLMediaElement): Unregister with same.
      (WebCore::HTMLMediaElement::attach): Remove previous registration call.
      * html/HTMLMediaElement.h:
      * page/CaptionUserPreferences.cpp:
      (WebCore::CaptionUserPreferences::captionPreferencesChanged): Pass to the
          PageGroup.
      * page/CaptionUserPreferences.h:
      (WebCore::CaptionUserPreferences::setInterestedInCaptionPreferenceChanges):
          Empty; intended to be overridden by subclasses.
      * page/CaptionUserPreferencesMac.h:
      * page/CaptionUserPreferencesMac.mm:
      (WebCore::CaptionUserPreferencesMac::setInterestedInCaptionPreferenceChanges):
          Renamed from registerForPreferencesChangedCallbacks().
      (WebCore::CaptionUserPreferencesMac::captionPreferencesChanged):
          Replace call to havePreferenceChangeListeners() with m_listeningForPreferenceChanges.
      * page/Page.cpp:
      (WebCore::Page::captionPreferencesChanged):
          Pass to every contained Document.
      * page/Page.h:
      * page/CaptionUserPreferences.cpp:
      (WebCore::CaptionUserPreferences::captionPreferencesChanged): Pass to the PageGroup.
      * page/CaptionUserPreferences.h:
      * page/PageGroup.cpp:
      (WebCore::PageGroup::captionPreferencesChanged): Pass to every page, as well as pages in the PageCache.
      * page/PageGroup.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145826 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c3419e02
  24. 28 Feb, 2013 3 commits
  25. 20 Feb, 2013 1 commit
  26. 12 Feb, 2013 1 commit
    • eric.carlson@apple.com's avatar
      [Mac] Track language selection should be sticky · b54d1c88
      eric.carlson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=109466
      
      Reviewed by Dean Jackson.
      
      .: 
      
      * Source/autotools/symbols.filter: Export PageGroup::captionPreferences and Page::initGroup.
      
      Source/WebCore: 
      
      Choosing a text track from the caption menu should make that track's language the
      preferred caption language. Turning captions off from the menu should disable captions
      in videos loaded subsequently.
      
      OS X has system support for these settings, so changes made by DRT should not change the
      settings on the user's system. Add support for all other ports in DRT only.
      
      Test: media/track/track-user-preferences.html
      
      * WebCore.exp.in: Export PageGroup::captionPreferences().
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::HTMLMediaElement): Use page()->group().captionPreferences().
      (WebCore::HTMLMediaElement::attach): Ditto.
      (WebCore::HTMLMediaElement::detach): Ditto.
      (WebCore::HTMLMediaElement::userPrefersCaptions): Ditto.
      (WebCore::HTMLMediaElement::configureTextTrackGroup): Ditto. Update for 
          preferredLanguageFromList change.
      (WebCore::HTMLMediaElement::toggleTrackAtIndex): Set user prefs for captions visible and
          caption language as appropriate.
      
      * html/shadow/MediaControlElements.cpp:
      (WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler): Remove unneeded comment.
      (WebCore::MediaControlTextTrackContainerElement::updateSizes):  Use page()->group().captionPreferences().
      
      * html/shadow/MediaControlsApple.cpp:
      (WebCore::MediaControlsApple::closedCaptionTracksChanged): Update caption menu button visibility.
      
      * page/CaptionUserPreferences.h:
      (WebCore::CaptionUserPreferences::userPrefersCaptions): Support "testing" mode.
      (WebCore::CaptionUserPreferences::setUserPrefersCaptions): Ditto.
      (WebCore::CaptionUserPreferences::registerForPreferencesChangedCallbacks): Ditto.
      (WebCore::CaptionUserPreferences::unregisterForPreferencesChangedCallbacks): Ditto.
      (WebCore::CaptionUserPreferences::setPreferredLanguage): Ditto.
      (WebCore::CaptionUserPreferences::preferredLanguages): Ditto.
      (WebCore::CaptionUserPreferences::testingMode): Ditto.
      (WebCore::CaptionUserPreferences::setTestingMode): Ditto.
      (WebCore::CaptionUserPreferences::CaptionUserPreferences): Ditto.
      
      * page/CaptionUserPreferencesMac.h:
      * page/CaptionUserPreferencesMac.mm:
      (WebCore::CaptionUserPreferencesMac::userPrefersCaptions): Support "testing" mode.
      (WebCore::CaptionUserPreferencesMac::setUserPrefersCaptions): Ditto.
      (WebCore::CaptionUserPreferencesMac::userHasCaptionPreferences): Ditto.
      (WebCore::CaptionUserPreferencesMac::registerForPreferencesChangedCallbacks): Change name from
          registerForCaptionPreferencesChangedCallbacks. Support "testing" mode.
      (WebCore::CaptionUserPreferencesMac::unregisterForPreferencesChangedCallbacks):  Change name from
          unregisterForCaptionPreferencesChangedCallbacks. Support "testing" mode.
      (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Support "testing" mode.
      (WebCore::CaptionUserPreferencesMac::captionFontSizeScale): Ditto.
      (WebCore::CaptionUserPreferencesMac::setPreferredLanguage): Ditto.
      (WebCore::CaptionUserPreferencesMac::preferredLanguages): Ditto. Return the platform override when set.
      
      * page/PageGroup.cpp:
      (WebCore::PageGroup::registerForCaptionPreferencesChangedCallbacks): Remove because it is already
          available from the caption preference object.
      (WebCore::PageGroup::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
      (WebCore::PageGroup::userPrefersCaptions): Ditto.
      (WebCore::PageGroup::userHasCaptionPreferences): Ditto.
      (WebCore::PageGroup::captionFontSizeScale): Ditto.
      * page/PageGroup.h:
      
      * platform/Language.cpp:
      (WebCore::preferredLanguageFromList): Take the list of preferred languages instead of assuming
          the system list.
      * platform/Language.h:
      
      * testing/Internals.cpp:
      (WebCore::Internals::resetToConsistentState): Disable caption testing mode.
      (WebCore::Internals::Internals): Enable caption testing mode so the user's system
          preferences are not modified.
      
      LayoutTests: 
      
      * media/track/track-user-preferences-expected.txt: Added.
      * media/track/track-user-preferences.html: Added.
      
      * platform/chromium/TestExpectations: Skip new test, it depends on the track menu.
      * platform/efl/TestExpectations: Ditto.
      * platform/gtk/TestExpectations: Ditto.
      * platform/qt/TestExpectations: Ditto.
      * platform/win/TestExpectations: Ditto.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b54d1c88
  27. 05 Feb, 2013 1 commit
    • dino@apple.com's avatar
      [Mac] Captions menu should indicate language and type of track · 53a29d41
      dino@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=108882
      
      Reviewed by Eric Carlson.
      
      Source/WebCore:
      
      On Mac, we want a specific format for menu items in a caption list. Since
      other ports might want different formats, move the generation of the label
      into CaptionsUserPreferences where it can be overridden.
      
      This required CaptionsUserPreferences to become public on the PageGroup, so
      it could be used when creating the menu. Also, since CaptionsUserPreferences
      was hidden on Mountain Lion and below, be a little more specific about
      which pieces can be seen on which builds.
      
      Covered by existing media/video-controls-captions-trackmenu tests.
      
      * English.lproj/Localizable.strings: Remove textTrackClosedCaptionsText.
      * html/shadow/MediaControlElements.cpp:
      (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu): Build only
          one section and get the track's display name from the user preferences.
      * page/CaptionUserPreferences.h:
      (WebCore::CaptionUserPreferences::displayNameForTrack): Default implementation of
          virtual function that provides a label for a captions menu item.
      * page/CaptionUserPreferencesMac.h: Add the new virtual function, and expose just
          a bit of this class outside 10.9 builds.
      * page/CaptionUserPreferencesMac.mm:
      (WebCore::CaptionUserPreferencesMac::CaptionUserPreferencesMac): Guard features for system version.
      (WebCore::CaptionUserPreferencesMac::~CaptionUserPreferencesMac): Ditto.
      (WebCore::CaptionUserPreferencesMac::displayNameForTrack): New OS X-specific method that
          returns a string for the menu label.
      * page/PageGroup.cpp:
      (WebCore::PageGroup::captionPreferences): Unguard for system version.
      * page/PageGroup.h: Make captionPreferences public.
      * platform/LocalizedStrings.cpp: Remove textTrackClosedCaptionsText - not needed any more.
      * platform/LocalizedStrings.h: Remove textTrackClosedCaptionsText.
      
      LayoutTests:
      
      Now that the captions menu can be labelled in a platform-specific way, move
      the results into the platform directory. At the moment, they are skipped
      everywhere but Mac. Also update the tests to the new menu structure, which
      only has a single list of entries.
      
      * media/video-controls-captions-trackmenu-localized.html: Updated for new menu structure.
      * media/video-controls-captions-trackmenu-expected.txt: Removed.
      * media/video-controls-captions-trackmenu-localized-expected.txt: Removed.
      * media/video-controls-captions-trackmenu-sorted-expected.txt: Removed.
      * media/video-controls-captions-trackmenu-sorted.html: Updated for new menu structure.
      * media/video-controls-captions-trackmenu.html: Updated for new menu structure.
      * platform/mac/media/video-controls-captions-trackmenu-expected.txt: New platform specific results.
      * platform/mac/media/video-controls-captions-trackmenu-localized-expected.txt: Ditto.
      * platform/mac/media/video-controls-captions-trackmenu-sorted-expected.txt: Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      53a29d41
  28. 04 Feb, 2013 1 commit
    • eric.carlson@apple.com's avatar
      Update CaptionUserPreferences · f02a61ae
      eric.carlson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=108783
      
      Reviewed by Dean Jackson.
      
      * html/shadow/MediaControlElements.cpp:
      (WebCore::MediaControlTextTrackContainerElement::updateSizes): Mark font size as important
          when necessary.
      * page/CaptionUserPreferences.h:
      (WebCore::CaptionUserPreferences::setUserPrefersCaptions): New, allow a port to remember that
          the user has chosen to see captions.
      (WebCore::CaptionUserPreferences::setPreferredLanguage): New, allow a port to remember the
          user's preferred caption language.
      (WebCore::CaptionUserPreferences::preferredLanguages): New, return a Vector of the user's 
          preferred caption languages.
      * page/CaptionUserPreferencesMac.h:
      * page/CaptionUserPreferencesMac.mm:
      * page/PageGroup.cpp:
      (WebCore::PageGroup::captionPreferences):
      (WebCore::PageGroup::captionFontSizeScale):
      * page/PageGroup.h:
      * platform/Language.cpp:
      (WebCore::userPreferredLanguagesOverride): New, return the user preferred languages override
          used during testing.
      * platform/Language.h:
      * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
      (WebCore::InbandTextTrackPrivateAVFObjC::kind):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141790 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f02a61ae
  29. 02 Dec, 2012 1 commit
    • commit-queue@webkit.org's avatar
      Need a method to close all idle localstorage databases immediately. · eb3a703e
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=103469
      
      Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2012-12-02
      Reviewed by David Kilzer.
      
      Source/WebCore:
      
      Add a new PageGroup method closeIdleLocalStorageDatabases, which walks through
      all local storage areas that don't have document referencing to them and closes
      their underlying databases.
      
      Test: storage/domstorage/localstorage/close-idle-localstorage-databases-immediately.html
      
      * WebCore.exp.in:
      * page/PageGroup.cpp:
      (WebCore::PageGroup::clearLocalStorageForOrigin):
      (WebCore):
      (WebCore::PageGroup::closeIdleLocalStorageDatabases): walking through all idle local storages and
          closing their databases.
      * page/PageGroup.h:
      (PageGroup):
      * storage/StorageArea.h:
      (WebCore::StorageArea::closeDatabaseIfIdle):
      * storage/StorageAreaImpl.cpp:
      (WebCore::StorageAreaImpl::closeDatabaseIfIdle): close the database if it is idle.
      (WebCore):
      * storage/StorageAreaImpl.h:
      (StorageAreaImpl):
      * storage/StorageNamespace.h:
      (StorageNamespace):
      * storage/StorageNamespaceImpl.cpp:
      (WebCore::StorageNamespaceImpl::closeIdleLocalStorageDatabases):
      (WebCore):
      * storage/StorageNamespaceImpl.h:
      (StorageNamespaceImpl):
      
      Source/WebKit/mac:
      
      Add a new method to WebStorageManager that we can call to close all
      idle local storage databases.
      
      * Storage/WebStorageManager.mm:
      (+[WebStorageManager closeIdleLocalStorageDatabases]):
      * Storage/WebStorageManagerPrivate.h:
      
      Tools:
      
      Add an JS method to TestRunner, to enable testing closing idle local storage databases in
      DumpRenderTree layout tests.
      
      * DumpRenderTree/TestRunner.cpp:
      (closeIdleLocalStorageDatabasesCallback):
      (TestRunner::staticFunctions):
      * DumpRenderTree/TestRunner.h:
      (TestRunner):
      * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
      (TestRunner::closeIdleLocalStorageDatabases):
      * DumpRenderTree/efl/TestRunnerEfl.cpp:
      (TestRunner::closeIdleLocalStorageDatabases):
      * DumpRenderTree/gtk/TestRunnerGtk.cpp:
      (TestRunner::closeIdleLocalStorageDatabases):
      * DumpRenderTree/mac/TestRunnerMac.mm:
      (TestRunner::closeIdleLocalStorageDatabases):
      * DumpRenderTree/win/TestRunnerWin.cpp:
      (TestRunner::closeIdleLocalStorageDatabases):
      * DumpRenderTree/wx/TestRunnerWx.cpp:
      (TestRunner::closeIdleLocalStorageDatabases):
      
      LayoutTests:
      
      * storage/domstorage/localstorage/close-idle-localstorage-databases-immediately-expected.txt: Added.
      * storage/domstorage/localstorage/close-idle-localstorage-databases-immediately.html: Added.
      * storage/resources/storage-close-idle-localstorage-databases-immediately.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136323 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      eb3a703e
  30. 18 Nov, 2012 1 commit
    • antti@apple.com's avatar
      REGRESSION(r129644): User StyleSheet not applying · e119aee7
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=102110
      
      Reviewed by Andreas Kling.
      
      Source/WebCore:
      
      Injected stylesheets added as UserStyleAuthorLevel fail to apply. r129644 implicitly assumed that
      such things don't exists but on Chromium addUserStyleSheet() confusingly uses them.
      
      The patch adds injected author stylesheets to DocumentStyleSheetCollection::activeStyleSheets().
      It also generally cleans up the code around injected and user stylesheets.
      
      Tests: userscripts/user-script-and-stylesheet.html
             userscripts/user-stylesheet-invalidate.html
      
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::StyleResolver):
      (WebCore::StyleResolver::collectRulesFromUserStyleSheets):
      (WebCore::collectCSSOMWrappers):
      * css/StyleResolver.h:
      (StyleResolver):
      * dom/Document.cpp:
      (WebCore::Document::setCompatibilityMode):
      * dom/DocumentStyleSheetCollection.cpp:
      (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
      (WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection):
      (WebCore::DocumentStyleSheetCollection::injectedUserStyleSheets):
      (WebCore):
      (WebCore::DocumentStyleSheetCollection::injectedAuthorStyleSheets):
      (WebCore::DocumentStyleSheetCollection::updateInjectedStyleSheetCache):
      (WebCore::DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache):
      (WebCore::DocumentStyleSheetCollection::addUserSheet):
      (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
      (WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
      * dom/DocumentStyleSheetCollection.h:
      (WebCore::DocumentStyleSheetCollection::documentUserStyleSheets):
      (DocumentStyleSheetCollection):
      * page/PageGroup.cpp:
      (WebCore::PageGroup::addUserStyleSheetToWorld):
      (WebCore::PageGroup::removeUserStyleSheetFromWorld):
      (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
      (WebCore::PageGroup::removeAllUserContent):
      (WebCore::PageGroup::invalidatedInjectedStyleSheetCacheInAllFrames):
      * page/PageGroup.h:
      (PageGroup):
      
      LayoutTests:
      
      * inspector/timeline/timeline-script-tag-1-expected.txt:
      
          Update the test result. The style invalidation log is slightly different.
      
      * userscripts/user-stylesheet-invalidate-expected.txt: Added.
      * userscripts/user-stylesheet-invalidate.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e119aee7
  31. 16 Nov, 2012 2 commits
    • dglazkov@chromium.org's avatar
      Unreviewed, rolling out r134986. · ce0a0535
      dglazkov@chromium.org authored
      http://trac.webkit.org/changeset/134986
      https://bugs.webkit.org/show_bug.cgi?id=102110
      
      Triggered ASSERT in fast/frames/seamless/seamless-inherited-
      origin.html.
      
      Source/WebCore:
      
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::StyleResolver):
      (WebCore::StyleResolver::addAuthorRulesAndCollectUserRulesFromSheets):
      (WebCore::collectCSSOMWrappers):
      * css/StyleResolver.h:
      (StyleResolver):
      * dom/Document.cpp:
      (WebCore::Document::setCompatibilityMode):
      * dom/DocumentStyleSheetCollection.cpp:
      (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
      (WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection):
      (WebCore::DocumentStyleSheetCollection::pageGroupUserSheets):
      (WebCore):
      (WebCore::DocumentStyleSheetCollection::clearPageGroupUserSheets):
      (WebCore::DocumentStyleSheetCollection::updatePageGroupUserSheets):
      (WebCore::DocumentStyleSheetCollection::addUserSheet):
      (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
      (WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
      * dom/DocumentStyleSheetCollection.h:
      (DocumentStyleSheetCollection):
      (WebCore::DocumentStyleSheetCollection::documentUserSheets):
      * page/PageGroup.cpp:
      (WebCore::PageGroup::addUserStyleSheetToWorld):
      (WebCore::PageGroup::removeUserStyleSheetFromWorld):
      (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
      (WebCore::PageGroup::removeAllUserContent):
      (WebCore::PageGroup::resetUserStyleCacheInAllFrames):
      * page/PageGroup.h:
      (PageGroup):
      
      LayoutTests:
      
      * userscripts/user-stylesheet-invalidate-expected.txt: Removed.
      * userscripts/user-stylesheet-invalidate.html: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134992 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ce0a0535
    • antti@apple.com's avatar
      REGRESSION(r129644): User StyleSheet not applying · d7f1f18e
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=102110
      
      Reviewed by Andreas Kling.
      
      Source/WebCore: 
      
      Injected stylesheets added as UserStyleAuthorLevel fail to apply. r129644 implicitly assumed that
      such things don't exists but on Chromium addUserStyleSheet() confusingly uses them.
              
      The patch adds injected author stylesheets to DocumentStyleSheetCollection::activeStyleSheets().
      It also generally cleans up the code around injected and user stylesheets.
      
      Tests: userscripts/user-script-and-stylesheet.html
             userscripts/user-stylesheet-invalidate.html
      
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::StyleResolver):
      (WebCore::StyleResolver::collectRulesFromUserStyleSheets):
      (WebCore::collectCSSOMWrappers):
      * css/StyleResolver.h:
      (StyleResolver):
      * dom/Document.cpp:
      (WebCore::Document::setCompatibilityMode):
      * dom/DocumentStyleSheetCollection.cpp:
      (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
      (WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection):
      (WebCore::DocumentStyleSheetCollection::injectedUserStyleSheets):
      (WebCore):
      (WebCore::DocumentStyleSheetCollection::injectedAuthorStyleSheets):
      (WebCore::DocumentStyleSheetCollection::updateInjectedStyleSheetCache):
      (WebCore::DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache):
      (WebCore::DocumentStyleSheetCollection::addUserSheet):
      (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
      (WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
      * dom/DocumentStyleSheetCollection.h:
      (WebCore::DocumentStyleSheetCollection::documentUserStyleSheets):
      (DocumentStyleSheetCollection):
      * page/PageGroup.cpp:
      (WebCore::PageGroup::addUserStyleSheetToWorld):
      (WebCore::PageGroup::removeUserStyleSheetFromWorld):
      (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
      (WebCore::PageGroup::removeAllUserContent):
      (WebCore::PageGroup::invalidatedInjectedStyleSheetCacheInAllFrames):
      * page/PageGroup.h:
      (PageGroup):
      
      LayoutTests: 
      
      * userscripts/user-stylesheet-invalidate-expected.txt: Added.
      * userscripts/user-stylesheet-invalidate.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d7f1f18e
  32. 24 Oct, 2012 1 commit
    • eric.carlson@apple.com's avatar
      Allow ports to override text track rendering style · 68e8da75
      eric.carlson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=97800
      <rdar://problem/12044964>
      
      Reviewed by Maciej Stachowiak.
      
      Source/WebCore:
      
      * WebCore.exp.in: Export new WebkitSystemInterface functions.
      * WebCore.xcodeproj/project.pbxproj: Add CaptionUserPreferences.h, CaptionUserPreferencesMac.mm,
          and CaptionUserPreferencesMac.h.
      
      * css/mediaControls.css: Rearrange the caption CSS so it is possible to style the cue window,
          background, and text independently.
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_disableCaptions with theme->userPrefersCaptions().
      (WebCore::HTMLMediaElement::attach): Register for caption preferences change callbacks.
      (WebCore::HTMLMediaElement::detach): Unregister for caption preferences change callbacks.
      (WebCore::HTMLMediaElement::userPrefersCaptions): Return theme->userPrefersCaptions().
      (WebCore::HTMLMediaElement::userIsInterestedInThisTrackKind): Consider userPrefersCaptions().
      (WebCore::HTMLMediaElement::setClosedCaptionsVisible): Move the code that marks all tracks as
          un-configured to markCaptionAndSubtitleTracksAsUnconfigured so it can be reused.
      (WebCore::HTMLMediaElement::captionPreferencesChanged): New, force a reevaluation of all text tracks.
      (WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): New, code moved from
          setClosedCaptionsVisible
      * html/HTMLMediaElement.h: Inherit from CaptionPreferencesChangedListener.
      
      * html/shadow/MediaControlElements.cpp:
      (WebCore::MediaControlTextTrackContainerElement::updateSizes): Get rid of unnecessary member
          variable. Get caption font scale from theme instead of hard coding.
      * html/shadow/MediaControlElements.h:
      
      * html/track/TextTrack.cpp:
      (WebCore::TextTrack::TextTrack): Change attributes from String to AtomicString.
      (WebCore::TextTrack::isValidKindKeyword): Ditto.
      (WebCore::TextTrack::setKind): Ditto.
      (WebCore::TextTrack::setMode): Ditto.
      (WebCore::TextTrack::mode): Ditto.
      * html/track/TextTrack.h:
      (WebCore::TextTrack::create): Ditto.
      (WebCore::TextTrack::kind): Ditto.
      (WebCore::TextTrack::label): Ditto.
      (WebCore::TextTrack::setLabel): Ditto.
      (WebCore::TextTrack::language): Ditto.
      (WebCore::TextTrack::setLanguage): Ditto.
      
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCueBox::TextTrackCueBox): Set the shadow pseudo id.
      (WebCore::TextTrackCueBox::textTrackCueBoxShadowPseudoId): New, class method to return the
          shadow pseudo id so it can be used elsewhere.
      (WebCore::TextTrackCueBox::shadowPseudoId): Call textTrackCueBoxShadowPseudoId.
      (WebCore::TextTrackCue::pastNodesShadowPseudoId): New, class method to return the
          shadow pseudo id so it can be used elsewhere.
      (WebCore::TextTrackCue::futureNodesShadowPseudoId): Ditto.
      (WebCore::TextTrackCue::updateDisplayTree):
      * html/track/TextTrackCue.h:
      
      * page/CaptionUserPreferences.h: Added.
      * page/CaptionUserPreferencesMac.h: Added.
      * page/CaptionUserPreferencesMac.mm: Added.
      (WebCore::userCaptionPreferencesChangedNotificationCallback):
      (WebCore::CaptionUserPreferencesMac::CaptionUserPreferencesMac):
      (WebCore::CaptionUserPreferencesMac::~CaptionUserPreferencesMac):
      (WebCore::CaptionUserPreferencesMac::userHasCaptionPreferences): New, passthrough to WKSI function.
      (WebCore::CaptionUserPreferencesMac::userPrefersCaptions): Ditto.
      (WebCore::CaptionUserPreferencesMac::captionsWindowColor): Return Color with user's caption window color preference.
      (WebCore::CaptionUserPreferencesMac::captionsBackgroundColor): Return Color with user's caption
          background color preference.
      (WebCore::CaptionUserPreferencesMac::captionsTextColor): Return Color with user's caption text color preference.
      (WebCore::CaptionUserPreferencesMac::captionsEdgeColorForTextColor): Return Color for text edge effect.
      (WebCore::CaptionUserPreferencesMac::cssPropertyWithTextEdgeColor): Return String with CSS to set a text-shadow
          or webkit-text-stroke property.
      (WebCore::CaptionUserPreferencesMac::cssColorProperty): Return a String with css to set a property
          with a color value.
      (WebCore::CaptionUserPreferencesMac::captionsTextEdgeStyle): Return a String with css to style caption
          text with the user's preferred text edge stye.
      (WebCore::CaptionUserPreferencesMac::captionsDefaultFont): Return a String with css to style caption
          text with the user's preferred font.
      (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Return a String with css to style captions
          with the user's preferred style.
      (WebCore::CaptionUserPreferencesMac::captionFontSizeScale): Return the user's preferred caption font scale.
      (WebCore::CaptionUserPreferencesMac::captionPreferencesChanged): Notify listeners of caption preference change.
      (WebCore::CaptionUserPreferencesMac::registerForCaptionPreferencesChangedCallbacks): Add a caption preferences
          changes listener.
      (WebCore::CaptionUserPreferencesMac::unregisterForCaptionPreferencesChangedCallbacks): Remove a caption preferences
          changes listener.
      (WebCore::CaptionUserPreferencesMac::updateCaptionStyleSheetOveride): New, if theme has a captions style sheet override,
          inject it into the current page group, otherwise remove injected sheet.
      
      * page/PageGroup.cpp:
      (WebCore::PageGroup::captionPreferences):
      (WebCore::PageGroup::registerForCaptionPreferencesChangedCallbacks): New, passthrough to platform specific function
          of the same name.
      (WebCore::PageGroup::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
      (WebCore::PageGroup::userPrefersCaptions): Ditto.
      (WebCore::PageGroup::userHasCaptionPreferences): Ditto.
      (WebCore::PageGroup::captionFontSizeScale): Ditto.
      * page/PageGroup.h:
      
      * platform/mac/WebCoreSystemInterface.h: Updated.
      * platform/mac/WebCoreSystemInterface.mm: Ditto.
      
      Source/WebKit/mac:
      
      * WebCoreSupport/WebSystemInterface.mm:
      (InitWebCoreSystemInterface): Initialize new WKSI function pointers.
      
      Source/WebKit2:
      
      * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
      (InitWebCoreSystemInterface): Initialize new WKSI function pointers.
      
      WebKitLibraries:
      
      Update WKSI header with SPI for getting the user caption appearance preferences.
      
      * WebKitSystemInterface.h:
      
      LayoutTests:
      
      * media/track/track-cue-rendering-expected.txt: Update results for caption css changes.
      * media/track/track-cue-rendering.html:
      * platform/chromium/TestExpectations: Skip tests that need to be rebaselined.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132349 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      68e8da75
  33. 19 Oct, 2012 1 commit