Title: [164234] trunk
Revision
164234
Author
[email protected]
Date
2014-02-17 11:22:14 -0800 (Mon, 17 Feb 2014)

Log Message

[CSS Regions] Make regions unsplittable
https://bugs.webkit.org/show_bug.cgi?id=128811

Reviewed by David Hyatt.

Source/WebCore:

At the moment, nested regions are not properly fragmented across regions. For the moment,
the regions will become unsplittable elements to avoid slicing. At a later time a proper
fragmentation algorithm should be written, also taking into consideration pagination strut.

Test: fast/regions/unsplittable-nested-region.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::isUnsplittableForPagination):

LayoutTests:

Added test for checking that nested regions are unsplittable.

* fast/regions/unsplittable-nested-region-expected.html: Added.
* fast/regions/unsplittable-nested-region.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (164233 => 164234)


--- trunk/LayoutTests/ChangeLog	2014-02-17 19:15:26 UTC (rev 164233)
+++ trunk/LayoutTests/ChangeLog	2014-02-17 19:22:14 UTC (rev 164234)
@@ -1,3 +1,15 @@
+2014-02-17  Radu Stavila  <[email protected]>
+
+        [CSS Regions] Make regions unsplittable
+        https://bugs.webkit.org/show_bug.cgi?id=128811
+
+        Reviewed by David Hyatt.
+
+        Added test for checking that nested regions are unsplittable.
+
+        * fast/regions/unsplittable-nested-region-expected.html: Added.
+        * fast/regions/unsplittable-nested-region.html: Added.
+
 2014-02-17  Simon Fraser  <[email protected]>
 
         Graphics buffer issue with clip-path and fixed positioned element

Added: trunk/LayoutTests/fast/regions/unsplittable-nested-region-expected.html (0 => 164234)


--- trunk/LayoutTests/fast/regions/unsplittable-nested-region-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/regions/unsplittable-nested-region-expected.html	2014-02-17 19:22:14 UTC (rev 164234)
@@ -0,0 +1,55 @@
+<!doctype html>
+<html>
+	<head>
+		<style>
+			#outerContent {
+				-webkit-flow-into: outerFlow;
+				color: blue;
+			}
+			.outerRegion {
+				-webkit-flow-from: outerFlow;
+				width: 300px;
+				height: 180px;
+				border: solid 2px Gray;
+				margin: 5px;
+				border: 2px solid blue;
+				padding: 30px;
+			}
+			#innerContent {
+				-webkit-flow-into: innerFlow;
+				color: red;
+			}
+
+			#innerRegion {
+				-webkit-flow-from: innerFlow;
+				border: solid 2px red;
+				overflow: hidden;
+				color: blue;
+			}
+			#outerRegion1
+			{
+				float: left;
+			}
+			#outerRegion2
+			{
+				float: right;
+			}
+		</style>
+	</head>
+	<body>
+		<a href="" 128811</a><br/>
+		<p>The <span style="color:red">nested region</span> should <b>not</b> be split between the <span style="color:blue">2 outer regions</span> and should overflow the first region</p>
+
+		<div class="outerRegion" id="outerRegion1">
+			<div id="outerContent">
+				<div id="innerRegion">
+					<div id="innerContent">
+						Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
+					</div>
+				</div>
+			</div>
+		</div>
+
+		<div class="outerRegion" id="outerRegion2"></div>
+	</body>
+</html>
\ No newline at end of file

Added: trunk/LayoutTests/fast/regions/unsplittable-nested-region.html (0 => 164234)


--- trunk/LayoutTests/fast/regions/unsplittable-nested-region.html	                        (rev 0)
+++ trunk/LayoutTests/fast/regions/unsplittable-nested-region.html	2014-02-17 19:22:14 UTC (rev 164234)
@@ -0,0 +1,54 @@
+<!doctype html>
+<html>
+	<head>
+		<style>
+			#outerContent {
+				-webkit-flow-into: outerFlow;
+				color: blue;
+			}
+			.outerRegion {
+				-webkit-flow-from: outerFlow;
+				width: 300px;
+				height: 180px;
+				border: solid 2px Gray;
+				margin: 5px;
+				border: 2px solid blue;
+				padding: 30px;
+			}
+			#innerContent {
+				-webkit-flow-into: innerFlow;
+				color: red;
+			}
+
+			#innerRegion {
+				-webkit-flow-from: innerFlow;
+				border: solid 2px red;
+				overflow: hidden;
+				color: blue;
+			}
+			#outerRegion1
+			{
+				float: left;
+			}
+			#outerRegion2
+			{
+				float: right;
+			}
+		</style>
+	</head>
+	<body>
+		<a href="" 128811</a><br/>
+		<p>The <span style="color:red">nested region</span> should <b>not</b> be split between the <span style="color:blue">2 outer regions</span> and should overflow the first region</p>
+
+		<div id="outerContent">
+			<div id="innerRegion"></div>
+		</div>
+
+		<div id="innerContent">
+			Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
+		</div>
+
+		<div class="outerRegion" id="outerRegion1"></div>
+		<div class="outerRegion" id="outerRegion2"></div>
+	</body>
+</html>
\ No newline at end of file

Modified: trunk/Source/WebCore/ChangeLog (164233 => 164234)


--- trunk/Source/WebCore/ChangeLog	2014-02-17 19:15:26 UTC (rev 164233)
+++ trunk/Source/WebCore/ChangeLog	2014-02-17 19:22:14 UTC (rev 164234)
@@ -1,3 +1,19 @@
+2014-02-17  Radu Stavila  <[email protected]>
+
+        [CSS Regions] Make regions unsplittable
+        https://bugs.webkit.org/show_bug.cgi?id=128811
+
+        Reviewed by David Hyatt.
+
+        At the moment, nested regions are not properly fragmented across regions. For the moment, 
+        the regions will become unsplittable elements to avoid slicing. At a later time a proper
+        fragmentation algorithm should be written, also taking into consideration pagination strut.
+
+        Test: fast/regions/unsplittable-nested-region.html
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::isUnsplittableForPagination):
+
 2014-02-17  Simon Fraser  <[email protected]>
 
         Graphics buffer issue with clip-path and fixed positioned element

Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (164233 => 164234)


--- trunk/Source/WebCore/rendering/RenderBox.cpp	2014-02-17 19:15:26 UTC (rev 164233)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp	2014-02-17 19:22:14 UTC (rev 164234)
@@ -4412,7 +4412,7 @@
 
 bool RenderBox::isUnsplittableForPagination() const
 {
-    return isReplaced() || hasUnsplittableScrollingOverflow() || (parent() && isWritingModeRoot());
+    return isReplaced() || hasUnsplittableScrollingOverflow() || (parent() && isWritingModeRoot()) || isRenderNamedFlowFragmentContainer();
 }
 
 LayoutUnit RenderBox::lineHeight(bool /*firstLine*/, LineDirectionMode direction, LinePositionMode /*linePositionMode*/) const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to