Title: [273386] trunk
Revision
273386
Author
za...@apple.com
Date
2021-02-24 09:02:31 -0800 (Wed, 24 Feb 2021)

Log Message

[LegacyLineLayout] Inline level box should not stick out at the bottom of its containing block
https://bugs.webkit.org/show_bug.cgi?id=222334

Reviewed by Antti Koivisto.

Source/WebCore:

When the inline level box's baseline lands on a subpixel position, because of the way we integral "snap" the ascent and descent values
it can end up sticking out of the containing block.
(containing block's height is based on the max ascent + max descent and with implicitly floored descent values, it may not always be enclosing.)

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeLogicalBoxHeights):

LayoutTests:

* platform/mac/css1/text_properties/vertical_align-expected.txt:
* platform/mac/fast/table/table-display-types-strict-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (273385 => 273386)


--- trunk/LayoutTests/ChangeLog	2021-02-24 16:45:08 UTC (rev 273385)
+++ trunk/LayoutTests/ChangeLog	2021-02-24 17:02:31 UTC (rev 273386)
@@ -1,3 +1,13 @@
+2021-02-24  Zalan Bujtas  <za...@apple.com>
+
+        [LegacyLineLayout] Inline level box should not stick out at the bottom of its containing block
+        https://bugs.webkit.org/show_bug.cgi?id=222334
+
+        Reviewed by Antti Koivisto.
+
+        * platform/mac/css1/text_properties/vertical_align-expected.txt:
+        * platform/mac/fast/table/table-display-types-strict-expected.txt:
+
 2021-02-24  Simon Fraser  <simon.fra...@apple.com>
 
         Runtime-disabled CSS features still appear enabled via CSS.supports()

Modified: trunk/LayoutTests/platform/ios/css1/text_properties/vertical_align-expected.txt (273385 => 273386)


--- trunk/LayoutTests/platform/ios/css1/text_properties/vertical_align-expected.txt	2021-02-24 16:45:08 UTC (rev 273385)
+++ trunk/LayoutTests/platform/ios/css1/text_properties/vertical_align-expected.txt	2021-02-24 17:02:31 UTC (rev 273386)
@@ -1,8 +1,8 @@
-layer at (0,0) size 800x4468
+layer at (0,0) size 800x4470
   RenderView at (0,0) size 800x600
-layer at (0,0) size 800x4468
-  RenderBlock {HTML} at (0,0) size 800x4468
-    RenderBody {BODY} at (8,8) size 784x4452 [bgcolor=#CCCCCC]
+layer at (0,0) size 800x4470
+  RenderBlock {HTML} at (0,0) size 800x4470
+    RenderBody {BODY} at (8,8) size 784x4454 [bgcolor=#CCCCCC]
       RenderBlock {P} at (0,0) size 784x20
         RenderText {#text} at (0,0) size 363x19
           text run at (0,0) width 363: "The style declarations which apply to the text below are:"
@@ -221,7 +221,7 @@
         RenderText {#text} at (0,0) size 765x39
           text run at (0,0) width 765: "In the following paragraph, all images should be aligned with the middle of the default text, whereas any text should be"
           text run at (0,20) width 371: "aligned with the text baseline (which is the default value)."
-      RenderBlock {P} at (0,1853) size 784x232
+      RenderBlock {P} at (0,1853) size 784x233
         RenderText {#text} at (0,22) size 101x19
           text run at (0,22) width 101: "This paragraph "
         RenderImage {IMG} at (100,18) size 10x31
@@ -246,53 +246,53 @@
         RenderImage {IMG} at (693,23) size 7x21
         RenderText {#text} at (699,22) size 85x19
           text run at (699,22) width 85: " all of which "
-        RenderImage {IMG} at (0,76) size 20x66
-        RenderText {#text} at (20,98) size 121x19
-          text run at (20,98) width 121: " should be aligned "
-        RenderImage {IMG} at (140,91) size 12x36
-        RenderText {#text} at (151,98) size 5x19
-          text run at (151,98) width 5: " "
+        RenderImage {IMG} at (0,77) size 20x66
+        RenderText {#text} at (20,99) size 121x19
+          text run at (20,99) width 121: " should be aligned "
+        RenderImage {IMG} at (140,92) size 12x36
+        RenderText {#text} at (151,99) size 5x19
+          text run at (151,99) width 5: " "
         RenderInline {SPAN} at (0,0) size 237x36
-          RenderText {#text} at (155,84) size 237x36
-            text run at (155,84) width 237: "with the middle of"
-        RenderText {#text} at (391,98) size 5x19
-          text run at (391,98) width 5: " "
-        RenderImage {IMG} at (395,84) size 16x51
-        RenderText {#text} at (410,98) size 5x19
-          text run at (410,98) width 5: " "
+          RenderText {#text} at (155,85) size 237x36
+            text run at (155,85) width 237: "with the middle of"
+        RenderText {#text} at (391,99) size 5x19
+          text run at (391,99) width 5: " "
+        RenderImage {IMG} at (395,85) size 16x51
+        RenderText {#text} at (410,99) size 5x19
+          text run at (410,99) width 5: " "
         RenderInline {SPAN} at (0,0) size 345x28
-          RenderText {#text} at (414,91) size 18x28
-            text run at (414,91) width 18: "a "
+          RenderText {#text} at (414,92) size 18x28
+            text run at (414,92) width 18: "a "
           RenderInline {SPAN} at (0,0) size 204x67
-            RenderText {#text} at (431,59) size 204x67
-              text run at (431,59) width 204: "14-point"
-          RenderText {#text} at (634,91) size 125x28
-            text run at (634,91) width 125: " text element"
-        RenderText {#text} at (758,98) size 5x19
-          text run at (758,98) width 5: " "
-        RenderImage {IMG} at (762,84) size 16x51
+            RenderText {#text} at (431,60) size 204x67
+              text run at (431,60) width 204: "14-point"
+          RenderText {#text} at (634,92) size 125x28
+            text run at (634,92) width 125: " text element"
+        RenderText {#text} at (758,99) size 5x19
+          text run at (758,99) width 5: " "
+        RenderImage {IMG} at (762,85) size 16x51
         RenderText {#text} at (0,0) size 0x0
         RenderInline {SMALL} at (0,0) size 194x19
-          RenderText {#text} at (0,175) size 194x19
-            text run at (0,175) width 194: "regardless of the line in which"
-        RenderText {#text} at (193,175) size 5x19
-          text run at (193,175) width 5: " "
-        RenderImage {IMG} at (197,178) size 6x16
-        RenderText {#text} at (202,175) size 5x19
-          text run at (202,175) width 5: " "
+          RenderText {#text} at (0,176) size 194x19
+            text run at (0,176) width 194: "regardless of the line in which"
+        RenderText {#text} at (193,176) size 5x19
+          text run at (193,176) width 5: " "
+        RenderImage {IMG} at (197,179) size 6x16
+        RenderText {#text} at (202,176) size 5x19
+          text run at (202,176) width 5: " "
         RenderInline {BIG} at (0,0) size 156x24
-          RenderText {#text} at (206,171) size 156x24
-            text run at (206,171) width 156: "the images appear."
-        RenderText {#text} at (361,175) size 5x19
-          text run at (361,175) width 5: " "
-        RenderImage {IMG} at (365,141) size 28x90
+          RenderText {#text} at (206,172) size 156x24
+            text run at (206,172) width 156: "the images appear."
+        RenderText {#text} at (361,176) size 5x19
+          text run at (361,176) width 5: " "
+        RenderImage {IMG} at (365,142) size 28x90
         RenderText {#text} at (0,0) size 0x0
-      RenderBlock {P} at (0,2100) size 784x41
+      RenderBlock {P} at (0,2101) size 784x41
         RenderText {#text} at (0,0) size 751x39
           text run at (0,0) width 751: "In the following paragraph, all elements should be aligned with the top of the tallest element on the line, whether that"
           text run at (0,20) width 178: "element is an image or not. "
           text run at (177,20) width 563: "Each fragment of text has been SPANned appropriately in order to cause this to happen."
-      RenderBlock {P} at (0,2156) size 784x203
+      RenderBlock {P} at (0,2157) size 784x203
         RenderInline {SPAN} at (0,0) size 97x19
           RenderText {#text} at (0,0) size 97x19
             text run at (0,0) width 97: "This paragraph"
@@ -374,18 +374,18 @@
           text run at (207,112) width 5: " "
         RenderImage {IMG} at (211,112) size 28x90
         RenderText {#text} at (0,0) size 0x0
-      RenderTable {TABLE} at (0,2374) size 784x2078 [border: (1px outset #808080)]
-        RenderTableSection {TBODY} at (1,1) size 782x2076
+      RenderTable {TABLE} at (0,2375) size 784x2079 [border: (1px outset #808080)]
+        RenderTableSection {TBODY} at (1,1) size 782x2077
           RenderTableRow {TR} at (0,0) size 782x28
             RenderTableCell {TD} at (0,0) size 782x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
               RenderInline {STRONG} at (0,0) size 161x19
                 RenderText {#text} at (4,4) size 161x19
                   text run at (4,4) width 161: "TABLE Testing Section"
-          RenderTableRow {TR} at (0,28) size 782x2048
-            RenderTableCell {TD} at (0,1037) size 12x29 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
-              RenderText {#text} at (4,4) size 4x20
-                text run at (4,5) width 4: " "
-            RenderTableCell {TD} at (12,28) size 770x2048 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+          RenderTableRow {TR} at (0,28) size 782x2049
+            RenderTableCell {TD} at (0,1038) size 12x29 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+              RenderText {#text} at (4,3) size 4x20
+                text run at (4,4) width 4: " "
+            RenderTableCell {TD} at (12,28) size 770x2049 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
               RenderBlock {P} at (4,4) size 762x79
                 RenderImage {IMG} at (0,0) size 15x50
                 RenderInline {SPAN} at (0,0) size 129x19
@@ -562,7 +562,7 @@
                 RenderText {#text} at (0,0) size 746x39
                   text run at (0,0) width 746: "In the following paragraph, all images should be aligned with the middle of the default text, whereas any text should"
                   text run at (0,20) width 390: "be aligned with the text baseline (which is the default value)."
-              RenderBlock {P} at (4,1538) size 762x232
+              RenderBlock {P} at (4,1538) size 762x233
                 RenderText {#text} at (0,22) size 101x19
                   text run at (0,22) width 101: "This paragraph "
                 RenderImage {IMG} at (100,18) size 10x31
@@ -585,58 +585,58 @@
                 RenderText {#text} at (689,22) size 5x19
                   text run at (689,22) width 5: " "
                 RenderImage {IMG} at (693,23) size 7x21
-                RenderText {#text} at (699,22) size 737x95
+                RenderText {#text} at (699,22) size 737x96
                   text run at (699,22) width 38: " all of"
-                  text run at (0,98) width 44: "which "
-                RenderImage {IMG} at (43,76) size 21x66
-                RenderText {#text} at (63,98) size 121x19
-                  text run at (63,98) width 121: " should be aligned "
-                RenderImage {IMG} at (183,91) size 12x36
-                RenderText {#text} at (194,98) size 5x19
-                  text run at (194,98) width 5: " "
+                  text run at (0,99) width 44: "which "
+                RenderImage {IMG} at (43,77) size 21x66
+                RenderText {#text} at (63,99) size 121x19
+                  text run at (63,99) width 121: " should be aligned "
+                RenderImage {IMG} at (183,92) size 12x36
+                RenderText {#text} at (194,99) size 5x19
+                  text run at (194,99) width 5: " "
                 RenderInline {SPAN} at (0,0) size 237x36
-                  RenderText {#text} at (198,84) size 237x36
-                    text run at (198,84) width 237: "with the middle of"
-                RenderText {#text} at (434,98) size 5x19
-                  text run at (434,98) width 5: " "
-                RenderImage {IMG} at (438,84) size 16x51
-                RenderText {#text} at (453,98) size 5x19
-                  text run at (453,98) width 5: " "
+                  RenderText {#text} at (198,85) size 237x36
+                    text run at (198,85) width 237: "with the middle of"
+                RenderText {#text} at (434,99) size 5x19
+                  text run at (434,99) width 5: " "
+                RenderImage {IMG} at (438,85) size 16x51
+                RenderText {#text} at (453,99) size 5x19
+                  text run at (453,99) width 5: " "
                 RenderInline {SPAN} at (0,0) size 720x105
-                  RenderText {#text} at (457,91) size 18x28
-                    text run at (457,91) width 18: "a "
+                  RenderText {#text} at (457,92) size 18x28
+                    text run at (457,92) width 18: "a "
                   RenderInline {SPAN} at (0,0) size 204x67
-                    RenderText {#text} at (474,59) size 204x67
-                      text run at (474,59) width 204: "14-point"
-                  RenderText {#text} at (677,91) size 720x105
-                    text run at (677,91) width 43: " text"
-                    text run at (0,168) width 76: "element"
-                RenderText {#text} at (75,175) size 5x19
-                  text run at (75,175) width 5: " "
-                RenderImage {IMG} at (79,161) size 16x51
-                RenderText {#text} at (94,175) size 5x19
-                  text run at (94,175) width 5: " "
+                    RenderText {#text} at (474,60) size 204x67
+                      text run at (474,60) width 204: "14-point"
+                  RenderText {#text} at (677,92) size 720x105
+                    text run at (677,92) width 43: " text"
+                    text run at (0,169) width 76: "element"
+                RenderText {#text} at (75,176) size 5x19
+                  text run at (75,176) width 5: " "
+                RenderImage {IMG} at (79,162) size 16x51
+                RenderText {#text} at (94,176) size 5x19
+                  text run at (94,176) width 5: " "
                 RenderInline {SMALL} at (0,0) size 195x19
-                  RenderText {#text} at (98,175) size 195x19
-                    text run at (98,175) width 195: "regardless of the line in which"
-                RenderText {#text} at (292,175) size 5x19
-                  text run at (292,175) width 5: " "
-                RenderImage {IMG} at (296,178) size 6x16
-                RenderText {#text} at (301,175) size 5x19
-                  text run at (301,175) width 5: " "
+                  RenderText {#text} at (98,176) size 195x19
+                    text run at (98,176) width 195: "regardless of the line in which"
+                RenderText {#text} at (292,176) size 5x19
+                  text run at (292,176) width 5: " "
+                RenderImage {IMG} at (296,179) size 6x16
+                RenderText {#text} at (301,176) size 5x19
+                  text run at (301,176) width 5: " "
                 RenderInline {BIG} at (0,0) size 156x24
-                  RenderText {#text} at (305,171) size 156x24
-                    text run at (305,171) width 156: "the images appear."
-                RenderText {#text} at (460,175) size 5x19
-                  text run at (460,175) width 5: " "
-                RenderImage {IMG} at (464,141) size 28x90
+                  RenderText {#text} at (305,172) size 156x24
+                    text run at (305,172) width 156: "the images appear."
+                RenderText {#text} at (460,176) size 5x19
+                  text run at (460,176) width 5: " "
+                RenderImage {IMG} at (464,142) size 28x90
                 RenderText {#text} at (0,0) size 0x0
-              RenderBlock {P} at (4,1785) size 762x41
+              RenderBlock {P} at (4,1786) size 762x41
                 RenderText {#text} at (0,0) size 751x39
                   text run at (0,0) width 751: "In the following paragraph, all elements should be aligned with the top of the tallest element on the line, whether that"
                   text run at (0,20) width 178: "element is an image or not. "
                   text run at (177,20) width 563: "Each fragment of text has been SPANned appropriately in order to cause this to happen."
-              RenderBlock {P} at (4,1841) size 762x203
+              RenderBlock {P} at (4,1842) size 762x203
                 RenderInline {SPAN} at (0,0) size 97x19
                   RenderText {#text} at (0,0) size 97x19
                     text run at (0,0) width 97: "This paragraph"

Modified: trunk/LayoutTests/platform/ios/fast/table/table-display-types-strict-expected.txt (273385 => 273386)


--- trunk/LayoutTests/platform/ios/fast/table/table-display-types-strict-expected.txt	2021-02-24 16:45:08 UTC (rev 273385)
+++ trunk/LayoutTests/platform/ios/fast/table/table-display-types-strict-expected.txt	2021-02-24 17:02:31 UTC (rev 273386)
@@ -1,8 +1,8 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
-layer at (0,0) size 800x534
-  RenderBlock {HTML} at (0,0) size 800x534
-    RenderBody {BODY} at (8,10) size 784x516
+layer at (0,0) size 800x536
+  RenderBlock {HTML} at (0,0) size 800x536
+    RenderBody {BODY} at (8,10) size 784x518
       RenderBlock {TABLE} at (10,0) size 764x100 [border: (1px solid #000000)]
         RenderTable at (1,1) size 118x98
           RenderTableSection {THEAD} at (0,0) size 118x26
@@ -36,15 +36,15 @@
               RenderTableCell {TD} at (59,24) size 57x22 [r=1 c=1 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 39x19
                   text run at (1,1) width 39: "Cell 4"
-      RenderBlock {TABLE} at (10,110) size 764x54 [border: (1px solid #000000)]
-        RenderTable at (1,1) size 222x52
-          RenderTableSection (anonymous) at (0,0) size 222x29
-            RenderTableRow (anonymous) at (0,2) size 222x25
-              RenderTableCell {THEAD} at (2,2) size 100x25 [r=0 c=0 rs=1 cs=1]
-                RenderTable at (0,0) size 100x25
-                  RenderTableSection (anonymous) at (0,0) size 100x25
-                    RenderTableRow (anonymous) at (0,2) size 100x21
-                      RenderTableCell {TR} at (2,2) size 96x21 [r=0 c=0 rs=1 cs=1]
+      RenderBlock {TABLE} at (10,110) size 764x56 [border: (1px solid #000000)]
+        RenderTable at (1,1) size 222x54
+          RenderTableSection (anonymous) at (0,0) size 222x30
+            RenderTableRow (anonymous) at (0,2) size 222x26
+              RenderTableCell {THEAD} at (2,2) size 100x26 [r=0 c=0 rs=1 cs=1]
+                RenderTable at (0,0) size 100x26
+                  RenderTableSection (anonymous) at (0,0) size 100x26
+                    RenderTableRow (anonymous) at (0,2) size 100x22
+                      RenderTableCell {TR} at (2,2) size 96x22 [r=0 c=0 rs=1 cs=1]
                         RenderInline {TD} at (0,0) size 48x22
                           RenderText {#text} at (1,1) size 46x20
                             text run at (1,1) width 46: "Head 1"
@@ -51,11 +51,11 @@
                         RenderInline {TD} at (0,0) size 49x22
                           RenderText {#text} at (48,1) size 47x20
                             text run at (48,1) width 47: "Head 2"
-              RenderTableCell {TFOOT} at (103,2) size 117x25 [r=0 c=1 rs=1 cs=1]
-                RenderTable at (0,0) size 116x25
-                  RenderTableSection (anonymous) at (0,0) size 116x25
-                    RenderTableRow (anonymous) at (0,2) size 116x21
-                      RenderTableCell {TR} at (2,2) size 112x21 [r=0 c=0 rs=1 cs=1]
+              RenderTableCell {TFOOT} at (103,2) size 117x26 [r=0 c=1 rs=1 cs=1]
+                RenderTable at (0,0) size 116x26
+                  RenderTableSection (anonymous) at (0,0) size 116x26
+                    RenderTableRow (anonymous) at (0,2) size 116x22
+                      RenderTableCell {TR} at (2,2) size 112x22 [r=0 c=0 rs=1 cs=1]
                         RenderInline {TD} at (0,0) size 56x22
                           RenderText {#text} at (1,1) size 54x20
                             text run at (1,1) width 54: "Footer 1"
@@ -62,9 +62,9 @@
                         RenderInline {TD} at (0,0) size 57x22
                           RenderText {#text} at (56,1) size 55x20
                             text run at (56,1) width 55: "Footer 2"
-          RenderTableSection {TBODY} at (0,29) size 222x23
-            RenderTableRow (anonymous) at (0,0) size 222x21
-              RenderTableCell {TR} at (2,0) size 100x21 [r=0 c=0 rs=1 cs=1]
+          RenderTableSection {TBODY} at (0,30) size 222x24
+            RenderTableRow (anonymous) at (0,0) size 222x22
+              RenderTableCell {TR} at (2,0) size 100x22 [r=0 c=0 rs=1 cs=1]
                 RenderInline {TD} at (0,0) size 41x22
                   RenderText {#text} at (1,1) size 39x20
                     text run at (1,1) width 39: "Cell 1"
@@ -71,7 +71,7 @@
                 RenderInline {TD} at (0,0) size 42x22
                   RenderText {#text} at (41,1) size 40x20
                     text run at (41,1) width 40: "Cell 2"
-              RenderTableCell {TR} at (103,0) size 117x21 [r=0 c=1 rs=1 cs=1]
+              RenderTableCell {TR} at (103,0) size 117x22 [r=0 c=1 rs=1 cs=1]
                 RenderInline {TD} at (0,0) size 41x22
                   RenderText {#text} at (1,1) size 39x20
                     text run at (1,1) width 39: "Cell 3"
@@ -78,7 +78,7 @@
                 RenderInline {TD} at (0,0) size 42x22
                   RenderText {#text} at (41,1) size 40x20
                     text run at (41,1) width 40: "Cell 4"
-      RenderBlock {TABLE} at (10,174) size 764x110 [border: (1px solid #000000)]
+      RenderBlock {TABLE} at (10,176) size 764x110 [border: (1px solid #000000)]
         RenderBlock {THEAD} at (1,1) size 762x26
           RenderBlock {TR} at (0,0) size 762x26
             RenderTable at (0,0) size 102x26
@@ -125,7 +125,7 @@
                         RenderTableCell {TD} at (44,2) size 42x22 [r=0 c=1 rs=1 cs=1]
                           RenderText {#text} at (1,1) size 39x19
                             text run at (1,1) width 39: "Cell 4"
-      RenderTable at (0,294) size 302x222
+      RenderTable at (0,296) size 302x222
         RenderTableSection (anonymous) at (0,0) size 302x222
           RenderTableRow (anonymous) at (0,0) size 302x222
             RenderTableCell {P} at (0,0) size 302x222 [border: (1px solid #000000)] [r=0 c=0 rs=1 cs=1]

Modified: trunk/LayoutTests/platform/mac/css1/text_properties/vertical_align-expected.txt (273385 => 273386)


--- trunk/LayoutTests/platform/mac/css1/text_properties/vertical_align-expected.txt	2021-02-24 16:45:08 UTC (rev 273385)
+++ trunk/LayoutTests/platform/mac/css1/text_properties/vertical_align-expected.txt	2021-02-24 17:02:31 UTC (rev 273386)
@@ -1,8 +1,8 @@
-layer at (0,0) size 785x4422
+layer at (0,0) size 785x4424
   RenderView at (0,0) size 785x600
-layer at (0,0) size 785x4422
-  RenderBlock {HTML} at (0,0) size 785x4422
-    RenderBody {BODY} at (8,8) size 769x4406 [bgcolor=#CCCCCC]
+layer at (0,0) size 785x4424
+  RenderBlock {HTML} at (0,0) size 785x4424
+    RenderBody {BODY} at (8,8) size 769x4408 [bgcolor=#CCCCCC]
       RenderBlock {P} at (0,0) size 769x18
         RenderText {#text} at (0,0) size 363x18
           text run at (0,0) width 363: "The style declarations which apply to the text below are:"
@@ -221,7 +221,7 @@
         RenderText {#text} at (0,0) size 765x36
           text run at (0,0) width 765: "In the following paragraph, all images should be aligned with the middle of the default text, whereas any text should be"
           text run at (0,18) width 371: "aligned with the text baseline (which is the default value)."
-      RenderBlock {P} at (0,1837) size 769x230
+      RenderBlock {P} at (0,1837) size 769x231
         RenderText {#text} at (0,22) size 101x18
           text run at (0,22) width 101: "This paragraph "
         RenderImage {IMG} at (100,17) size 10x31
@@ -244,58 +244,58 @@
         RenderText {#text} at (689,22) size 5x18
           text run at (689,22) width 5: " "
         RenderImage {IMG} at (693,22) size 7x21
-        RenderText {#text} at (699,22) size 737x93
+        RenderText {#text} at (699,22) size 737x94
           text run at (699,22) width 38: " all of"
-          text run at (0,97) width 44: "which "
-        RenderImage {IMG} at (43,74) size 21x66
-        RenderText {#text} at (63,97) size 121x18
-          text run at (63,97) width 121: " should be aligned "
-        RenderImage {IMG} at (183,89) size 12x36
-        RenderText {#text} at (194,97) size 5x18
-          text run at (194,97) width 5: " "
+          text run at (0,98) width 44: "which "
+        RenderImage {IMG} at (43,75) size 21x66
+        RenderText {#text} at (63,98) size 121x18
+          text run at (63,98) width 121: " should be aligned "
+        RenderImage {IMG} at (183,90) size 12x36
+        RenderText {#text} at (194,98) size 5x18
+          text run at (194,98) width 5: " "
         RenderInline {SPAN} at (0,0) size 237x37
-          RenderText {#text} at (198,82) size 237x37
-            text run at (198,82) width 237: "with the middle of"
-        RenderText {#text} at (434,97) size 5x18
-          text run at (434,97) width 5: " "
-        RenderImage {IMG} at (438,82) size 16x51
-        RenderText {#text} at (453,97) size 5x18
-          text run at (453,97) width 5: " "
+          RenderText {#text} at (198,83) size 237x37
+            text run at (198,83) width 237: "with the middle of"
+        RenderText {#text} at (434,98) size 5x18
+          text run at (434,98) width 5: " "
+        RenderImage {IMG} at (438,83) size 16x51
+        RenderText {#text} at (453,98) size 5x18
+          text run at (453,98) width 5: " "
         RenderInline {SPAN} at (0,0) size 720x105
-          RenderText {#text} at (457,89) size 18x28
-            text run at (457,89) width 18: "a "
+          RenderText {#text} at (457,90) size 18x28
+            text run at (457,90) width 18: "a "
           RenderInline {SPAN} at (0,0) size 204x69
-            RenderText {#text} at (474,57) size 204x69
-              text run at (474,57) width 204: "14-point"
-          RenderText {#text} at (677,89) size 720x105
-            text run at (677,89) width 43: " text"
-            text run at (0,166) width 76: "element"
-        RenderText {#text} at (75,174) size 5x18
-          text run at (75,174) width 5: " "
-        RenderImage {IMG} at (79,159) size 16x51
-        RenderText {#text} at (94,174) size 5x18
-          text run at (94,174) width 5: " "
+            RenderText {#text} at (474,58) size 204x69
+              text run at (474,58) width 204: "14-point"
+          RenderText {#text} at (677,90) size 720x105
+            text run at (677,90) width 43: " text"
+            text run at (0,167) width 76: "element"
+        RenderText {#text} at (75,175) size 5x18
+          text run at (75,175) width 5: " "
+        RenderImage {IMG} at (79,160) size 16x51
+        RenderText {#text} at (94,175) size 5x18
+          text run at (94,175) width 5: " "
         RenderInline {SMALL} at (0,0) size 195x18
-          RenderText {#text} at (98,174) size 195x18
-            text run at (98,174) width 195: "regardless of the line in which"
-        RenderText {#text} at (292,174) size 5x18
-          text run at (292,174) width 5: " "
-        RenderImage {IMG} at (296,176) size 6x16
-        RenderText {#text} at (301,174) size 5x18
-          text run at (301,174) width 5: " "
+          RenderText {#text} at (98,175) size 195x18
+            text run at (98,175) width 195: "regardless of the line in which"
+        RenderText {#text} at (292,175) size 5x18
+          text run at (292,175) width 5: " "
+        RenderImage {IMG} at (296,177) size 6x16
+        RenderText {#text} at (301,175) size 5x18
+          text run at (301,175) width 5: " "
         RenderInline {BIG} at (0,0) size 156x24
-          RenderText {#text} at (305,169) size 156x24
-            text run at (305,169) width 156: "the images appear."
-        RenderText {#text} at (460,174) size 5x18
-          text run at (460,174) width 5: " "
-        RenderImage {IMG} at (464,139) size 28x90
+          RenderText {#text} at (305,170) size 156x24
+            text run at (305,170) width 156: "the images appear."
+        RenderText {#text} at (460,175) size 5x18
+          text run at (460,175) width 5: " "
+        RenderImage {IMG} at (464,140) size 28x90
         RenderText {#text} at (0,0) size 0x0
-      RenderBlock {P} at (0,2082) size 769x37
+      RenderBlock {P} at (0,2083) size 769x37
         RenderText {#text} at (0,0) size 751x36
           text run at (0,0) width 751: "In the following paragraph, all elements should be aligned with the top of the tallest element on the line, whether that"
           text run at (0,18) width 178: "element is an image or not. "
           text run at (177,18) width 563: "Each fragment of text has been SPANned appropriately in order to cause this to happen."
-      RenderBlock {P} at (0,2134) size 769x202
+      RenderBlock {P} at (0,2135) size 769x202
         RenderInline {SPAN} at (0,0) size 97x18
           RenderText {#text} at (0,0) size 97x18
             text run at (0,0) width 97: "This paragraph"
@@ -377,18 +377,18 @@
           text run at (207,111) width 5: " "
         RenderImage {IMG} at (211,111) size 28x90
         RenderText {#text} at (0,0) size 0x0
-      RenderTable {TABLE} at (0,2351) size 769x2055 [border: (1px outset #808080)]
-        RenderTableSection {TBODY} at (1,1) size 767x2053
+      RenderTable {TABLE} at (0,2352) size 769x2056 [border: (1px outset #808080)]
+        RenderTableSection {TBODY} at (1,1) size 767x2054
           RenderTableRow {TR} at (0,0) size 767x26
             RenderTableCell {TD} at (0,0) size 767x26 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
               RenderInline {STRONG} at (0,0) size 161x18
                 RenderText {#text} at (4,4) size 161x18
                   text run at (4,4) width 161: "TABLE Testing Section"
-          RenderTableRow {TR} at (0,26) size 767x2027
+          RenderTableRow {TR} at (0,26) size 767x2028
             RenderTableCell {TD} at (0,1026) size 12x27 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
-              RenderText {#text} at (4,3) size 4x19
-                text run at (4,4) width 4: " "
-            RenderTableCell {TD} at (12,26) size 755x2027 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+              RenderText {#text} at (4,4) size 4x19
+                text run at (4,5) width 4: " "
+            RenderTableCell {TD} at (12,26) size 755x2028 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
               RenderBlock {P} at (4,4) size 747x76
                 RenderImage {IMG} at (0,0) size 15x50
                 RenderInline {SPAN} at (0,0) size 128x18
@@ -565,7 +565,7 @@
                 RenderText {#text} at (0,0) size 746x36
                   text run at (0,0) width 746: "In the following paragraph, all images should be aligned with the middle of the default text, whereas any text should"
                   text run at (0,18) width 390: "be aligned with the text baseline (which is the default value)."
-              RenderBlock {P} at (4,1506) size 747x230
+              RenderBlock {P} at (4,1506) size 747x231
                 RenderText {#text} at (0,22) size 101x18
                   text run at (0,22) width 101: "This paragraph "
                 RenderImage {IMG} at (100,17) size 10x31
@@ -588,59 +588,59 @@
                 RenderText {#text} at (689,22) size 5x18
                   text run at (689,22) width 5: " "
                 RenderImage {IMG} at (693,22) size 7x21
-                RenderText {#text} at (699,22) size 737x93
+                RenderText {#text} at (699,22) size 737x94
                   text run at (699,22) width 38: " all of"
-                  text run at (0,97) width 44: "which "
-                RenderImage {IMG} at (43,74) size 21x66
-                RenderText {#text} at (63,97) size 121x18
-                  text run at (63,97) width 121: " should be aligned "
-                RenderImage {IMG} at (183,89) size 12x36
-                RenderText {#text} at (194,97) size 5x18
-                  text run at (194,97) width 5: " "
+                  text run at (0,98) width 44: "which "
+                RenderImage {IMG} at (43,75) size 21x66
+                RenderText {#text} at (63,98) size 121x18
+                  text run at (63,98) width 121: " should be aligned "
+                RenderImage {IMG} at (183,90) size 12x36
+                RenderText {#text} at (194,98) size 5x18
+                  text run at (194,98) width 5: " "
                 RenderInline {SPAN} at (0,0) size 237x37
-                  RenderText {#text} at (198,82) size 237x37
-                    text run at (198,82) width 237: "with the middle of"
-                RenderText {#text} at (434,97) size 5x18
-                  text run at (434,97) width 5: " "
-                RenderImage {IMG} at (438,82) size 16x51
-                RenderText {#text} at (453,97) size 5x18
-                  text run at (453,97) width 5: " "
+                  RenderText {#text} at (198,83) size 237x37
+                    text run at (198,83) width 237: "with the middle of"
+                RenderText {#text} at (434,98) size 5x18
+                  text run at (434,98) width 5: " "
+                RenderImage {IMG} at (438,83) size 16x51
+                RenderText {#text} at (453,98) size 5x18
+                  text run at (453,98) width 5: " "
                 RenderInline {SPAN} at (0,0) size 720x105
-                  RenderText {#text} at (457,89) size 18x28
-                    text run at (457,89) width 18: "a "
+                  RenderText {#text} at (457,90) size 18x28
+                    text run at (457,90) width 18: "a "
                   RenderInline {SPAN} at (0,0) size 204x69
-                    RenderText {#text} at (474,57) size 204x69
-                      text run at (474,57) width 204: "14-point"
-                  RenderText {#text} at (677,89) size 720x105
-                    text run at (677,89) width 43: " text"
-                    text run at (0,166) width 76: "element"
-                RenderText {#text} at (75,174) size 5x18
-                  text run at (75,174) width 5: " "
-                RenderImage {IMG} at (79,159) size 16x51
-                RenderText {#text} at (94,174) size 5x18
-                  text run at (94,174) width 5: " "
+                    RenderText {#text} at (474,58) size 204x69
+                      text run at (474,58) width 204: "14-point"
+                  RenderText {#text} at (677,90) size 720x105
+                    text run at (677,90) width 43: " text"
+                    text run at (0,167) width 76: "element"
+                RenderText {#text} at (75,175) size 5x18
+                  text run at (75,175) width 5: " "
+                RenderImage {IMG} at (79,160) size 16x51
+                RenderText {#text} at (94,175) size 5x18
+                  text run at (94,175) width 5: " "
                 RenderInline {SMALL} at (0,0) size 195x18
-                  RenderText {#text} at (98,174) size 195x18
-                    text run at (98,174) width 195: "regardless of the line in which"
-                RenderText {#text} at (292,174) size 5x18
-                  text run at (292,174) width 5: " "
-                RenderImage {IMG} at (296,176) size 6x16
-                RenderText {#text} at (301,174) size 5x18
-                  text run at (301,174) width 5: " "
+                  RenderText {#text} at (98,175) size 195x18
+                    text run at (98,175) width 195: "regardless of the line in which"
+                RenderText {#text} at (292,175) size 5x18
+                  text run at (292,175) width 5: " "
+                RenderImage {IMG} at (296,177) size 6x16
+                RenderText {#text} at (301,175) size 5x18
+                  text run at (301,175) width 5: " "
                 RenderInline {BIG} at (0,0) size 156x24
-                  RenderText {#text} at (305,169) size 156x24
-                    text run at (305,169) width 156: "the images appear."
-                RenderText {#text} at (460,174) size 5x18
-                  text run at (460,174) width 5: " "
-                RenderImage {IMG} at (464,139) size 28x90
+                  RenderText {#text} at (305,170) size 156x24
+                    text run at (305,170) width 156: "the images appear."
+                RenderText {#text} at (460,175) size 5x18
+                  text run at (460,175) width 5: " "
+                RenderImage {IMG} at (464,140) size 28x90
                 RenderText {#text} at (0,0) size 0x0
-              RenderBlock {P} at (4,1751) size 747x55
+              RenderBlock {P} at (4,1752) size 747x55
                 RenderText {#text} at (0,0) size 723x54
                   text run at (0,0) width 723: "In the following paragraph, all elements should be aligned with the top of the tallest element on the line, whether"
                   text run at (0,18) width 206: "that element is an image or not. "
                   text run at (205,18) width 509: "Each fragment of text has been SPANned appropriately in order to cause this to"
                   text run at (0,36) width 51: "happen."
-              RenderBlock {P} at (4,1821) size 747x202
+              RenderBlock {P} at (4,1822) size 747x202
                 RenderInline {SPAN} at (0,0) size 97x18
                   RenderText {#text} at (0,0) size 97x18
                     text run at (0,0) width 97: "This paragraph"

Modified: trunk/LayoutTests/platform/mac/fast/table/table-display-types-strict-expected.txt (273385 => 273386)


--- trunk/LayoutTests/platform/mac/fast/table/table-display-types-strict-expected.txt	2021-02-24 16:45:08 UTC (rev 273385)
+++ trunk/LayoutTests/platform/mac/fast/table/table-display-types-strict-expected.txt	2021-02-24 17:02:31 UTC (rev 273386)
@@ -1,8 +1,8 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
-layer at (0,0) size 800x492
-  RenderBlock {HTML} at (0,0) size 800x492
-    RenderBody {BODY} at (8,10) size 784x474
+layer at (0,0) size 800x494
+  RenderBlock {HTML} at (0,0) size 800x494
+    RenderBody {BODY} at (8,10) size 784x476
       RenderBlock {TABLE} at (10,0) size 764x92 [border: (1px solid #000000)]
         RenderTable at (1,1) size 118x90
           RenderTableSection {THEAD} at (0,0) size 118x24
@@ -36,15 +36,15 @@
               RenderTableCell {TD} at (59,22) size 57x20 [r=1 c=1 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 39x18
                   text run at (1,1) width 39: "Cell 4"
-      RenderBlock {TABLE} at (10,102) size 764x50 [border: (1px solid #000000)]
-        RenderTable at (1,1) size 222x48
-          RenderTableSection (anonymous) at (0,0) size 222x27
-            RenderTableRow (anonymous) at (0,2) size 222x23
-              RenderTableCell {THEAD} at (2,2) size 100x23 [r=0 c=0 rs=1 cs=1]
-                RenderTable at (0,0) size 100x23
-                  RenderTableSection (anonymous) at (0,0) size 100x23
-                    RenderTableRow (anonymous) at (0,2) size 100x19
-                      RenderTableCell {TR} at (2,2) size 96x19 [r=0 c=0 rs=1 cs=1]
+      RenderBlock {TABLE} at (10,102) size 764x52 [border: (1px solid #000000)]
+        RenderTable at (1,1) size 222x50
+          RenderTableSection (anonymous) at (0,0) size 222x28
+            RenderTableRow (anonymous) at (0,2) size 222x24
+              RenderTableCell {THEAD} at (2,2) size 100x24 [r=0 c=0 rs=1 cs=1]
+                RenderTable at (0,0) size 100x24
+                  RenderTableSection (anonymous) at (0,0) size 100x24
+                    RenderTableRow (anonymous) at (0,2) size 100x20
+                      RenderTableCell {TR} at (2,2) size 96x20 [r=0 c=0 rs=1 cs=1]
                         RenderInline {TD} at (0,0) size 48x21
                           RenderText {#text} at (1,1) size 46x19
                             text run at (1,1) width 46: "Head 1"
@@ -51,11 +51,11 @@
                         RenderInline {TD} at (0,0) size 49x21
                           RenderText {#text} at (48,1) size 47x19
                             text run at (48,1) width 47: "Head 2"
-              RenderTableCell {TFOOT} at (103,2) size 117x23 [r=0 c=1 rs=1 cs=1]
-                RenderTable at (0,0) size 116x23
-                  RenderTableSection (anonymous) at (0,0) size 116x23
-                    RenderTableRow (anonymous) at (0,2) size 116x19
-                      RenderTableCell {TR} at (2,2) size 112x19 [r=0 c=0 rs=1 cs=1]
+              RenderTableCell {TFOOT} at (103,2) size 117x24 [r=0 c=1 rs=1 cs=1]
+                RenderTable at (0,0) size 116x24
+                  RenderTableSection (anonymous) at (0,0) size 116x24
+                    RenderTableRow (anonymous) at (0,2) size 116x20
+                      RenderTableCell {TR} at (2,2) size 112x20 [r=0 c=0 rs=1 cs=1]
                         RenderInline {TD} at (0,0) size 56x21
                           RenderText {#text} at (1,1) size 54x19
                             text run at (1,1) width 54: "Footer 1"
@@ -62,9 +62,9 @@
                         RenderInline {TD} at (0,0) size 57x21
                           RenderText {#text} at (56,1) size 55x19
                             text run at (56,1) width 55: "Footer 2"
-          RenderTableSection {TBODY} at (0,27) size 222x21
-            RenderTableRow (anonymous) at (0,0) size 222x19
-              RenderTableCell {TR} at (2,0) size 100x19 [r=0 c=0 rs=1 cs=1]
+          RenderTableSection {TBODY} at (0,28) size 222x22
+            RenderTableRow (anonymous) at (0,0) size 222x20
+              RenderTableCell {TR} at (2,0) size 100x20 [r=0 c=0 rs=1 cs=1]
                 RenderInline {TD} at (0,0) size 41x21
                   RenderText {#text} at (1,1) size 39x19
                     text run at (1,1) width 39: "Cell 1"
@@ -71,7 +71,7 @@
                 RenderInline {TD} at (0,0) size 42x21
                   RenderText {#text} at (41,1) size 40x19
                     text run at (41,1) width 40: "Cell 2"
-              RenderTableCell {TR} at (103,0) size 117x19 [r=0 c=1 rs=1 cs=1]
+              RenderTableCell {TR} at (103,0) size 117x20 [r=0 c=1 rs=1 cs=1]
                 RenderInline {TD} at (0,0) size 41x21
                   RenderText {#text} at (1,1) size 39x19
                     text run at (1,1) width 39: "Cell 3"
@@ -78,7 +78,7 @@
                 RenderInline {TD} at (0,0) size 42x21
                   RenderText {#text} at (41,1) size 40x19
                     text run at (41,1) width 40: "Cell 4"
-      RenderBlock {TABLE} at (10,162) size 764x102 [border: (1px solid #000000)]
+      RenderBlock {TABLE} at (10,164) size 764x102 [border: (1px solid #000000)]
         RenderBlock {THEAD} at (1,1) size 762x24
           RenderBlock {TR} at (0,0) size 762x24
             RenderTable at (0,0) size 102x24
@@ -125,7 +125,7 @@
                         RenderTableCell {TD} at (44,2) size 42x20 [r=0 c=1 rs=1 cs=1]
                           RenderText {#text} at (1,1) size 39x18
                             text run at (1,1) width 39: "Cell 4"
-      RenderTable at (0,274) size 302x200
+      RenderTable at (0,276) size 302x200
         RenderTableSection (anonymous) at (0,0) size 302x200
           RenderTableRow (anonymous) at (0,0) size 302x200
             RenderTableCell {P} at (0,0) size 302x200 [border: (1px solid #000000)] [r=0 c=0 rs=1 cs=1]

Modified: trunk/Source/WebCore/ChangeLog (273385 => 273386)


--- trunk/Source/WebCore/ChangeLog	2021-02-24 16:45:08 UTC (rev 273385)
+++ trunk/Source/WebCore/ChangeLog	2021-02-24 17:02:31 UTC (rev 273386)
@@ -1,3 +1,17 @@
+2021-02-24  Zalan Bujtas  <za...@apple.com>
+
+        [LegacyLineLayout] Inline level box should not stick out at the bottom of its containing block
+        https://bugs.webkit.org/show_bug.cgi?id=222334
+
+        Reviewed by Antti Koivisto.
+
+        When the inline level box's baseline lands on a subpixel position, because of the way we integral "snap" the ascent and descent values
+        it can end up sticking out of the containing block.
+        (containing block's height is based on the max ascent + max descent and with implicitly floored descent values, it may not always be enclosing.)
+
+        * rendering/InlineFlowBox.cpp:
+        (WebCore::InlineFlowBox::computeLogicalBoxHeights):
+
 2021-02-24  Simon Fraser  <simon.fra...@apple.com>
 
         Runtime-disabled CSS features still appear enabled via CSS.supports()

Modified: trunk/Source/WebCore/rendering/InlineFlowBox.cpp (273385 => 273386)


--- trunk/Source/WebCore/rendering/InlineFlowBox.cpp	2021-02-24 16:45:08 UTC (rev 273385)
+++ trunk/Source/WebCore/rendering/InlineFlowBox.cpp	2021-02-24 17:02:31 UTC (rev 273386)
@@ -610,7 +610,7 @@
             // setMaxDescent booleans are used to ensure that we're willing to initially set maxAscent/Descent to negative
             // values.
             ascent -= floorf(child->logicalTop());
-            descent += child->logicalTop();
+            auto isMaxAscent = false;
             if (affectsAscent) {
                 if (maxAscent < ascent || !setMaxAscent) {
                     maxAscent = ascent;
@@ -617,12 +617,16 @@
                     setMaxAscent = true;
                     maxAscentInlineBoxList.clear();
                 }
-                if (maxAscent == ascent) {
+                isMaxAscent = maxAscent == ascent;
+                if (isMaxAscent) {
                     // A line can have multiple inline boxes with the same max ascent.
                     maxAscentInlineBoxList.append(child);
+
                 }
             }
-
+            // In order to make sure the inline level box is fully enclosed, we should always ceil the descent (containing block's height is max ascent + max descent).
+            // However when the box's logical top is floored (see below), the descent value should also be adjusted in the same direction. 
+            descent += isMaxAscent ? floorf(child->logicalTop()) : ceilf(child->logicalTop());
             if (affectsDescent && (maxDescent < descent || !setMaxDescent)) {
                 maxDescent = descent;
                 setMaxDescent = true;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to