[webkit-changes] [WebKit/WebKit] 2fa477: Refactor list-style-type conversion

Vitor Roriz noreply at github.com
Tue Mar 14 15:05:57 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2fa477e5ad2efadf91a266ffc92ca87e2885fb72
      https://github.com/WebKit/WebKit/commit/2fa477e5ad2efadf91a266ffc92ca87e2885fb72
  Author: Vitor Roriz <vitor.roriz at apple.com>
  Date:   2023-03-14 (Tue, 14 Mar 2023)

  Changed paths:
    M Source/WebCore/Headers.cmake
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/accessibility/AccessibilityList.cpp
    M Source/WebCore/css/CSSPrimitiveValueMappings.h
    M Source/WebCore/css/CSSProperties.json
    M Source/WebCore/css/ComputedStyleExtractor.cpp
    M Source/WebCore/editing/Editor.cpp
    M Source/WebCore/editing/FontAttributes.h
    M Source/WebCore/editing/cocoa/FontAttributesCocoa.mm
    M Source/WebCore/rendering/RenderListMarker.cpp
    M Source/WebCore/rendering/RenderListMarker.h
    M Source/WebCore/rendering/style/CounterContent.h
    A Source/WebCore/rendering/style/ListStyleType.cpp
    A Source/WebCore/rendering/style/ListStyleType.h
    M Source/WebCore/rendering/style/RenderStyle.cpp
    M Source/WebCore/rendering/style/RenderStyle.h
    M Source/WebCore/rendering/style/RenderStyleConstants.cpp
    M Source/WebCore/rendering/style/RenderStyleConstants.h
    M Source/WebCore/rendering/style/StyleRareInheritedData.cpp
    M Source/WebCore/rendering/style/StyleRareInheritedData.h
    M Source/WebCore/rendering/updating/RenderTreeBuilderList.cpp
    M Source/WebCore/style/StyleBuilderConverter.h
    M Source/WebCore/style/StyleBuilderCustom.h
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in

  Log Message:
  -----------
  Refactor list-style-type conversion
https://bugs.webkit.org/show_bug.cgi?id=253819
rdar://106640014

list-style-type is currently used for setting a list style type and a list style
string value. Currently, at StyleBuilderCustom we always sets both values together.
This refactoring will introduce a new type to explicitly associate these values, ListStyle.
ListStyle has a a type and a name (string value).
This is a preparation for @counter-style, since list-style-type's associated assigned with a custom-ident
will always have CustomCounterStyle as ListStyleType (ListStyle.type) and
will rely on the ListStyle.name to differentiate between different counter-styles.

Reviewed by Antti Koivisto.

* Source/WebCore/Headers.cmake:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/accessibility/AccessibilityList.cpp:
(WebCore::AccessibilityList::determineAccessibilityRole):
* Source/WebCore/css/CSSPrimitiveValueMappings.h:
(WebCore::toCSSValueID):
(WebCore::fromCSSValueID):
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/css/ComputedStyleExtractor.cpp:
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
* Source/WebCore/editing/Editor.cpp:
(WebCore::editableTextListsAtPositionInDescendingOrder):
* Source/WebCore/editing/FontAttributes.h:
* Source/WebCore/editing/cocoa/FontAttributesCocoa.mm:
(WebCore::cocoaTextListMarkerName):
* Source/WebCore/rendering/RenderListMarker.cpp:
(WebCore::effectiveListMarkerType):
(WebCore::listMarkerSuffix):
(WebCore::listMarkerText):
(WebCore::RenderListMarker::styleDidChange):
(WebCore::RenderListMarker::textRun const):
(WebCore::RenderListMarker::paint):
(WebCore::RenderListMarker::updateContent):
(WebCore::RenderListMarker::computePreferredLogicalWidths):
(WebCore::RenderListMarker::updateMargins):
(WebCore::RenderListMarker::relativeMarkerRect):
(WebCore::RenderListMarker::counterStyle const):
* Source/WebCore/rendering/RenderListMarker.h:
* Source/WebCore/rendering/style/CounterContent.h:
(WebCore::CounterContent::CounterContent):
(WebCore::CounterContent::listStyle const):
* Source/WebCore/rendering/style/ListStyleType.cpp: Added.
(WebCore::operator<<):
* Source/WebCore/rendering/style/ListStyleType.h: Added.
(WebCore::ListStyleType::operator== const):
* Source/WebCore/rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::RenderStyle):
(WebCore::rareInheritedDataChangeRequiresLayout):
(WebCore::RenderStyle::changeRequiresLayout const):
* Source/WebCore/rendering/style/RenderStyle.h:
(WebCore::RenderStyle::listStyleType const):
(WebCore::RenderStyle::setListStyleType):
(WebCore::RenderStyle::initialListStyleType):
(WebCore::RenderStyle::InheritedFlags::operator== const):
(WebCore::RenderStyle::listStyleStringValue const): Deleted.
(WebCore::RenderStyle::setListStyleStringValue): Deleted.
(WebCore::RenderStyle::initialListStyleStringValue): Deleted.
* Source/WebCore/rendering/style/RenderStyleConstants.cpp:
* Source/WebCore/rendering/style/RenderStyleConstants.h:
* Source/WebCore/rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator== const):
* Source/WebCore/rendering/style/StyleRareInheritedData.h:
* Source/WebCore/rendering/updating/RenderTreeBuilderList.cpp:
(WebCore::RenderTreeBuilder::List::updateItemMarker):
* Source/WebCore/style/StyleBuilderConverter.h:
(WebCore::Style::BuilderConverter::convertListStyleType):
* Source/WebCore/style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyValueContent):
(WebCore::Style::BuilderCustom::applyInheritListStyleType): Deleted.
(WebCore::Style::BuilderCustom::applyInitialListStyleType): Deleted.
(WebCore::Style::BuilderCustom::applyValueListStyleType): Deleted.
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:

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




More information about the webkit-changes mailing list