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

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

Issue 1468023002: Rename imageSizeForLayoutObject() to imageSize() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bring back ps#3 and fix nit Created 5 years, 1 month 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: third_party/WebKit/Source/core/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 27b92c8f9351e0920012208c22bf8b91b5c6037e..f1f6475d6d867ea59ab26146111f468124034afe 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -2399,21 +2399,24 @@ bool LayoutObject::isRooted() const
return false;
}
-RespectImageOrientationEnum LayoutObject::shouldRespectImageOrientation() const
+RespectImageOrientationEnum LayoutObject::shouldRespectImageOrientation(const LayoutObject* layoutObject)
{
+ if (!layoutObject)
+ return DoNotRespectImageOrientation;
+
// 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 or the <img>
// has image-orientation: from-image style. FIXME: crbug.com/498233
- if (document().isImageDocument())
+ if (layoutObject->document().isImageDocument())
return RespectImageOrientation;
- if (!isHTMLImageElement(node()))
+ if (!isHTMLImageElement(layoutObject->node()))
return DoNotRespectImageOrientation;
- if (document().settings() && document().settings()->shouldRespectImageOrientation())
+ if (layoutObject->document().settings() && layoutObject->document().settings()->shouldRespectImageOrientation())
return RespectImageOrientation;
- if (style() && style()->respectImageOrientation() == RespectImageOrientation)
+ if (layoutObject->style() && layoutObject->style()->respectImageOrientation() == RespectImageOrientation)
return RespectImageOrientation;
return DoNotRespectImageOrientation;

Powered by Google App Engine
This is Rietveld 408576698