Title: [253326] trunk
Revision
253326
Author
[email protected]
Date
2019-12-10 08:57:44 -0800 (Tue, 10 Dec 2019)

Log Message

Source/WebCore:
Remove behavior that makes <br> boxes 0-height in quirks mode
https://bugs.webkit.org/show_bug.cgi?id=205004

Reviewed by Zalan Bujtas.

Implementation of the <br> quirk includes zeroing its height. This has no layout or rendering effects,
it exists purely to maintain render tree dump output for tests.

This patch removes this behavior but maintains the render tree dump output on the RenderTreeAsText
level (thus avoiding giant test rebasing), and makes it easier to get the same output from all paths.

* rendering/InlineBox.cpp:
(WebCore::InlineBox::logicalHeight const):
(WebCore::InlineBox::baselinePosition const):
(WebCore::InlineBox::lineHeight const):

Remove the hack from line boxes.

* rendering/RenderLineBreak.cpp:
(WebCore::RenderLineBreak::boundingBoxForRenderTreeDump const):

Add special bounding box code for this case.
This can be removed in future with a test rebase.

* rendering/RenderLineBreak.h:
* rendering/RenderTreeAsText.cpp:
(WebCore::RenderTreeAsText::writeRenderObject):
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::RunResolver::Run::rect const):

Remove the hack from simple lines.

(WebCore::SimpleLineLayout::RunResolver::RunResolver):
* rendering/SimpleLineLayoutResolver.h:
(WebCore::SimpleLineLayout::RunResolver::Run::baselineOffset const):
(WebCore::SimpleLineLayout::RunResolver::Iterator::atBegin const):
* rendering/line/LineLayoutTraversal.h:
(WebCore::LineLayoutTraversal::Box::baselineOffset const):
(WebCore::LineLayoutTraversal::Box::isHorizontal const):
(WebCore::LineLayoutTraversal::Box::useLineBreakBoxRenderTreeDumpQuirk const):
* rendering/line/LineLayoutTraversalComplexPath.h:
(WebCore::LineLayoutTraversal::ComplexPath::isHorizontal const):
(WebCore::LineLayoutTraversal::ComplexPath::baselineOffset const):
(WebCore::LineLayoutTraversal::ComplexPath::useLineBreakBoxRenderTreeDumpQuirk const):
* rendering/line/LineLayoutTraversalDisplayRunPath.h:
(WebCore::LineLayoutTraversal::DisplayRunPath::baselineOffset const):
(WebCore::LineLayoutTraversal::DisplayRunPath::isHorizontal const):
(WebCore::LineLayoutTraversal::DisplayRunPath::useLineBreakBoxRenderTreeDumpQuirk const):
(WebCore::LineLayoutTraversal::DisplayRunPath::isLastOnLine const):
(WebCore::LineLayoutTraversal::DisplayRunPath::lineBox const):
* rendering/line/LineLayoutTraversalSimplePath.h:
(WebCore::LineLayoutTraversal::SimplePath::baselineOffset const):
(WebCore::LineLayoutTraversal::SimplePath::isHorizontal const):
(WebCore::LineLayoutTraversal::SimplePath::useLineBreakBoxRenderTreeDumpQuirk const):

LayoutTests:
Remove hack that makes <br> boxes 0-height in quirks mode
https://bugs.webkit.org/show_bug.cgi?id=205004

Reviewed by Zalan Bujtas.

A few changes due to aligning simple line path with complex, rounding, and some vertical text details.

* fast/multicol/pagination-h-horizontal-bt-expected.txt:
* fast/multicol/pagination-v-horizontal-bt-expected.txt:
* fast/ruby/position-after-expected.txt:
* platform/ios/fast/writing-mode/border-styles-vertical-lr-expected.txt:
* platform/ios/fast/writing-mode/english-bt-text-expected.txt:
* platform/ios/tables/mozilla_expected_failures/bugs/bug56024-expected.txt:
* platform/mac/fast/text/international/bidi-layout-across-linebreak-expected.txt:
* platform/mac/fast/text/svg-font-face-with-kerning-expected.txt:
* platform/mac/fast/writing-mode/border-styles-vertical-lr-expected.txt:
* platform/mac/fast/writing-mode/english-bt-text-expected.txt:
* platform/mac/fast/writing-mode/text-orientation-basic-expected.txt:
* platform/mac/tables/mozilla_expected_failures/bugs/bug56024-expected.txt:
* platform/win/fast/text/international/bidi-layout-across-linebreak-expected.txt:
* platform/win/fast/writing-mode/english-bt-text-expected.txt:
* platform/win/fast/writing-mode/text-orientation-basic-expected.txt:
* platform/win/tables/mozilla_expected_failures/bugs/bug56024-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (253325 => 253326)


--- trunk/LayoutTests/ChangeLog	2019-12-10 16:13:04 UTC (rev 253325)
+++ trunk/LayoutTests/ChangeLog	2019-12-10 16:57:44 UTC (rev 253326)
@@ -1,3 +1,29 @@
+2019-12-10  Antti Koivisto  <[email protected]>
+
+        Remove hack that makes <br> boxes 0-height in quirks mode
+        https://bugs.webkit.org/show_bug.cgi?id=205004
+
+        Reviewed by Zalan Bujtas.
+
+        A few changes due to aligning simple line path with complex, rounding, and some vertical text details.
+
+        * fast/multicol/pagination-h-horizontal-bt-expected.txt:
+        * fast/multicol/pagination-v-horizontal-bt-expected.txt:
+        * fast/ruby/position-after-expected.txt:
+        * platform/ios/fast/writing-mode/border-styles-vertical-lr-expected.txt:
+        * platform/ios/fast/writing-mode/english-bt-text-expected.txt:
+        * platform/ios/tables/mozilla_expected_failures/bugs/bug56024-expected.txt:
+        * platform/mac/fast/text/international/bidi-layout-across-linebreak-expected.txt:
+        * platform/mac/fast/text/svg-font-face-with-kerning-expected.txt:
+        * platform/mac/fast/writing-mode/border-styles-vertical-lr-expected.txt:
+        * platform/mac/fast/writing-mode/english-bt-text-expected.txt:
+        * platform/mac/fast/writing-mode/text-orientation-basic-expected.txt:
+        * platform/mac/tables/mozilla_expected_failures/bugs/bug56024-expected.txt:
+        * platform/win/fast/text/international/bidi-layout-across-linebreak-expected.txt:
+        * platform/win/fast/writing-mode/english-bt-text-expected.txt:
+        * platform/win/fast/writing-mode/text-orientation-basic-expected.txt:
+        * platform/win/tables/mozilla_expected_failures/bugs/bug56024-expected.txt:
+        
 2019-12-09  Patrick Griffis  <[email protected]>
 
         Import secure cookie tests from WPT

Modified: trunk/LayoutTests/fast/multicol/pagination-h-horizontal-bt-expected.txt (253325 => 253326)


--- trunk/LayoutTests/fast/multicol/pagination-h-horizontal-bt-expected.txt	2019-12-10 16:13:04 UTC (rev 253325)
+++ trunk/LayoutTests/fast/multicol/pagination-h-horizontal-bt-expected.txt	2019-12-10 16:57:44 UTC (rev 253326)
@@ -19,8 +19,8 @@
         RenderBR {BR} at (3,453) size 0x50
         RenderText {#text} at (3,503) size 250x50
           text run at (3,503) width 250: "Lorem"
-        RenderBR {BR} at (253,513) size 0x0
+        RenderBR {BR} at (253,543) size 0x0
         RenderInline {SPAN} at (0,0) size 250x50 [color=#FF0000]
           RenderText {#text} at (3,577) size 250x50
             text run at (3,577) width 250: "ipsum"
-          RenderBR {BR} at (253,587) size 0x0
+          RenderBR {BR} at (253,617) size 0x0

Modified: trunk/LayoutTests/fast/multicol/pagination-v-horizontal-bt-expected.txt (253325 => 253326)


--- trunk/LayoutTests/fast/multicol/pagination-v-horizontal-bt-expected.txt	2019-12-10 16:13:04 UTC (rev 253325)
+++ trunk/LayoutTests/fast/multicol/pagination-v-horizontal-bt-expected.txt	2019-12-10 16:57:44 UTC (rev 253326)
@@ -19,8 +19,8 @@
         RenderBR {BR} at (3,453) size 0x50
         RenderText {#text} at (3,503) size 250x50
           text run at (3,503) width 250: "Lorem"
-        RenderBR {BR} at (253,513) size 0x0
+        RenderBR {BR} at (253,543) size 0x0
         RenderInline {SPAN} at (0,0) size 250x50 [color=#FF0000]
           RenderText {#text} at (3,592) size 250x50
             text run at (3,592) width 250: "ipsum"
-          RenderBR {BR} at (253,602) size 0x0
+          RenderBR {BR} at (253,632) size 0x0

Modified: trunk/LayoutTests/fast/ruby/position-after-expected.txt (253325 => 253326)


--- trunk/LayoutTests/fast/ruby/position-after-expected.txt	2019-12-10 16:13:04 UTC (rev 253325)
+++ trunk/LayoutTests/fast/ruby/position-after-expected.txt	2019-12-10 16:57:44 UTC (rev 253326)
@@ -88,7 +88,7 @@
               RenderRubyText {RT} at (0,-20) size 100x20 [color=#FFA500]
                 RenderText {#text} at (45,0) size 10x10
                   text run at (45,0) width 10: "y"
-                RenderBR {BR} at (55,2) size 0x0
+                RenderBR {BR} at (55,8) size 0x0
                 RenderText {#text} at (45,10) size 10x10
                   text run at (45,10) width 10: "y"
               RenderRubyBase (anonymous) at (0,0) size 100x20

Modified: trunk/LayoutTests/platform/ios/fast/writing-mode/border-styles-vertical-lr-expected.txt (253325 => 253326)


--- trunk/LayoutTests/platform/ios/fast/writing-mode/border-styles-vertical-lr-expected.txt	2019-12-10 16:13:04 UTC (rev 253325)
+++ trunk/LayoutTests/platform/ios/fast/writing-mode/border-styles-vertical-lr-expected.txt	2019-12-10 16:57:44 UTC (rev 253326)
@@ -5,10 +5,10 @@
     RenderBody {BODY} at (20,8) size 760x584
       RenderBlock {DIV} at (0,20) size 256x544
         RenderBlock {DIV} at (0,0) size 256x83
-          RenderInline {SPAN} at (0,0) size 240x83 [bgcolor=#DDDDDD] [border: (20px solid #808080)]
-            RenderText {#text} at (28,35) size 72x48
-              text run at (28,35) width 48: "   "
-            RenderBR {BR} at (42,83) size 0x0
+          RenderInline {SPAN} at (0,0) size 248x83 [bgcolor=#DDDDDD] [border: (20px solid #808080)]
+            RenderText {#text} at (20,35) size 72x48
+              text run at (20,35) width 48: "   "
+            RenderBR {BR} at (34,83) size 0x0
             RenderText {#text} at (156,0) size 72x48
               text run at (156,0) width 48: "   "
           RenderText {#text} at (0,0) size 0x0
@@ -15,10 +15,10 @@
         RenderText {#text} at (166,83) size 19x4
           text run at (166,83) width 4: " "
         RenderBlock {DIV} at (0,87) size 256x83
-          RenderInline {SPAN} at (0,0) size 240x83 [bgcolor=#DDDDDD] [border: (20px groove #808080)]
-            RenderText {#text} at (28,35) size 72x48
-              text run at (28,35) width 48: "   "
-            RenderBR {BR} at (42,83) size 0x0
+          RenderInline {SPAN} at (0,0) size 248x83 [bgcolor=#DDDDDD] [border: (20px groove #808080)]
+            RenderText {#text} at (20,35) size 72x48
+              text run at (20,35) width 48: "   "
+            RenderBR {BR} at (34,83) size 0x0
             RenderText {#text} at (156,0) size 72x48
               text run at (156,0) width 48: "   "
           RenderText {#text} at (0,0) size 0x0
@@ -25,10 +25,10 @@
         RenderText {#text} at (166,170) size 19x4
           text run at (166,170) width 4: " "
         RenderBlock {DIV} at (0,174) size 256x83
-          RenderInline {SPAN} at (0,0) size 240x83 [bgcolor=#DDDDDD] [border: (20px ridge #808080)]
-            RenderText {#text} at (28,35) size 72x48
-              text run at (28,35) width 48: "   "
-            RenderBR {BR} at (42,83) size 0x0
+          RenderInline {SPAN} at (0,0) size 248x83 [bgcolor=#DDDDDD] [border: (20px ridge #808080)]
+            RenderText {#text} at (20,35) size 72x48
+              text run at (20,35) width 48: "   "
+            RenderBR {BR} at (34,83) size 0x0
             RenderText {#text} at (156,0) size 72x48
               text run at (156,0) width 48: "   "
           RenderText {#text} at (0,0) size 0x0
@@ -35,10 +35,10 @@
         RenderText {#text} at (166,257) size 19x4
           text run at (166,257) width 4: " "
         RenderBlock {DIV} at (0,261) size 256x83
-          RenderInline {SPAN} at (0,0) size 240x83 [bgcolor=#DDDDDD] [border: (20px outset #808080)]
-            RenderText {#text} at (28,35) size 72x48
-              text run at (28,35) width 48: "   "
-            RenderBR {BR} at (42,83) size 0x0
+          RenderInline {SPAN} at (0,0) size 248x83 [bgcolor=#DDDDDD] [border: (20px outset #808080)]
+            RenderText {#text} at (20,35) size 72x48
+              text run at (20,35) width 48: "   "
+            RenderBR {BR} at (34,83) size 0x0
             RenderText {#text} at (156,0) size 72x48
               text run at (156,0) width 48: "   "
           RenderText {#text} at (0,0) size 0x0
@@ -45,10 +45,10 @@
         RenderText {#text} at (166,344) size 19x4
           text run at (166,344) width 4: " "
         RenderBlock {DIV} at (0,348) size 256x83
-          RenderInline {SPAN} at (0,0) size 240x83 [bgcolor=#DDDDDD] [border: (20px inset #808080)]
-            RenderText {#text} at (28,35) size 72x48
-              text run at (28,35) width 48: "   "
-            RenderBR {BR} at (42,83) size 0x0
+          RenderInline {SPAN} at (0,0) size 248x83 [bgcolor=#DDDDDD] [border: (20px inset #808080)]
+            RenderText {#text} at (20,35) size 72x48
+              text run at (20,35) width 48: "   "
+            RenderBR {BR} at (34,83) size 0x0
             RenderText {#text} at (156,0) size 72x48
               text run at (156,0) width 48: "   "
           RenderText {#text} at (0,0) size 0x0
@@ -55,10 +55,10 @@
         RenderText {#text} at (166,431) size 19x4
           text run at (166,431) width 4: " "
         RenderBlock {DIV} at (0,435) size 256x83
-          RenderInline {SPAN} at (0,0) size 240x83 [bgcolor=#DDDDDD] [border: (20px double #808080)]
-            RenderText {#text} at (28,35) size 72x48
-              text run at (28,35) width 48: "   "
-            RenderBR {BR} at (42,83) size 0x0
+          RenderInline {SPAN} at (0,0) size 248x83 [bgcolor=#DDDDDD] [border: (20px double #808080)]
+            RenderText {#text} at (20,35) size 72x48
+              text run at (20,35) width 48: "   "
+            RenderBR {BR} at (34,83) size 0x0
             RenderText {#text} at (156,0) size 72x48
               text run at (156,0) width 48: "   "
           RenderText {#text} at (0,0) size 0x0
@@ -65,10 +65,10 @@
         RenderText {#text} at (0,0) size 0x0
       RenderBlock {DIV} at (276,20) size 256x544
         RenderBlock {DIV} at (0,0) size 256x83
-          RenderInline {SPAN} at (0,0) size 240x83 [bgcolor=#DDDDDD] [border: (20px solid #808080)]
-            RenderText {#text} at (28,35) size 72x48
-              text run at (28,35) width 48: "   "
-            RenderBR {BR} at (42,83) size 0x0
+          RenderInline {SPAN} at (0,0) size 248x83 [bgcolor=#DDDDDD] [border: (20px solid #808080)]
+            RenderText {#text} at (20,35) size 72x48
+              text run at (20,35) width 48: "   "
+            RenderBR {BR} at (34,83) size 0x0
             RenderText {#text} at (156,0) size 72x48
               text run at (156,0) width 48: "   "
           RenderText {#text} at (0,0) size 0x0
@@ -75,10 +75,10 @@
         RenderText {#text} at (166,83) size 19x4
           text run at (166,83) width 4: " "
         RenderBlock {DIV} at (0,87) size 256x83
-          RenderInline {SPAN} at (0,0) size 240x83 [bgcolor=#DDDDDD] [border: (20px groove #808080)]
-            RenderText {#text} at (28,35) size 72x48
-              text run at (28,35) width 48: "   "
-            RenderBR {BR} at (42,83) size 0x0
+          RenderInline {SPAN} at (0,0) size 248x83 [bgcolor=#DDDDDD] [border: (20px groove #808080)]
+            RenderText {#text} at (20,35) size 72x48
+              text run at (20,35) width 48: "   "
+            RenderBR {BR} at (34,83) size 0x0
             RenderText {#text} at (156,0) size 72x48
               text run at (156,0) width 48: "   "
           RenderText {#text} at (0,0) size 0x0
@@ -85,10 +85,10 @@
         RenderText {#text} at (166,170) size 19x4
           text run at (166,170) width 4: " "
         RenderBlock {DIV} at (0,174) size 256x83
-          RenderInline {SPAN} at (0,0) size 240x83 [bgcolor=#DDDDDD] [border: (20px ridge #808080)]
-            RenderText {#text} at (28,35) size 72x48
-              text run at (28,35) width 48: "   "
-            RenderBR {BR} at (42,83) size 0x0
+          RenderInline {SPAN} at (0,0) size 248x83 [bgcolor=#DDDDDD] [border: (20px ridge #808080)]
+            RenderText {#text} at (20,35) size 72x48
+              text run at (20,35) width 48: "   "
+            RenderBR {BR} at (34,83) size 0x0
             RenderText {#text} at (156,0) size 72x48
               text run at (156,0) width 48: "   "
           RenderText {#text} at (0,0) size 0x0
@@ -95,10 +95,10 @@
         RenderText {#text} at (166,257) size 19x4
           text run at (166,257) width 4: " "
         RenderBlock {DIV} at (0,261) size 256x83
-          RenderInline {SPAN} at (0,0) size 240x83 [bgcolor=#DDDDDD] [border: (20px outset #808080)]
-            RenderText {#text} at (28,35) size 72x48
-              text run at (28,35) width 48: "   "
-            RenderBR {BR} at (42,83) size 0x0
+          RenderInline {SPAN} at (0,0) size 248x83 [bgcolor=#DDDDDD] [border: (20px outset #808080)]
+            RenderText {#text} at (20,35) size 72x48
+              text run at (20,35) width 48: "   "
+            RenderBR {BR} at (34,83) size 0x0
             RenderText {#text} at (156,0) size 72x48
               text run at (156,0) width 48: "   "
           RenderText {#text} at (0,0) size 0x0
@@ -105,10 +105,10 @@
         RenderText {#text} at (166,344) size 19x4
           text run at (166,344) width 4: " "
         RenderBlock {DIV} at (0,348) size 256x83
-          RenderInline {SPAN} at (0,0) size 240x83 [bgcolor=#DDDDDD] [border: (20px inset #808080)]
-            RenderText {#text} at (28,35) size 72x48
-              text run at (28,35) width 48: "   "
-            RenderBR {BR} at (42,83) size 0x0
+          RenderInline {SPAN} at (0,0) size 248x83 [bgcolor=#DDDDDD] [border: (20px inset #808080)]
+            RenderText {#text} at (20,35) size 72x48
+              text run at (20,35) width 48: "   "
+            RenderBR {BR} at (34,83) size 0x0
             RenderText {#text} at (156,0) size 72x48
               text run at (156,0) width 48: "   "
           RenderText {#text} at (0,0) size 0x0
@@ -115,10 +115,10 @@
         RenderText {#text} at (166,431) size 19x4
           text run at (166,431) width 4: " "
         RenderBlock {DIV} at (0,435) size 256x83
-          RenderInline {SPAN} at (0,0) size 240x83 [bgcolor=#DDDDDD] [border: (20px double #808080)]
-            RenderText {#text} at (28,35) size 72x48
-              text run at (28,35) width 48: "   "
-            RenderBR {BR} at (42,83) size 0x0
+          RenderInline {SPAN} at (0,0) size 248x83 [bgcolor=#DDDDDD] [border: (20px double #808080)]
+            RenderText {#text} at (20,35) size 72x48
+              text run at (20,35) width 48: "   "
+            RenderBR {BR} at (34,83) size 0x0
             RenderText {#text} at (156,0) size 72x48
               text run at (156,0) width 48: "   "
           RenderText {#text} at (0,0) size 0x0

Modified: trunk/LayoutTests/platform/ios/fast/writing-mode/english-bt-text-expected.txt (253325 => 253326)


--- trunk/LayoutTests/platform/ios/fast/writing-mode/english-bt-text-expected.txt	2019-12-10 16:13:04 UTC (rev 253325)
+++ trunk/LayoutTests/platform/ios/fast/writing-mode/english-bt-text-expected.txt	2019-12-10 16:57:44 UTC (rev 253326)
@@ -8,6 +8,6 @@
         RenderText {#text} at (2,2) size 543x19
           text run at (2,2) width 306: "Here is some text in a horizontal-bt block flow. "
           text run at (307,2) width 238: "The block direction is bottom-to-top."
-        RenderBR {BR} at (544,6) size 1x0
+        RenderBR {BR} at (544,17) size 1x0
         RenderText {#text} at (2,22) size 225x19
           text run at (2,22) width 225: "This line should also be horizontal."

Modified: trunk/LayoutTests/platform/ios/tables/mozilla_expected_failures/bugs/bug56024-expected.txt (253325 => 253326)


--- trunk/LayoutTests/platform/ios/tables/mozilla_expected_failures/bugs/bug56024-expected.txt	2019-12-10 16:13:04 UTC (rev 253325)
+++ trunk/LayoutTests/platform/ios/tables/mozilla_expected_failures/bugs/bug56024-expected.txt	2019-12-10 16:57:44 UTC (rev 253326)
@@ -16,7 +16,7 @@
                         text run at (1,21) width 250: "Al Gore are expected to show a kinder,"
                         text run at (1,41) width 294: "gentler side Wednesday in the second of three"
                         text run at (1,61) width 185: "nationally televised debates. "
-                      RenderBR {BR} at (185,61) size 1x19
+                      RenderBR {BR} at (185,76) size 1x0
             RenderTableCell {TD} at (302,2) size 96x82 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
               RenderBlock (anonymous) at (1,1) size 94x80
                 RenderInline {FONT} at (0,0) size 84x79 [color=#CC3333]

Modified: trunk/LayoutTests/platform/mac/fast/text/international/bidi-layout-across-linebreak-expected.txt (253325 => 253326)


--- trunk/LayoutTests/platform/mac/fast/text/international/bidi-layout-across-linebreak-expected.txt	2019-12-10 16:13:04 UTC (rev 253325)
+++ trunk/LayoutTests/platform/mac/fast/text/international/bidi-layout-across-linebreak-expected.txt	2019-12-10 16:57:44 UTC (rev 253326)
@@ -165,7 +165,7 @@
             RenderTableCell {TD} at (47,269) size 46x41 [border: (1px solid #008000)] [r=7 c=1 rs=1 cs=1]
               RenderText {#text} at (3,3) size 20x18
                 text run at (3,3) width 20: "a ("
-              RenderBR {BR} at (22,3) size 1x18
+              RenderBR {BR} at (22,18) size 1x0
               RenderText {#text} at (3,21) size 21x18
                 text run at (3,21) width 21: "] b"
             RenderTableCell {TD} at (92,269) size 35x41 [border: (1px solid #008000)] [r=7 c=2 rs=1 cs=1]

Modified: trunk/LayoutTests/platform/mac/fast/text/svg-font-face-with-kerning-expected.txt (253325 => 253326)


--- trunk/LayoutTests/platform/mac/fast/text/svg-font-face-with-kerning-expected.txt	2019-12-10 16:13:04 UTC (rev 253325)
+++ trunk/LayoutTests/platform/mac/fast/text/svg-font-face-with-kerning-expected.txt	2019-12-10 16:57:44 UTC (rev 253326)
@@ -7,7 +7,7 @@
         RenderText {#text} at (0,1) size 207x34
           text run at (0,1) width 207: "This is a test of kerning when"
           text run at (0,19) width 157: "using SVG web fonts. "
-        RenderBR {BR} at (156,32) size 1x0
+        RenderBR {BR} at (156,33) size 1x0
         RenderBR {BR} at (0,37) size 0x16
         RenderText {#text} at (0,55) size 230x34
           text run at (0,55) width 230: "Wow, The V/A Team's Task Was"

Modified: trunk/LayoutTests/platform/mac/fast/writing-mode/border-styles-vertical-lr-expected.txt (253325 => 253326)


--- trunk/LayoutTests/platform/mac/fast/writing-mode/border-styles-vertical-lr-expected.txt	2019-12-10 16:13:04 UTC (rev 253325)
+++ trunk/LayoutTests/platform/mac/fast/writing-mode/border-styles-vertical-lr-expected.txt	2019-12-10 16:57:44 UTC (rev 253326)
@@ -5,10 +5,10 @@
     RenderBody {BODY} at (20,8) size 760x584
       RenderBlock {DIV} at (0,20) size 256x544
         RenderBlock {DIV} at (0,0) size 256x83
-          RenderInline {SPAN} at (0,0) size 242x83 [bgcolor=#DDDDDD] [border: (20px solid #808080)]
-            RenderText {#text} at (27,35) size 74x48
-              text run at (27,35) width 48: "   "
-            RenderBR {BR} at (43,83) size 0x0
+          RenderInline {SPAN} at (0,0) size 249x83 [bgcolor=#DDDDDD] [border: (20px solid #808080)]
+            RenderText {#text} at (20,35) size 74x48
+              text run at (20,35) width 48: "   "
+            RenderBR {BR} at (36,83) size 0x0
             RenderText {#text} at (155,0) size 74x48
               text run at (155,0) width 48: "   "
           RenderText {#text} at (0,0) size 0x0
@@ -15,10 +15,10 @@
         RenderText {#text} at (167,83) size 18x4
           text run at (167,83) width 4: " "
         RenderBlock {DIV} at (0,87) size 256x83
-          RenderInline {SPAN} at (0,0) size 242x83 [bgcolor=#DDDDDD] [border: (20px groove #808080)]
-            RenderText {#text} at (27,35) size 74x48
-              text run at (27,35) width 48: "   "
-            RenderBR {BR} at (43,83) size 0x0
+          RenderInline {SPAN} at (0,0) size 249x83 [bgcolor=#DDDDDD] [border: (20px groove #808080)]
+            RenderText {#text} at (20,35) size 74x48
+              text run at (20,35) width 48: "   "
+            RenderBR {BR} at (36,83) size 0x0
             RenderText {#text} at (155,0) size 74x48
               text run at (155,0) width 48: "   "
           RenderText {#text} at (0,0) size 0x0
@@ -25,10 +25,10 @@
         RenderText {#text} at (167,170) size 18x4
           text run at (167,170) width 4: " "
         RenderBlock {DIV} at (0,174) size 256x83
-          RenderInline {SPAN} at (0,0) size 242x83 [bgcolor=#DDDDDD] [border: (20px ridge #808080)]
-            RenderText {#text} at (27,35) size 74x48
-              text run at (27,35) width 48: "   "
-            RenderBR {BR} at (43,83) size 0x0
+          RenderInline {SPAN} at (0,0) size 249x83 [bgcolor=#DDDDDD] [border: (20px ridge #808080)]
+            RenderText {#text} at (20,35) size 74x48
+              text run at (20,35) width 48: "   "
+            RenderBR {BR} at (36,83) size 0x0
             RenderText {#text} at (155,0) size 74x48
               text run at (155,0) width 48: "   "
           RenderText {#text} at (0,0) size 0x0
@@ -35,10 +35,10 @@
         RenderText {#text} at (167,257) size 18x4
           text run at (167,257) width 4: " "
         RenderBlock {DIV} at (0,261) size 256x83
-          RenderInline {SPAN} at (0,0) size 242x83 [bgcolor=#DDDDDD] [border: (20px outset #808080)]
-            RenderText {#text} at (27,35) size 74x48
-              text run at (27,35) width 48: "   "
-            RenderBR {BR} at (43,83) size 0x0
+          RenderInline {SPAN} at (0,0) size 249x83 [bgcolor=#DDDDDD] [border: (20px outset #808080)]
+            RenderText {#text} at (20,35) size 74x48
+              text run at (20,35) width 48: "   "
+            RenderBR {BR} at (36,83) size 0x0
             RenderText {#text} at (155,0) size 74x48
               text run at (155,0) width 48: "   "
           RenderText {#text} at (0,0) size 0x0
@@ -45,10 +45,10 @@
         RenderText {#text} at (167,344) size 18x4
           text run at (167,344) width 4: " "
         RenderBlock {DIV} at (0,348) size 256x83
-          RenderInline {SPAN} at (0,0) size 242x83 [bgcolor=#DDDDDD] [border: (20px inset #808080)]
-            RenderText {#text} at (27,35) size 74x48
-              text run at (27,35) width 48: "   "
-            RenderBR {BR} at (43,83) size 0x0
+          RenderInline {SPAN} at (0,0) size 249x83 [bgcolor=#DDDDDD] [border: (20px inset #808080)]
+            RenderText {#text} at (20,35) size 74x48
+              text run at (20,35) width 48: "   "
+            RenderBR {BR} at (36,83) size 0x0
             RenderText {#text} at (155,0) size 74x48
               text run at (155,0) width 48: "   "
           RenderText {#text} at (0,0) size 0x0
@@ -55,10 +55,10 @@
         RenderText {#text} at (167,431) size 18x4
           text run at (167,431) width 4: " "
         RenderBlock {DIV} at (0,435) size 256x83
-          RenderInline {SPAN} at (0,0) size 242x83 [bgcolor=#DDDDDD] [border: (20px double #808080)]
-            RenderText {#text} at (27,35) size 74x48
-              text run at (27,35) width 48: "   "
-            RenderBR {BR} at (43,83) size 0x0
+          RenderInline {SPAN} at (0,0) size 249x83 [bgcolor=#DDDDDD] [border: (20px double #808080)]
+            RenderText {#text} at (20,35) size 74x48
+              text run at (20,35) width 48: "   "
+            RenderBR {BR} at (36,83) size 0x0
             RenderText {#text} at (155,0) size 74x48
               text run at (155,0) width 48: "   "
           RenderText {#text} at (0,0) size 0x0
@@ -65,10 +65,10 @@
         RenderText {#text} at (0,0) size 0x0
       RenderBlock {DIV} at (276,20) size 256x544
         RenderBlock {DIV} at (0,0) size 256x83
-          RenderInline {SPAN} at (0,0) size 242x83 [bgcolor=#DDDDDD] [border: (20px solid #808080)]
-            RenderText {#text} at (27,35) size 74x48
-              text run at (27,35) width 48: "   "
-            RenderBR {BR} at (43,83) size 0x0
+          RenderInline {SPAN} at (0,0) size 249x83 [bgcolor=#DDDDDD] [border: (20px solid #808080)]
+            RenderText {#text} at (20,35) size 74x48
+              text run at (20,35) width 48: "   "
+            RenderBR {BR} at (36,83) size 0x0
             RenderText {#text} at (155,0) size 74x48
               text run at (155,0) width 48: "   "
           RenderText {#text} at (0,0) size 0x0
@@ -75,10 +75,10 @@
         RenderText {#text} at (167,83) size 18x4
           text run at (167,83) width 4: " "
         RenderBlock {DIV} at (0,87) size 256x83
-          RenderInline {SPAN} at (0,0) size 242x83 [bgcolor=#DDDDDD] [border: (20px groove #808080)]
-            RenderText {#text} at (27,35) size 74x48
-              text run at (27,35) width 48: "   "
-            RenderBR {BR} at (43,83) size 0x0
+          RenderInline {SPAN} at (0,0) size 249x83 [bgcolor=#DDDDDD] [border: (20px groove #808080)]
+            RenderText {#text} at (20,35) size 74x48
+              text run at (20,35) width 48: "   "
+            RenderBR {BR} at (36,83) size 0x0
             RenderText {#text} at (155,0) size 74x48
               text run at (155,0) width 48: "   "
           RenderText {#text} at (0,0) size 0x0
@@ -85,10 +85,10 @@
         RenderText {#text} at (167,170) size 18x4
           text run at (167,170) width 4: " "
         RenderBlock {DIV} at (0,174) size 256x83
-          RenderInline {SPAN} at (0,0) size 242x83 [bgcolor=#DDDDDD] [border: (20px ridge #808080)]
-            RenderText {#text} at (27,35) size 74x48
-              text run at (27,35) width 48: "   "
-            RenderBR {BR} at (43,83) size 0x0
+          RenderInline {SPAN} at (0,0) size 249x83 [bgcolor=#DDDDDD] [border: (20px ridge #808080)]
+            RenderText {#text} at (20,35) size 74x48
+              text run at (20,35) width 48: "   "
+            RenderBR {BR} at (36,83) size 0x0
             RenderText {#text} at (155,0) size 74x48
               text run at (155,0) width 48: "   "
           RenderText {#text} at (0,0) size 0x0
@@ -95,10 +95,10 @@
         RenderText {#text} at (167,257) size 18x4
           text run at (167,257) width 4: " "
         RenderBlock {DIV} at (0,261) size 256x83
-          RenderInline {SPAN} at (0,0) size 242x83 [bgcolor=#DDDDDD] [border: (20px outset #808080)]
-            RenderText {#text} at (27,35) size 74x48
-              text run at (27,35) width 48: "   "
-            RenderBR {BR} at (43,83) size 0x0
+          RenderInline {SPAN} at (0,0) size 249x83 [bgcolor=#DDDDDD] [border: (20px outset #808080)]
+            RenderText {#text} at (20,35) size 74x48
+              text run at (20,35) width 48: "   "
+            RenderBR {BR} at (36,83) size 0x0
             RenderText {#text} at (155,0) size 74x48
               text run at (155,0) width 48: "   "
           RenderText {#text} at (0,0) size 0x0
@@ -105,10 +105,10 @@
         RenderText {#text} at (167,344) size 18x4
           text run at (167,344) width 4: " "
         RenderBlock {DIV} at (0,348) size 256x83
-          RenderInline {SPAN} at (0,0) size 242x83 [bgcolor=#DDDDDD] [border: (20px inset #808080)]
-            RenderText {#text} at (27,35) size 74x48
-              text run at (27,35) width 48: "   "
-            RenderBR {BR} at (43,83) size 0x0
+          RenderInline {SPAN} at (0,0) size 249x83 [bgcolor=#DDDDDD] [border: (20px inset #808080)]
+            RenderText {#text} at (20,35) size 74x48
+              text run at (20,35) width 48: "   "
+            RenderBR {BR} at (36,83) size 0x0
             RenderText {#text} at (155,0) size 74x48
               text run at (155,0) width 48: "   "
           RenderText {#text} at (0,0) size 0x0
@@ -115,10 +115,10 @@
         RenderText {#text} at (167,431) size 18x4
           text run at (167,431) width 4: " "
         RenderBlock {DIV} at (0,435) size 256x83
-          RenderInline {SPAN} at (0,0) size 242x83 [bgcolor=#DDDDDD] [border: (20px double #808080)]
-            RenderText {#text} at (27,35) size 74x48
-              text run at (27,35) width 48: "   "
-            RenderBR {BR} at (43,83) size 0x0
+          RenderInline {SPAN} at (0,0) size 249x83 [bgcolor=#DDDDDD] [border: (20px double #808080)]
+            RenderText {#text} at (20,35) size 74x48
+              text run at (20,35) width 48: "   "
+            RenderBR {BR} at (36,83) size 0x0
             RenderText {#text} at (155,0) size 74x48
               text run at (155,0) width 48: "   "
           RenderText {#text} at (0,0) size 0x0

Modified: trunk/LayoutTests/platform/mac/fast/writing-mode/english-bt-text-expected.txt (253325 => 253326)


--- trunk/LayoutTests/platform/mac/fast/writing-mode/english-bt-text-expected.txt	2019-12-10 16:13:04 UTC (rev 253325)
+++ trunk/LayoutTests/platform/mac/fast/writing-mode/english-bt-text-expected.txt	2019-12-10 16:57:44 UTC (rev 253326)
@@ -8,6 +8,6 @@
         RenderText {#text} at (2,2) size 542x18
           text run at (2,2) width 305: "Here is some text in a horizontal-bt block flow. "
           text run at (306,2) width 238: "The block direction is bottom-to-top."
-        RenderBR {BR} at (543,6) size 1x0
+        RenderBR {BR} at (543,16) size 1x0
         RenderText {#text} at (2,20) size 225x18
           text run at (2,20) width 225: "This line should also be horizontal."

Modified: trunk/LayoutTests/platform/mac/fast/writing-mode/text-orientation-basic-expected.txt (253325 => 253326)


--- trunk/LayoutTests/platform/mac/fast/writing-mode/text-orientation-basic-expected.txt	2019-12-10 16:13:04 UTC (rev 253325)
+++ trunk/LayoutTests/platform/mac/fast/writing-mode/text-orientation-basic-expected.txt	2019-12-10 16:57:44 UTC (rev 253326)
@@ -20,37 +20,37 @@
       RenderBlock {DIV} at (0,106) size 388x600
         RenderBlock {DIV} at (0,0) size 194x398 [border: (1px solid #008000)]
           RenderInline {SPAN} at (0,0) size 40x173
-            RenderText {#text} at (2,1) size 40x173
-              text run at (2,1) width 173: "Hello world"
-          RenderBR {BR} at (10,173) size 0x1
+            RenderText {#text} at (3,1) size 40x173
+              text run at (3,1) width 173: "Hello world"
+          RenderBR {BR} at (11,173) size 0x1
           RenderInline {SPAN} at (0,0) size 40x337
-            RenderText {#text} at (44,1) size 40x337
-              text run at (44,1) width 337: "Hello world"
-          RenderBR {BR} at (52,337) size 0x1
+            RenderText {#text} at (45,1) size 40x337
+              text run at (45,1) width 337: "Hello world"
+          RenderBR {BR} at (53,337) size 0x1
           RenderInline {SPAN} at (0,0) size 36x198
-            RenderText {#text} at (94,1) size 36x198
-              text run at (94,1) width 198: "Hello world"
-          RenderBR {BR} at (112,198) size 0x1
+            RenderText {#text} at (93,1) size 36x198
+              text run at (93,1) width 198: "Hello world"
+          RenderBR {BR} at (100,198) size 0x1
           RenderInline {SPAN} at (0,0) size 36x396
-            RenderText {#text} at (148,1) size 36x396
-              text run at (148,1) width 396: "Hello world"
-          RenderBR {BR} at (166,397) size 0x0
+            RenderText {#text} at (147,1) size 36x396
+              text run at (147,1) width 396: "Hello world"
+          RenderBR {BR} at (154,397) size 0x0
         RenderText {#text} at (0,0) size 0x0
         RenderBlock {DIV} at (194,0) size 194x398 [border: (1px solid #008000)]
           RenderInline {SPAN} at (0,0) size 40x173
-            RenderText {#text} at (2,1) size 40x173
-              text run at (2,1) width 173: "Hello world"
-          RenderBR {BR} at (10,173) size 0x1
+            RenderText {#text} at (3,1) size 40x173
+              text run at (3,1) width 173: "Hello world"
+          RenderBR {BR} at (11,173) size 0x1
           RenderInline {SPAN} at (0,0) size 40x337
-            RenderText {#text} at (44,1) size 40x337
-              text run at (44,1) width 337: "Hello world"
-          RenderBR {BR} at (52,337) size 0x1
+            RenderText {#text} at (45,1) size 40x337
+              text run at (45,1) width 337: "Hello world"
+          RenderBR {BR} at (53,337) size 0x1
           RenderInline {SPAN} at (0,0) size 36x198
-            RenderText {#text} at (94,1) size 36x198
-              text run at (94,1) width 198: "Hello world"
-          RenderBR {BR} at (112,198) size 0x1
+            RenderText {#text} at (93,1) size 36x198
+              text run at (93,1) width 198: "Hello world"
+          RenderBR {BR} at (100,198) size 0x1
           RenderInline {SPAN} at (0,0) size 36x396
-            RenderText {#text} at (148,1) size 36x396
-              text run at (148,1) width 396: "Hello world"
-          RenderBR {BR} at (166,397) size 0x0
+            RenderText {#text} at (147,1) size 36x396
+              text run at (147,1) width 396: "Hello world"
+          RenderBR {BR} at (154,397) size 0x0
         RenderText {#text} at (0,0) size 0x0

Modified: trunk/LayoutTests/platform/mac/tables/mozilla_expected_failures/bugs/bug56024-expected.txt (253325 => 253326)


--- trunk/LayoutTests/platform/mac/tables/mozilla_expected_failures/bugs/bug56024-expected.txt	2019-12-10 16:13:04 UTC (rev 253325)
+++ trunk/LayoutTests/platform/mac/tables/mozilla_expected_failures/bugs/bug56024-expected.txt	2019-12-10 16:57:44 UTC (rev 253326)
@@ -16,7 +16,7 @@
                         text run at (1,19) width 250: "Al Gore are expected to show a kinder,"
                         text run at (1,37) width 294: "gentler side Wednesday in the second of three"
                         text run at (1,55) width 185: "nationally televised debates. "
-                      RenderBR {BR} at (185,55) size 1x18
+                      RenderBR {BR} at (185,69) size 1x0
             RenderTableCell {TD} at (302,2) size 96x74 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
               RenderBlock (anonymous) at (1,1) size 94x72
                 RenderInline {FONT} at (0,0) size 84x72 [color=#CC3333]

Modified: trunk/LayoutTests/platform/win/fast/text/international/bidi-layout-across-linebreak-expected.txt (253325 => 253326)


--- trunk/LayoutTests/platform/win/fast/text/international/bidi-layout-across-linebreak-expected.txt	2019-12-10 16:13:04 UTC (rev 253325)
+++ trunk/LayoutTests/platform/win/fast/text/international/bidi-layout-across-linebreak-expected.txt	2019-12-10 16:57:44 UTC (rev 253326)
@@ -165,7 +165,7 @@
             RenderTableCell {TD} at (47,269) size 46x41 [border: (1px solid #008000)] [r=7 c=1 rs=1 cs=1]
               RenderText {#text} at (3,3) size 20x18
                 text run at (3,3) width 20: "a ("
-              RenderBR {BR} at (22,3) size 1x18
+              RenderBR {BR} at (22,18) size 1x0
               RenderText {#text} at (3,21) size 21x18
                 text run at (3,21) width 21: "] b"
             RenderTableCell {TD} at (92,269) size 35x41 [border: (1px solid #008000)] [r=7 c=2 rs=1 cs=1]

Modified: trunk/LayoutTests/platform/win/fast/writing-mode/english-bt-text-expected.txt (253325 => 253326)


--- trunk/LayoutTests/platform/win/fast/writing-mode/english-bt-text-expected.txt	2019-12-10 16:13:04 UTC (rev 253325)
+++ trunk/LayoutTests/platform/win/fast/writing-mode/english-bt-text-expected.txt	2019-12-10 16:57:44 UTC (rev 253326)
@@ -8,6 +8,6 @@
         RenderText {#text} at (2,2) size 531x18
           text run at (2,2) width 300: "Here is some text in a horizontal-bt block flow. "
           text run at (302,2) width 231: "The block direction is bottom-to-top."
-        RenderBR {BR} at (533,6) size 0x0
+        RenderBR {BR} at (533,16) size 0x0
         RenderText {#text} at (2,20) size 220x18
           text run at (2,20) width 220: "This line should also be horizontal."

Modified: trunk/LayoutTests/platform/win/fast/writing-mode/text-orientation-basic-expected.txt (253325 => 253326)


--- trunk/LayoutTests/platform/win/fast/writing-mode/text-orientation-basic-expected.txt	2019-12-10 16:13:04 UTC (rev 253325)
+++ trunk/LayoutTests/platform/win/fast/writing-mode/text-orientation-basic-expected.txt	2019-12-10 16:57:44 UTC (rev 253326)
@@ -20,13 +20,13 @@
       RenderBlock {DIV} at (0,88) size 168x600
         RenderBlock {DIV} at (0,0) size 168x175 [border: (1px solid #008000)]
           RenderInline {SPAN} at (0,0) size 40x173
-            RenderText {#text} at (2,1) size 40x173
-              text run at (2,1) width 173: "Hello world"
-          RenderBR {BR} at (10,174) size 0x0
+            RenderText {#text} at (3,1) size 40x173
+              text run at (3,1) width 173: "Hello world"
+          RenderBR {BR} at (11,174) size 0x0
           RenderInline {SPAN} at (0,0) size 40x173
-            RenderText {#text} at (44,1) size 40x173
-              text run at (44,1) width 173: "Hello world"
-          RenderBR {BR} at (52,174) size 0x0
+            RenderText {#text} at (45,1) size 40x173
+              text run at (45,1) width 173: "Hello world"
+          RenderBR {BR} at (53,174) size 0x0
           RenderInline {SPAN} at (0,0) size 41x173
             RenderText {#text} at (85,1) size 41x173
               text run at (85,1) width 173: "Hello world"
@@ -39,13 +39,13 @@
           text run at (126,175) width 9: " "
         RenderBlock {DIV} at (0,184) size 168x175 [border: (1px solid #008000)]
           RenderInline {SPAN} at (0,0) size 40x173
-            RenderText {#text} at (2,1) size 40x173
-              text run at (2,1) width 173: "Hello world"
-          RenderBR {BR} at (10,174) size 0x0
+            RenderText {#text} at (3,1) size 40x173
+              text run at (3,1) width 173: "Hello world"
+          RenderBR {BR} at (11,174) size 0x0
           RenderInline {SPAN} at (0,0) size 40x173
-            RenderText {#text} at (44,1) size 40x173
-              text run at (44,1) width 173: "Hello world"
-          RenderBR {BR} at (52,174) size 0x0
+            RenderText {#text} at (45,1) size 40x173
+              text run at (45,1) width 173: "Hello world"
+          RenderBR {BR} at (53,174) size 0x0
           RenderInline {SPAN} at (0,0) size 41x173
             RenderText {#text} at (85,1) size 41x173
               text run at (85,1) width 173: "Hello world"

Modified: trunk/LayoutTests/platform/win/tables/mozilla_expected_failures/bugs/bug56024-expected.txt (253325 => 253326)


--- trunk/LayoutTests/platform/win/tables/mozilla_expected_failures/bugs/bug56024-expected.txt	2019-12-10 16:13:04 UTC (rev 253325)
+++ trunk/LayoutTests/platform/win/tables/mozilla_expected_failures/bugs/bug56024-expected.txt	2019-12-10 16:57:44 UTC (rev 253326)
@@ -16,7 +16,7 @@
                         text run at (1,19) width 295: "Al Gore are expected to show a kinder, gentler"
                         text run at (1,37) width 242: "side Wednesday in the second of three"
                         text run at (1,55) width 180: "nationally televised debates. "
-                      RenderBR {BR} at (181,55) size 0x18
+                      RenderBR {BR} at (181,69) size 0x0
             RenderTableCell {TD} at (302,2) size 96x74 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
               RenderBlock (anonymous) at (1,1) size 94x72
                 RenderInline {FONT} at (0,0) size 83x72 [color=#CC3333]

Modified: trunk/Source/WebCore/ChangeLog (253325 => 253326)


--- trunk/Source/WebCore/ChangeLog	2019-12-10 16:13:04 UTC (rev 253325)
+++ trunk/Source/WebCore/ChangeLog	2019-12-10 16:57:44 UTC (rev 253326)
@@ -1,5 +1,62 @@
 2019-12-10  Antti Koivisto  <[email protected]>
 
+        Remove behavior that makes <br> boxes 0-height in quirks mode
+        https://bugs.webkit.org/show_bug.cgi?id=205004
+
+        Reviewed by Zalan Bujtas.
+
+        Implementation of the <br> quirk includes zeroing its height. This has no layout or rendering effects,
+        it exists purely to maintain render tree dump output for tests.
+
+        This patch removes this behavior but maintains the render tree dump output on the RenderTreeAsText
+        level (thus avoiding giant test rebasing), and makes it easier to get the same output from all paths.
+
+        * rendering/InlineBox.cpp:
+        (WebCore::InlineBox::logicalHeight const):
+        (WebCore::InlineBox::baselinePosition const):
+        (WebCore::InlineBox::lineHeight const):
+
+        Remove the hack from line boxes.
+
+        * rendering/RenderLineBreak.cpp:
+        (WebCore::RenderLineBreak::boundingBoxForRenderTreeDump const):
+
+        Add special bounding box code for this case.
+        This can be removed in future with a test rebase.
+
+        * rendering/RenderLineBreak.h:
+        * rendering/RenderTreeAsText.cpp:
+        (WebCore::RenderTreeAsText::writeRenderObject):
+        * rendering/SimpleLineLayoutResolver.cpp:
+        (WebCore::SimpleLineLayout::RunResolver::Run::rect const):
+
+        Remove the hack from simple lines.
+
+        (WebCore::SimpleLineLayout::RunResolver::RunResolver):
+        * rendering/SimpleLineLayoutResolver.h:
+        (WebCore::SimpleLineLayout::RunResolver::Run::baselineOffset const):
+        (WebCore::SimpleLineLayout::RunResolver::Iterator::atBegin const):
+        * rendering/line/LineLayoutTraversal.h:
+        (WebCore::LineLayoutTraversal::Box::baselineOffset const):
+        (WebCore::LineLayoutTraversal::Box::isHorizontal const):
+        (WebCore::LineLayoutTraversal::Box::useLineBreakBoxRenderTreeDumpQuirk const):
+        * rendering/line/LineLayoutTraversalComplexPath.h:
+        (WebCore::LineLayoutTraversal::ComplexPath::isHorizontal const):
+        (WebCore::LineLayoutTraversal::ComplexPath::baselineOffset const):
+        (WebCore::LineLayoutTraversal::ComplexPath::useLineBreakBoxRenderTreeDumpQuirk const):
+        * rendering/line/LineLayoutTraversalDisplayRunPath.h:
+        (WebCore::LineLayoutTraversal::DisplayRunPath::baselineOffset const):
+        (WebCore::LineLayoutTraversal::DisplayRunPath::isHorizontal const):
+        (WebCore::LineLayoutTraversal::DisplayRunPath::useLineBreakBoxRenderTreeDumpQuirk const):
+        (WebCore::LineLayoutTraversal::DisplayRunPath::isLastOnLine const):
+        (WebCore::LineLayoutTraversal::DisplayRunPath::lineBox const):
+        * rendering/line/LineLayoutTraversalSimplePath.h:
+        (WebCore::LineLayoutTraversal::SimplePath::baselineOffset const):
+        (WebCore::LineLayoutTraversal::SimplePath::isHorizontal const):
+        (WebCore::LineLayoutTraversal::SimplePath::useLineBreakBoxRenderTreeDumpQuirk const):
+
+2019-12-10  Antti Koivisto  <[email protected]>
+
         [LFC][Integration] Output hyphen strings
         https://bugs.webkit.org/show_bug.cgi?id=205058
 

Modified: trunk/Source/WebCore/rendering/InlineBox.cpp (253325 => 253326)


--- trunk/Source/WebCore/rendering/InlineBox.cpp	2019-12-10 16:13:04 UTC (rev 253325)
+++ trunk/Source/WebCore/rendering/InlineBox.cpp	2019-12-10 16:57:44 UTC (rev 253326)
@@ -132,7 +132,7 @@
 
     const RenderStyle& lineStyle = this->lineStyle();
     if (renderer().isTextOrLineBreak())
-        return behavesLikeText() ? lineStyle.fontMetrics().height() : 0;
+        return lineStyle.fontMetrics().height();
     if (is<RenderBox>(renderer()) && parent())
         return isHorizontal() ? downcast<RenderBox>(renderer()).height() : downcast<RenderBox>(renderer()).width();
 
@@ -147,15 +147,11 @@
 
 int InlineBox::baselinePosition(FontBaseline baselineType) const
 {
-    if (renderer().isLineBreak() && !behavesLikeText())
-        return 0;
     return boxModelObject()->baselinePosition(baselineType, m_bitfields.firstLine(), isHorizontal() ? HorizontalLine : VerticalLine, PositionOnContainingLine);
 }
 
 LayoutUnit InlineBox::lineHeight() const
 {
-    if (renderer().isLineBreak() && !behavesLikeText())
-        return 0;
     return boxModelObject()->lineHeight(m_bitfields.firstLine(), isHorizontal() ? HorizontalLine : VerticalLine, PositionOnContainingLine);
 }
 

Modified: trunk/Source/WebCore/rendering/RenderLineBreak.cpp (253325 => 253326)


--- trunk/Source/WebCore/rendering/RenderLineBreak.cpp	2019-12-10 16:13:04 UTC (rev 253325)
+++ trunk/Source/WebCore/rendering/RenderLineBreak.cpp	2019-12-10 16:57:44 UTC (rev 253326)
@@ -177,6 +177,28 @@
     return enclosingIntRect(box->rect());
 }
 
+IntRect RenderLineBreak::boundingBoxForRenderTreeDump() const
+{
+    auto box = LineLayoutTraversal::elementBoxFor(*this);
+    if (!box)
+        return { };
+
+    auto rect = box->rect();
+
+    // FIXME: Remove and rebase the tests.
+    bool inQuirksMode = !document().inNoQuirksMode();
+    if (inQuirksMode && !isWBR() && box->useLineBreakBoxRenderTreeDumpQuirk()) {
+        if (!box->isHorizontal()) {
+            auto baseline = style().isFlippedBlocksWritingMode() ? rect.x() + box->baselineOffset() : rect.maxX() - box->baselineOffset();
+            return enclosingIntRect(FloatRect(FloatPoint(baseline, rect.y()), FloatSize(0, rect.height())));
+        }
+        auto baseline = rect.y() + box->baselineOffset();
+        return enclosingIntRect(FloatRect(FloatPoint(rect.x(), baseline), FloatSize(rect.width(), 0)));
+    }
+
+    return enclosingIntRect(rect);
+}
+
 void RenderLineBreak::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const
 {
     auto box = LineLayoutTraversal::elementBoxFor(*this);

Modified: trunk/Source/WebCore/rendering/RenderLineBreak.h (253325 => 253326)


--- trunk/Source/WebCore/rendering/RenderLineBreak.h	2019-12-10 16:13:04 UTC (rev 253325)
+++ trunk/Source/WebCore/rendering/RenderLineBreak.h	2019-12-10 16:57:44 UTC (rev 253326)
@@ -48,6 +48,7 @@
     void dirtyLineBoxes(bool fullLayout);
 
     IntRect linesBoundingBox() const;
+    IntRect boundingBoxForRenderTreeDump() const;
 
     void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const override;
     void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const override;

Modified: trunk/Source/WebCore/rendering/RenderTreeAsText.cpp (253325 => 253326)


--- trunk/Source/WebCore/rendering/RenderTreeAsText.cpp	2019-12-10 16:13:04 UTC (rev 253325)
+++ trunk/Source/WebCore/rendering/RenderTreeAsText.cpp	2019-12-10 16:57:44 UTC (rev 253326)
@@ -206,7 +206,7 @@
             adjustForTableCells = false;
     } else if (o.isBR()) {
         const RenderLineBreak& br = downcast<RenderLineBreak>(o);
-        IntRect linesBox = br.linesBoundingBox();
+        IntRect linesBox = br.boundingBoxForRenderTreeDump();
         r = IntRect(linesBox.x(), linesBox.y(), linesBox.width(), linesBox.height());
         if (!br.inlineBoxWrapper())
             adjustForTableCells = false;

Modified: trunk/Source/WebCore/rendering/SimpleLineLayoutResolver.cpp (253325 => 253326)


--- trunk/Source/WebCore/rendering/SimpleLineLayoutResolver.cpp	2019-12-10 16:13:04 UTC (rev 253325)
+++ trunk/Source/WebCore/rendering/SimpleLineLayoutResolver.cpp	2019-12-10 16:57:44 UTC (rev 253326)
@@ -67,14 +67,7 @@
     float baseline = computeBaselinePosition();
     FloatPoint position = linePosition(run.logicalLeft, baseline - resolver.m_ascent);
     FloatSize size = lineSize(run.logicalLeft, run.logicalRight, resolver.m_ascent + resolver.m_descent + resolver.m_visualOverflowOffset);
-    bool moveLineBreakToBaseline = false;
-    if (run.start == run.end && m_iterator != resolver.begin() && resolver.m_inQuirksMode) {
-        auto previousRun = m_iterator;
-        --previousRun;
-        moveLineBreakToBaseline = !previousRun.simpleRun().isEndOfLine;
-    }
-    if (moveLineBreakToBaseline)
-        return FloatRect(FloatPoint(position.x(), baseline), FloatSize(size.width(), std::max<float>(0, resolver.m_ascent - resolver.m_baseline.toFloat())));
+
     return FloatRect(position, size);
 }
 
@@ -154,7 +147,6 @@
     , m_ascent(flow.style().fontCascade().fontMetrics().ascent())
     , m_descent(flow.style().fontCascade().fontMetrics().descent())
     , m_visualOverflowOffset(visualOverflowForDecorations(flow.style(), nullptr).bottom)
-    , m_inQuirksMode(flow.document().inQuirksMode())
 {
 }
 

Modified: trunk/Source/WebCore/rendering/SimpleLineLayoutResolver.h (253325 => 253326)


--- trunk/Source/WebCore/rendering/SimpleLineLayoutResolver.h	2019-12-10 16:13:04 UTC (rev 253325)
+++ trunk/Source/WebCore/rendering/SimpleLineLayoutResolver.h	2019-12-10 16:57:44 UTC (rev 253326)
@@ -58,6 +58,7 @@
         float expansion() const;
         ExpansionBehavior expansionBehavior() const;
         int baselinePosition() const;
+        int baselineOffset() const { return m_iterator.resolver().m_baseline; }
         StringView text() const;
         String textWithHyphen() const;
         const RenderObject& renderer() const;
@@ -90,6 +91,8 @@
 
         Run operator*() const;
 
+        bool atBegin() const;
+
     private:
         const SimpleLineLayout::Run& simpleRun() const;
         unsigned lineIndex() const { return m_lineIndex; }
@@ -131,7 +134,6 @@
     const float m_ascent;
     const float m_descent;
     const float m_visualOverflowOffset;
-    const bool m_inQuirksMode;
 };
 
 class LineResolver {
@@ -254,6 +256,11 @@
     return Run(*this);
 }
 
+inline bool RunResolver::Iterator::atBegin() const
+{
+    return *this == resolver().begin();
+}
+
 inline const SimpleLineLayout::Run& RunResolver::Iterator::simpleRun() const
 {
     return layout().runAt(m_runIndex);

Modified: trunk/Source/WebCore/rendering/line/LineLayoutTraversal.h (253325 => 253326)


--- trunk/Source/WebCore/rendering/line/LineLayoutTraversal.h	2019-12-10 16:13:04 UTC (rev 253325)
+++ trunk/Source/WebCore/rendering/line/LineLayoutTraversal.h	2019-12-10 16:57:44 UTC (rev 253326)
@@ -61,9 +61,13 @@
     FloatRect rect() const;
     FloatRect logicalRect() const;
 
+    float baselineOffset() const;
+
     bool isLeftToRightDirection() const;
+    bool isHorizontal() const;
     bool dirOverride() const;
     bool isLineBreak() const;
+    bool useLineBreakBoxRenderTreeDumpQuirk() const;
 
 protected:
     friend class ElementBoxIterator;
@@ -170,6 +174,13 @@
     });
 }
 
+inline float Box::baselineOffset() const
+{
+    return WTF::switchOn(m_pathVariant, [](auto& path) {
+        return path.baselineOffset();
+    });
+}
+
 inline bool Box::isLeftToRightDirection() const
 {
     return WTF::switchOn(m_pathVariant, [](auto& path) {
@@ -177,6 +188,13 @@
     });
 }
 
+inline bool Box::isHorizontal() const
+{
+    return WTF::switchOn(m_pathVariant, [](auto& path) {
+        return path.isHorizontal();
+    });
+}
+
 inline bool Box::dirOverride() const
 {
     return WTF::switchOn(m_pathVariant, [](auto& path) {
@@ -191,6 +209,13 @@
     });
 }
 
+inline bool Box::useLineBreakBoxRenderTreeDumpQuirk() const
+{
+    return WTF::switchOn(m_pathVariant, [](auto& path) {
+        return path.useLineBreakBoxRenderTreeDumpQuirk();
+    });
+}
+
 inline bool TextBox::hasHyphen() const
 {
     return WTF::switchOn(m_pathVariant, [](auto& path) {
@@ -245,5 +270,6 @@
     });
 }
 
+
 }
 }

Modified: trunk/Source/WebCore/rendering/line/LineLayoutTraversalComplexPath.h (253325 => 253326)


--- trunk/Source/WebCore/rendering/line/LineLayoutTraversalComplexPath.h	2019-12-10 16:13:04 UTC (rev 253325)
+++ trunk/Source/WebCore/rendering/line/LineLayoutTraversalComplexPath.h	2019-12-10 16:57:44 UTC (rev 253326)
@@ -44,9 +44,16 @@
     FloatRect logicalRect() const { return m_inlineBox->logicalFrameRect(); }
 
     bool isLeftToRightDirection() const { return m_inlineBox->isLeftToRightDirection(); }
+    bool isHorizontal() const { return m_inlineBox->isHorizontal(); }
     bool dirOverride() const { return m_inlineBox->dirOverride(); }
     bool isLineBreak() const { return m_inlineBox->isLineBreak(); }
+    float baselineOffset() const { return m_inlineBox->baselinePosition(AlphabeticBaseline); }
 
+    bool useLineBreakBoxRenderTreeDumpQuirk() const
+    {
+        return !m_inlineBox->behavesLikeText();
+    }
+
     bool hasHyphen() const { return inlineTextBox()->hasHyphen(); }
     StringView text() const { return StringView(inlineTextBox()->renderer().text()).substring(inlineTextBox()->start(), inlineTextBox()->len()); }
     unsigned localStartOffset() const { return inlineTextBox()->start(); }

Modified: trunk/Source/WebCore/rendering/line/LineLayoutTraversalDisplayRunPath.h (253325 => 253326)


--- trunk/Source/WebCore/rendering/line/LineLayoutTraversalDisplayRunPath.h	2019-12-10 16:13:04 UTC (rev 253325)
+++ trunk/Source/WebCore/rendering/line/LineLayoutTraversalDisplayRunPath.h	2019-12-10 16:57:44 UTC (rev 253326)
@@ -58,10 +58,21 @@
         return { position, logicalRect.size() };
     }
 
+    float baselineOffset() const { return lineBox().baselineOffset(); }
+
     bool isLeftToRightDirection() const { return true; }
+    bool isHorizontal() const { return true; }
     bool dirOverride() const { return false; }
     bool isLineBreak() const { return run().isLineBreak(); }
 
+    bool useLineBreakBoxRenderTreeDumpQuirk() const
+    {
+        if (!m_runIndex)
+            return false;
+        auto& previous = runs()[m_runIndex - 1];
+        return previous.lineIndex() == run().lineIndex();
+    }
+
     bool hasHyphen() const { return run().textContext()->needsHyphen(); }
     StringView text() const { return run().textContext()->content(); }
     unsigned localStartOffset() const { return run().textContext()->start(); }
@@ -73,7 +84,7 @@
         if (isLast())
             return true;
         auto& next = runs()[m_runIndex + 1];
-        return run().lineIndex() != next.lineIndex();
+        return run().lineIndex() == next.lineIndex();
     }
     bool isLast() const
     {
@@ -93,6 +104,7 @@
 private:
     const Display::InlineContent::Runs& runs() const { return m_inlineContent->runs; }
     const Display::Run& run() const { return runs()[m_runIndex]; }
+    const Display::LineBox& lineBox() const { return m_inlineContent->lineBoxForRun(run()); }
 
     RefPtr<const Display::InlineContent> m_inlineContent;
     size_t m_endIndex { 0 };

Modified: trunk/Source/WebCore/rendering/line/LineLayoutTraversalSimplePath.h (253325 => 253326)


--- trunk/Source/WebCore/rendering/line/LineLayoutTraversalSimplePath.h	2019-12-10 16:13:04 UTC (rev 253325)
+++ trunk/Source/WebCore/rendering/line/LineLayoutTraversalSimplePath.h	2019-12-10 16:57:44 UTC (rev 253326)
@@ -41,10 +41,22 @@
     FloatRect rect() const { return (*m_iterator).rect(); }
     FloatRect logicalRect() const { return rect(); }
 
+    float baselineOffset() const { return (*m_iterator).baselineOffset(); }
+
     bool isLeftToRightDirection() const { return true; }
+    bool isHorizontal() const { return true; }
     bool dirOverride() const { return false; }
     bool isLineBreak() const { return (*m_iterator).isLineBreak(); }
 
+    bool useLineBreakBoxRenderTreeDumpQuirk() const
+    {
+        if (m_iterator.atBegin())
+            return false;
+        auto previous = m_iterator;
+        --previous;
+        return !(*previous).isEndOfLine();
+    }
+
     bool hasHyphen() const { return (*m_iterator).hasHyphen(); }
     StringView text() const { return (*m_iterator).text(); }
     unsigned localStartOffset() const { return (*m_iterator).localStart(); }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to