Title: [276216] trunk
Revision
276216
Author
[email protected]
Date
2021-04-17 18:03:18 -0700 (Sat, 17 Apr 2021)

Log Message

Add support for inline-{start/end} values to float & clear properties
https://bugs.webkit.org/show_bug.cgi?id=218087

Patch by Tim Nguyen <[email protected]> on 2021-04-17
Reviewed by Antti Koivisto & Zalan Bujtas.

Imported reftests from: https://github.com/web-platform-tests/wpt/commit/47e7176242e2ca4ca68d6cfe032619ccf44d55a6
Enabled: imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear.html

LayoutTests/imported/w3c:

* web-platform-tests/css/css-box/parsing/clear-computed-expected.txt:
* web-platform-tests/css/css-box/parsing/clear-valid-expected.txt:
* web-platform-tests/css/css-box/parsing/float-computed-expected.txt:
* web-platform-tests/css/css-box/parsing/float-valid-expected.txt:
* web-platform-tests/css/css-logical/logical-values-float-clear-1-expected.html: Added.
* web-platform-tests/css/css-logical/logical-values-float-clear-1.html: Added.
* web-platform-tests/css/css-logical/logical-values-float-clear-2-expected.html: Added.
* web-platform-tests/css/css-logical/logical-values-float-clear-2.html: Added.
* web-platform-tests/css/css-logical/logical-values-float-clear-3-expected.html: Added.
* web-platform-tests/css/css-logical/logical-values-float-clear-3.html: Added.
* web-platform-tests/css/css-logical/logical-values-float-clear-4-expected.html: Added.
* web-platform-tests/css/css-logical/logical-values-float-clear-4.html: Added.
* web-platform-tests/css/css-logical/logical-values-float-clear-expected.txt:
* web-platform-tests/css/css-logical/w3c-import.log:

Source/WebCore:

Tests: imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-1.html
       imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-2.html
       imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-3.html
       imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-4.html

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator Clear const):
(WebCore::CSSPrimitiveValue::operator Float const):
* css/CSSValueKeywords.in:
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
* display/css/DisplayStyle.cpp:
(WebCore::Display::Style::Style):
* layout/integration/LayoutIntegrationBoxTree.cpp:
(WebCore::LayoutIntegration::BoxTree::buildTree):
* layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::isFloatingPositioned const):
* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::TreeBuilder::createLayoutBox):
(WebCore::Layout::TreeBuilder::buildTableStructure):
* rendering/ComplexLineLayout.cpp:
(WebCore::ComplexLineLayout::layoutRunsAndFloats):
(WebCore::ComplexLineLayout::layoutRunsAndFloatsInRange):
* rendering/FloatingObjects.cpp:
(WebCore::FloatingObject::FloatingObject):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeBlockPreferredLogicalWidths const):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::marginOffsetForSelfCollapsingBlock):
(WebCore::RenderBlockFlow::marginBeforeEstimateForChild const):
(WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
(WebCore::RenderBlockFlow::positionNewFloats):
(WebCore::RenderBlockFlow::clearFloats):
(WebCore::RenderBlockFlow::getClearDelta):
(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):
* rendering/RenderBlockFlow.h:
* rendering/line/BreakingContext.h:
(WebCore::BreakingContext::handleBR):
* rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::reset):
* rendering/line/LineBreaker.h:
(WebCore::LineBreaker::usedClear):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::usedClear):
(WebCore::RenderStyle::usedFloat):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::isFloating const):
(WebCore::RenderStyle::initialFloating):
* rendering/style/RenderStyleConstants.cpp:
(WebCore::operator<<):
* rendering/style/RenderStyleConstants.h:
* style/StyleAdjuster.cpp:
(WebCore::Style::Adjuster::adjust const):

LayoutTests:

* TestExpectations:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (276215 => 276216)


--- trunk/LayoutTests/ChangeLog	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/LayoutTests/ChangeLog	2021-04-18 01:03:18 UTC (rev 276216)
@@ -1,3 +1,15 @@
+2021-04-17  Tim Nguyen  <[email protected]>
+
+        Add support for inline-{start/end} values to float & clear properties
+        https://bugs.webkit.org/show_bug.cgi?id=218087
+
+        Reviewed by Antti Koivisto & Zalan Bujtas.
+
+        Imported reftests from: https://github.com/web-platform-tests/wpt/commit/47e7176242e2ca4ca68d6cfe032619ccf44d55a6
+        Enabled: imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear.html
+
+        * TestExpectations:
+
 2021-04-17  Diego Pino Garcia  <[email protected]>
 
         [GLIB] Unreviewed test gardening. Emit new baseline after r276193.

Modified: trunk/LayoutTests/TestExpectations (276215 => 276216)


--- trunk/LayoutTests/TestExpectations	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/LayoutTests/TestExpectations	2021-04-18 01:03:18 UTC (rev 276216)
@@ -2935,6 +2935,8 @@
 imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-OAEP.https.any.html [ Pass Failure ]
 imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-OAEP.https.any.worker.html [ Pass Failure ]
 
+webkit.org/b/224104 imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-reftest.html [ ImageOnlyFailure ]
+
 # wpt css-shapes
 webkit.org/b/203539 imported/w3c/web-platform-tests/css/css-shapes/shape-outside/shape-image/gradients/shape-outside-linear-gradient-005.html [ ImageOnlyFailure ]
 webkit.org/b/203539 imported/w3c/web-platform-tests/css/css-shapes/shape-outside/shape-image/gradients/shape-outside-linear-gradient-006.html [ ImageOnlyFailure ]
@@ -4576,7 +4578,6 @@
 
 webkit.org/b/214466 imported/w3c/web-platform-tests/css/css-values/ex-unit-004.html [ ImageOnlyFailure ]
 webkit.org/b/214466 imported/w3c/web-platform-tests/css/css-shapes/shape-outside/formatting-context/shape-outside-formatting-context.tentative.html [ ImageOnlyFailure ]
-webkit.org/b/214466 imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-reftest.html [ ImageOnlyFailure ]
 webkit.org/b/214466 imported/w3c/web-platform-tests/css/css-display/display-first-line-002.html [ ImageOnlyFailure ]
 
 webkit.org/b/214467 imported/w3c/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-with-src-rect.tentative.html [ ImageOnlyFailure ]

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (276215 => 276216)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-04-18 01:03:18 UTC (rev 276216)
@@ -1,3 +1,28 @@
+2021-04-17  Tim Nguyen  <[email protected]>
+
+        Add support for inline-{start/end} values to float & clear properties
+        https://bugs.webkit.org/show_bug.cgi?id=218087
+
+        Reviewed by Antti Koivisto & Zalan Bujtas.
+
+        Imported reftests from: https://github.com/web-platform-tests/wpt/commit/47e7176242e2ca4ca68d6cfe032619ccf44d55a6
+        Enabled: imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear.html
+
+        * web-platform-tests/css/css-box/parsing/clear-computed-expected.txt:
+        * web-platform-tests/css/css-box/parsing/clear-valid-expected.txt:
+        * web-platform-tests/css/css-box/parsing/float-computed-expected.txt:
+        * web-platform-tests/css/css-box/parsing/float-valid-expected.txt:
+        * web-platform-tests/css/css-logical/logical-values-float-clear-1-expected.html: Added.
+        * web-platform-tests/css/css-logical/logical-values-float-clear-1.html: Added.
+        * web-platform-tests/css/css-logical/logical-values-float-clear-2-expected.html: Added.
+        * web-platform-tests/css/css-logical/logical-values-float-clear-2.html: Added.
+        * web-platform-tests/css/css-logical/logical-values-float-clear-3-expected.html: Added.
+        * web-platform-tests/css/css-logical/logical-values-float-clear-3.html: Added.
+        * web-platform-tests/css/css-logical/logical-values-float-clear-4-expected.html: Added.
+        * web-platform-tests/css/css-logical/logical-values-float-clear-4.html: Added.
+        * web-platform-tests/css/css-logical/logical-values-float-clear-expected.txt:
+        * web-platform-tests/css/css-logical/w3c-import.log:
+
 2021-04-17  Tyler Wilcock  <[email protected]>
 
         Consider making CSSStyleSheet::rules() just an alias of CSSStyleSheet::cssRules().

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-box/parsing/clear-computed-expected.txt (276215 => 276216)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-box/parsing/clear-computed-expected.txt	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-box/parsing/clear-computed-expected.txt	2021-04-18 01:03:18 UTC (rev 276216)
@@ -3,6 +3,6 @@
 PASS Property clear value 'left'
 PASS Property clear value 'right'
 PASS Property clear value 'both'
-FAIL Property clear value 'inline-start' assert_true: 'inline-start' is a supported value for clear. expected true got false
-FAIL Property clear value 'inline-end' assert_true: 'inline-end' is a supported value for clear. expected true got false
+PASS Property clear value 'inline-start'
+PASS Property clear value 'inline-end'
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-box/parsing/clear-valid-expected.txt (276215 => 276216)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-box/parsing/clear-valid-expected.txt	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-box/parsing/clear-valid-expected.txt	2021-04-18 01:03:18 UTC (rev 276216)
@@ -3,6 +3,6 @@
 PASS e.style['clear'] = "left" should set the property value
 PASS e.style['clear'] = "right" should set the property value
 PASS e.style['clear'] = "both" should set the property value
-FAIL e.style['clear'] = "inline-start" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['clear'] = "inline-end" should set the property value assert_not_equals: property should be set got disallowed value ""
+PASS e.style['clear'] = "inline-start" should set the property value
+PASS e.style['clear'] = "inline-end" should set the property value
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-box/parsing/float-computed-expected.txt (276215 => 276216)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-box/parsing/float-computed-expected.txt	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-box/parsing/float-computed-expected.txt	2021-04-18 01:03:18 UTC (rev 276216)
@@ -2,6 +2,6 @@
 PASS Property float value 'none'
 PASS Property float value 'left'
 PASS Property float value 'right'
-FAIL Property float value 'inline-start' assert_true: 'inline-start' is a supported value for float. expected true got false
-FAIL Property float value 'inline-end' assert_true: 'inline-end' is a supported value for float. expected true got false
+PASS Property float value 'inline-start'
+PASS Property float value 'inline-end'
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-box/parsing/float-valid-expected.txt (276215 => 276216)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-box/parsing/float-valid-expected.txt	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-box/parsing/float-valid-expected.txt	2021-04-18 01:03:18 UTC (rev 276216)
@@ -2,6 +2,6 @@
 PASS e.style['float'] = "left" should set the property value
 PASS e.style['float'] = "right" should set the property value
 PASS e.style['float'] = "none" should set the property value
-FAIL e.style['float'] = "inline-start" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['float'] = "inline-end" should set the property value assert_not_equals: property should be set got disallowed value ""
+PASS e.style['float'] = "inline-start" should set the property value
+PASS e.style['float'] = "inline-end" should set the property value
 

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-1-expected.html (0 => 276216)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-1-expected.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-1-expected.html	2021-04-18 01:03:18 UTC (rev 276216)
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<style>
+body > div { width: 20em; margin: 1em; padding: 2px; border: 1px solid silver; }
+div > div { margin: .5em; padding: .5em; background: yellow; }
+.left { float: left; }
+.right { float: right; }
+.ltr { direction: ltr; }
+.rtl { direction: rtl; }
+</style>
+
+<body>
+<div class="ltr">
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+ Phasellus efficitur nisi at sollicitudin eleifend.
+ <div class="left">Inline-start</div>
+ Vestibulum ac condimentum diam. Vivamus viverra iaculis mollis.
+ Nam bibendum, dolor id porttitor egestas, metus sem pretium eros,
+ ut mollis mauris ligula eu risus. Aenean eget vestibulum nunc.
+ <div class="right">Inline-end</div>
+ Nam vitae eleifend tellus. Vestibulum ut accumsan lacus.
+ Vivamus vitae eros hendrerit, tincidunt augue non, laoreet justo.
+ Aliquam erat volutpat.
+</div>
+
+<div class="rtl">
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+ Phasellus efficitur nisi at sollicitudin eleifend.
+ <div class="right">Inline-start</div>
+ Vestibulum ac condimentum diam. Vivamus viverra iaculis mollis.
+ Nam bibendum, dolor id porttitor egestas, metus sem pretium eros,
+ ut mollis mauris ligula eu risus. Aenean eget vestibulum nunc.
+ <div class="left">Inline-end</div>
+ Nam vitae eleifend tellus. Vestibulum ut accumsan lacus.
+ Vivamus vitae eros hendrerit, tincidunt augue non, laoreet justo.
+ Aliquam erat volutpat.
+</div>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-1.html (0 => 276216)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-1.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-1.html	2021-04-18 01:03:18 UTC (rev 276216)
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<meta charset="utf-8" />
+<link rel="help" href=""
+<link rel="match" href=""
+<style>
+body > div { width: 20em; margin: 1em; padding: 2px; border: 1px solid silver; }
+div > div { margin: .5em; padding: .5em; background: yellow; }
+.is { float: inline-start; }
+.ie { float: inline-end; }
+.ltr { direction: ltr; }
+.rtl { direction: rtl; }
+</style>
+
+<body>
+<div class="ltr">
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+ Phasellus efficitur nisi at sollicitudin eleifend.
+ <div class="is">Inline-start</div>
+ Vestibulum ac condimentum diam. Vivamus viverra iaculis mollis.
+ Nam bibendum, dolor id porttitor egestas, metus sem pretium eros,
+ ut mollis mauris ligula eu risus. Aenean eget vestibulum nunc.
+ <div class="ie">Inline-end</div>
+ Nam vitae eleifend tellus. Vestibulum ut accumsan lacus.
+ Vivamus vitae eros hendrerit, tincidunt augue non, laoreet justo.
+ Aliquam erat volutpat.
+</div>
+
+<div class="rtl">
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+ Phasellus efficitur nisi at sollicitudin eleifend.
+ <div class="is">Inline-start</div>
+ Vestibulum ac condimentum diam. Vivamus viverra iaculis mollis.
+ Nam bibendum, dolor id porttitor egestas, metus sem pretium eros,
+ ut mollis mauris ligula eu risus. Aenean eget vestibulum nunc.
+ <div class="ie">Inline-end</div>
+ Nam vitae eleifend tellus. Vestibulum ut accumsan lacus.
+ Vivamus vitae eros hendrerit, tincidunt augue non, laoreet justo.
+ Aliquam erat volutpat.
+</div>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-2-expected.html (0 => 276216)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-2-expected.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-2-expected.html	2021-04-18 01:03:18 UTC (rev 276216)
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<style>
+html { writing-mode: vertical-rl; }
+body > div { height: 20em; margin: 1em; padding: 2px; border: 1px solid silver; }
+div > div { margin: .5em; padding: .5em; background: yellow; }
+.left { float: left; }
+.right { float: right; }
+.ltr { direction: ltr; }
+.rtl { direction: rtl; }
+</style>
+
+<body>
+<div class="ltr">
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+ Phasellus efficitur nisi at sollicitudin eleifend.
+ <div class="left">Inline-start</div>
+ Vestibulum ac condimentum diam. Vivamus viverra iaculis mollis.
+ Nam bibendum, dolor id porttitor egestas, metus sem pretium eros,
+ ut mollis mauris ligula eu risus. Aenean eget vestibulum nunc.
+ <div class="right">Inline-end</div>
+ Nam vitae eleifend tellus. Vestibulum ut accumsan lacus.
+ Vivamus vitae eros hendrerit, tincidunt augue non, laoreet justo.
+ Aliquam erat volutpat.
+</div>
+
+<div class="rtl">
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+ Phasellus efficitur nisi at sollicitudin eleifend.
+ <div class="right">Inline-start</div>
+ Vestibulum ac condimentum diam. Vivamus viverra iaculis mollis.
+ Nam bibendum, dolor id porttitor egestas, metus sem pretium eros,
+ ut mollis mauris ligula eu risus. Aenean eget vestibulum nunc.
+ <div class="left">Inline-end</div>
+ Nam vitae eleifend tellus. Vestibulum ut accumsan lacus.
+ Vivamus vitae eros hendrerit, tincidunt augue non, laoreet justo.
+ Aliquam erat volutpat.
+</div>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-2.html (0 => 276216)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-2.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-2.html	2021-04-18 01:03:18 UTC (rev 276216)
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<meta charset="utf-8" />
+<link rel="help" href=""
+<link rel="match" href=""
+<style>
+html { writing-mode: vertical-rl; }
+body > div { height: 20em; margin: 1em; padding: 2px; border: 1px solid silver; }
+div > div { margin: .5em; padding: .5em; background: yellow; }
+.is { float: inline-start; }
+.ie { float: inline-end; }
+.ltr { direction: ltr; }
+.rtl { direction: rtl; }
+</style>
+
+<body>
+<div class="ltr">
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+ Phasellus efficitur nisi at sollicitudin eleifend.
+ <div class="is">Inline-start</div>
+ Vestibulum ac condimentum diam. Vivamus viverra iaculis mollis.
+ Nam bibendum, dolor id porttitor egestas, metus sem pretium eros,
+ ut mollis mauris ligula eu risus. Aenean eget vestibulum nunc.
+ <div class="ie">Inline-end</div>
+ Nam vitae eleifend tellus. Vestibulum ut accumsan lacus.
+ Vivamus vitae eros hendrerit, tincidunt augue non, laoreet justo.
+ Aliquam erat volutpat.
+</div>
+
+<div class="rtl">
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+ Phasellus efficitur nisi at sollicitudin eleifend.
+ <div class="is">Inline-start</div>
+ Vestibulum ac condimentum diam. Vivamus viverra iaculis mollis.
+ Nam bibendum, dolor id porttitor egestas, metus sem pretium eros,
+ ut mollis mauris ligula eu risus. Aenean eget vestibulum nunc.
+ <div class="ie">Inline-end</div>
+ Nam vitae eleifend tellus. Vestibulum ut accumsan lacus.
+ Vivamus vitae eros hendrerit, tincidunt augue non, laoreet justo.
+ Aliquam erat volutpat.
+</div>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-3-expected.html (0 => 276216)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-3-expected.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-3-expected.html	2021-04-18 01:03:18 UTC (rev 276216)
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<style>
+body > div { width: 15em; height: 10em; margin: 1em; padding: 2px; border: 1px solid silver; }
+div > div { margin: .5em; padding: .5em; background: yellow; }
+.a { clear: left; }
+.b { clear: right; }
+.fl { float: left; height: 4em; }
+.fr { float: right; height: 2em; }
+.fl2 { float: left; height: 2em; }
+.fr4 { float: right; height: 4em; }
+.ltr { direction: ltr; }
+.rtl { direction: rtl; }
+</style>
+
+<body>
+<div class="ltr">
+ <div class="fl">Start</div>
+ <div class="fr">End</div>
+ <p class="a">a b c d e f g h i j k l m n o p q r s t u v w x y z LTR clear:inline-start</p>
+</div>
+
+<div class="ltr">
+ <div class="fl">Start</div>
+ <div class="fr">End</div>
+ <p class="b">a b c d e f g h i j k l m n o p q r s t u v w x y z LTR clear:inline-end</p>
+</div>
+
+<div class="rtl">
+ <div class="fl2">End</div>
+ <div class="fr4">Start</div>
+ <p class="b">a b c d e f g h i j k l m n o p q r s t u v w x y z RTL clear:inline-start</p>
+</div>
+
+<div class="rtl">
+ <div class="fl2">End</div>
+ <div class="fr4">Start</div>
+ <p class="a">a b c d e f g h i j k l m n o p q r s t u v w x y z RTL clear:inline-end</p>
+</div>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-3.html (0 => 276216)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-3.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-3.html	2021-04-18 01:03:18 UTC (rev 276216)
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<meta charset="utf-8" />
+<link rel="help" href=""
+<link rel="match" href=""
+<style>
+body > div { width: 15em; height: 10em; margin: 1em; padding: 2px; border: 1px solid silver; }
+div > div { margin: .5em; padding: .5em; background: yellow; }
+.a { clear: inline-start; }
+.b { clear: inline-end; }
+.is { float: inline-start; height: 4em; }
+.ie { float: inline-end; height: 2em; }
+.ltr { direction: ltr; }
+.rtl { direction: rtl; }
+</style>
+
+<body>
+<div class="ltr">
+ <div class="is">Start</div>
+ <div class="ie">End</div>
+ <p class="a">a b c d e f g h i j k l m n o p q r s t u v w x y z LTR clear:inline-start</p>
+</div>
+
+<div class="ltr">
+ <div class="is">Start</div>
+ <div class="ie">End</div>
+ <p class="b">a b c d e f g h i j k l m n o p q r s t u v w x y z LTR clear:inline-end</p>
+</div>
+
+<div class="rtl">
+ <div class="is">Start</div>
+ <div class="ie">End</div>
+ <p class="a">a b c d e f g h i j k l m n o p q r s t u v w x y z RTL clear:inline-start</p>
+</div>
+
+<div class="rtl">
+ <div class="is">Start</div>
+ <div class="ie">End</div>
+ <p class="b">a b c d e f g h i j k l m n o p q r s t u v w x y z RTL clear:inline-end</p>
+</div>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-4-expected.html (0 => 276216)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-4-expected.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-4-expected.html	2021-04-18 01:03:18 UTC (rev 276216)
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<style>
+html { writing-mode: vertical-rl; }
+body > div { height: 15em; width: 10em; margin: 1em; padding: 2px; border: 1px solid silver; }
+div > div { margin: .5em; padding: .5em; background: yellow; }
+.a { clear: left; }
+.b { clear: right; }
+.fl { float: left; width: 4em; }
+.fr { float: right; width: 2em; }
+.fl2 { float: left; width: 2em; }
+.fr4 { float: right; width: 4em; }
+.ltr { direction: ltr; }
+.rtl { direction: rtl; }
+</style>
+
+<body>
+<div class="ltr">
+ <div class="fl">Start</div>
+ <div class="fr">End</div>
+ <p class="a">a b c d e f g h i j k l m n o p q r s t u v w x y z LTR clear:inline-start</p>
+</div>
+
+<div class="ltr">
+ <div class="fl">Start</div>
+ <div class="fr">End</div>
+ <p class="b">a b c d e f g h i j k l m n o p q r s t u v w x y z LTR clear:inline-end</p>
+</div>
+
+<div class="rtl">
+ <div class="fl2">End</div>
+ <div class="fr4">Start</div>
+ <p class="b">a b c d e f g h i j k l m n o p q r s t u v w x y z RTL clear:inline-start</p>
+</div>
+
+<div class="rtl">
+ <div class="fl2">End</div>
+ <div class="fr4">Start</div>
+ <p class="a">a b c d e f g h i j k l m n o p q r s t u v w x y z RTL clear:inline-end</p>
+</div>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-4.html (0 => 276216)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-4.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-4.html	2021-04-18 01:03:18 UTC (rev 276216)
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<meta charset="utf-8" />
+<link rel="help" href=""
+<link rel="match" href=""
+<style>
+html { writing-mode: vertical-rl; }
+body > div { height: 15em; width: 10em; margin: 1em; padding: 2px; border: 1px solid silver; }
+div > div { margin: .5em; padding: .5em; background: yellow; }
+.a { clear: inline-start; }
+.b { clear: inline-end; }
+.is { float: inline-start; width: 4em; }
+.ie { float: inline-end; width: 2em; }
+.ltr { direction: ltr; }
+.rtl { direction: rtl; }
+</style>
+
+<body>
+<div class="ltr">
+ <div class="is">Start</div>
+ <div class="ie">End</div>
+ <p class="a">a b c d e f g h i j k l m n o p q r s t u v w x y z LTR clear:inline-start</p>
+</div>
+
+<div class="ltr">
+ <div class="is">Start</div>
+ <div class="ie">End</div>
+ <p class="b">a b c d e f g h i j k l m n o p q r s t u v w x y z LTR clear:inline-end</p>
+</div>
+
+<div class="rtl">
+ <div class="is">Start</div>
+ <div class="ie">End</div>
+ <p class="a">a b c d e f g h i j k l m n o p q r s t u v w x y z RTL clear:inline-start</p>
+</div>
+
+<div class="rtl">
+ <div class="is">Start</div>
+ <div class="ie">End</div>
+ <p class="b">a b c d e f g h i j k l m n o p q r s t u v w x y z RTL clear:inline-end</p>
+</div>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-expected.txt (276215 => 276216)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-expected.txt	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-expected.txt	2021-04-18 01:03:18 UTC (rev 276216)
@@ -1,6 +1,6 @@
 
-FAIL Test that 'clear: inline-start' is supported. assert_equals: logical values in inline style, clear expected "inline-start" but got ""
-FAIL Test that 'clear: inline-end' is supported. assert_equals: logical values in inline style, clear expected "inline-end" but got ""
-FAIL Test that 'float: inline-start' is supported. assert_equals: logical values in inline style, float expected "inline-start" but got ""
-FAIL Test that 'float: inline-end' is supported. assert_equals: logical values in inline style, float expected "inline-end" but got ""
+PASS Test that 'clear: inline-start' is supported.
+PASS Test that 'clear: inline-end' is supported.
+PASS Test that 'float: inline-start' is supported.
+PASS Test that 'float: inline-end' is supported.
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/w3c-import.log (276215 => 276216)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/w3c-import.log	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/w3c-import.log	2021-04-18 01:03:18 UTC (rev 276216)
@@ -32,6 +32,14 @@
 /LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-box-margin.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-box-padding.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-box-size.html
+/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-1-expected.html
+/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-1.html
+/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-2-expected.html
+/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-2.html
+/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-3-expected.html
+/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-3.html
+/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-4-expected.html
+/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-4.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-reftest-expected.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-reftest.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear.html

Modified: trunk/Source/WebCore/ChangeLog (276215 => 276216)


--- trunk/Source/WebCore/ChangeLog	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/Source/WebCore/ChangeLog	2021-04-18 01:03:18 UTC (rev 276216)
@@ -1,3 +1,68 @@
+2021-04-17  Tim Nguyen  <[email protected]>
+
+        Add support for inline-{start/end} values to float & clear properties
+        https://bugs.webkit.org/show_bug.cgi?id=218087
+
+        Reviewed by Antti Koivisto & Zalan Bujtas.
+
+        Imported reftests from: https://github.com/web-platform-tests/wpt/commit/47e7176242e2ca4ca68d6cfe032619ccf44d55a6
+        Enabled: imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear.html
+
+        Tests: imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-1.html
+               imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-2.html
+               imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-3.html
+               imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-4.html
+
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+        (WebCore::CSSPrimitiveValue::operator Clear const):
+        (WebCore::CSSPrimitiveValue::operator Float const):
+        * css/CSSValueKeywords.in:
+        * css/parser/CSSParserFastPaths.cpp:
+        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
+        * display/css/DisplayStyle.cpp:
+        (WebCore::Display::Style::Style):
+        * layout/integration/LayoutIntegrationBoxTree.cpp:
+        (WebCore::LayoutIntegration::BoxTree::buildTree):
+        * layout/layouttree/LayoutBox.cpp:
+        (WebCore::Layout::Box::isFloatingPositioned const):
+        * layout/layouttree/LayoutTreeBuilder.cpp:
+        (WebCore::Layout::TreeBuilder::createLayoutBox):
+        (WebCore::Layout::TreeBuilder::buildTableStructure):
+        * rendering/ComplexLineLayout.cpp:
+        (WebCore::ComplexLineLayout::layoutRunsAndFloats):
+        (WebCore::ComplexLineLayout::layoutRunsAndFloatsInRange):
+        * rendering/FloatingObjects.cpp:
+        (WebCore::FloatingObject::FloatingObject):
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::computeBlockPreferredLogicalWidths const):
+        * rendering/RenderBlockFlow.cpp:
+        (WebCore::RenderBlockFlow::marginOffsetForSelfCollapsingBlock):
+        (WebCore::RenderBlockFlow::marginBeforeEstimateForChild const):
+        (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
+        (WebCore::RenderBlockFlow::positionNewFloats):
+        (WebCore::RenderBlockFlow::clearFloats):
+        (WebCore::RenderBlockFlow::getClearDelta):
+        (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):
+        * rendering/RenderBlockFlow.h:
+        * rendering/line/BreakingContext.h:
+        (WebCore::BreakingContext::handleBR):
+        * rendering/line/LineBreaker.cpp:
+        (WebCore::LineBreaker::reset):
+        * rendering/line/LineBreaker.h:
+        (WebCore::LineBreaker::usedClear):
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::RenderStyle::usedClear):
+        (WebCore::RenderStyle::usedFloat):
+        * rendering/style/RenderStyle.h:
+        (WebCore::RenderStyle::isFloating const):
+        (WebCore::RenderStyle::initialFloating):
+        * rendering/style/RenderStyleConstants.cpp:
+        (WebCore::operator<<):
+        * rendering/style/RenderStyleConstants.h:
+        * style/StyleAdjuster.cpp:
+        (WebCore::Style::Adjuster::adjust const):
+
 2021-04-17  Basuke Suzuki  <[email protected]>
 
         [Curl] Remove warnings on curl layer.

Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (276215 => 276216)


--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h	2021-04-18 01:03:18 UTC (rev 276216)
@@ -1128,6 +1128,12 @@
     case Clear::Right:
         m_value.valueID = CSSValueRight;
         break;
+    case Clear::InlineStart:
+        m_value.valueID = CSSValueInlineStart;
+        break;
+    case Clear::InlineEnd:
+        m_value.valueID = CSSValueInlineEnd;
+        break;
     case Clear::Both:
         m_value.valueID = CSSValueBoth;
         break;
@@ -1145,6 +1151,10 @@
         return Clear::Left;
     case CSSValueRight:
         return Clear::Right;
+    case CSSValueInlineStart:
+        return Clear::InlineStart;
+    case CSSValueInlineEnd:
+        return Clear::InlineEnd;
     case CSSValueBoth:
         return Clear::Both;
     default:
@@ -1580,7 +1590,7 @@
 {
     setPrimitiveUnitType(CSSUnitType::CSS_VALUE_ID);
     switch (e) {
-    case Float::No:
+    case Float::None:
         m_value.valueID = CSSValueNone;
         break;
     case Float::Left:
@@ -1589,6 +1599,12 @@
     case Float::Right:
         m_value.valueID = CSSValueRight;
         break;
+    case Float::InlineStart:
+        m_value.valueID = CSSValueInlineStart;
+        break;
+    case Float::InlineEnd:
+        m_value.valueID = CSSValueInlineEnd;
+        break;
     }
 }
 
@@ -1601,15 +1617,19 @@
         return Float::Left;
     case CSSValueRight:
         return Float::Right;
+    case CSSValueInlineStart:
+        return Float::InlineStart;
+    case CSSValueInlineEnd:
+        return Float::InlineEnd;
     case CSSValueNone:
     case CSSValueCenter: // Non-standard CSS value.
-        return Float::No;
+        return Float::None;
     default:
         break;
     }
 
     ASSERT_NOT_REACHED();
-    return Float::No;
+    return Float::None;
 }
 
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(LineBreak e)

Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (276215 => 276216)


--- trunk/Source/WebCore/css/CSSValueKeywords.in	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in	2021-04-18 01:03:18 UTC (rev 276216)
@@ -348,6 +348,14 @@
 inter-word
 distribute
 //
+// CSS_PROP_CLEAR:
+// CSS_PROP_FLOAT:
+// none
+// left
+// right
+inline-start
+inline-end
+//
 // CSS_PROP_LIST_STYLE_POSITION:
 //
 outside

Modified: trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp (276215 => 276216)


--- trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp	2021-04-18 01:03:18 UTC (rev 276216)
@@ -619,8 +619,8 @@
         return valueID == CSSValueAuto || valueID == CSSValueDynamic || valueID == CSSValueStatic;
     case CSSPropertyCaptionSide: // top | bottom | left | right
         return valueID == CSSValueLeft || valueID == CSSValueRight || valueID == CSSValueTop || valueID == CSSValueBottom;
-    case CSSPropertyClear: // none | left | right | both
-        return valueID == CSSValueNone || valueID == CSSValueLeft || valueID == CSSValueRight || valueID == CSSValueBoth;
+    case CSSPropertyClear: // none | inline-start | inline-end | left | right | both
+        return valueID == CSSValueNone || valueID == CSSValueInlineStart || valueID == CSSValueInlineEnd || valueID == CSSValueLeft || valueID == CSSValueRight || valueID == CSSValueBoth;
     case CSSPropertyClipRule:
     case CSSPropertyFillRule:
         return valueID == CSSValueNonzero || valueID == CSSValueEvenodd;
@@ -647,8 +647,8 @@
             || (valueID >= CSSValueCentral && valueID <= CSSValueMathematical);
     case CSSPropertyEmptyCells: // show | hide
         return valueID == CSSValueShow || valueID == CSSValueHide;
-    case CSSPropertyFloat: // left | right | none
-        return valueID == CSSValueLeft || valueID == CSSValueRight || valueID == CSSValueNone;
+    case CSSPropertyFloat: // inline-start | inline-end | left | right | none
+        return valueID == CSSValueInlineStart || valueID == CSSValueInlineEnd || valueID == CSSValueLeft || valueID == CSSValueRight || valueID == CSSValueNone;
     case CSSPropertyImageOrientation: // from-image | none
         return valueID == CSSValueFromImage || valueID == CSSValueNone;
     case CSSPropertyImageRendering: // auto | optimizeContrast | pixelated | optimizeSpeed | crispEdges | optimizeQuality | webkit-crispEdges

Modified: trunk/Source/WebCore/display/css/DisplayStyle.cpp (276215 => 276216)


--- trunk/Source/WebCore/display/css/DisplayStyle.cpp	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/Source/WebCore/display/css/DisplayStyle.cpp	2021-04-18 01:03:18 UTC (rev 276216)
@@ -105,7 +105,7 @@
         m_zIndex = style.usedZIndex();
 
     setIsPositioned(style.position() != PositionType::Static);
-    setIsFloating(style.floating() != Float::No);
+    setIsFloating(style.floating() != Float::None);
     setHasTransform(style.hasTransform());
 }
 

Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp (276215 => 276216)


--- trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp	2021-04-18 01:03:18 UTC (rev 276216)
@@ -72,7 +72,7 @@
         auto style = RenderStyle::clone(childRenderer.style());
         if (childRenderer.isLineBreak()) {
             style.setDisplay(DisplayType::Inline);
-            style.setFloating(Float::No);
+            style.setFloating(Float::None);
             style.setPosition(PositionType::Static);
             return makeUnique<Layout::LineBreakBox>(downcast<RenderLineBreak>(childRenderer).isWBR(), WTFMove(style));
         }

Modified: trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp (276215 => 276216)


--- trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp	2021-04-18 01:03:18 UTC (rev 276216)
@@ -163,7 +163,7 @@
     // FIXME: Rendering code caches values like this. (style="position: absolute; float: left")
     if (isOutOfFlowPositioned())
         return false;
-    return m_style.floating() != Float::No;
+    return m_style.floating() != Float::None;
 }
 
 bool Box::isLeftFloatingPositioned() const

Modified: trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp (276215 => 276216)


--- trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp	2021-04-18 01:03:18 UTC (rev 276216)
@@ -199,7 +199,7 @@
 
         if (is<RenderLineBreak>(renderer)) {
             clonedStyle.setDisplay(DisplayType::Inline);
-            clonedStyle.setFloating(Float::No);
+            clonedStyle.setFloating(Float::None);
             clonedStyle.setPosition(PositionType::Static);
             childLayoutBox = &createLineBreakBox(downcast<RenderLineBreak>(childRenderer).isWBR(), WTFMove(clonedStyle));
         } else if (is<RenderTable>(renderer)) {
@@ -304,7 +304,7 @@
 
     auto tableBoxStyle = RenderStyle::clone(tableRenderer.style());
     tableBoxStyle.setPosition(PositionType::Static);
-    tableBoxStyle.setFloating(Float::No);
+    tableBoxStyle.setFloating(Float::None);
     tableBoxStyle.resetMargin();
     // FIXME: Figure out where the spec says table width is like box-sizing: border-box;
     if (is<HTMLTableElement>(tableRenderer.element()))

Modified: trunk/Source/WebCore/rendering/ComplexLineLayout.cpp (276215 => 276216)


--- trunk/Source/WebCore/rendering/ComplexLineLayout.cpp	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/Source/WebCore/rendering/ComplexLineLayout.cpp	2021-04-18 01:03:18 UTC (rev 276216)
@@ -1359,8 +1359,8 @@
             if (!lastObject->isBR())
                 lastObject = &lastRootBox()->firstLeafDescendant()->renderer();
             if (lastObject->isBR()) {
-                Clear clear = lastObject->style().clear();
-                if (clear != Clear::None)
+                auto clear = RenderStyle::usedClear(*lastObject);
+                if (clear != UsedClear::None)
                     m_flow.clearFloats(clear);
             }
         }
@@ -1504,7 +1504,7 @@
 
         if (!layoutState.lineInfo().isEmpty()) {
             layoutState.lineInfo().setFirstLine(false);
-            m_flow.clearFloats(lineBreaker.clear());
+            m_flow.clearFloats(lineBreaker.usedClear());
         }
 
         if (m_flow.floatingObjects() && lastRootBox()) {

Modified: trunk/Source/WebCore/rendering/FloatingObjects.cpp (276215 => 276216)


--- trunk/Source/WebCore/rendering/FloatingObjects.cpp	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/Source/WebCore/rendering/FloatingObjects.cpp	2021-04-18 01:03:18 UTC (rev 276216)
@@ -57,11 +57,11 @@
     , m_isInPlacedTree(false)
 #endif
 {
-    Float type = renderer.style().floating();
-    ASSERT(type != Float::No);
-    if (type == Float::Left)
+    UsedFloat type = RenderStyle::usedFloat(renderer);
+    ASSERT(type != UsedFloat::None);
+    if (type == UsedFloat::Left)
         m_type = FloatLeft;
-    else if (type == Float::Right)
+    else if (type == UsedFloat::Right)
         m_type = FloatRight;
 }
 

Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (276215 => 276216)


--- trunk/Source/WebCore/rendering/RenderBlock.cpp	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp	2021-04-18 01:03:18 UTC (rev 276216)
@@ -2342,11 +2342,12 @@
         const RenderStyle& childStyle = child->style();
         if (child->isFloating() || (is<RenderBox>(*child) && downcast<RenderBox>(*child).avoidsFloats())) {
             LayoutUnit floatTotalWidth = floatLeftWidth + floatRightWidth;
-            if (childStyle.clear() == Clear::Left || childStyle.clear() == Clear::Both) {
+            auto childUsedClear = RenderStyle::usedClear(*child);
+            if (childUsedClear == UsedClear::Left || childUsedClear == UsedClear::Both) {
                 maxLogicalWidth = std::max(floatTotalWidth, maxLogicalWidth);
                 floatLeftWidth = 0;
             }
-            if (childStyle.clear() == Clear::Right || childStyle.clear() == Clear::Both) {
+            if (childUsedClear == UsedClear::Right || childUsedClear == UsedClear::Both) {
                 maxLogicalWidth = std::max(floatTotalWidth, maxLogicalWidth);
                 floatRightWidth = 0;
             }
@@ -2371,7 +2372,7 @@
 
         LayoutUnit w = childMinPreferredLogicalWidth + margin;
         minLogicalWidth = std::max(w, minLogicalWidth);
-        
+
         // IE ignores tables for calculation of nowrap. Makes some sense.
         if (nowrap && !child->isTable())
             maxLogicalWidth = std::max(w, maxLogicalWidth);
@@ -2395,15 +2396,15 @@
                 maxLogicalWidth = std::max(floatLeftWidth + floatRightWidth, maxLogicalWidth);
             floatLeftWidth = floatRightWidth = 0;
         }
-        
+
         if (child->isFloating()) {
-            if (childStyle.floating() == Float::Left)
+            if (RenderStyle::usedFloat(*child) == UsedFloat::Left)
                 floatLeftWidth += w;
             else
                 floatRightWidth += w;
         } else
             maxLogicalWidth = std::max(w, maxLogicalWidth);
-        
+
         child = child->nextSibling();
     }
 

Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (276215 => 276216)


--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp	2021-04-18 01:03:18 UTC (rev 276216)
@@ -875,7 +875,7 @@
 {
     ASSERT(isSelfCollapsingBlock());
     RenderBlockFlow* parentBlock = downcast<RenderBlockFlow>(parent());
-    if (parentBlock && style().clear() != Clear::None && parentBlock->getClearDelta(*this, logicalHeight()))
+    if (parentBlock && RenderStyle::usedClear(*this) != UsedClear::None && parentBlock->getClearDelta(*this, logicalHeight()))
         return marginValuesForChild(*this).positiveMarginBefore();
     return 0_lu;
 }
@@ -1311,7 +1311,7 @@
     }
     
     // Give up if there is clearance on the box, since it probably won't collapse into us.
-    if (!grandchildBox || grandchildBox->style().clear() != Clear::None)
+    if (!grandchildBox || RenderStyle::usedClear(*grandchildBox) != UsedClear::None)
         return;
 
     // Make sure to update the block margins now for the grandchild box so that we're looking at current values.
@@ -2441,8 +2441,8 @@
             setLogicalHeight(logicalHeight() + letterClearance);
         }
     }
-    
-    if (childBox.style().floating() == Float::Left) {
+
+    if (RenderStyle::usedFloat(childBox) == UsedFloat::Left) {
         LayoutUnit heightRemainingLeft = 1_lu;
         LayoutUnit heightRemainingRight = 1_lu;
         floatLogicalLeft = logicalLeftOffsetForPositioningFloat(logicalTopOffset, logicalLeftOffset, false, &heightRemainingLeft);
@@ -2476,7 +2476,7 @@
         // fast/block/float/clamped-right-float.html.
         floatLogicalLeft -= logicalWidthForFloat(floatingObject);
     }
-    
+
     LayoutUnit childLogicalLeftMargin = style().isLeftToRightDirection() ? marginStartForChild(childBox) : marginEndForChild(childBox);
     LayoutUnit childBeforeMargin = marginBeforeForChild(childBox);
     
@@ -2566,10 +2566,10 @@
             continue;
 
         LayoutRect oldRect = childBox.frameRect();
-
-        if (childBox.style().clear() == Clear::Left || childBox.style().clear() == Clear::Both)
+        auto childBoxUsedClear = RenderStyle::usedClear(childBox);
+        if (childBoxUsedClear == UsedClear::Left || childBoxUsedClear == UsedClear::Both)
             logicalTop = std::max(lowestFloatLogicalBottom(FloatingObject::FloatLeft), logicalTop);
-        if (childBox.style().clear() == Clear::Right || childBox.style().clear() == Clear::Both)
+        if (childBoxUsedClear == UsedClear::Right || childBoxUsedClear == UsedClear::Both)
             logicalTop = std::max(lowestFloatLogicalBottom(FloatingObject::FloatRight), logicalTop);
 
         computeLogicalLocationForFloat(floatingObject, logicalTop);
@@ -2624,22 +2624,22 @@
     return true;
 }
 
-void RenderBlockFlow::clearFloats(Clear clear)
+void RenderBlockFlow::clearFloats(UsedClear usedClear)
 {
     positionNewFloats();
     // set y position
     LayoutUnit newY;
-    switch (clear) {
-    case Clear::Left:
+    switch (usedClear) {
+    case UsedClear::Left:
         newY = lowestFloatLogicalBottom(FloatingObject::FloatLeft);
         break;
-    case Clear::Right:
+    case UsedClear::Right:
         newY = lowestFloatLogicalBottom(FloatingObject::FloatRight);
         break;
-    case Clear::Both:
+    case UsedClear::Both:
         newY = lowestFloatLogicalBottom();
         break;
-    case Clear::None:
+    case UsedClear::None:
         break;
     }
     // FIXME: The float search tree has floored float box position (see FloatingObjects::intervalForFloatingObject).
@@ -2892,18 +2892,19 @@
         return 0;
     
     // At least one float is present. We need to perform the clearance computation.
-    bool clearSet = child.style().clear() != Clear::None;
+    UsedClear usedClear = RenderStyle::usedClear(child);
+    bool clearSet = usedClear != UsedClear::None;
     LayoutUnit logicalBottom;
-    switch (child.style().clear()) {
-    case Clear::None:
+    switch (usedClear) {
+    case UsedClear::None:
         break;
-    case Clear::Left:
+    case UsedClear::Left:
         logicalBottom = lowestFloatLogicalBottom(FloatingObject::FloatLeft);
         break;
-    case Clear::Right:
+    case UsedClear::Right:
         logicalBottom = lowestFloatLogicalBottom(FloatingObject::FloatRight);
         break;
-    case Clear::Both:
+    case UsedClear::Both:
         logicalBottom = lowestFloatLogicalBottom();
         break;
     }
@@ -4229,7 +4230,7 @@
         // (that's exactly to what we try to contribute here) unless the computed value is fixed.
         textIndent = minimumValueForLength(styleToUse.textIndent(), containingBlock->style().logicalWidth().value());
     }
-    RenderObject* prevFloat = 0;
+    RenderObject* previousFloat = 0;
     bool isPrevChildInlineFlow = false;
     bool shouldBreakLineAfterText = false;
     bool canHangPunctuationAtStart = styleToUse.hangingPunctuation().contains(HangingPunctuation::First);
@@ -4321,14 +4322,17 @@
                 childMin += childMinPreferredLogicalWidth.ceilToFloat();
                 childMax += childMaxPreferredLogicalWidth.ceilToFloat();
 
-                bool clearPreviousFloat;
+                bool clearPreviousFloat = false;
                 if (child->isFloating()) {
-                    clearPreviousFloat = (prevFloat
-                        && ((prevFloat->style().floating() == Float::Left && (childStyle.clear() == Clear::Left || childStyle.clear() == Clear::Both))
-                            || (prevFloat->style().floating() == Float::Right && (childStyle.clear() == Clear::Right || childStyle.clear() == Clear::Both))));
-                    prevFloat = child;
-                } else
-                    clearPreviousFloat = false;
+                    auto childClearValue = RenderStyle::usedClear(*child);
+                    if (previousFloat) {
+                        auto previousFloatValue = RenderStyle::usedFloat(*previousFloat);
+                        clearPreviousFloat =
+                            (previousFloatValue == UsedFloat::Left && (childClearValue == UsedClear::Left || childClearValue == UsedClear::Both))
+                            || (previousFloatValue == UsedFloat::Right && (childClearValue == UsedClear::Right || childClearValue == UsedClear::Both));
+                    }
+                    previousFloat = child;
+                }
 
                 bool canBreakReplacedElement = !child->isImage() || allowImagesToBreak;
                 if (((canBreakReplacedElement && (autoWrap || oldAutoWrap) && (!isPrevChildInlineFlow || shouldBreakLineAfterText)) || clearPreviousFloat)) {

Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.h (276215 => 276216)


--- trunk/Source/WebCore/rendering/RenderBlockFlow.h	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.h	2021-04-18 01:03:18 UTC (rev 276216)
@@ -495,7 +495,7 @@
     // Called from lineWidth, to position the floats added in the last line.
     // Returns true if and only if it has positioned any floats.
     bool positionNewFloats();
-    void clearFloats(Clear);
+    void clearFloats(UsedClear);
     FloatingObjects* floatingObjects() { return m_floatingObjects.get(); }
 
     LayoutUnit logicalRightFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, LayoutUnit logicalHeight) const override;

Modified: trunk/Source/WebCore/rendering/line/BreakingContext.h (276215 => 276216)


--- trunk/Source/WebCore/rendering/line/BreakingContext.h	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/Source/WebCore/rendering/line/BreakingContext.h	2021-04-18 01:03:18 UTC (rev 276216)
@@ -140,7 +140,7 @@
 
     void increment();
 
-    void handleBR(Clear&);
+    void handleBR(UsedClear&);
     void handleOutOfFlowPositioned(Vector<RenderBox*>& positionedObjects);
     void handleFloat();
     void handleEmptyInline();
@@ -267,7 +267,7 @@
     m_atStart = false;
 }
 
-inline void BreakingContext::handleBR(Clear& clear)
+inline void BreakingContext::handleBR(UsedClear& usedClear)
 {
     if (fitsOnLineOrHangsAtEnd()) {
         auto& br = *m_current.renderer();
@@ -287,7 +287,7 @@
         // A <br> with clearance always needs a linebox in case the lines below it get dirtied later and
         // need to check for floats to clear - so if we're ignoring spaces, stop ignoring them and add a
         // run for this object.
-        if (m_ignoringSpaces && br.style().clear() != Clear::None)
+        if (m_ignoringSpaces && RenderStyle::usedClear(br) != UsedClear::None)
             m_lineWhitespaceCollapsingState.ensureLineBoxInsideIgnoredSpaces(br);
         // If we were preceded by collapsing space and are in a right-aligned container we need to ensure the space gets
         // collapsed away so that it doesn't push the text out from the container's right-hand edge.
@@ -296,7 +296,7 @@
             m_lineWhitespaceCollapsingState.stopIgnoringSpaces(InlineIterator(0, m_current.renderer(), m_current.offset()));
 
         if (!m_lineInfo.isEmpty())
-            clear = br.style().clear();
+            usedClear = RenderStyle::usedClear(br);
     }
     m_atEnd = true;
 }

Modified: trunk/Source/WebCore/rendering/line/LineBreaker.cpp (276215 => 276216)


--- trunk/Source/WebCore/rendering/line/LineBreaker.cpp	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/Source/WebCore/rendering/line/LineBreaker.cpp	2021-04-18 01:03:18 UTC (rev 276216)
@@ -34,7 +34,7 @@
 {
     m_positionedObjects.clear();
     m_hyphenated = false;
-    m_clear = Clear::None;
+    m_clear = UsedClear::None;
 }
 
 // FIXME: The entire concept of the skipTrailingWhitespace function is flawed, since we really need to be building

Modified: trunk/Source/WebCore/rendering/line/LineBreaker.h (276215 => 276216)


--- trunk/Source/WebCore/rendering/line/LineBreaker.h	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/Source/WebCore/rendering/line/LineBreaker.h	2021-04-18 01:03:18 UTC (rev 276216)
@@ -55,7 +55,7 @@
 
     bool lineWasHyphenated() { return m_hyphenated; }
     const Vector<RenderBox*>& positionedObjects() { return m_positionedObjects; }
-    Clear clear() { return m_clear; }
+    UsedClear usedClear() { return m_clear; }
 
 private:
     void reset();
@@ -71,7 +71,7 @@
 
     RenderBlockFlow& m_block;
     bool m_hyphenated;
-    Clear m_clear;
+    UsedClear m_clear;
     Vector<RenderBox*> m_positionedObjects;
 };
 

Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (276215 => 276216)


--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp	2021-04-18 01:03:18 UTC (rev 276216)
@@ -36,6 +36,7 @@
 #include "InlineTextBoxStyle.h"
 #include "Pagination.h"
 #include "QuotesData.h"
+#include "RenderBlock.h"
 #include "RenderObject.h"
 #include "RenderTheme.h"
 #include "ScaleTransformOperation.h"
@@ -2664,4 +2665,43 @@
     return visitedDependentColor(effectiveStrokeColorProperty());
 }
 
+UsedClear RenderStyle::usedClear(const RenderObject& renderer)
+{
+    auto computedValue = renderer.style().clear();
+    switch (computedValue) {
+    case Clear::None:
+        return UsedClear::None;
+    case Clear::Left:
+        return UsedClear::Left;
+    case Clear::Right:
+        return UsedClear::Right;
+    case Clear::Both:
+        return UsedClear::Both;
+    case Clear::InlineStart:
+    case Clear::InlineEnd:
+        auto containingBlockDirection = renderer.containingBlock()->style().direction();
+        if (containingBlockDirection == TextDirection::RTL)
+            return computedValue == Clear::InlineStart ? UsedClear::Right : UsedClear::Left;
+        return computedValue == Clear::InlineStart ? UsedClear::Left : UsedClear::Right;
+    }
+}
+
+UsedFloat RenderStyle::usedFloat(const RenderObject& renderer)
+{
+    auto computedValue = renderer.style().floating();
+    switch (computedValue) {
+    case Float::None:
+        return UsedFloat::None;
+    case Float::Left:
+        return UsedFloat::Left;
+    case Float::Right:
+        return UsedFloat::Right;
+    case Float::InlineStart:
+    case Float::InlineEnd:
+        auto containingBlockDirection = renderer.containingBlock()->style().direction();
+        if (containingBlockDirection == TextDirection::RTL)
+            return computedValue == Float::InlineStart ? UsedFloat::Right : UsedFloat::Left;
+        return computedValue == Float::InlineStart ? UsedFloat::Left : UsedFloat::Right;
+    }
+}
 } // namespace WebCore

Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (276215 => 276216)


--- trunk/Source/WebCore/rendering/style/RenderStyle.h	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h	2021-04-18 01:03:18 UTC (rev 276216)
@@ -198,7 +198,7 @@
 
     void setColumnStylesFromPaginationMode(const Pagination::Mode&);
     
-    bool isFloating() const { return static_cast<Float>(m_nonInheritedFlags.floating) != Float::No; }
+    bool isFloating() const { return static_cast<Float>(m_nonInheritedFlags.floating) != Float::None; }
     bool hasMargin() const { return !m_surroundData->margin.isZero(); }
     bool hasBorder() const { return m_surroundData->border.hasBorder(); }
     bool hasBorderFill() const { return m_surroundData->border.hasFill(); }
@@ -260,6 +260,7 @@
     bool hasInFlowPosition() const { return position() == PositionType::Relative || position() == PositionType::Sticky; }
     bool hasViewportConstrainedPosition() const { return position() == PositionType::Fixed || position() == PositionType::Sticky; }
     Float floating() const { return static_cast<Float>(m_nonInheritedFlags.floating); }
+    static UsedFloat usedFloat(const RenderObject&);
 
     const Length& width() const { return m_boxData->width(); }
     const Length& height() const { return m_boxData->height(); }
@@ -348,6 +349,7 @@
     EUnicodeBidi unicodeBidi() const { return static_cast<EUnicodeBidi>(m_nonInheritedFlags.unicodeBidi); }
 
     Clear clear() const { return static_cast<Clear>(m_nonInheritedFlags.clear); }
+    static UsedClear usedClear(const RenderObject&);
     TableLayoutType tableLayout() const { return static_cast<TableLayoutType>(m_nonInheritedFlags.tableLayout); }
 
     WEBCORE_EXPORT const FontCascade& fontCascade() const;
@@ -1532,7 +1534,7 @@
     static EUnicodeBidi initialUnicodeBidi() { return UBNormal; }
     static PositionType initialPosition() { return PositionType::Static; }
     static VerticalAlign initialVerticalAlign() { return VerticalAlign::Baseline; }
-    static Float initialFloating() { return Float::No; }
+    static Float initialFloating() { return Float::None; }
     static BreakBetween initialBreakBetween() { return BreakBetween::Auto; }
     static BreakInside initialBreakInside() { return BreakInside::Auto; }
     static OptionSet<HangingPunctuation> initialHangingPunctuation() { return OptionSet<HangingPunctuation> { }; }
@@ -1869,10 +1871,10 @@
         unsigned overflowX : 3; // Overflow
         unsigned overflowY : 3; // Overflow
         unsigned verticalAlign : 4; // VerticalAlign
-        unsigned clear : 2; // Clear
+        unsigned clear : 3; // Clear
         unsigned position : 3; // PositionType
         unsigned unicodeBidi : 3; // EUnicodeBidi
-        unsigned floating : 2; // Float
+        unsigned floating : 3; // Float
         unsigned tableLayout : 1; // TableLayoutType
 
         unsigned hasExplicitlySetBorderRadius : 1;

Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.cpp (276215 => 276216)


--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.cpp	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.cpp	2021-04-18 01:03:18 UTC (rev 276216)
@@ -280,11 +280,24 @@
     case Clear::None: ts << "none"; break;
     case Clear::Left: ts << "left"; break;
     case Clear::Right: ts << "right"; break;
+    case Clear::InlineStart : ts << "inline-start"; break;
+    case Clear::InlineEnd : ts << "inline-end"; break;
     case Clear::Both: ts << "both"; break;
     }
     return ts;
 }
 
+TextStream& operator<<(TextStream& ts, UsedClear clear)
+{
+    switch (clear) {
+    case UsedClear::None: ts << "none"; break;
+    case UsedClear::Left: ts << "left"; break;
+    case UsedClear::Right: ts << "right"; break;
+    case UsedClear::Both: ts << "both"; break;
+    }
+    return ts;
+}
+
 #if ENABLE(DARK_MODE_CSS)
 TextStream& operator<<(TextStream& ts, ColorScheme colorScheme)
 {
@@ -546,13 +559,25 @@
 TextStream& operator<<(TextStream& ts, Float floating)
 {
     switch (floating) {
-    case Float::No: ts << "none"; break;
+    case Float::None: ts << "none"; break;
     case Float::Left: ts << "left"; break;
     case Float::Right: ts << "right"; break;
+    case Float::InlineStart: ts << "inline-start"; break;
+    case Float::InlineEnd: ts << "inline-end"; break;
     }
     return ts;
 }
 
+TextStream& operator<<(TextStream& ts, UsedFloat floating)
+{
+    switch (floating) {
+    case UsedFloat::None: ts << "none"; break;
+    case UsedFloat::Left: ts << "left"; break;
+    case UsedFloat::Right: ts << "right"; break;
+    }
+    return ts;
+}
+
 TextStream& operator<<(TextStream& ts, GridAutoFlow gridAutoFlow)
 {
     switch (gridAutoFlow) {

Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (276215 => 276216)


--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h	2021-04-18 01:03:18 UTC (rev 276216)
@@ -237,11 +237,19 @@
 };
 
 enum class Float : uint8_t {
-    No,
+    None,
     Left,
-    Right
+    Right,
+    InlineStart,
+    InlineEnd,
 };
 
+enum class UsedFloat : uint8_t {
+    None,
+    Left,
+    Right,
+};
+
 enum class MarginCollapse : uint8_t {
     Collapse,
     Separate,
@@ -287,12 +295,21 @@
 };
 
 enum class Clear : uint8_t {
-    None = 0,
-    Left = 1,
-    Right = 2,
-    Both = 3
+    None,
+    Left,
+    Right,
+    InlineStart,
+    InlineEnd,
+    Both
 };
 
+enum class UsedClear : uint8_t {
+    None,
+    Left,
+    Right,
+    Both
+};
+
 enum class TableLayoutType : uint8_t {
     Auto,
     Fixed
@@ -1236,6 +1253,7 @@
 WTF::TextStream& operator<<(WTF::TextStream&, CSSBoxType);
 WTF::TextStream& operator<<(WTF::TextStream&, CaptionSide);
 WTF::TextStream& operator<<(WTF::TextStream&, Clear);
+WTF::TextStream& operator<<(WTF::TextStream&, UsedClear);
 #if ENABLE(DARK_MODE_CSS)
 WTF::TextStream& operator<<(WTF::TextStream&, ColorScheme);
 #endif
@@ -1260,6 +1278,7 @@
 WTF::TextStream& operator<<(WTF::TextStream&, FlexDirection);
 WTF::TextStream& operator<<(WTF::TextStream&, FlexWrap);
 WTF::TextStream& operator<<(WTF::TextStream&, Float);
+WTF::TextStream& operator<<(WTF::TextStream&, UsedFloat);
 WTF::TextStream& operator<<(WTF::TextStream&, GridAutoFlow);
 WTF::TextStream& operator<<(WTF::TextStream&, HangingPunctuation);
 WTF::TextStream& operator<<(WTF::TextStream&, Hyphens);

Modified: trunk/Source/WebCore/style/StyleAdjuster.cpp (276215 => 276216)


--- trunk/Source/WebCore/style/StyleAdjuster.cpp	2021-04-18 00:27:44 UTC (rev 276215)
+++ trunk/Source/WebCore/style/StyleAdjuster.cpp	2021-04-18 01:03:18 UTC (rev 276216)
@@ -256,7 +256,7 @@
             if (m_document.inQuirksMode()) {
                 if (m_element->hasTagName(tdTag)) {
                     style.setEffectiveDisplay(DisplayType::TableCell);
-                    style.setFloating(Float::No);
+                    style.setFloating(Float::None);
                 } else if (is<HTMLTableElement>(*m_element))
                     style.setEffectiveDisplay(style.isDisplayInlineType() ? DisplayType::InlineTable : DisplayType::Table);
             }
@@ -287,7 +287,7 @@
             // Ruby text does not support float or position. This might change with evolution of the specification.
             if (m_element->hasTagName(rtTag)) {
                 style.setPosition(PositionType::Static);
-                style.setFloating(Float::No);
+                style.setFloating(Float::None);
             }
 
             // User agents are expected to have a rule in their user agent stylesheet that matches th elements that have a parent
@@ -334,7 +334,7 @@
         // https://www.w3.org/TR/css-display/#transformations
         // "A parent with a grid or flex display value blockifies the box’s display type."
         if (m_parentBoxStyle.isDisplayFlexibleOrGridBox()) {
-            style.setFloating(Float::No);
+            style.setFloating(Float::None);
             style.setEffectiveDisplay(equivalentBlockDisplay(style, m_document));
         }
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to