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

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

Issue 15734030: Remove support for device-width|height for @viewport rule according to spec change (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Removed comment 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
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 11452 matching lines...) Expand 10 before | Expand all | Expand 10 after
11463 ASSERT(RuntimeEnabledFeatures::cssViewportEnabled()); 11463 ASSERT(RuntimeEnabledFeatures::cssViewportEnabled());
11464 11464
11465 CSSParserValue* value = m_valueList->current(); 11465 CSSParserValue* value = m_valueList->current();
11466 if (!value) 11466 if (!value)
11467 return false; 11467 return false;
11468 11468
11469 CSSValueID id = value->id; 11469 CSSValueID id = value->id;
11470 bool validPrimitive = false; 11470 bool validPrimitive = false;
11471 11471
11472 switch (propId) { 11472 switch (propId) {
11473 case CSSPropertyMinWidth: // auto | device-width | device-height | <length> | <percentage> 11473 case CSSPropertyMinWidth: // auto | <length> | <percentage>
11474 case CSSPropertyMaxWidth: 11474 case CSSPropertyMaxWidth:
11475 case CSSPropertyMinHeight: 11475 case CSSPropertyMinHeight:
11476 case CSSPropertyMaxHeight: 11476 case CSSPropertyMaxHeight:
11477 if (id == CSSValueAuto || id == CSSValueDeviceWidth || id == CSSValueDev iceHeight) 11477 if (id == CSSValueAuto)
11478 validPrimitive = true; 11478 validPrimitive = true;
11479 else 11479 else
11480 validPrimitive = (!id && validUnit(value, FLength | FPercent | FNonN eg)); 11480 validPrimitive = (!id && validUnit(value, FLength | FPercent | FNonN eg));
11481 break; 11481 break;
11482 case CSSPropertyWidth: // shorthand 11482 case CSSPropertyWidth: // shorthand
11483 return parseViewportShorthand(propId, CSSPropertyMinWidth, CSSPropertyMa xWidth, important); 11483 return parseViewportShorthand(propId, CSSPropertyMinWidth, CSSPropertyMa xWidth, important);
11484 case CSSPropertyHeight: 11484 case CSSPropertyHeight:
11485 return parseViewportShorthand(propId, CSSPropertyMinHeight, CSSPropertyM axHeight, important); 11485 return parseViewportShorthand(propId, CSSPropertyMinHeight, CSSPropertyM axHeight, important);
11486 case CSSPropertyMinZoom: // auto | <number> | <percentage> 11486 case CSSPropertyMinZoom: // auto | <number> | <percentage>
11487 case CSSPropertyMaxZoom: 11487 case CSSPropertyMaxZoom:
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
11787 { 11787 {
11788 // The tokenizer checks for the construct of an+b. 11788 // The tokenizer checks for the construct of an+b.
11789 // However, since the {ident} rule precedes the {nth} rule, some of those 11789 // However, since the {ident} rule precedes the {nth} rule, some of those
11790 // tokens are identified as string literal. Furthermore we need to accept 11790 // tokens are identified as string literal. Furthermore we need to accept
11791 // "odd" and "even" which does not match to an+b. 11791 // "odd" and "even" which does not match to an+b.
11792 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") 11792 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even")
11793 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); 11793 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n");
11794 } 11794 }
11795 11795
11796 } 11796 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698