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

Side by Side Diff: Source/core/css/parser/SizesCalcParser.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
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 SizesCalcParser_h 5 #ifndef SizesCalcParser_h
6 #define SizesCalcParser_h 6 #define SizesCalcParser_h
7 7
8 #include "core/css/MediaValues.h" 8 #include "core/css/MediaValues.h"
9 #include "core/css/parser/MediaQueryToken.h" 9 #include "core/css/parser/MediaQueryToken.h"
10 #include "wtf/text/WTFString.h" 10 #include "wtf/text/WTFString.h"
(...skipping 19 matching lines...) Expand all
30 { 30 {
31 } 31 }
32 }; 32 };
33 33
34 class SizesCalcParser { 34 class SizesCalcParser {
35 35
36 public: 36 public:
37 SizesCalcParser(MediaQueryTokenIterator start, MediaQueryTokenIterator end, PassRefPtr<MediaValues>); 37 SizesCalcParser(MediaQueryTokenIterator start, MediaQueryTokenIterator end, PassRefPtr<MediaValues>);
38 38
39 bool viewportDependant() const { return m_viewportDependant; } 39 bool viewportDependant() const { return m_viewportDependant; }
40 unsigned result() const; 40 float result() const;
41 bool isValid() const { return m_isValid; } 41 bool isValid() const { return m_isValid; }
42 42
43 private: 43 private:
44 bool calcToReversePolishNotation(MediaQueryTokenIterator start, MediaQueryTo kenIterator end); 44 bool calcToReversePolishNotation(MediaQueryTokenIterator start, MediaQueryTo kenIterator end);
45 bool calculate(); 45 bool calculate();
46 void appendNumber(const MediaQueryToken&); 46 void appendNumber(const MediaQueryToken&);
47 bool appendLength(const MediaQueryToken&); 47 bool appendLength(const MediaQueryToken&);
48 bool handleOperator(Vector<MediaQueryToken>& stack, const MediaQueryToken&); 48 bool handleOperator(Vector<MediaQueryToken>& stack, const MediaQueryToken&);
49 void appendOperator(const MediaQueryToken&); 49 void appendOperator(const MediaQueryToken&);
50 50
51 Vector<SizesCalcValue> m_valueList; 51 Vector<SizesCalcValue> m_valueList;
52 RefPtr<MediaValues> m_mediaValues; 52 RefPtr<MediaValues> m_mediaValues;
53 bool m_viewportDependant; 53 bool m_viewportDependant;
54 bool m_isValid; 54 bool m_isValid;
55 unsigned m_result; 55 float m_result;
56 }; 56 };
57 57
58 } // namespace blink 58 } // namespace blink
59 59
60 #endif // SizesCalcParser_h 60 #endif // SizesCalcParser_h
61 61
OLDNEW
« no previous file with comments | « Source/core/css/parser/SizesAttributeParserTest.cpp ('k') | Source/core/css/parser/SizesCalcParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698