Bug 1616411 - Part 5: Make naturalWidth/naturalHeight getters take RasterImage orientation handling into account. r=tnikkel

Differential Revision: https://phabricator.services.mozilla.com/D70275

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Cameron McCormack 2020-04-16 00:34:41 +00:00
parent 54fca42d06
commit 24d7ac6242

View File

@ -1233,6 +1233,7 @@ uint32_t nsImageLoadingContent::NaturalWidth() {
int32_t size = 0;
if (image) {
if (image->GetOrientation().SwapsWidthAndHeight() &&
!image->HandledOrientation() &&
StaticPrefs::image_honor_orientation_metadata_natural_size()) {
Unused << image->GetHeight(&size);
} else {
@ -1251,6 +1252,7 @@ uint32_t nsImageLoadingContent::NaturalHeight() {
int32_t size = 0;
if (image) {
if (image->GetOrientation().SwapsWidthAndHeight() &&
!image->HandledOrientation() &&
StaticPrefs::image_honor_orientation_metadata_natural_size()) {
Unused << image->GetWidth(&size);
} else {