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

Side by Side Diff: third_party/WebKit/Source/core/html/ImageDocument.h

Issue 2445413003: [Blink] Display images on a dark background (Closed)
Patch Set: Rebasing 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 29 matching lines...) Expand all
40 const DocumentInit& initializer = DocumentInit()) { 40 const DocumentInit& initializer = DocumentInit()) {
41 return new ImageDocument(initializer); 41 return new ImageDocument(initializer);
42 } 42 }
43 43
44 ImageResource* cachedImage(); 44 ImageResource* cachedImage();
45 HTMLImageElement* imageElement() const { return m_imageElement.get(); } 45 HTMLImageElement* imageElement() const { return m_imageElement.get(); }
46 46
47 void windowSizeChanged(); 47 void windowSizeChanged();
48 void imageUpdated(); 48 void imageUpdated();
49 void imageClicked(int x, int y); 49 void imageClicked(int x, int y);
50 void imageLoaded();
51 void updateImageStyle();
50 52
51 DECLARE_VIRTUAL_TRACE(); 53 DECLARE_VIRTUAL_TRACE();
52 54
53 private: 55 private:
54 explicit ImageDocument(const DocumentInit&); 56 explicit ImageDocument(const DocumentInit&);
55 57
56 DocumentParser* createParser() override; 58 DocumentParser* createParser() override;
57 59
58 void createDocumentStructure(); 60 void createDocumentStructure();
59 61
(...skipping 11 matching lines...) Expand all
71 73
72 // Whether enough of the image has been loaded to determine its size 74 // Whether enough of the image has been loaded to determine its size
73 bool m_imageSizeIsKnown; 75 bool m_imageSizeIsKnown;
74 76
75 // Whether the image is shrunk to fit or not 77 // Whether the image is shrunk to fit or not
76 bool m_didShrinkImage; 78 bool m_didShrinkImage;
77 79
78 // Whether the image should be shrunk or not 80 // Whether the image should be shrunk or not
79 bool m_shouldShrinkImage; 81 bool m_shouldShrinkImage;
80 82
83 // Whether the image has finished loading or not
84 bool m_imageIsLoaded;
85
81 enum ShrinkToFitMode { Viewport, Desktop }; 86 enum ShrinkToFitMode { Viewport, Desktop };
82 ShrinkToFitMode m_shrinkToFitMode; 87 ShrinkToFitMode m_shrinkToFitMode;
83 }; 88 };
84 89
85 DEFINE_DOCUMENT_TYPE_CASTS(ImageDocument); 90 DEFINE_DOCUMENT_TYPE_CASTS(ImageDocument);
86 91
87 } // namespace blink 92 } // namespace blink
88 93
89 #endif // ImageDocument_h 94 #endif // ImageDocument_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698