commit | c308c18b97e5176bb9501a6b8fd19cb081742cf7 | [log] [tgz] |
---|---|---|
author | Fredrik Söderquist <fs@opera.com> | Wed Oct 18 15:04:39 2017 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Oct 18 15:04:39 2017 |
tree | d21ec38824dfa02e4659f54bdc7586145f5ab960 | |
parent | ef2ce873fb7689b5f57cb1060a4791c1424a1744 [diff] |
Introduce ImageResourceContent::IntrinsicSize Most non-layout/paint users that query the size of an image are interested in the intrinsic size of the image (usually the physical pixel dimensions.) This is currently achieved by calling the ImageSize() method with a multiplier of 1. Split the ImageSize() method into a part that extracts the size of the image (if any) and one that applies the multiplier (and follow-on adjustments.) This should allow a future cleanup where the scaling is moved closer to the layer that uses it - i.e layout and paint. This also reduces the type-impedance a bit since IntrinsicSize can just return an IntSize (like Image::Size()) rather than passing through a LayoutSize. Bug: 773272 Change-Id: I18a1c11e9fc891dc6f19c4b2c5bd5dc23c1a5da7 Reviewed-on: https://chromium-review.googlesource.com/718747 Reviewed-by: Stephen Chenney <schenney@chromium.org> Commit-Queue: Fredrik Söderquist <fs@opera.com> Cr-Commit-Position: refs/heads/master@{#509770}
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 .