Need to notify ScrollingCoordinator when frame scrollbars are destroyed
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Mar 2013 07:46:42 +0000 (07:46 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Mar 2013 07:46:42 +0000 (07:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=112104

Patch by Tien-Ren Chen <trchen@chromium.org> on 2013-03-12
Reviewed by James Robinson.

Need to notify ScrollingCoordinatorChromium whenever m_layerForHorizontalScrollbar /
m_layerForVerticalScrollbar changes, for correct lifetime management.

No new tests. Difficult to test lifetime management internal to ScrollingCoordinatorChromium.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::destroyRootLayer):

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

Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayerCompositor.cpp

index 80fe47d..62fa726 100644 (file)
@@ -1,3 +1,18 @@
+2013-03-12  Tien-Ren Chen  <trchen@chromium.org>
+
+        Need to notify ScrollingCoordinator when frame scrollbars are destroyed
+        https://bugs.webkit.org/show_bug.cgi?id=112104
+
+        Reviewed by James Robinson.
+
+        Need to notify ScrollingCoordinatorChromium whenever m_layerForHorizontalScrollbar /
+        m_layerForVerticalScrollbar changes, for correct lifetime management.
+
+        No new tests. Difficult to test lifetime management internal to ScrollingCoordinatorChromium.
+
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::destroyRootLayer):
+
 2013-03-11  Simon Fraser  <simon.fraser@apple.com>
 
         We'll get there eventually.
index ad668af..3239a36 100644 (file)
@@ -2690,6 +2690,8 @@ void RenderLayerCompositor::destroyRootLayer()
     if (m_layerForHorizontalScrollbar) {
         m_layerForHorizontalScrollbar->removeFromParent();
         m_layerForHorizontalScrollbar = nullptr;
+        if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
+            scrollingCoordinator->scrollableAreaScrollbarLayerDidChange(m_renderView->frameView(), HorizontalScrollbar);
         if (Scrollbar* horizontalScrollbar = m_renderView->frameView()->verticalScrollbar())
             m_renderView->frameView()->invalidateScrollbar(horizontalScrollbar, IntRect(IntPoint(0, 0), horizontalScrollbar->frameRect().size()));
     }
@@ -2697,6 +2699,8 @@ void RenderLayerCompositor::destroyRootLayer()
     if (m_layerForVerticalScrollbar) {
         m_layerForVerticalScrollbar->removeFromParent();
         m_layerForVerticalScrollbar = nullptr;
+        if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
+            scrollingCoordinator->scrollableAreaScrollbarLayerDidChange(m_renderView->frameView(), VerticalScrollbar);
         if (Scrollbar* verticalScrollbar = m_renderView->frameView()->verticalScrollbar())
             m_renderView->frameView()->invalidateScrollbar(verticalScrollbar, IntRect(IntPoint(0, 0), verticalScrollbar->frameRect().size()));
     }