1. 12 May, 2011 1 commit
    • tonyg@chromium.org's avatar
      2011-05-10 Tony Gentilcore <tonyg@chromium.org> · 4b0a55f4
      tonyg@chromium.org authored
              Reviewed by Darin Adler.
      
              Perform some forward declarations suggested by include-what-you-use
              https://bugs.webkit.org/show_bug.cgi?id=60545
      
              * accessibility/AccessibilityObject.cpp:
              * accessibility/AccessibilityRenderObject.cpp:
              * accessibility/mac/AccessibilityObjectWrapper.mm:
              * dom/DocumentMarkerController.cpp:
              * dom/Position.cpp:
              * dom/PositionIterator.cpp:
              * dom/Range.cpp:
              * editing/ApplyBlockElementCommand.cpp:
              * editing/ApplyStyleCommand.cpp:
              * editing/Editor.cpp:
              * editing/EditorCommand.cpp:
              * editing/FrameSelection.cpp:
              * editing/HTMLInterchange.cpp:
              * editing/IndentOutdentCommand.cpp:
              * editing/ReplaceSelectionCommand.cpp:
              * editing/SpellChecker.h:
              * editing/SpellingCorrectionCommand.cpp:
              * editing/SpellingCorrectionController.h:
              * editing/TextCheckingHelper.cpp:
              * editing/TextIterator.h:
              * editing/htmlediting.h:
              * editing/markup.cpp:
              * editing/visible_units.cpp:
              * editing/visible_units.h:
              * fileapi/DOMFileSystem.cpp:
              * fileapi/DirectoryReaderSync.cpp:
              * fileapi/DirectoryReaderSync.h:
              * fileapi/FileEntry.h:
              * fileapi/FileWriter.h:
              * fileapi/FileWriterBase.h:
              * fileapi/FileWriterSync.h:
              * history/CachedFrame.cpp:
              * history/CachedPage.cpp:
              * history/HistoryItem.cpp:
              * history/HistoryItem.h:
              * history/PageCache.h:
              * loader/HistoryController.h:
              * loader/PingLoader.h:
              * loader/ResourceLoader.h:
              * loader/appcache/DOMApplicationCache.h:
              * loader/cache/CachedCSSStyleSheet.h:
              * loader/cache/CachedFont.cpp:
              * loader/cache/CachedFont.h:
              * loader/cache/CachedResourceRequest.cpp:
              * loader/cache/CachedResourceRequest.h:
              * loader/cache/MemoryCache.h:
              * notifications/Notification.cpp:
              * notifications/Notification.h:
              * notifications/NotificationCenter.cpp:
              * notifications/NotificationCenter.h:
              * page/Chrome.cpp:
              * page/Chrome.h:
              * page/DOMSelection.cpp:
              * page/DOMTimer.h:
              * page/DOMWindow.cpp:
              * page/EventHandler.cpp:
              * page/FocusController.h:
              * page/Geolocation.cpp:
              * page/Geolocation.h:
              * page/History.cpp:
              * rendering/RenderListBox.cpp:
              * workers/WorkerContext.cpp:
      2011-05-10  Tony Gentilcore  <tonyg@chromium.org>
      
              Reviewed by Darin Adler.
      
              Perform some forward declarations suggested by include-what-you-use
              https://bugs.webkit.org/show_bug.cgi?id=60545
      
              * src/WebHistoryItem.cpp:
              * src/WebNotification.cpp:
              * src/WebTextCheckingCompletionImpl.cpp:
              * src/mac/WebSubstringUtil.mm:
      2011-05-10  Tony Gentilcore  <tonyg@chromium.org>
      
              Reviewed by Darin Adler.
      
              Perform some forward declarations suggested by include-what-you-use
              https://bugs.webkit.org/show_bug.cgi?id=60545
      
              * Plugins/Hosted/WebHostedNetscapePluginView.mm:
              * WebView/WebFrame.mm:
      2011-05-10  Tony Gentilcore  <tonyg@chromium.org>
      
              Reviewed by Darin Adler.
      
              Perform some forward declarations suggested by include-what-you-use
              https://bugs.webkit.org/show_bug.cgi?id=60545
      
              * WebProcess/WebPage/mac/WebPageMac.mm:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86325 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4b0a55f4
  2. 20 Apr, 2011 1 commit
    • aestes@apple.com's avatar
      2011-04-20 Andy Estes <aestes@apple.com> · 4f822f24
      aestes@apple.com authored
              Reviewed by Maciej Stachowiak.
      
              REGRESSION (WK2): Animated GIF stops when navigating forward, back
              https://bugs.webkit.org/show_bug.cgi?id=59042
      
              * fast/images/animated-gif-restored-from-bfcache-expected.txt: Added.
              * fast/images/animated-gif-restored-from-bfcache.html: Added.
              * fast/images/resources/animated-10color.gif: Added.
              * platform/mac-wk2/Skipped: Sadly, this test for a WebKit2-specific fix
              has to be skipped for now on WebKit2 since it doesn't implement
              layoutTestController.overridePreference().
      2011-04-20  Andy Estes  <aestes@apple.com>
      
              Reviewed by Maciej Stachowiak.
      
              REGRESSION (WK2): Animated GIF stops when navigating forward, back
              https://bugs.webkit.org/show_bug.cgi?id=59042
      
              When loading the page from the b/f cache,
              document()->view()->isOffscreen() returns true in
              RenderObject::willRenderImage(), so BitmapImage::startAnimation()
              returns without actually kicking off the animation.
      
              In WebKit1, the ScrollView is a platform widget, so
              ScrollView::isOffscreen() calls [NSWindow isVisible]. In WebKit2, the
              ScrollView isn't a platform widget so it asks the WebCore Widget
              whether or not it is visible. It always returns false since
              setParentVisible(false) was called on the old ScrollView before
              navigating to a new page, but setParentVisible(true) is never called
              when restoring it from the back/forward cache. This is probably a
              long-standing bug.
      
              Fix this by calling setParentVisible(true) when a cached main frame is
              being restored.
      
              Test: fast/images/animated-gif-restored-from-bfcache.html
      
              * history/CachedFrame.cpp:
              (WebCore::CachedFrameBase::restore): If the cached frame is the main
              frame, call setParentVisible(true) on the frame's view.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@84443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4f822f24
  3. 28 Mar, 2011 1 commit
    • bdakin@apple.com's avatar
      Fix for https://bugs.webkit.org/show_bug.cgi?id=57286 Alternative fix for: · 8e776ca0
      bdakin@apple.com authored
      Horizontal scroller stops appearing after going Forward
      -and corresponding-
      <rdar://problem/9026946>
      
      Reviewed by Darin Adler.
      
      This patch rolls out revision 79053 and fixes the same bug in a  better way.
      
      New function resetScrollbarsAndClearContentsSize() calls resetScrollbars() and then 
      sets the contents size to 0. This is called when a document is going into the page 
      cache.
      * dom/Document.cpp:
      (WebCore::Document::setInPageCache):
      (WebCore::FrameView::resetScrollbarsAndClearContentsSize):
      
      Roll-out of 79053.
      * history/CachedFrame.cpp:
      (WebCore::CachedFrameBase::restore):
      * page/FrameView.cpp:
      (WebCore::FrameView::FrameView):
      (WebCore::FrameView::reset):
      (WebCore::FrameView::layout):
      * page/FrameView.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82185 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8e776ca0
  4. 18 Feb, 2011 1 commit
    • bdakin@apple.com's avatar
      Fix for <rdar://problem/9018729> Horizontal scroller doesn't · 7b08490d
      bdakin@apple.com authored
      appear when loading a page with a Horizontal scrollbar from 
      the back/forward cache.
      
      Reviewed by Sam Weinig.
      
      This patch adds a new  bool member variable to FrameView to 
      keep track of whether we are loading a page from the back/
      forward cache. If we are, don't suppress scrollbars on 
      first layout.
      * history/CachedFrame.cpp:
      (WebCore::CachedFrameBase::restore):
      * page/FrameView.cpp:
      (WebCore::FrameView::FrameView):
      (WebCore::FrameView::reset):
      (WebCore::FrameView::layout):
      * page/FrameView.h:
      (WebCore::FrameView::setIsRestoringFromBackForward):
      (WebCore::FrameView::isRestoringFromBackForward):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79053 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7b08490d
  5. 15 Feb, 2011 1 commit
    • jamesr@google.com's avatar
      2011-02-15 James Robinson <jamesr@chromium.org> · 9f8b52ba
      jamesr@google.com authored
              Reviewed by Alexey Proskuryakov.
      
              requestAnimationFrame callbacks should not fire within a modal dialog
              https://bugs.webkit.org/show_bug.cgi?id=53188
      
              Tests that requestAnimationFrame callbacks are suspended while a modal
              dialog is showing.
      
              * fast/animation/request-animation-frame-during-modal-expected.txt: Added.
              * fast/animation/request-animation-frame-during-modal.html: Added.
      2011-02-15  James Robinson  <jamesr@chromium.org>
      
              Reviewed by Alexey Proskuryakov.
      
              requestAnimationFrame callbacks should not fire within a modal dialog
              https://bugs.webkit.org/show_bug.cgi?id=53188
      
              requestAnimationFrame callbacks shouldn't fire while a modal dialog is up (like a window.alert()).
              This matches Firefox and other async APIs.  This patch moves the callback servicing into its own
              controller class which receives notifications on suspend/resume.
      
              Test: fast/animation/request-animation-frame-during-modal.html
      
              * WebCore.gypi:
              * bindings/js/ScriptDebugServer.cpp:
              (WebCore::ScriptDebugServer::setJavaScriptPaused):
              * dom/Document.cpp:
              (WebCore::Document::Document):
              (WebCore::Document::suspendScriptedAnimationControllerCallbacks):
              (WebCore::Document::resumeScriptedAnimationControllerCallbacks):
              (WebCore::Document::webkitRequestAnimationFrame):
              (WebCore::Document::webkitCancelRequestAnimationFrame):
              (WebCore::Document::serviceScriptedAnimations):
              * dom/Document.h:
              * dom/ScriptExecutionContext.h:
              (WebCore::ScriptExecutionContext::suspendScriptedAnimationControllerCallbacks):
              (WebCore::ScriptExecutionContext::resumeScriptedAnimationControllerCallbacks):
              * dom/ScriptedAnimationController.cpp: Added.
              (WebCore::ScriptedAnimationController::ScriptedAnimationController):
              (WebCore::ScriptedAnimationController::suspend):
              (WebCore::ScriptedAnimationController::resume):
              (WebCore::ScriptedAnimationController::registerCallback):
              (WebCore::ScriptedAnimationController::cancelCallback):
              (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
              * dom/ScriptedAnimationController.h: Added.
              (WebCore::ScriptedAnimationController::create):
              * history/CachedFrame.cpp:
              (WebCore::CachedFrameBase::restore):
              (WebCore::CachedFrame::CachedFrame):
              * page/PageGroupLoadDeferrer.cpp:
              (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
              (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78648 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9f8b52ba
  6. 03 Feb, 2011 1 commit
    • mihaip@chromium.org's avatar
      2011-02-03 Mihai Parparita <mihaip@chromium.org> · 3ef34ff1
      mihaip@chromium.org authored
              Reviewed by Alexey Proskuryakov.
      
              REGRESSION (r77355): Page cache layout tests crash
              https://bugs.webkit.org/show_bug.cgi?id=53648
      
              Add test that calls setTimeout during a pagehide event handler (the
              timeout should not fire while the document is in the page cache).
      
              Skipped for Chromium since it doesn't use the page cache.
      
              * fast/events/pagehide-timeout-expected.txt: Added.
              * fast/events/pagehide-timeout.html: Added.
              * fast/events/resources/pagehide-timeout-go-back.html: Added.
              * platform/chromium/test_expectations.txt:
      2011-02-03  Mihai Parparita  <mihaip@chromium.org>
      
              Reviewed by Alexey Proskuryakov.
      
              REGRESSION (r77355): Page cache layout tests crash
              https://bugs.webkit.org/show_bug.cgi?id=53648
      
              Test: fast/events/pagehide-timeout.html
      
              Suspend active DOM objects after all pagehide event handlers have run,
              otherwise it's possible for them to create more objects that weren't
              getting suspended.
      
              * history/CachedFrame.cpp:
              (WebCore::CachedFrame::CachedFrame):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77559 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3ef34ff1
  7. 27 Jan, 2011 1 commit
    • japhet@chromium.org's avatar
      2011-01-27 Nate Chapin <japhet@chromium.org> · 5a152748
      japhet@chromium.org authored
              Reviewed by Adam Barth.
      
              Remove FrameLoader::url() and update callers to use
              Document::url().
              https://bugs.webkit.org/show_bug.cgi?id=41165
      
              Refactor, no new tests.
      
              * WebCore.exp.in:
              * dom/Document.cpp:
              (WebCore::Document::processHttpEquiv):
              (WebCore::Document::removePendingSheet):
              * history/CachedFrame.cpp:
              (WebCore::CachedFrameBase::CachedFrameBase):
              * history/PageCache.cpp:
              (WebCore::logCanCacheFrameDecision):
              (WebCore::PageCache::canCachePageContainingThisFrame):
              * html/HTMLFrameElementBase.cpp:
              (WebCore::HTMLFrameElementBase::isURLAllowed):
              * html/HTMLPlugInImageElement.cpp:
              (WebCore::HTMLPlugInImageElement::allowedToLoadFrameURL):
              * inspector/InspectorAgent.cpp:
              (WebCore::InspectorAgent::inspectedURL):
              * inspector/InspectorResourceAgent.cpp:
              (WebCore::buildObjectForFrame):
              * loader/DocumentWriter.cpp:
              (WebCore::DocumentWriter::replaceDocument):
              (WebCore::DocumentWriter::deprecatedFrameEncoding):
              * loader/FrameLoader.cpp:
              * loader/FrameLoader.h:
              * loader/HistoryController.cpp:
              (WebCore::HistoryController::updateForStandardLoad):
              (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
              (WebCore::HistoryController::updateForSameDocumentNavigation):
              * loader/NavigationScheduler.cpp:
              (WebCore::ScheduledHistoryNavigation::fire):
              (WebCore::NavigationScheduler::scheduleLocationChange):
              (WebCore::NavigationScheduler::scheduleRefresh):
              * page/FrameView.cpp:
              (WebCore::FrameView::updateControlTints):
              * page/Location.cpp:
              (WebCore::Location::url):
              (WebCore::Location::setProtocol):
              (WebCore::Location::setHost):
              (WebCore::Location::setHostname):
              (WebCore::Location::setPort):
              (WebCore::Location::setPathname):
              (WebCore::Location::setSearch):
              (WebCore::Location::setHash):
              (WebCore::Location::reload):
              * page/Page.cpp:
              (WebCore::Page::goToItem):
      2011-01-27  Nate Chapin  <japhet@chromium.org>
      
              Reviewed by Adam Barth.
      
              Use Document::url() instead of FrameLoader::url().
              https://bugs.webkit.org/show_bug.cgi?id=41165
      
              * ewk/ewk_frame.cpp:
              (ewk_frame_uri_changed):
      2011-01-27  Nate Chapin  <japhet@chromium.org>
      
              Reviewed by Adam Barth.
      
              Use Document::url() instead of FrameLoader::url().
              https://bugs.webkit.org/show_bug.cgi?id=41165
      
              * webkit/webkitwebview.cpp:
              (webkit_web_view_get_icon_uri):
      2011-01-27  Nate Chapin  <japhet@chromium.org>
      
              Reviewed by Adam Barth.
      
              Use Document::url() instead of FrameLoader::url().
              https://bugs.webkit.org/show_bug.cgi?id=41165
      
              * WebCoreSupport/FrameLoaderClientHaiku.cpp:
              (WebCore::FrameLoaderClientHaiku::dispatchDidFinishDocumentLoad):
      2011-01-27  Nate Chapin  <japhet@chromium.org>
      
              Reviewed by Adam Barth.
      
              Use Document::url() instead of FrameLoader::url().
              https://bugs.webkit.org/show_bug.cgi?id=41165
      
              * WebView/WebView.mm:
              (-[WebView _dispatchDidReceiveIconFromWebFrame:]):
      2011-01-27  Nate Chapin  <japhet@chromium.org>
      
              Reviewed by Adam Barth.
      
              Use Document::url() instead of FrameLoader::url().
              https://bugs.webkit.org/show_bug.cgi?id=41165
      
              * Api/qwebframe.cpp:
              (QWebFrame::url):
      2011-01-27  Nate Chapin  <japhet@chromium.org>
      
              Reviewed by Adam Barth.
      
              Use Document::url() instead of FrameLoader::url().
              https://bugs.webkit.org/show_bug.cgi?id=41165
      
              * WebFrame.cpp:
              (WebFrame::url):
      2011-01-27  Nate Chapin  <japhet@chromium.org>
      
              Reviewed by Adam Barth.
      
              Use Document::url() instead of FrameLoader::url().
              https://bugs.webkit.org/show_bug.cgi?id=41165
      
              * WebKitSupport/FrameLoaderClientWx.cpp:
              (WebCore::FrameLoaderClientWx::dispatchDidFinishDocumentLoad):
      2011-01-27  Nate Chapin  <japhet@chromium.org>
      
              Reviewed by Adam Barth.
      
              Use Document::url() instead of FrameLoader::url().
              https://bugs.webkit.org/show_bug.cgi?id=41165
      
              * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
              (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
              (WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
              (WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
              (WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
              * WebProcess/WebPage/WebFrame.cpp:
              (WebKit::WebFrame::url):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76872 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5a152748
  8. 17 Jan, 2011 1 commit
  9. 08 Jan, 2011 1 commit
  10. 23 Dec, 2010 1 commit
    • weinig@apple.com's avatar
      WebKit2 needs to mirror the frame tree in the UIProcess · e3043f45
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=51546
      
      Reviewed by Darin Adler.
      
      WebCore: 
      
      - Add client functions to notify that a frame has been added or
        removed from the page cache.
      
      * history/CachedFrame.cpp:
      (WebCore::CachedFrameBase::restore):
      (WebCore::CachedFrame::CachedFrame):
      * history/CachedFrame.h:
      * loader/EmptyClients.h:
      (WebCore::EmptyFrameLoaderClient::didSaveToPageCache):
      (WebCore::EmptyFrameLoaderClient::didRestoreFromPageCache):
      * loader/FrameLoaderClient.h:
      
      WebKit/chromium: 
      
      - Add client functions to notify that a frame has been added or
        removed from the page cache.
      
      * src/FrameLoaderClientImpl.cpp:
      (WebKit::WebFrameLoaderClientImpl::didSaveToPageCache):
      (WebKit::WebFrameLoaderClientImpl::didRestoreFromPageCache):
      * src/FrameLoaderClientImpl.h:
      
      WebKit/efl: 
      
      - Add client functions to notify that a frame has been added or
        removed from the page cache.
      
      * WebCoreSupport/FrameLoaderClientEfl.cpp:
      (WebCore::FrameLoaderClientEfl::didSaveToPageCache):
      (WebCore::FrameLoaderClientEfl::didRestoreFromPageCache):
      * WebCoreSupport/FrameLoaderClientEfl.h:
      
      WebKit/gtk: 
      
      - Add client functions to notify that a frame has been added or
        removed from the page cache.
      
      * WebCoreSupport/FrameLoaderClientGtk.cpp:
      (WebKit::FrameLoaderClient::didSaveToPageCache):
      (WebKit::FrameLoaderClient::didRestoreFromPageCache):
      * WebCoreSupport/FrameLoaderClientGtk.h:
      
      WebKit/haiku: 
      
      - Add client functions to notify that a frame has been added or
        removed from the page cache.
      
      * WebCoreSupport/FrameLoaderClientHaiku.cpp:
      (WebCore::FrameLoaderClientHaiku::didSaveToPageCache):
      (WebCore::FrameLoaderClientHaiku::didRestoreFromPageCache):
      * WebCoreSupport/FrameLoaderClientHaiku.h:
      
      WebKit/mac: 
      
      - Add client functions to notify that a frame has been added or
        removed from the page cache.
      
      * WebCoreSupport/WebFrameLoaderClient.h:
      * WebCoreSupport/WebFrameLoaderClient.mm:
      (WebFrameLoaderClient::didSaveToPageCache):
      (WebFrameLoaderClient::didRestoreFromPageCache):
      
      WebKit/qt: 
      
      - Add client functions to notify that a frame has been added or
        removed from the page cache.
      
      * WebCoreSupport/FrameLoaderClientQt.cpp:
      (WebCore::FrameLoaderClientQt::didSaveToPageCache):
      (WebCore::FrameLoaderClientQt::didRestoreFromPageCache):
      * WebCoreSupport/FrameLoaderClientQt.h:
      
      WebKit/win: 
      
      - Add client functions to notify that a frame has been added or
        removed from the page cache.
      
      * WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebFrameLoaderClient::didSaveToPageCache):
      (WebFrameLoaderClient::didRestoreFromPageCache):
      * WebCoreSupport/WebFrameLoaderClient.h:
      
      WebKit/wince: 
      
      - Add client functions to notify that a frame has been added or
        removed from the page cache.
      
      * WebCoreSupport/FrameLoaderClientWinCE.cpp:
      (WebKit::FrameLoaderClientWinCE::didSaveToPageCache):
      (WebKit::FrameLoaderClientWinCE::didRestoreFromPageCache):
      * WebCoreSupport/FrameLoaderClientWinCE.h:
      
      WebKit/wx: 
      
      - Add client functions to notify that a frame has been added or
        removed from the page cache.
      
      * WebKitSupport/FrameLoaderClientWx.cpp:
      (WebCore::FrameLoaderClientWx::didSaveToPageCache):
      (WebCore::FrameLoaderClientWx::didRestoreFromPageCache):
      * WebKitSupport/FrameLoaderClientWx.h:
      
      WebKit2: 
      
      * UIProcess/API/C/WKFrame.cpp:
      (WKFrameCopyChildFrames):
      * UIProcess/API/C/WKFrame.h:
      Add API to get the child frames of a frame.
      
      * UIProcess/WebFrameProxy.cpp:
      (WebKit::WebFrameProxy::WebFrameProxy):
      (WebKit::WebFrameProxy::disconnect):
      (WebKit::WebFrameProxy::appendChild):
      (WebKit::WebFrameProxy::removeChild):
      (WebKit::WebFrameProxy::isDescendantOf):
      (WebKit::WebFrameProxy::dumpFrameTree):
      (WebKit::WebFrameProxy::didRemoveFromHierarchy):
      (WebKit::WebFrameProxy::childFrames):
      * UIProcess/WebFrameProxy.h:
      (WebKit::WebFrameProxy::parentFrame): Add getter.
      (WebKit::WebFrameProxy::nextSibling): Add getter.
      (WebKit::WebFrameProxy::previousSibling): Add getter.
      (WebKit::WebFrameProxy::firstChild): Add getter.
      (WebKit::WebFrameProxy::lastChild): Add getter.
      Make frames keep track of their subframes.
      
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::didCreateSubframe):
      Use the now passed parentID to insert the frame into the hierarchy
      
      (WebKit::WebPageProxy::didSaveFrameToPageCache):
      When a frame is added to the page cache, remove it from the hierarchy.
      
      (WebKit::WebPageProxy::didRestoreFrameFromPageCache):
      When a frame is restored from the page cache, add it back to the hierarchy.
      
      (WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
      Detached frames should also be removed from the hierarchy.
      
      * UIProcess/WebPageProxy.h:
      Add new declarations for didSaveFrameToPageCache and didRestoreFrameFromPageCache.
      
      * UIProcess/WebPageProxy.messages.in:
      Add messages for DidSaveFrameToPageCache and DidRestoreFrameFromPageCache.
      
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebKit::WebFrameLoaderClient::savePlatformDataToCachedFrame): 
      (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
      Remove notImplemented, there is no work we need to do here.
      
      (WebKit::WebFrameLoaderClient::didSaveToPageCache): 
      (WebKit::WebFrameLoaderClient::didRestoreFromPageCache):
      Send message to UIProcess to indicate this happened.
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
      
      * WebProcess/WebPage/WebFrame.cpp:
      (WebKit::WebFrame::createSubframe):
      Send parent frameID in addition to our own in the message to UIProcess.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74571 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e3043f45
  11. 05 Nov, 2010 1 commit
    • cmarrin@apple.com's avatar
      2010-11-05 Chris Marrin <cmarrin@apple.com> · e6a27001
      cmarrin@apple.com authored
              Reviewed by Simon Fraser.
      
              Move resumeAnimations/suspendAnimations from Frame to AnimationController.
              https://bugs.webkit.org/show_bug.cgi?id=49073
      
              * src/WebAnimationControllerImpl.cpp:
              (WebKit::WebAnimationControllerImpl::suspendAnimations):
              (WebKit::WebAnimationControllerImpl::resumeAnimations):
      2010-11-05  Chris Marrin  <cmarrin@apple.com>
      
              Reviewed by Simon Fraser.
      
              Move resumeAnimations/suspendAnimations from Frame to AnimationController.
              https://bugs.webkit.org/show_bug.cgi?id=49073
      
              * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
              (DumpRenderTreeSupportQt::suspendAnimations):
              (DumpRenderTreeSupportQt::resumeAnimations):
      2010-11-05  Chris Marrin  <cmarrin@apple.com>
      
              Reviewed by Simon Fraser.
      
              Move resumeAnimations/suspendAnimations from Frame to AnimationController.
              https://bugs.webkit.org/show_bug.cgi?id=49073
      
              * webkit/webkitwebframe.cpp:
              (webkit_web_frame_suspend_animations):
              (webkit_web_frame_resume_animations):
      2010-11-05  Chris Marrin  <cmarrin@apple.com>
      
              Reviewed by Simon Fraser.
      
              Move resumeAnimations/suspendAnimations from Frame to AnimationController.
              https://bugs.webkit.org/show_bug.cgi?id=49073
      
              * WebFrame.cpp:
              (WebFrame::suspendAnimations):
              (WebFrame::resumeAnimations):
      2010-11-05  Chris Marrin  <cmarrin@apple.com>
      
              Reviewed by Simon Fraser.
      
              Move resumeAnimations/suspendAnimations from Frame to AnimationController.
              https://bugs.webkit.org/show_bug.cgi?id=49073
      
              * WebView/WebFrame.mm:
              (-[WebFrame _suspendAnimations]):
              (-[WebFrame _resumeAnimations]):
      2010-11-05  Chris Marrin  <cmarrin@apple.com>
      
              Reviewed by Simon Fraser.
      
              Move resumeAnimations/suspendAnimations from Frame to AnimationController.
              https://bugs.webkit.org/show_bug.cgi?id=49073
      
              Changed the name of suspendAnimations/resumeAnimations to
              suspendAnimationsInDocument/resumeAnimationsInDocument. These are no
              longer exported, but have the same functionality as before. I then
              added new suspendAnimations/resumeAnimations function which take
              no params and suspend/resume on the frame owning the animation
              controller and all its child frames. These are the functions that
              are now exported. I then changed all the platform specific WebKit
              code to use these functions.
      
              * WebCore.exp.in:
              * page/Frame.cpp:
              * page/Frame.h:
              * page/animation/AnimationController.cpp:
              (WebCore::AnimationControllerPrivate::suspendAnimations):
              (WebCore::AnimationControllerPrivate::resumeAnimations):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71451 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e6a27001
  12. 22 Oct, 2010 1 commit
  13. 13 Sep, 2010 1 commit
    • eric.carlson@apple.com's avatar
      2010-09-13 Eric Carlson <eric.carlson@apple.com> · 097ca95f
      eric.carlson@apple.com authored
              Reviewed by Geoff Garen.
      
              JavaScript dialog should not deactivate media element
              https://bugs.webkit.org/show_bug.cgi?id=45688
      
              Test: http/tests/media/reload-after-dialog.html
      
              * bindings/generic/ActiveDOMCallback.cpp:
              (WebCore::ActiveDOMObjectCallbackImpl::suspend): Add ReasonForSuspension parameter.
      
              * bindings/js/ScriptDebugServer.cpp:
              (WebCore::ScriptDebugServer::setJavaScriptPaused): Pass new parameter to suspendActiveDOMObjects.
      
              * dom/ActiveDOMObject.cpp:
              (WebCore::ActiveDOMObject::suspend): Add ReasonForSuspension parameter.
              * dom/ActiveDOMObject.h:
      
              * dom/ScriptExecutionContext.cpp:
              (WebCore::ScriptExecutionContext::suspendActiveDOMObjects): Ditto.
              * dom/ScriptExecutionContext.h:
      
              * history/CachedFrame.cpp:
              (WebCore::CachedFrame::CachedFrame): Pass new parameter to suspendActiveDOMObjects.
      
              * html/HTMLMarqueeElement.cpp:
              (WebCore::HTMLMarqueeElement::suspend): Add ReasonForSuspension parameter.
              * html/HTMLMarqueeElement.h:
      
              * html/HTMLMediaElement.cpp:
              (WebCore::HTMLMediaElement::stop): Deal with element being suspended.
              (WebCore::HTMLMediaElement::suspend): Do nothing unless reason for suspension is document
              becoming inactive.
              * html/HTMLMediaElement.h:
      
              * page/PageGroupLoadDeferrer.cpp:
              (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer): Pass WillShowDialog to suspendActiveDOMObjects.
      
              * page/SuspendableTimer.cpp:
              (WebCore::SuspendableTimer::suspend): Add ReasonForSuspension parameter.
              * page/SuspendableTimer.h:
      
              * websockets/WebSocket.cpp:
              (WebCore::WebSocket::suspend): Ditto.
              * websockets/WebSocket.h:
      
              * xml/XMLHttpRequest.cpp:
              (WebCore::XMLHttpRequest::suspend): Ditto.
              * xml/XMLHttpRequest.h:
      
      2010-09-13  Eric Carlson  <eric.carlson@apple.com>
      
              Reviewed by Geoff Garen.
      
              JavaScript dialog should not deactivate media element
              https://bugs.webkit.org/show_bug.cgi?id=45688
      
              * http/tests/media/reload-after-dialog-expected.txt: Added.
              * http/tests/media/reload-after-dialog.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67432 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      097ca95f
  14. 01 Sep, 2010 1 commit
    • commit-queue@webkit.org's avatar
      2010-09-01 Mihai Parparita <mihaip@chromium.org> · 7235406e
      commit-queue@webkit.org authored
              Reviewed by Brady Eidson.
      
              popstate event is not fired until document opts in by calling pushstate.
              https://bugs.webkit.org/show_bug.cgi?id=41372
      
              Add two tests to check how often popstate is being fired (for both
              fragment changes and page changes, especially with the page cache
              enabled).
      
              Update existing state object tests to handle popstate being fired for
              the page being navigated to (right after onload).
      
              * fast/loader/stateobjects/document-destroyed-navigate-back-with-fragment-scroll.html:
              * fast/loader/stateobjects/document-destroyed-navigate-back.html:
              * fast/loader/stateobjects/popstate-after-load-complete-addeventlistener.html:
              * fast/loader/stateobjects/popstate-after-load-complete-body-attribute.html:
              * fast/loader/stateobjects/popstate-after-load-complete-body-inline-attribute.html:
              * fast/loader/stateobjects/popstate-after-load-complete-window-attribute.html:
              * fast/loader/stateobjects/popstate-fires-on-history-traversal-expected.txt: Added.
              * fast/loader/stateobjects/popstate-fires-on-history-traversal.html: Added.
              * fast/loader/stateobjects/popstate-fires-with-page-cache-expected.txt: Added.
              * fast/loader/stateobjects/popstate-fires-with-page-cache.html: Added.
              * fast/loader/stateobjects/pushstate-object-types.html:
              * fast/loader/stateobjects/pushstate-then-replacestate.html:
              * fast/loader/stateobjects/pushstate-with-fragment-urls-and-hashchange.html:
              * fast/loader/stateobjects/replacestate-in-iframe.html:
              * fast/loader/stateobjects/replacestate-then-pushstate.html:
              * fast/loader/stateobjects/resources/popstate-fires-with-page-cache-1.html: Added.
              * fast/loader/stateobjects/resources/popstate-fires-with-page-cache-2.html: Added.
              * fast/loader/stateobjects/resources/replacestate-in-iframe-window-child.html:
      2010-09-01  Mihai Parparita  <mihaip@chromium.org>
      
              Reviewed by Brady Eidson.
      
              popstate event is not fired until document opts in by calling pushstate.
              https://bugs.webkit.org/show_bug.cgi?id=41372
      
              Fire popstate even when we don't have a state object when a page is
              loaded (for both regular loads and those from the page cache). Also
              fire popstate when doing in-document navigation via fragment changes.
              This is consistent with both Gecko and recent the HTML5 spec change:
              http://html5.org/tools/web-apps-tracker?from=5376&to=5377
      
              Tests: fast/loader/stateobjects/popstate-fires-on-history-traversal.html
                     fast/loader/stateobjects/popstate-fires-with-page-cache.html
      
              * bindings/js/SerializedScriptValue.cpp:
              * bindings/js/SerializedScriptValue.h:
              (WebCore::SerializedScriptValue::create):
              * bindings/v8/SerializedScriptValue.cpp:
              * bindings/v8/SerializedScriptValue.h:
              * dom/Document.cpp:
              (WebCore::Document::implicitClose):
              * dom/Document.h:
              * history/CachedFrame.cpp:
              (WebCore::CachedFrameBase::restore):
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::loadInSameDocument):
              (WebCore::FrameLoader::transitionToCommitted):
              * loader/HistoryController.cpp:
              (WebCore::HistoryController::pushState):
              (WebCore::HistoryController::replaceState):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66628 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7235406e
  15. 07 Jul, 2010 1 commit
    • darin@apple.com's avatar
      2010-07-07 Darin Adler <darin@apple.com> · 3948d96e
      darin@apple.com authored
              Reviewed by Adam Barth.
      
              More OwnPtr work
              https://bugs.webkit.org/show_bug.cgi?id=41727
      
              * API/JSCallbackObject.h:
              (JSC::JSCallbackObjectData::setPrivateProperty): Use adoptPtr.
              * API/JSCallbackObjectFunctions.h:
              (JSC::JSCallbackObject::JSCallbackObject): Ditto.
              * bytecode/CodeBlock.cpp:
              (JSC::CodeBlock::CodeBlock): Ditto.
              * bytecode/CodeBlock.h:
              (JSC::CodeBlock::createRareDataIfNecessary): Ditto.
              * parser/Nodes.cpp:
              (JSC::ScopeNode::ScopeNode): Ditto.
              * parser/ParserArena.cpp:
              (JSC::ParserArena::ParserArena): Ditto.
              * runtime/Arguments.h:
              (JSC::Arguments::Arguments): Ditto.
              * runtime/Executable.cpp:
              (JSC::EvalExecutable::compile): Ditto.
              (JSC::ProgramExecutable::compile): Ditto.
              (JSC::FunctionExecutable::compileForCall): Ditto.
              (JSC::FunctionExecutable::compileForConstruct): Ditto.
              (JSC::FunctionExecutable::reparseExceptionInfo): Ditto.
              (JSC::EvalExecutable::reparseExceptionInfo): Ditto.
              * runtime/JSArray.cpp:
              (JSC::JSArray::sort): Ditto.
              * runtime/RegExpConstructor.cpp:
              (JSC::RegExpConstructor::RegExpConstructor): Ditto.
              * runtime/RegExpObject.cpp:
              (JSC::RegExpObject::RegExpObject): Ditto.
              * runtime/SmallStrings.cpp:
              (JSC::SmallStrings::createSingleCharacterString): Ditto.
              (JSC::SmallStrings::singleCharacterStringRep): Ditto.
      
              * wtf/unicode/icu/CollatorICU.cpp:
              (WTF::Collator::userDefault): Use adoptPtr.
              * yarr/RegexInterpreter.cpp:
              (JSC::Yarr::ByteCompiler::ByteCompiler): Ditto.
              (JSC::Yarr::ByteCompiler::compile): Ditto.
              (JSC::Yarr::ByteCompiler::regexBegin): Ditto.
              (JSC::Yarr::byteCompileRegex): Ditto.
              * yarr/RegexInterpreter.h:
              (JSC::Yarr::BytecodePattern::BytecodePattern): Ditto.
      2010-07-06  Darin Adler  <darin@apple.com>
      
              Reviewed by Adam Barth.
      
              More OwnPtr work, including making clear set the pointer to 0 before deletion
              https://bugs.webkit.org/show_bug.cgi?id=41727
      
              * WebCore.exp.in: Updated.
      
              * css/CSSSelector.h:
              (WebCore::CSSSelector::RareData::RareData): Use adoptPtr.
              (WebCore::CSSSelector::createRareData): Ditto.
              * dom/SpaceSplitString.h:
              (WebCore::SpaceSplitString::SpaceSplitString): Ditto.
              (WebCore::SpaceSplitString::set): Ditto.
              * history/CachedFrame.cpp:
              (WebCore::CachedFrame::CachedFrame): Ditto.
              (WebCore::CachedFrame::setCachedFramePlatformData): Ditto.
      
              * history/CachedFrame.h: Use PassOwnPtr.
      
              * loader/appcache/ApplicationCacheGroup.cpp:
              (WebCore::CallCacheListenerTask::create): Use adoptPtr.
              * loader/appcache/ApplicationCacheStorage.cpp:
              (WebCore::ApplicationCacheStorage::storeCopyOfCache): Ditto.
              * platform/PurgeableBuffer.h:
              (WebCore::PurgeableBuffer::create): Ditto.
              * platform/graphics/GlyphMetricsMap.h:
              (WebCore::::locatePageSlowCase): Ditto.
              * platform/graphics/GraphicsLayer.h:
              (WebCore::AnimationValue::AnimationValue): Ditto.
              (WebCore::TransformAnimationValue::TransformAnimationValue): Ditto.
              * platform/graphics/MediaPlayer.h:
              (WebCore::MediaPlayer::create): Ditto.
              * platform/graphics/SimpleFontData.h:
              (WebCore::SimpleFontData::boundsForGlyph): Ditto.
              * platform/mac/PurgeableBufferMac.cpp:
              (WebCore::PurgeableBuffer::create): Ditto.
              * rendering/InlineFlowBox.h:
              (WebCore::InlineFlowBox::setHorizontalOverflowPositions): Ditto.
              (WebCore::InlineFlowBox::setVerticalOverflowPositions): Ditto.
              * rendering/RootInlineBox.h:
              (WebCore::RootInlineBox::floats): Ditto.
              * rendering/style/RenderStyle.h:
              (WebCore::InheritedFlags::inheritAnimations): Ditto.
              (WebCore::InheritedFlags::inheritTransitions): Ditto.
      
              * rendering/style/SVGRenderStyleDefs.h: Use PassOwnPtr.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62677 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3948d96e
  16. 24 Jun, 2010 1 commit
    • ap@apple.com's avatar
      Reviewed by Brady Eidson. · 3f0a0a17
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=41178
              Timed refresh in subframes isn't stopped when going into b/f cache
      
              Test: fast/history/timed-refresh-in-cached-frame.html
      
              * history/CachedFrame.cpp: (WebCore::CachedFrame::CachedFrame): Top frame's stopLoading()
              won't help cached subframes; stop loading from here.
      
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::stopLoading): Don't stop loading in child frames. This didn't work
              for cached frames due to frame tree having been already desonstructed, and it's not necessary
              in non-cached case because stopLoading() will be called for subframes via
              FrameLoader::detachFromParent() and closeURL().
              (WebCore::FrameLoader::pageHidden): This was a second code path that dispatched pagehide
              event - it's no longer needed, because everything goes through FrameLoader::stopLoading().
              (WebCore::FrameLoader::commitProvisionalLoad): Don't call pageHidden(), the code for adding
              frame to b/f cache will do everything.
      
              * loader/FrameLoader.h: Removed pageHidden().
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@61801 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3f0a0a17
  17. 30 Mar, 2010 1 commit
    • barraclough@apple.com's avatar
      Rubber stamped by Sam Weinig. · 00b7992e
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=36866
      Move CString to WTF
      
      JavaScriptCore: 
      
      * Android.mk:
      * GNUmakefile.am:
      * JavaScriptCore.exp:
      * JavaScriptCore.gypi:
      * JavaScriptCore.pro:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
      * JavaScriptCore.vcproj/WTF/WTF.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * wtf/text: Added.
      * wtf/text/CString.cpp: Copied from WebCore/platform/text/CString.cpp.
      * wtf/text/CString.h: Copied from WebCore/platform/text/CString.h.
      (WTF::CStringBuffer::data):
      (WTF::CStringBuffer::length):
      (WTF::CStringBuffer::create):
      (WTF::CStringBuffer::CStringBuffer):
      (WTF::CStringBuffer::mutableData):
      (WTF::CString::CString):
      (WTF::CString::isNull):
      (WTF::CString::buffer):
      (WTF::operator!=):
      
      WebCore: 
      
      * Android.mk:
      * ForwardingHeaders/wtf/text: Added.
      * ForwardingHeaders/wtf/text/CString.h: Added.
      * GNUmakefile.am:
      * WebCore.base.exp:
      * WebCore.gypi:
      * WebCore.order:
      * WebCore.pro:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
      * bindings/js/JSDOMWindowBase.cpp:
      * bindings/js/ScheduledAction.cpp:
      * bindings/js/ScriptController.cpp:
      * bindings/v8/ScriptController.cpp:
      * bindings/v8/V8Binding.cpp:
      * bindings/v8/V8DOMWindowShell.cpp:
      * bridge/jni/JNIBridge.cpp:
      * bridge/jni/v8/JavaStringV8.h:
      (JSC::Bindings::JavaStringImpl::init):
      * css/CSSParser.cpp:
      * dom/CharacterData.cpp:
      * dom/Document.cpp:
      * dom/Element.cpp:
      * dom/Node.cpp:
      * dom/Position.cpp:
      * dom/Range.cpp:
      * dom/Text.cpp:
      * dom/XMLTokenizer.cpp:
      * dom/XMLTokenizerLibxml2.cpp:
      * dom/XMLTokenizerQt.cpp:
      * editing/SelectionController.cpp:
      * editing/VisiblePosition.cpp:
      * editing/VisibleSelection.cpp:
      * history/CachedFrame.cpp:
      * history/HistoryItem.cpp:
      * history/qt/HistoryItemQt.cpp:
      * html/FormDataList.h:
      (WebCore::FormDataList::appendData):
      (WebCore::FormDataList::Item::Item):
      (WebCore::FormDataList::Item::data):
      * html/HTMLDocument.cpp:
      * html/PreloadScanner.cpp:
      * inspector/InspectorController.cpp:
      * inspector/InspectorDOMAgent.cpp:
      * loader/DocLoader.cpp:
      * loader/FTPDirectoryDocument.cpp:
      * loader/FrameLoader.cpp:
      * loader/HistoryController.cpp:
      * loader/ProgressTracker.cpp:
      * loader/appcache/ApplicationCacheStorage.cpp:
      * loader/archive/cf/LegacyWebArchive.cpp:
      * loader/icon/wince/IconDatabaseWince.cpp:
      * loader/loader.cpp:
      * page/Console.cpp:
      * page/DOMWindow.cpp:
      * page/SecurityOrigin.cpp:
      * page/XSSAuditor.cpp:
      * page/animation/AnimationBase.cpp:
      * platform/ContextMenu.cpp:
      * platform/FileSystem.h:
      * platform/KURL.cpp:
      * platform/KURLGoogle.cpp:
      * platform/KURLGooglePrivate.h:
      * platform/Pasteboard.h:
      * platform/android/FileSystemAndroid.cpp:
      * platform/android/TemporaryLinkStubs.cpp:
      * platform/brew/KURLBrew.cpp:
      * platform/cf/FileSystemCF.cpp:
      * platform/chromium/MIMETypeRegistryChromium.cpp:
      * platform/efl/FileSystemEfl.cpp:
      * platform/efl/PasteboardEfl.cpp:
      * platform/efl/PlatformKeyboardEventEfl.cpp:
      * platform/efl/PlatformScreenEfl.cpp:
      * platform/efl/RenderThemeEfl.cpp:
      * platform/efl/ScrollbarEfl.cpp:
      * platform/efl/SharedBufferEfl.cpp:
      * platform/efl/WidgetEfl.cpp:
      * platform/graphics/GlyphPageTreeNode.cpp:
      * platform/graphics/cairo/FontPlatformDataCairo.cpp:
      * platform/graphics/cg/ImageBufferCG.cpp:
      * platform/graphics/chromium/FontCacheLinux.cpp:
      * platform/graphics/chromium/FontPlatformDataLinux.h:
      * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
      * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
      * platform/graphics/gtk/FontPlatformDataPango.cpp:
      * platform/graphics/gtk/IconGtk.cpp:
      * platform/graphics/gtk/ImageGtk.cpp:
      * platform/graphics/haiku/GraphicsContextHaiku.cpp:
      * platform/graphics/mac/GraphicsContext3DMac.cpp:
      * platform/graphics/mac/GraphicsLayerCA.mm:
      * platform/graphics/qt/GraphicsContext3DQt.cpp:
      * platform/graphics/qt/ImageBufferQt.cpp:
      * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
      * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
      * platform/graphics/skia/GraphicsLayerSkia.cpp:
      * platform/graphics/win/GraphicsLayerCACF.cpp:
      * platform/graphics/win/WKCACFLayer.cpp:
      * platform/graphics/wx/FontPlatformData.h:
      * platform/gtk/ClipboardGtk.cpp:
      * platform/gtk/ContextMenuItemGtk.cpp:
      * platform/gtk/DataObjectGtk.h:
      * platform/gtk/FileChooserGtk.cpp:
      * platform/gtk/FileSystemGtk.cpp:
      * platform/gtk/GeolocationServiceGtk.cpp:
      * platform/gtk/KURLGtk.cpp:
      * platform/gtk/Language.cpp:
      * platform/gtk/LocalizedStringsGtk.cpp:
      * platform/gtk/PasteboardGtk.cpp:
      * platform/gtk/PopupMenuGtk.cpp:
      * platform/gtk/RenderThemeGtk.cpp:
      * platform/gtk/SharedBufferGtk.cpp:
      * platform/haiku/FileSystemHaiku.cpp:
      * platform/haiku/PlatformKeyboardEventHaiku.cpp:
      * platform/network/CredentialStorage.cpp:
      * platform/network/FormData.cpp:
      * platform/network/FormData.h:
      * platform/network/FormDataBuilder.cpp:
      * platform/network/FormDataBuilder.h:
      * platform/network/HTTPParsers.cpp:
      * platform/network/android/ResourceHandleAndroid.cpp:
      * platform/network/cf/FormDataStreamCFNet.cpp:
      * platform/network/cf/ResourceHandleCFNet.cpp:
      * platform/network/chromium/ResourceResponse.h:
      * platform/network/curl/FormDataStreamCurl.cpp:
      * platform/network/curl/ResourceHandleManager.cpp:
      * platform/network/curl/ResourceHandleManager.h:
      * platform/network/mac/FormDataStreamMac.mm:
      * platform/network/mac/ResourceHandleMac.mm:
      * platform/network/qt/QNetworkReplyHandler.cpp:
      * platform/network/soup/CookieJarSoup.cpp:
      * platform/network/soup/ResourceHandleSoup.cpp:
      * platform/network/soup/ResourceRequestSoup.cpp:
      * platform/network/soup/ResourceResponseSoup.cpp:
      * platform/network/win/ResourceHandleWin.cpp:
      * platform/posix/FileSystemPOSIX.cpp:
      * platform/qt/FileSystemQt.cpp:
      * platform/qt/KURLQt.cpp:
      * platform/qt/TemporaryLinkStubs.cpp:
      * platform/sql/chromium/SQLiteFileSystemChromium.cpp:
      * platform/text/CString.cpp: Removed.
      * platform/text/CString.h: Removed.
      * platform/text/PlatformString.h:
      * platform/text/String.cpp:
      * platform/text/StringImpl.cpp:
      * platform/text/TextCodec.h:
      * platform/text/TextCodecICU.cpp:
      * platform/text/TextCodecLatin1.cpp:
      * platform/text/TextCodecUTF16.cpp:
      * platform/text/TextCodecUserDefined.cpp:
      * platform/text/TextEncoding.cpp:
      * platform/text/TextEncoding.h:
      * platform/text/chromium/TextBreakIteratorInternalICUChromium.cpp:
      * platform/text/gtk/TextCodecGtk.cpp:
      * platform/text/haiku/StringHaiku.cpp:
      * platform/text/mac/TextCodecMac.cpp:
      * platform/text/qt/TextCodecQt.cpp:
      * platform/text/wx/StringWx.cpp:
      * platform/win/ClipboardUtilitiesWin.cpp:
      * platform/win/ClipboardWin.cpp:
      * platform/win/ContextMenuItemWin.cpp:
      * platform/win/ContextMenuWin.cpp:
      * platform/win/FileSystemWin.cpp:
      * platform/win/GDIObjectCounter.cpp:
      * platform/win/Language.cpp:
      * platform/win/PasteboardWin.cpp:
      * platform/wince/FileSystemWince.cpp:
      * platform/wince/KeygenWince.cpp:
      * platform/wince/PasteboardWince.cpp:
      * platform/wx/FileSystemWx.cpp:
      * platform/wx/LoggingWx.cpp:
      * plugins/PluginDebug.h:
      * plugins/PluginPackage.cpp:
      * plugins/PluginStream.cpp:
      * plugins/PluginStream.h:
      * plugins/PluginView.h:
      * plugins/gtk/PluginPackageGtk.cpp:
      * plugins/mac/PluginPackageMac.cpp:
      * plugins/qt/PluginPackageQt.cpp:
      * plugins/symbian/PluginPackageSymbian.cpp:
      * plugins/win/PluginPackageWin.cpp:
      * rendering/RenderLayer.cpp:
      * rendering/RenderLayerCompositor.cpp:
      * rendering/RenderTreeAsText.cpp:
      * storage/Database.cpp:
      * storage/SQLTransactionCoordinator.cpp:
      * storage/SQLTransactionCoordinator.h:
      * storage/StorageAreaSync.cpp:
      * storage/StorageSyncManager.cpp:
      * storage/chromium/DatabaseTrackerChromium.cpp:
      * storage/chromium/QuotaTracker.cpp:
      * storage/chromium/QuotaTracker.h:
      * svg/SVGFontFaceElement.cpp:
      * svg/SVGStyledElement.cpp:
      * svg/SVGUseElement.cpp:
      * websockets/WebSocket.cpp:
      * websockets/WebSocketChannel.cpp:
      * websockets/WebSocketHandshake.cpp:
      * wml/WMLErrorHandling.cpp:
      * wml/WMLGoElement.cpp:
      * wml/WMLPageState.cpp:
      * wml/WMLPostfieldElement.cpp:
      * wml/WMLSelectElement.cpp:
      * xml/XMLHttpRequest.cpp:
      * xml/XSLStyleSheetLibxslt.cpp:
      * xml/XSLTProcessorLibxslt.cpp:
      
      WebKit: 
      
      * efl/WebCoreSupport/ChromeClientEfl.cpp:
      * efl/ewk/ewk_frame.cpp:
      (ewk_frame_name_get):
      (ewk_frame_selection_get):
      (ewk_frame_uri_changed):
      * efl/ewk/ewk_history.cpp:
      * efl/ewk/ewk_settings.cpp:
      
      WebKit/chromium: 
      
      * public/WebCString.h:
      * src/FrameLoaderClientImpl.cpp:
      * src/GraphicsContext3D.cpp:
      * src/WebCString.cpp:
      (WebKit::WebCString::assign):
      (WebKit::WebCString::WebCString):
      (WebKit::WebCString::operator=):
      (WebKit::WebCString::operator WTF::CString):
      * src/WebMediaPlayerClientImpl.cpp:
      * src/WebString.cpp:
      * src/WebURLError.cpp:
      
      WebKit/gtk: 
      
      * WebCoreSupport/ChromeClientGtk.cpp:
      * WebCoreSupport/ContextMenuClientGtk.cpp:
      * WebCoreSupport/EditorClientGtk.cpp:
      * WebCoreSupport/FrameLoaderClientGtk.cpp:
      * WebCoreSupport/InspectorClientGtk.cpp:
      * gdom/ConvertToGCharPrivate.h:
      * webkit/webkitdownload.cpp:
      * webkit/webkithittestresult.cpp:
      * webkit/webkitnetworkrequest.cpp:
      * webkit/webkitprivate.h:
      * webkit/webkitsecurityorigin.cpp:
      * webkit/webkitwebdatabase.cpp:
      * webkit/webkitwebframe.cpp:
      * webkit/webkitwebhistoryitem.cpp:
      (webkit_web_history_item_finalize):
      (webkit_web_history_item_get_target):
      * webkit/webkitwebresource.cpp:
      * webkit/webkitwebsettings.cpp:
      * webkit/webkitwebview.cpp:
      
      WebKit/mac: 
      
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::getCookies):
      (WebKit::NetscapePluginInstanceProxy::getProxy):
      (WebKit::NetscapePluginInstanceProxy::getAuthenticationInfo):
      (WebKit::NetscapePluginInstanceProxy::resolveURL):
      * Plugins/WebBaseNetscapePluginView.h:
      * Plugins/WebBaseNetscapePluginView.mm:
      * Plugins/WebNetscapePluginView.mm:
      (-[WebNetscapePluginView resolveURL:forTarget:]):
      
      WebKit/qt: 
      
      * Api/qwebelement.cpp:
      
      WebKit/win: 
      
      * WebDownload.cpp:
      * WebDownloadCFNet.cpp:
      * WebDownloadCurl.cpp:
      * WebHistoryItem.cpp:
      * WebLocalizableStrings.cpp:
      * WebMutableURLRequest.cpp:
      * WebPreferences.cpp:
      (WebPreferences::migrateWebKitPreferencesToCFPreferences):
      * WebView.cpp:
      
      WebKit/wx: 
      
      * WebFrame.cpp:
      * WebView.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@56825 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      00b7992e
  18. 19 Mar, 2010 1 commit
    • beidson@apple.com's avatar
      3 of the new HTML5 loading events need to be asynchronous. · 43a414c9
      beidson@apple.com authored
      Reviewed by Darin Adler.
      
      Laying the groundwork for:
      https://bugs.webkit.org/show_bug.cgi?id=36201
      https://bugs.webkit.org/show_bug.cgi?id=36202
      https://bugs.webkit.org/show_bug.cgi?id=36334
      https://bugs.webkit.org/show_bug.cgi?id=36335
      
      Document already had an asynchronous event delivery mechanism for storage events, so
      we can repurpose that for all async events.
      
      No new tests. (No change in behavior)
      
      * dom/Document.cpp:
      (WebCore::Document::Document):
      (WebCore::Document::implicitClose): Use Document::schedule* for the related events.
      (WebCore::Document::enqueueEvent): Renamed from enqueueStorageEvent
      (WebCore::Document::pendingEventTimerFired): Renamed from "storageEventTimerFired"
      (WebCore::Document::statePopped): Use Document::schedulePopstateEvent
      (WebCore::Document::enqueuePageshowEvent): All Pageshow events are piped through here.
        This will be made asynchronous in a separate patch.
      (WebCore::Document::enqueueHashchangeEvent): All Hashchange events are piped through here.
        This will be made asynchronous in a separate patch.
      (WebCore::Document::enqueuePopstateEvent): All Popstate events are piped through here.
        This will be made asynchronous in a separate patch.
      * dom/Document.h:
      (WebCore::):
      
      * history/CachedFrame.cpp:
      (WebCore::CachedFrameBase::restore): Use Document::enqueuePageshowEvent
      
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::loadInSameDocument): Use Document::enqueueHashchangeEvent
      
      * storage/StorageEventDispatcher.cpp:
      (WebCore::StorageEventDispatcher::dispatch): Use Document::enqueueEvent
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@56249 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      43a414c9
  19. 29 Jan, 2010 1 commit
    • eric@webkit.org's avatar
      2010-01-29 Ben Murdoch <benm@google.com> · 19e68c5f
      eric@webkit.org authored
              Reviewed by Dimitri Glazkov.
      
              [Android] Android needs functionality in the ChromeClient to be informed when touch events are and are not needed by the webpage.
              https://bugs.webkit.org/show_bug.cgi?id=34215
      
              Add a function on the ChromeClient that WebCore can use to inform the platform when it needs touch events. This way the platform can optimise by not forwarding the events if they are not required.
      
              No new tests as the only implementation is specific to Android.
      
              * dom/Document.cpp:
              (WebCore::Document::detach): Check if this is the top level document and if so, stop forwarding touch events.
              (WebCore::Document::addListenerTypeIfNeeded): Inform the ChromeClient it should start forwarding touch events and guard touch event code properly.
              * history/CachedFrame.cpp:
              (WebCore::CachedFrameBase::restore): If the document uses touch events, inform the ChromeClient to start forwarding them.
              (WebCore::CachedFrame::CachedFrame): If the document uses touch events, inform the ChromeClient to stop forwarding them, as the document is being put into the page cache.
              * loader/EmptyClients.h:
              (WebCore::EmptyChromeClient::needTouchEvents): Add an empty implementation.
              * page/ChromeClient.h: Add the needTouchEvents() function.
      2010-01-29  Ben Murdoch  <benm@google.com>
      
              Reviewed by Dimitri Glazkov.
      
              [Android] Android needs functionality in the ChromeClient to be informed when touch events are and are not needed by the webpage.
              https://bugs.webkit.org/show_bug.cgi?id=34215
      
              Add needTouchEvents() to the ChromeClient which is called when the page decides it needs or no longer needs to be informed of touch events.
      
              * WebCoreSupport/ChromeClientQt.h:
              (WebCore::ChromeClientQt::needTouchEvents): Add an empty implementation.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54069 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      19e68c5f
  20. 14 Jan, 2010 1 commit
    • ap@apple.com's avatar
      Reviewed by Brady Eidson. · 334c049b
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=33652
              REGRESSION: Frames stop appearing after browsing for a while
      
              <rdar://problem/7308312> REGRESSION: iBench gets slower after several runs
      
              I do not know how not creating renderers for frames could make iBench slower, but it did.
      
              Test: fast/frames/cached-frame-counter.html
      
              * history/CachedFrame.cpp:
              (WebCore::CachedFrame::CachedFrame): A frame that's cached is moved away from Page,
              so decrement frame count here.
              (WebCore::CachedFrame::open): Increase frame count when a frame is restored.
      
              * history/CachedFrame.h: Remove unneeded forward declarations.
      
              * history/CachedPage.h: Ditto.
      
              * history/CachedPage.cpp: (WebCore::CachedPage::restore): Assert that page frame count is
              zero prior to restoring a page from b/f cache.
              
              * page/Page.cpp: (WebCore::Page::checkFrameCountConsistency): A debug-only method to
              check that frame count stored in Page matches the number of frames in frame tree.
      
              * page/Page.h:
              (WebCore::Page::decrementFrameCount): Assert that frame count is positive.
              (WebCore::Page::frameCount): Call checkFrameCountConsistency().
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      334c049b
  21. 23 Nov, 2009 1 commit
  22. 23 Sep, 2009 1 commit
    • ggaren@apple.com's avatar
      JavaScriptCore: Added the ability to swap vectors with inline capacities, so you can · 521f64b8
      ggaren@apple.com authored
      store a vector with inline capacity in a hash table.
      
      Patch by Geoffrey Garen <ggaren@apple.com> on 2009-09-23
      Reviewed by Sam Weinig.
      
      * wtf/Vector.h:
      (WTF::swap):
      (WTF::VectorBuffer::swap):
      
      WebCore: Bring a little sanity to this crazy EventTarget world of ours
      https://bugs.webkit.org/show_bug.cgi?id=29701
      
      Patch by Geoffrey Garen <ggaren@apple.com> on 2009-09-23
      Reviewed by Sam Weinig.
      
      Lots of EventTarget refactoring to achieve a single shared implementation
      that fixes some of the performance and correctness bugs of the many individual
      implementations, and makes reasoning about EventTargets and EventListeners
      much easier.
              
      The basic design is this:
          - EventTarget manages a set of EventListeners.
          - onXXX EventListener attributes forward to standard EventTarget APIs.
          - Since the onXXX code is repetitive, it is usually done with macros
            of the form DEFINE_ATTRIBUTE_EVENT_LISTENER(attributeName).
          - EventTarget provides a shared implementation of dispatchEvent,
            which subclasses with special event dispatch rules, like Node, override.
          - To support Node, which lazily instantiates its EventTarget data,
            EventTarget has no data members, and instead makes a virtual call
            to get its data from wherever its subclass chose to store it.
                    
      Code that used to call dispatchEvent, passing an ExceptionCode paratmeter,
      even though no exception could be thrown, has been changed not to do so,
      to improve clarity and performance.
              
      Code that used to call a special dispatchXXXEvent function, which just
      turned around and called dispatchEvent, has been changed to call
      dispatchEvent, to improve clarity and performance.
      
      * WebCore.base.exp:
      * WebCore.xcodeproj/project.pbxproj: Another day in the life of a WebKit
      engineer.
      
      * bindings/js/JSDOMBinding.cpp:
      (WebCore::isObservableThroughDOM): Updated for Node API change. Added
      "is not in the document but is firing event listeners" as a condition
      that makes a Node observable in the DOM, so that event listeners firing
      on removed nodes are not destroyed midstream. (This was a long-standing
      bug that was somewhat hidden by the old implementation's habit of
      copying the RegisteredEventListener vector before firing events, which
      would keep almost all the relevant objects from being destroyed.)
      
      * bindings/js/JSEventListener.cpp:
      (WebCore::JSEventListener::handleEvent): Removed the isWindowEvent flag
      because it was one of the most elaborately planned no-ops in the history
      of software crime, and one of the reasons clients thought they needed more
      than one dispatchEvent function even though they didn't.
      * bindings/js/JSEventListener.h:
      
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::JSDOMWindow::markChildren):
      (WebCore::JSMessagePort::markChildren):
      * bindings/js/JSNodeCustom.cpp:
      (WebCore::JSNode::markChildren):
      * bindings/js/JSAbstractWorkerCustom.cpp:
      * bindings/js/JSDOMApplicationCacheCustom.cpp:
      * bindings/js/JSDedicatedWorkerContextCustom.cpp:
      * bindings/js/JSEventSourceCustom.cpp:
      * bindings/js/JSMessagePortCustom.cpp:
      * bindings/js/JSSharedWorkerContextCustom.cpp: Removed.
      * bindings/js/JSWebSocketCustom.cpp:
      * bindings/js/JSWorkerContextCustom.cpp:
      (WebCore::JSWorkerContext::markChildren):
      * bindings/js/JSWorkerCustom.cpp:
      * bindings/js/JSXMLHttpRequestCustom.cpp:
      (WebCore::JSXMLHttpRequest::markChildren):
      * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
      (WebCore::JSXMLHttpRequestUpload::markChildren): EventListener marking is
      now autogenerated. Classes that still have custom mark functions for other
      reasons now call a shared EventTarget API to mark their EventListeners.
      
      * bindings/objc/ObjCEventListener.h:
      * bindings/objc/ObjCEventListener.mm:
      (WebCore::ObjCEventListener::handleEvent): Bye bye isWindowEvent.
      
      * bindings/scripts/CodeGeneratorJS.pm: Autogeneration support for
      marking and invalidating event listeners.
      
      * dom/CharacterData.cpp:
      (WebCore::CharacterData::dispatchModifiedEvent):
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::insertBefore):
      (WebCore::ContainerNode::replaceChild):
      (WebCore::willRemoveChild):
      (WebCore::ContainerNode::appendChild):
      (WebCore::dispatchChildInsertionEvents):
      (WebCore::dispatchChildRemovalEvents):
      * dom/Document.cpp:
      (WebCore::Document::removeAllEventListeners):
      (WebCore::Document::implicitClose):
      (WebCore::Document::setFocusedNode):
      (WebCore::Document::dispatchWindowEvent):
      (WebCore::Document::dispatchWindowLoadEvent):
      (WebCore::Document::finishedParsing):
      * dom/Document.h: Use dispatchEvent directly.
      
      * dom/Element.h: Moved a few event listener attributes down from Node,
      since they don't apply to all Nodes, only Elements.
      
      * dom/EventListener.h: Removed isWindowEvent parameter.
      
      * dom/EventNames.h: Added the "display" event name, so it works correctly
      with attribute macros, and for performance.
      
      * dom/EventTarget.cpp:
      (WebCore::forbidEventDispatch):
      (WebCore::allowEventDispatch):
      (WebCore::eventDispatchForbidden): Made this code (embarrasingly) thread
      safe, since it's now called on multiple threads. (Currently, we only forbid
      event dispatch on the main thread. If we ever want to forbid event dispatch
      on secondary threads, we can improve it then.)
      
      (WebCore::EventTarget::addEventListener):
      (WebCore::EventTarget::removeEventListener):
      (WebCore::EventTarget::setAttributeEventListener):
      (WebCore::EventTarget::getAttributeEventListener):
      (WebCore::EventTarget::clearAttributeEventListener):
      (WebCore::EventTarget::dispatchEvent):
      (WebCore::EventTarget::fireEventListeners):
      (WebCore::EventTarget::getEventListeners):
      (WebCore::EventTarget::removeAllEventListeners):
      * dom/EventTarget.h:
      (WebCore::FiringEventEndIterator::FiringEventEndIterator):
      (WebCore::EventTarget::ref):
      (WebCore::EventTarget::deref):
      (WebCore::EventTarget::markEventListeners):
      (WebCore::EventTarget::invalidateEventListeners):
      (WebCore::EventTarget::isFiringEventListeners):
      (WebCore::EventTarget::hasEventListeners): The ONE TRUE IMPLEMENTATION of
      EventTarget APIs, crafted from an amalgam of all the different versions
      we used to have. The most significant change here is that we no longer
      make a copy of an EventListener vector before firing the events in the
      vector -- instead, we use a reference to the original vector, along with
      a notification mechanism for the unlikely case when an EventListener is
      removed from the vector. This substantially reduces malloc, copying, and
      refcount overhead, and complexity.
      
      * dom/InputElement.cpp:
      (WebCore::InputElement::setValueFromRenderer):
      * dom/MessageEvent.h:
      (WebCore::MessageEvent::create): Use dispatchEvent directly.
      
      * dom/MessagePort.cpp:
      (WebCore::MessagePort::dispatchMessages):
      (WebCore::MessagePort::eventTargetData):
      (WebCore::MessagePort::ensureEventTargetData):
      * dom/MessagePort.h:
      (WebCore::MessagePort::setOnmessage):
      (WebCore::MessagePort::onmessage):
      * dom/MessagePort.idl: Removed custom EventTarget implementation.
      
      * dom/MutationEvent.h:
      (WebCore::MutationEvent::create): Added some default values so callers
      can construct MutationEvents more easily, without calling a custom dispatch
      function.
      
      * dom/Node.cpp:
      (WebCore::Node::addEventListener):
      (WebCore::Node::removeEventListener):
      (WebCore::Node::eventTargetData):
      (WebCore::Node::ensureEventTargetData):
      (WebCore::Node::handleLocalEvents):
      (WebCore::Node::dispatchEvent):
      (WebCore::Node::dispatchGenericEvent):
      (WebCore::Node::dispatchSubtreeModifiedEvent):
      (WebCore::Node::dispatchUIEvent):
      (WebCore::Node::dispatchKeyEvent):
      (WebCore::Node::dispatchMouseEvent):
      (WebCore::Node::dispatchWheelEvent):
      (WebCore::Node::dispatchFocusEvent):
      (WebCore::Node::dispatchBlurEvent):
      * dom/Node.h:
      (WebCore::Node::preDispatchEventHandler):
      (WebCore::Node::postDispatchEventHandler):
      * dom/Node.idl:
      * dom/NodeRareData.h:
      (WebCore::NodeRareData::eventTargetData):
      (WebCore::NodeRareData::ensureEventTargetData): Use the shared EventTarget
      interface, and call dispatchEvent directly instead of custom dispatchXXXEvent
      functions that just forwarded to dispatchEvent.
      
      * dom/RegisteredEventListener.cpp:
      * dom/RegisteredEventListener.h:
      (WebCore::RegisteredEventListener::RegisteredEventListener):
      (WebCore::operator==): This is just a simple struct now, since we no longer
      do a complicated copy / refCount / isRemoved dance just to honor the rule
      that an EventListener can be removed during event dispatch.
      
      * history/CachedFrame.cpp:
      (WebCore::CachedFrameBase::restore): Removed another custom dispatchEvent.
      
      * html/HTMLBodyElement.cpp:
      * html/HTMLBodyElement.h: Use the shared EventTarget API.
      
      * html/HTMLFormControlElement.cpp:
      (WebCore::HTMLFormControlElement::dispatchFormControlChangeEvent):
      (WebCore::HTMLFormControlElement::checkValidity):
      * html/HTMLFormElement.cpp:
      (WebCore::HTMLFormElement::handleLocalEvents):
      (WebCore::HTMLFormElement::prepareSubmit):
      (WebCore::HTMLFormElement::reset):
      * html/HTMLFormElement.h: Use the standard dispatchEvent API.
      
      * html/HTMLFrameSetElement.cpp:
      * html/HTMLFrameSetElement.h: Use the shared EventTarget API.
      
      * html/HTMLImageLoader.cpp:
      (WebCore::HTMLImageLoader::dispatchLoadEvent):
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::onSearch):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::loadInternal):
      * html/HTMLScriptElement.cpp:
      (WebCore::HTMLScriptElement::dispatchLoadEvent):
      (WebCore::HTMLScriptElement::dispatchErrorEvent):
      * html/HTMLSourceElement.cpp:
      (WebCore::HTMLSourceElement::errorEventTimerFired):
      * html/HTMLTokenizer.cpp:
      (WebCore::HTMLTokenizer::notifyFinished): Use the standard dispatchEvent API.
      
      * inspector/InspectorDOMAgent.cpp:
      (WebCore::InspectorDOMAgent::handleEvent):
      * inspector/InspectorDOMAgent.h:
      * inspector/InspectorDOMStorageResource.cpp:
      (WebCore::InspectorDOMStorageResource::handleEvent):
      * inspector/InspectorDOMStorageResource.h:
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::stopLoading):
      (WebCore::FrameLoader::canCachePageContainingThisFrame):
      (WebCore::FrameLoader::logCanCacheFrameDecision):
      (WebCore::HashChangeEventTask::performTask):
      (WebCore::FrameLoader::pageHidden): No more isWindowEvent.
      
      * loader/ImageDocument.cpp:
      (WebCore::ImageEventListener::handleEvent):
      * loader/appcache/ApplicationCacheGroup.cpp:
      (WebCore::CallCacheListenerTask::performTask):
      * loader/appcache/ApplicationCacheHost.cpp:
      (WebCore::ApplicationCacheHost::notifyDOMApplicationCache):
      * loader/appcache/ApplicationCacheHost.h:
      * loader/appcache/DOMApplicationCache.cpp:
      (WebCore::DOMApplicationCache::eventTargetData):
      (WebCore::DOMApplicationCache::ensureEventTargetData):
      * loader/appcache/DOMApplicationCache.h:
      * loader/appcache/DOMApplicationCache.idl: Switched to the standard
      EventTarget API. As a part of this, I switched this class from using a
      custom internal event name enumeration to using the standard EventNames.
      
      * notifications/Notification.cpp:
      (WebCore::Notification::eventTargetData):
      (WebCore::Notification::ensureEventTargetData):
      * notifications/Notification.h:
      (WebCore::Notification::scriptExecutionContext):
      * notifications/Notification.idl: Switched to the standard EventTarget API.
      
      * page/DOMWindow.cpp:
      (WebCore::PostMessageTimer::event):
      (WebCore::windowsWithUnloadEventListeners):
      (WebCore::windowsWithBeforeUnloadEventListeners):
      (WebCore::allowsBeforeUnloadListeners):
      (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
      (WebCore::DOMWindow::pendingUnloadEventListeners):
      (WebCore::DOMWindow::dispatchAllPendingUnloadEvents): Changed the "pending"
      unload / beforeunload listener tracker just to track which windows had
      such listeners, instead of actually keeping a copy of the listeners. Now,
      this code can use the standard EventTarget API.
      
      (WebCore::DOMWindow::~DOMWindow):
      (WebCore::DOMWindow::postMessageTimerFired):
      (WebCore::DOMWindow::addEventListener):
      (WebCore::DOMWindow::removeEventListener):
      (WebCore::DOMWindow::dispatchLoadEvent):
      (WebCore::DOMWindow::dispatchEvent):
      (WebCore::DOMWindow::removeAllEventListeners):
      (WebCore::DOMWindow::captureEvents):
      (WebCore::DOMWindow::releaseEvents):
      (WebCore::DOMWindow::eventTargetData):
      (WebCore::DOMWindow::ensureEventTargetData):
      * page/DOMWindow.h:
      * page/DOMWindow.idl: Use the standard EventTarget APIs.
      
      * page/EventHandler.cpp:
      (WebCore::EventHandler::canMouseDownStartSelect):
      (WebCore::EventHandler::canMouseDragExtendSelect):
      (WebCore::EventHandler::sendResizeEvent):
      (WebCore::EventHandler::sendScrollEvent): Use dispatchEvent directly.
      
      * page/EventSource.cpp:
      (WebCore::EventSource::endRequest):
      (WebCore::EventSource::didReceiveResponse):
      (WebCore::EventSource::parseEventStreamLine):
      (WebCore::EventSource::stop):
      (WebCore::EventSource::createMessageEvent):
      (WebCore::EventSource::eventTargetData):
      (WebCore::EventSource::ensureEventTargetData):
      * page/EventSource.h:
      * page/EventSource.idl: Use the standard EventTarget APIs.
      
      * page/FocusController.cpp:
      (WebCore::dispatchEventsOnWindowAndFocusedNode):
      (WebCore::FocusController::setFocusedFrame):
      * page/Frame.cpp:
      (WebCore::Frame::shouldClose):
      * page/Frame.h:
      * page/Page.cpp:
      (WebCore::networkStateChanged):
      * page/animation/AnimationController.cpp:
      (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
      * rendering/RenderListBox.cpp:
      (WebCore::RenderListBox::valueChanged):
      * rendering/RenderTextControl.cpp:
      (WebCore::RenderTextControl::selectionChanged):
      * rendering/RenderTextControlMultiLine.cpp:
      (WebCore::RenderTextControlMultiLine::subtreeHasChanged): Use dispatchEvent.
      
      * svg/SVGElement.cpp:
      (WebCore::hasLoadListener): Rewritten for new EventTarget API.
      
      * svg/SVGElementInstance.cpp:
      (WebCore::dummyEventTargetData):
      (WebCore::SVGElementInstance::addEventListener):
      (WebCore::SVGElementInstance::removeEventListener):
      (WebCore::SVGElementInstance::removeAllEventListeners):
      (WebCore::SVGElementInstance::dispatchEvent):
      (WebCore::SVGElementInstance::eventTargetData):
      (WebCore::SVGElementInstance::ensureEventTargetData): Use the EventTarget API.
      
      * svg/SVGElementInstance.h:
      * svg/SVGImageLoader.cpp:
      (WebCore::SVGImageLoader::dispatchLoadEvent):
      * svg/SVGScriptElement.cpp:
      (WebCore::SVGScriptElement::dispatchErrorEvent): Use dispatchEvent directly.
      
      * svg/SVGUseElement.cpp:
      (WebCore::SVGUseElement::transferEventListenersToShadowTree): Updated for
      new EventTarget API.
      
      * svg/animation/SVGSMILElement.cpp:
      (WebCore::ConditionEventListener::handleEvent): No more isWindowEvent.
      
      * websockets/WebSocket.cpp:
      (WebCore::ProcessWebSocketEventTask::create):
      (WebCore::ProcessWebSocketEventTask::performTask):
      (WebCore::ProcessWebSocketEventTask::ProcessWebSocketEventTask):
      (WebCore::WebSocket::didConnect):
      (WebCore::WebSocket::didReceiveMessage):
      (WebCore::WebSocket::didClose):
      (WebCore::WebSocket::eventTargetData):
      (WebCore::WebSocket::ensureEventTargetData):
      * websockets/WebSocket.h:
      * websockets/WebSocket.idl:
      * workers/AbstractWorker.cpp:
      (WebCore::AbstractWorker::eventTargetData):
      (WebCore::AbstractWorker::ensureEventTargetData):
      * workers/AbstractWorker.h:
      * workers/AbstractWorker.idl:
      * workers/DedicatedWorkerContext.cpp:
      * workers/DedicatedWorkerContext.h:
      * workers/DedicatedWorkerContext.idl:
      * workers/DefaultSharedWorkerRepository.cpp:
      (WebCore::SharedWorkerConnectTask::performTask):
      (WebCore::SharedWorkerScriptLoader::load):
      (WebCore::SharedWorkerScriptLoader::notifyFinished):
      * workers/SharedWorker.idl:
      * workers/SharedWorkerContext.cpp:
      (WebCore::createConnectEvent):
      * workers/SharedWorkerContext.h:
      * workers/SharedWorkerContext.idl:
      * workers/Worker.cpp:
      (WebCore::Worker::notifyFinished):
      * workers/Worker.h:
      * workers/Worker.idl:
      * workers/WorkerContext.cpp:
      (WebCore::WorkerContext::eventTargetData):
      (WebCore::WorkerContext::ensureEventTargetData):
      * workers/WorkerContext.h:
      * workers/WorkerContext.idl:
      * workers/WorkerMessagingProxy.cpp:
      (WebCore::MessageWorkerContextTask::performTask):
      (WebCore::MessageWorkerTask::performTask):
      (WebCore::WorkerExceptionTask::performTask):
      * xml/XMLHttpRequest.cpp:
      (WebCore::XMLHttpRequest::callReadyStateChangeListener):
      (WebCore::XMLHttpRequest::createRequest):
      (WebCore::XMLHttpRequest::abort):
      (WebCore::XMLHttpRequest::networkError):
      (WebCore::XMLHttpRequest::abortError):
      (WebCore::XMLHttpRequest::didSendData):
      (WebCore::XMLHttpRequest::didReceiveData):
      (WebCore::XMLHttpRequest::eventTargetData):
      (WebCore::XMLHttpRequest::ensureEventTargetData):
      * xml/XMLHttpRequest.h:
      * xml/XMLHttpRequest.idl:
      * xml/XMLHttpRequestProgressEvent.h:
      (WebCore::XMLHttpRequestProgressEvent::create):
      * xml/XMLHttpRequestUpload.cpp:
      (WebCore::XMLHttpRequestUpload::eventTargetData):
      (WebCore::XMLHttpRequestUpload::ensureEventTargetData):
      * xml/XMLHttpRequestUpload.h:
      * xml/XMLHttpRequestUpload.idl: Use new EventTarget API.
      
      WebKit/mac: Updated for a WebCore rename.
      
      Patch by Geoffrey Garen <ggaren@apple.com> on 2009-09-23
      Reviewed by Sam Weinig.
      
      * WebView/WebFrame.mm:
      (-[WebFrame _cacheabilityDictionary]):
      
      LayoutTests: Layout tests for event target sanitization.
              
      Patch by Geoffrey Garen <ggaren@apple.com> on 2009-09-23
      Reviewed by Sam Weinig.
      
      New tests for event dispatch:
      
      * fast/events/event-attributes-after-exception-expected.txt: Added.
      * fast/events/event-attributes-after-exception.html: Added.
      * fast/events/event-fire-order-expected.txt: Added.
      * fast/events/event-fire-order.html: Added.
      * fast/events/event-fired-after-removal-expected.txt: Added.
      * fast/events/event-fired-after-removal.html: Added.
              
      Fixed these tests:
      
      * fast/xmlhttprequest/xmlhttprequest-get-expected.txt: eventPhase should
      be AT_TARGET (2) when firing an event on an XHR, not INVALID (0).
      * http/tests/xmlhttprequest/infoOnProgressEvent-expected.txt: ditto
      
      * http/tests/xmlhttprequest/event-target-expected.txt:
      * http/tests/xmlhttprequest/event-target.html: Removing an event listener
      during event dispatch should prevent it from firing. (This test was backwards.)
              
      * svg/custom/loadevents-capturing.svg: Enhanced this test to tell you
      why it fails when it fails. Changed it to register runTest() (now named 
      reportResults()) using addEventListener() instead of the 'onload' attribute.
      The test relies on reportResults() running after handler(), so it needs
      to register reportResults() after handler().
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      521f64b8
  23. 02 Sep, 2009 4 commits
    • beidson@apple.com's avatar
      WebCore: More partial work towards "Page Cache should support pages with Frames" · 24f92a52
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=13631
      
      Reviewed by Darin Adler.
      
      - More CachedFrame destruction work.
      - Including related Frame and FrameLoader changes and cleanup.
      
      No new tests. (No change in behavior, current tests pass).
      
      * history/CachedFrame.cpp:
      (WebCore::CachedFrameBase::restore): Rebuild up the whole FrameTree when restoring.
      (WebCore::CachedFrame::CachedFrame): Tear down the entire FrameTree when caching.
      (WebCore::CachedFrame::destroy): For child frames that are being destroyed while in
        the PageCache, do lightweight cleanup to:
        A - Prevent referring to a stale Page object.
        B - Prevent World Leaks of WebKit objects.
      
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::stopAllLoaders): stopAllLoaders() should never be called on Frames that are
        in the PageCache. ASSERT that fact.
      (WebCore::FrameLoader::open): Remove a bogus release-build workaround, as the comment right above it
        explains it is not effective, and it'd be better to see the crash locally instead of downstream.
      (WebCore::FrameLoader::closeAndRemoveChild): Make sure the owner element has a page pointer before
        referencing it.
      (WebCore::FrameLoader::detachFromParent): Use the new detachViewsAndDocumentLoader() call
      (WebCore::FrameLoader::detachViewsAndDocumentLoader): Does lightweight cleanup of client (WebKit) objects.
      * loader/FrameLoader.h:
      
      * page/Frame.cpp:
      (WebCore::Frame::detachFromPage): Simply clear the Page pointer without doing any other work.
      (WebCore::Frame::pageDestroyed): Use the new detachFromPage().
      * page/Frame.h:
      
      WebKit/mac: More partial work towards "Page Cache should support pages with Frames"
      https://bugs.webkit.org/show_bug.cgi?id=13631
      
      Reviewed by Darin Adler.
      
      * WebView/WebHTMLView.mm:
      (-[WebHTMLView _topHTMLView]): Rework the ASSERT in this method to reflect the
        reality of calling this method for pages currently in the PageCache.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47999 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      24f92a52
    • beidson@apple.com's avatar
      Forget to rename openInFrameloader() to open(), which was requested in Darin's... · 31ec7b9c
      beidson@apple.com authored
      Forget to rename openInFrameloader() to open(), which was requested in Darin's review of my last patch.
      
      * history/CachedFrame.cpp:
      (WebCore::CachedFrameBase::restore):
      (WebCore::CachedFrame::open):
      * history/CachedFrame.h:
      * history/CachedPage.cpp:
      (WebCore::CachedPage::restore):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47990 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      31ec7b9c
    • beidson@apple.com's avatar
      In http://trac.webkit.org/changeset/47943 I added new header dependencies to FrameLoader.h. · 913c7f8a
      beidson@apple.com authored
      Removing them is a little trouble, but worth it going forward.
      The pattern of creating a "CachedFrameBase" as the interface CachedFrame provides to FrameLoader
      was suggested by Darin Adler.
      
      Reviewed by Darin Adler.
      
      No new tests. (No change in behavior)
      
      Make CachedFrame inherit privately from CachedFrameBase, which becomes the interface FrameLoader uses:
      * history/CachedFrame.cpp:
      (WebCore::CachedFrameBase::CachedFrameBase):
      (WebCore::CachedFrameBase::~CachedFrameBase):
      (WebCore::CachedFrameBase::restore):
      (WebCore::CachedFrame::CachedFrame):
      (WebCore::CachedFrame::openInFrameLoader):
      * history/CachedFrame.h:
      (WebCore::CachedFrameBase::document):
      (WebCore::CachedFrameBase::view):
      (WebCore::CachedFrameBase::domWindow):
      (WebCore::CachedFrame::create):
      (WebCore::CachedFrame::documentLoader):
      (WebCore::CachedFrame::mousePressNode):
      
      Call the new ::openInFrameLoader() method on the CachedFrame, as CachedFrameBase is now the only
      thing capable of interacting with FrameLoader::open(CachedFrameBase):
      * history/CachedPage.cpp:
      (WebCore::CachedPage::restore):
      * history/CachedPage.h:
      (WebCore::CachedPage::documentLoader):
      
      Make ::open(CachedFrame) public, and change it to ::open(CachedFrameBase):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::open):
      * loader/FrameLoader.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47989 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      913c7f8a
    • beidson@apple.com's avatar
      More partial work towards "Page Cache should support pages with Frames" · f845d1e8
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=13631
      
      Reviewed by Sam Weinig.
      
      This patch is primarily about the "CachedFrame tree" and making slightly different decisions
      based on whether a CachedFrame is the main frame or a subframe.
      
      - Store whether a CachedFrame represents the main frame or a subframe.
      - "Chop off the frame tree" for the main frame when creating its CachedFrame, as main frames 
        are reused and need to start new page loads with an empty frame tree.
      - Reattach the frame tree to the main frame when restoring it.
      - open() the cached subframes in their respective loaders when restoring.
      - Properly clear() and destroy() cached subframes.
      - When committing to a new page load, and after caching the previous page, only clear the
        FrameView for the main frame.
      
      Note that all of above will eventually be necessary as I continue to land this work in pieces,
      but doesn't actually change any behavior right now because we still refuse to even *try* to
      cache pages with frames.
      
      No new tests. No change in behavior, and current tests continue to pass.
      
      * history/CachedFrame.cpp:
      (WebCore::CachedFrame::CachedFrame):
      (WebCore::CachedFrame::restore):
      (WebCore::CachedFrame::clear):
      (WebCore::CachedFrame::destroy):
      * history/CachedFrame.h:
      (WebCore::CachedFrame::isMainFrame):
      
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::clear):
      (WebCore::FrameLoader::open):
      * loader/FrameLoader.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f845d1e8
  24. 01 Sep, 2009 1 commit
    • beidson@apple.com's avatar
      Page Cache should support pages with frames · 00113e61
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=13631
      
      Reviewed by Sam Weinig.
      
      Things learned in the full task that this patch addresses:
      - The notions of clearing a CachedFrame and destroying a CachedFrame were two concepts that 
        needed to be managed separately.
      - Once we start restoring pages with multiple CachedFrames, we'll have to be calling
        FrameLoader::open(CachedFrame&) multiple times with different CachedFrames, and this process
        will be guided by the CachedFrames themselves.
      
      No new tests. (No change in behavior, current layout tests pass)
              
      * history/CachedFrame.cpp:
      (WebCore::CachedFrame::CachedFrame):
      (WebCore::CachedFrame::~CachedFrame):
      (WebCore::CachedFrame::clear): Only clear pointers out.
      (WebCore::CachedFrame::destroy): Perform the destructive cleanup work here - Things that shouldn't
        occur simply by navigating back to a page with a CachedFrame.
      * history/CachedFrame.h:
      
      * history/CachedPage.cpp:
      (WebCore::CachedPage::~CachedPage):
      (WebCore::CachedPage::restore): Call clear() after restoring.
      (WebCore::CachedPage::clear):
      (WebCore::CachedPage::destroy):
      * history/CachedPage.h:
      
      * history/PageCache.cpp:
      (WebCore::PageCache::releaseAutoreleasedPagesNow): destroy() CachedPages that are being pruned,
        instead of clearing them.
      
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::commitProvisionalLoad): Let the CachedPage clear() itself after restoring.
      (WebCore::FrameLoader::open): Don't ::open() the CachedFrame, as the CachedPage does that now.
      * loader/FrameLoader.h:  Add the friending so CachedPage and CachedFrame can better guide the process.
        Even though CachedFrame::restore() isn't used for now, it will be soon.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47943 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      00113e61
  25. 27 Aug, 2009 1 commit
    • ap@apple.com's avatar
      Reviewed by Adele Peterson. · 383dde58
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=28758
              <rdar://problem/6440869> Implement pageshow and pagehide events for b/f cache (28758)
      
              Tests: fast/events/pageshow-pagehide-on-back-cached.html
                     fast/events/pageshow-pagehide-on-back-uncached.html
                     fast/events/pageshow-pagehide.html
      
              * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): Dispatch pagehide event
              (this function is called both when a document goes away, and when it goes to b/f cache).
      
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::dispatchAllPendingUnloadEvents): Dispatch pagehide right before unload.
              (WebCore::DOMWindow::dispatchPageTransitionEvent): Do what it takes to add a new event handler
              that can be installed on Window object.
              (WebCore::DOMWindow::onpagehide): Ditto.
              (WebCore::DOMWindow::setOnpagehide): Ditto.
              (WebCore::DOMWindow::onpageshow): Ditto.
              (WebCore::DOMWindow::setOnpageshow): Ditto.
      
              * history/CachedFrame.cpp: (WebCore::CachedFrame::restore): Dispatch pageshow for a page
              that isn't being restored from cache.
      
              * dom/PageTransitionEvent.cpp: Added.
              (WebCore::PageTransitionEvent::PageTransitionEvent):
              (WebCore::PageTransitionEvent::~PageTransitionEvent):
              (WebCore::PageTransitionEvent::initPageTransitionEvent):
              * dom/PageTransitionEvent.h: Added.
              (WebCore::PageTransitionEvent::create):
              (WebCore::PageTransitionEvent::isPageTransitionEvent):
              (WebCore::PageTransitionEvent::persisted):
              * dom/PageTransitionEvent.idl: Added.
              Add event class implementation.
      
              * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::parseMappedAttribute): Support
              inline listener definition (note that adding listeners to document.body programmatically
              is not supported, matching Firefox).
      
              * dom/Document.cpp:
              (WebCore::Document::implicitClose): Dispatch pageshow event right before load event.
              (WebCore::Document::dispatchPageTransitionEvent): Do what it takes to add a new event for
              Docuemnt.
              (WebCore::Document::createEvent): Ditto.
      
              * dom/Document.h: Added dispatchPageTransitionEvent.
      
              * DerivedSources.make:
              * GNUmakefile.am:
              * WebCore.gypi:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * bindings/js/JSEventCustom.cpp: (WebCore::toJS):
              * dom/Event.cpp: (WebCore::Event::isPageTransitionEvent):
              * dom/Event.h:
              * dom/EventNames.h:
              * html/HTMLAttributeNames.in:
              * page/DOMWindow.h:
              * page/DOMWindow.idl:
              Do what it takes to add a new event type.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47824 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      383dde58
  26. 22 Aug, 2009 1 commit
    • adele@apple.com's avatar
      Fix for <rdar://problem/7161656> Crash in RenderObject::destroy when using custom scrollbars · fb2cebdd
      adele@apple.com authored
      Reviewed by Anders Carlsson.
      
      Custom scrollbars normally get detached when a document gets detached.  In this case, a crash was happening when the document had gone into the page cache 
      and then was getting destroyed without proper scrollbar teardown.  This change makes custom scrollbars get detached when the document enters the cache.
      
      I couldn't figure out a way to reliably cause this to happen in DRT, since the reproducible case relies on the cache being purged at a particular time.
      
      * history/CachedFrame.cpp: (WebCore::CachedFrame::CachedFrame): Detach custom scrollbars when the CachedFrame is created.  
        They'll get reattached when the document comes out of the page cache.
      * page/FrameView.cpp: (WebCore::FrameView::~FrameView): Added some asserts to catch this problem earlier in debug builds.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47679 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fb2cebdd
  27. 15 Jul, 2009 1 commit
    • beidson@apple.com's avatar
      WebCore: · 2f520756
      beidson@apple.com authored
      2009-07-15  Brady Eidson  <beidson@apple.com>
      
              Reviewed by Dan Bernstein.
      
              https://bugs.webkit.org/show_bug.cgi?id=27304
              WebKit should provide usage and eligibility information about the page cache.
      
              * WebCore.base.exp:
      
              * history/CachedFrame.cpp:
              (WebCore::CachedFrame::childFrameCount):
              * history/CachedFrame.h:
      
              * history/PageCache.cpp:
              (WebCore::PageCache::frameCount):
              (WebCore::PageCache::autoreleasedPageCount):
              * history/PageCache.h:
              (WebCore::PageCache::pageCount):
      
      WebKit/mac:
      
      2009-07-15  Brady Eidson  <beidson@apple.com>
      
              Reviewed by Dan Bernstein.
      
              https://bugs.webkit.org/show_bug.cgi?id=27304
              WebKit should provide usage and eligibility information about the page cache.
      
              * Misc/WebCoreStatistics.h:
              * Misc/WebCoreStatistics.mm:
              (+[WebCoreStatistics numberCachedPages]):
              (+[WebCoreStatistics numberCachedFrames]):
              (+[WebCoreStatistics numberAutoreleasedPages]):
              * WebKit.exp:
      
              * WebView/WebFrame.mm:
              (-[WebFrame _cacheabilityDictionary]): Returns a dictionary with all the data about
                why the frame is not cacheable. If the frame *is* cacheable, the dictionary is
                empty.
              * WebView/WebFramePrivate.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45923 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2f520756
  28. 19 May, 2009 1 commit
    • ap@webkit.org's avatar
      Reviewed by Darin Adler and Brady Eidson. · 142736a7
      ap@webkit.org authored
              REGRESSION (r42446?): UA Profiler in http://stevesouders.com/ua/ stalls
      
              The problem was that Document::removeAllEventListeners() was called for a wrong document
              when a CachedFrame was destroyed.
      
              Cannot be tested automatically, because DRT doesn't have a b/f cache.
      
              * dom/Document.cpp: (WebCore::Document::domWindow): Make sure that this doesn't return an
              unrelated window even if document's m_frame pointer is stale.
      
              * history/CachedFrame.cpp: (WebCore::CachedFrame::clear): Added a FIXME about strange behavior.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43866 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      142736a7
  29. 13 Apr, 2009 1 commit
    • ggaren@apple.com's avatar
      2009-04-13 Geoffrey Garen <ggaren@apple.com> · bc6ef281
      ggaren@apple.com authored
              Reviewed by Sam Weinig.
      
              Moved storage for window event listeners into the window object.
      
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::addEventListener):
              (WebCore::JSDOMWindow::removeEventListener): Add / remove window event
              listeners to / from the window object.
      
              * dom/Document.cpp:
              (WebCore::Document::removeAllEventListeners):
              (WebCore::Document::clear):
              (WebCore::Document::setWindowInlineEventListenerForTypeAndAttribute): Moved
              a bunch of code to the DOMWindow class, and left behind a few calls through
              to DOMWindow, to support legacy clients. (Eventually, these will go away, too.)
      
              * dom/Document.h: ditto.
      
              * dom/Node.cpp:
              (WebCore::Node::dispatchGenericEvent):
              (WebCore::Node::dispatchWindowEvent): Dipatch window events on the window
              object, not the document.
      
              * dom/Node.h:
              * dom/RegisteredEventListener.h: Moved RegisteredEventListenerVector
              declaration, since it's required in more places now.
      
              * history/CachedFrame.cpp:
              (WebCore::CachedFrame::clear): Updated for rename. Also, remove event
              listeners before detaching and clearing the document's window pointer,
              since the the document needs its window pointer in order to tell the window
              to clear its event listeners.
      
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::stopLoading):
              (WebCore::FrameLoader::canCachePageContainingThisFrame):
              (WebCore::FrameLoader::logCanCacheFrameDecision): Updated for rename, and
              movement of window event listeners into the window.
      
              * loader/ImageDocument.cpp:
              (WebCore::ImageDocument::createDocumentStructure): Updated for movement
              of window event listeners into the window.
      
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::handleEvent):
              (WebCore::DOMWindow::addEventListener):
              (WebCore::DOMWindow::removeEventListener):
              (WebCore::DOMWindow::removeAllEventListeners):
              (WebCore::DOMWindow::hasEventListener):
              (WebCore::DOMWindow::setInlineEventListenerForType):
              (WebCore::DOMWindow::removeInlineEventListenerForType):
              (WebCore::DOMWindow::inlineEventListenerForType):
              (WebCore::DOMWindow::addPendingFrameUnloadEventCount):
              (WebCore::DOMWindow::removePendingFrameUnloadEventCount):
              (WebCore::DOMWindow::addPendingFrameBeforeUnloadEventCount):
              (WebCore::DOMWindow::removePendingFrameBeforeUnloadEventCount):
              * page/DOMWindow.h: Moved a bunch of code to the DOMWindow class, from the Document.
      
              * page/Frame.cpp:
              (WebCore::Frame::shouldClose): Updated for movement of window event listeners into the window.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42446 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bc6ef281
  30. 11 Feb, 2009 1 commit
    • beidson@apple.com's avatar
      2009-02-11 Brady Eidson <beidson@apple.com> · 028c7a74
      beidson@apple.com authored
              Reviewed by Darin Adler
      
              <rdar://problem/3541409> - Further FrameLoader and page cache cleanup
      
              * history/CachedFrame.cpp:
              (WebCore::CachedFrame::restore): Moved updatePlatformScriptObjects() here.
      
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::commitProvisionalLoad): Rolled opened() into this method.  This method was
                the only caller and - in the future - will benefit from doing parts of opened()'s work differently.
              (WebCore::FrameLoader::open): Split off per-frame logic into open(CachedFrame&) method.
              (WebCore::FrameLoader::closeAndRemoveChild): Added.  Do the non-tree related cleanup that
                FrameTree::removeChild() used to do.
              (WebCore::FrameLoader::detachFromParent): Call ::closeAndRemoveChild() instead.
              (WebCore::FrameLoader::cachePageForHistoryItem): Perform the "can cache page" check here.
              * loader/FrameLoader.h:
      
              * page/FrameTree.cpp:
              (WebCore::FrameTree::removeChild): Just remove the Frame from the tree.  Closing it and other
                cleanup is the responsibility of the FrameLoader.
              * page/FrameTree.h:
              (WebCore::FrameTree::detachFromParent): Added to just clear a Frame's parent pointer
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40870 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      028c7a74
  31. 04 Feb, 2009 1 commit
    • beidson@apple.com's avatar
      2009-02-04 Brady Eidson <beidson@apple.com> · 358104e1
      beidson@apple.com authored
              Reviewed by Sam Weinig
      
              <rdar://problem/3541409> - Further HistoryItem / BF cache cleanup
      
              * history/CachedFrame.cpp:
              (WebCore::CachedFrame::CachedFrame):
              (WebCore::CachedFrame::restore):
              * history/CachedFrame.h:
      
              * history/CachedPage.cpp:
              (WebCore::CachedPage::restore):
              * history/CachedPage.h:
              (WebCore::CachedPage::mainFrameView):
      
              * history/HistoryItem.cpp:
              (WebCore::HistoryItem::HistoryItem):
              (WebCore::HistoryItem::~HistoryItem):
              * history/HistoryItem.h:
              (WebCore::HistoryItem::isInPageCache):
      
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::open):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40642 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      358104e1
  32. 30 Jan, 2009 1 commit
    • beidson@apple.com's avatar
      WebCore: · d1418270
      beidson@apple.com authored
      2009-01-30  Brady Eidson  <beidson@apple.com>
      
              Reviewed by Sam Weinig
      
              - Let CachedFrame handle the suspending/resuming of active DOM objects itself instead of
                relying on some outside force.
              - Clear the previous history item inside FrameLoader instead of relying on multiple
                FrameLoaderClients to do it.
      
              * history/CachedFrame.cpp:
              (WebCore::CachedFrame::CachedFrame): Suspend active DOM objects here.
              (WebCore::CachedFrame::restore): Resume those DOM objects here.
              * history/CachedFrame.h:
              (WebCore::CachedFrame::domWindow):
      
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::commitProvisionalLoad): Let CachedFrame  creation handle the 
                suspending of active DOM objects.
              (WebCore::FrameLoader::open): Let CachedFrame::restore() handle resuming those DOM objects.
              (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Call frameLoadCompleted() instead
                of performing a client call by itself.
              (WebCore::FrameLoader::frameLoadCompleted):
      
      WebKit/mac:
      
      2009-01-30  Brady Eidson  <beidson@apple.com>
      
              Reviewed by Sam Weinig
      
              Remove FrameLoaderClient code that is now handled by FrameLoader itself
      
              * WebCoreSupport/WebFrameLoaderClient.mm:
              (WebFrameLoaderClient::frameLoadCompleted):
      
      WebKit/qt:
      
      2009-01-30  Brady Eidson  <beidson@apple.com>
      
              Reviewed by Sam Weinig
      
              Remove FrameLoaderClient code that is now handled by FrameLoader itself
      
              * WebCoreSupport/FrameLoaderClientQt.cpp:
              (WebCore::FrameLoaderClientQt::frameLoadCompleted):
      
      WebKit/win:
      
      2009-01-30  Brady Eidson  <beidson@apple.com>
      
              Reviewed by Sam Weinig
      
              Remove FrameLoaderClient code that is now handled by FrameLoader itself
      
              * WebFrame.cpp:
              (WebFrame::frameLoadCompleted):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40408 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d1418270
  33. 27 Jan, 2009 1 commit
    • beidson@apple.com's avatar
      2009-01-27 Brady Eidson <beidson@apple.com> · ad3587cd
      beidson@apple.com authored
              Reviewed by Darin Adler
      
              <rdar://problem/3541409> - More groundwork and cleanup for CachedFrames
      
              * history/CachedFrame.cpp:
              (WebCore::CachedFrame::CachedFrame): Make the savePlatformDataToCachedFrame() client call here,
                and add the code for caching subframes.
              (WebCore::CachedFrame::clear):
              * history/CachedFrame.h: Change to be RefCounted
              (WebCore::CachedFrame::create):
              (WebCore::CachedFrame::url):
      
              * history/CachedPage.cpp:
              (WebCore::CachedPage::CachedPage):
              (WebCore::CachedPage::restore):
              * history/CachedPage.h:
              (WebCore::CachedPage::document):
              (WebCore::CachedPage::documentLoader):
              (WebCore::CachedPage::view):
              (WebCore::CachedPage::url):
              (WebCore::CachedPage::domWindow):
              (WebCore::CachedPage::cachedMainFrame):
      
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::cachePageForHistoryItem): Move the platform data saving into the
                CachedFrame itself.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40302 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ad3587cd
  34. 23 Jan, 2009 3 commits
    • beidson@apple.com's avatar
      2009-01-23 Brady Eidson <beidson@apple.com> · 9c206a9b
      beidson@apple.com authored
              Reviewed by Darin Adler
      
              In CachedPage, break off per-Frame pieces of data into a CachedFrame object.
      
              * GNUmakefile.am:
              * WebCore.base.exp:
              * WebCore.pro:
              * WebCore.scons:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
      
              * history/CachedFrame.cpp: Added.
              (WebCore::cachedFrameCounter):
              (WebCore::CachedFrame::CachedFrame):
              (WebCore::CachedFrame::~CachedFrame):
              (WebCore::CachedFrame::restore):
              (WebCore::CachedFrame::clear):
              (WebCore::CachedFrame::setCachedFramePlatformData):
              (WebCore::CachedFrame::cachedFramePlatformData):
              * history/CachedFrame.h: Added.
              (WebCore::CachedFrame::document):
              (WebCore::CachedFrame::documentLoader):
              (WebCore::CachedFrame::view):
              (WebCore::CachedFrame::mousePressNode):
              (WebCore::CachedFrame::url):
              (WebCore::CachedFrame::domWindow):
      
              * history/CachedPage.cpp:
              (WebCore::CachedPage::CachedPage):
              (WebCore::CachedPage::restore):
              (WebCore::CachedPage::clear):
              (WebCore::CachedPage::setCachedFramePlatformData):
              (WebCore::CachedPage::cachedFramePlatformData):
              * history/CachedPage.h:
              (WebCore::CachedPage::document):
              (WebCore::CachedPage::documentLoader):
              (WebCore::CachedPage::view):
              (WebCore::CachedPage::mousePressNode):
              (WebCore::CachedPage::url):
              (WebCore::CachedPage::domWindow):
      
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::cachePageForHistoryItem): Setting the DocumentLoader independently of
                creating a CachedPage was a historical relic.  Take the opportunity to clean that up.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40210 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9c206a9b
    • beidson@apple.com's avatar
      WebCore: · 94faeb95
      beidson@apple.com authored
      2009-01-23  Brady Eidson  <beidson@apple.com>
      
              Rubberstamped by Darin Adler
      
              Rename CachedPagePlatformData to CachedFramePlatformData to more accurately reflect its true role.
      
              * GNUmakefile.am:
              * WebCore.base.exp:
              * WebCore.order:
              * WebCore.xcodeproj/project.pbxproj:
      
              * history/CachedFramePlatformData.h: Copied from WebCore/history/CachedPagePlatformData.h.
              (WebCore::CachedFramePlatformData::~CachedFramePlatformData):
              * history/CachedPagePlatformData.h: Removed.
      
              * history/CachedPage.cpp:
              (WebCore::CachedPage::clear):
              (WebCore::CachedPage::setCachedFramePlatformData):
              (WebCore::CachedPage::cachedFramePlatformData):
              * history/CachedPage.h:
      
      WebKit:
      
      2009-01-23  Brady Eidson  <beidson@apple.com>
      
              Rubberstamped by Darin Adler
      
              Rename CachedPagePlatformData to CachedFramePlatformData to more accurately reflect its true role.
      
              * WebKit.xcodeproj/project.pbxproj:
      
      WebKit/mac:
      
      2009-01-23  Brady Eidson  <beidson@apple.com>
      
              Rubberstamped by Darin Adler
      
              Rename CachedPagePlatformData to CachedFramePlatformData to more accurately reflect its true role.
      
              * WebCoreSupport/WebCachedFramePlatformData.h: Copied from WebKit/mac/WebCoreSupport/WebCachedPagePlatformData.h.
              (WebCachedFramePlatformData::WebCachedFramePlatformData):
              * WebCoreSupport/WebCachedPagePlatformData.h: Removed.
      
              * WebCoreSupport/WebFrameLoaderClient.mm:
              (WebFrameLoaderClient::savePlatformDataToCachedPage):
              (WebFrameLoaderClient::transitionToCommittedFromCachedPage):
      
              * WebKit.order:
      
      WebKit/win:
      
      2009-01-23  Brady Eidson  <beidson@apple.com>
      
              Rubberstamped by Darin Adler
      
              Rename CachedPagePlatformData to CachedFramePlatformData to more accurately reflect its true role.
      
              * WebCachedFramePlatformData.h: Copied from WebKit/win/WebCachedPagePlatformData.h.
              (WebCachedFramePlatformData::WebCachedFramePlatformData):
              * WebCachedPagePlatformData.h: Removed.
      
              * WebCoreSupport/WebFrameLoaderClient.cpp:
              (WebFrameLoaderClient::savePlatformDataToCachedPage):
      
              * WebKit.vcproj/WebKit.vcproj:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40198 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      94faeb95
    • beidson@apple.com's avatar
      2009-01-23 Brady Eidson <beidson@apple.com> · 80c19358
      beidson@apple.com authored
              Rubberstamped by Sam Weinig
      
              Rework ScriptCachedPageData to ScriptCachedFrameData to more accurately reflect its true purpose
      
              * GNUmakefile.am:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
      
              * bindings/js/ScriptCachedFrameData.cpp: Copied from bindings/js/ScriptCachedPageData.cpp.
              (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
              (WebCore::ScriptCachedFrameData::domWindow):
              (WebCore::ScriptCachedFrameData::~ScriptCachedFrameData):
              (WebCore::ScriptCachedFrameData::restore):
              (WebCore::ScriptCachedFrameData::clear):
              * bindings/js/ScriptCachedFrameData.h: Copied from bindings/js/ScriptCachedPageData.h.
              * bindings/js/ScriptCachedPageData.cpp: Removed.
              * bindings/js/ScriptCachedPageData.h: Removed.
      
              * history/CachedPage.cpp:
              (WebCore::CachedPage::CachedPage):
              (WebCore::CachedPage::restore):
              * history/CachedPage.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40168 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      80c19358
  35. 11 Jan, 2009 1 commit