Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: fdbaf754005cabddd3b928228f2bc6dfdbae88ab
https://github.com/WebKit/WebKit/commit/fdbaf754005cabddd3b928228f2bc6dfdbae88ab
Author: Ahmad Saleem <[email protected]>
Date: 2024-09-14 (Sat, 14 Sep 2024)
Changed paths:
M Source/WebCore/svg/SVGLengthContext.cpp
Log Message:
-----------
Refactor LengthMode handling in SVGLengthContext
https://bugs.webkit.org/show_bug.cgi?id=279707
rdar://135995385
Reviewed by Alan Baradlay.
Merge:
https://chromium.googlesource.com/chromium/src.git/+/1368ac8914b34af0187b55e048477fd8abf191a2
This patch introduces new helper function `dimensionForLengthMode`, which
selects the correct "dimension" factor to scale and with this function,
we would be able to reduce three repeated `switch` cases.
* Source/WebCore/svg/SVGLengthContext.cpp:
(WebCore::dimensionForLengthMode):
(WebCore::SVGLengthContext::valueForLength):
(WebCore::SVGLengthContext::convertValueFromUserUnitsToPercentage const):
(WebCore::SVGLengthContext::convertValueFromPercentageToUserUnits const):
Canonical link: https://commits.webkit.org/283671@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