Title: [93428] trunk
Revision
93428
Author
[email protected]
Date
2011-08-19 12:19:43 -0700 (Fri, 19 Aug 2011)

Log Message

[CSSRegions]Content displayed in regions should not be scrollable
https://bugs.webkit.org/show_bug.cgi?id=66459

Patch by Mihnea Ovidenie <[email protected]> on 2011-08-19
Reviewed by Darin Adler.

Source/WebCore:

Initially, when creating the style for the RenderFlowThread, overflowX and overflowY were both set to hidden,
so that RenderView did not display scrollbars when a RenderFlowThread exists. However, this allowed the possibility
of scrolling the content displayed in region.

Now, the RenderFlowThread objects are ignored in RenderBlock::insertPositionedObject and the style of the RenderFlowThread
can be set to visible, thus preventing scrolling of the content displayed in regions.

Test: fast/regions/content-flowed-into-regions-no-scroll.html

* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::createFlowThreadStyle):

LayoutTests:

* fast/regions/content-flowed-into-regions-no-scroll-expected.txt: Added.
* fast/regions/content-flowed-into-regions-no-scroll.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (93427 => 93428)


--- trunk/LayoutTests/ChangeLog	2011-08-19 19:15:05 UTC (rev 93427)
+++ trunk/LayoutTests/ChangeLog	2011-08-19 19:19:43 UTC (rev 93428)
@@ -1,3 +1,13 @@
+2011-08-19  Mihnea Ovidenie  <[email protected]>
+
+        [CSSRegions]Content displayed in regions should not be scrollable
+        https://bugs.webkit.org/show_bug.cgi?id=66459
+
+        Reviewed by Darin Adler.
+
+        * fast/regions/content-flowed-into-regions-no-scroll-expected.txt: Added.
+        * fast/regions/content-flowed-into-regions-no-scroll.html: Added.
+
 2011-08-19  Julien Chaffraix  <[email protected]>
 
         REGRESSION (r84327-r84329): CSS stylesheets fail to load on www.flagstar.com login page

Added: trunk/LayoutTests/fast/regions/content-flowed-into-regions-no-scroll-expected.txt (0 => 93428)


--- trunk/LayoutTests/fast/regions/content-flowed-into-regions-no-scroll-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/regions/content-flowed-into-regions-no-scroll-expected.txt	2011-08-19 19:19:43 UTC (rev 93428)
@@ -0,0 +1 @@
+PASS

Added: trunk/LayoutTests/fast/regions/content-flowed-into-regions-no-scroll.html (0 => 93428)


--- trunk/LayoutTests/fast/regions/content-flowed-into-regions-no-scroll.html	                        (rev 0)
+++ trunk/LayoutTests/fast/regions/content-flowed-into-regions-no-scroll.html	2011-08-19 19:19:43 UTC (rev 93428)
@@ -0,0 +1,54 @@
+<!doctype html>
+<html>
+    <!--
+    The content from a flow is displayed into a region. The content fills up the region and the remaining content is not displayed.
+    This test shows that the content in the region cannot be scrolled. On success, you should see a green box followed by 'PASS'.
+    -->
+    <head>
+        <style>
+            .box {
+                width: 100px;
+                height: 100px;
+            }
+
+            #flow {
+                -webkit-flow: 'article';
+            }
+
+            #region {
+                content: -webkit-from-flow('article');
+                overflow: hidden;
+            }
+
+            #greenBox {
+                background-color: green;
+            }
+
+            #redBox {
+                background-color: red;
+            }
+        </style>
+        <script>
+            if (window.layoutTestController)
+                layoutTestController.dumpAsText();
+
+            function test()
+            {
+                document.getElementById('redBox').scrollIntoView(false);
+                var element = document.elementFromPoint(50, 50);
+
+                // Check whether the red box was moved upwards.
+                if (element == document.getElementById('redBox'))
+                    document.getElementById('result').innerText = "FAIL";
+            }
+        </script>
+    </head>
+    <body _onload_="test()">
+        <div id="flow">
+            <div id="greenBox" class="box"></div>
+            <div id="redBox" class="box"></div>
+        </div>
+        <div id="region" class="box"></div>
+        <div id="result">PASS</div>
+    </body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (93427 => 93428)


--- trunk/Source/WebCore/ChangeLog	2011-08-19 19:15:05 UTC (rev 93427)
+++ trunk/Source/WebCore/ChangeLog	2011-08-19 19:19:43 UTC (rev 93428)
@@ -1,3 +1,22 @@
+2011-08-19  Mihnea Ovidenie  <[email protected]>
+
+        [CSSRegions]Content displayed in regions should not be scrollable
+        https://bugs.webkit.org/show_bug.cgi?id=66459
+
+        Reviewed by Darin Adler.
+
+        Initially, when creating the style for the RenderFlowThread, overflowX and overflowY were both set to hidden,
+        so that RenderView did not display scrollbars when a RenderFlowThread exists. However, this allowed the possibility
+        of scrolling the content displayed in region.
+
+        Now, the RenderFlowThread objects are ignored in RenderBlock::insertPositionedObject and the style of the RenderFlowThread
+        can be set to visible, thus preventing scrolling of the content displayed in regions.
+
+        Test: fast/regions/content-flowed-into-regions-no-scroll.html
+
+        * rendering/RenderFlowThread.cpp:
+        (WebCore::RenderFlowThread::createFlowThreadStyle):
+
 2011-08-19  Julien Chaffraix  <[email protected]>
 
         REGRESSION (r84327-r84329): CSS stylesheets fail to load on www.flagstar.com login page

Modified: trunk/Source/WebCore/rendering/RenderFlowThread.cpp (93427 => 93428)


--- trunk/Source/WebCore/rendering/RenderFlowThread.cpp	2011-08-19 19:15:05 UTC (rev 93427)
+++ trunk/Source/WebCore/rendering/RenderFlowThread.cpp	2011-08-19 19:19:43 UTC (rev 93428)
@@ -59,8 +59,6 @@
     newStyle->setTop(Length(0, Fixed));
     newStyle->setWidth(Length(100, Percent));
     newStyle->setHeight(Length(100, Percent));
-    newStyle->setOverflowX(OHIDDEN);
-    newStyle->setOverflowY(OHIDDEN);
     newStyle->font().update(0);
     
     return newStyle.release();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to