mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-25 01:01:52 +00:00
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:
parent
54fca42d06
commit
24d7ac6242
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user