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

Side by Side Diff: Source/core/css/CSSParser.h

Issue 16646002: Move the CSS Device Adaptation @viewport rule support behind a runtime flag (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: For landing Created 7 years, 6 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
« no previous file with comments | « Source/core/css/CSSGrammar.y.in ('k') | Source/core/css/CSSParser.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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 void endInvalidRuleHeader(); 397 void endInvalidRuleHeader();
398 void reportError(const CSSParserLocation&, ErrorType = GeneralError); 398 void reportError(const CSSParserLocation&, ErrorType = GeneralError);
399 void resumeErrorLogging() { m_ignoreErrors = false; } 399 void resumeErrorLogging() { m_ignoreErrors = false; }
400 400
401 inline int lex(void* yylval) { return (this->*m_lexFunc)(yylval); } 401 inline int lex(void* yylval) { return (this->*m_lexFunc)(yylval); }
402 402
403 int token() { return m_token; } 403 int token() { return m_token; }
404 404
405 void tokenToLowerCase(const CSSParserString& token); 405 void tokenToLowerCase(const CSSParserString& token);
406 406
407 #if ENABLE(CSS_DEVICE_ADAPTATION)
408 void markViewportRuleBodyStart() { m_inViewport = true; } 407 void markViewportRuleBodyStart() { m_inViewport = true; }
409 void markViewportRuleBodyEnd() { m_inViewport = false; } 408 void markViewportRuleBodyEnd() { m_inViewport = false; }
410 StyleRuleBase* createViewportRule(); 409 StyleRuleBase* createViewportRule();
411 #endif
412 410
413 PassRefPtr<CSSPrimitiveValue> createPrimitiveNumericValue(CSSParserValue*); 411 PassRefPtr<CSSPrimitiveValue> createPrimitiveNumericValue(CSSParserValue*);
414 PassRefPtr<CSSPrimitiveValue> createPrimitiveStringValue(CSSParserValue*); 412 PassRefPtr<CSSPrimitiveValue> createPrimitiveStringValue(CSSParserValue*);
415 PassRefPtr<CSSPrimitiveValue> createPrimitiveVariableNameValue(CSSParserValu e*); 413 PassRefPtr<CSSPrimitiveValue> createPrimitiveVariableNameValue(CSSParserValu e*);
416 414
417 static KURL completeURL(const CSSParserContext&, const String& url); 415 static KURL completeURL(const CSSParserContext&, const String& url);
418 416
419 CSSParserLocation currentLocation(); 417 CSSParserLocation currentLocation();
420 418
421 private: 419 private:
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 int m_lineNumber; 574 int m_lineNumber;
577 int m_tokenStartLineNumber; 575 int m_tokenStartLineNumber;
578 int m_lastSelectorLineNumber; 576 int m_lastSelectorLineNumber;
579 CSSRuleSourceData::Type m_ruleHeaderType; 577 CSSRuleSourceData::Type m_ruleHeaderType;
580 unsigned m_ruleHeaderStartOffset; 578 unsigned m_ruleHeaderStartOffset;
581 int m_ruleHeaderStartLineNumber; 579 int m_ruleHeaderStartLineNumber;
582 580
583 bool m_allowImportRules; 581 bool m_allowImportRules;
584 bool m_allowNamespaceDeclarations; 582 bool m_allowNamespaceDeclarations;
585 583
586 #if ENABLE(CSS_DEVICE_ADAPTATION)
587 bool parseViewportProperty(CSSPropertyID propId, bool important); 584 bool parseViewportProperty(CSSPropertyID propId, bool important);
588 bool parseViewportShorthand(CSSPropertyID propId, CSSPropertyID first, CSSPr opertyID second, bool important); 585 bool parseViewportShorthand(CSSPropertyID propId, CSSPropertyID first, CSSPr opertyID second, bool important);
589 586
590 bool inViewport() const { return m_inViewport; } 587 bool inViewport() const { return m_inViewport; }
591 bool m_inViewport; 588 bool m_inViewport;
592 #endif
593 589
594 int (CSSParser::*m_lexFunc)(void*); 590 int (CSSParser::*m_lexFunc)(void*);
595 591
596 Vector<RefPtr<StyleRuleBase> > m_parsedRules; 592 Vector<RefPtr<StyleRuleBase> > m_parsedRules;
597 Vector<RefPtr<StyleKeyframe> > m_parsedKeyframes; 593 Vector<RefPtr<StyleKeyframe> > m_parsedKeyframes;
598 Vector<RefPtr<MediaQuerySet> > m_parsedMediaQuerySets; 594 Vector<RefPtr<MediaQuerySet> > m_parsedMediaQuerySets;
599 Vector<OwnPtr<RuleList> > m_parsedRuleLists; 595 Vector<OwnPtr<RuleList> > m_parsedRuleLists;
600 HashSet<CSSParserSelector*> m_floatingSelectors; 596 HashSet<CSSParserSelector*> m_floatingSelectors;
601 HashSet<Vector<OwnPtr<CSSParserSelector> >*> m_floatingSelectorVectors; 597 HashSet<Vector<OwnPtr<CSSParserSelector> >*> m_floatingSelectorVectors;
602 HashSet<CSSParserValueList*> m_floatingValueLists; 598 HashSet<CSSParserValueList*> m_floatingValueLists;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 } 735 }
740 736
741 inline int cssyylex(void* yylval, CSSParser* parser) 737 inline int cssyylex(void* yylval, CSSParser* parser)
742 { 738 {
743 return parser->lex(yylval); 739 return parser->lex(yylval);
744 } 740 }
745 741
746 } // namespace WebCore 742 } // namespace WebCore
747 743
748 #endif // CSSParser_h 744 #endif // CSSParser_h
OLDNEW
« no previous file with comments | « Source/core/css/CSSGrammar.y.in ('k') | Source/core/css/CSSParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698