[webkit-changes] [WebKit/WebKit] dbc3fe: [CSS Math Functions] REGRESSION(265879 at main): sign...
Tim Nguyen
noreply at github.com
Sun Jul 9 09:23:32 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: dbc3feeb46ccfff61a83151b3066d3fe0e2ac710
https://github.com/WebKit/WebKit/commit/dbc3feeb46ccfff61a83151b3066d3fe0e2ac710
Author: Tim Nguyen <ntim at apple.com>
Date: 2023-07-09 (Sun, 09 Jul 2023)
Changed paths:
M LayoutTests/TestExpectations
M LayoutTests/imported/w3c/web-platform-tests/css/css-values/signs-abs-computed-expected.txt
M Source/WebCore/css/calc/CSSCalcOperationNode.cpp
M Source/WebCore/css/calc/CSSCalcOperationNode.h
Log Message:
-----------
[CSS Math Functions] REGRESSION(265879 at main): signs-abs-computed.html WPT crashes
https://bugs.webkit.org/show_bug.cgi?id=259026
rdar://111965838
Reviewed by Darin Adler.
The crash was found after re-importing WPT (in 265887 at main).
265879 at main collapses the root node (e.g. abs(-10) to calc(10)), but it was also too eager when collapsing.
The code attempted to collapse abs(10px + 10%), which is not possible at parse-time, since percentages cannot be resolved then.
To address this, condition the collapsing on `canCombineAllChildren()`.
Also tidy the code a bit.
* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/signs-abs-computed-expected.txt:
* Source/WebCore/css/calc/CSSCalcOperationNode.cpp:
(WebCore::CSSCalcOperationNode::combineChildren):
(WebCore::CSSCalcOperationNode::doubleValue const):
* Source/WebCore/css/calc/CSSCalcOperationNode.h:
Canonical link: https://commits.webkit.org/265889@main
More information about the webkit-changes
mailing list