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

Unified Diff: Source/core/css/parser/SizesAttributeParser.h

Issue 369423002: Have srcset respond to viewport changes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: more oilpan Created 6 years, 5 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
« no previous file with comments | « Source/core/css/MediaQueryList.cpp ('k') | Source/core/css/parser/SizesAttributeParser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/parser/SizesAttributeParser.h
diff --git a/Source/core/css/parser/SizesAttributeParser.h b/Source/core/css/parser/SizesAttributeParser.h
index 3c7bc4ee260c25283576e9169a1f6818161fe982..03a6f44420922eebf7396b1d7d9366ccedeb0f2b 100644
--- a/Source/core/css/parser/SizesAttributeParser.h
+++ b/Source/core/css/parser/SizesAttributeParser.h
@@ -15,16 +15,12 @@ namespace WebCore {
class SizesAttributeParser {
STACK_ALLOCATED();
public:
- static unsigned findEffectiveSize(const String& attribute, PassRefPtr<MediaValues>);
+ SizesAttributeParser(PassRefPtr<MediaValues>, const String&);
-private:
- SizesAttributeParser(PassRefPtr<MediaValues> mediaValues)
- : m_mediaValues(mediaValues)
- , m_length(0)
- , m_lengthWasSet(false)
- {
- }
+ bool viewportDependant() const { return m_viewportDependant; }
+ unsigned length();
+private:
bool parse(Vector<MediaQueryToken>& tokens);
bool parseMediaConditionAndLength(MediaQueryTokenIterator startToken, MediaQueryTokenIterator endToken);
unsigned effectiveSize();
@@ -36,6 +32,9 @@ private:
RefPtr<MediaValues> m_mediaValues;
unsigned m_length;
bool m_lengthWasSet;
+ bool m_viewportDependant;
+ Vector<MediaQueryToken> m_tokens;
+ bool m_isValid;
};
} // namespace
« no previous file with comments | « Source/core/css/MediaQueryList.cpp ('k') | Source/core/css/parser/SizesAttributeParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698