Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 73fff95f61d9d8d0a1de05e0537e57e34b48315c
      
https://github.com/WebKit/WebKit/commit/73fff95f61d9d8d0a1de05e0537e57e34b48315c
  Author: Sam Weinig <[email protected]>
  Date:   2025-09-26 (Fri, 26 Sep 2025)

  Changed paths:
    M Source/WebCore/Headers.cmake
    M Source/WebCore/SaferCPPExpectations/UncheckedCallArgsCheckerExpectations
    M Source/WebCore/SaferCPPExpectations/UncheckedLocalVarsCheckerExpectations
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/css/CSSProperties.json
    M Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp
    M Source/WebCore/html/canvas/CanvasRenderingContext2DBase.h
    M Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp
    M 
Source/WebCore/layout/formattingContexts/inline/InlineContentConstrainer.cpp
    M 
Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLine.h
    M 
Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp
    M Source/WebCore/platform/graphics/FontCascade.cpp
    M Source/WebCore/platform/graphics/FontCascade.h
    M Source/WebCore/rendering/LegacyInlineFlowBox.cpp
    M Source/WebCore/rendering/style/RenderStyle.cpp
    M Source/WebCore/rendering/style/RenderStyle.h
    M Source/WebCore/rendering/style/RenderStyleInlines.h
    M Source/WebCore/rendering/style/RenderStyleSetters.h
    M Source/WebCore/rendering/style/StyleFontData.cpp
    M Source/WebCore/rendering/style/StyleFontData.h
    M Source/WebCore/style/StyleBuilderConverter.h
    M Source/WebCore/style/StyleBuilderCustom.h
    M Source/WebCore/style/StyleBuilderState.cpp
    M Source/WebCore/style/StyleBuilderState.h
    M Source/WebCore/style/StyleExtractorCustom.h
    A Source/WebCore/style/values/text/StyleLetterSpacing.cpp
    A Source/WebCore/style/values/text/StyleLetterSpacing.h
    A Source/WebCore/style/values/text/StyleWordSpacing.cpp
    A Source/WebCore/style/values/text/StyleWordSpacing.h

  Log Message:
  -----------
  [Style] Convert the 'letter-spacing' and 'word-spacing` properties to strong 
style types
https://bugs.webkit.org/show_bug.cgi?id=299314

Reviewed by Darin Adler.

Converts the 'letter-spacing' and 'word-spacing` properties to
use strong style types.

The previous implementation of 'letter-spacing' and 'word-spacing` use
`WebCore::Length` values stored on the `FontCascade`, resolving the
value at use time using the font-size. Storing strong style types on
`FontCascade` would be a layering violation, so we instead store the
style 'letter-spacing' and 'word-spacing` values on StyleFontData
and a resolved 'letter-spacing' and 'word-spacing` (just plain floats)
on `FontCascade`. To make this work properly, we hook into the
"dirty font" mechanism of `Style::BuilderState` and lazily compute
the resolved values in `Style::BuilderState::updateFont()`. This allows
for the case where 'letter-spacing' and 'word-spacing` have been inherited
and the font size changes to also be handled.

* Source/WebCore/Headers.cmake:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:
* Source/WebCore/html/canvas/CanvasRenderingContext2DBase.h:
* Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp:
* Source/WebCore/layout/formattingContexts/inline/InlineContentConstrainer.cpp:
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
* Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp:
* Source/WebCore/layout/formattingContexts/inline/InlineLine.h:
* 
Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
* Source/WebCore/platform/graphics/FontCascade.cpp:
* Source/WebCore/platform/graphics/FontCascade.h:
* Source/WebCore/rendering/LegacyInlineFlowBox.cpp:
* Source/WebCore/rendering/style/RenderStyle.cpp:
* Source/WebCore/rendering/style/RenderStyle.h:
* Source/WebCore/rendering/style/RenderStyleInlines.h:
* Source/WebCore/rendering/style/RenderStyleSetters.h:
* Source/WebCore/rendering/style/StyleFontData.cpp:
* Source/WebCore/rendering/style/StyleFontData.h:
* Source/WebCore/style/StyleBuilderConverter.h:
* Source/WebCore/style/StyleBuilderCustom.h:
* Source/WebCore/style/StyleBuilderState.cpp:
* Source/WebCore/style/StyleBuilderState.h:
* Source/WebCore/style/StyleExtractorCustom.h:
* Source/WebCore/style/values/text/StyleLetterSpacing.cpp: Added.
* Source/WebCore/style/values/text/StyleLetterSpacing.h: Added.
* Source/WebCore/style/values/text/StyleWordSpacing.cpp: Added.
* Source/WebCore/style/values/text/StyleWordSpacing.h: Added.

Canonical link: https://commits.webkit.org/300618@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