Title: [114109] trunk
Revision
114109
Author
commit-qu...@webkit.org
Date
2012-04-13 04:11:59 -0700 (Fri, 13 Apr 2012)

Log Message

Enabling/disabling delegates scrolling when page has no composited content asserts on WK1.
https://bugs.webkit.org/show_bug.cgi?id=83860

Patch by Zalan Bujtas <zbuj...@gmail.com> on 2012-04-13
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

WK2 has compositing mode on all the time, while Wk1 turns it on only when
the page has composited content. This patch ensures that, when delegates scrolling behavior
is changed, backing stores are cleared only when there's an actual composition,
similarly to what CachedFrame does.

Test: fast/viewport/scroll-delegates-switch-on-page-with-no-composition-mode-asserts.html

* page/FrameView.cpp:
(WebCore::FrameView::delegatesScrollingDidChange):

LayoutTests:

* fast/viewport/scroll-delegates-switch-on-page-with-no-composition-mode-asserts-expected.txt: Added.
* fast/viewport/scroll-delegates-switch-on-page-with-no-composition-mode-asserts.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (114108 => 114109)


--- trunk/LayoutTests/ChangeLog	2012-04-13 11:09:29 UTC (rev 114108)
+++ trunk/LayoutTests/ChangeLog	2012-04-13 11:11:59 UTC (rev 114109)
@@ -1,3 +1,13 @@
+2012-04-13  Zalan Bujtas  <zbuj...@gmail.com>
+
+        Enabling/disabling delegates scrolling when page has no composited content asserts on WK1.
+        https://bugs.webkit.org/show_bug.cgi?id=83860
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        * fast/viewport/scroll-delegates-switch-on-page-with-no-composition-mode-asserts-expected.txt: Added.
+        * fast/viewport/scroll-delegates-switch-on-page-with-no-composition-mode-asserts.html: Added.
+
 2012-04-13  Philippe Normand  <pnorm...@igalia.com>
 
         Unreviewed, GTK baselines for tests now being runned since the

Added: trunk/LayoutTests/fast/viewport/scroll-delegates-switch-on-page-with-no-composition-mode-asserts-expected.txt (0 => 114109)


--- trunk/LayoutTests/fast/viewport/scroll-delegates-switch-on-page-with-no-composition-mode-asserts-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/viewport/scroll-delegates-switch-on-page-with-no-composition-mode-asserts-expected.txt	2012-04-13 11:11:59 UTC (rev 114109)
@@ -0,0 +1,3 @@
+This test verifies that switching delegates scrolling on a page with no composition does not assert.
+
+PASS if no crash or assert in debug.

Added: trunk/LayoutTests/fast/viewport/scroll-delegates-switch-on-page-with-no-composition-mode-asserts.html (0 => 114109)


--- trunk/LayoutTests/fast/viewport/scroll-delegates-switch-on-page-with-no-composition-mode-asserts.html	                        (rev 0)
+++ trunk/LayoutTests/fast/viewport/scroll-delegates-switch-on-page-with-no-composition-mode-asserts.html	2012-04-13 11:11:59 UTC (rev 114109)
@@ -0,0 +1,13 @@
+<html>
+<body>
+    <p>This test verifies that switching delegates scrolling on a page with no composition does not assert.</p>
+    <p>PASS if no crash or assert in debug.</p>
+
+<script>
+if (window.layoutTestController && window.internals && internals.setDelegatesScrolling) {
+    layoutTestController.dumpAsText();
+    internals.setDelegatesScrolling(true, document);
+}
+</script>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (114108 => 114109)


--- trunk/Source/WebCore/ChangeLog	2012-04-13 11:09:29 UTC (rev 114108)
+++ trunk/Source/WebCore/ChangeLog	2012-04-13 11:11:59 UTC (rev 114109)
@@ -1,3 +1,20 @@
+2012-04-13  Zalan Bujtas  <zbuj...@gmail.com>
+
+        Enabling/disabling delegates scrolling when page has no composited content asserts on WK1.
+        https://bugs.webkit.org/show_bug.cgi?id=83860
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        WK2 has compositing mode on all the time, while Wk1 turns it on only when
+        the page has composited content. This patch ensures that, when delegates scrolling behavior
+        is changed, backing stores are cleared only when there's an actual composition,
+        similarly to what CachedFrame does.
+
+        Test: fast/viewport/scroll-delegates-switch-on-page-with-no-composition-mode-asserts.html
+
+        * page/FrameView.cpp:
+        (WebCore::FrameView::delegatesScrollingDidChange):
+
 2012-04-13  Vivek Galatage  <vivekgalat...@gmail.com>
 
         Web Inspector: Line number is not displayed while debugging _javascript_

Modified: trunk/Source/WebCore/page/FrameView.cpp (114108 => 114109)


--- trunk/Source/WebCore/page/FrameView.cpp	2012-04-13 11:09:29 UTC (rev 114108)
+++ trunk/Source/WebCore/page/FrameView.cpp	2012-04-13 11:11:59 UTC (rev 114109)
@@ -1694,7 +1694,8 @@
 {
 #if USE(ACCELERATED_COMPOSITING)
     // When we switch to delgatesScrolling mode, we should destroy the scrolling/clipping layers in RenderLayerCompositor.
-    clearBackingStores();
+    if (hasCompositedContent())
+        clearBackingStores();
 #endif
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to