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

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: Addressing Tim's review comments, adjusting test expectations 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 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 // FIXME: 'text-decoration' shorthand to be handled when available. 1275 // FIXME: 'text-decoration' shorthand to be handled when available.
1276 // See https://chromiumcodereview.appspot.com/19516002 for details. 1276 // See https://chromiumcodereview.appspot.com/19516002 for details.
1277 case CSSPropertyTextDecoration: 1277 case CSSPropertyTextDecoration:
1278 case CSSPropertyTextShadow: 1278 case CSSPropertyTextShadow:
1279 case CSSPropertyBorderStyle: 1279 case CSSPropertyBorderStyle:
1280 return true; 1280 return true;
1281 case CSSPropertyTextDecorationLine: 1281 case CSSPropertyTextDecorationLine:
1282 case CSSPropertyTextDecorationStyle: 1282 case CSSPropertyTextDecorationStyle:
1283 case CSSPropertyTextDecorationColor: 1283 case CSSPropertyTextDecorationColor:
1284 case CSSPropertyTextDecorationSkip: 1284 case CSSPropertyTextDecorationSkip:
1285 return RuntimeEnabledFeatures::css3TextDecorationsEnabled(); 1285 DCHECK(RuntimeEnabledFeatures::css3TextDecorationsEnabled());
1286 return true;
1287 case CSSPropertyFontVariationSettings:
1288 DCHECK(RuntimeEnabledFeatures::cssVariableFontsEnabled());
1289 return true;
1286 default: 1290 default:
1287 break; 1291 break;
1288 } 1292 }
1289 return false; 1293 return false;
1290 } 1294 }
1291 1295
1292 static inline bool isValidFirstLetterStyleProperty(CSSPropertyID id) { 1296 static inline bool isValidFirstLetterStyleProperty(CSSPropertyID id) {
1293 switch (id) { 1297 switch (id) {
1294 // Valid ::first-letter properties listed in spec: 1298 // Valid ::first-letter properties listed in spec:
1295 // http://www.w3.org/TR/css3-selectors/#application-in-css 1299 // http://www.w3.org/TR/css3-selectors/#application-in-css
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
1378 case CSSPropertyWebkitMarginAfterCollapse: 1382 case CSSPropertyWebkitMarginAfterCollapse:
1379 case CSSPropertyWebkitMarginBefore: 1383 case CSSPropertyWebkitMarginBefore:
1380 case CSSPropertyWebkitMarginBeforeCollapse: 1384 case CSSPropertyWebkitMarginBeforeCollapse:
1381 case CSSPropertyWebkitMarginBottomCollapse: 1385 case CSSPropertyWebkitMarginBottomCollapse:
1382 case CSSPropertyWebkitMarginCollapse: 1386 case CSSPropertyWebkitMarginCollapse:
1383 case CSSPropertyWebkitMarginEnd: 1387 case CSSPropertyWebkitMarginEnd:
1384 case CSSPropertyWebkitMarginStart: 1388 case CSSPropertyWebkitMarginStart:
1385 case CSSPropertyWebkitMarginTopCollapse: 1389 case CSSPropertyWebkitMarginTopCollapse:
1386 case CSSPropertyWordSpacing: 1390 case CSSPropertyWordSpacing:
1387 return true; 1391 return true;
1392 case CSSPropertyFontVariationSettings:
1393 DCHECK(RuntimeEnabledFeatures::cssVariableFontsEnabled());
1394 return true;
1388 case CSSPropertyTextDecoration: 1395 case CSSPropertyTextDecoration:
1389 DCHECK(!RuntimeEnabledFeatures::css3TextDecorationsEnabled()); 1396 DCHECK(RuntimeEnabledFeatures::css3TextDecorationsEnabled());
1390 return true; 1397 return true;
1391 case CSSPropertyTextDecorationColor: 1398 case CSSPropertyTextDecorationColor:
1392 case CSSPropertyTextDecorationLine: 1399 case CSSPropertyTextDecorationLine:
1393 case CSSPropertyTextDecorationStyle: 1400 case CSSPropertyTextDecorationStyle:
1394 case CSSPropertyTextDecorationSkip: 1401 case CSSPropertyTextDecorationSkip:
1395 DCHECK(RuntimeEnabledFeatures::css3TextDecorationsEnabled()); 1402 DCHECK(RuntimeEnabledFeatures::css3TextDecorationsEnabled());
1396 return true; 1403 return true;
1397 1404
1398 // text-shadow added in text decoration spec: 1405 // text-shadow added in text decoration spec:
1399 // http://www.w3.org/TR/css-text-decor-3/#text-shadow-property 1406 // http://www.w3.org/TR/css-text-decor-3/#text-shadow-property
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
1967 DEFINE_TRACE(StyleResolver) { 1974 DEFINE_TRACE(StyleResolver) {
1968 visitor->trace(m_matchedPropertiesCache); 1975 visitor->trace(m_matchedPropertiesCache);
1969 visitor->trace(m_selectorFilter); 1976 visitor->trace(m_selectorFilter);
1970 visitor->trace(m_styleSharingLists); 1977 visitor->trace(m_styleSharingLists);
1971 visitor->trace(m_pendingStyleSheets); 1978 visitor->trace(m_pendingStyleSheets);
1972 visitor->trace(m_document); 1979 visitor->trace(m_document);
1973 visitor->trace(m_tracker); 1980 visitor->trace(m_tracker);
1974 } 1981 }
1975 1982
1976 } // namespace blink 1983 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698