Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3be0078f2601ceca057ebd096ae3384d75cdd8b4
      
https://github.com/WebKit/WebKit/commit/3be0078f2601ceca057ebd096ae3384d75cdd8b4
  Author: Tim Nguyen <[email protected]>
  Date:   2024-11-27 (Wed, 27 Nov 2024)

  Changed paths:
    M LayoutTests/fast/lists/inline-before-content-after-list-marker.html
    M Source/WebCore/SaferCPPExpectations/UncountedLocalVarsCheckerExpectations
    M Source/WebCore/css/quirks.css
    M Source/WebCore/html/HTMLLIElement.cpp
    M Source/WebCore/html/HTMLLIElement.h
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.cpp
    M Source/WebCore/layout/integration/LayoutIntegrationBoxTreeUpdater.cpp
    M Source/WebCore/layout/layouttree/LayoutElementBox.h
    M Source/WebCore/rendering/RenderListItem.h
    M Source/WebCore/rendering/RenderListMarker.cpp

  Log Message:
  -----------
  Make list-style-position quirk only available in quirks mode
https://bugs.webkit.org/show_bug.cgi?id=283738
rdar://140602985

Reviewed by Oriol Brufau.

There is a quirk that treats list items outside of ul/ol elements as 
`list-style-position: inside`.
This was a quirk to imitate the behavior in IE, however it is not spec 
compliant.

Implement this behavior using CSS and restrict it to quirks mode only. This 
matches Firefox and the specification.

Chrome use counter shows only 0.7% of page loads using this quirk: 
https://chromestatus.com/metrics/feature/timeline/popularity/5000
None of the affected sites are particularly popular.

This makes any potential impact manageable using quirks if needed.

* LayoutTests/fast/lists/inline-before-content-after-list-marker.html:
* Source/WebCore/SaferCPPExpectations/UncountedLocalVarsCheckerExpectations:
* Source/WebCore/css/quirks.css:
(@namespace "http://www.w3.org/1999/xhtml";;):
(li :is(ul, ol)):
(:is(ul, ol) :is(ul, ol, li)):
* Source/WebCore/html/HTMLLIElement.cpp:
(WebCore::HTMLLIElement::didAttachRenderers): Deleted.
* Source/WebCore/html/HTMLLIElement.h:
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.cpp:
(WebCore::Layout::InlineFormattingUtils::isAtSoftWrapOpportunity const):
* Source/WebCore/layout/integration/LayoutIntegrationBoxTreeUpdater.cpp:
(WebCore::LayoutIntegration::BoxTreeUpdater::createLayoutBox):
(WebCore::LayoutIntegration::updateListMarkerAttributes):
* Source/WebCore/layout/layouttree/LayoutElementBox.h:
(WebCore::Layout::ElementBox::isListMarkerOutside const):
(WebCore::Layout::ElementBox::isListMarkerInsideList const): Deleted.
* Source/WebCore/rendering/RenderListItem.h:
* Source/WebCore/rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::isInside const):

Canonical link: https://commits.webkit.org/287114@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to