Implement CSSNumericValue.mul, div, add, sub, max, and min
Created attachment 455275 [details] Patch
Created attachment 455278 [details] Patch
Created attachment 455279 [details] Patch
Comment on attachment 455279 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=455279&action=review > Source/WebCore/css/typedom/CSSNumericValue.cpp:56 > + return static_cast<CSSMathNegate&>(value.get()).value(); Shouldn't we be using is<> and downcast<> here and everywhere? > Source/WebCore/css/typedom/CSSNumericValue.cpp:72 > + if (thisValue.unit() == "number") { Maybe units should be AtomStrings.
(In reply to Simon Fraser (smfr) from comment #4) > Comment on attachment 455279 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=455279&action=review > > > Source/WebCore/css/typedom/CSSNumericValue.cpp:56 > > + return static_cast<CSSMathNegate&>(value.get()).value(); > > Shouldn't we be using is<> and downcast<> here and everywhere? Yes. That makes the code much nicer. > > Source/WebCore/css/typedom/CSSNumericValue.cpp:72 > > + if (thisValue.unit() == "number") { > > Maybe units should be AtomStrings. Or just CSSUnitType. I added a fixme comment because that's more involved and less related to the other changes.
Created attachment 455316 [details] Patch
Committed r291597 (248690@main): <https://commits.webkit.org/248690@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 455316 [details].
<rdar://problem/90609949>