Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a37e927439e9c47f4448511674710a3d7898bb7d
https://github.com/WebKit/WebKit/commit/a37e927439e9c47f4448511674710a3d7898bb7d
Author: Tim Nguyen <[email protected]>
Date: 2023-08-24 (Thu, 24 Aug 2023)
Changed paths:
M Source/WebCore/css/CSSPrimitiveValue.cpp
M Source/WebCore/css/CSSPrimitiveValue.h
M Source/WebCore/style/StyleBuilderState.h
M Source/WebCore/style/StyleResolveForFontRaw.cpp
Log Message:
-----------
Refactor computeUnzoomedNonCalcLengthDouble to only take a single FontCascade
https://bugs.webkit.org/show_bug.cgi?id=260650
rdar://114370210
Reviewed by Darin Adler.
This is in preparation of the implementation of the new root font units.
Since:
- the font cascade contains both the font metrics & font description
- we'll need the root font metrics for the new root font units
- we should only be using either (not both) the current font metrics or the
current root font metrics depending on the unit
Instead of having 3 separate arguments to computeUnzoomedNonCalcLengthDouble
for the metrics, description, root font description, only pass a single font
cascade, which is either the root style font cascade or the current style font
cascade depending on the unit.
* Source/WebCore/css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::computeUnzoomedNonCalcLengthDouble):
(WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble):
* Source/WebCore/css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::isRootFontRelativeLength):
* Source/WebCore/style/StyleBuilderState.h:
* Source/WebCore/style/StyleResolveForFontRaw.cpp:
(WebCore::Style::resolveForFontRaw):
Canonical link: https://commits.webkit.org/267227@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes