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

Unified Diff: third_party/WebKit/Source/core/html/ImageDocument.cpp

Issue 2523553002: Consolidate how ImageDocument sets image styling (Closed)
Patch Set: DCHECK_EQ Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/ImageDocument.cpp
diff --git a/third_party/WebKit/Source/core/html/ImageDocument.cpp b/third_party/WebKit/Source/core/html/ImageDocument.cpp
index 88826f4d3894c9781ee2ab8eba50a45a760c2b64..569334cb5bec0c2984d5953954523518d3d25b25 100644
--- a/third_party/WebKit/Source/core/html/ImageDocument.cpp
+++ b/third_party/WebKit/Source/core/html/ImageDocument.cpp
@@ -398,6 +398,11 @@ void ImageDocument::updateImageStyle() {
}
newCheckerSize = round(std::max(1.0, newCheckerSize / scale));
+ } else if (!imageFitsInWindow()) {
+ // In desktop mode, the user can click on the image to zoom in or out.
+ DCHECK_EQ(m_shrinkToFitMode, Desktop);
+ imageStyle.append(m_shouldShrinkImage ? "cursor: zoom-in; "
pdr. 2016/11/21 23:26:47 I see we're using "m_imageElement->setInlineStyleP
gone 2016/11/21 23:43:26 Yeah, on desktop this is called during ::imageLoad
+ : "cursor: zoom-out; ");
}
// The only thing that can differ between updates is the checker size.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698