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

Side by Side Diff: sky/engine/core/css/parser/CSSPropertyParser.cpp

Issue 710113003: Initial step of removing CSS zoom related properties. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 case CSSPropertyWebkitTextDecorationsInEffect: 860 case CSSPropertyWebkitTextDecorationsInEffect:
861 case CSSPropertyTextDecorationLine: 861 case CSSPropertyTextDecorationLine:
862 // none | [ underline || overline || line-through || blink ] | inherit 862 // none | [ underline || overline || line-through || blink ] | inherit
863 return parseTextDecoration(propId, important); 863 return parseTextDecoration(propId, important);
864 864
865 case CSSPropertyTextUnderlinePosition: 865 case CSSPropertyTextUnderlinePosition:
866 // auto | under | inherit 866 // auto | under | inherit
867 ASSERT(RuntimeEnabledFeatures::css3TextDecorationsEnabled()); 867 ASSERT(RuntimeEnabledFeatures::css3TextDecorationsEnabled());
868 return parseTextUnderlinePosition(important); 868 return parseTextUnderlinePosition(important);
869 869
870 case CSSPropertyZoom: // normal | reset | document | <number> | <pe rcentage> | inherit
871 if (id == CSSValueNormal || id == CSSValueReset || id == CSSValueDocumen t)
872 validPrimitive = true;
873 else
874 validPrimitive = (!id && validUnit(value, FNumber | FPercent | FNonN eg));
875 break;
876
877 case CSSPropertySrc: // Only used within @font-face and @-webkit-filter, so cannot use inherit | initial or be !important. This is a list of urls or local r eferences. 870 case CSSPropertySrc: // Only used within @font-face and @-webkit-filter, so cannot use inherit | initial or be !important. This is a list of urls or local r eferences.
878 parsedValue = parseFontFaceSrc(); 871 parsedValue = parseFontFaceSrc();
879 break; 872 break;
880 873
881 case CSSPropertyUnicodeRange: 874 case CSSPropertyUnicodeRange:
882 parsedValue = parseFontFaceUnicodeRange(); 875 parsedValue = parseFontFaceUnicodeRange();
883 break; 876 break;
884 877
885 /* CSS3 properties */ 878 /* CSS3 properties */
886 879
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
1317 return true; 1310 return true;
1318 } 1311 }
1319 break; 1312 break;
1320 case CSSPropertyTouchAction: 1313 case CSSPropertyTouchAction:
1321 parsedValue = parseTouchAction(); 1314 parsedValue = parseTouchAction();
1322 break; 1315 break;
1323 1316
1324 // Properties below are validated inside parseViewportProperty, because we 1317 // Properties below are validated inside parseViewportProperty, because we
1325 // check for parser state. We need to invalidate if someone adds them outsid e 1318 // check for parser state. We need to invalidate if someone adds them outsid e
1326 // a @viewport rule. 1319 // a @viewport rule.
1327 case CSSPropertyMaxZoom:
1328 case CSSPropertyMinZoom:
1329 case CSSPropertyOrientation: 1320 case CSSPropertyOrientation:
1330 case CSSPropertyUserZoom:
1331 validPrimitive = false; 1321 validPrimitive = false;
1332 break; 1322 break;
1333 1323
1334 default: 1324 default:
1335 return false; 1325 return false;
1336 } 1326 }
1337 1327
1338 if (validPrimitive) { 1328 if (validPrimitive) {
1339 parsedValue = parseValidPrimitive(id, value); 1329 parsedValue = parseValidPrimitive(id, value);
1340 m_valueList->next(); 1330 m_valueList->next();
(...skipping 4766 matching lines...) Expand 10 before | Expand all | Expand 10 after
6107 case CSSPropertyMaxHeight: 6097 case CSSPropertyMaxHeight:
6108 if (id == CSSValueAuto || id == CSSValueInternalExtendToZoom) 6098 if (id == CSSValueAuto || id == CSSValueInternalExtendToZoom)
6109 validPrimitive = true; 6099 validPrimitive = true;
6110 else 6100 else
6111 validPrimitive = (!id && validUnit(value, FLength | FPercent | FNonN eg)); 6101 validPrimitive = (!id && validUnit(value, FLength | FPercent | FNonN eg));
6112 break; 6102 break;
6113 case CSSPropertyWidth: // shorthand 6103 case CSSPropertyWidth: // shorthand
6114 return parseViewportShorthand(propId, CSSPropertyMinWidth, CSSPropertyMa xWidth, important); 6104 return parseViewportShorthand(propId, CSSPropertyMinWidth, CSSPropertyMa xWidth, important);
6115 case CSSPropertyHeight: 6105 case CSSPropertyHeight:
6116 return parseViewportShorthand(propId, CSSPropertyMinHeight, CSSPropertyM axHeight, important); 6106 return parseViewportShorthand(propId, CSSPropertyMinHeight, CSSPropertyM axHeight, important);
6117 case CSSPropertyMinZoom: // auto | <number> | <percentage>
6118 case CSSPropertyMaxZoom:
6119 case CSSPropertyZoom:
6120 if (id == CSSValueAuto)
6121 validPrimitive = true;
6122 else
6123 validPrimitive = (!id && validUnit(value, FNumber | FPercent | FNonN eg));
6124 break;
6125 case CSSPropertyUserZoom: // zoom | fixed
6126 if (id == CSSValueZoom || id == CSSValueFixed)
6127 validPrimitive = true;
6128 break;
6129 case CSSPropertyOrientation: // auto | portrait | landscape 6107 case CSSPropertyOrientation: // auto | portrait | landscape
6130 if (id == CSSValueAuto || id == CSSValuePortrait || id == CSSValueLandsc ape) 6108 if (id == CSSValueAuto || id == CSSValuePortrait || id == CSSValueLandsc ape)
6131 validPrimitive = true; 6109 validPrimitive = true;
6132 default: 6110 default:
6133 break; 6111 break;
6134 } 6112 }
6135 6113
6136 RefPtr<CSSValue> parsedValue = nullptr; 6114 RefPtr<CSSValue> parsedValue = nullptr;
6137 if (validPrimitive) { 6115 if (validPrimitive) {
6138 parsedValue = parseValidPrimitive(id, value); 6116 parsedValue = parseValidPrimitive(id, value);
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
6255 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); 6233 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n");
6256 } 6234 }
6257 6235
6258 bool CSSPropertyParser::isSystemColor(int id) 6236 bool CSSPropertyParser::isSystemColor(int id)
6259 { 6237 {
6260 // FIXME(sky): remove 6238 // FIXME(sky): remove
6261 return false; 6239 return false;
6262 } 6240 }
6263 6241
6264 } // namespace blink 6242 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/css/MediaValues.cpp ('k') | sky/engine/core/css/resolver/AnimatedStyleBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698