[webkit-changes] [WebKit/WebKit] b982e9: Add WebCore::PlatformDynamicRangeLimit

Gerald Squelart noreply at github.com
Fri Feb 21 08:20:43 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b982e9c075259148d4e1a1dfe448a101c8d40886
      https://github.com/WebKit/WebKit/commit/b982e9c075259148d4e1a1dfe448a101c8d40886
  Author: Gerald Squelart <squelart at apple.com>
  Date:   2025-02-21 (Fri, 21 Feb 2025)

  Changed paths:
    M Source/WebCore/Headers.cmake
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    A Source/WebCore/platform/graphics/PlatformDynamicRangeLimit.cpp
    A Source/WebCore/platform/graphics/PlatformDynamicRangeLimit.h
    M Source/WebCore/style/values/color/StyleDynamicRangeLimit.cpp
    M Source/WebCore/style/values/color/StyleDynamicRangeLimit.h
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
    M Tools/TestWebKitAPI/CMakeLists.txt
    M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
    A Tools/TestWebKitAPI/Tests/WebCore/PlatformDynamicRangeLimitTests.cpp

  Log Message:
  -----------
  Add WebCore::PlatformDynamicRangeLimit
https://bugs.webkit.org/show_bug.cgi?id=287776
rdar://144952110

Reviewed by Simon Fraser.

PlatformDynamicRangeLimit interprets the `dynamic-range-limit`
CSS property, and stores it in a single [0,1] float.

Combined changes:
* Source/WebCore/Headers.cmake:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/graphics/PlatformDynamicRangeLimit.cpp: Added.
(WebCore::PlatformDynamicRangeLimit::normalizedAverage):
(WebCore::operator<<):
* Source/WebCore/platform/graphics/PlatformDynamicRangeLimit.h: Added.
(WebCore::PlatformDynamicRangeLimit::standard):
(WebCore::PlatformDynamicRangeLimit::constrainedHigh):
(WebCore::PlatformDynamicRangeLimit::noLimit):
(WebCore::PlatformDynamicRangeLimit::value const):
(WebCore::PlatformDynamicRangeLimit::PlatformDynamicRangeLimit):
* Source/WebCore/style/values/color/StyleDynamicRangeLimit.cpp:
(WebCore::Style::DynamicRangeLimit::toPlatformDynamicRangeLimit const):
* Source/WebCore/style/values/color/StyleDynamicRangeLimit.h:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Tools/TestWebKitAPI/CMakeLists.txt:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebCore/PlatformDynamicRangeLimitTests.cpp: Added.
(TestWebKitAPI::TEST(PlatformDynamicRangeLimit, DefaultConstruction)):
(TestWebKitAPI::mix):
(TestWebKitAPI::TEST(PlatformDynamicRangeLimit, FromStyleDynamicRangeLimit)):
(TestWebKitAPI::TEST(PlatformDynamicRangeLimit, StaticValues)):
(TestWebKitAPI::TEST(PlatformDynamicRangeLimit, FromNonsense)):
(TestWebKitAPI::TEST(PlatformDynamicRangeLimit, Comparisons)):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list