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

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

Issue 633643003: Enable float source size (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed merge issue Created 6 years, 2 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
« no previous file with comments | « Source/core/css/MediaValues.h ('k') | Source/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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SizesAttributeParser_h 5 #ifndef SizesAttributeParser_h
6 #define SizesAttributeParser_h 6 #define SizesAttributeParser_h
7 7
8 #include "core/css/MediaValues.h" 8 #include "core/css/MediaValues.h"
9 #include "core/css/parser/MediaQueryBlockWatcher.h" 9 #include "core/css/parser/MediaQueryBlockWatcher.h"
10 #include "core/css/parser/MediaQueryParser.h" 10 #include "core/css/parser/MediaQueryParser.h"
11 #include "platform/heap/Handle.h" 11 #include "platform/heap/Handle.h"
12 #include "wtf/text/WTFString.h" 12 #include "wtf/text/WTFString.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class SizesAttributeParser { 16 class SizesAttributeParser {
17 STACK_ALLOCATED(); 17 STACK_ALLOCATED();
18 public: 18 public:
19 SizesAttributeParser(PassRefPtr<MediaValues>, const String&); 19 SizesAttributeParser(PassRefPtr<MediaValues>, const String&);
20 20
21 bool viewportDependant() const { return m_viewportDependant; } 21 bool viewportDependant() const { return m_viewportDependant; }
22 unsigned length(); 22 float length();
23 23
24 private: 24 private:
25 bool parse(Vector<MediaQueryToken>& tokens); 25 bool parse(Vector<MediaQueryToken>& tokens);
26 bool parseMediaConditionAndLength(MediaQueryTokenIterator startToken, MediaQ ueryTokenIterator endToken); 26 bool parseMediaConditionAndLength(MediaQueryTokenIterator startToken, MediaQ ueryTokenIterator endToken);
27 unsigned effectiveSize(); 27 float effectiveSize();
28 bool calculateLengthInPixels(MediaQueryTokenIterator startToken, MediaQueryT okenIterator endToken, unsigned& result); 28 bool calculateLengthInPixels(MediaQueryTokenIterator startToken, MediaQueryT okenIterator endToken, float& result);
29 bool mediaConditionMatches(PassRefPtrWillBeRawPtr<MediaQuerySet> mediaCondit ion); 29 bool mediaConditionMatches(PassRefPtrWillBeRawPtr<MediaQuerySet> mediaCondit ion);
30 unsigned effectiveSizeDefaultValue(); 30 unsigned effectiveSizeDefaultValue();
31 31
32 RefPtrWillBeMember<MediaQuerySet> m_mediaCondition; 32 RefPtrWillBeMember<MediaQuerySet> m_mediaCondition;
33 RefPtr<MediaValues> m_mediaValues; 33 RefPtr<MediaValues> m_mediaValues;
34 unsigned m_length; 34 float m_length;
35 bool m_lengthWasSet; 35 bool m_lengthWasSet;
36 bool m_viewportDependant; 36 bool m_viewportDependant;
37 Vector<MediaQueryToken> m_tokens; 37 Vector<MediaQueryToken> m_tokens;
38 bool m_isValid; 38 bool m_isValid;
39 MediaQueryBlockWatcher m_blockWatcher; 39 MediaQueryBlockWatcher m_blockWatcher;
40 }; 40 };
41 41
42 } // namespace 42 } // namespace
43 43
44 #endif 44 #endif
45 45
OLDNEW
« no previous file with comments | « Source/core/css/MediaValues.h ('k') | Source/core/css/parser/SizesAttributeParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698