DescriptionFold up the SVGLengthContext::convertValueFrom* helpers
There are three with similar-looking names, and they are all a single
line each. Fold up where it improves readability, and make the last one
static.
Having folded up convertValueFromUserUnitsToPercentage() we get an
expression that looks like: value * 100 / dimension... * 100; where the
factors (100) obviously cancel out one another. Looking at the single
call-site (SVGLength::setValue) which can actual pass a percentage, it
does an explicit adjustment too. Move that adjustment into the
SVGLengthContext method and drop the two '* 100' - yielding a more
obvious conversion (and less operations to execute).
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=190078
Patch Set 1 #
Messages
Total messages: 6 (2 generated)
|