1. 14 Aug, 2012 1 commit
    • abarth@webkit.org's avatar
      Delete Frame::domWindow() and Frame::existingDOMWindow() · b7c61160
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=93990
      
      Reviewed by Eric Seidel.
      
      Source/WebCore: 
      
      These functions just call through to document()->domWindow(). This
      patch updates the callers so it's clearer what's going on.
      
      * bindings/js/JSDOMBinding.cpp:
      (WebCore::shouldAllowAccessToFrame):
      (WebCore::printErrorMessageForFrame):
      * bindings/js/JSDocumentCustom.cpp:
      (WebCore::JSDocument::location):
      (WebCore::JSDocument::setLocation):
      * bindings/js/JSEventListener.cpp:
      (WebCore::JSEventListener::handleEvent):
      * bindings/js/ScriptCachedFrameData.cpp:
      (WebCore::ScriptCachedFrameData::restore):
      * bindings/js/ScriptController.cpp:
      (WebCore::ScriptController::createWindowShell):
      * bindings/objc/DOMAbstractView.mm:
      (core):
      * bindings/v8/NPV8Object.cpp:
      (WebCore::toV8Context):
      * bindings/v8/ScriptController.cpp:
      (WebCore::createScriptObject):
      (WebCore::ScriptController::createScriptObjectForPluginElement):
      * bindings/v8/V8DOMWindowShell.cpp:
      (WebCore::V8DOMWindowShell::initContextIfNeeded):
      * bindings/v8/V8IsolatedContext.cpp:
      (WebCore::V8IsolatedContext::V8IsolatedContext):
      * bindings/v8/V8Proxy.cpp:
      (WebCore::V8Proxy::retrieveFrame):
      * bindings/v8/custom/V8DOMWindowCustom.cpp:
      (WebCore::V8DOMWindow::indexedPropertyGetter):
      (WebCore::V8DOMWindow::namedPropertyGetter):
      * bindings/v8/custom/V8DocumentLocationCustom.cpp:
      (WebCore::V8Document::locationAccessorGetter):
      (WebCore::V8Document::locationAccessorSetter):
      * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
      (WebCore::V8HTMLDocument::GetNamedProperty):
      * bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp:
      (WebCore::V8HTMLFrameSetElement::namedPropertyGetter):
      * dom/Document.cpp:
      (WebCore::printNavigationErrorMessage):
      * dom/ViewportArguments.cpp:
      (WebCore::reportViewportWarning):
      * editing/AlternativeTextController.cpp:
      (WebCore::AlternativeTextController::insertDictatedText):
      * editing/Editor.cpp:
      (WebCore::Editor::pasteAsPlainText):
      (WebCore::Editor::pasteAsFragment):
      (WebCore::Editor::setComposition):
      * history/PageCache.cpp:
      (WebCore::logCanCacheFrameDecision):
      (WebCore::PageCache::canCachePageContainingThisFrame):
      * html/HTMLFormElement.cpp:
      (WebCore::HTMLFormElement::validateInteractively):
      * html/HTMLFrameOwnerElement.cpp:
      (WebCore::HTMLFrameOwnerElement::contentWindow):
      * html/canvas/WebGLRenderingContext.cpp:
      (WebCore):
      (WebCore::WebGLRenderingContext::printWarningToConsole):
      * inspector/InspectorDOMStorageAgent.cpp:
      (WebCore::InspectorDOMStorageAgent::storageId):
      * loader/DocumentLoader.cpp:
      (WebCore::DocumentLoader::checkLoadComplete):
      * loader/DocumentWriter.cpp:
      (WebCore::DocumentWriter::begin):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::stopLoading):
      (WebCore::FrameLoader::didOpenURL):
      (WebCore::FrameLoader::checkIfDisplayInsecureContent):
      (WebCore::FrameLoader::checkIfRunInsecureContent):
      (WebCore::FrameLoader::reportLocalLoadFailed):
      (WebCore::FrameLoader::prepareForCachedPageRestore):
      (WebCore::FrameLoader::open):
      (WebCore::FrameLoader::fireBeforeUnloadEvent):
      * loader/MainResourceLoader.cpp:
      (WebCore::MainResourceLoader::didReceiveResponse):
      * loader/appcache/ApplicationCacheGroup.cpp:
      (WebCore::ApplicationCacheGroup::abort):
      (WebCore::ApplicationCacheGroup::didReceiveResponse):
      (WebCore::ApplicationCacheGroup::didFinishLoading):
      (WebCore::ApplicationCacheGroup::didFail):
      (WebCore::ApplicationCacheGroup::didReceiveManifestResponse):
      (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
      (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
      * loader/cache/CachedResourceLoader.cpp:
      (WebCore::CachedResourceLoader::printAccessDeniedMessage):
      * page/DOMWindow.cpp:
      (WebCore::DOMWindow::isCurrentlyDisplayedInFrame):
      (WebCore::DOMWindow::self):
      (WebCore::DOMWindow::opener):
      (WebCore::DOMWindow::parent):
      (WebCore::DOMWindow::top):
      (WebCore::DOMWindow::createWindow):
      (WebCore::DOMWindow::open):
      * page/DOMWindowProperty.cpp:
      (WebCore::DOMWindowProperty::DOMWindowProperty):
      (WebCore::DOMWindowProperty::reconnectFrameFromPageCache):
      * page/DragController.cpp:
      (WebCore::DragController::dispatchTextInputEventFor):
      * page/EventHandler.cpp:
      (WebCore::EventHandler::handleTextInputEvent):
      * page/Frame.cpp:
      * page/Frame.h:
      (Frame):
      * page/Location.cpp:
      (WebCore::Location::replace):
      (WebCore::Location::reload):
      (WebCore::Location::setLocation):
      * storage/StorageEventDispatcher.cpp:
      (WebCore::StorageEventDispatcher::dispatch):
      * svg/SVGDocumentExtensions.cpp:
      (WebCore::reportMessage):
      * xml/XSLStyleSheetLibxslt.cpp:
      (WebCore::XSLStyleSheet::parseString):
      * xml/XSLTProcessorLibxslt.cpp:
      (WebCore::docLoaderFunc):
      * xml/XSLTProcessorQt.cpp:
      (WebCore::XSLTMessageHandler::handleMessage):
      
      Source/WebKit/blackberry: 
      
      * WebCoreSupport/ChromeClientBlackBerry.cpp:
      (WebCore::toOriginString):
      (WebCore::ChromeClientBlackBerry::runJavaScriptAlert):
      (WebCore::ChromeClientBlackBerry::runJavaScriptConfirm):
      (WebCore::ChromeClientBlackBerry::runJavaScriptPrompt):
      (WebCore::ChromeClientBlackBerry::runBeforeUnloadConfirmPanel):
      (WebCore::ChromeClientBlackBerry::requestWebGLPermission):
      
      Source/WebKit/chromium: 
      
      * src/StorageAreaProxy.cpp:
      (WebCore::StorageAreaProxy::dispatchLocalStorageEvent):
      (WebCore::StorageAreaProxy::dispatchSessionStorageEvent):
      * src/WebDOMMessageEvent.cpp:
      (WebKit::WebDOMMessageEvent::initMessageEvent):
      * src/WebFrameImpl.cpp:
      (WebKit::WebFrameImpl::performance):
      (WebKit::WebFrameImpl::addMessageToConsole):
      (WebKit::WebFrameImpl::unloadListenerCount):
      (WebKit::WebFrameImpl::addEventListener):
      (WebKit::WebFrameImpl::removeEventListener):
      (WebKit::WebFrameImpl::dispatchEvent):
      (WebKit::WebFrameImpl::dispatchMessageEventWithOriginCheck):
      (WebKit::WebFrameImpl::deliverIntent):
      * src/WebPagePopupImpl.cpp:
      (WebKit::WebPagePopupImpl::initPage):
      
      Source/WebKit/efl: 
      
      * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
      (DumpRenderTreeSupportEfl::pendingUnloadEventCount):
      * ewk/ewk_frame.cpp:
      (ewk_frame_intent_deliver):
      
      Source/WebKit/gtk: 
      
      * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
      (DumpRenderTreeSupportGtk::getPendingUnloadEventCount):
      
      Source/WebKit/mac: 
      
      * WebView/WebFrame.mm:
      (-[WebFrame _pendingFrameUnloadEventCount]):
      (-[WebFrame _cacheabilityDictionary]):
      
      Source/WebKit/qt: 
      
      * WebCoreSupport/FrameLoaderClientQt.cpp:
      (WebCore::FrameLoaderClientQt::dispatchDidFinishDocumentLoad):
      
      Source/WebKit/win: 
      
      * WebFrame.cpp:
      (WebFrame::DOMWindow):
      (WebFrame::pendingFrameUnloadEventCount):
      
      Source/WebKit2: 
      
      * WebProcess/WebPage/WebFrame.cpp:
      (WebKit::WebFrame::deliverIntent):
      (WebKit::WebFrame::pendingUnloadCount):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125615 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b7c61160
  2. 31 May, 2012 1 commit
    • beidson@apple.com's avatar
      <rdar://problem/11544454> and https://bugs.webkit.org/show_bug.cgi?id=87990 · 0e9076df
      beidson@apple.com authored
      Crashes unregistering DOMWindowProperties while releasing CachedPages
      
      Reviewed by Jessie Berlin.
      
      This patch rewrites DOMWindowProperty to always keep direct track of the DOMWindow
      it has registered with and to only ever unregister from that very same DOMWindow.
      
      No new tests. (While the direct cause of the crash is understood, reproducing it is not)
      
      * page/DOMWindowProperty.cpp:
      (WebCore::DOMWindowProperty::DOMWindowProperty):
      (WebCore::DOMWindowProperty::~DOMWindowProperty):
      (WebCore::DOMWindowProperty::disconnectFrameForPageCache):
      (WebCore::DOMWindowProperty::reconnectFrameFromPageCache):
      (WebCore::DOMWindowProperty::willDestroyGlobalObjectInCachedFrame):
      (WebCore::DOMWindowProperty::willDestroyGlobalObjectInFrame):
      (WebCore::DOMWindowProperty::willDetachGlobalObjectFromFrame):
      * page/DOMWindowProperty.h:
      (DOMWindowProperty):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119136 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0e9076df
  3. 10 May, 2012 1 commit
    • jberlin@webkit.org's avatar
      Crash using the new WKBundleDOMWindowExtensions APIs. · a4facf2c
      jberlin@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=85888
      
      Reviewed by Brady Eidson.
      
      Source/WebCore:
      
      WKBundlePageWillDestroyGlobalObjectForDOMWindowExtensionCallback was only being invoked when
      the WKPage was destroyed, and then only for the child frames. In addition, the
      DOMWindowExtension was holding onto a destroyed DOMWindow and attempting to unregister from
      when the WK2 wrapper object was attempting to destroy the DOMWindowExtension.
      
      The underlying issue here was that the DOMWindowProperties were getting disconnectFrame
      and willDetachPage called on them at the wrong times.
      
      Rename DOMWindowProperty::disconnectFrame and reconnectFrame to disconnectFrameForPageCache
      and reconnectFrameFromPageCache for clarity.
      
      Only invoke DOMWindowProperty::disconnectFrameForPageCache when the frame is going into the
      page cache.
      
      In the cases where the DOMWindow is getting destroyed, the frame is being destroyed, or the
      DOMWindow is getting cleared because the frame is being navigated, invoke
      DOMWindowProperty::willDestroyGlobalObjectInFrame instead of disconnectFrame.
      
      Invoke DOMWindowProperty::willDetachGlobalObjectFromFrame when a document is being detached
      because the frame has been detached (e.g. fast/storage/storage-detached-iframe.html) and
      won't be immediately destroyed.
      
      Invoke DOMWindowProperty::willDestroyGlobalObjectInCachedFrame when a cached frame is
      being destroyed.
      
      New WK2 API Test: DOMWindowExtensionNoCache.
      
      * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
      (WebCore::DOMWindowIndexedDatabase::disconnectFrameForPageCache):
      Updated for disconnectFrame rename.
      (WebCore::DOMWindowIndexedDatabase::reconnectFrameFromPageCache):
      Updated for reconnectFrame rename.
      (WebCore::DOMWindowIndexedDatabase::willDestroyGlobalObjectInCachedFrame):
      Get rid of the suspended IDBFactory.
      (WebCore::DOMWindowIndexedDatabase::willDestroyGlobalObjectInFrame):
      Get rid of the IDBFactory.
      (WebCore::DOMWindowIndexedDatabase::willDetachGlobalObjectFromFrame):
      Ditto.
      * Modules/indexeddb/DOMWindowIndexedDatabase.h:
      
      * dom/Document.cpp:
      (WebCore::Document::prepareForDestruction):
      Tell the DOMWindow before detaching the Document.
      * dom/Document.h:
      
      * history/CachedFrame.cpp:
      (WebCore::CachedFrame::destroy):
      Tell the DOMWindow.
      
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::clear):
      Use Document::prepareForDestruction so that the DOMWindow is told about the main frame
      navigation before detaching the Document.
      
      * loader/appcache/DOMApplicationCache.cpp:
      (WebCore::DOMApplicationCache::disconnectFrameForPageCache):
      Updated for the disconnectFrame rename.
      (WebCore::DOMApplicationCache::reconnectFrameFromPageCache):
      Updated for the reconnectFrame rename.
      (WebCore::DOMApplicationCache::willDestroyGlobalObjectInFrame):
      Cover the cases formerly covered by disconnectFrame (which was sometimes being called when
      called when the frame was destroyed).
      * loader/appcache/DOMApplicationCache.h:
      
      * notifications/DOMWindowNotifications.cpp:
      (WebCore::DOMWindowNotifications::disconnectFrameForPageCache):
      Updated for the disconnectFrame rename.
      (WebCore::DOMWindowNotifications::reconnectFrameFromPageCache):
      Updated for the reconnectFrame rename.
      (WebCore::DOMWindowNotifications::willDestroyGlobalObjectInCachedFrame):
      Get rid of the suspended notification center.
      (WebCore::DOMWindowNotifications::willDestroyGlobalObjectInFrame):
      Get rid of the notification center.
      (WebCore::DOMWindowNotifications::willDetachGlobalObjectFromFrame):
      Do not allow use of the notification center by detached frames.
      * notifications/DOMWindowNotifications.h:
      
      * page/DOMWindow.cpp:
      (WebCore::DOMWindow::clearDOMWindowProperties):
      Do not call disconnectDOMWindowProperties. It is now the responsibility of the callers to
      tell the DOMWindowProperties the correct cause of being cleared.
      (WebCore::DOMWindow::~DOMWindow):
      Make sure the DOMWindowProperties still know that the DOMWindow is going away.
      (WebCore::DOMWindow::frameDestroyed):
      Invoke willDestroyGlobalObjectInFrame on the DOMWindowProperties.
      (WebCore::DOMWindow::willDetachPage):
      It is no longer necessary to tell the DOMWindowProperties anything here.
      (WebCore::DOMWindow::willDestroyCachedFrame):
      Tell the DOMWindowProperties.
      (WebCore::DOMWindow::willDestroyDocumentInFrame):
      Ditto.
      (WebCore::DOMWindow::willDetachDocumentFromFrame):
      Ditto.
      (WebCore::DOMWindow::clear):
      Ditto.
      (WebCore::DOMWindow::disconnectDOMWindowProperties):
      Updated for the disconnectFrame rename.
      (WebCore::DOMWindow::reconnectDOMWindowProperties):
      Ditto.
      * page/DOMWindow.h:
      
      * page/DOMWindowExtension.cpp:
      (WebCore::DOMWindowExtension::DOMWindowExtension):
      Move the responsibility for tracking the disconnected DOMWindow to DOMWindowProperty, since
      DOMWindowProperty will need it to unregister the property when a cached frame is destroyed.
      (WebCore::DOMWindowExtension::disconnectFrameForPageCache):
      Remove the code to check for disconnectFrame being called twice - it is now only called when
      a frame goes into the page cache.
      Let the DOMWindowProperty keep track of the disconnected DOMWindow.
      (WebCore::DOMWindowExtension::reconnectFrameFromPageCache):
      Let the DOMWindowProperty keep track of the disconnected DOMWindow.
      (WebCore::DOMWindowExtension::willDestroyGlobalObjectInCachedFrame):
      Dispatch the willDestroyGlobalObjectForDOMWindowExtension callback.
      (WebCore::DOMWindowExtension::willDestroyGlobalObjectInFrame):
      Ditto, but only if the callback hasn't already been sent because the frame has been detached.
      (WebCore::DOMWindowExtension::willDetachGlobalObjectFromFrame):
      Send the callback because nothing interesting can be done in the frame once it has been
      detached.
      * page/DOMWindowExtension.h:
      
      * page/DOMWindowProperty.cpp:
      (WebCore::DOMWindowProperty::DOMWindowProperty):
      Keep track of the disconnected DOMWindow so it can be used to unregister the property when a
      cached frame is destroyed.
      (WebCore::DOMWindowProperty::~DOMWindowProperty):
      Also unregister the property when a DOMWindowProperty for a cached frame is destroyed.
      (WebCore::DOMWindowProperty::disconnectFrameForPageCache):
      Keep track of the disconnected DOMWindow.
      (WebCore::DOMWindowProperty::reconnectFrameFromPageCache):
      Ditto.
      (WebCore::DOMWindowProperty::willDestroyGlobalObjectInCachedFrame):
      Unregister the property from the disconnected DOMWindow.
      (WebCore::DOMWindowProperty::willDestroyGlobalObjectInFrame):
      Unregister the property from the DOMWindow and stop keeping track of the frame.
      (WebCore::DOMWindowProperty::willDetachGlobalObjectFromFrame):
      Do not set m_frame to 0 because detached frames still have access to the DOMWindow, even if
      they can't do anything meaningful with it.
      * page/DOMWindowProperty.h:
      
      * page/Frame.cpp:
      (WebCore::Frame::setView):
      Tell the DOMWindow that the Document is being detached so it can tell the
      DOMWindowProperties.
      
      * page/PointerLock.cpp:
      (WebCore::PointerLock::disconnectFrameForPageCache):
      Updated for disconnectFrame rename.
      (WebCore::PointerLock::willDestroyGlobalObjectInFrame):
      Cover the cases formerly covered by disconnectFrame (which was sometimes being called when
      called when the frame was destroyed).
      * page/PointerLock.h:
      
      Tools:
      
      Cached frames can live slightly longer than the page, but most clients unregister themselves
      and do other cleanup in the willDestroyPage callback, making them miss the
      willDestroyGlobalObjectForDOMWindowExtension callbacks.
      
      The calls to willDestroyGlobalObjectForDOMWindowExtension in the DOMWindowExtensionBasic
      test were all being invoked underneath WebPage::close. This is unrealistic. Update that test
      to destroy the BundleDOMWindowExtensions in response to the willDestroyPage callback.
      
      Add a test to verify that willDestroyGlobalObjectForDOMWindowExtension is being called for
      pages that don't go into the page cache.
      
      * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
      Add DOMWindowExtensionNoCache.cpp, DOMWindowExtensionNoCache_Bundle.cpp, simple-unload.html
      and simple-iframe-unload.html
      
      * TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionBasic.cpp:
      (TestWebKitAPI):
      Remove the expected messages for willDestroyGlobalObjectForDOMWindowExtension.
      (TestWebKitAPI::didReceiveMessageFromInjectedBundle):
      Do not bother to keep track of the live extension count - all of them are expected to be
      live until the test completes.
      (TestWebKitAPI::TEST):
      Fix the calls to EXPECT to pass the expected value first, and use EXPECT_WK_STREQ so that
      message failures will be clearer.
      * TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionBasic_Bundle.cpp:
      (TestWebKitAPI::DOMWindowExtensionBasic::willDestroyPage):
      Clean up the BundleDOMWindowExtensions.
      (TestWebKitAPI::DOMWindowExtensionBasic::willDestroyGlobalObjectForDOMWindowExtension):
      Add an ASSERT_NOT_REACHED.
      
      * TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionNoCache.cpp: Added.
      (TestWebKitAPI::didReceiveMessageFromInjectedBundle):
      Keep track of the messages received so they can be checked at the end of the test.
      (TestWebKitAPI::TEST):
      Navigate to uncacheable pages and back.
      * TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionNoCache_Bundle.cpp: Copied from Tools/TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionBasic_Bundle.cpp.
      (DOMWindowExtensionNoCache):
      (TestWebKitAPI::DOMWindowExtensionNoCache::DOMWindowExtensionNoCache):
      Set up all the states for each BundleDOMWindowExtension.
      (TestWebKitAPI::DOMWindowExtensionNoCache::frameLoadFinished):
      Tell the UI Process about the states of the BundleDOMWindowExtensions.
      (TestWebKitAPI::DOMWindowExtensionNoCache::sendExtensionStateMessage):
      (TestWebKitAPI::DOMWindowExtensionNoCache::initialize):
      (TestWebKitAPI::DOMWindowExtensionNoCache::didCreatePage):
      (TestWebKitAPI::DOMWindowExtensionNoCache::willDestroyPage):
      Remvoe the remaining BundleDOMWindowExtensions, send the updated state, and finish the test.
      (TestWebKitAPI::DOMWindowExtensionNoCache::updateExtensionStateRecord):
      (TestWebKitAPI::DOMWindowExtensionNoCache::sendBundleMessage):
      (TestWebKitAPI::DOMWindowExtensionNoCache::globalObjectIsAvailableForFrame):
      (TestWebKitAPI::DOMWindowExtensionNoCache::willDisconnectDOMWindowExtensionFromGlobalObject):
      ASSERT that these pages not going into the page cache are not getting disconnected to go into
      the page cache.
      (TestWebKitAPI::DOMWindowExtensionNoCache::didReconnectDOMWindowExtensionToGlobalObject):
      Ditto about getting reconnected when coming out of the page cache.
      (TestWebKitAPI::DOMWindowExtensionNoCache::willDestroyGlobalObjectForDOMWindowExtension):
      Tell the UI Process, update the state, and get rid of the BundleDOMWindowExtension.
      (TestWebKitAPI::didFinishLoadForFrameCallback):
      (TestWebKitAPI::globalObjectIsAvailableForFrameCallback):
      (TestWebKitAPI::willDisconnectDOMWindowExtensionFromGlobalObjectCallback):
      (TestWebKitAPI::didReconnectDOMWindowExtensionToGlobalObjectCallback):
      (TestWebKitAPI::willDestroyGlobalObjectForDOMWindowExtensionCallback):
      
      * TestWebKitAPI/Tests/WebKit2/simple-iframe-unload.html: Added.
      * TestWebKitAPI/Tests/WebKit2/simple-unload.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116595 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a4facf2c
  4. 13 Mar, 2012 1 commit
    • beidson@apple.com's avatar
      <rdar://problem/7908830> and https://bugs.webkit.org/show_bug.cgi?id=34679... · 15d59b43
      beidson@apple.com authored
      <rdar://problem/7908830> and https://bugs.webkit.org/show_bug.cgi?id=34679 Location and other objects are dysfunctional after a document gets restored from page cache
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      Test: fast/loader/window-properties-restored-from-page-cache.html
      
      Give DOMWindowProperties the ability to reconnect to their Frame:
      * page/DOMWindowProperty.cpp:
      (WebCore::DOMWindowProperty::reconnectFrame):
      * page/DOMWindowProperty.h:
      (DOMWindowProperty):
      
      Let ApplicationCache do some extra work when reconnecting:
      * loader/appcache/DOMApplicationCache.cpp:
      (WebCore::DOMApplicationCache::reconnectFrame):
      (WebCore):
      * loader/appcache/DOMApplicationCache.h:
      (DOMApplicationCache):
      
      Let IndexDB do some extra work when reconnecting:
      * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
      (WebCore::DOMWindowIndexedDatabase::disconnectFrame):
      (WebCore::DOMWindowIndexedDatabase::reconnectFrame):
      (WebCore::DOMWindowIndexedDatabase::webkitIndexedDB):
      * Modules/indexeddb/DOMWindowIndexedDatabase.h:
      (DOMWindowIndexedDatabase):
      
      Tell the DOMWindow to suspend to the page cache:
      * history/CachedFrame.cpp:
      (WebCore::CachedFrame::CachedFrame):
      
      Tell the DOMWindow to resume from the page cache:
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::open):
      
      * page/DOMWindow.cpp:
      (WebCore::DOMWindow::DOMWindow):
      (WebCore::DOMWindow::~DOMWindow): Call clearDOMWindowProperties directly instead of clear()
      (WebCore::DOMWindow::frameDestroyed): Ditto.
      (WebCore::DOMWindow::clear): Only clear if the DOMWindow is not suspended for the page cache.
      (WebCore::DOMWindow::suspendForPageCache): Disconnect properties and set the page cache flag.
      (WebCore::DOMWindow::resumeFromPageCache): Reconnect properties and revert the page cache flag.
      (WebCore::DOMWindow::disconnectDOMWindowProperties): Only disconnect the registered properties.
      (WebCore::DOMWindow::reconnectDOMWindowProperties):
      (WebCore::DOMWindow::clearDOMWindowProperties): Disconnect the registered properties then clear them out.
      
      For all of the following, if the DOMWindow is not displayed in a frame (i.e., it is suspended), do nothing:
      (WebCore::DOMWindow::screen):
      (WebCore::DOMWindow::history):
      (WebCore::DOMWindow::crypto):
      (WebCore::DOMWindow::locationbar):
      (WebCore::DOMWindow::menubar):
      (WebCore::DOMWindow::personalbar):
      (WebCore::DOMWindow::scrollbars):
      (WebCore::DOMWindow::statusbar):
      (WebCore::DOMWindow::toolbar):
      (WebCore::DOMWindow::console):
      (WebCore::DOMWindow::applicationCache):
      (WebCore::DOMWindow::navigator):
      (WebCore::DOMWindow::performance):
      (WebCore::DOMWindow::location):
      (WebCore::DOMWindow::sessionStorage):
      (WebCore::DOMWindow::localStorage):
      (WebCore::DOMWindow::webkitNotifications):
      (WebCore::DOMWindow::postMessageTimerFired):
      (WebCore::DOMWindow::getSelection):
      (WebCore::DOMWindow::styleMedia):
      (WebCore::DOMWindow::webkitStorageInfo):
      * page/DOMWindow.h:
      
      LayoutTests:
      
      * fast/loader/window-properties-restored-from-page-cache-expected.txt: Added.
      * fast/loader/window-properties-restored-from-page-cache.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@110570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      15d59b43
  5. 22 Feb, 2012 1 commit
    • abarth@webkit.org's avatar
      Frame and Navigator shouldn't need to worry about Geolocation · 047b877c
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=78860
      
      Reviewed by Eric Seidel.
      
      This patch removes some Geolocation-specific code from Frame and
      Navigator in favor of our new supplemental module mechanism.  We're
      still refining the module system, but we seem to be converging on a
      simple Observer/Supplement design.
      
      In a future patch, I'll move the remaining Geolocation-related files in
      WebCore into Modules/geolocation.  This patch appears to be the first
      patch that introduces a module used by all the various build systems,
      which is why there's a bit more build system overhead than usual.
      
      * Modules/geolocation: Added.
      * Modules/geolocation/NavigatorGeolocation.cpp: Added.
      (WebCore):
      (WebCore::NavigatorGeolocation::NavigatorGeolocation):
      (WebCore::NavigatorGeolocation::~NavigatorGeolocation):
      (WebCore::NavigatorGeolocation::pageDestroyed):
      (WebCore::NavigatorGeolocation::from):
      (WebCore::NavigatorGeolocation::geolocation):
      * Modules/geolocation/NavigatorGeolocation.h: Added.
      (WebCore):
      (NavigatorGeolocation):
      * Modules/geolocation/NavigatorGeolocation.idl: Added.
          - I've temporarily disabled this API for GObject because it generates
            a strange compile error.  Once I land this patch, I'll spend some
            more time fixing the compile error.
      * page/DOMWindow.cpp:
      (WebCore):
      * page/DOMWindow.h:
      (DOMWindow):
      * page/Frame.cpp:
      (WebCore::Frame::pageDestroyed):
      (WebCore::Frame::transferChildFrameToNewDocument):
      * page/FrameDestructionObserver.cpp:
      (WebCore::FrameDestructionObserver::pageDestroyed):
      (WebCore):
      * page/FrameDestructionObserver.h:
      (FrameDestructionObserver):
      * page/Navigator.cpp:
      (WebCore):
      * page/Navigator.h:
      (WebCore):
      (Navigator):
      * page/Navigator.idl:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108428 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      047b877c
  6. 07 Jan, 2012 1 commit
    • abarth@webkit.org's avatar
      Disconnecting DOMWindow properties is fragile and overly complicated · 84fe60e1
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=75699
      
      Reviewed by Alexey Proskuryakov.
      
      Previously, we had to carefully check every object tree hanging off of
      DOMWindow to make sure that every property correctly disconnected
      itself and all its subobjects from the Frame when the DOMWindow
      disconnected from the Frame.
      
      This patch introduces DOMWindowProperty, which is a base class that
      handles this work automagically, ensuring that we won't have any
      dangling Frame pointers and removing a bunch of boilerplate code.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * css/StyleMedia.cpp:
      (WebCore::StyleMedia::StyleMedia):
      * css/StyleMedia.h:
      (WebCore::StyleMedia::create):
      * loader/appcache/DOMApplicationCache.cpp:
      (WebCore::DOMApplicationCache::DOMApplicationCache):
      (WebCore::DOMApplicationCache::disconnectFrame):
      * loader/appcache/DOMApplicationCache.h:
      * page/BarInfo.cpp:
      (WebCore::BarInfo::BarInfo):
      * page/BarInfo.h:
      * page/Console.cpp:
      (WebCore::Console::Console):
      (WebCore::Console::memory):
      * page/Console.h:
      * page/DOMSelection.cpp:
      (WebCore::DOMSelection::DOMSelection):
      * page/DOMSelection.h:
      * page/DOMWindow.cpp:
      (WebCore::DOMWindow::registerProperty):
      (WebCore::DOMWindow::unregisterProperty):
      (WebCore::DOMWindow::clear):
      * page/DOMWindow.h:
      * page/Geolocation.cpp:
      (WebCore::Geolocation::Geolocation):
      (WebCore::Geolocation::disconnectFrame):
      * page/Geolocation.h:
      * page/History.cpp:
      (WebCore::History::History):
      * page/History.h:
      * page/Location.cpp:
      (WebCore::Location::Location):
      * page/Location.h:
      * page/Navigator.cpp:
      (WebCore::Navigator::Navigator):
      (WebCore::Navigator::~Navigator):
      * page/Navigator.h:
      * page/Performance.cpp:
      (WebCore::Performance::Performance):
      (WebCore::Performance::memory):
      * page/Performance.h:
      * page/PerformanceNavigation.cpp:
      (WebCore::PerformanceNavigation::PerformanceNavigation):
      * page/PerformanceNavigation.h:
      * page/PerformanceTiming.cpp:
      (WebCore::PerformanceTiming::PerformanceTiming):
      * page/PerformanceTiming.h:
      * page/Screen.cpp:
      (WebCore::Screen::Screen):
      * page/Screen.h:
      * plugins/DOMMimeTypeArray.cpp:
      (WebCore::DOMMimeTypeArray::DOMMimeTypeArray):
      * plugins/DOMMimeTypeArray.h:
      * plugins/DOMPluginArray.cpp:
      (WebCore::DOMPluginArray::DOMPluginArray):
      * plugins/DOMPluginArray.h:
      * storage/Storage.cpp:
      (WebCore::Storage::Storage):
      * storage/Storage.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@104380 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      84fe60e1
  7. 25 Oct, 2011 1 commit
    • ggaren@apple.com's avatar
      Removed SharedUChar and tightened language around its previous uses · 9894f0b6
      ggaren@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=70698
      
      Reviewed by David Levin.
      
      Source/JavaScriptCore: 
      
      - Removed SharedUChar because most of its functionality has moved into
      other abstraction layers, and we want remaining clients to choose their
      abstractions explicitly instead of relying on StringImpl to provide this
      behavior implicitly, since we think they can sometimes make more efficient
      choices.
      
      - Renamed "threadSafeCopy" and "crossThreadCopy" to "isolatedCopy" because
      the former names could give the impression that the resulting object was
      thread-safe, but actually it's just an isolated copy, which is not
      thread-safe by itself, but can be used to implement a thread-safe
      algorithm through isolation.
      
      * wtf/CrossThreadRefCounted.h: Removed.
      
      * JavaScriptCore.exp: Export!
      
      * wtf/text/StringImpl.cpp:
      (WTF::StringImpl::~StringImpl): Removed the stuff mentioned above.
      
      * wtf/text/StringImpl.h:
      (WTF::StringImpl::length): Ditto.
      
      (WTF::StringImpl::isolatedCopy): Inlined this, since it's now trivial.
      
      * wtf/text/WTFString.cpp:
      (WTF::String::isolatedCopy):
      * wtf/text/WTFString.h: Updated for StringImpl changes.
      
      * API/OpaqueJSString.h:
      * GNUmakefile.list.am:
      * JavaScriptCore.exp:
      * JavaScriptCore.gypi:
      * JavaScriptCore.order:
      * JavaScriptCore.vcproj/WTF/WTF.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * wtf/CMakeLists.txt:
      * wtf/OwnFastMallocPtr.h:
      * wtf/RefCounted.h:
      * wtf/SizeLimits.cpp:
      * wtf/ThreadSafeRefCounted.h:
      * wtf/wtf.pri:
      * yarr/YarrPattern.h: Updated these files to accomodate removal of
      CrossThreadRefCounted.h.
      
      Source/WebCore: 
      
      - Renamed "threadSafeCopy" and "crossThreadCopy" to "isolatedCopy" because
      the former names gave the dangerous misimpression that the resulting object
      was thread-safe, which is not true.
              
      - Updated a bunch of files for header dependency changes, now that
      CrossThreadRefCounted is gone.
      
      * ForwardingHeaders/wtf/CrossThreadRefCounted.h: Removed.
      * WebCore.exp.in:
      * bindings/js/ScriptHeapSnapshot.h:
      * bindings/v8/SerializedScriptValue.cpp:
      (WebCore::SerializedScriptValue::release):
      (WebCore::SerializedScriptValue::SerializedScriptValue):
      * css/CSSPropertySourceData.h:
      * css/CSSValue.h:
      * css/StyleMedia.h:
      * css/WebKitCSSMatrix.h:
      * dom/QualifiedName.h:
      * fileapi/LocalFileSystem.h:
      (WebCore::LocalFileSystem::SystemBasePath::operator String):
      * history/CachedFrame.h:
      * history/CachedPage.h:
      * history/HistoryItem.h:
      * html/canvas/CanvasStyle.h:
      * inspector/InspectorResourceAgent.h:
      * loader/FormState.h:
      * loader/TextResourceDecoder.h:
      * loader/WorkerThreadableLoader.cpp:
      (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
      * loader/icon/IconDatabase.cpp:
      (WebCore::IconDatabase::open):
      (WebCore::IconDatabase::synchronousIconForPageURL):
      (WebCore::IconDatabase::synchronousIconURLForPageURL):
      (WebCore::IconDatabase::retainIconForPageURL):
      (WebCore::IconDatabase::releaseIconForPageURL):
      (WebCore::IconDatabase::setIconDataForIconURL):
      (WebCore::IconDatabase::setIconURLForPageURL):
      (WebCore::IconDatabase::databasePath):
      (WebCore::IconDatabase::defaultDatabaseFilename):
      (WebCore::ImportedIconURLForPageURLWorkItem::ImportedIconURLForPageURLWorkItem):
      (WebCore::ImportedIconDataForPageURLWorkItem::ImportedIconDataForPageURLWorkItem):
      * page/ContentSecurityPolicy.h:
      * page/Coordinates.h:
      (WebCore::Coordinates::isolatedCopy):
      * page/Geoposition.h:
      (WebCore::Geoposition::isolatedCopy):
      * page/SecurityOrigin.cpp:
      (WebCore::SecurityOrigin::SecurityOrigin):
      (WebCore::SecurityOrigin::isolatedCopy):
      * page/SecurityOrigin.h:
      * page/animation/AnimationBase.h:
      * platform/CrossThreadCopier.cpp:
      (WebCore::::copy):
      * platform/FileChooser.h:
      * platform/KURL.cpp:
      (WebCore::KURL::copy):
      * platform/cf/SchedulePair.h:
      * platform/network/BlobData.cpp:
      (WebCore::BlobDataItem::detachFromCurrentThread):
      (WebCore::BlobData::detachFromCurrentThread):
      * platform/network/HTTPHeaderMap.cpp:
      (WebCore::HTTPHeaderMap::copyData):
      * platform/network/MIMEHeader.h:
      * platform/network/ResourceErrorBase.cpp:
      (WebCore::ResourceErrorBase::copy):
      * platform/network/ResourceLoadInfo.h:
      * platform/network/ResourceRequestBase.cpp:
      (WebCore::ResourceRequestBase::copyData):
      * platform/network/ResourceResponseBase.cpp:
      (WebCore::ResourceResponseBase::copyData):
      * platform/sql/SQLValue.cpp:
      (WebCore::SQLValue::SQLValue):
      (WebCore::SQLValue::string):
      * rendering/style/QuotesData.h:
      * storage/AbstractDatabase.cpp:
      (WebCore::updateGuidVersionMap):
      (WebCore::AbstractDatabase::AbstractDatabase):
      (WebCore::AbstractDatabase::performOpenAndVerify):
      (WebCore::AbstractDatabase::stringIdentifier):
      (WebCore::AbstractDatabase::displayName):
      (WebCore::AbstractDatabase::fileName):
      (WebCore::AbstractDatabase::setExpectedVersion):
      (WebCore::AbstractDatabase::getCachedVersion):
      * storage/ChangeVersionWrapper.cpp:
      (WebCore::ChangeVersionWrapper::ChangeVersionWrapper):
      * storage/Database.cpp:
      (WebCore::Database::Database):
      (WebCore::Database::tableNames):
      * storage/DatabaseDetails.h:
      * storage/DatabaseTracker.cpp:
      (WebCore::DatabaseTracker::setDatabaseDirectoryPath):
      (WebCore::DatabaseTracker::databaseDirectoryPath):
      (WebCore::DatabaseTracker::trackerDatabasePath):
      (WebCore::DatabaseTracker::canEstablishDatabase):
      (WebCore::DatabaseTracker::originPath):
      (WebCore::DatabaseTracker::fullPathForDatabase):
      (WebCore::DatabaseTracker::populateOrigins):
      (WebCore::DatabaseTracker::databaseNamesForOrigin):
      (WebCore::DatabaseTracker::addOpenDatabase):
      (WebCore::DatabaseTracker::setQuota):
      (WebCore::DatabaseTracker::recordCreatingDatabase):
      (WebCore::DatabaseTracker::recordDeletingDatabase):
      (WebCore::DatabaseTracker::recordDeletingOrigin):
      (WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged):
      * storage/OriginQuotaManager.cpp:
      (WebCore::OriginQuotaManager::trackOrigin):
      (WebCore::OriginQuotaManager::addDatabase):
      * storage/SQLError.h:
      (WebCore::SQLError::message):
      (WebCore::SQLError::SQLError):
      * storage/SQLResultSetRowList.h:
      * storage/SQLStatement.cpp:
      (WebCore::SQLStatement::SQLStatement):
      * storage/StorageAreaSync.cpp:
      (WebCore::StorageAreaSync::StorageAreaSync):
      (WebCore::StorageAreaSync::syncTimerFired):
      * storage/StorageAreaSync.h:
      * storage/StorageMap.cpp:
      (WebCore::StorageMap::importItem):
      * storage/StorageNamespaceImpl.cpp:
      (WebCore::StorageNamespaceImpl::StorageNamespaceImpl):
      * storage/StorageSyncManager.cpp:
      (WebCore::StorageSyncManager::StorageSyncManager):
      * storage/StorageTracker.cpp:
      (WebCore::StorageTracker::StorageTracker):
      (WebCore::StorageTracker::syncImportOriginIdentifiers):
      (WebCore::StorageTracker::syncFileSystemAndTrackerDatabase):
      (WebCore::StorageTracker::setOriginDetails):
      (WebCore::StorageTracker::willDeleteAllOrigins):
      * svg/SVGPathSeg.h:
      * workers/DefaultSharedWorkerRepository.cpp:
      (WebCore::SharedWorkerProxy::url):
      (WebCore::SharedWorkerProxy::name):
      (WebCore::SharedWorkerProxy::SharedWorkerProxy):
      (WebCore::DefaultSharedWorkerRepository::getProxy):
      * workers/SharedWorkerThread.cpp:
      (WebCore::SharedWorkerThread::SharedWorkerThread):
      * workers/WorkerMessagingProxy.cpp:
      (WebCore::WorkerExceptionTask::WorkerExceptionTask):
      (WebCore::PostMessageToPageInspectorTask::PostMessageToPageInspectorTask):
      * workers/WorkerRunLoop.cpp:
      (WebCore::WorkerRunLoop::postTaskForMode):
      (WebCore::WorkerRunLoop::Task::Task):
      * workers/WorkerThread.cpp:
      (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
      
      Source/WebKit/chromium: 
      
      - Renamed "threadSafeCopy" and "crossThreadCopy" to "isolatedCopy" because
      the former names gave the dangerous misimpression that the resulting object
      was thread-safe, which is not true.
      
      
      * src/WorkerFileSystemCallbacksBridge.cpp:
      
      Source/WebKit/mac: 
      
      - Renamed "threadSafeCopy" and "crossThreadCopy" to "isolatedCopy" because
      the former names gave the dangerous misimpression that the resulting object
      was thread-safe, which is not true.
      
      * Storage/WebDatabaseTrackerClient.mm:
      (DidModifyOriginData::dispatchToMainThread):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98316 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9894f0b6
  8. 19 Oct, 2011 1 commit
    • apavlov@chromium.org's avatar
      Strip trailing whitespace in the WebCore/css C++ code. · f684aecc
      apavlov@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=70410
      
      Reviewed by Dirk Schulze.
      
      Only affected file names retained below for brevity.
      Multiline boolean expression were fixed where necessary to avoid patch style violations.
      
      * css/CSSBorderImageSliceValue.cpp:
      * css/CSSBorderImageSliceValue.h:
      * css/CSSBorderImageValue.cpp:
      * css/CSSCanvasValue.cpp:
      * css/CSSCanvasValue.h:
      * css/CSSComputedStyleDeclaration.cpp:
      * css/CSSCursorImageValue.cpp:
      * css/CSSFontFace.cpp:
      * css/CSSFontFace.h:
      * css/CSSFontFaceSource.cpp:
      * css/CSSFontFaceSource.h:
      * css/CSSFontFaceSrcValue.cpp:
      * css/CSSFontFaceSrcValue.h:
      * css/CSSFontSelector.cpp:
      * css/CSSFontSelector.h:
      * css/CSSFunctionValue.cpp:
      * css/CSSFunctionValue.h:
      * css/CSSGradientValue.cpp:
      * css/CSSGradientValue.h:
      * css/CSSImageGeneratorValue.cpp:
      * css/CSSImageGeneratorValue.h:
      * css/CSSImageValue.cpp:
      * css/CSSImageValue.h:
      * css/CSSImportRule.cpp:
      * css/CSSInitialValue.cpp:
      * css/CSSInitialValue.h:
      * css/CSSMutableStyleDeclaration.cpp:
      * css/CSSMutableStyleDeclaration.h:
      * css/CSSParser.cpp:
      * css/CSSParser.h:
      * css/CSSParserValues.cpp:
      * css/CSSParserValues.h:
      * css/CSSPrimitiveValue.cpp:
      * css/CSSPrimitiveValue.h:
      * css/CSSPrimitiveValueCache.cpp:
      * css/CSSPrimitiveValueCache.h:
      * css/CSSPrimitiveValueMappings.h:
      * css/CSSProperty.cpp:
      * css/CSSProperty.h:
      * css/CSSPropertyLonghand.cpp:
      * css/CSSReflectValue.cpp:
      * css/CSSReflectValue.h:
      * css/CSSReflectionDirection.h:
      * css/CSSSegmentedFontFace.cpp:
      * css/CSSSegmentedFontFace.h:
      * css/CSSSelector.cpp:
      * css/CSSSelector.h:
      * css/CSSSelectorList.cpp:
      * css/CSSSelectorList.h:
      * css/CSSStyleApplyProperty.cpp:
      * css/CSSStyleDeclaration.h:
      * css/CSSStyleSelector.cpp:
      * css/CSSStyleSelector.h:
      * css/CSSStyleSheet.cpp:
      * css/CSSTimingFunctionValue.cpp:
      * css/CSSTimingFunctionValue.h:
      * css/CSSUnicodeRangeValue.cpp:
      * css/CSSUnicodeRangeValue.h:
      * css/CSSValueList.cpp:
      * css/CSSWrapShapes.cpp:
      * css/CSSWrapShapes.h:
      * css/FontValue.cpp:
      * css/MediaList.cpp:
      * css/MediaQuery.cpp:
      * css/MediaQuery.h:
      * css/MediaQueryEvaluator.h:
      * css/MediaQueryExp.cpp:
      * css/MediaQueryExp.h:
      * css/Pair.h:
      * css/SVGCSSComputedStyleDeclaration.cpp:
      * css/SVGCSSParser.cpp:
      * css/SVGCSSStyleSelector.cpp:
      * css/SelectorChecker.cpp:
      * css/SelectorChecker.h:
      * css/StyleBase.cpp:
      * css/StyleMedia.cpp:
      * css/StyleMedia.h:
      * css/StyleSheetList.cpp:
      * css/StyleSheetList.h:
      * css/WebKitCSSFilterValue.cpp:
      * css/WebKitCSSFilterValue.h:
      * css/WebKitCSSKeyframeRule.cpp:
      * css/WebKitCSSKeyframeRule.h:
      * css/WebKitCSSKeyframesRule.cpp:
      * css/WebKitCSSKeyframesRule.h:
      * css/WebKitCSSMatrix.cpp:
      * css/WebKitCSSMatrix.h:
      * css/WebKitCSSTransformValue.cpp:
      * css/WebKitCSSTransformValue.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97854 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f684aecc
  9. 23 Apr, 2011 3 commits
    • ggaren@apple.com's avatar
      2011-04-22 Geoffrey Garen <ggaren@apple.com> · ff7556d7
      ggaren@apple.com authored
              
              Rolled back in r84725 and r84728 with appcache crash fixed.
      
              Reviewed by Oliver Hunt.
      
              Removed a use of markDOMObjectWrapper: DOMWindow
              https://bugs.webkit.org/show_bug.cgi?id=59260
      
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::visitChildren): No need to mark explicitly, since
              we use the opaque roots system now.
      
              * bindings/js/JSNavigatorCustom.cpp: Ditto.
      
              * bindings/scripts/CodeGeneratorJS.pm: Added autogeneration for objects
              whose opaque roots are frames.
      
              * css/StyleMedia.h:
              (WebCore::StyleMedia::frame): Added an accessor for the sake of GC.
      
              * css/StyleMedia.idl:
              * loader/appcache/DOMApplicationCache.idl:
              * page/BarInfo.idl:
              * page/Console.idl:
              * page/DOMSelection.idl:
              * page/Geolocation.idl:
              * page/History.idl:
              * page/Location.idl:
              * page/Navigator.idl:
              * page/Screen.idl:
              * storage/Storage.idl: Updated to use the opaque roots system.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@84736 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ff7556d7
    • ossy@webkit.org's avatar
      2011-04-22 Sheriff Bot <webkit.review.bot@gmail.com> · 956bff65
      ossy@webkit.org authored
              Unreviewed, rolling out r84725 and r84728.
              http://trac.webkit.org/changeset/84725
              http://trac.webkit.org/changeset/84728
              https://bugs.webkit.org/show_bug.cgi?id=59270
      
              It broke http/tests/appcache tests (Requested by Ossy on
              #webkit).
      
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::visitChildren):
              * bindings/js/JSNavigatorCustom.cpp:
              (WebCore::JSNavigator::visitChildren):
              * bindings/scripts/CodeGeneratorJS.pm:
              * css/StyleMedia.h:
              * css/StyleMedia.idl:
              * loader/appcache/DOMApplicationCache.idl:
              * page/BarInfo.idl:
              * page/Console.idl:
              * page/DOMSelection.idl:
              * page/DOMWindow.h:
              (WebCore::DOMWindow::optionalScreen):
              (WebCore::DOMWindow::optionalSelection):
              (WebCore::DOMWindow::optionalHistory):
              (WebCore::DOMWindow::optionalCrypto):
              (WebCore::DOMWindow::optionalLocationbar):
              (WebCore::DOMWindow::optionalMenubar):
              (WebCore::DOMWindow::optionalPersonalbar):
              (WebCore::DOMWindow::optionalScrollbars):
              (WebCore::DOMWindow::optionalStatusbar):
              (WebCore::DOMWindow::optionalToolbar):
              (WebCore::DOMWindow::optionalConsole):
              (WebCore::DOMWindow::optionalNavigator):
              (WebCore::DOMWindow::optionalLocation):
              (WebCore::DOMWindow::optionalMedia):
              (WebCore::DOMWindow::optionalSessionStorage):
              (WebCore::DOMWindow::optionalLocalStorage):
              (WebCore::DOMWindow::optionalPerformance):
              * page/Geolocation.idl:
              * page/History.idl:
              * page/Location.idl:
              * page/Navigator.h:
              (WebCore::Navigator::optionalGeolocation):
              * page/Navigator.idl:
              * page/Screen.idl:
              * storage/Storage.idl:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@84731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      956bff65
    • ggaren@apple.com's avatar
      2011-04-22 Geoffrey Garen <ggaren@apple.com> · 1ef35ddd
      ggaren@apple.com authored
              Reviewed by Oliver Hunt.
      
              Removed a use of markDOMObjectWrapper: DOMWindow
              https://bugs.webkit.org/show_bug.cgi?id=59260
      
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::visitChildren): No need to mark explicitly, since
              we use the opaque roots system now.
      
              * bindings/js/JSNavigatorCustom.cpp: Ditto.
      
              * bindings/scripts/CodeGeneratorJS.pm: Added autogeneration for objects
              whose opaque roots are frames.
      
              * css/StyleMedia.h:
              (WebCore::StyleMedia::frame): Added an accessor for the sake of GC.
      
              * css/StyleMedia.idl:
              * loader/appcache/DOMApplicationCache.idl:
              * page/BarInfo.idl:
              * page/Console.idl:
              * page/DOMSelection.idl:
              * page/Geolocation.idl:
              * page/History.idl:
              * page/Location.idl:
              * page/Navigator.idl:
              * page/Screen.idl:
              * storage/Storage.idl: Updated to use the opaque roots system.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@84725 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1ef35ddd
  10. 08 Jan, 2011 1 commit
  11. 10 Jul, 2010 2 commits
  12. 23 Apr, 2010 1 commit
    • kenneth@webkit.org's avatar
      WebCore: Rename window.media to window.styleMedia · a4912d37
      kenneth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=36187
      
      Reviewed by Laszlo Gombos.
      
      Rename the interface Media to StyleMedia as required by the
      new CSSOM View spec.
      
      * Android.derived.jscbindings.mk:
      * Android.derived.v8bindings.mk:
      * GNUmakefile.am:
      * WebCore.gypi:
      * WebCore.pri:
      * WebCore.pro:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * css/Media.cpp: Removed.
      * css/Media.h: Removed.
      * css/Media.idl: Removed.
      * css/StyleMedia.cpp: Added.
      (WebCore::StyleMedia::StyleMedia):
      (WebCore::StyleMedia::type):
      (WebCore::StyleMedia::matchMedium):
      * css/StyleMedia.h: Added.
      (WebCore::StyleMedia::create):
      (WebCore::StyleMedia::disconnectFrame):
      * css/StyleMedia.idl: Added.
      * page/DOMWindow.cpp:
      (WebCore::DOMWindow::styleMedia):
      * page/DOMWindow.h:
      (WebCore::DOMWindow::optionalMedia):
      * page/DOMWindow.idl:
      
      LayoutTests: Updated test results as the interface Media was renamed
      to StyleMedia.
      
      Reviewed by NOBODY (OOPS!).
      
      * fast/dom/prototype-inheritance-2-expected.txt:
      * platform/win/fast/dom/prototype-inheritance-2-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@58168 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a4912d37
  13. 20 Jan, 2010 1 commit
    • ap@apple.com's avatar
      Reviewed by Simon Fraser. · fb6258c9
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=33913
              Crash under Media::matchMedium in detached frame
      
              Also took the opportunity to fix JS bindings for the Media object.
      
              Test: fast/media/lifetime.html
      
              * css/Media.h:
              (WebCore::Media::create): Take and store a Frame pointer, like other similar objects do.
              (WebCore::Media::disconnectFrame): Zero out the frame pointer (this is called from
              DOMWindow::clear()).
      
              * css/Media.cpp:
              (WebCore::Media::Media): Updated to storing Frame pointer.
              (WebCore::Media::type): Ditto.
              (WebCore::Media::matchMedium): Removed null check for document element - every document has
              one. Also, every Frame has a document, so we only need to check for m_frame being zero.
      
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::markChildren):
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::clear):
              (WebCore::DOMWindow::media):
              * page/DOMWindow.h:
              (WebCore::DOMWindow::optionalMedia):
              Make sure there's only one Media object per window, and keep its wrapper alive.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53555 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fb6258c9
  14. 07 Aug, 2009 1 commit
    • simon.fraser@apple.com's avatar
      2009-08-05 Simon Fraser <simon.fraser@apple.com> · 17e0fffc
      simon.fraser@apple.com authored
              Reviewed by Darin Adler.
      
              Implement the matchMedium method on the Media interface described in the CSSOM View Module.
              https://bugs.webkit.org/show_bug.cgi?id=22495
      
              Add a new Media interface, obtainable via the AbstractView, that can
              evaluate queries via its matchesMedium() method.
      
              Test: fast/media/matchmedium-query-api.html
      
              * DerivedSources.cpp:
              * DerivedSources.make:
              * GNUmakefile.am:
              * WebCore.gypi:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              Add Media.* files to the build.
      
              * css/Media.cpp: Added.
              (WebCore::Media::Media):
              (WebCore::Media::type):
              (WebCore::Media::matchMedium):
              * css/Media.h: Added.
              (WebCore::Media::create):
              (WebCore::Media::document):
              * css/Media.idl: Added.
              Media::matchMedium() uses a MediaQueryEvaluator() to test the query.
      
              * page/AbstractView.idl:
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::media):
              * page/DOMWindow.h:
              * page/DOMWindow.idl:
              Add a readonly attribute for Media.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46874 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      17e0fffc
  15. 17 Jul, 2009 1 commit
    • eric@webkit.org's avatar
      2009-07-14 Eric Seidel <eric@webkit.org> · 09dc0ee4
      eric@webkit.org authored
              Reviewed by Adam Barth.
      
              Some constructor objects exposed on Window have the wrong prototype chain
              https://bugs.webkit.org/show_bug.cgi?id=27276
      
              * fast/dom/prototype-inheritance-expected.txt: Added.
              * fast/dom/prototype-inheritance.html: Added.
              * fast/dom/resources/prototype-inheritance.js: Added.
      
      2009-07-14  Eric Seidel  <eric@webkit.org>
      
              Reviewed by Adam Barth.
      
              Some constructor objects exposed on Window have the wrong prototype chain
              https://bugs.webkit.org/show_bug.cgi?id=27276
      
              Several Constructor classes were already being passed a global object
              during construction, but they were ignoring it for prototype lookup.
              I've fixed those to use the passed global object instead.
      
              Most of these Constructor classes should just be auto-generated, but I
              refrained from changing them over to auto-gen in this patch.
      
              Fixed CodeGeneratorJS to pass a global object to getDOMConstructor when
              available, otherwise default to deprecatedGlobalObjectForPrototype(exec)
              to match existing behavior.
      
              Test: fast/dom/prototype-inheritance.html
      
              * bindings/js/JSAudioConstructor.cpp:
              (WebCore::JSAudioConstructor::JSAudioConstructor): use the existing globalObject pointer for prototype lookup
              * bindings/js/JSDOMBinding.h:
              (WebCore::deprecatedGlobalObjectForPrototype): Make it easy to detect where the wrong global object is being used.
              (WebCore::deprecatedGetDOMStructure):
              * bindings/js/JSDOMGlobalObject.h: remove error-prone getDOMConstructor, require passing JSDOMGlobalObject*
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::webKitPoint): pass "this" for the global object.
              (WebCore::JSDOMWindow::webKitCSSMatrix): pass "this" for the global object.
              (WebCore::JSDOMWindow::xsltProcessor): pass "this" for the global object.
              (WebCore::JSDOMWindow::worker): pass "this" for the global object.
              * bindings/js/JSImageConstructor.cpp:
              (WebCore::JSImageConstructor::JSImageConstructor): use the existing globalObject pointer for prototype lookup
              * bindings/js/JSMessageChannelConstructor.cpp:
              (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor): use the existing globalObject pointer for prototype lookup
              * bindings/js/JSOptionConstructor.cpp:
              (WebCore::JSOptionConstructor::JSOptionConstructor): use the existing globalObject pointer for prototype lookup
              * bindings/js/JSWebKitCSSMatrixConstructor.cpp:
              (WebCore::JSWebKitCSSMatrixConstructor::JSWebKitCSSMatrixConstructor): add new globalObject parameter and use it
              * bindings/js/JSWebKitCSSMatrixConstructor.h:
              * bindings/js/JSWebKitPointConstructor.cpp:
              (WebCore::JSWebKitPointConstructor::JSWebKitPointConstructor): add new globalObject parameter and use it
              * bindings/js/JSWebKitPointConstructor.h:
              * bindings/js/JSWorkerConstructor.cpp:
              (WebCore::JSWorkerConstructor::JSWorkerConstructor): add new globalObject parameter and use it
              * bindings/js/JSWorkerConstructor.h:
              * bindings/js/JSXMLHttpRequestConstructor.cpp:
              (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor): use the existing globalObject pointer for prototype lookup
               -- XMLHttpRequest constructor was also missing a length.  Added one.
              * bindings/js/JSXSLTProcessorConstructor.cpp:
              (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor):
              * bindings/js/JSXSLTProcessorConstructor.h:
              * bindings/scripts/CodeGeneratorJS.pm:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46068 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      09dc0ee4
  16. 15 Jul, 2009 1 commit
    • bfulgham@webkit.org's avatar
      WebCore: · c09b563d
      bfulgham@webkit.org authored
      2009-07-15  Yuzo Fujishima  <yuzo@google.com>
      
              Reviewed by Darin Adler.
      
              Test: fast/js/instanceof-operator.html
      
              Fix for: Bug 25205 -  XMLHttpRequest instance is not an instanceof XMLHttpRequest
              https://bugs.webkit.org/show_bug.cgi?id=25205
      
              In addition to for XMLHttpRequest, this also fixes for:
              - Audio
              - Image
              - MessageChannel
              - Option
              - WebKitCSSMatrix
              - WebKitPoint
              - Worker
              - XSLTProcessor
      
              * bindings/js/JSAudioConstructor.cpp:
              (WebCore::JSAudioConstructor::JSAudioConstructor):
              * bindings/js/JSAudioConstructor.h:
              * bindings/js/JSDOMBinding.h:
              (WebCore::DOMConstructorObject::createStructure):
              (WebCore::DOMConstructorObject::DOMConstructorObject):
              * bindings/js/JSImageConstructor.cpp:
              (WebCore::JSImageConstructor::JSImageConstructor):
              * bindings/js/JSImageConstructor.h:
              * bindings/js/JSMessageChannelConstructor.cpp:
              (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor):
              * bindings/js/JSMessageChannelConstructor.h:
              * bindings/js/JSOptionConstructor.cpp:
              (WebCore::JSOptionConstructor::JSOptionConstructor):
              * bindings/js/JSOptionConstructor.h:
              * bindings/js/JSWebKitCSSMatrixConstructor.cpp:
              (WebCore::JSWebKitCSSMatrixConstructor::JSWebKitCSSMatrixConstructor):
              * bindings/js/JSWebKitCSSMatrixConstructor.h:
              * bindings/js/JSWebKitPointConstructor.cpp:
              (WebCore::JSWebKitPointConstructor::JSWebKitPointConstructor):
              * bindings/js/JSWebKitPointConstructor.h:
              * bindings/js/JSWorkerConstructor.cpp:
              (WebCore::JSWorkerConstructor::JSWorkerConstructor):
              * bindings/js/JSWorkerConstructor.h:
              * bindings/js/JSXMLHttpRequestConstructor.cpp:
              (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
              * bindings/js/JSXMLHttpRequestConstructor.h:
              * bindings/js/JSXSLTProcessorConstructor.cpp:
              (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor):
              * bindings/js/JSXSLTProcessorConstructor.h:
      
      LayoutTests:
      
      2009-07-15  Yuzo Fujishima  <yuzo@google.com>
      
              Reviewed by Darin Adler.
      
              Fix for: Bug 25205 -  XMLHttpRequest instance is not an instanceof XMLHttpRequest
              https://bugs.webkit.org/show_bug.cgi?id=25205
      
              In addition to for XMLHttpRequest, this also fixes for:
              - Audio
              - Image
              - MessageChannel
              - Option
              - WebKitCSSMatrix
              - WebKitPoint
              - Worker
              - XSLTProcessor
      
              * fast/js/instanceof-operator-expected.txt: Added.
              * fast/js/instanceof-operator.html: Added.
              * fast/js/resources/instanceof-operator-dummy-worker.js: Added.
              * fast/js/resources/instanceof-operator.js: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45938 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c09b563d
  17. 25 Feb, 2009 1 commit
  18. 15 Jan, 2009 1 commit
  19. 29 Jul, 2008 1 commit
    • adele@apple.com's avatar
      WebCore: · da72583e
      adele@apple.com authored
      2008-07-29  Adele Peterson  <adele@apple.com>
      
              Reviewed by Sammy Weinig.
      
              Fix for <rdar://problem/6103024>
              When a QT movie is loaded directly in the browser, I can't pause it by single-clicking on the video
      
              Test: media/video-click-dlbclick-standalone.html
      
              * loader/MediaDocument.cpp: (WebCore::MediaDocument::defaultEventHandler): For standalone media documents,
              match the default Quicktime plugin behavior to allow clicking and double-clicking to pause and play the media.
              * loader/MediaDocument.h: Added defaultEventHandler.
      
              * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::defaultEventHandler): Return early if the event has been handled.
              * rendering/MediaControlElements.cpp:
              (WebCore::MediaControlMuteButtonElement::defaultEventHandler): Correct what was probably a typo.  Instead of "event->defaultHandled()",
               it is supposed to be "event->setDefaultHandled()".
              (WebCore::MediaControlPlayButtonElement::defaultEventHandler): ditto.
              (WebCore::MediaControlSeekButtonElement::defaultEventHandler): ditto.
              (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler): ditto.
      
      LayoutTests:
      
      2008-07-29  Adele Peterson  <adele@apple.com>
      
              Reviewed by Sammy Weinig.
      
              Test for <rdar://problem/6103024>
              When a QT movie is loaded directly in the browser, I can't pause it by single-clicking on the video
      
              * media/video-click-dlbclick-standalone-expected.txt: Added.
              * media/video-click-dlbclick-standalone.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@35429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      da72583e
  20. 18 Jun, 2008 2 commits
    • adele@apple.com's avatar
      2008-06-17 Adele Peterson <adele@apple.com> · ebfa99aa
      adele@apple.com authored
              Attempt to fix builds by wrapping new code in #if ENABLE(VIDEO)
      
              * loader/MediaDocument.cpp:
              * loader/MediaDocument.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34639 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ebfa99aa
    • adele@apple.com's avatar
      2008-06-17 Adele Peterson <adele@apple.com> · a03a0ef4
      adele@apple.com authored
              Reviewed by Brady.
      
              Fix for <rdar://problem/5605768> Render full-page video/audio with <video>/<audio> instead of QuickTime plug-in
      
              * WebCore.xcodeproj/project.pbxproj: Added MediaDocument class.
              * GNUmakefile.am: ditto.
              * WebCore.pro: ditto.
              * WebCore.vcproj/WebCore.vcproj: ditto.
              * WebCoreSources.bkl: ditto.
      
              * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::createDocument):
                Check to see if the type can be played by our MediaPlayer, if so create a MediaDocument
              * dom/Document.h: (WebCore::Document::isMediaDocument): Added.
      
              * loader/MediaDocument.cpp: Added.
              (WebCore::MediaTokenizer::MediaTokenizer):
              (WebCore::MediaTokenizer::wantsRawData):
              (WebCore::MediaTokenizer::write):
              (WebCore::MediaTokenizer::createDocumentStructure):
              (WebCore::MediaTokenizer::writeRawData):
              (WebCore::MediaTokenizer::stopParsing):
              (WebCore::MediaTokenizer::finish):
              (WebCore::MediaTokenizer::isWaitingForScripts):
              (WebCore::MediaDocument::MediaDocument):
              (WebCore::MediaDocument::createTokenizer):
              * loader/MediaDocument.h: Added.
              (WebCore::MediaDocument::create):
              (WebCore::MediaDocument::isMediaDocument):
      
              * page/InspectorController.cpp: (WebCore::getResourceDocumentNode):
                Added MediaDocument case so it is handled the same as a PluginDocument or ImageDocument.
              * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::supportsType): Added.
              * platform/graphics/MediaPlayer.h:
              * rendering/RenderMedia.cpp: (WebCore::RenderMedia::updateControlVisibility):
                Instead of checking the html element to decide if the media is audio, check the player.
                This means that if a video element actually only contains audio, then we will still avoid fading the controls in and out.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a03a0ef4
  21. 26 May, 2008 1 commit
    • andersca@apple.com's avatar
      2008-05-26 Anders Carlsson <andersca@apple.com> · 4292302b
      andersca@apple.com authored
              Reviewed by Sam.
      
              This patch does two things:
              
              * It adds a toJSNewlyCreated function for creating JS wrappers for nodes where we know
              that the node doesn't have a wrapper. This avoids a hash lookup.
              
              * It adds toJSNewlyCreated methods for JSElement and JSText. 
              
              All in all this is a 4.3% speedup on Acid 3 test 26.
              
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/js/JSElementCustom.cpp:
              (WebCore::toJSNewlyCreated):
              * bindings/js/JSNodeCustom.cpp:
              (WebCore::createWrapper):
              (WebCore::toJSNewlyCreated):
              (WebCore::toJS):
              * bindings/js/JSTextCustom.cpp: Added.
              (WebCore::toJSNewlyCreated):
              * bindings/scripts/CodeGeneratorJS.pm:
              * dom/Document.idl:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4292302b
  22. 13 May, 2008 1 commit
    • timothy@apple.com's avatar
      Adds an event loop abstraction to platform. This abstraction will be · a9922b67
      timothy@apple.com authored
      used by the JavaScriptDebugServer to implement pausing.
      
      Reviewed by Kevin McCullough.
      
      * platform/EventLoop.h: Added.
      (WebCore::EventLoop::EventLoop):
      (WebCore::EventLoop::ended): Return m_ended.
      * platform/mac/EventLoopMac.mm: Added.
      (WebCore::EventLoop::cycle): Call nextEventMatchingMask and then sendEvent.
      * platform/win/EventLoopWin.cpp: Added.
      (WebCore::EventLoop::cycle): Call GetMessage, TranslateMessage and DispatchMessage.
      * WebCore.xcodeproj/project.pbxproj: Add new files.
      * WebCore.vcproj/WebCore.vcproj: Ditto.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33400 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a9922b67
  23. 21 Apr, 2008 1 commit
    • timothy@apple.com's avatar
      Adds the UI portions of the Scripts panel to the Web Inspector. · fd501dfc
      timothy@apple.com authored
      The Scripts panel has not been added to the toolbar yet.
      
      https://bugs.webkit.org/show_bug.cgi?id=18601
      
      Reviewed by Adam Roben.
      
      * English.lproj/InspectorLocalizedStrings.js: Changed "Show inherited properties"
      to "Show inherited". Adds new strings for the Scripts' panel tooltips.
      * page/inspector/BreakpointsSidebarPane.js: Added.
      * page/inspector/CallStackSidebarPane.js: Added.
      * page/inspector/Images/back.png: Added.
      * page/inspector/Images/debuggerContinue.png: Added.
      * page/inspector/Images/debuggerPause.png: Added.
      * page/inspector/Images/debuggerStepInto.png: Added.
      * page/inspector/Images/debuggerStepOut.png: Added.
      * page/inspector/Images/debuggerStepOver.png: Added.
      * page/inspector/Images/forward.png: Added.
      * page/inspector/Images/statusbarResizerHorizontal.png: Added.
      * page/inspector/PropertiesSection.js:
      (WebInspector.PropertiesSection): Flip the order the subtile is appended
      so it can float right in the CSS.
      * page/inspector/ScriptsPanel.js: Added.
      * page/inspector/StylesSidebarPane.js:
      (WebInspector.StylePropertiesSection): Changed "Show inherited properties"
      to "Show inherited".
      * page/inspector/inspector.css: Added new CSS rules for the Scripts panel.
      Also changes the look of the section to match the mockup, this affects
      Styles and Properties in Elements.
      * page/inspector/inspector.html: Import new files.
      * page/inspector/inspector.js:
      (Preferences.minScriptsSidebarWidth): Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32343 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fd501dfc
  24. 19 Apr, 2008 1 commit
    • jhoneycutt@apple.com's avatar
      2008-04-17 Jon Honeycutt <jhoneycutt@apple.com> · 2904f97b
      jhoneycutt@apple.com authored
              Reviewed by Darin.
      
              Return an AccessibleDocument when our root accessible object is queried
              for.
      
              * AccessibleDocument.cpp: Added; represents an AccessibilityObject that
              itself represents a Document.
              (AccessibleDocument::AccessibleDocument): Initialize AccessibleBase with
              the AccessibilityObject for this Document.
              * AccessibleDocument.h: Added.
              * WebFrame.cpp:
              (WebFrame::accessible): If m_accessible is 0, or if Document in this
              frame does not match the Document in the cached m_accessible object,
              create a new AccessibleDocument for this frame's Document.
              * WebFrame.h: Swap AccessibleBase.h for AccessibleDocument.h
              * WebKit.vcproj/WebKit.vcproj: Add AccessibleDocument.{h,cpp}
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32250 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2904f97b
  25. 16 Apr, 2008 1 commit
    • andersca@apple.com's avatar
      2008-04-16 Anders Carlsson <andersca@apple.com> · c6839d1c
      andersca@apple.com authored
              Reviewed by Adam.
      
              Generate the DOMApplicationCache JS wrapper, add JSDOMApplicationCacheCustom.cpp and 
              fix typos in the #if line.
              
              * DerivedSources.make:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/js/JSDOMApplicationCacheCustom.cpp: Added.
              * loader/appcache/ApplicationCache.cpp:
              * loader/appcache/ApplicationCache.h:
              * loader/appcache/ApplicationCacheGroup.cpp:
              * loader/appcache/ApplicationCacheGroup.h:
              * loader/appcache/ApplicationCacheResource.cpp:
              * loader/appcache/ApplicationCacheResource.h:
              * loader/appcache/DOMApplicationCache.cpp:
              * loader/appcache/DOMApplicationCache.h:
              * loader/appcache/DOMApplicationCache.idl:
              * loader/appcache/ManifestParser.cpp:
              * loader/appcache/ManifestParser.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c6839d1c
  26. 15 Apr, 2008 1 commit
    • andersca@apple.com's avatar
      JavaScriptCore: · b8666938
      andersca@apple.com authored
      2008-04-15  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by Adam.
      
              Add ENABLE_OFFLINE_WEB_APPLICATIONS to FEATURE_DEFINES.
              
              * Configurations/JavaScriptCore.xcconfig:
      
      WebCore:
      
      2008-04-15  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by Adam.
      
              Add empty files for the application cache.
              
              * Configurations/WebCore.xcconfig:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.vcproj/build-generated-files.sh:
              Add ENABLE_OFFLINE_WEB_APPLICATIONS to FEATURE_DEFINES.
              
              * WebCore.xcodeproj/project.pbxproj:
              * loader/appcache: Added.
              * loader/appcache/ApplicationCache.cpp: Added.
              * loader/appcache/ApplicationCache.h: Added.
              * loader/appcache/ApplicationCacheGroup.cpp: Added.
              * loader/appcache/ApplicationCacheGroup.h: Added.
              * loader/appcache/ApplicationCacheResource.cpp: Added.
              * loader/appcache/ApplicationCacheResource.h: Added.
              * loader/appcache/DOMApplicationCache.cpp: Added.
              * loader/appcache/DOMApplicationCache.h: Added.
              * loader/appcache/DOMApplicationCache.idl: Added.
              * loader/appcache/ManifestParser.cpp: Added.
              * loader/appcache/ManifestParser.h: Added.
      
      WebKit/mac:
      
      2008-04-15  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by Adam.
      
              Add ENABLE_OFFLINE_WEB_APPLICATIONS to FEATURE_DEFINES.
      
              * Configurations/WebKit.xcconfig:
      
      WebKit/win:
      
      2008-04-15  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by Adam.
      
              Add ENABLE_OFFLINE_WEB_APPLICATIONS to FEATURE_DEFINES.
      
              * WebKit.vcproj/WebKit.vcproj:
      
      WebKitTools:
      
      2008-04-15  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by Adam.
      
              Add ENABLE_OFFLINE_WEB_APPLICATIONS to FEATURE_DEFINES.
      
              * Scripts/build-webkit:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31923 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b8666938
  27. 23 Feb, 2008 1 commit
    • ddkilzer@apple.com's avatar
      WebCore: · 267da135
      ddkilzer@apple.com authored
              Please clarify licensing for some files
              <http://bugs.webkit.org/show_bug.cgi?id=14970>
      
              Reviewed by Darin.
      
              * bindings/objc/WebScriptObject.h: Added Apple BSD-style license.
              * bindings/objc/WebScriptObjectPrivate.h: Ditto.
              * platform/text/mac/ShapeArabic.c: Added ICU license from WebCore/icu/LICENSE.
      
      WebKit/mac:
      
              Please clarify licensing for some files
              <http://bugs.webkit.org/show_bug.cgi?id=14970>
      
              Reviewed by Darin.
      
              * Plugins/WebNetscapeDeprecatedFunctions.c: Updated copyright statement
              and added Apple BSD-style license.
              * Plugins/WebNetscapeDeprecatedFunctions.h: Ditto.
      
      WebKitTools:
      
              Please clarify licensing for some files
              <http://bugs.webkit.org/show_bug.cgi?id=14970>
      
              Reviewed by Darin.
      
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp: Added
              copyright statement.  Replaced license with newer Apple BSD-style license.
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h: Ditto.
              * DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.cpp: Ditto.
              * DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.h: Ditto.
              * DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp: Ditto.
              * DumpRenderTree/win/TestNetscapePlugin/main.c: Ditto.
              * mangleme/LICENSE: Added (LGPL).
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30520 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      267da135
  28. 30 Mar, 2007 2 commits
    • andersca's avatar
      Reviewed by Geoff. · b5e193f8
      andersca authored
              * DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.c:
              (testAllocate):
              (testEnumerate):
              Add casts.
              
              * DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.h:
              Don't use #import, use #include.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20619 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b5e193f8
    • andersca's avatar
      JavaScriptCore: · 77d5e0d0
      andersca authored
              Reviewed by Geoff.
      
              Implement _NPN_Enumerate support.
              
              * JavaScriptCore.exp:
              * bindings/NP_jsobject.cpp:
              (_NPN_Enumerate):
              * bindings/c/c_instance.cpp:
              (KJS::Bindings::CInstance::getPropertyNames):
              * bindings/c/c_instance.h:
              * bindings/npapi.h:
              * bindings/npruntime.h:
              * bindings/npruntime_impl.h:
              * bindings/runtime.h:
              (KJS::Bindings::Instance::getPropertyNames):
              * bindings/runtime_object.cpp:
              (RuntimeObjectImp::getPropertyNames):
              * bindings/runtime_object.h:
              (KJS::RuntimeObjectImp::getInternalInstance):
      
      LayoutTests:
      
              Reviewed by Geoff.
      
              Add enumeration test.
              
              * plugins/netscape-enumerate-expected.txt: Added.
              * plugins/netscape-enumerate.html: Added.
      
      WebKit:
      
              Reviewed by Geoff.
      
              * Plugins/WebNetscapePluginPackage.m:
              (-[WebNetscapePluginPackage load]):
              Initialize pushpopupsenabledstate, poppopupsenabledstate and enumerate.
              
              * Plugins/npapi.m:
              (NPN_PushPopupsEnabledState):
              (NPN_PopPopupsEnabledState):
              Add stubs for these functions.
              
              * Plugins/npfunctions.h:
              Add new methods to NPNetscapeFuncs.
      
      WebKitTools:
      
              Reviewed by Geoff.
      
              * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
              Add TestObject.c and TestObject.h
              
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
              (pluginGetProperty):
              Implement the testObject property.
              
              (pluginInvoke):
              Implement testEnumerate which takes an object and an array and enumerates
              the properties of the object and adds them to the array.
              
              (pluginAllocate):
              Allocate the test object.
              
              (pluginDeallocate):
              Free the test object.
              
              * DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.c: Added.
              * DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.h: Added.
              Add a test object with two enumerable properties.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20613 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      77d5e0d0
  29. 29 Mar, 2007 1 commit
    • ggaren's avatar
      LayoutTests: · 2663f9a7
      ggaren authored
              Reviewed by Beth Dakin.
              
              Layout test for <rdar://problem/5091330> REGRESSION: Repro crash in 
              -[WebBaseNetscapePluginView(WebNPPCallbacks) destroyStream:reason:] 
              navigating away from page with DivX movie plug-in (13203)
      
              * plugins/destroy-stream-twice-expected.txt: Added.
              * plugins/destroy-stream-twice.html: Added.
      
      WebKit:
      
              Reviewed by Beth Dakin, reviewed by Maciej Stachowiak.
              
              Layout test for <rdar://problem/5091330> REGRESSION: Repro crash in 
              -[WebBaseNetscapePluginView(WebNPPCallbacks) destroyStream:reason:] 
              navigating away from page with DivX movie plug-in (13203)
              
              Changed LOG_ERROR to LOG so the layout test doesn't produce console spew
              every time you run it.
      
              * Plugins/WebBaseNetscapePluginView.mm:
              (-[WebBaseNetscapePluginView destroyStream:reason:]):
      
      WebKitTools:
      
              Reviewed by Beth Dakin.
              
              Layout test for <rdar://problem/5091330> REGRESSION: Repro crash in 
              -[WebBaseNetscapePluginView(WebNPPCallbacks) destroyStream:reason:] 
              navigating away from page with DivX movie plug-in (13203)
              
              Added hasStream property and destroyStream function, used by layout test.
      
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
              (pluginGetProperty):
              (pluginInvoke):
              (pluginAllocate):
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h:
              * DumpRenderTree/TestNetscapePlugIn.subproj/main.c:
              (NPP_NewStream):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2663f9a7
  30. 05 Mar, 2007 1 commit
    • andersca's avatar
      LayoutTests: · 526c36f0
      andersca authored
              Reviewed by Adam, Darin.
      
              <rdar://problem/5025212>
              In Mail, a crash occurs at WebCore::Frame::tree() when clicking on embedded flash object
      
              * plugins/get-url-with-blank-target-expected.txt: Added.
              * plugins/get-url-with-blank-target.html: Added.
      
      WebKit:
      
              Reviewed by Adam, Darin.
       
              <rdar://problem/5025212>
              In Mail, a crash occurs at WebCore::Frame::tree() when clicking on embedded flash object
      
              * Plugins/WebBaseNetscapePluginView.mm:
              (-[WebBaseNetscapePluginView loadPluginRequest:]):
              Handle the case where the web view returned from the delegate method is null. Also, send out an error notification
              in that case so we can catch it.
      
      WebKitTools:
      
              Reviewed by Adam, Darin.
      
              <rdar://problem/5025212>
              In Mail, a crash occurs at WebCore::Frame::tree() when clicking on embedded flash object
              
              Add a "getURLNotify" method to the plugin object. This lets you pass a URL, a target and a callback function
              to be run when the URL has finished (or failed) loading.
              
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
              (pluginInvoke):
              (handleCallback):
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h:
              * DumpRenderTree/TestNetscapePlugIn.subproj/main.c:
              (NPP_URLNotify):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19966 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      526c36f0
  31. 06 Nov, 2006 1 commit
    • ap's avatar
      Reviewed by Maciej. · fdfb9d6f
      ap authored
              http://bugs.webkit.org/show_bug.cgi?id=11517
              REGRESSION: Flash clicks/interactivity not working properly
      
      WebCore:
              * bridge/mac/FrameMac.mm:
              (WebCore::FrameMac::handleMouseMoveEvent):
              (WebCore::FrameMac::handleMouseReleaseEvent):
              Restore parts of event dispatching that were removed when fixing
              bug 7323 - just bypass those for subframes.
      
      WebKitTools:
              Teach TestNetscapePlugin to log events passed to it. To enable, set eventLoggingEnabled to true:
      
              <embed name="plg" type="application/x-webkit-test-netscape" width=100 height=100></embed>
              <script>
                  plg.eventLoggingEnabled = true;
                  // use eventSender to simulate events...
              </script>
      
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
              (pluginGetProperty):
              (pluginSetProperty):
              (pluginAllocate):
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h:
              * DumpRenderTree/TestNetscapePlugIn.subproj/main.c:
              (NPP_HandleEvent):
      
      LayoutTests:
              * plugins/mouse-events-expected.txt: Added.
              * plugins/mouse-events.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@17611 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fdfb9d6f
  32. 09 Mar, 2006 1 commit
    • darin's avatar
      Reviewed by John Sullivan. · 24fbf130
      darin authored
              - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7681
                memory leak in the plug-in tests
      
              * DumpRenderTree/TestNetscapePlugIn.subproj/main.c:
              (NPP_Destroy): Added code to release the plug-in object. This is the leak fix.
              (NPP_SetWindow): Remove unneeded code to store the window pointer.
      
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
              Moved the browser global in here since it's declared in this file's header.
              Changed the code to set up the pluginClass structure to not use function
              pointer casts. Those are dangerous because they can hide many types of mismatch.
              And indeed when I did this I discovered that many functions were missing their
              boolean return values or had parameter declarations with the wrong types.
              (pluginGetProperty): Use STRINGZ_TO_NPVARIANT macro for greater simplicity and
              clarity. Added boolean return value: return true when successful and false when not.
              (pluginSetProperty): Added boolean return value, return false since we have no
              properties we can set.
              (pluginInvoke): Added boolean return value. Return true when successful and false
              when not. Use NPVARIANT macros where appropriate. Added a missing release for the
              return value from calling the browser. Changed code to put the strings in malloc
              buffers instead of relying on GCC's extension that allows variable-sized arrays
              on the stack.
              (pluginInvokeDefault): Added boolean return value, return false since we have no
              default function to call.
              (pluginInvalidate): Added missing parameter. Removed comment.
              (pluginAllocate): Removed unneeded cast. This is C code, not C++, so you don't have
              to cast the result of malloc.
              (pluginDeallocate): Removed uneeded cast.
      
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h: Removed some unneeded
              includes. Changed our PluginObject to use NPObject instead of re-declaring fields
              that match NPObject's fields. Removed unused NPWindow pointer.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13233 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      24fbf130
  33. 05 Jan, 2006 1 commit
    • ggaren's avatar
      LayoutTests: · 7dd73f87
      ggaren authored
              Layout test for http://bugzilla.opendarwin.org/show_bug.cgi?id=6318
              REGRESSION: Repro crash in JS called from Flash on bdash.net.nz
      
              * fast/plugins/netscape-back-forward-expected.txt: Added.
              * fast/plugins/netscape-back-forward.html: Added.
              * fast/plugins/resources/go-back.html: Added.
      
      WebKit:
      
              Reviewed by Darin.
      
              - Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=6361
              Add plugin support to DumpRenderTree
      
              * WebKit.exp: export WebPluginDatabase class, which DumpRenderTree
              needs to add plugins to the runtime.
      
      WebKitTools:
      
              Reviewed by darin.
      
              - Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=6361
              Add plugin support to DumpRenderTree
      
              Also wrote first test plugin.
      
              * DumpRenderTree/DumpRenderTree.m:
              (main):
              (1) Put the WebView in an invisible window, because PlugIns are
              optimized not to load if there's no parent window.
              (2) Tell WebKit to load any PlugIns in the directory from which we
              loaded. This means we can build nasty PlugIns alongside DumpRenderTree
              and they'll load automagically during layout testing, but they won't be
              added to the user's system, hosing apps like Safari.
      
              * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Added new
              test PlugIn to project.
      
              PlugIn added to project:
      
              * DumpRenderTree/TestNetscapePlugIn.subproj/Info.plist: Added.
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c: Added.
              (getPluginClass):
              (initializeIdentifiers):
              (pluginHasProperty):
              (pluginHasMethod):
              (pluginGetProperty):
              (pluginSetProperty):
              (pluginInvoke):
              (pluginInvokeDefault):
              (pluginInvalidate):
              (pluginAllocate):
              (pluginDeallocate):
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h: Added.
              * DumpRenderTree/TestNetscapePlugIn.subproj/main.c: Added.
              (NP_Initialize):
              (NP_GetEntryPoints):
              (NP_Shutdown):
              (NPP_New):
              (NPP_Destroy):
              (NPP_SetWindow):
              (NPP_NewStream):
              (NPP_DestroyStream):
              (NPP_WriteReady):
              (NPP_Write):
              (NPP_StreamAsFile):
              (NPP_Print):
              (NPP_HandleEvent):
              (NPP_URLNotify):
              (NPP_GetValue):
              (NPP_SetValue):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11885 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7dd73f87