Title: [137492] trunk
- Revision
- 137492
- Author
- [email protected]
- Date
- 2012-12-12 11:38:15 -0800 (Wed, 12 Dec 2012)
Log Message
Pre-painting should not paint out-of-view fixed position elements
https://bugs.webkit.org/show_bug.cgi?id=104724
Reviewed by James Robinson.
.:
New manual test.
* ManualTests/compositing/fixed-position-out-of-view-scroll-prepaint.html: Added.
Source/WebCore:
Test: ManualTests/compositing/fixed-position-out-of-view-scroll-prepaint.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayer): Don't paint out-of-view fixed position elements.
Modified Paths
Added Paths
Diff
Modified: trunk/ChangeLog (137491 => 137492)
--- trunk/ChangeLog 2012-12-12 19:36:25 UTC (rev 137491)
+++ trunk/ChangeLog 2012-12-12 19:38:15 UTC (rev 137492)
@@ -1,3 +1,14 @@
+2012-12-12 Xianzhu Wang <[email protected]>
+
+ Pre-painting should not paint out-of-view fixed position elements
+ https://bugs.webkit.org/show_bug.cgi?id=104724
+
+ Reviewed by James Robinson.
+
+ New manual test.
+
+ * ManualTests/compositing/fixed-position-out-of-view-scroll-prepaint.html: Added.
+
2012-12-12 Krzysztof Czech <[email protected]>
[EFL] Possibility to turn off accessibility feature for WebKit-EFL.
Added: trunk/ManualTests/compositing/fixed-position-out-of-view-scroll-prepaint.html (0 => 137492)
--- trunk/ManualTests/compositing/fixed-position-out-of-view-scroll-prepaint.html (rev 0)
+++ trunk/ManualTests/compositing/fixed-position-out-of-view-scroll-prepaint.html 2012-12-12 19:38:15 UTC (rev 137492)
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ body {
+ height: 2000px;
+ margin: 0px;
+ padding: 0px;
+ }
+ .main {
+ position: fixed;
+ }
+ .fixed {
+ position: fixed;
+ width: 100%;
+ height: 100px;
+ left: 0px;
+ bottom: -100px;
+ background-color: red;
+ }
+ </style>
+</head>
+
+<body>
+ <div class="main">
+ This test is applicable on platforms that do accelerated compositing, can prepaint out-of-view contents and can scroll the contents into the viewport without repainting them.<p>
+ The following settings need to be enabled:<p>
+ - acceleratedCompositingForFixedPositionEnabled<br>
+ - fixedPositionCreatesStackingContext<p>
+ To test, scroll the page up and down. The test passes if there is no temporary or permanent red in the page.
+ </div>
+
+ <!-- An out-of-view fixed element that should be never visible -->
+ <div class="fixed"></div>
+</body>
+</html>
+
Modified: trunk/Source/WebCore/ChangeLog (137491 => 137492)
--- trunk/Source/WebCore/ChangeLog 2012-12-12 19:36:25 UTC (rev 137491)
+++ trunk/Source/WebCore/ChangeLog 2012-12-12 19:38:15 UTC (rev 137492)
@@ -1,3 +1,15 @@
+2012-12-12 Xianzhu Wang <[email protected]>
+
+ Pre-painting should not paint out-of-view fixed position elements
+ https://bugs.webkit.org/show_bug.cgi?id=104724
+
+ Reviewed by James Robinson.
+
+ Test: ManualTests/compositing/fixed-position-out-of-view-scroll-prepaint.html
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::paintLayer): Don't paint out-of-view fixed position elements.
+
2012-12-11 Roger Fong <[email protected]>
Enable VIDEO_TRACK on Windows.
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (137491 => 137492)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2012-12-12 19:36:25 UTC (rev 137491)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2012-12-12 19:38:15 UTC (rev 137492)
@@ -3146,6 +3146,10 @@
// If this RenderLayer should paint into its backing, that will be done via RenderLayerBacking::paintIntoLayer().
return;
}
+ } else if (compositor()->fixedPositionLayerNotCompositedReason(this) == RenderLayerCompositor::LayerBoundsOutOfView) {
+ // Don't paint out-of-view fixed position layers (when doing prepainting) because they will never be visible
+ // unless their position or viewport size is changed.
+ return;
}
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes