Unreviewed, rolling out r167298.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Apr 2014 07:32:10 +0000 (07:32 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Apr 2014 07:32:10 +0000 (07:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=131670

Broke CSS filters (17 test crashes) (Requested by ap on
#webkit).

Reverted changeset:

"[iOS WK2] Pages often blank on first load if page loaded by
typing the URL"
https://bugs.webkit.org/show_bug.cgi?id=131665
http://trac.webkit.org/changeset/167298

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167303 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/page/ChromeClient.h
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/RenderLayerCompositor.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm
Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm

index 4a35f2d..915e0e5 100644 (file)
@@ -1,3 +1,18 @@
+2014-04-15  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r167298.
+        https://bugs.webkit.org/show_bug.cgi?id=131670
+
+        Broke CSS filters (17 test crashes) (Requested by ap on
+        #webkit).
+
+        Reverted changeset:
+
+        "[iOS WK2] Pages often blank on first load if page loaded by
+        typing the URL"
+        https://bugs.webkit.org/show_bug.cgi?id=131665
+        http://trac.webkit.org/changeset/167298
+
 2014-04-14  Pratik Solanki  <psolanki@apple.com>
 
         Unreviewed. Attempt to fix Windows build after r167277.
index 4feebca..3d68ea4 100644 (file)
@@ -871,6 +871,7 @@ __ZN7WebCore21NetworkStorageSession25switchToNewTestingSessionEv
 __ZN7WebCore21NetworkStorageSession28createPrivateBrowsingSessionERKN3WTF6StringE
 __ZN7WebCore21PlatformKeyboardEvent24disambiguateKeyDownEventENS_13PlatformEvent4TypeEb
 __ZN7WebCore21RemoteCommandListener6createERNS_27RemoteCommandListenerClientE
+__ZN7WebCore21RenderLayerCompositor27setDocumentOverlayRootLayerEPNS_13GraphicsLayerE
 __ZN7WebCore21ResourceLoadScheduler20servePendingRequestsENS_20ResourceLoadPriorityE
 __ZN7WebCore21ResourceLoadScheduler20servePendingRequestsEPNS0_15HostInformationENS_20ResourceLoadPriorityE
 __ZN7WebCore21ResourceLoadScheduler21resumePendingRequestsEv
index 290e810..67b5954 100644 (file)
@@ -290,8 +290,6 @@ public:
     // Returns whether or not the client can render the composited layer,
     // regardless of the settings.
     virtual bool allowsAcceleratedCompositing() const { return true; }
-    // Supply a layer that will added as an overlay over other document layers (scrolling with the document).
-    virtual GraphicsLayer* documentOverlayLayerForFrame(Frame&) { return nullptr; }
 
     enum CompositingTrigger {
         ThreeDTransformTrigger = 1 << 0,
index 5141a7f..dffeba3 100644 (file)
@@ -255,6 +255,7 @@ RenderLayerCompositor::RenderLayerCompositor(RenderView& renderView)
     , m_isTrackingRepaints(false)
     , m_layersWithTiledBackingCount(0)
     , m_rootLayerAttachment(RootLayerUnattached)
+    , m_documentOverlayRootLayer(nullptr)
     , m_layerFlushTimer(this, &RenderLayerCompositor::layerFlushTimerFired)
     , m_layerFlushThrottlingEnabled(page() && page()->progress().isMainLoadProgressing())
     , m_layerFlushThrottlingTemporarilyDisabledForInteraction(false)
@@ -429,8 +430,7 @@ void RenderLayerCompositor::flushPendingLayerChanges(bool isFlushRoot)
 #if PLATFORM(IOS)
         double horizontalMargin = defaultTileWidth / pageScaleFactor();
         double verticalMargin = defaultTileHeight / pageScaleFactor();
-        FloatRect visibleRect = frameView.computeCoverageRect(horizontalMargin, verticalMargin);
-        rootLayer->flushCompositingState(visibleRect);
+        rootLayer->flushCompositingState(frameView.computeCoverageRect(horizontalMargin, verticalMargin));
 #else
         // Having a m_clipLayer indicates that we're doing scrolling via GraphicsLayers.
         IntRect visibleRect = m_clipLayer ? IntRect(IntPoint(), frameView.contentsSize()) : frameView.visibleContentRect();
@@ -597,8 +597,6 @@ bool RenderLayerCompositor::hasAnyAdditionalCompositedLayers(const RenderLayer&
 void RenderLayerCompositor::updateCompositingLayers(CompositingUpdateType updateType, RenderLayer* updateRoot)
 {
     m_updateCompositingLayersTimer.stop();
-
-    ASSERT(!m_renderView.document().inPageCache());
     
     // Compositing layers will be updated in Document::implicitClose() if suppressed here.
     if (!m_renderView.document().visualUpdatesAllowed())
@@ -691,7 +689,6 @@ void RenderLayerCompositor::updateCompositingLayers(CompositingUpdateType update
 
         // Host the document layer in the RenderView's root layer.
         if (isFullUpdate) {
-            appendOverlayLayers(childList);
             // Even when childList is empty, don't drop out of compositing mode if there are
             // composited layers that we didn't hit in our traversal (e.g. because of visibility:hidden).
             if (childList.isEmpty() && !hasAnyAdditionalCompositedLayers(*updateRoot))
@@ -724,17 +721,6 @@ void RenderLayerCompositor::updateCompositingLayers(CompositingUpdateType update
     InspectorInstrumentation::layerTreeDidChange(page());
 }
 
-void RenderLayerCompositor::appendOverlayLayers(Vector<GraphicsLayer*>& childList)
-{
-    Frame& frame = m_renderView.frameView().frame();
-    Page* page = frame.page();
-    if (!page)
-        return;
-
-    if (GraphicsLayer* overlayLayer = page->chrome().client().documentOverlayLayerForFrame(frame))
-        childList.append(overlayLayer);
-}
-
 void RenderLayerCompositor::layerBecameNonComposited(const RenderLayer& layer)
 {
     // Inform the inspector that the given RenderLayer was destroyed.
@@ -1475,6 +1461,9 @@ void RenderLayerCompositor::rebuildCompositingLayerTree(RenderLayer& layer, Vect
 
         childLayersOfEnclosingLayer.append(layerBacking->childForSuperlayers());
     }
+
+    if (m_documentOverlayRootLayer)
+        childLayersOfEnclosingLayer.append(m_documentOverlayRootLayer);
 }
 
 void RenderLayerCompositor::rebuildRegionCompositingLayerTree(RenderNamedFlowFragment* region, Vector<GraphicsLayer*>& childList, int depth)
@@ -3830,4 +3819,13 @@ void RenderLayerCompositor::paintRelatedMilestonesTimerFired(Timer<RenderLayerCo
     m_renderView.frameView().firePaintRelatedMilestonesIfNeeded();
 }
 
+void RenderLayerCompositor::setDocumentOverlayRootLayer(GraphicsLayer* documentOverlayRootLayer)
+{
+    if (m_documentOverlayRootLayer)
+        m_documentOverlayRootLayer->removeFromParent();
+    m_documentOverlayRootLayer = documentOverlayRootLayer;
+    setCompositingLayersNeedRebuild(true);
+    scheduleCompositingLayerUpdate();
+}
+
 } // namespace WebCore
index e32d109..208206a 100644 (file)
@@ -304,6 +304,8 @@ public:
     void setRootExtendedBackgroundColor(const Color&);
     Color rootExtendedBackgroundColor() const { return m_rootExtendedBackgroundColor; }
 
+    void setDocumentOverlayRootLayer(GraphicsLayer*);
+
 private:
     class OverlapMap;
 
@@ -364,7 +366,6 @@ private:
     bool layerHas3DContent(const RenderLayer&) const;
     bool isRunningAcceleratedTransformAnimation(RenderLayerModelObject&) const;
 
-    void appendOverlayLayers(Vector<GraphicsLayer*>&);
     bool hasAnyAdditionalCompositedLayers(const RenderLayer& rootLayer) const;
 
     void ensureRootLayer();
@@ -507,6 +508,8 @@ private:
     std::unique_ptr<GraphicsLayer> m_layerForFooter;
 #endif
 
+    GraphicsLayer* m_documentOverlayRootLayer;
+
     std::unique_ptr<GraphicsLayerUpdater> m_layerUpdater; // Updates tiled layer visible area periodically while animations are running.
 
     Timer<RenderLayerCompositor> m_layerFlushTimer;
index e1b81c5..26f2cd0 100644 (file)
@@ -1,3 +1,18 @@
+2014-04-15  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r167298.
+        https://bugs.webkit.org/show_bug.cgi?id=131670
+
+        Broke CSS filters (17 test crashes) (Requested by ap on
+        #webkit).
+
+        Reverted changeset:
+
+        "[iOS WK2] Pages often blank on first load if page loaded by
+        typing the URL"
+        https://bugs.webkit.org/show_bug.cgi?id=131665
+        http://trac.webkit.org/changeset/167298
+
 2014-04-14  Simon Fraser  <simon.fraser@apple.com>
 
         [iOS WK2] Pages often blank on first load if page loaded by typing the URL
index daf418f..f8c2d95 100644 (file)
@@ -771,14 +771,6 @@ void WebChromeClient::attachRootGraphicsLayer(Frame*, GraphicsLayer* layer)
         m_page->exitAcceleratedCompositingMode();
 }
 
-GraphicsLayer* WebChromeClient::documentOverlayLayerForFrame(Frame& frame)
-{
-    if (&frame == &m_page->corePage()->mainFrame())
-        return m_page->pageOverlayController().documentOverlayRootLayer();
-
-    return nullptr;
-}
-
 void WebChromeClient::setNeedsOneShotDrawingSynchronization()
 {
     notImplemented();
index e72d129..0099652 100644 (file)
@@ -202,7 +202,6 @@ private:
     virtual void attachRootGraphicsLayer(WebCore::Frame*, WebCore::GraphicsLayer*) override;
     virtual void setNeedsOneShotDrawingSynchronization() override;
     virtual void scheduleCompositingLayerFlush() override;
-    virtual WebCore::GraphicsLayer* documentOverlayLayerForFrame(WebCore::Frame&) override;
 
     virtual CompositingTriggerFlags allowedCompositingTriggers() const
     {
index 1d0cd8f..1adc5a5 100644 (file)
@@ -94,6 +94,8 @@ void RemoteLayerTreeDrawingArea::setRootCompositingLayer(GraphicsLayer* rootLaye
         children.append(m_webPage->pageOverlayController().viewOverlayRootLayer());
     }
     m_rootLayer->setChildren(children);
+
+    m_webPage->mainFrameView()->renderView()->compositor().setDocumentOverlayRootLayer(m_webPage->pageOverlayController().documentOverlayRootLayer());
 }
 
 void RemoteLayerTreeDrawingArea::updateGeometry(const IntSize& viewSize, const IntSize& layerPosition)
index aa50ce1..d06d413 100644 (file)
@@ -449,6 +449,8 @@ void TiledCoreAnimationDrawingArea::setRootCompositingLayer(CALayer *layer)
 
     [m_hostingLayer setSublayers:layer ? @[ layer, m_webPage->pageOverlayController().viewOverlayRootLayer()->platformLayer() ] : @[ ]];
 
+    m_webPage->mainFrameView()->renderView()->compositor().setDocumentOverlayRootLayer(m_webPage->pageOverlayController().documentOverlayRootLayer());
+
     bool hadRootLayer = !!m_rootLayer;
     m_rootLayer = layer;
     [m_rootLayer setSublayerTransform:m_transform];