Diff
Modified: trunk/LayoutTests/ChangeLog (289713 => 289714)
--- trunk/LayoutTests/ChangeLog 2022-02-13 16:00:33 UTC (rev 289713)
+++ trunk/LayoutTests/ChangeLog 2022-02-13 17:41:35 UTC (rev 289714)
@@ -1,3 +1,13 @@
+2022-02-13 Alan Bujtas <[email protected]>
+
+ [LFC][IFC] Take writing direction into account when setting up the root geometry
+ https://bugs.webkit.org/show_bug.cgi?id=236548
+
+ Reviewed by Antti Koivisto.
+
+ * platform/mac/fast/text/international/bidi-layout-across-linebreak-expected.txt: Progressions.
+ * platform/mac/fast/text/international/bidi-override-expected.txt:
+
2022-02-13 Andres Gonzalez <[email protected]>
Expose the correct role, subrole and role description properties for the <dialog> element.
Modified: trunk/LayoutTests/platform/mac/fast/text/international/bidi-layout-across-linebreak-expected.txt (289713 => 289714)
--- trunk/LayoutTests/platform/mac/fast/text/international/bidi-layout-across-linebreak-expected.txt 2022-02-13 16:00:33 UTC (rev 289713)
+++ trunk/LayoutTests/platform/mac/fast/text/international/bidi-layout-across-linebreak-expected.txt 2022-02-13 17:41:35 UTC (rev 289714)
@@ -69,19 +69,19 @@
RenderText {#text} at (3,3) size 11x18
text run at (3,3) width 11: "3"
RenderTableCell {TD} at (47,105) size 46x41 [border: (1px solid #008000)] [r=3 c=1 rs=1 cs=1]
- RenderText {#text} at (2,3) size 21x18
- text run at (2,3) width 21 RTL: "\x{5D0}\x{5D0}"
- RenderBR {BR} at (2,3) size 0x18
- RenderText {#text} at (2,21) size 26x18
- text run at (2,21) width 11: "b"
- text run at (12,21) width 6 RTL: " "
- text run at (17,21) width 11: "1"
+ RenderText {#text} at (3,3) size 21x18
+ text run at (3,3) width 21 RTL: "\x{5D0}\x{5D0}"
+ RenderBR {BR} at (3,3) size 0x18
+ RenderText {#text} at (3,21) size 26x18
+ text run at (3,21) width 11: "b"
+ text run at (13,21) width 6 RTL: " "
+ text run at (18,21) width 11: "1"
RenderTableCell {TD} at (92,105) size 35x41 [border: (1px solid #008000)] [r=3 c=2 rs=1 cs=1]
- RenderText {#text} at (2,3) size 26x36
- text run at (2,3) width 21 RTL: "\x{5D0}\x{5D0}"
- text run at (2,21) width 11: "b"
- text run at (12,21) width 6 RTL: " "
- text run at (17,21) width 11: "1"
+ RenderText {#text} at (3,3) size 26x36
+ text run at (3,3) width 21 RTL: "\x{5D0}\x{5D0}"
+ text run at (3,21) width 11: "b"
+ text run at (13,21) width 6 RTL: " "
+ text run at (18,21) width 11: "1"
RenderTableCell {TD} at (126,105) size 46x41 [border: (1px solid #008000)] [r=3 c=3 rs=1 cs=1]
RenderBlock {P} at (3,3) size 40x18
RenderText {#text} at (0,0) size 21x18
@@ -94,17 +94,17 @@
RenderText {#text} at (3,3) size 11x18
text run at (3,3) width 11: "4"
RenderTableCell {TD} at (47,146) size 46x41 [border: (1px solid #008000)] [r=4 c=1 rs=1 cs=1]
- RenderText {#text} at (2,3) size 18x18
- text run at (2,3) width 18: "aa"
- RenderBR {BR} at (2,3) size 0x18
- RenderText {#text} at (2,21) size 26x18
- text run at (2,21) width 11: "b"
- text run at (12,21) width 6 RTL: " "
- text run at (17,21) width 11: "1"
+ RenderText {#text} at (3,3) size 18x18
+ text run at (3,3) width 18: "aa"
+ RenderBR {BR} at (3,3) size 0x18
+ RenderText {#text} at (3,21) size 26x18
+ text run at (3,21) width 11: "b"
+ text run at (13,21) width 6 RTL: " "
+ text run at (18,21) width 11: "1"
RenderTableCell {TD} at (92,146) size 35x41 [border: (1px solid #008000)] [r=4 c=2 rs=1 cs=1]
- RenderText {#text} at (2,3) size 26x36
- text run at (2,3) width 18: "aa"
- text run at (2,21) width 26: "1 b"
+ RenderText {#text} at (3,3) size 26x36
+ text run at (3,3) width 18: "aa"
+ text run at (3,21) width 26: "1 b"
RenderTableCell {TD} at (126,146) size 46x41 [border: (1px solid #008000)] [r=4 c=3 rs=1 cs=1]
RenderBlock {P} at (3,3) size 40x18
RenderText {#text} at (0,0) size 18x18
@@ -117,17 +117,17 @@
RenderText {#text} at (3,3) size 11x18
text run at (3,3) width 11: "5"
RenderTableCell {TD} at (47,187) size 46x41 [border: (1px solid #008000)] [r=5 c=1 rs=1 cs=1]
- RenderText {#text} at (2,3) size 21x18
- text run at (2,3) width 21 RTL: "\x{5D0}\x{5D0}"
- RenderBR {BR} at (2,3) size 0x18
- RenderText {#text} at (2,21) size 25x18
- text run at (2,21) width 15 RTL: " \x{5D1}"
- text run at (16,21) width 11: "1"
+ RenderText {#text} at (3,3) size 21x18
+ text run at (3,3) width 21 RTL: "\x{5D0}\x{5D0}"
+ RenderBR {BR} at (3,3) size 0x18
+ RenderText {#text} at (3,21) size 25x18
+ text run at (3,21) width 15 RTL: " \x{5D1}"
+ text run at (17,21) width 11: "1"
RenderTableCell {TD} at (92,187) size 35x41 [border: (1px solid #008000)] [r=5 c=2 rs=1 cs=1]
- RenderText {#text} at (2,3) size 25x36
- text run at (2,3) width 21 RTL: "\x{5D0}\x{5D0}"
- text run at (2,21) width 15 RTL: " \x{5D1}"
- text run at (16,21) width 11: "1"
+ RenderText {#text} at (3,3) size 25x36
+ text run at (3,3) width 21 RTL: "\x{5D0}\x{5D0}"
+ text run at (3,21) width 15 RTL: " \x{5D1}"
+ text run at (17,21) width 11: "1"
RenderTableCell {TD} at (126,187) size 46x41 [border: (1px solid #008000)] [r=5 c=3 rs=1 cs=1]
RenderBlock {P} at (3,3) size 40x18
RenderText {#text} at (0,0) size 21x18
@@ -140,17 +140,17 @@
RenderText {#text} at (3,3) size 11x18
text run at (3,3) width 11: "6"
RenderTableCell {TD} at (47,228) size 46x41 [border: (1px solid #008000)] [r=6 c=1 rs=1 cs=1]
- RenderText {#text} at (2,3) size 18x18
- text run at (2,3) width 18: "aa"
- RenderBR {BR} at (2,3) size 0x18
- RenderText {#text} at (2,21) size 25x18
- text run at (2,21) width 15 RTL: " \x{5D1}"
- text run at (16,21) width 11: "1"
+ RenderText {#text} at (3,3) size 18x18
+ text run at (3,3) width 18: "aa"
+ RenderBR {BR} at (3,3) size 0x18
+ RenderText {#text} at (3,21) size 25x18
+ text run at (3,21) width 15 RTL: " \x{5D1}"
+ text run at (17,21) width 11: "1"
RenderTableCell {TD} at (92,228) size 35x41 [border: (1px solid #008000)] [r=6 c=2 rs=1 cs=1]
- RenderText {#text} at (2,3) size 25x36
- text run at (2,3) width 18: "aa"
- text run at (2,21) width 15 RTL: " \x{5D1}"
- text run at (16,21) width 11: "1"
+ RenderText {#text} at (3,3) size 25x36
+ text run at (3,3) width 18: "aa"
+ text run at (3,21) width 15 RTL: " \x{5D1}"
+ text run at (17,21) width 11: "1"
RenderTableCell {TD} at (126,228) size 46x41 [border: (1px solid #008000)] [r=6 c=3 rs=1 cs=1]
RenderBlock {P} at (3,3) size 40x18
RenderText {#text} at (0,0) size 18x18
Modified: trunk/LayoutTests/platform/mac/fast/text/international/bidi-override-expected.txt (289713 => 289714)
--- trunk/LayoutTests/platform/mac/fast/text/international/bidi-override-expected.txt 2022-02-13 16:00:33 UTC (rev 289713)
+++ trunk/LayoutTests/platform/mac/fast/text/international/bidi-override-expected.txt 2022-02-13 17:41:35 UTC (rev 289714)
@@ -21,14 +21,14 @@
text run at (165,6) width 23: "abc"
text run at (187,6) width 51 RTL: "\x{5D0}\x{5D1}\x{5D2}\x{5D3}\x{5D4}\x{5D5}"
RenderTableCell {TD} at (339,0) size 243x28 [border: (1px solid #008000)] [r=0 c=2 rs=1 cs=1]
- RenderText {#text} at (4,6) size 233x18
- text run at (4,6) width 50 RTL: "\x{5D6}\x{5D7}\x{5D8}\x{5D9}\x{5DB}\x{5DC}"
- text run at (53,6) width 24: "abc"
- text run at (76,6) width 51 RTL: "\x{5D0}\x{5D1}\x{5D2}\x{5D3}\x{5D4}\x{5D5}"
- text run at (126,6) width 5 RTL: " "
- text run at (130,6) width 44: "abcdef"
- text run at (173,6) width 27 RTL: "\x{5D0}\x{5D1}\x{5D2}"
- text run at (199,6) width 38: "ghijkl"
+ RenderText {#text} at (5,6) size 233x18
+ text run at (5,6) width 50 RTL: "\x{5D6}\x{5D7}\x{5D8}\x{5D9}\x{5DB}\x{5DC}"
+ text run at (54,6) width 24: "abc"
+ text run at (77,6) width 51 RTL: "\x{5D0}\x{5D1}\x{5D2}\x{5D3}\x{5D4}\x{5D5}"
+ text run at (127,6) width 5 RTL: " "
+ text run at (131,6) width 44: "abcdef"
+ text run at (174,6) width 27 RTL: "\x{5D0}\x{5D1}\x{5D2}"
+ text run at (200,6) width 38: "ghijkl"
RenderTableRow {TR} at (0,28) size 582x28
RenderTableCell {TD} at (0,28) size 98x28 [border: (1px solid #008000)] [r=1 c=0 rs=1 cs=1]
RenderText {#text} at (7,4) size 87x20
@@ -48,19 +48,19 @@
RenderText {#text} at (115,6) size 23x18
text run at (115,6) width 23 RTL: "\x{5D9}\x{5DB}\x{5DC}"
RenderTableCell {TD} at (339,28) size 243x28 [border: (1px solid #008000)] [r=1 c=2 rs=1 cs=1]
- RenderText {#text} at (130,6) size 23x18
- text run at (130,6) width 23: "abc"
+ RenderText {#text} at (131,6) size 23x18
+ text run at (131,6) width 23: "abc"
RenderInline {SPAN} at (0,0) size 69x18
- RenderText {#text} at (152,6) size 69x18
- text run at (152,6) width 69 RTL: "ihg\x{5D0}\x{5D1}\x{5D2}fed"
- RenderText {#text} at (100,6) size 137x18
- text run at (100,6) width 31 RTL: " \x{5D0}\x{5D1}\x{5D2}"
- text run at (220,6) width 17: "jkl"
+ RenderText {#text} at (153,6) size 69x18
+ text run at (153,6) width 69 RTL: "ihg\x{5D0}\x{5D1}\x{5D2}fed"
+ RenderText {#text} at (101,6) size 137x18
+ text run at (101,6) width 31 RTL: " \x{5D0}\x{5D1}\x{5D2}"
+ text run at (221,6) width 17: "jkl"
RenderInline {SPAN} at (0,0) size 75x18
- RenderText {#text} at (26,6) size 75x18
- text run at (26,6) width 75: "\x{5D8}\x{5D7}\x{5D6}abc\x{5D5}\x{5D4}\x{5D3}"
- RenderText {#text} at (4,6) size 23x18
- text run at (4,6) width 23 RTL: "\x{5D9}\x{5DB}\x{5DC}"
+ RenderText {#text} at (27,6) size 75x18
+ text run at (27,6) width 75: "\x{5D8}\x{5D7}\x{5D6}abc\x{5D5}\x{5D4}\x{5D3}"
+ RenderText {#text} at (5,6) size 23x18
+ text run at (5,6) width 23 RTL: "\x{5D9}\x{5DB}\x{5DC}"
RenderTableRow {TR} at (0,56) size 582x28
RenderTableCell {TD} at (0,56) size 98x28 [border: (1px solid #008000)] [r=2 c=0 rs=1 cs=1]
RenderText {#text} at (5,4) size 89x20
@@ -86,23 +86,23 @@
text run at (115,6) width 23 RTL: "\x{5D9}\x{5DB}\x{5DC}"
RenderTableCell {TD} at (339,56) size 243x28 [border: (1px solid #008000)] [r=2 c=2 rs=1 cs=1]
RenderInline {SPAN} at (0,0) size 107x18
- RenderText {#text} at (130,6) size 23x18
- text run at (130,6) width 23: "abc"
+ RenderText {#text} at (131,6) size 23x18
+ text run at (131,6) width 23: "abc"
RenderInline {SPAN} at (0,0) size 69x18
- RenderText {#text} at (152,6) size 69x18
- text run at (152,6) width 69 RTL: "ihg\x{5D0}\x{5D1}\x{5D2}fed"
- RenderText {#text} at (220,6) size 17x18
- text run at (220,6) width 17: "jkl"
- RenderText {#text} at (126,6) size 5x18
- text run at (126,6) width 5 RTL: " "
+ RenderText {#text} at (153,6) size 69x18
+ text run at (153,6) width 69 RTL: "ihg\x{5D0}\x{5D1}\x{5D2}fed"
+ RenderText {#text} at (221,6) size 17x18
+ text run at (221,6) width 17: "jkl"
+ RenderText {#text} at (127,6) size 5x18
+ text run at (127,6) width 5 RTL: " "
RenderInline {SPAN} at (0,0) size 123x18
- RenderText {#text} at (100,6) size 27x18
- text run at (100,6) width 27 RTL: "\x{5D0}\x{5D1}\x{5D2}"
+ RenderText {#text} at (101,6) size 27x18
+ text run at (101,6) width 27 RTL: "\x{5D0}\x{5D1}\x{5D2}"
RenderInline {SPAN} at (0,0) size 75x18
- RenderText {#text} at (26,6) size 75x18
- text run at (26,6) width 75: "\x{5D8}\x{5D7}\x{5D6}abc\x{5D5}\x{5D4}\x{5D3}"
- RenderText {#text} at (4,6) size 23x18
- text run at (4,6) width 23 RTL: "\x{5D9}\x{5DB}\x{5DC}"
+ RenderText {#text} at (27,6) size 75x18
+ text run at (27,6) width 75: "\x{5D8}\x{5D7}\x{5D6}abc\x{5D5}\x{5D4}\x{5D3}"
+ RenderText {#text} at (5,6) size 23x18
+ text run at (5,6) width 23 RTL: "\x{5D9}\x{5DB}\x{5DC}"
RenderTableRow {TR} at (0,84) size 582x28
RenderTableCell {TD} at (0,84) size 98x28 [border: (1px solid #008000)] [r=3 c=0 rs=1 cs=1]
RenderText {#text} at (39,4) size 55x20
@@ -116,14 +116,14 @@
text run at (137,6) width 75: "\x{202D}\x{5D8}\x{5D7}\x{5D6}abc\x{5D5}\x{5D4}\x{5D3}"
text run at (211,6) width 27 RTL: "\x{5D0}\x{5D1}\x{5D2}"
RenderTableCell {TD} at (339,84) size 243x28 [border: (1px solid #008000)] [r=3 c=2 rs=1 cs=1]
- RenderText {#text} at (4,6) size 233x18
- text run at (4,6) width 23 RTL: "\x{202C}\x{5D9}\x{5DB}\x{5DC}"
- text run at (26,6) width 75: "\x{202D}\x{5D8}\x{5D7}\x{5D6}abc\x{5D5}\x{5D4}\x{5D3}"
- text run at (100,6) width 27 RTL: "\x{5D0}\x{5D1}\x{5D2}"
- text run at (126,6) width 5 RTL: " "
- text run at (130,6) width 23: "abc"
- text run at (152,6) width 69 RTL: "\x{202E}ihg\x{5D0}\x{5D1}\x{5D2}fed"
- text run at (220,6) width 17: "\x{202C}jkl"
+ RenderText {#text} at (5,6) size 233x18
+ text run at (5,6) width 23 RTL: "\x{202C}\x{5D9}\x{5DB}\x{5DC}"
+ text run at (27,6) width 75: "\x{202D}\x{5D8}\x{5D7}\x{5D6}abc\x{5D5}\x{5D4}\x{5D3}"
+ text run at (101,6) width 27 RTL: "\x{5D0}\x{5D1}\x{5D2}"
+ text run at (127,6) width 5 RTL: " "
+ text run at (131,6) width 23: "abc"
+ text run at (153,6) width 69 RTL: "\x{202E}ihg\x{5D0}\x{5D1}\x{5D2}fed"
+ text run at (221,6) width 17: "\x{202C}jkl"
RenderBlock {P} at (0,163) size 784x18
RenderText {#text} at (0,0) size 394x18
text run at (0,0) width 394: "The CSS column should be identical to the reference column."
Modified: trunk/Source/WebCore/ChangeLog (289713 => 289714)
--- trunk/Source/WebCore/ChangeLog 2022-02-13 16:00:33 UTC (rev 289713)
+++ trunk/Source/WebCore/ChangeLog 2022-02-13 17:41:35 UTC (rev 289714)
@@ -1,3 +1,18 @@
+2022-02-13 Alan Bujtas <[email protected]>
+
+ [LFC][IFC] Take writing direction into account when setting up the root geometry
+ https://bugs.webkit.org/show_bug.cgi?id=236548
+
+ Reviewed by Antti Koivisto.
+
+ This fixes cases when the root block container itself is in a vertical writing context.
+ <div style="writing-mode: vertical-rl">
+ <div style="display: inline-block; padding: 10px">vertical content</div>
+ </div>
+
+ * layout/integration/LayoutIntegrationLineLayout.cpp:
+ (WebCore::LayoutIntegration::LineLayout::updateFormattingRootGeometryAndInvalidate):
+
2022-02-13 Andres Gonzalez <[email protected]>
Expose the correct role, subrole and role description properties for the <dialog> element.
Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp (289713 => 289714)
--- trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp 2022-02-13 16:00:33 UTC (rev 289713)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp 2022-02-13 17:41:35 UTC (rev 289714)
@@ -345,9 +345,12 @@
auto& flow = this->flow();
auto updateGeometry = [&](auto& root) {
- root.setContentBoxWidth(flow.contentLogicalWidth());
- root.setPadding(Layout::Edges { { flow.paddingStart(), flow.paddingEnd() }, { flow.paddingBefore(), flow.paddingAfter() } });
- root.setBorder(Layout::Edges { { flow.borderStart(), flow.borderEnd() }, { flow.borderBefore(), flow.borderAfter() } });
+ auto isLeftToRightDirection = flow.style().isLeftToRightDirection();
+ auto isHorizontalWritingMode = flow.style().isHorizontalWritingMode();
+
+ root.setContentBoxWidth(isHorizontalWritingMode ? flow.contentWidth() : flow.contentHeight());
+ root.setPadding(logicalPadding(flow, isLeftToRightDirection, isHorizontalWritingMode));
+ root.setBorder(logicalBorder(flow, isLeftToRightDirection, isHorizontalWritingMode));
root.setHorizontalMargin({ });
root.setVerticalMargin({ });
};