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

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

Issue 1092963002: Remove CSSPropertyParser::inViewport method (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase against ToT Created 5 years, 7 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/parser/CSSParserImpl.cpp ('k') | Source/core/css/parser/CSSPropertyParser.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 /* 1 /*
2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 3 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
4 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2009 - 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserve d. 5 * Copyright (C) 2009 - 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserve d.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 FTime = 0x0020, 64 FTime = 0x0020,
65 FFrequency = 0x0040, 65 FFrequency = 0x0040,
66 FPositiveInteger = 0x0080, 66 FPositiveInteger = 0x0080,
67 FRelative = 0x0100, 67 FRelative = 0x0100,
68 FResolution = 0x0200, 68 FResolution = 0x0200,
69 FNonNeg = 0x0400, 69 FNonNeg = 0x0400,
70 FUnitlessQuirk = 0x0800 70 FUnitlessQuirk = 0x0800
71 }; 71 };
72 72
73 static bool parseValue(CSSPropertyID, bool important, 73 static bool parseValue(CSSPropertyID, bool important,
74 CSSParserValueList*, const CSSParserContext&, bool inViewport, 74 CSSParserValueList*, const CSSParserContext&,
75 WillBeHeapVector<CSSProperty, 256>&, StyleRule::Type); 75 WillBeHeapVector<CSSProperty, 256>&, StyleRule::Type);
76 76
77 // FIXME: This should probably move to CSSParserFastPaths 77 // FIXME: This should probably move to CSSParserFastPaths
78 template<typename StringType> 78 template<typename StringType>
79 static bool fastParseColor(RGBA32&, const StringType&, bool strict); 79 static bool fastParseColor(RGBA32&, const StringType&, bool strict);
80 80
81 static bool isSystemColor(int id); 81 static bool isSystemColor(int id);
82 82
83 private: 83 private:
84 CSSPropertyParser(CSSParserValueList*, const CSSParserContext&, bool inViewp ort, 84 CSSPropertyParser(CSSParserValueList*, const CSSParserContext&,
85 WillBeHeapVector<CSSProperty, 256>&, StyleRule::Type); 85 WillBeHeapVector<CSSProperty, 256>&, StyleRule::Type);
86 86
87 bool parseValue(CSSPropertyID, bool important); 87 bool parseValue(CSSPropertyID, bool important);
88 88
89 bool inShorthand() const { return m_inParseShorthand; } 89 bool inShorthand() const { return m_inParseShorthand; }
90 bool inQuirksMode() const { return isQuirksModeBehavior(m_context.mode()); } 90 bool inQuirksMode() const { return isQuirksModeBehavior(m_context.mode()); }
91 91
92 bool inViewport() const { return m_inViewport; }
93 bool parseViewportProperty(CSSPropertyID propId, bool important); 92 bool parseViewportProperty(CSSPropertyID propId, bool important);
94 bool parseViewportShorthand(CSSPropertyID propId, CSSPropertyID first, CSSPr opertyID second, bool important); 93 bool parseViewportShorthand(CSSPropertyID propId, CSSPropertyID first, CSSPr opertyID second, bool important);
95 bool parseFontFaceDescriptor(CSSPropertyID); 94 bool parseFontFaceDescriptor(CSSPropertyID);
96 95
97 KURL completeURL(const String& url) const; 96 KURL completeURL(const String& url) const;
98 97
99 void addProperty(CSSPropertyID, PassRefPtrWillBeRawPtr<CSSValue>, bool impor tant, bool implicit = false); 98 void addProperty(CSSPropertyID, PassRefPtrWillBeRawPtr<CSSValue>, bool impor tant, bool implicit = false);
100 void rollbackLastProperties(int num); 99 void rollbackLastProperties(int num);
101 void addExpandedPropertyForValue(CSSPropertyID propId, PassRefPtrWillBeRawPt r<CSSValue>, bool); 100 void addExpandedPropertyForValue(CSSPropertyID propId, PassRefPtrWillBeRawPt r<CSSValue>, bool);
102 101
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 bool buildBorderImageParseContext(CSSPropertyID, BorderImageParseContext&); 358 bool buildBorderImageParseContext(CSSPropertyID, BorderImageParseContext&);
360 359
361 bool parseDeprecatedGradientColorStop(CSSParserValue*, CSSGradientColorStop& ); 360 bool parseDeprecatedGradientColorStop(CSSParserValue*, CSSGradientColorStop& );
362 361
363 void commitBorderImageProperty(CSSPropertyID, PassRefPtrWillBeRawPtr<CSSValu e>, bool important); 362 void commitBorderImageProperty(CSSPropertyID, PassRefPtrWillBeRawPtr<CSSValu e>, bool important);
364 363
365 private: 364 private:
366 // Inputs: 365 // Inputs:
367 CSSParserValueList* m_valueList; 366 CSSParserValueList* m_valueList;
368 const CSSParserContext& m_context; 367 const CSSParserContext& m_context;
369 const bool m_inViewport;
370 368
371 // Outputs: 369 // Outputs:
372 WillBeHeapVector<CSSProperty, 256>& m_parsedProperties; 370 WillBeHeapVector<CSSProperty, 256>& m_parsedProperties;
373 StyleRule::Type m_ruleType; 371 StyleRule::Type m_ruleType;
374 372
375 // Locals during parsing: 373 // Locals during parsing:
376 int m_inParseShorthand; 374 int m_inParseShorthand;
377 CSSPropertyID m_currentShorthand; 375 CSSPropertyID m_currentShorthand;
378 bool m_implicitShorthand; 376 bool m_implicitShorthand;
379 RefPtrWillBeMember<CSSCalcValue> m_parsedCalculation; 377 RefPtrWillBeMember<CSSCalcValue> m_parsedCalculation;
380 }; 378 };
381 379
382 CSSPropertyID unresolvedCSSPropertyID(const CSSParserString&); 380 CSSPropertyID unresolvedCSSPropertyID(const CSSParserString&);
383 CSSPropertyID cssPropertyID(const String&); 381 CSSPropertyID cssPropertyID(const String&);
384 CSSValueID cssValueKeywordID(const CSSParserString&); 382 CSSValueID cssValueKeywordID(const CSSParserString&);
385 383
386 } // namespace blink 384 } // namespace blink
387 385
388 #endif // CSSPropertyParser_h 386 #endif // CSSPropertyParser_h
OLDNEW
« no previous file with comments | « Source/core/css/parser/CSSParserImpl.cpp ('k') | Source/core/css/parser/CSSPropertyParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698