commit | 5a1cdd7a0e69d988107eab0814e5fa2117cac158 | [log] [tgz] |
---|---|---|
author | Fredrik Söderquist <fs@opera.com> | Mon Dec 18 17:54:22 2017 |
committer | Commit Bot <commit-bot@chromium.org> | Mon Dec 18 17:54:22 2017 |
tree | 74cb445f12bc33bb39b7cf74f95158c212a66085 | |
parent | fe9306b1223c8a20bf83096aa940e02678109c08 [diff] |
[CI] Add SVGLengthContext::ResolveLengthPair helper With geometric presentation attributes it's quite common to need to resolve an <x, y> pair of Lengths to produce a point or a size. Add a helper ResolveLengthPair() that accepts a pair of Lengths and return a FloatPoint. Except for a reduction in LoC, it also amortizes the cost of determining a viewport when percentages are used. Use the new helper for 'cx' / 'cy' and 'rx' / 'ry' on <ellipse>, 'cx' / 'cy' on <circle>, 'x' / 'y', 'width' / 'height' and 'rx' / 'ry' on <rect>, 'x' / 'y' and 'width' / 'height' on <image> as well as 'x' / 'y' on <use>. Since this means using FloatPoint/FloatSize to a larger degree than before, use the abilities (operators et.c) of these a bit more where possible. Bug: 400725 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: I15f5c17190b060a7e8312d5e3e124846301804b9 Reviewed-on: https://chromium-review.googlesource.com/832606 Reviewed-by: Stephen Chenney <schenney@chromium.org> Commit-Queue: Fredrik Söderquist <fs@opera.com> Cr-Commit-Position: refs/heads/master@{#524740}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .