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

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

Issue 2445413003: [Blink] Display images on a dark background (Closed)
Patch Set: Rebase 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
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 ed05b582602e98dfd033d1912a98bdd27aafa6dc..3f379819a160d57e665cf29f0bd57f51e580e3e0 100644
--- a/third_party/WebKit/Source/core/html/ImageDocument.h
+++ b/third_party/WebKit/Source/core/html/ImageDocument.h
@@ -47,6 +47,8 @@ class CORE_EXPORT ImageDocument final : public HTMLDocument {
void windowSizeChanged();
void imageUpdated();
void imageClicked(int x, int y);
+ void imageLoaded();
+ void updateImageStyle();
DECLARE_VIRTUAL_TRACE();
@@ -57,6 +59,9 @@ class CORE_EXPORT ImageDocument final : public HTMLDocument {
void createDocumentStructure();
+ // Calculates how large the div needs to be to properly center the image.
+ int calculateDivWidth();
+
// These methods are for m_shrinkToFitMode == Desktop.
void resizeImageToFit();
void restoreImageSize();
@@ -78,6 +83,12 @@ class CORE_EXPORT ImageDocument final : public HTMLDocument {
// Whether the image should be shrunk or not
bool m_shouldShrinkImage;
+ // Whether the image has finished loading or not
+ bool m_imageIsLoaded;
+
+ // Size of the checkerboard background tiles
+ int m_checkerSize;
+
enum ShrinkToFitMode { Viewport, Desktop };
ShrinkToFitMode m_shrinkToFitMode;
};

Powered by Google App Engine
This is Rietveld 408576698