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

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

Issue 19632002: Support 'extend-to-zoom' viewport descriptor value (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed isExtendToZoom() Created 7 years, 5 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 /* 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 11417 matching lines...) Expand 10 before | Expand all | Expand 10 after
11428 ASSERT(RuntimeEnabledFeatures::cssViewportEnabled()); 11428 ASSERT(RuntimeEnabledFeatures::cssViewportEnabled());
11429 11429
11430 CSSParserValue* value = m_valueList->current(); 11430 CSSParserValue* value = m_valueList->current();
11431 if (!value) 11431 if (!value)
11432 return false; 11432 return false;
11433 11433
11434 CSSValueID id = value->id; 11434 CSSValueID id = value->id;
11435 bool validPrimitive = false; 11435 bool validPrimitive = false;
11436 11436
11437 switch (propId) { 11437 switch (propId) {
11438 case CSSPropertyMinWidth: // auto | <length> | <percentage> 11438 case CSSPropertyMinWidth: // auto | extend-to-zoom | <length> | <percentage>
11439 case CSSPropertyMaxWidth: 11439 case CSSPropertyMaxWidth:
11440 case CSSPropertyMinHeight: 11440 case CSSPropertyMinHeight:
11441 case CSSPropertyMaxHeight: 11441 case CSSPropertyMaxHeight:
11442 if (id == CSSValueAuto) 11442 if (id == CSSValueAuto || id == CSSValueInternalExtendToZoom)
11443 validPrimitive = true; 11443 validPrimitive = true;
11444 else 11444 else
11445 validPrimitive = (!id && validUnit(value, FLength | FPercent | FNonN eg)); 11445 validPrimitive = (!id && validUnit(value, FLength | FPercent | FNonN eg));
11446 break; 11446 break;
11447 case CSSPropertyWidth: // shorthand 11447 case CSSPropertyWidth: // shorthand
11448 return parseViewportShorthand(propId, CSSPropertyMinWidth, CSSPropertyMa xWidth, important); 11448 return parseViewportShorthand(propId, CSSPropertyMinWidth, CSSPropertyMa xWidth, important);
11449 case CSSPropertyHeight: 11449 case CSSPropertyHeight:
11450 return parseViewportShorthand(propId, CSSPropertyMinHeight, CSSPropertyM axHeight, important); 11450 return parseViewportShorthand(propId, CSSPropertyMinHeight, CSSPropertyM axHeight, important);
11451 case CSSPropertyMinZoom: // auto | <number> | <percentage> 11451 case CSSPropertyMinZoom: // auto | <number> | <percentage>
11452 case CSSPropertyMaxZoom: 11452 case CSSPropertyMaxZoom:
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
11743 { 11743 {
11744 // The tokenizer checks for the construct of an+b. 11744 // The tokenizer checks for the construct of an+b.
11745 // However, since the {ident} rule precedes the {nth} rule, some of those 11745 // However, since the {ident} rule precedes the {nth} rule, some of those
11746 // tokens are identified as string literal. Furthermore we need to accept 11746 // tokens are identified as string literal. Furthermore we need to accept
11747 // "odd" and "even" which does not match to an+b. 11747 // "odd" and "even" which does not match to an+b.
11748 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") 11748 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even")
11749 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); 11749 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n");
11750 } 11750 }
11751 11751
11752 } 11752 }
OLDNEW
« no previous file with comments | « LayoutTests/css3/device-adapt/viewport-width-extend-to-zoom-expected.txt ('k') | Source/core/css/CSSPrimitiveValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698