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

Side by Side Diff: Source/core/css/parser/SizesAttributeParser.h

Issue 240063003: Revert "A sizes attribute parser" (https://codereview.chromium.org/224733011) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
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 "wtf/text/WTFString.h"
11
12 namespace WebCore {
13
14 class SizesAttributeParser {
15 public:
16 static unsigned findEffectiveSize(const String& attribute, PassRefPtr<MediaV alues>);
17
18 private:
19 SizesAttributeParser(PassRefPtr<MediaValues> mediaValues)
20 : m_mediaValues(mediaValues)
21 , m_length(0)
22 {
23 }
24
25 bool parse(Vector<MediaQueryToken>& tokens);
26 bool parseMediaConditionAndLength(TokenIterator startToken, TokenIterator en dToken);
27 unsigned effectiveSize();
28 bool calculateLengthInPixels(TokenIterator startToken, TokenIterator endToke n, unsigned& result);
29 bool mediaConditionMatches(PassRefPtr<MediaQuerySet> mediaCondition);
30 unsigned effectiveSizeDefaultValue();
31
32 RefPtr<MediaQuerySet> m_mediaCondition;
33 RefPtr<MediaValues> m_mediaValues;
34 unsigned m_length;
35 };
36
37 } // namespace
38
39 #endif
40
OLDNEW
« no previous file with comments | « Source/core/css/parser/MediaQueryParser.cpp ('k') | Source/core/css/parser/SizesAttributeParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698