Title: [128652] trunk
Revision
128652
Author
[email protected]
Date
2012-09-14 14:24:30 -0700 (Fri, 14 Sep 2012)

Log Message

https://bugs.webkit.org/show_bug.cgi?id=96688
Put position:fixed elements in their own layers and allow them to 
create a stacking context
-and corresponding-
<rdar://problem/11467961>

Reviewed by Simon Fraser.

Source/WebKit/mac: 

Enable these settings in WK1 too for consistency. 
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit2: 

Soon we want pages with fixed positioned elements to be able to be 
scrolled by the ScrollingCoordinator. As a part of that work, we have 
to composite fixed position elements, and we have to allow those
elements to create a stacking context.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):

LayoutTests: 

A few test result differences. These first three tests actually
render differently now.
* platform/mac/fast/block/positioning/016-expected.png:
* platform/mac/fast/block/positioning/016-expected.txt:
* platform/mac/fast/block/positioning/025-expected.png:
* platform/mac/fast/block/positioning/025-expected.txt:
* platform/mac/fast/block/positioning/fixed-position-stacking-context-expected.png: Added.
* platform/mac/fast/block/positioning/fixed-position-stacking-context-expected.txt: Added.

These tests just have different layer trees. 
* platform/mac/compositing/geometry/fixed-position-composited-switch-expected.txt: Added.
* platform/mac/compositing/rtl: Added.
* platform/mac/compositing/rtl/rtl-fixed-expected.txt: Added.
* platform/mac/compositing/rtl/rtl-fixed-overflow-expected.txt: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (128651 => 128652)


--- trunk/LayoutTests/ChangeLog	2012-09-14 21:09:46 UTC (rev 128651)
+++ trunk/LayoutTests/ChangeLog	2012-09-14 21:24:30 UTC (rev 128652)
@@ -1,3 +1,28 @@
+2012-09-14  Beth Dakin  <[email protected]>
+
+        https://bugs.webkit.org/show_bug.cgi?id=96688
+        Put position:fixed elements in their own layers and allow them to 
+        create a stacking context
+        -and corresponding-
+        <rdar://problem/11467961>
+
+        Reviewed by Simon Fraser.
+
+        A few test result differences. These first three tests actually
+        render differently now.
+        * platform/mac/fast/block/positioning/016-expected.png:
+        * platform/mac/fast/block/positioning/016-expected.txt:
+        * platform/mac/fast/block/positioning/025-expected.png:
+        * platform/mac/fast/block/positioning/025-expected.txt:
+        * platform/mac/fast/block/positioning/fixed-position-stacking-context-expected.png: Added.
+        * platform/mac/fast/block/positioning/fixed-position-stacking-context-expected.txt: Added.
+
+        These tests just have different layer trees. 
+        * platform/mac/compositing/geometry/fixed-position-composited-switch-expected.txt: Added.
+        * platform/mac/compositing/rtl: Added.
+        * platform/mac/compositing/rtl/rtl-fixed-expected.txt: Added.
+        * platform/mac/compositing/rtl/rtl-fixed-overflow-expected.txt: Added.
+
 2012-09-14  Bo Liu  <[email protected]>
 
         Add in-place reload behavior to ImagesEnabled setting

Modified: trunk/LayoutTests/fast/block/positioning/016.html (128651 => 128652)


--- trunk/LayoutTests/fast/block/positioning/016.html	2012-09-14 21:09:46 UTC (rev 128651)
+++ trunk/LayoutTests/fast/block/positioning/016.html	2012-09-14 21:24:30 UTC (rev 128652)
@@ -5,6 +5,7 @@
 <html lang="en-US">
 <head>
     <title>z-index testcase: 'auto' doesn't establish new stacking context (position: fixed)</title>
+    <!--Fixed position elements do not establish stacking contexts by default according to the spec. However, some ports, including the Mac port, have changed this behavior and fixed position elements DO create a stacking context. The results are expected to differ on different ports depending on which behavior is being used.-->
     <meta http-equiv="Content-Style-Type" content="text/css">
     <link rel="copyright" href=""
     <style type="text/css">

Modified: trunk/LayoutTests/fast/block/positioning/025.html (128651 => 128652)


--- trunk/LayoutTests/fast/block/positioning/025.html	2012-09-14 21:09:46 UTC (rev 128651)
+++ trunk/LayoutTests/fast/block/positioning/025.html	2012-09-14 21:24:30 UTC (rev 128652)
@@ -5,6 +5,7 @@
 <html lang="en-US">
 <head>
     <title>z-index testcase: 'auto' gives container stacking level of '0' (variant 3) in its own context (position: fixed)</title>
+    <!--Fixed position elements do not establish stacking contexts by default according to the spec. However, some ports, including the Mac port, have changed this behavior and fixed position elements DO create a stacking context. The results are expected to differ on different ports depending on which behavior is being used.-->
     <meta http-equiv="Content-Style-Type" content="text/css">
     <link rel="copyright" href=""
     <style type="text/css">

Modified: trunk/LayoutTests/fast/block/positioning/fixed-position-stacking-context.html (128651 => 128652)


--- trunk/LayoutTests/fast/block/positioning/fixed-position-stacking-context.html	2012-09-14 21:09:46 UTC (rev 128651)
+++ trunk/LayoutTests/fast/block/positioning/fixed-position-stacking-context.html	2012-09-14 21:24:30 UTC (rev 128652)
@@ -1,5 +1,6 @@
 <!DOCTYPE html>
-<title>Fixed position elements do not establish stacking contexts by default</title>
+<title>Fixed position and stacking context</title>
+<!--Fixed position elements do not establish stacking contexts by default according to the spec. However, some ports, including the Mac port, have changed this behavior and fixed position elements DO create a stacking context. The results are expected to differ on different ports depending on which behavior is being used.-->
 <style>
 div {
     height: 100px;

Added: trunk/LayoutTests/platform/mac/compositing/geometry/fixed-position-composited-switch-expected.txt (0 => 128652)


--- trunk/LayoutTests/platform/mac/compositing/geometry/fixed-position-composited-switch-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/mac/compositing/geometry/fixed-position-composited-switch-expected.txt	2012-09-14 21:24:30 UTC (rev 128652)
@@ -0,0 +1,35 @@
+Before (should be empty): 
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 1
+        (GraphicsLayer
+          (position 495.00 30.00)
+          (bounds 300.00 100.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
+After (should not be empty): 
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 1
+        (GraphicsLayer
+          (position 495.00 30.00)
+          (bounds 300.00 100.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+After (should be empty): 
+

Added: trunk/LayoutTests/platform/mac/compositing/rtl/rtl-fixed-expected.txt (0 => 128652)


--- trunk/LayoutTests/platform/mac/compositing/rtl/rtl-fixed-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/mac/compositing/rtl/rtl-fixed-expected.txt	2012-09-14 21:24:30 UTC (rev 128652)
@@ -0,0 +1,16 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 1
+        (GraphicsLayer
+          (position 50.00 50.00)
+          (bounds 100.00 100.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+

Added: trunk/LayoutTests/platform/mac/compositing/rtl/rtl-fixed-overflow-expected.txt (0 => 128652)


--- trunk/LayoutTests/platform/mac/compositing/rtl/rtl-fixed-overflow-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/mac/compositing/rtl/rtl-fixed-overflow-expected.txt	2012-09-14 21:24:30 UTC (rev 128652)
@@ -0,0 +1,17 @@
+(GraphicsLayer
+  (position -215.00 0.00)
+  (bounds 1000.00 1000.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 1000.00 1000.00)
+      (children 1
+        (GraphicsLayer
+          (position 265.00 50.00)
+          (bounds 100.00 100.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+

Modified: trunk/LayoutTests/platform/mac/fast/block/positioning/016-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/mac/fast/block/positioning/016-expected.txt (128651 => 128652)


--- trunk/LayoutTests/platform/mac/fast/block/positioning/016-expected.txt	2012-09-14 21:09:46 UTC (rev 128651)
+++ trunk/LayoutTests/platform/mac/fast/block/positioning/016-expected.txt	2012-09-14 21:24:30 UTC (rev 128652)
@@ -8,6 +8,6 @@
 layer at (0,0) size 100x100
   RenderBlock (positioned) zI: 1 {DIV} at (0,0) size 100x100 [bgcolor=#FF0000]
 layer at (0,0) size 100x100
+  RenderBlock (positioned) zI: 2 {DIV} at (0,0) size 100x100 [bgcolor=#008000]
+layer at (0,0) size 100x100
   RenderBlock (positioned) zI: 1 {DIV} at (0,0) size 100x100 [bgcolor=#FF0000]
-layer at (0,0) size 100x100
-  RenderBlock (positioned) zI: 2 {DIV} at (0,0) size 100x100 [bgcolor=#008000]

Modified: trunk/LayoutTests/platform/mac/fast/block/positioning/025-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/mac/fast/block/positioning/025-expected.txt (128651 => 128652)


--- trunk/LayoutTests/platform/mac/fast/block/positioning/025-expected.txt	2012-09-14 21:09:46 UTC (rev 128651)
+++ trunk/LayoutTests/platform/mac/fast/block/positioning/025-expected.txt	2012-09-14 21:24:30 UTC (rev 128652)
@@ -1,10 +1,10 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
-layer at (0,0) size 800x8 layerType: background only
-layer at (0,0) size 100x100
-  RenderBlock (positioned) zI: -1 {DIV} at (0,0) size 100x100 [bgcolor=#FF0000]
-layer at (0,0) size 800x8 layerType: foreground only
+layer at (0,0) size 800x8
   RenderBlock {HTML} at (0,0) size 800x8
     RenderBody {BODY} at (8,8) size 784x0
+layer at (0,0) size 100x100 layerType: background only
 layer at (0,0) size 100x100
+  RenderBlock (positioned) zI: -1 {DIV} at (0,0) size 100x100 [bgcolor=#FF0000]
+layer at (0,0) size 100x100 layerType: foreground only
   RenderBlock (positioned) {DIV} at (0,0) size 100x100 [bgcolor=#008000]

Added: trunk/LayoutTests/platform/mac/fast/block/positioning/fixed-position-stacking-context-expected.png


(Binary files differ)
Property changes on: trunk/LayoutTests/platform/mac/fast/block/positioning/fixed-position-stacking-context-expected.png ___________________________________________________________________

Added: svn:mime-type

Added: trunk/LayoutTests/platform/mac/fast/block/positioning/fixed-position-stacking-context-expected.txt (0 => 128652)


--- trunk/LayoutTests/platform/mac/fast/block/positioning/fixed-position-stacking-context-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/block/positioning/fixed-position-stacking-context-expected.txt	2012-09-14 21:24:30 UTC (rev 128652)
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x8
+  RenderBlock {HTML} at (0,0) size 800x8
+    RenderBody {BODY} at (8,8) size 784x0
+layer at (0,0) size 100x100
+  RenderBlock (positioned) {DIV} at (0,0) size 100x100
+layer at (0,0) size 100x100
+  RenderBlock (positioned) zI: 1 {DIV} at (0,0) size 100x100 [bgcolor=#FF0000]
+layer at (0,0) size 100x100
+  RenderBlock (positioned) zI: 2 {DIV} at (0,0) size 100x100 [bgcolor=#008000]
+layer at (0,0) size 100x100
+  RenderBlock (positioned) zI: 1 {DIV} at (0,0) size 100x100 [bgcolor=#FF0000]

Modified: trunk/Source/WebKit/mac/ChangeLog (128651 => 128652)


--- trunk/Source/WebKit/mac/ChangeLog	2012-09-14 21:09:46 UTC (rev 128651)
+++ trunk/Source/WebKit/mac/ChangeLog	2012-09-14 21:24:30 UTC (rev 128652)
@@ -1,3 +1,17 @@
+2012-09-14  Beth Dakin  <[email protected]>
+
+        https://bugs.webkit.org/show_bug.cgi?id=96688
+        Put position:fixed elements in their own layers and allow them to 
+        create a stacking context
+        -and corresponding-
+        <rdar://problem/11467961>
+
+        Reviewed by Simon Fraser.
+
+        Enable these settings in WK1 too for consistency. 
+        * WebView/WebView.mm:
+        (-[WebView _preferencesChanged:]):
+
 2012-09-13  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r128552.

Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (128651 => 128652)


--- trunk/Source/WebKit/mac/WebView/WebView.mm	2012-09-14 21:09:46 UTC (rev 128651)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm	2012-09-14 21:24:30 UTC (rev 128652)
@@ -1547,6 +1547,10 @@
     settings->setRequestAnimationFrameEnabled([preferences requestAnimationFrameEnabled]);
     settings->setNeedsDidFinishLoadOrderQuirk(needsDidFinishLoadOrderQuirk());
     settings->setDiagnosticLoggingEnabled([preferences diagnosticLoggingEnabled]);
+
+    // We have enabled this setting in WebKit2 for the sake of some ScrollingCoordinator work.
+    // To avoid possible rendering differences, we should enable it for WebKit1 too.
+    settings->setFixedPositionCreatesStackingContext(true);
     
     NSTimeInterval timeout = [preferences incrementalRenderingSuppressionTimeoutInSeconds];
     if (timeout > 0)

Modified: trunk/Source/WebKit2/ChangeLog (128651 => 128652)


--- trunk/Source/WebKit2/ChangeLog	2012-09-14 21:09:46 UTC (rev 128651)
+++ trunk/Source/WebKit2/ChangeLog	2012-09-14 21:24:30 UTC (rev 128652)
@@ -1,3 +1,20 @@
+2012-09-14  Beth Dakin  <[email protected]>
+
+        https://bugs.webkit.org/show_bug.cgi?id=96688
+        Put position:fixed elements in their own layers and allow them to 
+        create a stacking context
+        -and corresponding-
+        <rdar://problem/11467961>
+
+        Reviewed by Simon Fraser.
+
+        Soon we want pages with fixed positioned elements to be able to be 
+        scrolled by the ScrollingCoordinator. As a part of that work, we have 
+        to composite fixed position elements, and we have to allow those
+        elements to create a stacking context.
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+        (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
+
 2012-09-14  Bo Liu  <[email protected]>
 
         Add in-place reload behavior to ImagesEnabled setting

Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (128651 => 128652)


--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm	2012-09-14 21:09:46 UTC (rev 128651)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm	2012-09-14 21:24:30 UTC (rev 128652)
@@ -76,6 +76,12 @@
     page->settings()->setScrollingCoordinatorEnabled(true);
     page->settings()->setForceCompositingMode(true);
 
+    // Soon we want pages with fixed positioned elements to be able to be scrolled by the ScrollingCoordinator.
+    // As a part of that work, we have to composite fixed position elements, and we have to allow those
+    // elements to create a stacking context.
+    page->settings()->setAcceleratedCompositingForFixedPositionEnabled(true);
+    page->settings()->setFixedPositionCreatesStackingContext(true);
+
     WebProcess::shared().eventDispatcher().addScrollingTreeForPage(webPage);
 
     m_rootLayer = [CALayer layer];
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to