[css-typed-om] Simplify CSSUnitValue conversion.
Currently, when we convert a CSSUnitValue to a different unit, we essentially consult a NxN table to figure out the scale factor, where N is the number of units. An easier way is to first convert to the canonical unit, then convert from the canonical unit to the target unit. This only requires a lookup table of size N instead of NxN, greatly simplifying the code. Bug: 776173 Change-Id: Icb28386938f9cb7de4d917c72426154b8f45d6e6 Reviewed-on: https://chromium-review.googlesource.com/798930Reviewed-by:nainar <nainar@chromium.org> Commit-Queue: Darren Shen <shend@chromium.org> Cr-Commit-Position: refs/heads/master@{#520848}
Showing
This diff is collapsed.
Please register or sign in to comment