Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cc58756c6140ddc18fa899b1b4049ade7d68f3c2
      
https://github.com/WebKit/WebKit/commit/cc58756c6140ddc18fa899b1b4049ade7d68f3c2
  Author: Sam Weinig <[email protected]>
  Date:   2025-08-08 (Fri, 08 Aug 2025)

  Changed paths:
    M Source/WTF/wtf/MathExtras.h
    M Source/WebCore/CMakeLists.txt
    M Source/WebCore/Headers.cmake
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/css/CSSProperties.json
    M Source/WebCore/css/values/primitives/CSSPrimitiveNumericRange.h
    M Source/WebCore/layout/integration/inline/LayoutIntegrationPagination.cpp
    M Source/WebCore/rendering/RenderBlockFlow.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/StyleRareInheritedData.cpp
    M Source/WebCore/rendering/style/StyleRareInheritedData.h
    M Source/WebCore/style/StyleInterpolationWrappers.h
    A Source/WebCore/style/values/break/StyleOrphans.cpp
    A Source/WebCore/style/values/break/StyleOrphans.h
    A Source/WebCore/style/values/break/StyleWidows.cpp
    A Source/WebCore/style/values/break/StyleWidows.h
    M Source/WebCore/style/values/color/StyleOpacity.cpp
    M 
Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Blending.h
    M 
Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+CSSValueConversion.h

  Log Message:
  -----------
  [Style] Convert widows and orphans to strong style types
https://bugs.webkit.org/show_bug.cgi?id=296767

Reviewed by Darin Adler.

Converts the `widows` and `orphans` properties to use strong styles.

The current implementation of `widows` and `orphans` is a bit bizarre.
Both properties have an "is auto" bit in RenderStyle, which gets set
as the initial value, despite neither allowing `auto` as a value at
parse time. This leads to the computed style not being parseable.
This change does not attempt to fix this.

To ensure correct numeric clamping, instead of clamping when setting
on RenderStyle, we utilize the range template parameter and clamp enforce
the clamp when converting from CSSValue, ensuring the value is never
invalid. This allows us to also remove now unnecessary clamping for
the `shape-image-threshold` property.

* Source/WTF/wtf/MathExtras.h:
* Source/WebCore/CMakeLists.txt:
* Source/WebCore/Headers.cmake:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/css/values/primitives/CSSPrimitiveNumericRange.h:
* Source/WebCore/layout/integration/inline/LayoutIntegrationPagination.cpp:
* Source/WebCore/rendering/RenderBlockFlow.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/StyleRareInheritedData.cpp:
* Source/WebCore/rendering/style/StyleRareInheritedData.h:
* Source/WebCore/style/StyleInterpolationWrappers.h:
* Source/WebCore/style/values/break/StyleOrphans.cpp: Added.
* Source/WebCore/style/values/break/StyleOrphans.h: Added.
* Source/WebCore/style/values/break/StyleWidows.cpp: Added.
* Source/WebCore/style/values/break/StyleWidows.h: Added.
* Source/WebCore/style/values/color/StyleOpacity.cpp:
* Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Blending.h:
* 
Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+CSSValueConversion.h:

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