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

Side by Side Diff: sky/engine/core/css/parser/SizesAttributeParser.h

Issue 732813002: Remove sizes attr. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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
« no previous file with comments | « sky/engine/core/core.gni ('k') | sky/engine/core/css/parser/SizesAttributeParser.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef SizesAttributeParser_h
6 #define SizesAttributeParser_h
7
8 #include "core/css/MediaValues.h"
9 #include "core/css/parser/MediaQueryParser.h"
10 #include "platform/heap/Handle.h"
11 #include "wtf/text/WTFString.h"
12
13 namespace blink {
14
15 class SizesAttributeParser {
16 STACK_ALLOCATED();
17 public:
18 SizesAttributeParser(PassRefPtr<MediaValues>, const String&);
19
20 bool viewportDependant() const { return m_viewportDependant; }
21 unsigned length();
22
23 private:
24 bool parse(Vector<MediaQueryToken>& tokens);
25 bool parseMediaConditionAndLength(MediaQueryTokenIterator startToken, MediaQ ueryTokenIterator endToken);
26 unsigned effectiveSize();
27 bool calculateLengthInPixels(MediaQueryTokenIterator startToken, MediaQueryT okenIterator endToken, unsigned& result);
28 bool mediaConditionMatches(PassRefPtr<MediaQuerySet> mediaCondition);
29 unsigned effectiveSizeDefaultValue();
30
31 RefPtr<MediaQuerySet> m_mediaCondition;
32 RefPtr<MediaValues> m_mediaValues;
33 unsigned m_length;
34 bool m_lengthWasSet;
35 bool m_viewportDependant;
36 Vector<MediaQueryToken> m_tokens;
37 bool m_isValid;
38 };
39
40 } // namespace
41
42 #endif
43
OLDNEW
« no previous file with comments | « sky/engine/core/core.gni ('k') | sky/engine/core/css/parser/SizesAttributeParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698