Source/Platform: [chromium] Remove code that relies on boundsContainsPageScale().
authorwjmaclean@chromium.org <wjmaclean@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Mar 2013 22:43:18 +0000 (22:43 +0000)
committerwjmaclean@chromium.org <wjmaclean@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Mar 2013 22:43:18 +0000 (22:43 +0000)
https://bugs.webkit.org/show_bug.cgi?id=112465

The boundsContainsPageScale() API is going away, remove code that
depends on it.

Reviewed by James Robinson.

* chromium/public/WebContentLayer.h:
(WebContentLayer):

Source/WebCore: [chromium] Remove NCCH code that relies on boundsContainsPageScale().
https://bugs.webkit.org/show_bug.cgi?id=112465

Reviewed by James Robinson.

The boundsContainsPageScale() API is going away, remove code that
depends on it. Uses existing tests as no behaviour change.

* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::setAppliesPageScale):
(WebCore::GraphicsLayerChromium::appliesPageScale):

Source/WebKit/chromium: [chromium] Remove NCCH code that relies on boundsContainsPageScale().
https://bugs.webkit.org/show_bug.cgi?id=112465

Reviewed by James Robinson.

The boundContainsPageScale API is going away, remove code that relies
on it.

* src/NonCompositedContentHost.cpp:
(WebKit::NonCompositedContentHost::NonCompositedContentHost):
(WebKit::NonCompositedContentHost::setViewport):

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

Source/Platform/ChangeLog
Source/Platform/chromium/public/WebContentLayer.h
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/NonCompositedContentHost.cpp

index 5df5254..6aefe38 100644 (file)
@@ -1,3 +1,16 @@
+2013-03-18  W. James MacLean  <wjmaclean@chromium.org>
+
+        [chromium] Remove code that relies on boundsContainsPageScale().
+        https://bugs.webkit.org/show_bug.cgi?id=112465
+
+        The boundsContainsPageScale() API is going away, remove code that
+        depends on it.
+
+        Reviewed by James Robinson.
+
+        * chromium/public/WebContentLayer.h:
+        (WebContentLayer):
+
 2013-03-18  Mark Pilgrim  <pilgrim@chromium.org>
 
         [Chromium] Create WebFileSystemType enum to allow easier filesystem refactoring
index 4fed2fd..36a23fc 100644 (file)
@@ -43,9 +43,6 @@ public:
     // Defaults to false.
     virtual void setDoubleSided(bool) = 0;
 
-    virtual void setBoundsContainPageScale(bool) = 0;
-    virtual bool boundsContainPageScale() const = 0;
-
     // Allow the compositor to determine the scale at which the layer should
     // be rasterized based on the layer's hierarchy and transform. This defaults
     // to false.
index b27f9b6..077251f 100644 (file)
@@ -1,3 +1,17 @@
+2013-03-18  W. James MacLean  <wjmaclean@chromium.org>
+
+        [chromium] Remove NCCH code that relies on boundsContainsPageScale().
+        https://bugs.webkit.org/show_bug.cgi?id=112465
+
+        Reviewed by James Robinson.
+
+        The boundsContainsPageScale() API is going away, remove code that
+        depends on it. Uses existing tests as no behaviour change.
+
+        * platform/graphics/chromium/GraphicsLayerChromium.cpp:
+        (WebCore::GraphicsLayerChromium::setAppliesPageScale):
+        (WebCore::GraphicsLayerChromium::appliesPageScale):
+
 2013-03-18  Alec Flett  <alecflett@chromium.org>
 
         IndexedDB: Protect against key prefix overflows
index 5f35f09..dbc4c0b 100644 (file)
@@ -831,14 +831,13 @@ void GraphicsLayerChromium::setupContentsLayer(WebLayer* contentsLayer)
     updateNames();
 }
 
-void GraphicsLayerChromium::setAppliesPageScale(bool appliesScale)
+void GraphicsLayerChromium::setAppliesPageScale(bool)
 {
-    m_layer->setBoundsContainPageScale(appliesScale);
 }
 
 bool GraphicsLayerChromium::appliesPageScale() const
 {
-    return m_layer->boundsContainPageScale();
+    return false;
 }
 
 void GraphicsLayerChromium::paint(GraphicsContext& context, const IntRect& clip)
index 4d8ef05..279b8b7 100644 (file)
@@ -1,3 +1,17 @@
+2013-03-18  W. James MacLean  <wjmaclean@chromium.org>
+
+        [chromium] Remove NCCH code that relies on boundsContainsPageScale().
+        https://bugs.webkit.org/show_bug.cgi?id=112465
+
+        Reviewed by James Robinson.
+
+        The boundContainsPageScale API is going away, remove code that relies
+        on it.
+
+        * src/NonCompositedContentHost.cpp:
+        (WebKit::NonCompositedContentHost::NonCompositedContentHost):
+        (WebKit::NonCompositedContentHost::setViewport):
+
 2013-03-18  Alec Flett  <alecflett@chromium.org>
 
         IndexedDB: Protect against key prefix overflows
index 9d07b44..ce6a23a 100644 (file)
@@ -48,7 +48,6 @@ NonCompositedContentHost::NonCompositedContentHost(WebViewImpl* webView, WebCore
     m_graphicsLayer->setName("non-composited content");
 #endif
     m_graphicsLayer->setDrawsContent(true);
-    m_graphicsLayer->setAppliesPageScale(!m_webView->page()->settings()->applyPageScaleFactorInCompositor());
     m_graphicsLayer->setContentsOpaque(true);
     // FIXME: Remove LCD text setting after it is implemented in chromium.
     WebContentLayer* layer = static_cast<WebCore::GraphicsLayerChromium*>(m_graphicsLayer.get())->contentLayer();
@@ -88,20 +87,6 @@ void NonCompositedContentHost::setScrollLayer(WebCore::GraphicsLayer* layer)
     ASSERT(haveScrollLayer());
 }
 
-static void setScrollbarBoundsContainPageScale(WebCore::GraphicsLayer* layer, WebCore::GraphicsLayer* clipLayer)
-{
-    // Scrollbars are attached outside the root clip rect, so skip the
-    // clipLayer subtree.
-    if (layer == clipLayer)
-        return;
-
-    for (size_t i = 0; i < layer->children().size(); ++i)
-        setScrollbarBoundsContainPageScale(layer->children()[i], clipLayer);
-
-    if (layer->children().isEmpty())
-        layer->setAppliesPageScale(true);
-}
-
 void NonCompositedContentHost::setViewport(const WebCore::IntSize& viewportSize, const WebCore::IntSize& contentsSize, const WebCore::IntPoint& scrollPosition, const WebCore::IntPoint& scrollOrigin)
 {
     if (!haveScrollLayer())
@@ -133,12 +118,6 @@ void NonCompositedContentHost::setViewport(const WebCore::IntSize& viewportSize,
         m_graphicsLayer->setNeedsDisplay();
     } else if (visibleRectChanged)
         m_graphicsLayer->setNeedsDisplay();
-
-    WebCore::GraphicsLayer* clipLayer = m_graphicsLayer->parent()->parent();
-    WebCore::GraphicsLayer* rootLayer = clipLayer;
-    while (rootLayer->parent())
-        rootLayer = rootLayer->parent();
-    setScrollbarBoundsContainPageScale(rootLayer, clipLayer);
 }
 
 bool NonCompositedContentHost::haveScrollLayer()