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

Unified Diff: Source/core/layout/LayoutImage.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/LayoutImage.cpp
diff --git a/Source/core/layout/LayoutImage.cpp b/Source/core/layout/LayoutImage.cpp
index 05a43fc90ee44152db9e7c0d7b64d6c2fb36c78c..55f93c9708668703d7998da8ff3a719e72fc788a 100644
--- a/Source/core/layout/LayoutImage.cpp
+++ b/Source/core/layout/LayoutImage.cpp
@@ -78,6 +78,16 @@ void LayoutImage::willBeDestroyed()
LayoutReplaced::willBeDestroyed();
}
+void LayoutImage::styleDidChange(StyleDifference diff, const ComputedStyle* oldStyle)
+{
+ LayoutReplaced::styleDidChange(diff, oldStyle);
+
+ bool hadStyle = (oldStyle != 0);
Noel Gordon 2015/06/12 16:21:04 Remove hadStyle, doesn't really say anymore that o
rwlbuis 2015/06/15 17:21:51 Done.
+ RespectImageOrientationEnum oldOrientation = hadStyle ? oldStyle->respectImageOrientation() : ComputedStyle::initialRespectImageOrientation();
+ if (style() && style()->respectImageOrientation() != oldOrientation)
+ intrinsicSizeChanged();
Noel Gordon 2015/06/12 16:21:04 Devious and I love it.
rwlbuis 2015/06/15 17:21:51 Thanks :)
+}
+
void LayoutImage::setImageResource(PassOwnPtr<LayoutImageResource> imageResource)
{
ASSERT(!m_imageResource);

Powered by Google App Engine
This is Rietveld 408576698