Title: [291754] trunk/Source/WebCore
Revision
291754
Author
[email protected]
Date
2022-03-23 11:31:58 -0700 (Wed, 23 Mar 2022)

Log Message

WBR element should set Clear property to None
https://bugs.webkit.org/show_bug.cgi?id=238275

Reviewed by Alan Bujtas.

WBR elements need to have their Clear property automatically set to None.
BR elements do not need this change.

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (291753 => 291754)


--- trunk/Source/WebCore/ChangeLog	2022-03-23 18:17:38 UTC (rev 291753)
+++ trunk/Source/WebCore/ChangeLog	2022-03-23 18:31:58 UTC (rev 291754)
@@ -1,3 +1,16 @@
+2022-03-22  Brandon Stewart  <[email protected]>
+
+        WBR element should set Clear property to None
+        https://bugs.webkit.org/show_bug.cgi?id=238275
+
+        Reviewed by Alan Bujtas.
+
+        WBR elements need to have their Clear property automatically set to None.
+        BR elements do not need this change.
+
+        * layout/integration/LayoutIntegrationBoxTree.cpp:
+        (WebCore::LayoutIntegration::BoxTree::buildTree):
+
 2022-03-23  Kimmo Kinnunen  <[email protected]>
 
         After losing context due to too many contexts, getError() does not return CONTEXT_LOST_WEBGL

Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp (291753 => 291754)


--- trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp	2022-03-23 18:17:38 UTC (rev 291753)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp	2022-03-23 18:31:58 UTC (rev 291754)
@@ -109,6 +109,12 @@
                 styleToAdjust.setDisplay(DisplayType::Inline);
                 styleToAdjust.setFloating(Float::None);
                 styleToAdjust.setPosition(PositionType::Static);
+
+                // Clear property should only apply on block elements, however,
+                // it appears that browsers seem to ignore it on <br> inline elements.
+                // https://drafts.csswg.org/css2/#propdef-clear
+                if (downcast<RenderLineBreak>(childRenderer).isWBR())
+                    styleToAdjust.setClear(Clear::None);
             };
             adjustStyle(style);
             if (firstLineStyle)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to