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

Side by Side Diff: Source/core/css/CSSParser-in.cpp

Issue 23477048: Media query malformed when 'or' is used as a media type. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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/CSSGrammar.y.in ('k') | no next file » | 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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. 8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
9 * Copyright (C) 2012 Intel Corporation. All rights reserved. 9 * Copyright (C) 2012 Intel Corporation. All rights reserved.
10 * 10 *
(...skipping 10112 matching lines...) Expand 10 before | Expand all | Expand 10 after
10123 SWITCH(name, length) { 10123 SWITCH(name, length) {
10124 CASE("and") { 10124 CASE("and") {
10125 m_token = MEDIA_AND; 10125 m_token = MEDIA_AND;
10126 } 10126 }
10127 CASE("not") { 10127 CASE("not") {
10128 m_token = MEDIA_NOT; 10128 m_token = MEDIA_NOT;
10129 } 10129 }
10130 CASE("only") { 10130 CASE("only") {
10131 m_token = MEDIA_ONLY; 10131 m_token = MEDIA_ONLY;
10132 } 10132 }
10133 CASE("or") {
10134 m_token = MEDIA_OR;
10135 }
10133 } 10136 }
10134 } 10137 }
10135 10138
10136 template <typename CharacterType> 10139 template <typename CharacterType>
10137 inline void CSSParser::detectNumberToken(CharacterType* type, int length) 10140 inline void CSSParser::detectNumberToken(CharacterType* type, int length)
10138 { 10141 {
10139 ASSERT(length > 0); 10142 ASSERT(length > 0);
10140 10143
10141 SWITCH(type, length) { 10144 SWITCH(type, length) {
10142 CASE("cm") { 10145 CASE("cm") {
(...skipping 1834 matching lines...) Expand 10 before | Expand all | Expand 10 after
11977 { 11980 {
11978 // The tokenizer checks for the construct of an+b. 11981 // The tokenizer checks for the construct of an+b.
11979 // However, since the {ident} rule precedes the {nth} rule, some of those 11982 // However, since the {ident} rule precedes the {nth} rule, some of those
11980 // tokens are identified as string literal. Furthermore we need to accept 11983 // tokens are identified as string literal. Furthermore we need to accept
11981 // "odd" and "even" which does not match to an+b. 11984 // "odd" and "even" which does not match to an+b.
11982 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") 11985 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even")
11983 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); 11986 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n");
11984 } 11987 }
11985 11988
11986 } 11989 }
OLDNEW
« no previous file with comments | « Source/core/css/CSSGrammar.y.in ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698