Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1341)

Unified Diff: Source/core/layout/LayoutObject.cpp

Issue 1162793003: Add CSS image-orientation: from-image (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Improved check Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/layout/LayoutObject.cpp
diff --git a/Source/core/layout/LayoutObject.cpp b/Source/core/layout/LayoutObject.cpp
index e83bcaf727985ddf3cefa21f3da22497820ad565..e35fc98152e4651c6e34ba33f2363885135ab5c9 100644
--- a/Source/core/layout/LayoutObject.cpp
+++ b/Source/core/layout/LayoutObject.cpp
@@ -2324,7 +2324,8 @@ RespectImageOrientationEnum LayoutObject::shouldRespectImageOrientation() const
// Respect the image's orientation if it's being used as a full-page image or it's
// an <img> and the setting to respect it everywhere is set.
Noel Gordon 2015/06/12 16:21:04 Comment out of date.
rwlbuis 2015/06/15 17:21:52 Done.
return document().isImageDocument()
Noel Gordon 2015/06/12 16:21:04 Let's break this up into individual if statements,
rwlbuis 2015/06/15 17:21:52 Done. Forgot about the breaking up though, will fi
- || (document().settings() && document().settings()->shouldRespectImageOrientation() && isHTMLImageElement(node())) ? RespectImageOrientation : DoNotRespectImageOrientation;
+ || (((document().settings() && document().settings()->shouldRespectImageOrientation()) || (style() && style()->respectImageOrientation() == RespectImageOrientation)) && isHTMLImageElement(node())) ? RespectImageOrientation : DoNotRespectImageOrientation;
+
}
LayoutObject* LayoutObject::container(const LayoutBoxModelObject* paintInvalidationContainer, bool* paintInvalidationContainerSkipped) const

Powered by Google App Engine
This is Rietveld 408576698