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

Unified Diff: Source/core/html/ImageDocument.h

Issue 262053005: Allow zoom/restore in a zoomed document. It is a regression from an earlier fix. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased code Created 6 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/html/ImageDocument.h
diff --git a/Source/core/html/ImageDocument.h b/Source/core/html/ImageDocument.h
index e0fc4decacf96ae5f449ff68498c395d9747eb9e..b52f08f34e4b673a22e7ffe5bdd141f14ef4efa0 100644
--- a/Source/core/html/ImageDocument.h
+++ b/Source/core/html/ImageDocument.h
@@ -40,10 +40,15 @@ public:
return adoptRefWillBeNoop(new ImageDocument(initializer));
}
+ enum ScaleType {
+ ScaleZoomedDocument,
+ ScaleOnlyUnzoomedDocument
+ };
+
ImageResource* cachedImage();
HTMLImageElement* imageElement() const { return m_imageElement.get(); }
- void windowSizeChanged();
+ void windowSizeChanged(ScaleType);
void imageUpdated();
void imageClicked(int x, int y);
@@ -58,8 +63,8 @@ private:
#endif
void createDocumentStructure();
- void resizeImageToFit();
- void restoreImageSize();
+ void resizeImageToFit(ScaleType);
+ void restoreImageSize(ScaleType);
bool imageFitsInWindow() const;
bool shouldShrinkToFit() const;
float scale() const;
« no previous file with comments | « LayoutTests/fast/images/image-click-scale-restore-zoomed-image-expected.txt ('k') | Source/core/html/ImageDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698