⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 291754 in webkit


Ignore:
Timestamp:
Mar 23, 2022, 11:31:58 AM (5 years ago)
Author:
Brandon
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r291749 r291754  
     12022-03-22  Brandon Stewart  <brandonstewart@apple.com>
     2
     3        WBR element should set Clear property to None
     4        https://bugs.webkit.org/show_bug.cgi?id=238275
     5
     6        Reviewed by Alan Bujtas.
     7
     8        WBR elements need to have their Clear property automatically set to None.
     9        BR elements do not need this change.
     10
     11        * layout/integration/LayoutIntegrationBoxTree.cpp:
     12        (WebCore::LayoutIntegration::BoxTree::buildTree):
     13
    1142022-03-23  Kimmo Kinnunen  <kkinnunen@apple.com>
    215
  • trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp

    r291169 r291754  
    110110                styleToAdjust.setFloating(Float::None);
    111111                styleToAdjust.setPosition(PositionType::Static);
     112
     113                // Clear property should only apply on block elements, however,
     114                // it appears that browsers seem to ignore it on <br> inline elements.
     115                // https://drafts.csswg.org/css2/#propdef-clear
     116                if (downcast<RenderLineBreak>(childRenderer).isWBR())
     117                    styleToAdjust.setClear(Clear::None);
    112118            };
    113119            adjustStyle(style);
Note: See TracChangeset for help on using the changeset viewer.