Title: [163873] trunk
- Revision
- 163873
- Author
- stav...@adobe.com
- Date
- 2014-02-11 08:12:08 -0800 (Tue, 11 Feb 2014)
Log Message
[CSS Regions] Overflow above the first region is not properly painted for regions with padding
https://bugs.webkit.org/show_bug.cgi?id=128590
Reviewed by Andrei Bucur.
Source/WebCore:
Painting is done using the layer of the region's container, so offsetting using the content box
of the region itself is incorrect.
Test: fast/regions/region-padding-overflow-hidden.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::regionContainer):
(WebCore::RenderRegion::regionContainerLayer):
* rendering/RenderRegion.h:
LayoutTests:
Added test for the correct painting of overflow above the first region
when the region has padding.
* fast/regions/region-padding-overflow-hidden-expected.html: Added.
* fast/regions/region-padding-overflow-hidden.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (163872 => 163873)
--- trunk/LayoutTests/ChangeLog 2014-02-11 10:21:12 UTC (rev 163872)
+++ trunk/LayoutTests/ChangeLog 2014-02-11 16:12:08 UTC (rev 163873)
@@ -1,3 +1,16 @@
+2014-02-11 Radu Stavila <stav...@adobe.com>
+
+ [CSS Regions] Overflow above the first region is not properly painted for regions with padding
+ https://bugs.webkit.org/show_bug.cgi?id=128590
+
+ Reviewed by Andrei Bucur.
+
+ Added test for the correct painting of overflow above the first region
+ when the region has padding.
+
+ * fast/regions/region-padding-overflow-hidden-expected.html: Added.
+ * fast/regions/region-padding-overflow-hidden.html: Added.
+
2014-02-11 Piotr Grad <p.g...@samsung.com>
[GStreamer] High playback rate causes crash
Added: trunk/LayoutTests/fast/regions/region-padding-overflow-hidden-expected.html (0 => 163873)
--- trunk/LayoutTests/fast/regions/region-padding-overflow-hidden-expected.html (rev 0)
+++ trunk/LayoutTests/fast/regions/region-padding-overflow-hidden-expected.html 2014-02-11 16:12:08 UTC (rev 163873)
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+
+<style>
+ #region {
+ border: 5px solid blue;
+ width: 200px;
+ height: 100px;
+ padding: 80px;
+ margin: 50px;
+ overflow: hidden;
+ }
+
+ #content {
+ background-color: lightgrey;
+ width: 200px;
+ height: 100px;
+ }
+</style>
+
+<body>
+ <a href="" Regions] Overflow above the first region is not properly painted for regions with padding</a>
+
+ <div id="region">
+ <div id="content">
+ <div style="position:relative; top: -40px; color:red">This line should be visible</div>
+ <div>The red line above this one should be visible</div>
+ </div>
+ </div>
+</body>
\ No newline at end of file
Added: trunk/LayoutTests/fast/regions/region-padding-overflow-hidden.html (0 => 163873)
--- trunk/LayoutTests/fast/regions/region-padding-overflow-hidden.html (rev 0)
+++ trunk/LayoutTests/fast/regions/region-padding-overflow-hidden.html 2014-02-11 16:12:08 UTC (rev 163873)
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+
+<style>
+ #region {
+ -webkit-flow-from: flow;
+ border: 5px solid blue;
+ width: 200px;
+ height: 100px;
+ padding: 80px;
+ margin: 50px;
+ overflow: hidden;
+ }
+
+ #content {
+ -webkit-flow-into: flow;
+ background-color: lightgrey;
+ width: 200px;
+ height: 100px;
+ }
+</style>
+
+<body>
+ <a href="" Regions] Overflow above the first region is not properly painted for regions with padding</a>
+
+ <div id="region"></div>
+
+ <div id="content">
+ <div style="position:relative; top: -40px; color:red">This line should be visible</div>
+ <div>The red line above this one should be visible</div>
+ </div>
+</body>
\ No newline at end of file
Modified: trunk/Source/WebCore/ChangeLog (163872 => 163873)
--- trunk/Source/WebCore/ChangeLog 2014-02-11 10:21:12 UTC (rev 163872)
+++ trunk/Source/WebCore/ChangeLog 2014-02-11 16:12:08 UTC (rev 163873)
@@ -1,3 +1,22 @@
+2014-02-11 Radu Stavila <stav...@adobe.com>
+
+ [CSS Regions] Overflow above the first region is not properly painted for regions with padding
+ https://bugs.webkit.org/show_bug.cgi?id=128590
+
+ Reviewed by Andrei Bucur.
+
+ Painting is done using the layer of the region's container, so offsetting using the content box
+ of the region itself is incorrect.
+
+ Test: fast/regions/region-padding-overflow-hidden.html
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
+ * rendering/RenderRegion.cpp:
+ (WebCore::RenderRegion::regionContainer):
+ (WebCore::RenderRegion::regionContainerLayer):
+ * rendering/RenderRegion.h:
+
2014-02-11 Benjamin Poulain <benja...@webkit.org>
querySelector() does not use the compiler correctly
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (163872 => 163873)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2014-02-11 10:21:12 UTC (rev 163872)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2014-02-11 16:12:08 UTC (rev 163873)
@@ -5247,7 +5247,7 @@
LayoutRect flowThreadPortionRect = region->flowThreadPortionRect();
LayoutPoint portionLocation = flowThreadPortionRect.location();
- LayoutRect regionContentBox = region->contentBoxRect();
+ LayoutRect regionContentBox = region->regionContainer()->contentBoxRect();
LayoutSize moveOffset = portionLocation - regionContentBox.location();
ClipRect newOverflowClipRect = clipRects.overflowClipRect();
Modified: trunk/Source/WebCore/rendering/RenderRegion.cpp (163872 => 163873)
--- trunk/Source/WebCore/rendering/RenderRegion.cpp 2014-02-11 10:21:12 UTC (rev 163872)
+++ trunk/Source/WebCore/rendering/RenderRegion.cpp 2014-02-11 16:12:08 UTC (rev 163873)
@@ -150,12 +150,17 @@
return portionLocation;
}
-RenderLayer* RenderRegion::regionContainerLayer() const
+RenderBlockFlow* RenderRegion::regionContainer() const
{
ASSERT(parent() && parent()->isRenderNamedFlowFragmentContainer());
- return toRenderBlockFlow(parent())->layer();
+ return toRenderBlockFlow(parent());
}
+RenderLayer* RenderRegion::regionContainerLayer() const
+{
+ return regionContainer()->layer();
+}
+
LayoutRect RenderRegion::overflowRectForFlowThreadPortion(const LayoutRect& flowThreadPortionRect, bool isFirstPortion, bool isLastPortion, OverflowType overflowType)
{
ASSERT(isValid());
Modified: trunk/Source/WebCore/rendering/RenderRegion.h (163872 => 163873)
--- trunk/Source/WebCore/rendering/RenderRegion.h 2014-02-11 10:21:12 UTC (rev 163872)
+++ trunk/Source/WebCore/rendering/RenderRegion.h 2014-02-11 16:12:08 UTC (rev 163873)
@@ -57,6 +57,7 @@
LayoutPoint flowThreadPortionLocation() const;
+ RenderBlockFlow* regionContainer() const;
RenderLayer* regionContainerLayer() const;
virtual void attachRegion();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes