1. 05 Apr, 2013 4 commits
    • kangil.han@samsung.com's avatar
      Prefer prefix ++/-- operators for non-primitive types · d97b4ea1
      kangil.han@samsung.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114033
      
      Reviewed by Alexey Proskuryakov.
      
      Post ++/-- creates a copy of current value and it is not necessary, so use prefix instead.
      
      * bindings/js/Dictionary.cpp:
      (WebCore::Dictionary::getOwnPropertiesAsStringHashMap):
      (WebCore::Dictionary::getOwnPropertyNames):
      * bindings/js/ScriptCallStackFactory.cpp:
      (WebCore::createScriptCallStack):
      * dom/ContainerNode.cpp:
      (WebCore::willRemoveChildren):
      * dom/Range.cpp:
      (WebCore::Range::processAncestorsAndTheirSiblings):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::detachChildren):
      * platform/graphics/gpu/LoopBlinnPathProcessor.cpp:
      (WebCore):
      (WebCore::LoopBlinnPathProcessor::subdivideCurvesSlow):
      * rendering/InlineTextBox.cpp:
      (WebCore::InlineTextBox::paintDocumentMarkers):
      * xml/XPathFunctions.cpp:
      (WebCore::XPath::Function::setArguments):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147832 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d97b4ea1
    • aestes@apple.com's avatar
      Returning NULL from willSendRequest should cancel a load from the memory cache · 0c8e191b
      aestes@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114075
      
      Reviewed by Darin Adler.
      
      Source/WebCore:
      
      When a resource is loaded from the memory cache and the client does not
      implement the didLoadResourceFromMemoryCache delegate method, WebKit
      synthesizes the typical sequence of resource load callbacks. One of
      these is willSendRequest, which gives the client the opportunity to
      modify the request. We should respect these modifications.
      
      Handling any arbitrary modification is difficult given where in the
      loading process we check the memory cache (see <http://webkit.org/b/113251>),
      but we can handle the common case where the client cancels the load by
      returning a NULL request.
      
      Test: fast/loader/willsendrequest-returns-null-for-memory-cache-load.html
      
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::willLoadMediaElementURL): Passed request to sendRemainingDelegateMessages.
      (WebCore::FrameLoader::commitProvisionalLoad): Ditto.
      (WebCore::FrameLoader::loadResourceSynchronously): Ditto.
      (WebCore::FrameLoader::loadedResourceFromMemoryCache): Added an out
      parameter to pass back a request potentially modified by
      requestFromDelegate, which is also passed to sendRemainingDelegateMessages.
      * loader/FrameLoader.h:
      * loader/ResourceLoadNotifier.cpp:
      (WebCore::ResourceLoadNotifier::dispatchDidFailLoading): Added a
      function to dispatch didFailLoading and to call the correct InspectorInstrumentation.
      (WebCore::ResourceLoadNotifier::sendRemainingDelegateMessages): If the
      request is NULL, call dispatchDidFailLoading and return. This matches
      the delegate callback sequence of a non memory cache load that is
      cancelled by willSendRequest.
      * loader/ResourceLoadNotifier.h:
      * loader/cache/CachedResourceLoader.cpp:
      (WebCore::CachedResourceLoader::shouldContinueAfterNotifyingLoadedFromMemoryCache):
      Return false if the memory cache load is cancelled by the client.
      (WebCore::CachedResourceLoader::requestResource): Return early if
      shouldContinueAfterNotifyingLoadedFromMemoryCache is false.
      
      LayoutTests:
      
      * fast/loader/resources/cached-image.html: Added.
      * fast/loader/willsendrequest-returns-null-for-memory-cache-load-expected.txt: Added.
      * fast/loader/willsendrequest-returns-null-for-memory-cache-load.html: Added.
      * platform/wk2/TestExpectations: Expect the test to fail in WKTR due to <http://webkit.org/b/114074>.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147829 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0c8e191b
    • antti@apple.com's avatar
      Throttle compositing layer flushes during page loading · a6775c18
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=113786
      
      Reviewed by Simon Fraser.
              
      Page content can change rapidly during page loading triggering excessive layer flushes and repainting. We should avoid this unnecessary work.
              
      This patch reduces layer flushes (and painting) during loading by 50-70% on many popular pages.
      
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::loadProgressingStatusChanged):        
      * loader/FrameLoader.h:
      * loader/ProgressTracker.cpp:
      (WebCore::ProgressTracker::ProgressTracker):
      (WebCore::ProgressTracker::reset):
      (WebCore::ProgressTracker::progressStarted):
      (WebCore::ProgressTracker::finalProgressComplete):
      (WebCore::ProgressTracker::isLoadProgressing):
      (WebCore::ProgressTracker::progressHeartbeatTimerFired):
      * loader/ProgressTracker.h:
              
          Track if the document load is progressing. This is done with a heartbeat timer that checks every 100ms if we have received more than 1k of data.
          If four heartbeats pass without progress then we consider the load stalled.
      
      * page/FrameView.cpp:
      (WebCore::FrameView::resetDeferredRepaintDelay):
              
          Disable throttling temporary on user interaction so the page stays as responsive as possible even during loading.
      
      (WebCore::FrameView::updateLayerFlushThrottling):
              
          Enable throttling when the load is progressing, disable otherwise.
      
      * page/FrameView.h:
      * platform/graphics/GraphicsLayer.h:
      (WebCore::GraphicsLayer::canThrottleLayerFlush):
      * platform/graphics/ca/GraphicsLayerCA.cpp:
      (WebCore::GraphicsLayerCA::platformCALayerDidCreateTiles):
      (WebCore::GraphicsLayerCA::canThrottleLayerFlush):
              
          Don't throttle if new tiles have been added by the tile controller. They may have stale content and need to be flushed immediately.
      
      (WebCore::GraphicsLayerCA::noteLayerPropertyChanged):
              
          Set the new TilesAdded change flag.
      
      * platform/graphics/ca/GraphicsLayerCA.h:
      * rendering/RenderLayerBacking.cpp:
      (WebCore::RenderLayerBacking::notifyFlushRequired):
      * rendering/RenderLayerCompositor.cpp:
      (WebCore::RenderLayerCompositor::RenderLayerCompositor):
      (WebCore::RenderLayerCompositor::notifyFlushRequired):
      (WebCore::RenderLayerCompositor::scheduleLayerFlushNow):
              
          Factor the actual flush scheduling to private function.
      
      (WebCore::RenderLayerCompositor::scheduleLayerFlush):
              
          Mark the compositor for flush and return without flushing if the flushes are currently being throttled.
      
      (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
              
          After a flush, start the throtting timer (currently 0.5s) coalescing the subsequent flushes.
      
      (WebCore::RenderLayerCompositor::didChangeVisibleRect):
              
          Do immediately flush if needed.
      
      (WebCore::RenderLayerCompositor::setLayerFlushThrottlingEnabled):
              
          Flush immediately if disabled.
      
      (WebCore::RenderLayerCompositor::disableLayerFlushThrottlingTemporarilyForInteraction):
      (WebCore::RenderLayerCompositor::isThrottlingLayerFlushes):
      (WebCore::RenderLayerCompositor::startLayerFlushTimerIfNeeded):
      (WebCore::RenderLayerCompositor::layerFlushTimerFired):
              
          Flush when the timer fires timer.
      
      * rendering/RenderLayerCompositor.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147797 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a6775c18
    • rniwa@webkit.org's avatar
      Remove Chromium code from WebCore/loader · 2e41de8f
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=114011
      
      Reviewed by Benjamin Poulain.
      
      Removed.
      
      * loader/DocumentLoader.cpp:
      (WebCore::DocumentLoader::responseReceived):
      * loader/DocumentThreadableLoader.h:
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::FrameLoader):
      (WebCore::FrameLoader::defaultObjectContentType):
      (WebCore):
      * loader/FrameLoader.h:
      (FrameLoader):
      * loader/FrameLoaderClient.h:
      (FrameLoaderClient):
      * loader/PingLoader.cpp:
      (WebCore::PingLoader::loadImage):
      (WebCore::PingLoader::sendPing):
      (WebCore::PingLoader::sendViolationReport):
      * loader/ResourceLoadScheduler.cpp:
      (WebCore):
      (WebCore::ResourceLoadScheduler::ResourceLoadScheduler):
      (WebCore::ResourceLoadScheduler::scheduleLoad):
      * loader/ResourceLoader.h:
      * loader/SubresourceLoader.h:
      * loader/ThreadableLoaderClient.h:
      (ThreadableLoaderClient):
      * loader/ThreadableLoaderClientWrapper.h:
      (ThreadableLoaderClientWrapper):
      * loader/appcache/ApplicationCacheHost.h:
      (WebCore):
      (ApplicationCacheHost):
      * loader/cache/CachedRawResource.h:
      (CachedRawResource):
      (WebCore::CachedRawResourceClient::redirectReceived):
      * loader/cache/CachedResource.cpp:
      (WebCore):
      (WebCore::CachedResource::load):
      * loader/cache/CachedResource.h:
      (WebCore::CachedResource::didSendData):
      * loader/cache/CachedResourceLoader.cpp:
      (WebCore::CachedResourceLoader::requestResource):
      (WebCore::CachedResourceLoader::preload):
      * loader/chromium: Removed.
      * loader/chromium/CachedRawResourceChromium.cpp: Removed.
      * loader/chromium/DocumentThreadableLoaderChromium.cpp: Removed.
      * loader/chromium/ResourceLoaderChromium.cpp: Removed.
      * loader/chromium/SubresourceLoaderChromium.cpp: Removed.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147730 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2e41de8f
  2. 29 Mar, 2013 1 commit
    • ap@apple.com's avatar
      Expose FeatureObserver data to WebKit clients · b4e17165
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=113613
      
              Reviewed by Sam Weinig.
      
              FeatureObserver used to depend on chromium-only HistogramSupport, which is not
              really usable on Mac at least.
      
              Instead of adding parallel feature reporting machinery, I'm adding a way to
              generically relay the data from FeatureObserver to port code.
      
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::loadWithDocumentLoader):
              (WebCore::FrameLoader::commitProvisionalLoad):
              (WebCore::FrameLoader::reportMemoryUsage):
              * loader/FrameLoader.h:
              (WebCore::FrameLoader::previousURL):
              Exposed m_previousURL, renaming it to follow WebKit style.
      
              * page/FeatureObserver.cpp:
              (WebCore::FeatureObserver::~FeatureObserver):
              (WebCore::FeatureObserver::updateMeasurements):
              * page/FeatureObserver.h:
              (WebCore::FeatureObserver::accumulatedFeatureBits):
              Exposed the data to clients, and made reporting through HistogramSupport
              chromium only for clarity.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147260 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b4e17165
  3. 28 Mar, 2013 2 commits
    • japhet@chromium.org's avatar
      Source/WebCore: Don't grant local content permissions for appcache loads. · 8f4d6818
      japhet@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112542
      
      Reviewed by Antti Koivisto.
      
      No new tests, fixing http/tests/appcache/local-content.html
      
      * loader/DocumentLoader.cpp:
      (WebCore::DocumentLoader::DocumentLoader):
      (WebCore::DocumentLoader::commitData): Don't grant local load permissions
          to all SubstituteData loads, only give them to loads that were SubstituteData
          loads at the time of DocumentLoader construction. This constitutes all
          SubstituteData loads except those triggered by appcache.
      * loader/DocumentLoader.h:
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::didBeginDocument): Move granting local load
          permissions for SubstituteData loads to DocumentLoader::commitData().
      
      LayoutTests: Remove expected failure for https://bugs.webkit.org/show_bug.cgi?id=112542
      
      Reviewed by Antti Koivisto.
      
      * platform/qt-5.0-wk1/TestExpectations:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147165 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8f4d6818
    • mkwst@chromium.org's avatar
      X-Frame-Options: Multiple headers are ignored completely. · 97421c02
      mkwst@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=113387
      
      Reviewed by Nate Chapin.
      
      Source/WebCore:
      
      If a server sends multiple 'X-Frame-Options' headers, we end up with a
      value like 'SAMEORIGIN, SAMEORIGIN'. Currently, we're treating that as
      invalid, and ignoring the header. It would be safer to follow Gecko's
      lead[1] by:
      
      - Folding duplicated entries into their common value (that is:
        'sameorigin, sameorigin' -> 'sameorigin').
      
      - Failing closed in the case of conflicts (that is:
        'sameorigin, allowall' -> 'deny').
      
      [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=761655
      
      Tests: http/tests/security/XFrameOptions/x-frame-options-multiple-headers-conflict.html
             http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-allow.html
             http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-deny.html
      
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
          Call out to parseXFrameOptionsHeader to get the header's disposition
          and deal with each case in a switch statement for clarity. Add a new
          console warning for the conflict case described above.
      * platform/network/HTTPParsers.cpp:
      (WebCore::parseXFrameOptionsHeader):
      * platform/network/HTTPParsers.h:
          Move X-Frame-Options parsing out into HTTPParsers, as it's getting
          more and more complicated. To do this, the patch defines a new enum
          to pass around the header's disposition.
      
      LayoutTests:
      
      * http/tests/security/XFrameOptions/resources/x-frame-options-multiple-headers-conflict.cgi: Added.
      * http/tests/security/XFrameOptions/resources/x-frame-options-multiple-headers-sameorigin.cgi: Added.
      * http/tests/security/XFrameOptions/x-frame-options-multiple-headers-conflict-expected.txt: Added.
      * http/tests/security/XFrameOptions/x-frame-options-multiple-headers-conflict.html: Added.
      * http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-allow-expected.txt: Added.
      * http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-allow.html: Added.
      * http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-deny-expected.txt: Added.
      * http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-deny.html: Added.
      * platform/chromium/http/tests/security/XFrameOptions/x-frame-options-multiple-headers-conflict-expected.txt: Added.
      * platform/chromium/http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-allow-expected.txt: Added.
      * platform/chromium/http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-deny-expected.txt: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147086 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      97421c02
  4. 24 Mar, 2013 1 commit
    • cfleizach@apple.com's avatar
      AXObjectCache gets recreated during document tear-down. · fd65313a
      cfleizach@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=112525
      
      Reviewed by Simon Fraser.
      
      In many cases, a document's AXObjectCache was being created after the
      document had detached, which is wasteful and could potentially lead to
      crashes because the AXObjectCache has a timer and relies on its document
      to exist.
      
      This patch provides a way to get the existing AX object cache, instead of
      always creating a new one.
      It moves the accessibilityEnabled() checks into the axObjectCache retrieval
      for easier readability.
      It adds a number of ASSERTs to vieryf that only the correct (top) document is used
      for cache manipulation.
      
      * accessibility/AXObjectCache.cpp:
      (WebCore::AXObjectCache::stopCachingComputedObjectAttributes):
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::~ContainerNode):
      * dom/Document.cpp:
      (WebCore::Document::~Document):
      (WebCore::Document::clearAXObjectCache):
      (WebCore::Document::existingAXObjectCache):
      (WebCore::Document::axObjectCache):
      (WebCore::Document::setFocusedNode):
      * dom/Document.h:
      (Document):
      * dom/Element.cpp:
      (WebCore::Element::attributeChanged):
      * dom/Node.cpp:
      (WebCore::Node::~Node):
      (WebCore::Node::isEditableToAccessibility):
      (WebCore::Node::attach):
      (WebCore::Node::rootEditableElement):
      (WebCore::Node::didMoveToNewDocument):
      * editing/AppendNodeCommand.cpp:
      (WebCore::sendAXTextChangedIgnoringLineBreaks):
      * editing/DeleteFromTextNodeCommand.cpp:
      (WebCore::DeleteFromTextNodeCommand::doApply):
      (WebCore::DeleteFromTextNodeCommand::doUnapply):
      * editing/Editor.cpp:
      (WebCore::Editor::respondToChangedContents):
      (WebCore::Editor::markAndReplaceFor):
      * editing/InsertIntoTextNodeCommand.cpp:
      (WebCore::InsertIntoTextNodeCommand::doApply):
      (WebCore::InsertIntoTextNodeCommand::doUnapply):
      * editing/InsertNodeBeforeCommand.cpp:
      (WebCore::InsertNodeBeforeCommand::doApply):
      (WebCore::InsertNodeBeforeCommand::doUnapply):
      * editing/atk/FrameSelectionAtk.cpp:
      (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
      * editing/chromium/FrameSelectionChromium.cpp:
      (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
      * editing/mac/FrameSelectionMac.mm:
      (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::setChecked):
      * html/HTMLSelectElement.cpp:
      (WebCore::HTMLSelectElement::optionElementChildrenChanged):
      (WebCore::HTMLSelectElement::setRecalcListItems):
      * html/HTMLTextFormControlElement.cpp:
      (WebCore::HTMLTextFormControlElement::setInnerTextValue):
      * html/InputType.cpp:
      (WebCore::InputType::applyStep):
      * html/RangeInputType.cpp:
      (WebCore::RangeInputType::handleKeydownEvent):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::prepareForLoadStart):
      (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
      * page/FocusController.cpp:
      (WebCore::FocusController::setInitialFocus):
      * page/Frame.cpp:
      (WebCore::Frame::disconnectOwnerElement):
      * page/FrameView.cpp:
      (WebCore::FrameView::removeFromAXObjectCache):
      (WebCore::FrameView::layout):
      (WebCore::FrameView::scrollToAnchor):
      (WebCore::FrameView::axObjectCache):
      * platform/ScrollView.cpp:
      (WebCore::ScrollView::setHasHorizontalScrollbar):
      (WebCore::ScrollView::setHasVerticalScrollbar):
      * platform/Scrollbar.cpp:
      (WebCore::Scrollbar::~Scrollbar):
      (WebCore):
      (WebCore::Scrollbar::existingAXObjectCache):
      * platform/Scrollbar.h:
      (Scrollbar):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::deleteLineBoxTree):
      (WebCore::RenderBlock::createRootInlineBox):
      (WebCore::RenderBlock::createAndAppendRootInlineBox):
      * rendering/RenderListBox.cpp:
      (WebCore::RenderListBox::selectionChanged):
      * rendering/RenderMenuList.cpp:
      (WebCore::RenderMenuList::addChild):
      (WebCore::RenderMenuList::didUpdateActiveOption):
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::styleWillChange):
      (WebCore::RenderObject::willBeDestroyed):
      * rendering/RenderObjectChildList.cpp:
      (WebCore::RenderObjectChildList::removeChildNode):
      (WebCore::RenderObjectChildList::insertChildNode):
      * rendering/RenderText.cpp:
      (WebCore::RenderText::setText):
      * rendering/RenderWidget.cpp:
      (WebCore::RenderWidget::willBeDestroyed):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146726 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fd65313a
  5. 19 Mar, 2013 1 commit
    • mkwst@chromium.org's avatar
      FeatureObserver: Measure X-Frame-Options usage. · f9d8fa0a
      mkwst@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112670
      
      Reviewed by Adam Barth.
      
      This patch adds three FeatureObserver entries to gather information
      about 'X-Frame-Options' usage in general, and in particular usage
      and potential misunderstanding of the 'SAMEORIGIN' value.
      
      Three entries are added:
      
      - XFrameOptions measures the raw number of 'X-Frame-Options' headers.
      
      - XFrameOptionsSameOrigin measures the number of those headers that
        set the value to 'SAMEORIGIN'.
      
      - XFrameOptionsSameOriginWithBadAncestorChain measures the number of
        occasions in which the frame passed the "top-only" origin check we're
        currently performing, but would have failed a more strict check
        against poisoned ancestor chains (that is, an ancestor chain that
        looks like 'example.com' -> 'evil.com' -> 'example.com').
      
      Mozilla is considering changing 'SAMEORIGIN's behavior to block the
      latter loophole[1], and the UI Safety spec is considering dropping
      'top-only' entirely[2]. This data will inform those decisions.
      
      [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=725490
      [2]: http://lists.w3.org/Archives/Public/public-webappsec/2013Mar/0007.html
      
      This doesn't change web-visible behavior; it only adds histograms
      
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
          When processing an 'X-Frame-Options' header's value, call out to
          FeatureObserver when relevant to increment the correct histogram
          entries.
      * page/FeatureObserver.h:
          Added three entries to the FeatureObserver enum: XFrameOptions,
          XFrameOptionsSameOrigin, and XFrameOptionsSameOriginWithBadAncestorChain.
          Each is explained above.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146257 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f9d8fa0a
  6. 15 Mar, 2013 1 commit
    • japhet@chromium.org's avatar
      Hide MainResourceLoader from the outside world · 7a771246
      japhet@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=109971
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      No new tests, refactor only.
      
      * WebCore.exp.in:
      * dom/Document.cpp:
      * html/HTMLEmbedElement.cpp:
      * html/MediaDocument.cpp:
      * html/PluginDocument.cpp:
      * loader/DocumentLoader.cpp:
      (WebCore::DocumentLoader::mainResourceLoader):
      (WebCore::DocumentLoader::finishedLoading):
      (WebCore::DocumentLoader::receivedData):
      (WebCore::DocumentLoader::setMainResourceDataBufferingPolicy):
      * loader/DocumentLoader.h:
      * loader/EmptyClients.h:
      * loader/FrameLoader.cpp:
      * loader/FrameLoaderClient.h:
      * loader/MainResourceLoader.cpp:
      * loader/appcache/ApplicationCacheGroup.cpp:
      * loader/appcache/ApplicationCacheHost.cpp:
      
      Source/WebKit/blackberry:
      
      * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
      (WebCore::FrameLoaderClientBlackBerry::convertMainResourceLoadToDownload):
      * WebCoreSupport/FrameLoaderClientBlackBerry.h:
      (FrameLoaderClientBlackBerry):
      
      Source/WebKit/chromium:
      
      * src/FrameLoaderClientImpl.cpp:
      (WebKit::FrameLoaderClientImpl::convertMainResourceLoadToDownload):
      * src/FrameLoaderClientImpl.h:
      (FrameLoaderClientImpl):
      
      Source/WebKit/efl:
      
      * WebCoreSupport/FrameLoaderClientEfl.cpp:
      (WebCore::FrameLoaderClientEfl::convertMainResourceLoadToDownload):
      * WebCoreSupport/FrameLoaderClientEfl.h:
      (FrameLoaderClientEfl):
      
      Source/WebKit/gtk:
      
      * WebCoreSupport/FrameLoaderClientGtk.cpp:
      (WebKit::FrameLoaderClient::convertMainResourceLoadToDownload):
      * WebCoreSupport/FrameLoaderClientGtk.h:
      (FrameLoaderClient):
      
      Source/WebKit/mac:
      
      * WebCoreSupport/WebFrameLoaderClient.h:
      (WebFrameLoaderClient):
      * WebCoreSupport/WebFrameLoaderClient.mm:
      (WebFrameLoaderClient::convertMainResourceLoadToDownload):
      
      Source/WebKit/qt:
      
      * WebCoreSupport/FrameLoaderClientQt.cpp:
      (WebCore::FrameLoaderClientQt::convertMainResourceLoadToDownload):
      * WebCoreSupport/FrameLoaderClientQt.h:
      (FrameLoaderClientQt):
      
      Source/WebKit/win:
      
      * WebFrame.cpp:
      (WebFrame::convertMainResourceLoadToDownload):
      * WebFrame.h:
      
      Source/WebKit/wince:
      
      * WebCoreSupport/FrameLoaderClientWinCE.cpp:
      (WebKit::FrameLoaderClientWinCE::convertMainResourceLoadToDownload):
      * WebCoreSupport/FrameLoaderClientWinCE.h:
      (FrameLoaderClientWinCE):
      
      Source/WebKit/wx:
      
      * WebKitSupport/FrameLoaderClientWx.cpp:
      (WebCore::FrameLoaderClientWx::convertMainResourceLoadToDownload):
      * WebKitSupport/FrameLoaderClientWx.h:
      (FrameLoaderClientWx):
      
      Source/WebKit2:
      
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebKit::WebFrameLoaderClient::convertMainResourceLoadToDownload):
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
      (WebFrameLoaderClient):
      * WebProcess/WebPage/WebFrame.cpp:
      (WebKit::WebFrame::convertMainResourceLoadToDownload):
      * WebProcess/WebPage/WebFrame.h:
      (WebFrame):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145914 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7a771246
  7. 06 Mar, 2013 1 commit
    • commit-queue@webkit.org's avatar
      Introduce new message sources for logging. · c79ed84a
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=110968
      
      Patch by Dmitry Zvorygin <zvorygin@chromium.org> on 2013-03-06
      Reviewed by Pavel Feldman.
      
      Source/WebCore:
      
      Added SecurityMessageSource, RenderingMessageSource, StorageMessageSource, AppCacheMessageSource, CSSMessageSource.
      Changed some logging lines to contain more descriptive message source.
      
      * Modules/webdatabase/DatabaseBase.cpp:
      (WebCore::DatabaseBase::logErrorMessage):
      * Modules/webdatabase/DatabaseManager.cpp:
      (WebCore::DatabaseManager::logErrorMessage):
      * Modules/websockets/WebSocketChannel.cpp:
      (WebCore::WebSocketChannel::fail):
      * bindings/ScriptControllerBase.cpp:
      (WebCore::ScriptController::canExecuteScripts):
      * css/MediaList.cpp:
      (WebCore::addResolutionWarningMessageToConsole):
      * dom/Document.cpp:
      (WebCore::Document::processHttpEquiv):
      * dom/ScriptElement.cpp:
      (WebCore::ScriptElement::executeScript):
      (WebCore::ScriptElement::notifyFinished):
      * dom/ViewportArguments.cpp:
      (WebCore::reportViewportWarning):
      * html/HTMLFormControlElement.cpp:
      (WebCore::shouldAutofocus):
      * html/HTMLFormElement.cpp:
      (WebCore::HTMLFormElement::validateInteractively):
      * html/HTMLIFrameElement.cpp:
      (WebCore::HTMLIFrameElement::parseAttribute):
      * html/canvas/CanvasRenderingContext2D.cpp:
      (WebCore::CanvasRenderingContext2D::getImageData):
      * html/canvas/WebGLRenderingContext.cpp:
      (WebCore):
      (WebCore::WebGLRenderingContext::printWarningToConsole):
      * html/parser/XSSAuditor.cpp:
      (WebCore::XSSAuditor::init):
      * html/parser/XSSAuditorDelegate.cpp:
      (WebCore::XSSAuditorDelegate::didBlockScript):
      * inspector/ConsoleMessage.cpp:
      (WebCore::messageSourceValue):
      * inspector/Inspector.json:
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::submitForm):
      (WebCore::FrameLoader::reportLocalLoadFailed):
      (WebCore::createWindow):
      * loader/ImageLoader.cpp:
      (WebCore::ImageLoader::notifyFinished):
      * loader/MainResourceLoader.cpp:
      (WebCore::MainResourceLoader::responseReceived):
      * loader/MixedContentChecker.cpp:
      (WebCore::MixedContentChecker::logWarning):
      * loader/TextTrackLoader.cpp:
      (WebCore::TextTrackLoader::corsPolicyPreventedLoad):
      * loader/appcache/ApplicationCacheGroup.cpp:
      (WebCore::ApplicationCacheGroup::abort):
      * loader/cache/CachedResourceLoader.cpp:
      (WebCore::CachedResourceLoader::printAccessDeniedMessage):
      * page/Console.cpp:
      (WebCore::printMessageSourceAndLevelPrefix):
      * page/ConsoleTypes.h:
      * page/ContentSecurityPolicy.cpp:
      (WebCore::ContentSecurityPolicy::logToConsole):
      * page/DOMWindow.cpp:
      (WebCore::DOMWindow::dispatchMessageEventWithOriginCheck):
      * page/PointerLockController.cpp:
      (WebCore::PointerLockController::requestPointerLock):
      * svg/SVGDocumentExtensions.cpp:
      (WebCore::reportMessage):
      
      Source/WebKit/mac:
      
      * WebCoreSupport/WebChromeClient.mm:
      * WebView/WebUIDelegatePrivate.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144949 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c79ed84a
  8. 05 Mar, 2013 1 commit
    • creis@chromium.org's avatar
      Add FrameLoaderClient::didAccessInitialDocument · 0df3ebc8
      creis@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=107963
      
      Source/WebCore:
      
      Notifies the FrameLoaderClient if another page accesses the
      initial empty document of a main frame.  In this case, it is
      no longer safe to display the provisional URL.
      
      Only takes effect for PLATFORM(CHROMIUM), since no other platforms
      listen to the notification.
      
      Reviewed by Adam Barth.
      
      * bindings/v8/V8DOMWindowShell.cpp:
      (WebCore::V8DOMWindowShell::setSecurityToken):
          Use default token for initial document.
      * bindings/v8/custom/V8DOMWindowCustom.cpp:
          Notify loader if initial document is accessed.
      (WebCore::V8DOMWindow::namedSecurityCheck):
      (WebCore::V8DOMWindow::indexedSecurityCheck):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::FrameLoader):
      (WebCore::FrameLoader::didAccessInitialDocument):
      (WebCore):
      * loader/FrameLoader.h:
      (FrameLoader):
      * loader/FrameLoaderClient.h:
      (FrameLoaderClient):
      (WebCore::FrameLoaderClient::didAccessInitialDocument):
      
      Source/WebKit/chromium:
      
      Notifies WebFrameClient if another page accesses the initial
      empty document of a main frame.  In this case, it is no longer
      safe to display the provisional URL.
      
      Reviewed by Adam Barth.
      
      * public/WebFrameClient.h:
      (WebFrameClient):
      (WebKit::WebFrameClient::didAccessInitialDocument):
      * src/FrameLoaderClientImpl.cpp:
      (WebKit::FrameLoaderClientImpl::didAccessInitialDocument):
      (WebKit):
      * src/FrameLoaderClientImpl.h:
      (FrameLoaderClientImpl):
      * tests/WebFrameTest.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0df3ebc8
  9. 04 Mar, 2013 2 commits
    • jpfau@apple.com's avatar
      Cache partitioning does not affect iframe MainResources · 46b3c4e0
      jpfau@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=111022
      
      Reviewed by David Kilzer.
      
      Source/WebCore:
      
      Set the partition of a main resource request if in a subframe.
      
      Test: http/tests/cache/partitioned-cache-iframe.html
      
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::loadURL):
      
      LayoutTests:
      
      These tests results are for the case in which the cache is not
      partitioned, as no shipping ports have cache partitioning enabled
      
      * http/tests/cache/partitioned-cache-iframe-expected.txt: Added.
      * http/tests/cache/partitioned-cache-iframe.html: Added.
      * http/tests/cache/resources/random-cached-iframe.cgi: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      46b3c4e0
    • mkwst@chromium.org's avatar
      Long URLs in error messages should be shortened · d3d99564
      mkwst@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=111133
      
      Reviewed by Jochen Eisinger.
      
      When generating console messages, we're often copying the page's URL
      in order to add detail about where the error occurred. Generally, this
      is fine, but in edge cases (multi-meg 'data:' URLs), we're using far
      more memory than we should, and impacting performance.
      
      This patch adds an 'elidedString()' method to KURL for use in this
      sort of case; when generating console messages, we should insert the
      elided URL rather than the full URL.
      
      This shouldn't change any visible behavior; we're already visually
      eliding URLs in console messages for URLs above 150 characters. This
      patch simply changes the underlying string to ensure that no URL is
      over 1k in length to begin with.
      
      * platform/KURL.cpp:
      (WebCore::KURL::elidedString): Added.
      * platform/KURL.h:
          An exciting new method that gives you the same result as string()
          for URLs less than 1k long, and elides the middle of URLs longer
          than 1k by replacing everything but the first and last 0.5k with
          "...".
      * bindings/ScriptControllerBase.cpp:
      (WebCore::ScriptController::canExecuteScripts):
      * Modules/websockets/WebSocket.cpp:
      (WebCore::WebSocket::connect):
      (WebCore::WebSocket::send):
      * Modules/websockets/WebSocketChannel.cpp:
      (WebCore::WebSocketChannel::send):
      (WebCore::WebSocketChannel::fail):
      * bindings/ScriptControllerBase.cpp:
      (WebCore::ScriptController::canExecuteScripts):
      * dom/Document.cpp:
      (WebCore::Document::processHttpEquiv):
      * dom/ScriptElement.cpp:
      (WebCore::ScriptElement::executeScript):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::canPlayType):
      (WebCore::HTMLMediaElement::isSafeToLoadURL):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::submitForm):
      (WebCore::FrameLoader::loadFrameRequest):
      (WebCore::FrameLoader::commitProvisionalLoad):
      (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
      (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
      (WebCore::createWindow):
      * loader/MainResourceLoader.cpp:
      (WebCore::MainResourceLoader::willSendRequest):
      (WebCore::MainResourceLoader::responseReceived):
      * loader/appcache/ApplicationCacheGroup.cpp:
      (WebCore::ApplicationCacheGroup::didReceiveResponse):
      (WebCore::ApplicationCacheGroup::didFail):
      * loader/cache/CachedResourceLoader.cpp:
      (WebCore::CachedResourceLoader::canRequest):
      (WebCore::CachedResourceLoader::requestResource):
      (WebCore::CachedResourceLoader::loadResource):
      (WebCore::CachedResourceLoader::printAccessDeniedMessage):
      * page/ContentSecurityPolicy.cpp:
      (WebCore::CSPDirectiveList::checkSourceAndReportViolation):
      (WebCore::CSPDirectiveList::allowScriptNonce):
      (WebCore::CSPDirectiveList::allowPluginType):
          Use 'KURL::elidedString()' rather than 'KURL::string()'
      * loader/MixedContentChecker.cpp:
      (WebCore::MixedContentChecker::logWarning):
          Here, we're doing the same as above, but it enables us to throw
          away the asUTF8() function entirely by switching to makeString
          rather than String::format.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144607 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d3d99564
  10. 03 Mar, 2013 3 commits
    • mkwst@chromium.org's avatar
      CSP 1.1: Support CSP 1.1 directives on the unprefixed header. · 0bd6dea0
      mkwst@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=111254
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      We'd like to ensure that early adopters don't get stuck on a prefixed
      header; when CSP 1.1 is baked enough to be supported in multiple
      browsers, everything should Just Work™.
      
      This patch changes WebKit's behavior regarding CSP_NEXT features.
      Currently, they're only exposed on the prefixed header ('X-WebKit-CSP').
      This patch exposes those features on the canonical header, assuming
      that the runtime flag is set. This shouldn't have any effect at all on
      ports that haven't yet enabled CSP_NEXT, and will simply clear the way
      for a clean deployment to a wider audience once the specification
      process is further along.
      
      This change shouldn't have any effect on the existing tests: they
      should run just as they did before. The next step will be to adjust
      the LayoutTests for 1.1 to prefer the canonical header, but I'll do
      that in another patch to reduce churn.
      
      Related, the enum names no longer made sense: the difference between the
      canonical 'Content-Security-Policy' header and 'X-WebKit-CSP' is the
      prefix, not the functionality. This patch renames them for clarity.
      
      * dom/Document.cpp:
      (WebCore::Document::processHttpEquiv):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::didBeginDocument):
          Use the new enum names.
      * page/ContentSecurityPolicy.cpp:
      (CSPDirectiveList):
      (WebCore::CSPDirectiveList::CSPDirectiveList):
      (WebCore::CSPDirectiveList::addDirective):
          Drop the 'm_experimental' property from CSPDirectiveList; we'll
          control the behavior via the runtime flag from now on.
      
          Also, this fixes a small bug in 'addDirective()': we never threw
          unrecognized directive errors for users who were sending the
          prefixed header. Oops!
      (WebCore::ContentSecurityPolicy::deprecatedHeaderType):
          Use the new enum names.
      * page/ContentSecurityPolicy.h:
          Redefine the enum for clarity: 'PrefixedReport' and 'Report'
          rather than 'ReportAllDirectives' and 'ReportStableDirectives'.
      
      Source/WebKit/chromium:
      
      The enum names no longer made sense: the difference between the
      canonical 'Content-Security-Policy' header and 'X-WebKit-CSP' is the
      prefix, not the functionality. This patch renames them for clarity.
      
      * public/WebContentSecurityPolicy.h:
      * src/AssertMatchingEnums.cpp:
          Rename the Chromium side of the enums.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144571 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0bd6dea0
    • abarth@webkit.org's avatar
      Unreviewed attempted build fix. Adds back some includes removed in · 401a3791
      abarth@webkit.org authored
      http://trac.webkit.org/changeset/144565.
      
      Source/WebCore: 
      
      * Modules/mediastream/RTCPeerConnection.cpp:
      * bindings/ScriptControllerBase.cpp:
      * bindings/objc/DOM.mm:
      * bindings/v8/ScriptController.cpp:
      * bindings/v8/V8DOMWindowShell.cpp:
      * bindings/v8/custom/V8DOMWindowCustom.cpp:
      * css/CSSFontSelector.cpp:
      * css/WebKitCSSSVGDocumentValue.cpp:
      * dom/DOMImplementation.cpp:
      * dom/PendingScript.h:
      * dom/ScriptElement.cpp:
      * dom/ScriptElement.h:
      * history/CachedFrame.cpp:
      * html/DOMURL.cpp:
      * html/HTMLAnchorElement.cpp:
      * html/HTMLAppletElement.cpp:
      * html/HTMLElement.cpp:
      * html/HTMLEmbedElement.cpp:
      * html/HTMLFrameSetElement.cpp:
      * html/HTMLHtmlElement.cpp:
      * html/HTMLImageElement.cpp:
      * html/HTMLObjectElement.cpp:
      * html/HTMLPlugInElement.cpp:
      * html/ImageDocument.cpp:
      * html/ImageInputType.cpp:
      * html/MediaDocument.cpp:
      * html/PluginDocument.cpp:
      * html/canvas/WebGLRenderingContext.cpp:
      (WebCore):
      * html/parser/HTMLConstructionSite.cpp:
      * html/parser/HTMLParserOptions.cpp:
      * html/parser/XSSAuditorDelegate.cpp:
      * inspector/InspectorDebuggerAgent.cpp:
      * inspector/InspectorFileSystemAgent.cpp:
      * inspector/InspectorFrontendHost.cpp:
      * inspector/InspectorInstrumentation.h:
      * inspector/InspectorPageAgent.cpp:
      * inspector/NetworkResourcesData.cpp:
      * inspector/NetworkResourcesData.h:
      (WebCore):
      * loader/CookieJar.cpp:
      * loader/CrossOriginAccessControl.cpp:
      * loader/FrameLoader.cpp:
      * loader/MainResourceLoader.cpp:
      * loader/MixedContentChecker.cpp:
      * loader/PingLoader.cpp:
      * loader/SubframeLoader.cpp:
      * loader/SubresourceLoader.cpp:
      * loader/appcache/ApplicationCacheGroup.cpp:
      * loader/appcache/ApplicationCacheHost.cpp:
      * loader/cache/CachedResource.cpp:
      * loader/icon/IconController.cpp:
      * page/DOMWindowExtension.cpp:
      * page/Frame.cpp:
      * page/PerformanceTiming.cpp:
      * page/PointerLockController.cpp:
      * page/animation/CSSPropertyAnimation.cpp:
      * platform/chromium/PasteboardChromium.cpp:
      * platform/efl/ErrorsEfl.cpp:
      * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
      * platform/gtk/ErrorsGtk.cpp:
      * platform/gtk/PasteboardGtk.cpp:
      * platform/gtk/PasteboardHelper.h:
      * platform/mac/ClipboardMac.mm:
      * platform/mac/HTMLConverter.mm:
      * platform/qt/PasteboardQt.cpp:
      * plugins/DOMMimeType.cpp:
      * plugins/PluginView.cpp:
      * rendering/HitTestResult.cpp:
      * rendering/RenderImage.cpp:
      * rendering/RenderImageResource.cpp:
      * rendering/RenderImageResourceStyleImage.cpp:
      * rendering/RenderLayer.cpp:
      * rendering/RenderLayerBacking.cpp:
      * svg/SVGImageLoader.cpp:
      * svg/SVGUseElement.cpp:
      * testing/MockPagePopupDriver.cpp:
      * xml/XSLStyleSheet.h:
      (WebCore):
      
      Source/WebKit/chromium: 
      
      * src/ApplicationCacheHost.cpp:
      * src/AssociatedURLLoader.cpp:
      * src/EditorClientImpl.cpp:
      * src/SharedWorkerRepository.cpp:
      * src/WebDataSourceImpl.cpp:
      * src/WebFrameImpl.h:
      (WebCore):
      * src/WebNode.cpp:
      * src/WebSharedWorkerImpl.cpp:
      * tests/FrameLoaderClientImplTest.cpp:
      
      Source/WebKit/efl: 
      
      * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
      * ewk/ewk_frame.cpp:
      
      Source/WebKit/mac: 
      
      * DOM/WebDOMOperations.mm:
      * Misc/WebNSPasteboardExtras.mm:
      * WebCoreSupport/WebFrameNetworkingContext.mm:
      * WebView/WebRenderLayer.mm:
      * WebView/WebRenderNode.mm:
      
      Source/WebKit/qt: 
      
      * WebCoreSupport/NotificationPresenterClientQt.cpp:
      * WebCoreSupport/QWebPageAdapter.cpp:
      
      Source/WebKit2: 
      
      * Shared/WebRenderLayer.cpp:
      * Shared/WebRenderObject.cpp:
      * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
      * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
      * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
      * WebProcess/InjectedBundle/InjectedBundle.cpp:
      * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
      * WebProcess/Plugins/PDF/PDFPlugin.mm:
      * WebProcess/Plugins/PluginView.cpp:
      * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
      * WebProcess/WebCoreSupport/WebEditorClient.cpp:
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
      * WebProcess/WebPage/mac/WebPageMac.mm:
      * WebProcess/WebProcess.cpp:
      * WebProcess/soup/WebProcessSoup.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144568 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      401a3791
    • abarth@webkit.org's avatar
      Unreviewed rollout of http://trac.webkit.org/r144530 · fa616dd3
      abarth@webkit.org authored
      As described in https://bugs.webkit.org/show_bug.cgi?id=111167 and
      https://bugs.webkit.org/show_bug.cgi?id=111035, this patch caused a
      large number of ASSERTs in chromium-win.
      
      Source/WebCore: 
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Modules/mediastream/RTCPeerConnection.cpp:
      * Modules/notifications/Notification.cpp:
      * Target.pri:
      * WebCore.exp.in:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/ScriptControllerBase.cpp:
      * bindings/js/JSNodeCustom.cpp:
      * bindings/js/ScriptController.cpp:
      * bindings/js/ScriptSourceCode.h:
      (WebCore):
      * bindings/objc/DOM.mm:
      * bindings/v8/ScriptController.cpp:
      * bindings/v8/V8DOMWindowShell.cpp:
      * bindings/v8/custom/V8DOMWindowCustom.cpp:
      * css/CSSCrossfadeValue.h:
      (WebCore::CSSCrossfadeValue::CSSCrossfadeValue):
      (WebCore::CSSCrossfadeValue::CrossfadeSubimageObserverProxy::CrossfadeSubimageObserverProxy):
      * css/CSSFontFaceSource.h:
      * css/CSSFontSelector.cpp:
      * css/WebKitCSSSVGDocumentValue.cpp:
      * css/WebKitCSSSVGDocumentValue.h:
      (WebCore):
      * dom/Clipboard.cpp:
      (WebCore::Clipboard::Clipboard):
      * dom/ContainerNode.cpp:
      * dom/DOMImplementation.cpp:
      * dom/PendingScript.h:
      * dom/ScriptElement.cpp:
      * dom/ScriptElement.h:
      * history/CachedFrame.cpp:
      * html/DOMURL.cpp:
      * html/HTMLAnchorElement.cpp:
      * html/HTMLAppletElement.cpp:
      * html/HTMLElement.cpp:
      * html/HTMLEmbedElement.cpp:
      * html/HTMLFrameSetElement.cpp:
      * html/HTMLHtmlElement.cpp:
      * html/HTMLImageElement.cpp:
      * html/HTMLObjectElement.cpp:
      * html/HTMLPlugInElement.cpp:
      * html/ImageDocument.cpp:
      * html/ImageInputType.cpp:
      * html/MediaDocument.cpp:
      * html/PluginDocument.cpp:
      * html/canvas/WebGLRenderingContext.cpp:
      (WebCore):
      * html/parser/HTMLConstructionSite.cpp:
      * html/parser/HTMLParserOptions.cpp:
      * html/parser/HTMLScriptRunner.h:
      * html/parser/XSSAuditor.cpp:
      * html/parser/XSSAuditorDelegate.cpp:
      * inspector/InspectorDebuggerAgent.cpp:
      * inspector/InspectorFileSystemAgent.cpp:
      * inspector/InspectorFrontendHost.cpp:
      * inspector/InspectorInstrumentation.h:
      (WebCore):
      * inspector/InspectorPageAgent.cpp:
      * inspector/NetworkResourcesData.cpp:
      * inspector/NetworkResourcesData.h:
      (WebCore):
      * loader/CookieJar.cpp:
      * loader/CrossOriginAccessControl.cpp:
      * loader/CrossOriginAccessControl.h:
      (WebCore):
      * loader/CrossOriginPreflightResultCache.h:
      * loader/DocumentThreadableLoader.h:
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::FrameLoader):
      * loader/FrameLoader.h:
      (WebCore):
      (WebCore::FrameLoader::policyChecker):
      * loader/ImageLoader.cpp:
      * loader/ImageLoader.h:
      * loader/LinkLoader.h:
      (WebCore):
      * loader/MainResourceLoader.cpp:
      * loader/MainResourceLoader.h:
      (WebCore):
      * loader/MixedContentChecker.cpp:
      * loader/PingLoader.cpp:
      * loader/PolicyChecker.h:
      (WebCore):
      * loader/ProgressTracker.cpp:
      * loader/SubframeLoader.cpp:
      * loader/SubresourceLoader.cpp:
      * loader/TextTrackLoader.cpp:
      * loader/TextTrackLoader.h:
      (WebCore):
      * loader/ThreadableLoader.h:
      * loader/appcache/ApplicationCacheGroup.cpp:
      * loader/appcache/ApplicationCacheGroup.h:
      (WebCore):
      * loader/appcache/ApplicationCacheHost.cpp:
      * loader/archive/cf/LegacyWebArchive.cpp:
      * loader/cache/CachedFont.cpp:
      * loader/cache/CachedFont.h:
      (CachedFontClient):
      (WebCore::CachedFontClient::~CachedFontClient):
      (WebCore::CachedFontClient::expectedType):
      (WebCore::CachedFontClient::resourceClientType):
      (WebCore::CachedFontClient::fontLoaded):
      (WebCore):
      * loader/cache/CachedFontClient.h: Removed.
      * loader/cache/CachedImage.cpp:
      * loader/cache/CachedRawResource.cpp:
      * loader/cache/CachedRawResource.h:
      (WebCore):
      (CachedRawResourceClient):
      (WebCore::CachedRawResourceClient::~CachedRawResourceClient):
      (WebCore::CachedRawResourceClient::expectedType):
      (WebCore::CachedRawResourceClient::resourceClientType):
      (WebCore::CachedRawResourceClient::dataSent):
      (WebCore::CachedRawResourceClient::responseReceived):
      (WebCore::CachedRawResourceClient::dataReceived):
      (WebCore::CachedRawResourceClient::redirectReceived):
      (WebCore::CachedRawResourceClient::dataDownloaded):
      * loader/cache/CachedRawResourceClient.h: Removed.
      * loader/cache/CachedResource.cpp:
      * loader/cache/CachedResourceHandle.cpp:
      (WebCore):
      * loader/cache/CachedResourceHandle.h:
      (WebCore):
      (WebCore::CachedResourceHandleBase::~CachedResourceHandleBase):
      (WebCore::CachedResourceHandleBase::CachedResourceHandleBase):
      * loader/cache/CachedSVGDocument.h:
      (CachedSVGDocumentClient):
      (WebCore::CachedSVGDocumentClient::~CachedSVGDocumentClient):
      (WebCore::CachedSVGDocumentClient::expectedType):
      (WebCore::CachedSVGDocumentClient::resourceClientType):
      (WebCore):
      * loader/cache/CachedSVGDocumentClient.h: Removed.
      * loader/cache/CachedSVGDocumentReference.cpp: Removed.
      * loader/cache/CachedSVGDocumentReference.h:
      (WebCore):
      (WebCore::CachedSVGDocumentReference::CachedSVGDocumentReference):
      (WebCore::CachedSVGDocumentReference::~CachedSVGDocumentReference):
      * loader/cache/CachedStyleSheetClient.h:
      (WebCore):
      * loader/cache/MemoryCache.h:
      (WebCore):
      (MemoryCache):
      * loader/chromium/CachedRawResourceChromium.cpp:
      * loader/icon/IconController.cpp:
      * loader/icon/IconLoader.h:
      * loader/mac/ResourceLoaderMac.mm:
      * page/DOMWindowExtension.cpp:
      * page/Frame.cpp:
      (WebCore::Frame::Frame):
      (WebCore):
      (WebCore::Frame::reportMemoryUsage):
      * page/Frame.h:
      (WebCore):
      (Frame):
      (WebCore::Frame::init):
      (WebCore::Frame::loader):
      * page/PerformanceNavigation.cpp:
      * page/PerformanceTiming.cpp:
      * page/PointerLockController.cpp:
      * page/Settings.cpp:
      * page/animation/CSSPropertyAnimation.cpp:
      * platform/chromium/PasteboardChromium.cpp:
      * platform/efl/ErrorsEfl.cpp:
      * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
      * platform/graphics/filters/FilterOperation.cpp:
      (WebCore):
      * platform/graphics/filters/FilterOperation.h:
      (WebCore):
      (WebCore::FilterOperation::ReferenceFilterOperation::setCachedSVGDocumentReference):
      (WebCore::FilterOperation::ReferenceFilterOperation::ReferenceFilterOperation):
      * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
      * platform/gtk/ErrorsGtk.cpp:
      * platform/gtk/PasteboardGtk.cpp:
      * platform/gtk/PasteboardHelper.h:
      * platform/mac/ClipboardMac.h:
      * platform/mac/ClipboardMac.mm:
      * platform/mac/HTMLConverter.mm:
      * platform/mac/PasteboardMac.mm:
      * platform/network/AuthenticationChallengeBase.cpp:
      * platform/network/cf/CookieJarCFNet.cpp:
      * platform/network/cf/ResourceRequestCFNet.cpp:
      * platform/network/mac/CookieStorageMac.mm:
      * platform/qt/PasteboardQt.cpp:
      * plugins/DOMMimeType.cpp:
      * plugins/PluginRequest.h: Removed.
      * plugins/PluginStream.h:
      (PluginStreamClient):
      (WebCore::PluginStreamClient::~PluginStreamClient):
      (WebCore::PluginStreamClient::streamDidFinishLoading):
      (WebCore):
      * plugins/PluginStreamClient.h: Removed.
      * plugins/PluginView.cpp:
      * plugins/PluginView.h:
      (WebCore):
      (PluginRequest):
      (WebCore::PluginRequest::PluginRequest):
      (WebCore::PluginRequest::frameLoadRequest):
      (WebCore::PluginRequest::notifyData):
      (WebCore::PluginRequest::sendNotification):
      (WebCore::PluginRequest::shouldAllowPopups):
      * rendering/HitTestResult.cpp:
      * rendering/InlineFlowBox.cpp:
      * rendering/RenderBox.cpp:
      * rendering/RenderEmbeddedObject.cpp:
      * rendering/RenderImage.cpp:
      * rendering/RenderImageResource.cpp:
      (WebCore::RenderImageResource::RenderImageResource):
      (WebCore):
      * rendering/RenderImageResource.h:
      (WebCore::RenderImageResource::image):
      (WebCore::RenderImageResource::errorOccurred):
      (WebCore::RenderImageResource::usesImageContainerSize):
      (WebCore::RenderImageResource::imageHasRelativeWidth):
      (WebCore::RenderImageResource::imageHasRelativeHeight):
      (WebCore::RenderImageResource::imageSize):
      * rendering/RenderImageResourceStyleImage.cpp:
      * rendering/RenderLayer.cpp:
      * rendering/RenderLayerBacking.cpp:
      * rendering/RenderLayerFilterInfo.h:
      (WebCore):
      * rendering/RenderListItem.cpp:
      * rendering/RenderListMarker.cpp:
      * rendering/RenderSnapshottedPlugIn.cpp:
      * rendering/RenderTableCol.cpp:
      * rendering/RenderTableRow.cpp:
      * rendering/RenderTableSection.cpp:
      * rendering/style/StyleCachedShader.h:
      * rendering/style/StyleCustomFilterProgram.cpp: Removed.
      * rendering/style/StyleCustomFilterProgram.h:
      (WebCore):
      (WebCore::StyleCustomFilterProgram::vertexShaderString):
      (StyleCustomFilterProgram):
      (WebCore::StyleCustomFilterProgram::fragmentShaderString):
      (WebCore::StyleCustomFilterProgram::isLoaded):
      (WebCore::StyleCustomFilterProgram::willHaveClients):
      (WebCore::StyleCustomFilterProgram::didRemoveLastClient):
      (WebCore::StyleCustomFilterProgram::notifyFinished):
      * svg/SVGFEImageElement.h:
      * svg/SVGFontFaceUriElement.h:
      (SVGFontFaceUriElement):
      * svg/SVGImageLoader.cpp:
      * svg/SVGUseElement.cpp:
      * svg/SVGUseElement.h:
      * svg/graphics/SVGImageCache.cpp:
      * testing/MockPagePopupDriver.cpp:
      * xml/XSLStyleSheet.h:
      (WebCore):
      * xml/XSLTProcessorLibxslt.cpp:
      * xml/parser/XMLDocumentParser.cpp:
      * xml/parser/XMLDocumentParser.h:
      * xml/parser/XMLDocumentParserLibxml2.cpp:
      
      Source/WebKit/chromium: 
      
      * src/ApplicationCacheHost.cpp:
      * src/AssociatedURLLoader.cpp:
      * src/EditorClientImpl.cpp:
      * src/SharedWorkerRepository.cpp:
      * src/WebDataSourceImpl.cpp:
      * src/WebFrameImpl.h:
      (WebCore):
      * src/WebNode.cpp:
      * src/WebSharedWorkerImpl.cpp:
      * tests/FrameLoaderClientImplTest.cpp:
      
      Source/WebKit/efl: 
      
      * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
      * ewk/ewk_frame.cpp:
      
      Source/WebKit/gtk: 
      
      * webkit/webkitwebpolicydecision.cpp:
      
      Source/WebKit/mac: 
      
      * DOM/WebDOMOperations.mm:
      * Misc/WebNSPasteboardExtras.mm:
      * WebCoreSupport/WebFrameNetworkingContext.mm:
      * WebView/WebRenderLayer.mm:
      * WebView/WebRenderNode.mm:
      
      Source/WebKit/qt: 
      
      * WebCoreSupport/NotificationPresenterClientQt.cpp:
      * WebCoreSupport/QWebPageAdapter.cpp:
      
      Source/WebKit2: 
      
      * NetworkProcess/HostRecord.h:
      * NetworkProcess/NetworkResourceLoadScheduler.h:
      * NetworkProcess/NetworkResourceLoader.h:
      (WebCore):
      * Shared/WebRenderLayer.cpp:
      * Shared/WebRenderObject.cpp:
      * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
      * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
      * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
      * WebProcess/InjectedBundle/InjectedBundle.cpp:
      * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
      * WebProcess/Plugins/PDF/PDFPlugin.mm:
      * WebProcess/Plugins/PluginView.cpp:
      * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
      * WebProcess/WebCoreSupport/WebEditorClient.cpp:
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
      * WebProcess/WebPage/mac/WebPageMac.mm:
      * WebProcess/WebProcess.cpp:
      * WebProcess/soup/WebProcessSoup.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144565 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fa616dd3
  11. 01 Mar, 2013 3 commits
    • ap@apple.com's avatar
      Reduce amount of rebuilding when touching networking headers · fc363ce1
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=111035
      
              Reviewed by Eric Seidel.
      
              This uses a number of common unsurprising techniques. One interesting observation
              is that including CachedResource related headers is very expensive. We can usually
              get away with their Client counterparts, and with CachedResourceHandle.
      
              * page/Frame.cpp:
              * page/Frame.h:
              Don't include FrameLoader, greatly reducing include graph for most non-loader files.
              This required making Frame::init() non-inline - I'm not sure why it ever was.
      
              * loader/FrameLoader.cpp:
              * loader/FrameLoader.h:
              Even though FrameLoader is logically on loading side of WebCore, it's included in
              too many places. Not including PolicyChecker.h and ResourceHandle.h was among the
              largest wins. As a future improvement, we should probably convert other members
              to OwnPtrs.
      
              * css/CSSCrossfadeValue.h: Initializing CachedResourceHandle with 0 requires a
              definition of a class it holds, but default construction does not.
      
              * loader/CrossOriginAccessControl.h: This file among others only needs ResourceHandleTypes.h,
              not ResourceHandle.h. This header is semi-recent, so not all include sites were updated.
      
              * loader/cache/CachedFont.h:
              * loader/cache/CachedFontClient.h: Added.
              * loader/cache/CachedRawResource.h:
              * loader/cache/CachedRawResourceClient.h: Added.
              * loader/cache/CachedSVGDocument.h:
              * loader/cache/CachedSVGDocumentClient.h: Added.
              These types were defining client types in the same headers, making it impossible
              to avoid including networking headers through CachedResource. Moved clients into
              separate files.
      
              * plugins/PluginStream.h:
              * plugins/PluginStreamClient.h: Added.
              Similar situation here.
      
              * loader/cache/CachedResourceHandle.cpp:
              * loader/cache/CachedResourceHandle.h:
              Moved functions that need to know about CachedResource to .cpp file. This is another
              huge win. Added a destructor, so that CachedResource woudn't be needed in all files
              that include CachedResourceHandle.
      
              * loader/cache/CachedSVGDocumentReference.cpp: Added.
              * loader/cache/CachedSVGDocumentReference.h:
              Moved constructor and virtual function implementations to a .cpp file - they need
              not inlining, and this lets us avoid including CachedSVGDocument.h in the header.
      
              * platform/graphics/filters/FilterOperation.cpp:
              * platform/graphics/filters/FilterOperation.h:
              Avoid including CachedSVGDocumentReference.h. This is not such a big win now that
              CachedSVGDocumentReference.h itself is smaller, but FilterOperation is so clearly
              rendering code that it seems best to cut any ties with resources and loading.
              Added a virtual destrutor in .cpp file, because inline destructors in polymorphic
              classes are generally harmful (due to code bloat).
      
              * plugins/PluginRequest.h: Added.
              * plugins/PluginView.h:
              Moved PluginRequest into a separate file, it was out of place in a view hierarchy
              class file.
      
              * rendering/RenderImageResource.cpp:
              * rendering/RenderImageResource.h:
              Moved definitions of virtual functions to a .cpp file. Thre is no win from having
              them inline, and now we don't need CachedImage.h in the header.
      
              * rendering/style/StyleCustomFilterProgram.cpp: Added.
              * rendering/style/StyleCustomFilterProgram.h:
              Ditto.
      
              * CMakeLists.txt:
              * GNUmakefile.list.am:
              * Modules/mediastream/RTCPeerConnection.cpp:
              * Modules/notifications/Notification.cpp:
              * Target.pri:
              * WebCore.exp.in:
              * WebCore.gypi:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.vcxproj/WebCore.vcxproj:
              * WebCore.vcxproj/WebCore.vcxproj.filters:
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/ScriptControllerBase.cpp:
              * bindings/js/JSNodeCustom.cpp:
              * bindings/js/ScriptController.cpp:
              * bindings/js/ScriptSourceCode.h:
              * bindings/objc/DOM.mm:
              * bindings/v8/ScriptController.cpp:
              * bindings/v8/V8DOMWindowShell.cpp:
              * bindings/v8/custom/V8DOMWindowCustom.cpp:
              * css/CSSFontFaceSource.h:
              * css/CSSFontSelector.cpp:
              * css/WebKitCSSSVGDocumentValue.cpp:
              * css/WebKitCSSSVGDocumentValue.h:
              * dom/Clipboard.cpp:
              * dom/ContainerNode.cpp:
              * dom/DOMImplementation.cpp:
              * dom/PendingScript.h:
              * dom/ScriptElement.cpp:
              * dom/ScriptElement.h:
              * history/CachedFrame.cpp:
              * html/DOMURL.cpp:
              * html/HTMLAnchorElement.cpp:
              * html/HTMLAppletElement.cpp:
              * html/HTMLElement.cpp:
              * html/HTMLEmbedElement.cpp:
              * html/HTMLFrameSetElement.cpp:
              * html/HTMLHtmlElement.cpp:
              * html/HTMLImageElement.cpp:
              * html/HTMLObjectElement.cpp:
              * html/HTMLPlugInElement.cpp:
              * html/ImageDocument.cpp:
              * html/ImageInputType.cpp:
              * html/MediaDocument.cpp:
              * html/PluginDocument.cpp:
              * html/canvas/WebGLRenderingContext.cpp:
              * html/parser/HTMLConstructionSite.cpp:
              * html/parser/HTMLParserOptions.cpp:
              * html/parser/HTMLScriptRunner.h:
              * html/parser/XSSAuditor.cpp:
              * html/parser/XSSAuditorDelegate.cpp:
              * inspector/InspectorDebuggerAgent.cpp:
              * inspector/InspectorFileSystemAgent.cpp:
              * inspector/InspectorFrontendHost.cpp:
              * inspector/InspectorInstrumentation.h:
              * inspector/InspectorPageAgent.cpp:
              * inspector/NetworkResourcesData.cpp:
              * inspector/NetworkResourcesData.h:
              * loader/CookieJar.cpp:
              * loader/CrossOriginAccessControl.cpp:
              * loader/CrossOriginPreflightResultCache.h:
              * loader/DocumentThreadableLoader.h:
              * loader/ImageLoader.cpp:
              * loader/ImageLoader.h:
              * loader/LinkLoader.h:
              * loader/MainResourceLoader.cpp:
              * loader/MainResourceLoader.h:
              * loader/MixedContentChecker.cpp:
              * loader/PingLoader.cpp:
              * loader/PolicyChecker.h:
              * loader/ProgressTracker.cpp:
              * loader/SubframeLoader.cpp:
              * loader/SubresourceLoader.cpp:
              * loader/TextTrackLoader.cpp:
              * loader/TextTrackLoader.h:
              * loader/ThreadableLoader.h:
              * loader/appcache/ApplicationCacheGroup.cpp:
              * loader/appcache/ApplicationCacheGroup.h:
              * loader/appcache/ApplicationCacheHost.cpp:
              * loader/archive/cf/LegacyWebArchive.cpp:
              * loader/cache/CachedFont.cpp:
              * loader/cache/CachedImage.cpp:
              * loader/cache/CachedRawResource.cpp:
              * loader/cache/CachedResource.cpp:
              * loader/cache/CachedStyleSheetClient.h:
              * loader/cache/MemoryCache.cpp:
              * loader/cache/MemoryCache.h:
              * loader/chromium/CachedRawResourceChromium.cpp:
              * loader/icon/IconController.cpp:
              * loader/icon/IconLoader.h:
              * loader/mac/ResourceLoaderMac.mm:
              * page/DOMWindowExtension.cpp:
              * page/DragController.cpp:
              * page/PerformanceNavigation.cpp:
              * page/PerformanceTiming.cpp:
              * page/PointerLockController.cpp:
              * page/Settings.cpp:
              * page/animation/CSSPropertyAnimation.cpp:
              * platform/chromium/PasteboardChromium.cpp:
              * platform/efl/ErrorsEfl.cpp:
              * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
              * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
              * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
              * platform/gtk/ErrorsGtk.cpp:
              * platform/gtk/PasteboardGtk.cpp:
              * platform/gtk/PasteboardHelper.h:
              * platform/mac/ClipboardMac.h:
              * platform/mac/ClipboardMac.mm:
              * platform/mac/HTMLConverter.mm:
              * platform/mac/PasteboardMac.mm:
              * platform/network/AuthenticationChallengeBase.cpp:
              * platform/network/cf/CookieJarCFNet.cpp:
              * platform/network/cf/ResourceRequestCFNet.cpp:
              * platform/network/mac/CookieStorageMac.mm:
              * platform/qt/PasteboardQt.cpp:
              * plugins/DOMMimeType.cpp:
              * plugins/PluginView.cpp:
              * rendering/HitTestResult.cpp:
              * rendering/InlineFlowBox.cpp:
              * rendering/RenderBox.cpp:
              * rendering/RenderEmbeddedObject.cpp:
              * rendering/RenderImage.cpp:
              * rendering/RenderImageResourceStyleImage.cpp:
              * rendering/RenderLayer.cpp:
              * rendering/RenderLayerBacking.cpp:
              * rendering/RenderLayerFilterInfo.h:
              * rendering/RenderListItem.cpp:
              * rendering/RenderListMarker.cpp:
              * rendering/RenderSnapshottedPlugIn.cpp:
              * rendering/RenderTableCol.cpp:
              * rendering/RenderTableRow.cpp:
              * rendering/RenderTableSection.cpp:
              * rendering/style/StyleCachedShader.h:
              * svg/SVGFEImageElement.h:
              * svg/SVGFontFaceUriElement.h:
              * svg/SVGImageLoader.cpp:
              * svg/SVGUseElement.cpp:
              * svg/SVGUseElement.h:
              * svg/graphics/SVGImageCache.cpp:
              * testing/MockPagePopupDriver.cpp:
              * xml/XSLStyleSheet.h:
              * xml/XSLTProcessorLibxslt.cpp:
              * xml/parser/XMLDocumentParser.cpp:
              * xml/parser/XMLDocumentParser.h:
              * xml/parser/XMLDocumentParserLibxml2.cpp:
              Many self-evident changes - removing unnecessary header includes, adding smaller
              more local ones that are now necessary.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144530 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fc363ce1
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r144422 and r144424. · 0b87a6c7
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/144422
      http://trac.webkit.org/changeset/144424
      https://bugs.webkit.org/show_bug.cgi?id=111167
      
      Caused over 20 tests to fail assertion on Chromium Win port as
      ASSERTION FAILED: m_platformRequestUpdated (Requested by
      toyoshim on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-03-01
      
      Source/WebCore:
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Modules/mediastream/RTCPeerConnection.cpp:
      * Modules/notifications/Notification.cpp:
      * Target.pri:
      * WebCore.exp.in:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/ScriptControllerBase.cpp:
      * bindings/js/JSNodeCustom.cpp:
      * bindings/js/ScriptController.cpp:
      * bindings/js/ScriptSourceCode.h:
      * bindings/objc/DOM.mm:
      * bindings/v8/ScriptController.cpp:
      * bindings/v8/V8DOMWindowShell.cpp:
      * bindings/v8/custom/V8DOMWindowCustom.cpp:
      * css/CSSCrossfadeValue.h:
      (WebCore::CSSCrossfadeValue::CSSCrossfadeValue):
      (WebCore::CSSCrossfadeValue::CrossfadeSubimageObserverProxy::CrossfadeSubimageObserverProxy):
      * css/CSSFontFaceSource.h:
      * css/CSSFontSelector.cpp:
      * css/WebKitCSSSVGDocumentValue.cpp:
      * css/WebKitCSSSVGDocumentValue.h:
      (WebCore):
      * dom/Clipboard.cpp:
      (WebCore::Clipboard::Clipboard):
      * dom/ContainerNode.cpp:
      * dom/DOMImplementation.cpp:
      * dom/PendingScript.h:
      * dom/ScriptElement.cpp:
      * dom/ScriptElement.h:
      * history/CachedFrame.cpp:
      * html/DOMURL.cpp:
      * html/HTMLAnchorElement.cpp:
      * html/HTMLAppletElement.cpp:
      * html/HTMLElement.cpp:
      * html/HTMLEmbedElement.cpp:
      * html/HTMLFrameSetElement.cpp:
      * html/HTMLHtmlElement.cpp:
      * html/HTMLImageElement.cpp:
      * html/HTMLObjectElement.cpp:
      * html/HTMLPlugInElement.cpp:
      * html/ImageDocument.cpp:
      * html/ImageInputType.cpp:
      * html/MediaDocument.cpp:
      * html/PluginDocument.cpp:
      * html/canvas/WebGLRenderingContext.cpp:
      (WebCore):
      * html/parser/HTMLConstructionSite.cpp:
      * html/parser/HTMLParserOptions.cpp:
      * html/parser/HTMLScriptRunner.h:
      * html/parser/XSSAuditor.cpp:
      * html/parser/XSSAuditorDelegate.cpp:
      * inspector/InspectorDebuggerAgent.cpp:
      * inspector/InspectorFileSystemAgent.cpp:
      * inspector/InspectorFrontendHost.cpp:
      * inspector/InspectorInstrumentation.h:
      (WebCore):
      * inspector/InspectorPageAgent.cpp:
      * inspector/NetworkResourcesData.cpp:
      * inspector/NetworkResourcesData.h:
      (WebCore):
      * loader/CookieJar.cpp:
      * loader/CrossOriginAccessControl.cpp:
      * loader/CrossOriginAccessControl.h:
      (WebCore):
      * loader/CrossOriginPreflightResultCache.h:
      * loader/DocumentThreadableLoader.h:
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::FrameLoader):
      * loader/FrameLoader.h:
      (WebCore):
      (WebCore::FrameLoader::policyChecker):
      * loader/ImageLoader.cpp:
      * loader/ImageLoader.h:
      * loader/LinkLoader.h:
      * loader/MainResourceLoader.cpp:
      * loader/MainResourceLoader.h:
      * loader/MixedContentChecker.cpp:
      * loader/PingLoader.cpp:
      * loader/PolicyChecker.h:
      (WebCore):
      * loader/ProgressTracker.cpp:
      * loader/SubframeLoader.cpp:
      * loader/SubresourceLoader.cpp:
      * loader/TextTrackLoader.cpp:
      * loader/TextTrackLoader.h:
      * loader/ThreadableLoader.h:
      * loader/appcache/ApplicationCacheGroup.cpp:
      * loader/appcache/ApplicationCacheGroup.h:
      (WebCore):
      * loader/appcache/ApplicationCacheHost.cpp:
      * loader/archive/cf/LegacyWebArchive.cpp:
      * loader/cache/CachedFont.cpp:
      * loader/cache/CachedFont.h:
      (CachedFontClient):
      (WebCore::CachedFontClient::~CachedFontClient):
      (WebCore::CachedFontClient::expectedType):
      (WebCore::CachedFontClient::resourceClientType):
      (WebCore::CachedFontClient::fontLoaded):
      (WebCore):
      * loader/cache/CachedFontClient.h: Removed.
      * loader/cache/CachedImage.cpp:
      * loader/cache/CachedRawResource.cpp:
      * loader/cache/CachedRawResource.h:
      (WebCore):
      (CachedRawResourceClient):
      (WebCore::CachedRawResourceClient::~CachedRawResourceClient):
      (WebCore::CachedRawResourceClient::expectedType):
      (WebCore::CachedRawResourceClient::resourceClientType):
      (WebCore::CachedRawResourceClient::dataSent):
      (WebCore::CachedRawResourceClient::responseReceived):
      (WebCore::CachedRawResourceClient::dataReceived):
      (WebCore::CachedRawResourceClient::redirectReceived):
      (WebCore::CachedRawResourceClient::dataDownloaded):
      * loader/cache/CachedRawResourceClient.h: Removed.
      * loader/cache/CachedResource.cpp:
      * loader/cache/CachedResourceHandle.cpp:
      * loader/cache/CachedResourceHandle.h:
      (WebCore::CachedResourceHandleBase::~CachedResourceHandleBase):
      (WebCore::CachedResourceHandleBase::CachedResourceHandleBase):
      * loader/cache/CachedSVGDocument.h:
      (CachedSVGDocumentClient):
      (WebCore::CachedSVGDocumentClient::~CachedSVGDocumentClient):
      (WebCore::CachedSVGDocumentClient::expectedType):
      (WebCore::CachedSVGDocumentClient::resourceClientType):
      (WebCore):
      * loader/cache/CachedSVGDocumentClient.h: Removed.
      * loader/cache/CachedSVGDocumentReference.cpp: Removed.
      * loader/cache/CachedSVGDocumentReference.h:
      (WebCore::CachedSVGDocumentReference::CachedSVGDocumentReference):
      (WebCore::CachedSVGDocumentReference::~CachedSVGDocumentReference):
      * loader/cache/CachedStyleSheetClient.h:
      * loader/cache/MemoryCache.cpp:
      * loader/cache/MemoryCache.h:
      (WebCore):
      (MemoryCache):
      * loader/chromium/CachedRawResourceChromium.cpp:
      * loader/icon/IconController.cpp:
      * loader/icon/IconLoader.h:
      * loader/mac/ResourceLoaderMac.mm:
      * page/DOMWindowExtension.cpp:
      * page/DragController.cpp:
      * page/Frame.cpp:
      (WebCore::Frame::Frame):
      (WebCore::Frame::reportMemoryUsage):
      * page/Frame.h:
      (WebCore):
      (Frame):
      (WebCore::Frame::init):
      (WebCore::Frame::loader):
      * page/PerformanceNavigation.cpp:
      * page/PerformanceTiming.cpp:
      * page/PointerLockController.cpp:
      * page/Settings.cpp:
      * page/animation/CSSPropertyAnimation.cpp:
      * platform/chromium/PasteboardChromium.cpp:
      * platform/efl/ErrorsEfl.cpp:
      * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
      * platform/graphics/filters/FilterOperation.cpp:
      * platform/graphics/filters/FilterOperation.h:
      (WebCore::FilterOperation::ReferenceFilterOperation::setCachedSVGDocumentReference):
      (WebCore::FilterOperation::ReferenceFilterOperation::ReferenceFilterOperation):
      * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
      * platform/gtk/ErrorsGtk.cpp:
      * platform/gtk/PasteboardGtk.cpp:
      * platform/gtk/PasteboardHelper.h:
      * platform/mac/ClipboardMac.h:
      * platform/mac/ClipboardMac.mm:
      * platform/mac/HTMLConverter.mm:
      * platform/mac/PasteboardMac.mm:
      * platform/network/AuthenticationChallengeBase.cpp:
      * platform/network/cf/CookieJarCFNet.cpp:
      * platform/network/cf/ResourceRequestCFNet.cpp:
      * platform/network/mac/CookieStorageMac.mm:
      * platform/qt/PasteboardQt.cpp:
      * plugins/DOMMimeType.cpp:
      * plugins/PluginRequest.h: Removed.
      * plugins/PluginStream.h:
      (PluginStreamClient):
      (WebCore::PluginStreamClient::~PluginStreamClient):
      (WebCore::PluginStreamClient::streamDidFinishLoading):
      (WebCore):
      * plugins/PluginStreamClient.h: Removed.
      * plugins/PluginView.cpp:
      * plugins/PluginView.h:
      (WebCore):
      (PluginRequest):
      (WebCore::PluginRequest::PluginRequest):
      (WebCore::PluginRequest::frameLoadRequest):
      (WebCore::PluginRequest::notifyData):
      (WebCore::PluginRequest::sendNotification):
      (WebCore::PluginRequest::shouldAllowPopups):
      * rendering/HitTestResult.cpp:
      * rendering/InlineFlowBox.cpp:
      * rendering/RenderBox.cpp:
      * rendering/RenderEmbeddedObject.cpp:
      * rendering/RenderImage.cpp:
      * rendering/RenderImageResource.cpp:
      (WebCore::RenderImageResource::RenderImageResource):
      * rendering/RenderImageResource.h:
      (WebCore::RenderImageResource::image):
      (WebCore::RenderImageResource::errorOccurred):
      (WebCore::RenderImageResource::usesImageContainerSize):
      (WebCore::RenderImageResource::imageHasRelativeWidth):
      (WebCore::RenderImageResource::imageHasRelativeHeight):
      (WebCore::RenderImageResource::imageSize):
      * rendering/RenderImageResourceStyleImage.cpp:
      * rendering/RenderLayer.cpp:
      * rendering/RenderLayerBacking.cpp:
      * rendering/RenderLayerFilterInfo.h:
      * rendering/RenderListItem.cpp:
      * rendering/RenderListMarker.cpp:
      * rendering/RenderSnapshottedPlugIn.cpp:
      * rendering/RenderTableCol.cpp:
      * rendering/RenderTableRow.cpp:
      * rendering/RenderTableSection.cpp:
      * rendering/style/StyleCachedShader.h:
      * rendering/style/StyleCustomFilterProgram.cpp: Removed.
      * rendering/style/StyleCustomFilterProgram.h:
      (WebCore):
      (WebCore::StyleCustomFilterProgram::vertexShaderString):
      (StyleCustomFilterProgram):
      (WebCore::StyleCustomFilterProgram::fragmentShaderString):
      (WebCore::StyleCustomFilterProgram::isLoaded):
      (WebCore::StyleCustomFilterProgram::willHaveClients):
      (WebCore::StyleCustomFilterProgram::didRemoveLastClient):
      (WebCore::StyleCustomFilterProgram::notifyFinished):
      * svg/SVGFEImageElement.h:
      * svg/SVGFontFaceUriElement.h:
      (SVGFontFaceUriElement):
      * svg/SVGImageLoader.cpp:
      * svg/SVGUseElement.cpp:
      * svg/SVGUseElement.h:
      * svg/graphics/SVGImageCache.cpp:
      * testing/MockPagePopupDriver.cpp:
      * xml/XSLStyleSheet.h:
      * xml/XSLTProcessorLibxslt.cpp:
      * xml/parser/XMLDocumentParser.cpp:
      * xml/parser/XMLDocumentParser.h:
      * xml/parser/XMLDocumentParserLibxml2.cpp:
      
      Source/WebKit/chromium:
      
      * src/ApplicationCacheHost.cpp:
      * src/AssociatedURLLoader.cpp:
      * src/EditorClientImpl.cpp:
      * src/SharedWorkerRepository.cpp:
      * src/WebDataSourceImpl.cpp:
      * src/WebFrameImpl.h:
      (WebCore):
      * src/WebNode.cpp:
      * src/WebSharedWorkerImpl.cpp:
      * tests/FrameLoaderClientImplTest.cpp:
      
      Source/WebKit/efl:
      
      * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
      * ewk/ewk_frame.cpp:
      
      Source/WebKit/gtk:
      
      * webkit/webkitwebpolicydecision.cpp:
      
      Source/WebKit/mac:
      
      * DOM/WebDOMOperations.mm:
      * Misc/WebNSPasteboardExtras.mm:
      * WebCoreSupport/WebFrameNetworkingContext.mm:
      * WebView/WebRenderLayer.mm:
      * WebView/WebRenderNode.mm:
      
      Source/WebKit/qt:
      
      * WebCoreSupport/NotificationPresenterClientQt.cpp:
      * WebCoreSupport/QWebPageAdapter.cpp:
      
      Source/WebKit2:
      
      * NetworkProcess/HostRecord.h:
      * NetworkProcess/NetworkResourceLoadScheduler.h:
      * NetworkProcess/NetworkResourceLoader.h:
      (WebCore):
      * Shared/WebRenderLayer.cpp:
      * Shared/WebRenderObject.cpp:
      * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
      * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
      * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
      * WebProcess/InjectedBundle/InjectedBundle.cpp:
      * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
      * WebProcess/Plugins/PDF/PDFPlugin.mm:
      * WebProcess/Plugins/PluginView.cpp:
      * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
      * WebProcess/WebCoreSupport/WebEditorClient.cpp:
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
      * WebProcess/WebPage/mac/WebPageMac.mm:
      * WebProcess/WebProcess.cpp:
      * WebProcess/soup/WebProcessSoup.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144446 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0b87a6c7
    • ap@apple.com's avatar
      Reduce amount of rebuilding when touching networking headers · b2f13721
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=111035
      
      Reviewed by Eric Seidel.
      
      Source/WebCore:
      
      This uses a number of common unsurprising techniques. One interesting observation
      is that including CachedResource related headers is very expensive. We can usually
      get away with their Client counterparts, and with CachedResourceHandle.
      
      * page/Frame.cpp:
      * page/Frame.h:
      Don't include FrameLoader, greatly reducing include graph for most non-loader files.
      This required making Frame::init() non-inline - I'm not sure why it ever was.
      
      * loader/FrameLoader.cpp:
      * loader/FrameLoader.h:
      Even though FrameLoader is logically on loading side of WebCore, it's included in
      too many places. Not including PolicyChecker.h and ResourceHandle.h was among the
      largest wins. As a future improvement, we should probably convert other members
      to OwnPtrs.
      
      * css/CSSCrossfadeValue.h: Initializing CachedResourceHandle with 0 requires a
      definition of a class it holds, but default construction does not.
      
      * loader/CrossOriginAccessControl.h: This file among others only needs ResourceHandleTypes.h,
      not ResourceHandle.h. This header is semi-recent, so not all include sites were updated.
      
      * loader/cache/CachedFont.h:
      * loader/cache/CachedFontClient.h: Added.
      * loader/cache/CachedRawResource.h:
      * loader/cache/CachedRawResourceClient.h: Added.
      * loader/cache/CachedSVGDocument.h:
      * loader/cache/CachedSVGDocumentClient.h: Added.
      These types were defining client types in the same headers, making it impossible
      to avoid including networking headers through CachedResource. Moved clients into
      separate files.
      
      * plugins/PluginStream.h:
      * plugins/PluginStreamClient.h: Added.
      Similar situation here.
      
      * loader/cache/CachedResourceHandle.cpp:
      * loader/cache/CachedResourceHandle.h:
      Moved functions that need to know about CachedResource to .cpp file. This is another
      huge win. Added a destructor, so that CachedResource woudn't be needed in all files
      that include CachedResourceHandle.
      
      * loader/cache/CachedSVGDocumentReference.cpp: Added.
      * loader/cache/CachedSVGDocumentReference.h:
      Moved constructor and virtual function implementations to a .cpp file - they need
      not inlining, and this lets us avoid including CachedSVGDocument.h in the header.
      
      * platform/graphics/filters/FilterOperation.cpp:
      * platform/graphics/filters/FilterOperation.h:
      Avoid including CachedSVGDocumentReference.h. This is not such a big win now that
      CachedSVGDocumentReference.h itself is smaller, but FilterOperation is so clearly
      rendering code that it seems best to cut any ties with resources and loading.
      Added a virtual destrutor in .cpp file, because inline destructors in polymorphic
      classes are generally harmful (due to code bloat).
      
      * plugins/PluginRequest.h: Added.
      * plugins/PluginView.h:
      Moved PluginRequest into a separate file, it was out of place in a view hierarchy
      class file.
      
      * rendering/RenderImageResource.cpp:
      * rendering/RenderImageResource.h:
      Moved definitions of virtual functions to a .cpp file. Thre is no win from having
      them inline, and now we don't need CachedImage.h in the header.
      
      * rendering/style/StyleCustomFilterProgram.cpp: Added.
      * rendering/style/StyleCustomFilterProgram.h:
      Ditto.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Modules/mediastream/RTCPeerConnection.cpp:
      * Modules/notifications/Notification.cpp:
      * Target.pri:
      * WebCore.exp.in:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/ScriptControllerBase.cpp:
      * bindings/js/JSNodeCustom.cpp:
      * bindings/js/ScriptController.cpp:
      * bindings/js/ScriptSourceCode.h:
      * bindings/objc/DOM.mm:
      * bindings/v8/ScriptController.cpp:
      * bindings/v8/V8DOMWindowShell.cpp:
      * bindings/v8/custom/V8DOMWindowCustom.cpp:
      * css/CSSFontFaceSource.h:
      * css/CSSFontSelector.cpp:
      * css/WebKitCSSSVGDocumentValue.cpp:
      * css/WebKitCSSSVGDocumentValue.h:
      * dom/Clipboard.cpp:
      * dom/ContainerNode.cpp:
      * dom/DOMImplementation.cpp:
      * dom/PendingScript.h:
      * dom/ScriptElement.cpp:
      * dom/ScriptElement.h:
      * history/CachedFrame.cpp:
      * html/DOMURL.cpp:
      * html/HTMLAnchorElement.cpp:
      * html/HTMLAppletElement.cpp:
      * html/HTMLElement.cpp:
      * html/HTMLEmbedElement.cpp:
      * html/HTMLFrameSetElement.cpp:
      * html/HTMLHtmlElement.cpp:
      * html/HTMLImageElement.cpp:
      * html/HTMLObjectElement.cpp:
      * html/HTMLPlugInElement.cpp:
      * html/ImageDocument.cpp:
      * html/ImageInputType.cpp:
      * html/MediaDocument.cpp:
      * html/PluginDocument.cpp:
      * html/canvas/WebGLRenderingContext.cpp:
      * html/parser/HTMLConstructionSite.cpp:
      * html/parser/HTMLParserOptions.cpp:
      * html/parser/HTMLScriptRunner.h:
      * html/parser/XSSAuditor.cpp:
      * html/parser/XSSAuditorDelegate.cpp:
      * inspector/InspectorDebuggerAgent.cpp:
      * inspector/InspectorFileSystemAgent.cpp:
      * inspector/InspectorFrontendHost.cpp:
      * inspector/InspectorInstrumentation.h:
      * inspector/InspectorPageAgent.cpp:
      * inspector/NetworkResourcesData.cpp:
      * inspector/NetworkResourcesData.h:
      * loader/CookieJar.cpp:
      * loader/CrossOriginAccessControl.cpp:
      * loader/CrossOriginPreflightResultCache.h:
      * loader/DocumentThreadableLoader.h:
      * loader/ImageLoader.cpp:
      * loader/ImageLoader.h:
      * loader/LinkLoader.h:
      * loader/MainResourceLoader.cpp:
      * loader/MainResourceLoader.h:
      * loader/MixedContentChecker.cpp:
      * loader/PingLoader.cpp:
      * loader/PolicyChecker.h:
      * loader/ProgressTracker.cpp:
      * loader/SubframeLoader.cpp:
      * loader/SubresourceLoader.cpp:
      * loader/TextTrackLoader.cpp:
      * loader/TextTrackLoader.h:
      * loader/ThreadableLoader.h:
      * loader/appcache/ApplicationCacheGroup.cpp:
      * loader/appcache/ApplicationCacheGroup.h:
      * loader/appcache/ApplicationCacheHost.cpp:
      * loader/archive/cf/LegacyWebArchive.cpp:
      * loader/cache/CachedFont.cpp:
      * loader/cache/CachedImage.cpp:
      * loader/cache/CachedRawResource.cpp:
      * loader/cache/CachedResource.cpp:
      * loader/cache/CachedStyleSheetClient.h:
      * loader/cache/MemoryCache.cpp:
      * loader/cache/MemoryCache.h:
      * loader/chromium/CachedRawResourceChromium.cpp:
      * loader/icon/IconController.cpp:
      * loader/icon/IconLoader.h:
      * loader/mac/ResourceLoaderMac.mm:
      * page/DOMWindowExtension.cpp:
      * page/DragController.cpp:
      * page/PerformanceNavigation.cpp:
      * page/PerformanceTiming.cpp:
      * page/PointerLockController.cpp:
      * page/Settings.cpp:
      * page/animation/CSSPropertyAnimation.cpp:
      * platform/chromium/PasteboardChromium.cpp:
      * platform/efl/ErrorsEfl.cpp:
      * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
      * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
      * platform/gtk/ErrorsGtk.cpp:
      * platform/gtk/PasteboardGtk.cpp:
      * platform/gtk/PasteboardHelper.h:
      * platform/mac/ClipboardMac.h:
      * platform/mac/ClipboardMac.mm:
      * platform/mac/HTMLConverter.mm:
      * platform/mac/PasteboardMac.mm:
      * platform/network/AuthenticationChallengeBase.cpp:
      * platform/network/cf/CookieJarCFNet.cpp:
      * platform/network/cf/ResourceRequestCFNet.cpp:
      * platform/network/mac/CookieStorageMac.mm:
      * platform/qt/PasteboardQt.cpp:
      * plugins/DOMMimeType.cpp:
      * plugins/PluginView.cpp:
      * rendering/HitTestResult.cpp:
      * rendering/InlineFlowBox.cpp:
      * rendering/RenderBox.cpp:
      * rendering/RenderEmbeddedObject.cpp:
      * rendering/RenderImage.cpp:
      * rendering/RenderImageResourceStyleImage.cpp:
      * rendering/RenderLayer.cpp:
      * rendering/RenderLayerBacking.cpp:
      * rendering/RenderLayerFilterInfo.h:
      * rendering/RenderListItem.cpp:
      * rendering/RenderListMarker.cpp:
      * rendering/RenderSnapshottedPlugIn.cpp:
      * rendering/RenderTableCol.cpp:
      * rendering/RenderTableRow.cpp:
      * rendering/RenderTableSection.cpp:
      * rendering/style/StyleCachedShader.h:
      * svg/SVGFEImageElement.h:
      * svg/SVGFontFaceUriElement.h:
      * svg/SVGImageLoader.cpp:
      * svg/SVGUseElement.cpp:
      * svg/SVGUseElement.h:
      * svg/graphics/SVGImageCache.cpp:
      * testing/MockPagePopupDriver.cpp:
      * xml/XSLStyleSheet.h:
      * xml/XSLTProcessorLibxslt.cpp:
      * xml/parser/XMLDocumentParser.cpp:
      * xml/parser/XMLDocumentParser.h:
      * xml/parser/XMLDocumentParserLibxml2.cpp:
      Many self-evident changes - removing unnecessary header includes, adding smaller
      more local ones that are now necessary.
      
      Source/WebKit/chromium:
      
      Adding includes that are now necessary because WebCore headers don't have them
      any more.
      
      * src/ApplicationCacheHost.cpp:
      * src/AssociatedURLLoader.cpp:
      * src/EditorClientImpl.cpp:
      * src/SharedWorkerRepository.cpp:
      * src/WebDataSourceImpl.cpp:
      * src/WebFrameImpl.h:
      * src/WebNode.cpp:
      * src/WebSharedWorkerImpl.cpp:
      * tests/FrameLoaderClientImplTest.cpp:
      
      Source/WebKit/efl:
      
      Adding includes that are now necessary because WebCore headers don't have them
      any more.
      
      * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
      * ewk/ewk_frame.cpp:
      
      Source/WebKit/gtk:
      
      Adding includes that are now necessary because WebCore headers don't have them
      any more.
      
      * webkit/webkitwebpolicydecision.cpp:
      
      Source/WebKit/mac:
      
      Adding includes that are now necessary because WebCore headers don't have them
      any more.
      
      * DOM/WebDOMOperations.mm:
      * Misc/WebNSPasteboardExtras.mm:
      * WebCoreSupport/WebFrameNetworkingContext.mm:
      * WebView/WebRenderLayer.mm:
      * WebView/WebRenderNode.mm:
      
      Source/WebKit/qt:
      
      Adding includes that are now necessary because WebCore headers don't have them
      any more.
      
      * WebCoreSupport/NotificationPresenterClientQt.cpp:
      * WebCoreSupport/QWebPageAdapter.cpp:
      
      Source/WebKit2:
      
      Adding includes that are now necessary because WebCore headers don't have them
      any more.
      
      * NetworkProcess/HostRecord.h:
      * NetworkProcess/NetworkResourceLoadScheduler.h:
      * NetworkProcess/NetworkResourceLoader.h:
      * Shared/WebRenderLayer.cpp:
      * Shared/WebRenderObject.cpp:
      * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
      * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
      * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
      * WebProcess/InjectedBundle/InjectedBundle.cpp:
      * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
      * WebProcess/Plugins/PDF/PDFPlugin.mm:
      * WebProcess/Plugins/PluginView.cpp:
      * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
      * WebProcess/WebCoreSupport/WebEditorClient.cpp:
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
      * WebProcess/WebPage/mac/WebPageMac.mm:
      * WebProcess/WebProcess.cpp:
      * WebProcess/soup/WebProcessSoup.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144422 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b2f13721
  12. 28 Feb, 2013 1 commit
  13. 26 Feb, 2013 1 commit
    • mkwst@chromium.org's avatar
      X-Frame-Options should accept ALLOWALL as a valid value. · 1038527e
      mkwst@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=110857
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      DoubleClick, among others, serves ALLOWALL as a 'X-Frame-Options' value
      with the intent of (shock!) allowing a resource to be framed by all
      origins. Given its prevelance, and the fact that IE supports the header,
      we shouldn't call it out as invalid.
      
      This patch tweaks the warning logic to only throw the warning if the
      header's value isn't 'ALLOWALL', 'DENY', or 'SAMEORIGIN'.
      
      Test: http/tests/security/XFrameOptions/x-frame-options-allowall.html
      
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
      
      LayoutTests:
      
      * http/tests/security/XFrameOptions/resources/x-frame-options-allowall.cgi: Added.
      * http/tests/security/XFrameOptions/x-frame-options-allowall-expected.txt: Added.
      * http/tests/security/XFrameOptions/x-frame-options-allowall.html: Added.
          Exciting new test!
      * http/tests/security/XFrameOptions/x-frame-options-cached-expected.txt:
          Exciting new baseline for an old test that was already using ALLOWALL!
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1038527e
  14. 25 Feb, 2013 1 commit
    • jpfau@apple.com's avatar
      Optionally partition cache to prevent using cache for tracking · 97c6a7f9
      jpfau@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=110269
      
      Reviewed by Maciej Stachowiak.
      
      Source/JavaScriptCore:
      
      * Configurations/FeatureDefines.xcconfig: Add defines for cache partitioning and public suffix list usage
      
      Source/WebCore:
      
      Implement memory cache partitioning by passing the cache name through
      resource requests into a new version of resourceForURL.
      
      Test: http/tests/cache/partitioned-cache.html
      
      * Configurations/FeatureDefines.xcconfig: Add defines for cache partitioning and public suffix list usage
      * WebCore.exp.in: Export new functions for WKSI and test suite
      * WebCore.xcodeproj/project.pbxproj:
      * html/DOMURL.cpp:
      (WebCore::DOMURL::revokeObjectURL): Retrofit for new resourceForRequest function
      * inspector/InspectorPageAgent.cpp:
      (WebCore::InspectorPageAgent::cachedResource): Retrofit for new resourceForRequest function
      * inspector/InspectorResourceAgent.cpp:
      (WebCore::InspectorResourceAgent::replayXHR): Retrofit for new resourceForRequest function
      * loader/DocumentLoader.h:
      (DocumentLoader):
      (WebCore::DocumentLoader::recordMemoryCacheLoadForFutureClientNotification): Retrofit for new resourceForRequest function
      (WebCore::DocumentLoader::takeMemoryCacheLoadsForClientNotification): Retrofit for new resourceForRequest function
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::loadedResourceFromMemoryCache): Retrofit for new resourceForRequest function
      (WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads): Retrofit for new resourceForRequest function
      * loader/archive/cf/LegacyWebArchive.cpp:
      (WebCore::LegacyWebArchive::create): Retrofit for new resourceForRequest function
      * loader/cache/CachedResource.cpp:
      (WebCore::CachedResource::~CachedResource):
      * loader/cache/CachedResource.h: Retrofit for new resourceForRequest function
      (CachedResource):
      (WebCore::CachedResource::cachePartition):
      * loader/cache/CachedResourceLoader.cpp:
      (WebCore::CachedResourceLoader::requestUserCSSStyleSheet): Retrofit for new resourceForRequest function
      (WebCore::CachedResourceLoader::requestResource): Retrofit for new resourceForRequest function
      (WebCore::CachedResourceLoader::loadResource): Retrofit for new resourceForRequest function
      * loader/cache/MemoryCache.cpp:
      (WebCore):
      (WebCore::partitionName): Add function for determining absolute partition name
      (WebCore::MemoryCache::add): Retrofit for partition mapping
      (WebCore::MemoryCache::revalidationSucceeded): Retrofit for partition mapping
      (WebCore::MemoryCache::resourceForURL): Call into new resourceForRequest
      (WebCore::MemoryCache::resourceForRequest): Retrofit for partition mapping
      (WebCore::MemoryCache::evict): Retrofit for partition mapping
      (WebCore::MemoryCache::removeResourcesWithOrigin): Retrofit for partition mapping
      (WebCore::MemoryCache::getOriginsWithCache): Retrofit for partition mapping
      (WebCore::MemoryCache::removeUrlFromCache): Retrofit for partition mapping
      (WebCore::MemoryCache::removeRequestFromCache): Retrofit for partition mapping
      (WebCore::MemoryCache::removeRequestFromCacheImpl): Retrofit for partition mapping
      (WebCore::MemoryCache::crossThreadRemoveRequestFromCache): Add function for calling removeRequestFromCacheImpl that takes a CrossThreadResourceRequestData
      (WebCore::MemoryCache::getStatistics): Retrofit for partition mapping
      (WebCore::MemoryCache::setDisabled): Retrofit for partition mapping
      * loader/cache/MemoryCache.h:
      (MemoryCache):
      * page/SecurityOrigin.cpp:
      (WebCore):
      (WebCore::SecurityOrigin::cachePartition): Add function for determining the cache partition name
      * page/SecurityOrigin.h:
      (SecurityOrigin):
      * platform/PublicSuffix.h: Added.
      (WebCore):
      * platform/mac/PublicSuffixMac.mm: Added.
      (WebCore):
      (WebCore::isPublicSuffix):
      (WebCore::topPrivatelyControlledDomain):
      * platform/mac/WebCoreSystemInterface.h:
      * platform/mac/WebCoreSystemInterface.mm:
      * platform/network/cf/ResourceRequest.h:
      (ResourceRequest):
      (WebCore::ResourceRequest::cachePartition):
      (WebCore::ResourceRequest::setCachePartition):
      (CrossThreadResourceRequestData):
      * platform/network/cf/ResourceRequestCFNet.cpp:
      (WebCore::ResourceRequest::doPlatformCopyData): Pass through cache partition name
      (WebCore):
      (WebCore::ResourceRequest::doPlatformAdopt): Pass through cache partition name
      * platform/network/mac/ResourceRequestMac.mm:
      (WebCore::ResourceRequest::doUpdateResourceRequest): Pass through cache partition name
      (WebCore::ResourceRequest::doUpdatePlatformRequest): Pass through cache partition name
      
      Source/WebKit/mac:
      
      Update WKSI bindings and add feature defines.
      
      * Configurations/FeatureDefines.xcconfig: Add defines for cache partitioning and public suffix list usage
      * WebCoreSupport/WebSystemInterface.mm:
      (InitWebCoreSystemInterface):
      
      Source/WebKit2:
      
      Update WKSI bindings and add feature defines.
      
      * Configurations/FeatureDefines.xcconfig: Add defines for cache partitioning and public suffix list usage
      * WebCoreSupport/WebSystemInterface.mm:
      (InitWebCoreSystemInterface):
      
      Tools:
      
      Add test suite for public suffix functions on Mac.
      
      * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
      * TestWebKitAPI/Tests/mac/PublicSuffix.mm: Added.
      (TestWebKitAPI):
      (TestWebKitAPI::TEST_F):
      
      WebKitLibraries:
      
      Update WKSI bindings.
      
      * WebKitSystemInterface.h:
      * libWebKitSystemInterfaceLion.a:
      * libWebKitSystemInterfaceMountainLion.a:
      
      LayoutTests:
      
      Added tests for ensuring the cache partitioning functions
      
      * http/tests/cache/partitioned-cache-expected.txt: Added.
      * http/tests/cache/partitioned-cache.html: Added.
      * http/tests/cache/resources/echo-cookie.cgi: Added.
      * http/tests/cache/resources/partitioned-cache-loader.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      97c6a7f9
  15. 20 Feb, 2013 1 commit
  16. 19 Feb, 2013 1 commit
  17. 16 Feb, 2013 1 commit
  18. 01 Feb, 2013 1 commit
    • loislo@chromium.org's avatar
      Web Inspector: Native Memory Instrumentation: provide edge names to class... · a7d09fcf
      loislo@chromium.org authored
      Web Inspector: Native Memory Instrumentation: provide edge names to class members in all WebCore instrumented classes.
      https://bugs.webkit.org/show_bug.cgi?id=107369
      
      Reviewed by Yury Semikhatsky.
      
      It is almost mechanical change generated by a script.
      Late I'll implement name to edge name consistency check in clang plugin.
      
      * Modules/webaudio/AudioContext.cpp:
      (WebCore::AudioContext::reportMemoryUsage):
      * Modules/webaudio/AudioNode.cpp:
      (WebCore::AudioNode::reportMemoryUsage):
      * bindings/js/ScriptWrappable.h:
      (WebCore::ScriptWrappable::reportMemoryUsage):
      * bindings/v8/DOMDataStore.cpp:
      (WebCore::DOMDataStore::reportMemoryUsage):
      * bindings/v8/DOMWrapperMap.h:
      (WebCore::DOMWrapperMap::reportMemoryUsage):
      * bindings/v8/V8PerIsolateData.cpp:
      (WebCore::V8PerIsolateData::reportMemoryUsage):
      * bindings/v8/V8ValueCache.cpp:
      (WebCore::StringCache::reportMemoryUsage):
      * css/CSSBorderImageSliceValue.cpp:
      (WebCore::CSSBorderImageSliceValue::reportDescendantMemoryUsage):
      * css/CSSCalculationValue.cpp:
      * css/CSSCanvasValue.cpp:
      (WebCore::CSSCanvasValue::reportDescendantMemoryUsage):
      * css/CSSCharsetRule.cpp:
      (WebCore::CSSCharsetRule::reportMemoryUsage):
      * css/CSSComputedStyleDeclaration.cpp:
      (WebCore::CSSComputedStyleDeclaration::reportMemoryUsage):
      * css/CSSCrossfadeValue.cpp:
      (WebCore::CSSCrossfadeValue::reportDescendantMemoryUsage):
      * css/CSSCursorImageValue.cpp:
      (WebCore::CSSCursorImageValue::reportDescendantMemoryUsage):
      * css/CSSFontFaceRule.cpp:
      (WebCore::CSSFontFaceRule::reportMemoryUsage):
      * css/CSSFontFaceSrcValue.cpp:
      (WebCore::CSSFontFaceSrcValue::reportDescendantMemoryUsage):
      * css/CSSFunctionValue.cpp:
      (WebCore::CSSFunctionValue::reportDescendantMemoryUsage):
      * css/CSSGradientValue.cpp:
      (WebCore::CSSGradientColorStop::reportMemoryUsage):
      (WebCore::CSSGradientValue::reportBaseClassMemoryUsage):
      (WebCore::CSSLinearGradientValue::reportDescendantMemoryUsage):
      (WebCore::CSSRadialGradientValue::reportDescendantMemoryUsage):
      * css/CSSGroupingRule.cpp:
      (WebCore::CSSGroupingRule::reportMemoryUsage):
      * css/CSSImageGeneratorValue.cpp:
      (WebCore::CSSImageGeneratorValue::reportBaseClassMemoryUsage):
      * css/CSSImageSetValue.cpp:
      (WebCore::CSSImageSetValue::reportDescendantMemoryUsage):
      (WebCore::CSSImageSetValue::ImageWithScale::reportMemoryUsage):
      * css/CSSImageValue.cpp:
      (WebCore::CSSImageValue::reportDescendantMemoryUsage):
      * css/CSSImportRule.cpp:
      (WebCore::CSSImportRule::reportMemoryUsage):
      * css/CSSMediaRule.cpp:
      (WebCore::CSSMediaRule::reportMemoryUsage):
      * css/CSSPageRule.cpp:
      (WebCore::CSSPageRule::reportMemoryUsage):
      * css/CSSPrimitiveValue.cpp:
      (WebCore::CSSPrimitiveValue::reportDescendantMemoryUsage):
      * css/CSSProperty.cpp:
      (WebCore::CSSProperty::reportMemoryUsage):
      * css/CSSReflectValue.cpp:
      (WebCore::CSSReflectValue::reportDescendantMemoryUsage):
      * css/CSSRule.cpp:
      (WebCore::CSSRule::reportMemoryUsage):
      * css/CSSRuleList.cpp:
      (WebCore::StaticCSSRuleList::reportMemoryUsage):
      * css/CSSRuleList.h:
      * css/CSSSelectorList.cpp:
      (WebCore::CSSSelectorList::reportMemoryUsage):
      * css/CSSStyleRule.cpp:
      (WebCore::CSSStyleRule::reportMemoryUsage):
      * css/CSSStyleSheet.cpp:
      (WebCore::CSSStyleSheet::reportMemoryUsage):
      * css/CSSValue.cpp:
      (WebCore::TextCloneCSSValue::reportDescendantMemoryUsage):
      * css/CSSValueList.cpp:
      (WebCore::CSSValueList::reportDescendantMemoryUsage):
      * css/CSSVariableValue.h:
      (WebCore::CSSVariableValue::reportDescendantMemoryUsage):
      * css/FontFeatureValue.cpp:
      (WebCore::FontFeatureValue::reportDescendantMemoryUsage):
      * css/FontValue.cpp:
      (WebCore::FontValue::reportDescendantMemoryUsage):
      * css/MediaList.cpp:
      (WebCore::MediaQuerySet::reportMemoryUsage):
      (WebCore::MediaList::reportMemoryUsage):
      * css/MediaQuery.cpp:
      (WebCore::MediaQuery::reportMemoryUsage):
      * css/MediaQueryExp.cpp:
      (WebCore::MediaQueryExp::reportMemoryUsage):
      * css/PropertySetCSSStyleDeclaration.cpp:
      (WebCore::PropertySetCSSStyleDeclaration::reportMemoryUsage):
      (WebCore::StyleRuleCSSStyleDeclaration::reportMemoryUsage):
      (WebCore::InlineCSSStyleDeclaration::reportMemoryUsage):
      * css/RuleFeature.cpp:
      (WebCore::RuleFeatureSet::reportMemoryUsage):
      * css/RuleSet.cpp:
      (WebCore::RuleData::reportMemoryUsage):
      (WebCore::RuleSet::reportMemoryUsage):
      (WebCore::RuleSet::RuleSetSelectorPair::reportMemoryUsage):
      * css/ShadowValue.cpp:
      (WebCore::ShadowValue::reportDescendantMemoryUsage):
      * css/StylePropertySet.cpp:
      (WebCore::StylePropertySet::reportMemoryUsage):
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::MatchedProperties::reportMemoryUsage):
      (WebCore::StyleResolver::MatchedPropertiesCacheItem::reportMemoryUsage):
      (WebCore::MediaQueryResult::reportMemoryUsage):
      (WebCore::StyleResolver::reportMemoryUsage):
      * css/StyleRule.cpp:
      (WebCore::StyleRule::reportDescendantMemoryUsage):
      (WebCore::StyleRulePage::reportDescendantMemoryUsage):
      (WebCore::StyleRuleFontFace::reportDescendantMemoryUsage):
      (WebCore::StyleRuleGroup::reportDescendantMemoryUsage):
      (WebCore::StyleRuleMedia::reportDescendantMemoryUsage):
      (WebCore::StyleRuleRegion::reportDescendantMemoryUsage):
      (WebCore::StyleRuleViewport::reportDescendantMemoryUsage):
      * css/StyleRuleImport.cpp:
      (WebCore::StyleRuleImport::reportDescendantMemoryUsage):
      * css/StyleScopeResolver.cpp:
      (WebCore::StyleScopeResolver::reportMemoryUsage):
      * css/StyleSheetContents.cpp:
      (WebCore::StyleSheetContents::reportMemoryUsage):
      * css/WebKitCSSKeyframeRule.cpp:
      (WebCore::StyleKeyframe::reportMemoryUsage):
      (WebCore::WebKitCSSKeyframeRule::reportMemoryUsage):
      * css/WebKitCSSKeyframesRule.cpp:
      (WebCore::StyleRuleKeyframes::reportDescendantMemoryUsage):
      (WebCore::WebKitCSSKeyframesRule::reportMemoryUsage):
      * css/WebKitCSSSVGDocumentValue.cpp:
      (WebCore::WebKitCSSSVGDocumentValue::reportDescendantMemoryUsage):
      * css/WebKitCSSShaderValue.cpp:
      (WebCore::WebKitCSSShaderValue::reportDescendantMemoryUsage):
      * css/WebKitCSSViewportRule.cpp:
      (WebCore::WebKitCSSViewportRule::reportMemoryUsage):
      * dom/Attribute.h:
      (WebCore::Attribute::reportMemoryUsage):
      * dom/CharacterData.cpp:
      (WebCore::CharacterData::reportMemoryUsage):
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::reportMemoryUsage):
      * dom/ContainerNode.h:
      (ContainerNode):
      * dom/Document.cpp:
      (WebCore::Document::reportMemoryUsage):
      * dom/DocumentEventQueue.cpp:
      (WebCore::DocumentEventQueue::reportMemoryUsage):
      * dom/DocumentOrderedMap.cpp:
      (WebCore::DocumentOrderedMap::reportMemoryUsage):
      * dom/DocumentStyleSheetCollection.cpp:
      (WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
      * dom/Element.cpp:
      (WebCore::Element::reportMemoryUsage):
      * dom/ElementAttributeData.cpp:
      (WebCore::ElementAttributeData::reportMemoryUsage):
      * dom/ElementRareData.cpp:
      (WebCore::ElementRareData::reportMemoryUsage):
      * dom/ElementShadow.cpp:
      (WebCore::ElementShadow::reportMemoryUsage):
      * dom/Event.cpp:
      (WebCore::Event::reportMemoryUsage):
      * dom/LiveNodeList.cpp:
      (WebCore::LiveNodeListBase::reportMemoryUsage):
      * dom/Node.cpp:
      (WebCore::Node::reportMemoryUsage):
      * dom/NodeRareData.cpp:
      (WebCore::NodeListsNodeData::reportMemoryUsage):
      (WebCore::NodeRareData::reportMemoryUsage):
      * dom/QualifiedName.cpp:
      (WebCore::QualifiedName::reportMemoryUsage):
      (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
      * dom/ScriptExecutionContext.cpp:
      (WebCore::ScriptExecutionContext::reportMemoryUsage):
      * dom/SecurityContext.cpp:
      (WebCore::SecurityContext::reportMemoryUsage):
      * dom/ShadowRoot.cpp:
      (WebCore::ShadowRoot::reportMemoryUsage):
      * dom/TreeScope.cpp:
      (WebCore::TreeScope::reportMemoryUsage):
      * html/HTMLCanvasElement.cpp:
      (WebCore::HTMLCanvasElement::reportMemoryUsage):
      * html/HTMLFormControlElement.cpp:
      (WebCore::HTMLFormControlElement::reportMemoryUsage):
      * html/HTMLImageElement.cpp:
      (WebCore::HTMLImageElement::reportMemoryUsage):
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::reportMemoryUsage):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::reportMemoryUsage):
      * html/HTMLTextFormControlElement.cpp:
      (WebCore::HTMLTextFormControlElement::reportMemoryUsage):
      * inspector/HeapGraphSerializer.cpp:
      (WebCore::HeapGraphSerializer::HeapGraphSerializer):
      (WebCore::HeapGraphSerializer::reportNode):
      (WebCore::HeapGraphSerializer::reportMemoryUsage):
      * inspector/HeapGraphSerializer.h:
      (HeapGraphSerializer):
      * inspector/InspectorBaseAgent.cpp:
      (WebCore::InspectorBaseAgentInterface::reportMemoryUsage):
      * inspector/InspectorController.cpp:
      (WebCore::InspectorController::reportMemoryUsage):
      * inspector/InspectorDOMStorageAgent.cpp:
      (WebCore::InspectorDOMStorageAgent::reportMemoryUsage):
      * inspector/InspectorDOMStorageResource.cpp:
      (WebCore::InspectorDOMStorageResource::reportMemoryUsage):
      * inspector/InspectorDebuggerAgent.cpp:
      (WebCore::InspectorDebuggerAgent::reportMemoryUsage):
      (WebCore::ScriptDebugListener::Script::reportMemoryUsage):
      * inspector/InspectorMemoryAgent.cpp:
      (WebCore::InspectorMemoryAgent::reportMemoryUsage):
      * inspector/InspectorOverlay.cpp:
      (WebCore::InspectorOverlay::reportMemoryUsage):
      * inspector/InspectorProfilerAgent.cpp:
      (WebCore::InspectorProfilerAgent::reportMemoryUsage):
      * inspector/InspectorResourceAgent.cpp:
      (WebCore::InspectorResourceAgent::reportMemoryUsage):
      * inspector/MemoryInstrumentationImpl.cpp:
      (WebCore::MemoryInstrumentationClientImpl::reportMemoryUsage):
      (WebCore::MemoryInstrumentationImpl::reportMemoryUsage):
      * inspector/NetworkResourcesData.cpp:
      (WebCore::XHRReplayData::reportMemoryUsage):
      (WebCore::NetworkResourcesData::ResourceData::reportMemoryUsage):
      (WebCore::NetworkResourcesData::reportMemoryUsage):
      * loader/CachedMetadata.cpp:
      (WebCore::CachedMetadata::reportMemoryUsage):
      * loader/DocumentLoader.cpp:
      (WebCore::DocumentLoader::reportMemoryUsage):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::reportMemoryUsage):
      * loader/MainResourceLoader.cpp:
      (WebCore::MainResourceLoader::reportMemoryUsage):
      * loader/Prerenderer.cpp:
      (WebCore::Prerenderer::reportMemoryUsage):
      * loader/ResourceBuffer.cpp:
      (WebCore::ResourceBuffer::reportMemoryUsage):
      * loader/ResourceLoader.cpp:
      (WebCore::ResourceLoader::reportMemoryUsage):
      * loader/SubresourceLoader.cpp:
      (WebCore::SubresourceLoader::reportMemoryUsage):
      * loader/SubstituteData.cpp:
      (WebCore::SubstituteData::reportMemoryUsage):
      * loader/cache/CachedCSSStyleSheet.cpp:
      (WebCore::CachedCSSStyleSheet::reportMemoryUsage):
      * loader/cache/CachedFont.cpp:
      (WebCore::CachedFont::reportMemoryUsage):
      * loader/cache/CachedImage.cpp:
      (WebCore::CachedImage::reportMemoryUsage):
      * loader/cache/CachedResource.cpp:
      (WebCore::CachedResource::reportMemoryUsage):
      * loader/cache/CachedResourceHandle.cpp:
      (WebCore::CachedResourceHandleBase::reportMemoryUsage):
      * loader/cache/CachedResourceLoader.cpp:
      (WebCore::CachedResourceLoader::reportMemoryUsage):
      * loader/cache/CachedSVGDocument.cpp:
      (WebCore::CachedSVGDocument::reportMemoryUsage):
      * loader/cache/CachedScript.cpp:
      (WebCore::CachedScript::reportMemoryUsage):
      * loader/cache/CachedShader.cpp:
      (WebCore::CachedShader::reportMemoryUsage):
      * loader/cache/CachedXSLStyleSheet.cpp:
      (WebCore::CachedXSLStyleSheet::reportMemoryUsage):
      * loader/cache/MemoryCache.cpp:
      (WebCore::MemoryCache::reportMemoryUsage):
      * page/DOMTimer.cpp:
      (WebCore::DOMTimer::reportMemoryUsage):
      * page/Frame.cpp:
      (WebCore::Frame::reportMemoryUsage):
      * page/Page.cpp:
      (WebCore::Page::reportMemoryUsage):
      * platform/KURL.cpp:
      (WebCore::KURL::reportMemoryUsage):
      * platform/KURLGoogle.cpp:
      (WebCore::KURLGooglePrivate::reportMemoryUsage):
      * platform/KURLWTFURLImpl.h:
      (WebCore::KURLWTFURLImpl::reportMemoryUsage):
      * platform/ScrollableArea.cpp:
      (WebCore::ScrollableArea::reportMemoryUsage):
      * platform/SharedBuffer.cpp:
      (WebCore::SharedBuffer::reportMemoryUsage):
      * platform/audio/AudioArray.h:
      (WebCore::AudioArray::reportMemoryUsage):
      * platform/audio/FFTFrame.cpp:
      (WebCore::FFTFrame::reportMemoryUsage):
      * platform/audio/HRTFDatabase.cpp:
      (WebCore::HRTFDatabase::reportMemoryUsage):
      * platform/audio/HRTFDatabaseLoader.cpp:
      (WebCore::HRTFDatabaseLoader::reportMemoryUsage):
      * platform/audio/HRTFElevation.cpp:
      (WebCore::HRTFElevation::reportMemoryUsage):
      * platform/audio/HRTFKernel.cpp:
      (WebCore::HRTFKernel::reportMemoryUsage):
      * platform/audio/ffmpeg/FFTFrameFFMPEG.cpp:
      (reportMemoryUsage):
      * platform/graphics/BitmapImage.cpp:
      (WebCore::BitmapImage::reportMemoryUsage):
      (WebCore::FrameData::reportMemoryUsage):
      * platform/graphics/CrossfadeGeneratedImage.cpp:
      (WebCore::CrossfadeGeneratedImage::reportMemoryUsage):
      * platform/graphics/GeneratorGeneratedImage.cpp:
      (WebCore::GeneratorGeneratedImage::reportMemoryUsage):
      * platform/graphics/GraphicsLayer.cpp:
      (WebCore::GraphicsLayer::reportMemoryUsage):
      * platform/graphics/ImageBuffer.cpp:
      (WebCore::ImageBuffer::reportMemoryUsage):
      * platform/graphics/ImageSource.cpp:
      (WebCore::ImageSource::reportMemoryUsage):
      * platform/graphics/chromium/GraphicsLayerChromium.cpp:
      (WebCore::GraphicsLayerChromium::reportMemoryUsage):
      * platform/graphics/skia/ImageBufferSkia.cpp:
      (WebCore::ImageBufferData::reportMemoryUsage):
      * platform/graphics/skia/MemoryInstrumentationSkia.cpp:
      (reportMemoryUsage):
      * platform/graphics/skia/NativeImageSkia.cpp:
      (WebCore::NativeImageSkia::reportMemoryUsage):
      * platform/image-decoders/ImageDecoder.cpp:
      (WebCore::ImageFrame::reportMemoryUsage):
      (WebCore):
      (WebCore::ImageDecoder::reportMemoryUsage):
      * platform/image-decoders/skia/ImageDecoderSkia.cpp:
      (WebCore::ImageFrame::reportMemoryUsage):
      * platform/network/FormData.cpp:
      (WebCore::FormData::reportMemoryUsage):
      (WebCore::FormDataElement::reportMemoryUsage):
      * platform/network/ResourceRequestBase.cpp:
      (WebCore::ResourceRequestBase::reportMemoryUsageBase):
      * platform/network/ResourceResponseBase.cpp:
      (WebCore::ResourceResponseBase::reportMemoryUsage):
      * platform/network/chromium/ResourceRequest.cpp:
      (WebCore::ResourceRequest::reportMemoryUsage):
      * rendering/InlineBox.cpp:
      (WebCore::InlineBox::reportMemoryUsage):
      * rendering/InlineFlowBox.cpp:
      (WebCore::InlineFlowBox::reportMemoryUsage):
      * rendering/InlineTextBox.cpp:
      (WebCore::InlineTextBox::reportMemoryUsage):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::reportMemoryUsage):
      * rendering/RenderBox.cpp:
      (WebCore::RenderBox::reportMemoryUsage):
      * rendering/RenderFrameSet.cpp:
      (WebCore::RenderFrameSet::reportMemoryUsage):
      (WebCore::RenderFrameSet::GridAxis::reportMemoryUsage):
      * rendering/RenderInline.cpp:
      (WebCore::RenderInline::reportMemoryUsage):
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::reportMemoryUsage):
      * rendering/RenderLayerBacking.cpp:
      (WebCore::RenderLayerBacking::reportMemoryUsage):
      * rendering/RenderLayerCompositor.cpp:
      (WebCore::RenderLayerCompositor::reportMemoryUsage):
      * rendering/RenderListMarker.cpp:
      (WebCore::RenderListMarker::reportMemoryUsage):
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::reportMemoryUsage):
      * rendering/RenderTableCol.cpp:
      (WebCore::RenderTableCol::reportMemoryUsage):
      * rendering/RenderTableRow.cpp:
      (WebCore::RenderTableRow::reportMemoryUsage):
      * rendering/RenderTableSection.cpp:
      (WebCore::RenderTableSection::reportMemoryUsage):
      (WebCore::RenderTableSection::RowStruct::reportMemoryUsage):
      (WebCore::RenderTableSection::CellStruct::reportMemoryUsage):
      * rendering/RenderText.cpp:
      (WebCore::RenderText::reportMemoryUsage):
      * rendering/RenderView.cpp:
      (WebCore::RenderView::reportMemoryUsage):
      * rendering/style/DataRef.h:
      (WebCore::DataRef::reportMemoryUsage):
      * rendering/style/RenderStyle.cpp:
      (WebCore::RenderStyle::reportMemoryUsage):
      * rendering/style/StyleRareInheritedData.cpp:
      (WebCore::StyleRareInheritedData::reportMemoryUsage):
      * rendering/style/StyleRareNonInheritedData.cpp:
      (WebCore::StyleRareNonInheritedData::reportMemoryUsage):
      * svg/SVGPaint.cpp:
      (WebCore::SVGPaint::reportDescendantMemoryUsage):
      * svg/graphics/SVGImage.cpp:
      (WebCore::SVGImage::reportMemoryUsage):
      * xml/XMLHttpRequest.cpp:
      (WebCore::XMLHttpRequest::reportMemoryUsage):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a7d09fcf
  19. 29 Jan, 2013 1 commit
    • japhet@chromium.org's avatar
      .: Enable reuse of cached main resources · 3e317182
      japhet@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105667
      
      Reviewed by Adam Barth.
      
      * Source/autotools/symbols.filter: Expose MemoryCache::resourceForURL().
      
      Source/WebCore: Enable reuse of cached main resources
      https://bugs.webkit.org/show_bug.cgi?id=105667
      
      Reviewed by Adam Barth.
      
      Test: http/tests/cache/cached-main-resource.html
      
      * WebCore.exp.in:
      * dom/Document.cpp:
      (WebCore::Document::hasManifest): Returns true if the <html> element has a non-empty manifest attribute.
      (WebCore):
      * dom/Document.h:
      (Document):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::loadedResourceFromMemoryCache): Don't send delegate callbacks for cache hit here, since
          MainResourceLoader will take care of it.
      * loader/MainResourceLoader.cpp:
      (WebCore::MainResourceLoader::MainResourceLoader):
      (WebCore::MainResourceLoader::receivedError):
      (WebCore::MainResourceLoader::willSendRequest):
      (WebCore::MainResourceLoader::responseReceived): Don't try to cache loads from the application cache.
      (WebCore::MainResourceLoader::didFinishLoading): Don't try to cache loads from the application cache.
      (WebCore::MainResourceLoader::load): Ensure we create a resource load identifier for cache hits. Also,
          ensure we correctly popualate fragment identifiers in the ResourceRequest reported to DocumentLoader.
      (WebCore::MainResourceLoader::identifier):
      * loader/MainResourceLoader.h: Rename m_substituteDataLoadIdentifier to m_identifierForLoadWithoutResourceLoader
          to better describe when it is used.
      * loader/cache/CachedRawResource.cpp:
      (WebCore::CachedRawResource::didAddClient): Synthesize redirect notifications for cache hits if necessary.
      (WebCore::CachedRawResource::willSendRequest): Note the redirects we received.
      (WebCore::CachedRawResource::canReuse): Don't reuse a resource if the redirect chain included a "Cache-control: no-store".
      * loader/cache/CachedRawResource.h:
      (CachedRawResource):
      (RedirectPair):
      (WebCore::CachedRawResource::RedirectPair::RedirectPair):
      * loader/cache/CachedResource.cpp:
      (WebCore::CachedResource::addClientToSet): Don't return cached data for a main resource synchronously
      * loader/cache/CachedResource.h:
      (WebCore::CachedResource::canReuse):
      (CachedResource):
      * loader/cache/CachedResourceLoader.cpp:
      (WebCore::CachedResourceLoader::requestResource): Leave cahce reuse of main resources off for chromium for now.
      (WebCore::CachedResourceLoader::determineRevalidationPolicy): Permit cache reuse for main resources.
      * testing/Internals.cpp:
      (WebCore::Internals::isPreloaded):
      (WebCore):
      (WebCore::Internals::isLoadingFromMemoryCache):
      * testing/Internals.h:
      (Internals):
      * testing/Internals.idl:
      
      Source/WebKit/win: Enable reuse of cached main resources
      https://bugs.webkit.org/show_bug.cgi?id=105667
      
      Reviewed by Adam Barth.
      
      * WebKit.vcproj/WebKitExports.def.in: Expose some MemoryCache symbols for use in Internals.
      
      LayoutTests: Enable reuse of cached main resources
      https://bugs.webkit.org/show_bug.cgi?id=105667.
      
      Reviewed by Adam Barth.
      
      * http/tests/cache/cached-main-resource-expected.txt: Added.
      * http/tests/cache/cached-main-resource.html: Added.
      * http/tests/cache/resources/cacheable-iframe.php: Added.
      * http/tests/inspector/resource-har-pages-expected.txt:
      * http/tests/loading/redirect-methods-expected.txt:
      * http/tests/misc/favicon-loads-with-images-disabled-expected.txt:
      * http/tests/misc/link-rel-icon-beforeload-expected.txt:
      * platform/chromium/TestExpectations:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141136 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3e317182
  20. 24 Jan, 2013 1 commit
    • haraken@chromium.org's avatar
      Regression(r107058): Use-after-free in SerializedScriptValue::deserialize · 162c7392
      haraken@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=107792
      
      Reviewed by Abhishek Arya.
      
      Source/WebCore:
      
      Imagine the following call path:
      
      (1) history.state is accessed.
      (2) V8History::stateAccessorGetter() calls History::state(), which calls
      HistoryItem::stateObject().
      (3) HistoryItem holds m_stateObject as RefPtr<SerializedScriptValue>,
      but HistoryItem::stateObject() returns SerializedScriptValue*.
      (4) V8History::stateAccessorGetter calls SerializedScriptValue::deserialize()
      for the SerializedScriptValue* obtained in (3).
      (5) SerializedScriptValue::deserialize() can call history.replaceState()
      in its deserialization process (See the test case in the Chromium bug).
      (6) history.replaceState() replaces HistoryItem::m_stateObject.
      This replacement destructs the original HistoryItem::m_stateObject.
      (7) The current deserialization process can crash due to the premature destruction.
      
      To avoid the problem, we have to pass PassRefPtr<SerializedScriptValue> around
      instead of SerializedScriptValue*.
      
      Test: fast/history/replacestate-nocrash.html
      
      * bindings/v8/custom/V8HistoryCustom.cpp:
      (WebCore::V8History::stateAccessorGetter):
      * history/HistoryItem.h:
      (WebCore):
      (WebCore::HistoryItem::stateObject):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::loadInSameDocument):
      * loader/FrameLoader.h:
      * page/History.cpp:
      (WebCore::History::state):
      (WebCore::History::stateInternal):
      * page/History.h:
      (History):
      
      LayoutTests:
      
      Added a test that demonstrated a crash due to use-after-free
      of SerializedScriptValue.
      
      Test: fast/history/replacestate-nocrash.html
      
      * fast/history/replacestate-nocrash-expected.txt: Added.
      * fast/history/replacestate-nocrash.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140748 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      162c7392
  21. 18 Jan, 2013 2 commits
    • beidson@apple.com's avatar
      Rework NetworkProcess resource load identifiers. · 4a2042ce
      beidson@apple.com authored
      <rdar://problem/12934449> and https://bugs.webkit.org/show_bug.cgi?id=107192
      
      Reviewed by Alexey Proskuryakov.
      
      Source/WebCore:
      
      No new tests (No effect in tested configs).
      
      * WebCore.exp.in:
      
      Include an identifier argument for synchronous loads:
      * loader/LoaderStrategy.cpp:
      (WebCore::LoaderStrategy::loadResourceSynchronously):
      * loader/LoaderStrategy.h:
      
      Pass along a unique identifier to the synchronous load:
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::loadResourceSynchronously):
      
      Remove the "setIdentifier" method:
      * loader/ResourceLoader.cpp:
      * loader/ResourceLoader.h:
      
      Source/WebKit2:
      
      Having the NetworkProcess vend out identifiers to WebProcesses was a bad idea.
      This patch reverts that so that WebProcesses are in control of their own unique identifiers.
      
      The NetworkProcess doesn't need identifiers at all.
      It can represent outstanding loads with the loaders themselves.
      
      This patch adds a "SchedulableLoader" base class for normal and synchronous loaders.
      It reworks each use of identifiers into using SchedulableLoaders instead.
      
      This also gave an opportunity to move the serving of pending requests for a host into the
      HostRecord itself which cleans certain things up nicely.
      
      Change HostRecord to have queues of SchedulableLoaders instead of identifiers.
      Make HostRecord responsible for actually starting the loaders in its queues:
      * NetworkProcess/HostRecord.cpp:
      (WebKit::HostRecord::~HostRecord):
      (WebKit::HostRecord::scheduleResourceLoader):
      (WebKit::HostRecord::addLoaderInProgress):
      (WebKit::HostRecord::removeLoader):
      (WebKit::HostRecord::hasRequests):
      (WebKit::HostRecord::servePendingRequestsForQueue):
      (WebKit::HostRecord::servePendingRequests):
      (WebKit::HostRecord::limitsRequests):
      * NetworkProcess/HostRecord.h:
      (WebKit::HostRecord::create): HostRecord is now also RefCounted. new and delete are so 2004.
      
      * NetworkProcess/NetworkConnectionToWebProcess.cpp:
      (WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad): Create the loader then schedule
        it with the scheduler, instead of having the scheduler create it.
      (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
      (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier):
      * NetworkProcess/NetworkConnectionToWebProcess.h:
      * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
      
      Remove maps and sets of identifiers, replacing them with sets of SchedulableLoaders where needed.
      Rely on HostRecords to actually manage sets of SchedulableLoaders.
      Rely on HostRecord to do the actual serving of its pending requests:
      * NetworkProcess/NetworkResourceLoadScheduler.cpp:
      (WebKit::NetworkResourceLoadScheduler::NetworkResourceLoadScheduler):
      (WebKit::NetworkResourceLoadScheduler::scheduleLoader):
      (WebKit::NetworkResourceLoadScheduler::hostForURL):
      (WebKit::NetworkResourceLoadScheduler::removeLoader):
      (WebKit::NetworkResourceLoadScheduler::receivedRedirect):
      (WebKit::NetworkResourceLoadScheduler::servePendingRequests):
      (WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders):
      (WebKit::NetworkResourceLoadScheduler::scheduleRemoveLoader):
      * NetworkProcess/NetworkResourceLoadScheduler.h:
      
      A new base class for all loaders that the scheduler and HostRecords might need to know about:
      * NetworkProcess/SchedulableLoader.cpp:
      (WebKit::SchedulableLoader::SchedulableLoader):
      (WebKit::SchedulableLoader::~SchedulableLoader):
      * NetworkProcess/SchedulableLoader.h:
      (WebKit::SchedulableLoader::loadParameters):
      (WebKit::SchedulableLoader::connectionToWebProcess):
      (WebKit::SchedulableLoader::isSynchronous):
      (WebKit::SchedulableLoader::setHostRecord):
      (WebKit::SchedulableLoader::hostRecord):
      
      Change to inherit from SchedulableLoader, removing some of the duplicated data and methods:
      * NetworkProcess/NetworkResourceLoader.cpp:
      (WebKit::NetworkResourceLoader::NetworkResourceLoader):
      (WebKit::NetworkResourceLoader::connection):
      (WebKit::NetworkResourceLoader::destinationID):
      (WebKit::NetworkResourceLoader::start):
      (WebKit::NetworkResourceLoader::stop):
      (WebKit::NetworkResourceLoader::didReceiveResponse):
      (WebKit::NetworkResourceLoader::didFail):
      (WebKit::NetworkResourceLoader::willSendRequest):
      (WebKit::NetworkResourceLoader::shouldUseCredentialStorage):
      * NetworkProcess/NetworkResourceLoader.h:
      (WebKit::NetworkResourceLoader::create):
      
      Change to inherit from SchedulableLoader, removing some of the duplicated data and methods:
      * NetworkProcess/SyncNetworkResourceLoader.cpp:
      (WebKit::SyncNetworkResourceLoader::SyncNetworkResourceLoader):
      (WebKit::SyncNetworkResourceLoader::start):
      * NetworkProcess/SyncNetworkResourceLoader.h:
      (WebKit::SyncNetworkResourceLoader::create):
      (WebKit::SyncNetworkResourceLoader::isSynchronous):
      
      Fold the WebProcess resource load identifier in with the load parameters:
      * Shared/Network/NetworkResourceLoadParameters.cpp:
      (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
      (WebKit::NetworkResourceLoadParameters::encode):
      (WebKit::NetworkResourceLoadParameters::decode):
      * Shared/Network/NetworkResourceLoadParameters.h:
      (WebKit::NetworkResourceLoadParameters::identifier):
      
      The identifier is preset in the WebProcess and doesn't come from the NetworkProcess,
      so the message to schedule a load can now be asynchronous:
      * WebProcess/Network/WebResourceLoadScheduler.cpp:
      (WebKit::WebResourceLoadScheduler::scheduleLoad):
      
      Update to include a WebProcess generated identifier along with synchronous loads:
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::loadResourceSynchronously):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      
      * WebKit2.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140218 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4a2042ce
    • dominicc@chromium.org's avatar
      Unreviewed, rolling out r140005. · 7a319e5a
      dominicc@chromium.org authored
      http://trac.webkit.org/changeset/140005
      https://bugs.webkit.org/show_bug.cgi?id=107235
      
      broke downstream Chromium interactive_ui_tests (Requested by
      dominicc on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-01-18
      
      .:
      
      * Source/autotools/symbols.filter:
      
      Source/WebCore:
      
      * WebCore.exp.in:
      * dom/Document.cpp:
      * dom/Document.h:
      (WebCore::Document::documentElement):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::loadedResourceFromMemoryCache):
      * loader/MainResourceLoader.cpp:
      (WebCore::MainResourceLoader::MainResourceLoader):
      (WebCore::MainResourceLoader::receivedError):
      (WebCore::MainResourceLoader::willSendRequest):
      (WebCore::MainResourceLoader::responseReceived):
      (WebCore::MainResourceLoader::didFinishLoading):
      (WebCore::MainResourceLoader::load):
      (WebCore::MainResourceLoader::identifier):
      * loader/MainResourceLoader.h:
      (MainResourceLoader):
      * loader/cache/CachedRawResource.cpp:
      (WebCore::CachedRawResource::didAddClient):
      (WebCore::CachedRawResource::willSendRequest):
      (WebCore::CachedRawResource::canReuse):
      * loader/cache/CachedRawResource.h:
      (CachedRawResource):
      * loader/cache/CachedResource.cpp:
      (WebCore::CachedResource::addClientToSet):
      * loader/cache/CachedResource.h:
      (CachedResource):
      * loader/cache/CachedResourceLoader.cpp:
      (WebCore::CachedResourceLoader::determineRevalidationPolicy):
      * testing/Internals.cpp:
      * testing/Internals.h:
      (Internals):
      * testing/Internals.idl:
      
      Source/WebKit/win:
      
      * WebKit.vcproj/WebKitExports.def.in:
      
      LayoutTests:
      
      * http/tests/cache/cached-main-resource-expected.txt: Removed.
      * http/tests/cache/cached-main-resource.html: Removed.
      * http/tests/cache/resources/cacheable-iframe.php: Removed.
      * http/tests/inspector/resource-har-pages-expected.txt:
      * http/tests/loading/redirect-methods-expected.txt:
      * http/tests/misc/favicon-loads-with-images-disabled-expected.txt:
      * http/tests/misc/link-rel-icon-beforeload-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7a319e5a
  22. 17 Jan, 2013 1 commit
    • japhet@chromium.org's avatar
      .: Enable reuse of cached main resources · 88239e33
      japhet@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105667
      
      Reviewed by Antti Koivisto.
      
      * Source/autotools/symbols.filter: Expose MemoryCache::resourceForURL().
      
      Source/WebCore: Enable reuse of cached main resources
      https://bugs.webkit.org/show_bug.cgi?id=105667
      
      Reviewed by Antti Koivisto.
      
      Test: http/tests/cache/cached-main-resource.html
      
      * WebCore.exp.in:
      * dom/Document.cpp:
      (WebCore::Document::hasManifest): Returns true if the <html> element has a non-empty manifest attribute.
      * dom/Document.h:
      (Document):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::loadedResourceFromMemoryCache): Don't send delegate callbacks for cache hit here, since
          MainResourceLoader will take care of it.
      * loader/MainResourceLoader.cpp:
      (WebCore::MainResourceLoader::MainResourceLoader):
      (WebCore::MainResourceLoader::receivedError):
      (WebCore::MainResourceLoader::willSendRequest):
      (WebCore::MainResourceLoader::responseReceived): Don't try to cache loads from the application cache.
      (WebCore::MainResourceLoader::didFinishLoading): Don't try to cache loads from the application cache.
      (WebCore::MainResourceLoader::load): Ensure we create a resource load identifier for cache hits. Also,
          ensure we correctly popualate fragment identifiers in the ResourceRequest reported to DocumentLoader.
      (WebCore::MainResourceLoader::identifier):
      * loader/MainResourceLoader.h: Rename m_substituteDataLoadIdentifier to m_identifierForLoadWithoutResourceLoader
          to better describe when it is used.
      * loader/cache/CachedRawResource.cpp:
      (WebCore::CachedRawResource::didAddClient): Synthesize redirect notifications for cache hits if necessary.
      (WebCore::CachedRawResource::willSendRequest): Note the redirects we received.
      (WebCore::CachedRawResource::canReuse): Don't reuse a resource if the redirect chain included a "Cache-control: no-store".
      * loader/cache/CachedRawResource.h:
      (CachedRawResource):
      (RedirectPair):
      (WebCore::CachedRawResource::RedirectPair::RedirectPair):
      * loader/cache/CachedResource.cpp:
      (WebCore::CachedResource::addClientToSet):: Don't return cached data for a main resource synchronously
      * loader/cache/CachedResource.h:
      (WebCore::CachedResource::canReuse):
      (CachedResource):
      * loader/cache/CachedResourceLoader.cpp:
      (WebCore::CachedResourceLoader::determineRevalidationPolicy): Permit cache reuse for main resources.
      * testing/Internals.cpp:
      (WebCore::Internals::isLoadingFromMemoryCache):
      (WebCore):
      * testing/Internals.h:
      (Internals):
      * testing/Internals.idl:
      
      Source/WebKit/win: Enable reuse of cached main resources
      https://bugs.webkit.org/show_bug.cgi?id=105667
      
      Reviewed by Antti Koivisto.
      
      * WebKit.vcproj/WebKitExports.def.in: Expose some MemoryCache symbols for use in Internals.
      
      LayoutTests: Enable reuse of cached main resources
      https://bugs.webkit.org/show_bug.cgi?id=105667.
      
      Reviewed by Antti Koivisto.
      
      * http/tests/cache/cached-main-resource-expected.txt: Added.
      * http/tests/cache/cached-main-resource.html: Added.
      * http/tests/cache/resources/cacheable-iframe.php: Added.
      * http/tests/inspector/resource-har-pages-expected.txt:
      * http/tests/loading/redirect-methods-expected.txt:
      * http/tests/misc/favicon-loads-with-images-disabled-expected.txt:
      * http/tests/misc/link-rel-icon-beforeload-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140005 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      88239e33
  23. 16 Jan, 2013 1 commit
    • beidson@apple.com's avatar
      Synchronous XMLHTTPRequests need to go to the NetworkProcess. · 0c140b4e
      beidson@apple.com authored
      <rdar://problem/12951765> and https://bugs.webkit.org/show_bug.cgi?id=106826
      
      Reviewed by Sam Weinig and Alexey Proskuryakov.
      
      Source/WebCore:
      
      No new tests (No changes to any config that is currently tested)
      
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::loadResourceSynchronously): Consult the LoaderStrategy when strategies are
        being used.
      
      * loader/LoaderStrategy.cpp:
      (WebCore::LoaderStrategy::loadResourceSynchronously): Defaults to using ResourceHandle directly.
      * loader/LoaderStrategy.h:
      
      Break out the StoredCredentials enum to a new header:
      * platform/network/ResourceHandle.h:
      * platform/network/ResourceHandleTypes.h:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.exp.in:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      
      Source/WebKit2:
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::loadResourceSynchronously): Entry point for WebCore to get
        synchronous requests to the NetworkProcess.
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      
      * NetworkProcess/NetworkConnectionToWebProcess.cpp:
      (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad): Create a SyncNetworkResourceLoader
        and schedule it.
      * NetworkProcess/NetworkConnectionToWebProcess.h:
      * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
      
      * NetworkProcess/NetworkResourceLoadScheduler.cpp:
      (WebKit::NetworkResourceLoadScheduler::scheduleSyncNetworkResourceLoader):
      (WebKit::NetworkResourceLoadScheduler::servePendingRequestsForHost): Serve synchronous loaders
        before async loaders.
      * NetworkProcess/NetworkResourceLoadScheduler.h:
      
      A class that encapsulates a synchronous load request and the CoreIPC reply to be made once it is complete:
      * NetworkProcess/SyncNetworkResourceLoader.cpp: Added.
      (WebKit::SyncNetworkResourceLoader::SyncNetworkResourceLoader):
      (WebKit::SyncNetworkResourceLoader::start):
      * NetworkProcess/SyncNetworkResourceLoader.h: Copied from Source/WebKit2/NetworkProcess/HostRecord.h.
      (WebKit::SyncNetworkResourceLoader::create):
      (WebKit::SyncNetworkResourceLoader::setIdentifier):
      (WebKit::SyncNetworkResourceLoader::identifier):
      (WebKit::SyncNetworkResourceLoader::loadParameters):
      
      Add a second queue of sync loaders:
      * NetworkProcess/HostRecord.h:
      (WebKit::HostRecord::syncLoadersPending):
      
      Add comments to explicitly spell out the current reliance on some messages that are currently synchronous:
      * NetworkProcess/NetworkResourceLoader.cpp:
      (WebKit::NetworkResourceLoader::willSendRequest):
      (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpace):
      
      * WebKit2.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0c140b4e
  24. 14 Jan, 2013 3 commits
    • leviw@chromium.org's avatar
      Source/WebCore: Rolling out r139683. It broke a bunch of webkit_unit_tests. · db5f5c2b
      leviw@chromium.org authored
      Source/WebKit/win: Rolling out r139683. It broke a bunch of webkit_unit_tests. 
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      db5f5c2b
    • japhet@chromium.org's avatar
      .: Enable reuse of cached main resources · c4b1de86
      japhet@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105667
      
      Reviewed by Antti Koivisto.
      
      * Source/autotools/symbols.filter: Expose MemoryCache::resourceForURL().
      
      Source/WebCore: Enable reuse of cached main resources
      https://bugs.webkit.org/show_bug.cgi?id=105667
      
      Reviewed by Antti Koivisto.
      
      Test: http/tests/cache/cached-main-resource.html
      
      * WebCore.exp.in:
      * dom/Document.cpp:
      (WebCore::Document::hasManifest): Returns true if the <html> element has a non-empty manifest attribute.
      * dom/Document.h:
      (Document):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::loadedResourceFromMemoryCache): Don't send delegate callbacks for cache hit here, since
          MainResourceLoader will take care of it.
      * loader/MainResourceLoader.cpp:
      (WebCore::MainResourceLoader::MainResourceLoader):
      (WebCore::MainResourceLoader::receivedError):
      (WebCore::MainResourceLoader::willSendRequest):
      (WebCore::MainResourceLoader::responseReceived): Don't try to cache loads from the application cache.
      (WebCore::MainResourceLoader::didFinishLoading): Don't try to cache loads from the application cache.
      (WebCore::MainResourceLoader::load): Ensure we create a resource load identifier for cache hits. Also,
          ensure we correctly popualate fragment identifiers in the ResourceRequest reported to DocumentLoader.
      (WebCore::MainResourceLoader::identifier):
      * loader/MainResourceLoader.h: Rename m_substituteDataLoadIdentifier to m_identifierForLoadWithoutResourceLoader
          to better describe when it is used.
      * loader/cache/CachedRawResource.cpp:
      (WebCore::CachedRawResource::didAddClient): Synthesize redirect notifications for cache hits if necessary.
      (WebCore::CachedRawResource::willSendRequest): Note the redirects we received.
      (WebCore::CachedRawResource::canReuse): Don't reuse a resource if the redirect chain included a "Cache-control: no-store".
      * loader/cache/CachedRawResource.h:
      (CachedRawResource):
      (RedirectPair):
      (WebCore::CachedRawResource::RedirectPair::RedirectPair):
      * loader/cache/CachedResource.cpp:
      (WebCore::CachedResource::addClientToSet):: Don't return cached data for a main resource synchronously
      * loader/cache/CachedResource.h:
      (WebCore::CachedResource::canReuse):
      (CachedResource):
      * loader/cache/CachedResourceLoader.cpp:
      (WebCore::CachedResourceLoader::determineRevalidationPolicy): Permit cache reuse for main resources.
      * testing/Internals.cpp:
      (WebCore::Internals::isLoadingFromMemoryCache):
      (WebCore):
      * testing/Internals.h:
      (Internals):
      * testing/Internals.idl:
      
      Source/WebKit/win: Enable reuse of cached main resources
      https://bugs.webkit.org/show_bug.cgi?id=105667
      
      Reviewed by Antti Koivisto.
      
      * WebKit.vcproj/WebKitExports.def.in: Expose some MemoryCache symbols for use in Internals.
      
      LayoutTests: Enable reuse of cached main resources
      https://bugs.webkit.org/show_bug.cgi?id=105667.
      
      Reviewed by Antti Koivisto.
      
      * http/tests/cache/cached-main-resource-expected.txt: Added.
      * http/tests/cache/cached-main-resource.html: Added.
      * http/tests/cache/resources/cacheable-iframe.php: Added.
      * http/tests/inspector/resource-har-pages-expected.txt:
      * http/tests/loading/redirect-methods-expected.txt:
      * http/tests/misc/favicon-loads-with-images-disabled-expected.txt:
      * http/tests/misc/link-rel-icon-beforeload-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139683 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c4b1de86
    • loislo@chromium.org's avatar
      Web Inspector: Native Memory Instrumentation: fix instrumentation for already... · 771ab1fe
      loislo@chromium.org authored
      Web Inspector: Native Memory Instrumentation: fix instrumentation for already instrumented classes 2/N
      https://bugs.webkit.org/show_bug.cgi?id=106546
      
      Reviewed by Vsevolod Vlasov.
      
      Many nontrivial class members were added into reportMemoryUsage methods.
      
      * bindings/v8/V8PerIsolateData.cpp:
      (WebCore::V8PerIsolateData::reportMemoryUsage):
      * css/CSSMediaRule.cpp:
      (WebCore::CSSMediaRule::reportMemoryUsage):
      * css/CSSProperty.cpp:
      (WebCore::CSSProperty::reportMemoryUsage):
      * css/CSSStyleSheet.cpp:
      (WebCore::CSSStyleSheet::reportMemoryUsage):
      * css/MediaList.cpp:
      (WebCore::MediaList::reportMemoryUsage):
      * css/RuleSet.cpp:
      (WebCore::RuleData::reportMemoryUsage):
      (WebCore::RuleSet::reportMemoryUsage):
      (WebCore::RuleSet::RuleSetSelectorPair::reportMemoryUsage):
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::MatchedPropertiesCacheItem::reportMemoryUsage):
      (WebCore::StyleResolver::reportMemoryUsage):
      * css/StyleSheetContents.cpp:
      (WebCore::StyleSheetContents::reportMemoryUsage):
      * dom/TreeScope.cpp:
      (WebCore::TreeScope::reportMemoryUsage):
      * inspector/HeapGraphSerializer.cpp:
      (WebCore::HeapGraphSerializer::reportMemoryUsage):
      * inspector/InspectorMemoryAgent.cpp:
      * inspector/InspectorProfilerAgent.cpp:
      (WebCore::InspectorProfilerAgent::reportMemoryUsage):
      * inspector/MemoryInstrumentationImpl.cpp:
      (WebCore::MemoryInstrumentationClientImpl::reportMemoryUsage):
      * loader/DocumentLoader.cpp:
      (WebCore::DocumentLoader::reportMemoryUsage):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::reportMemoryUsage):
      * loader/MainResourceLoader.cpp:
      (WebCore::MainResourceLoader::reportMemoryUsage):
      * loader/Prerenderer.cpp:
      (WebCore::Prerenderer::reportMemoryUsage):
      * loader/ResourceLoader.cpp:
      (WebCore::ResourceLoader::reportMemoryUsage):
      * loader/cache/CachedImage.cpp:
      (WebCore::CachedImage::reportMemoryUsage):
      * page/Page.cpp:
      (WebCore::Page::reportMemoryUsage):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139589 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      771ab1fe
  25. 10 Jan, 2013 2 commits
    • loislo@chromium.org's avatar
      Unreviewed, rolling out r139306. · 7696fea4
      loislo@chromium.org authored
      http://trac.webkit.org/changeset/139306
      https://bugs.webkit.org/show_bug.cgi?id=106550
      
      it broke inspector-protocol/nmi-webaudio-leak-test.html
      (Requested by loislo on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-01-10
      
      * bindings/v8/V8PerIsolateData.cpp:
      (WebCore::V8PerIsolateData::reportMemoryUsage):
      * css/CSSMediaRule.cpp:
      (WebCore::CSSMediaRule::reportMemoryUsage):
      * css/CSSProperty.cpp:
      (WebCore::CSSProperty::reportMemoryUsage):
      * css/CSSStyleSheet.cpp:
      (WebCore::CSSStyleSheet::reportMemoryUsage):
      * css/MediaList.cpp:
      (WebCore::MediaList::reportMemoryUsage):
      * css/RuleSet.cpp:
      (WebCore::RuleData::reportMemoryUsage):
      (WebCore::RuleSet::reportMemoryUsage):
      (WebCore::RuleSet::RuleSetSelectorPair::reportMemoryUsage):
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::MatchedPropertiesCacheItem::reportMemoryUsage):
      (WebCore::StyleResolver::reportMemoryUsage):
      * css/StyleSheetContents.cpp:
      (WebCore::StyleSheetContents::reportMemoryUsage):
      * dom/TreeScope.cpp:
      (WebCore::TreeScope::reportMemoryUsage):
      * inspector/HeapGraphSerializer.cpp:
      (WebCore::HeapGraphSerializer::reportMemoryUsage):
      * inspector/InspectorMemoryAgent.cpp:
      * inspector/InspectorProfilerAgent.cpp:
      (WebCore::InspectorProfilerAgent::reportMemoryUsage):
      * inspector/MemoryInstrumentationImpl.cpp:
      (WebCore::MemoryInstrumentationClientImpl::reportMemoryUsage):
      * loader/DocumentLoader.cpp:
      (WebCore::DocumentLoader::reportMemoryUsage):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::reportMemoryUsage):
      * loader/MainResourceLoader.cpp:
      (WebCore::MainResourceLoader::reportMemoryUsage):
      * loader/Prerenderer.cpp:
      (WebCore::Prerenderer::reportMemoryUsage):
      * loader/ResourceLoader.cpp:
      (WebCore::ResourceLoader::reportMemoryUsage):
      * loader/cache/CachedImage.cpp:
      (WebCore::CachedImage::reportMemoryUsage):
      * page/Page.cpp:
      (WebCore::Page::reportMemoryUsage):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139310 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7696fea4
    • loislo@chromium.org's avatar
      Web Inspector: Native Memory Instrumentation: fix instrumentation for already... · ba8b9bed
      loislo@chromium.org authored
      Web Inspector: Native Memory Instrumentation: fix instrumentation for already instrumented classes 2/N
      https://bugs.webkit.org/show_bug.cgi?id=106546
      
      Reviewed by Vsevolod Vlasov.
      
      Many nontrivial class members were instrumented in reportMemoryUsage methods.
      
      * bindings/v8/V8PerIsolateData.cpp:
      (WebCore::V8PerIsolateData::reportMemoryUsage):
      * css/CSSMediaRule.cpp:
      (WebCore::CSSMediaRule::reportMemoryUsage):
      * css/CSSProperty.cpp:
      (WebCore::CSSProperty::reportMemoryUsage):
      * css/CSSStyleSheet.cpp:
      (WebCore::CSSStyleSheet::reportMemoryUsage):
      * css/MediaList.cpp:
      (WebCore::MediaList::reportMemoryUsage):
      * css/RuleSet.cpp:
      (WebCore::RuleData::reportMemoryUsage):
      (WebCore::RuleSet::reportMemoryUsage):
      (WebCore::RuleSet::RuleSetSelectorPair::reportMemoryUsage):
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::MatchedPropertiesCacheItem::reportMemoryUsage):
      (WebCore::StyleResolver::reportMemoryUsage):
      * css/StyleSheetContents.cpp:
      (WebCore::StyleSheetContents::reportMemoryUsage):
      * dom/TreeScope.cpp:
      (WebCore::TreeScope::reportMemoryUsage):
      * inspector/HeapGraphSerializer.cpp:
      (WebCore::HeapGraphSerializer::reportMemoryUsage):
      * inspector/InspectorMemoryAgent.cpp:
      * inspector/InspectorProfilerAgent.cpp:
      (WebCore::InspectorProfilerAgent::reportMemoryUsage):
      * inspector/MemoryInstrumentationImpl.cpp:
      (WebCore::MemoryInstrumentationClientImpl::reportMemoryUsage):
      * loader/DocumentLoader.cpp:
      (WebCore::DocumentLoader::reportMemoryUsage):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::reportMemoryUsage):
      * loader/MainResourceLoader.cpp:
      (WebCore::MainResourceLoader::reportMemoryUsage):
      * loader/Prerenderer.cpp:
      (WebCore::Prerenderer::reportMemoryUsage):
      * loader/ResourceLoader.cpp:
      (WebCore::ResourceLoader::reportMemoryUsage):
      * loader/cache/CachedImage.cpp:
      (WebCore::CachedImage::reportMemoryUsage):
      * page/Page.cpp:
      (WebCore::Page::reportMemoryUsage):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139306 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ba8b9bed
  26. 07 Jan, 2013 1 commit
    • ap@apple.com's avatar
      ResourceHandle::willLoadFromCache is evil · 8d5f01bd
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=106147
      
              Reviewed by Brady Eidson.
      
              For back/forward navigations to a page that's a result of form submission, we may
              never silently re-submit the form. So, we show a warning dialog when about to re-submit,
              but try to load from cache if possible.
      
              This patch changes the logic so that we always try to fetch from cache, without
              any preflighting. If cache load fails, we restart the load as a known re-submit.
      
              No behavior change expected, so no tests.
      
              * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::handleClick):
              Added a FIXME.
      
              * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::startLoadingMainResource):
              Amended a FIXME with some information about why this call may still be needed.
      
              * loader/FrameLoader.h:
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::loadURLIntoChildFrame): Pass an explicit argument for unchanged caching behavior.
              (WebCore::FrameLoader::reloadWithOverrideEncoding): Added a FIXME. This function
              can silently re-submit a form.
              (WebCore::FrameLoader::addExtraFieldsToMainResourceRequest): Added a FIXME about
              an incorrect use of current load type.
              (WebCore::FrameLoader::addExtraFieldsToRequest): Make sure that a correct caching
              policy is used for subresources even if main resource was loaded from cache. We
              didn't need that before because initial request had wrong extra fields due to a use
              of m_loadType when it was first called.
              Removed code to change caching policy for b/f navigations. This function does not
              have enough context to decide what the policy should be.
              (WebCore::FrameLoader::loadDifferentDocumentItem): Added an argument telling the
              function whether it should attempt loading from cache. It should do that on first
              attempt to navigate to a form submission result, but not if that failed.
              Pass a correct loadType - m_loadType is one for _previous_ load.
              Removed a special case for https - we've long stopped prohibiting caching of https
              resources, and using a resource that's already cached should definitely be allowed.
              (WebCore::FrameLoader::loadItem): Pass an explicit argument for unchanged caching behavior.
              (WebCore::FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad): Added.
      
              * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::notifyFinished):
              Removed a check for m_resource being null, because we were immediately dereferencing
              it anyway.
              Call retryAfterFailedCacheOnlyMainResourceLoad() to let FrameLoader restart the navigation.
      
              * platform/network/ResourceHandle.h:
              * platform/network/blackberry/ResourceHandleBlackBerry.cpp:
              * platform/network/cf/ResourceHandleCFNet.cpp:
              * platform/network/chromium/ResourceHandle.cpp:
              * platform/network/curl/ResourceHandleCurl.cpp:
              * platform/network/mac/ResourceHandleMac.mm:
              * platform/network/qt/ResourceHandleQt.cpp:
              * platform/network/soup/ResourceHandleSoup.cpp:
              * platform/network/win/ResourceHandleWin.cpp:
              Removed willLoadFromCache() - the new logic is cross-platform.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138962 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8d5f01bd
  27. 13 Dec, 2012 1 commit
    • jonlee@apple.com's avatar
      Crash in PlugInOriginHash with empty MIME type (104882) · e5663dfa
      jonlee@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=104882
      <rdar://problem/12872298>
      
      Reviewed by Filip Pizlo.
      
      The crash occurs because the strings might be null. Add a check for it, but also try to infer a MIME type
      in case the markup does not include a type attribute, but we can find it from the extension in the URL.
      
      * platform/KURL.cpp: Add a new function mimeTypeFromURL() which tries to return the implied MIME type
      based on the URL provided. If nothing was found, return a null string.
      (WebCore::mimeTypeFromURL): Factored out from FrameLoader::defaultObjectContentType().
      * platform/KURL.h:
      
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::defaultObjectContentType): Refactor to use mimeTypeFromURL().
      * plugins/PlugInOriginHash.cpp:
      (WebCore::addCaseFoldedCharacters): Add a check for an empty string.
      (WebCore::PlugInOriginHash::hash): If the service type is empty, try to infer the MIME type.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137573 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e5663dfa