https://github.com/w3c/csswg-drafts/issues/3399 transform: scale(ABC) can now take percentage values for ABC.
<rdar://problem/55929521>
Created attachment 437518 [details] Patch
Looks like I have an issue about losing calc() in computed style.
Comment on attachment 437518 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=437518&action=review > Source/WebCore/ChangeLog:9 > + on the scale property. These value are converted by numbers by dividing by 100 "converted by numbers" -> "converted to numbers". > Source/WebCore/css/parser/CSSPropertyParser.cpp:1796 > +static bool consumeNumbersOrPercentsDividedBy100(CSSParserTokenRange& args, RefPtr<CSSFunctionValue>& transformValue, unsigned numberOfArguments) RefPtr<CSSFunctionValue> -> Ref<CSSFunctionValue>. I think also naming this something about being a comma separated list would be good. > Source/WebCore/css/parser/CSSPropertyParser.cpp:1799 > + RefPtr<CSSPrimitiveValue> parsedValue = consumeNumberOrPercentDividedBy100(args, ValueRange::All); I would use auto here. > Source/WebCore/css/parser/CSSPropertyParser.cpp:1805 > + } while (numberOfArguments); You could make this a tad more efficient (remove a branch) if you did it like: auto parseNumberAndAppend = [&] { auto parsedValue = consumeNumberOrPercentDividedBy100(args, ValueRange::All); if (!parsedValue) return false; transformValue->append(parsedValue.releaseNonNull()); --numberOfArguments; return true; }; if (!parseNumberAndAppend()) return false; while (numberOfArguments) { if (!consumeCommaIncludingWhitespace(args)) return false; if (!parseNumberAndAppend()) return false; } return true;
Created attachment 437547 [details] Patch
Created attachment 437588 [details] Patch
Committed r282144 (241441@main): <https://commits.webkit.org/241441@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 437588 [details].