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

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

Issue 2319863006: Change image document zooming logic. (Closed)
Patch Set: add tests Created 4 years, 3 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: third_party/WebKit/Source/core/html/ImageDocument.h
diff --git a/third_party/WebKit/Source/core/html/ImageDocument.h b/third_party/WebKit/Source/core/html/ImageDocument.h
index 7602b27aa0aa303a57768f0ffcff90bb2315d6c0..fa279b602acf951d9f77e4a8634f7fbd987111cc 100644
--- a/third_party/WebKit/Source/core/html/ImageDocument.h
+++ b/third_party/WebKit/Source/core/html/ImageDocument.h
@@ -40,15 +40,10 @@ public:
return new ImageDocument(initializer);
}
- enum ScaleType {
- ScaleZoomedDocument,
- ScaleOnlyUnzoomedDocument
- };
-
ImageResource* cachedImage();
HTMLImageElement* imageElement() const { return m_imageElement.get(); }
- void windowSizeChanged(ScaleType);
+ void windowSizeChanged();
void imageUpdated();
void imageClicked(int x, int y);
@@ -62,8 +57,8 @@ private:
void createDocumentStructure();
// These methods are for m_shrinkToFitMode == Desktop.
brucedawson 2016/09/15 23:21:21 Is this comment accurate?
Bret 2016/09/16 00:21:41 Yes. It's not enforced, but windowSizeChanged won'
brucedawson 2016/09/16 00:23:01 Consider making it an enforced comment (i.e.; a DC
Bret 2016/09/16 00:37:03 Done.
- void resizeImageToFit(ScaleType);
- void restoreImageSize(ScaleType);
+ void resizeImageToFit();
+ void restoreImageSize();
bool imageFitsInWindow() const;
bool shouldShrinkToFit() const;
float scale() const;
@@ -84,6 +79,8 @@ private:
Desktop
};
ShrinkToFitMode m_shrinkToFitMode;
+
+ friend class ImageDocumentTest;
};
DEFINE_DOCUMENT_TYPE_CASTS(ImageDocument);

Powered by Google App Engine
This is Rietveld 408576698