Commit 8e638dae authored by Fredrik Söderquist's avatar Fredrik Söderquist Committed by Commit Bot

Remove (trivially) unneeded ImageResourceContent::IntrinsicSize calls

Since SVGImage is handled explicitly already, and we pass
kDoNotRespectImageOrientation to IntrinsicSize() in these functions,
just call Image::Size() directly rather than passing through the
ImageResourceContent method.

Bug: 773272
Change-Id: I6b7c24f5be425f04cd2f68cbc4612054b635bc2b
Reviewed-on: https://chromium-review.googlesource.com/1032745Reviewed-by: default avatarStephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#554763}
parent 4a57957a
...@@ -93,7 +93,7 @@ FloatSize StyleFetchedImage::ImageSize( ...@@ -93,7 +93,7 @@ FloatSize StyleFetchedImage::ImageSize(
// border-image, etc.) // border-image, etc.)
// //
// https://drafts.csswg.org/css-images-3/#the-image-orientation // https://drafts.csswg.org/css-images-3/#the-image-orientation
FloatSize size(image_->IntrinsicSize(kDoNotRespectImageOrientation)); FloatSize size(image->Size());
return ApplyZoom(size, multiplier); return ApplyZoom(size, multiplier);
} }
......
...@@ -94,8 +94,7 @@ FloatSize StyleFetchedImageSet::ImageSize( ...@@ -94,8 +94,7 @@ FloatSize StyleFetchedImageSet::ImageSize(
// border-image, etc.) // border-image, etc.)
// //
// https://drafts.csswg.org/css-images-3/#the-image-orientation // https://drafts.csswg.org/css-images-3/#the-image-orientation
FloatSize natural_size( FloatSize natural_size(image->Size());
best_fit_image_->IntrinsicSize(kDoNotRespectImageOrientation));
FloatSize scaled_image_size(ApplyZoom(natural_size, multiplier)); FloatSize scaled_image_size(ApplyZoom(natural_size, multiplier));
scaled_image_size.Scale(1 / image_scale_factor_); scaled_image_size.Scale(1 / image_scale_factor_);
return scaled_image_size; return scaled_image_size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment