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

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

Issue 196743002: Parse the link element's size attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed comments Created 6 years, 9 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/HTMLLinkElement.h
diff --git a/Source/core/html/HTMLLinkElement.h b/Source/core/html/HTMLLinkElement.h
index a309741d438a92285273da75aeeb5a17810efa94..3ae627e6c0589c8e0eedc20aa519e5b35fc5eb14 100644
--- a/Source/core/html/HTMLLinkElement.h
+++ b/Source/core/html/HTMLLinkElement.h
@@ -133,8 +133,8 @@ public:
IconType iconType() const;
- // the icon size string as parsed from the HTML attribute
- const AtomicString& iconSizes() const;
+ // the icon sizes as parsed from the HTML attribute
+ const Vector<IntSize>& iconSizes() const;
CSSStyleSheet* sheet() const { return linkStyle() ? linkStyle()->sheet() : 0; }
Document* import() const;
@@ -161,6 +161,10 @@ public:
bool shouldProcessStyle() { return linkResourceToProcess() && linkStyle(); }
bool isCreatedByParser() const { return m_createdByParser; }
+ // Parse the icon size attribute into |iconSizes|, make this method public
+ // visible for testing purpose.
+ static void parseSizesAttribute(const AtomicString& value, Vector<IntSize>* iconSizes);
+
private:
virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
@@ -197,6 +201,7 @@ private:
String m_type;
String m_media;
RefPtr<DOMSettableTokenList> m_sizes;
+ Vector<IntSize> m_iconSizes;
LinkRelAttribute m_relAttribute;
bool m_createdByParser;

Powered by Google App Engine
This is Rietveld 408576698