Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 896ad5ea54317eb640ef344823ab68708281ef9d https://github.com/WebKit/WebKit/commit/896ad5ea54317eb640ef344823ab68708281ef9d Author: Taher Ali <taher_...@apple.com> Date: 2025-08-23 (Sat, 23 Aug 2025)
Changed paths: M LayoutTests/imported/w3c/web-platform-tests/css/css-conditional/container-queries/container-units-svglength-expected.txt M LayoutTests/imported/w3c/web-platform-tests/intersection-observer/svg-container-element-expected.txt M LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGLength-cap-expected.txt M LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGLength-ic-expected.txt M LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGLength-px-expected.txt M LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGLength-rem-expected.txt M LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGLength-rlh-expected.txt M LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGLength-viewport-expected.txt M LayoutTests/svg/dom/SVGLength-value-in-inactive-document-expected.txt M Source/WebCore/svg/SVGLengthContext.cpp M Source/WebCore/svg/SVGLengthContext.h M Source/WebCore/svg/SVGLengthValue.cpp Log Message: ----------- Modernize length conversion in SVGLengthValue https://bugs.webkit.org/show_bug.cgi?id=297555 rdar://158634833 Reviewed by Tim Nguyen. This PR modernizes SVGLengthValue length conversion by replacing selected call sites of convertValueToUserUnits and convertValueFromUserUnits with modern APIs that reuse the existing CSS length conversion machinery. The goal is to migrate all consumers from the old length conversion APIs and eventually remove all individual conversion functions, as the CSS length conversion machinery will make these redundant. A few caveats: - The handling of the ex unit continues to use the legacy conversion path to preserve compatibility - Percentages still use the old path, as they require SVG viewport information - The convertToSpecifiedUnits API continues to use the old conversion logic; this will be migrated in a separate PR. LayoutTests/imported/w3c/web-platform-tests/css/css-conditional/container-queries/container-units-svglength-expected.txt: LayoutTests/imported/w3c/web-platform-tests/intersection-observer/svg-container-element-expected.txt: LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGLength-cap-expected.txt: LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGLength-ic-expected.txt: LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGLength-px-expected.txt: LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGLength-rem-expected.txt: LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGLength-rlh-expected.txt: LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGLength-viewport-expected.txt: LayoutTests/svg/dom/SVGLength-value-in-inactive-document-expected.txt: Source/WebCore/svg/SVGLengthContext.cpp: (WebCore::SVGLengthContext::computeLengthWithUnit const): (WebCore::SVGLengthContext::resolveLengthToUserUnits const): (WebCore::SVGLengthContext::expressFromUserUnits const): (WebCore::rootRenderStyleForLengthResolving): (WebCore::SVGLengthContext::cssConversionData const): Source/WebCore/svg/SVGLengthContext.h: Source/WebCore/svg/SVGLengthValue.cpp: (WebCore::SVGLengthValue::valueForBindings const): (WebCore::SVGLengthValue::setValue): Canonical link: https://commits.webkit.org/299087@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes