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

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp

Issue 2558053002: Add CSS support for font-variation-settings (Closed)
Patch Set: DCHECK corrected, newline removed. Created 4 years 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1277 // FIXME: 'text-decoration' shorthand to be handled when available. 1277 // FIXME: 'text-decoration' shorthand to be handled when available.
1278 // See https://chromiumcodereview.appspot.com/19516002 for details. 1278 // See https://chromiumcodereview.appspot.com/19516002 for details.
1279 case CSSPropertyTextDecoration: 1279 case CSSPropertyTextDecoration:
1280 case CSSPropertyTextShadow: 1280 case CSSPropertyTextShadow:
1281 case CSSPropertyBorderStyle: 1281 case CSSPropertyBorderStyle:
1282 return true; 1282 return true;
1283 case CSSPropertyTextDecorationLine: 1283 case CSSPropertyTextDecorationLine:
1284 case CSSPropertyTextDecorationStyle: 1284 case CSSPropertyTextDecorationStyle:
1285 case CSSPropertyTextDecorationColor: 1285 case CSSPropertyTextDecorationColor:
1286 case CSSPropertyTextDecorationSkip: 1286 case CSSPropertyTextDecorationSkip:
1287 return RuntimeEnabledFeatures::css3TextDecorationsEnabled(); 1287 DCHECK(RuntimeEnabledFeatures::css3TextDecorationsEnabled());
1288 return true;
1289 case CSSPropertyFontVariationSettings:
1290 DCHECK(RuntimeEnabledFeatures::cssVariableFontsEnabled());
1291 return true;
1288 default: 1292 default:
1289 break; 1293 break;
1290 } 1294 }
1291 return false; 1295 return false;
1292 } 1296 }
1293 1297
1294 static inline bool isValidFirstLetterStyleProperty(CSSPropertyID id) { 1298 static inline bool isValidFirstLetterStyleProperty(CSSPropertyID id) {
1295 switch (id) { 1299 switch (id) {
1296 // Valid ::first-letter properties listed in spec: 1300 // Valid ::first-letter properties listed in spec:
1297 // http://www.w3.org/TR/css3-selectors/#application-in-css 1301 // http://www.w3.org/TR/css3-selectors/#application-in-css
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
1380 case CSSPropertyWebkitMarginAfterCollapse: 1384 case CSSPropertyWebkitMarginAfterCollapse:
1381 case CSSPropertyWebkitMarginBefore: 1385 case CSSPropertyWebkitMarginBefore:
1382 case CSSPropertyWebkitMarginBeforeCollapse: 1386 case CSSPropertyWebkitMarginBeforeCollapse:
1383 case CSSPropertyWebkitMarginBottomCollapse: 1387 case CSSPropertyWebkitMarginBottomCollapse:
1384 case CSSPropertyWebkitMarginCollapse: 1388 case CSSPropertyWebkitMarginCollapse:
1385 case CSSPropertyWebkitMarginEnd: 1389 case CSSPropertyWebkitMarginEnd:
1386 case CSSPropertyWebkitMarginStart: 1390 case CSSPropertyWebkitMarginStart:
1387 case CSSPropertyWebkitMarginTopCollapse: 1391 case CSSPropertyWebkitMarginTopCollapse:
1388 case CSSPropertyWordSpacing: 1392 case CSSPropertyWordSpacing:
1389 return true; 1393 return true;
1394 case CSSPropertyFontVariationSettings:
1395 DCHECK(RuntimeEnabledFeatures::cssVariableFontsEnabled());
1396 return true;
1390 case CSSPropertyTextDecoration: 1397 case CSSPropertyTextDecoration:
1391 DCHECK(!RuntimeEnabledFeatures::css3TextDecorationsEnabled()); 1398 DCHECK(!RuntimeEnabledFeatures::css3TextDecorationsEnabled());
1392 return true; 1399 return true;
1393 case CSSPropertyTextDecorationColor: 1400 case CSSPropertyTextDecorationColor:
1394 case CSSPropertyTextDecorationLine: 1401 case CSSPropertyTextDecorationLine:
1395 case CSSPropertyTextDecorationStyle: 1402 case CSSPropertyTextDecorationStyle:
1396 case CSSPropertyTextDecorationSkip: 1403 case CSSPropertyTextDecorationSkip:
1397 DCHECK(RuntimeEnabledFeatures::css3TextDecorationsEnabled()); 1404 DCHECK(RuntimeEnabledFeatures::css3TextDecorationsEnabled());
1398 return true; 1405 return true;
1399 1406
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
1969 DEFINE_TRACE(StyleResolver) { 1976 DEFINE_TRACE(StyleResolver) {
1970 visitor->trace(m_matchedPropertiesCache); 1977 visitor->trace(m_matchedPropertiesCache);
1971 visitor->trace(m_selectorFilter); 1978 visitor->trace(m_selectorFilter);
1972 visitor->trace(m_styleSharingLists); 1979 visitor->trace(m_styleSharingLists);
1973 visitor->trace(m_pendingStyleSheets); 1980 visitor->trace(m_pendingStyleSheets);
1974 visitor->trace(m_document); 1981 visitor->trace(m_document);
1975 visitor->trace(m_tracker); 1982 visitor->trace(m_tracker);
1976 } 1983 }
1977 1984
1978 } // namespace blink 1985 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698