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

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

Issue 1186333004: Add support for `width` based Width Client Hint (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed tests Created 5 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/HTMLImageElement.h
diff --git a/Source/core/html/HTMLImageElement.h b/Source/core/html/HTMLImageElement.h
index 69e2b5c74308fe256519525207c7b88924ef912e..c5f7e61874e880a50b5d3e12652f9e27d71f739a 100644
--- a/Source/core/html/HTMLImageElement.h
+++ b/Source/core/html/HTMLImageElement.h
@@ -25,6 +25,7 @@
#define HTMLImageElement_h
#include "core/CoreExport.h"
+#include "core/fetch/FetchRequest.h"
#include "core/html/HTMLElement.h"
#include "core/html/HTMLImageLoader.h"
#include "core/html/canvas/CanvasImageSource.h"
@@ -108,6 +109,8 @@ public:
void setUseFallbackContent();
void setIsFallbackImage() { m_isFallbackImage = true; }
+ static int widthAttributeToInt(const String& value, bool& isValid);
+ FetchRequest::ResourceWidth resourceWidth();
Mike West 2015/06/18 06:20:04 These methods seem pretty easily unit-testable. Th
Yoav Weiss 2015/06/18 06:30:22 OK :)
float sourceSize(Element&);
void forceReload() const;

Powered by Google App Engine
This is Rietveld 408576698