Title: [257928] trunk
Revision
257928
Author
[email protected]
Date
2020-03-05 10:38:30 -0800 (Thu, 05 Mar 2020)

Log Message

[LFC][Integration] Reset position style on line breaks.
https://bugs.webkit.org/show_bug.cgi?id=208646
<rdar://problem/60086589>

Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/inline/out-of-flow-positioned-line-break.html

We need to treat line breaks as statically positioned inline content.
In the long run we should do something along these lines:
https://github.com/w3c/csswg-drafts/issues/610

* layout/integration/LayoutIntegrationBoxTree.cpp:
(WebCore::LayoutIntegration::BoxTree::buildTree):

LayoutTests:

* fast/inline/out-of-flow-positioned-line-break-expected.txt: Added.
* fast/inline/out-of-flow-positioned-line-break.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (257927 => 257928)


--- trunk/LayoutTests/ChangeLog	2020-03-05 18:28:43 UTC (rev 257927)
+++ trunk/LayoutTests/ChangeLog	2020-03-05 18:38:30 UTC (rev 257928)
@@ -1,5 +1,16 @@
 2020-03-05  Zalan Bujtas  <[email protected]>
 
+        [LFC][Integration] Reset position style on line breaks.
+        https://bugs.webkit.org/show_bug.cgi?id=208646
+        <rdar://problem/60086589>
+
+        Reviewed by Antti Koivisto.
+
+        * fast/inline/out-of-flow-positioned-line-break-expected.txt: Added.
+        * fast/inline/out-of-flow-positioned-line-break.html: Added.
+
+2020-03-05  Zalan Bujtas  <[email protected]>
+
         [LFC][Invalidation] Incoming image data should invalidate layout tree content
         https://bugs.webkit.org/show_bug.cgi?id=208640
         <rdar://problem/60083229>

Added: trunk/LayoutTests/fast/inline/out-of-flow-positioned-line-break-expected.txt (0 => 257928)


--- trunk/LayoutTests/fast/inline/out-of-flow-positioned-line-break-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/inline/out-of-flow-positioned-line-break-expected.txt	2020-03-05 18:38:30 UTC (rev 257928)
@@ -0,0 +1,2 @@
+
+Pass if no crash or assert when line break is out-of-flow positioned.

Added: trunk/LayoutTests/fast/inline/out-of-flow-positioned-line-break.html (0 => 257928)


--- trunk/LayoutTests/fast/inline/out-of-flow-positioned-line-break.html	                        (rev 0)
+++ trunk/LayoutTests/fast/inline/out-of-flow-positioned-line-break.html	2020-03-05 18:38:30 UTC (rev 257928)
@@ -0,0 +1,11 @@
+<style>
+br {
+    position:absolute;
+}
+</style>
+<div><br></div>
+<div>Pass if no crash or assert when line break is out-of-flow positioned.</div>
+<script>
+if (window.testRunner)
+    testRunner.dumpAsText();
+</script>

Modified: trunk/Source/WebCore/ChangeLog (257927 => 257928)


--- trunk/Source/WebCore/ChangeLog	2020-03-05 18:28:43 UTC (rev 257927)
+++ trunk/Source/WebCore/ChangeLog	2020-03-05 18:38:30 UTC (rev 257928)
@@ -1,3 +1,20 @@
+2020-03-05  Zalan Bujtas  <[email protected]>
+
+        [LFC][Integration] Reset position style on line breaks.
+        https://bugs.webkit.org/show_bug.cgi?id=208646
+        <rdar://problem/60086589>
+
+        Reviewed by Antti Koivisto.
+
+        Test: fast/inline/out-of-flow-positioned-line-break.html
+
+        We need to treat line breaks as statically positioned inline content.
+        In the long run we should do something along these lines:
+        https://github.com/w3c/csswg-drafts/issues/610
+
+        * layout/integration/LayoutIntegrationBoxTree.cpp:
+        (WebCore::LayoutIntegration::BoxTree::buildTree):
+
 2020-03-05  Eric Carlson  <[email protected]>
 
         Some media tests crash when run in the GPU process

Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp (257927 => 257928)


--- trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp	2020-03-05 18:28:43 UTC (rev 257927)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp	2020-03-05 18:38:30 UTC (rev 257928)
@@ -66,6 +66,7 @@
             auto clonedStyle = RenderStyle::clone(childRenderer.style());
             clonedStyle.setDisplay(DisplayType::Inline);
             clonedStyle.setFloating(Float::No);
+            clonedStyle.setPosition(PositionType::Static);
             childBox = makeUnique<Layout::LineBreakBox>(downcast<RenderLineBreak>(childRenderer).isWBR(), WTFMove(clonedStyle));
         }
         ASSERT(childBox);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to