Commit 4ebf1ec1 authored by mihnea@adobe.com's avatar mihnea@adobe.com

[CSSRegions] Incorrect layout of a region pseudo children

https://bugs.webkit.org/show_bug.cgi?id=126146

Reviewed by David Hyatt.

Source/WebCore:

Test: fast/regions/collapse-anonymous-region.html

A region behaviour, styled using -webkit-flow-from, is modeled using an anonymous
block created to fragment the named flow content inside the region. We have to prevent
the behaviour of anonymous children collapsing for this block to make sure that the
region element children are still laid out properly when the region element becomes an ordinary
element.

* rendering/RenderBlockFlow.h:

LayoutTests:

* fast/regions/collapse-anonymous-region-expected.html: Added.
* fast/regions/collapse-anonymous-region.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162508 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 624f11dd
2014-01-22 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Incorrect layout of a region pseudo children
https://bugs.webkit.org/show_bug.cgi?id=126146
Reviewed by David Hyatt.
* fast/regions/collapse-anonymous-region-expected.html: Added.
* fast/regions/collapse-anonymous-region.html: Added.
2014-01-21 Ryuan Choi <ryuan.choi@samsung.com>
Remove unused "acceleratedCompositingForScrollableFramesEnabled" setting
<!DOCTYPE html>
<html>
<head>
<style>
#container {
font: 20px/1 Ahem;
width: 100px;
height: 100px;
background-color: green;
}
#container::before {
content: "AAAAA";
display: block;
}
#container::after {
content: "AAAAA";
display: block;
}
</style>
</head>
<body>
<p>Test that the pseudo-elements children of a region are properly laid out after the region becomes an ordinary element.</p>
<p>On success, you see a green rectangle with a black stripe on top.</p>
<div id="container"></div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<style>
.region { -webkit-flow-from: foo; }
#container {
font: 20px/1 Ahem;
width: 100px;
height: 100px;
background-color: green;
}
#container::before {
content: "AAAAA";
display: block;
}
#container::after {
content: "AAAAA";
display: block;
}
</style>
</head>
<body>
<p>Test that the pseudo-elements children of a region are properly laid out after the region becomes an ordinary element.</p>
<p>On success, you see a green rectangle with a black stripe on top.</p>
<div id="container" class="region"></div>
<script>
document.body.offsetTop;
document.getElementById("container").className = "";
</script>
</body>
</html>
2014-01-22 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Incorrect layout of a region pseudo children
https://bugs.webkit.org/show_bug.cgi?id=126146
Reviewed by David Hyatt.
Test: fast/regions/collapse-anonymous-region.html
A region behaviour, styled using -webkit-flow-from, is modeled using an anonymous
block created to fragment the named flow content inside the region. We have to prevent
the behaviour of anonymous children collapsing for this block to make sure that the
region element children are still laid out properly when the region element becomes an ordinary
element.
* rendering/RenderBlockFlow.h:
2014-01-21 Ryuan Choi <ryuan.choi@samsung.com>
Remove unused "acceleratedCompositingForScrollableFramesEnabled" setting
......@@ -266,6 +266,7 @@ public:
}
void layoutLineGridBox();
virtual bool canCollapseAnonymousBlockChild() const override { return !renderNamedFlowFragment(); }
RenderNamedFlowFragment* renderNamedFlowFragment() const { return hasRareBlockFlowData() ? rareBlockFlowData()->m_renderNamedFlowFragment : nullptr; }
void setRenderNamedFlowFragment(RenderNamedFlowFragment*);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment