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

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: Remove empty if statement 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 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 return RuntimeEnabledFeatures::css3TextDecorationsEnabled();
1286 case CSSPropertyFontVariationSettings:
1287 return RuntimeEnabledFeatures::cssVariableFontsEnabled();
Timothy Loh 2016/12/08 03:36:05 It looks like this (and the text-deco props) shoul
drott 2016/12/09 10:25:50 Makes sense to me, changed, and corrected the inve
1286 default: 1288 default:
1287 break; 1289 break;
1288 } 1290 }
1289 return false; 1291 return false;
1290 } 1292 }
1291 1293
1292 static inline bool isValidFirstLetterStyleProperty(CSSPropertyID id) { 1294 static inline bool isValidFirstLetterStyleProperty(CSSPropertyID id) {
1293 switch (id) { 1295 switch (id) {
1294 // Valid ::first-letter properties listed in spec: 1296 // Valid ::first-letter properties listed in spec:
1295 // http://www.w3.org/TR/css3-selectors/#application-in-css 1297 // 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: 1380 case CSSPropertyWebkitMarginAfterCollapse:
1379 case CSSPropertyWebkitMarginBefore: 1381 case CSSPropertyWebkitMarginBefore:
1380 case CSSPropertyWebkitMarginBeforeCollapse: 1382 case CSSPropertyWebkitMarginBeforeCollapse:
1381 case CSSPropertyWebkitMarginBottomCollapse: 1383 case CSSPropertyWebkitMarginBottomCollapse:
1382 case CSSPropertyWebkitMarginCollapse: 1384 case CSSPropertyWebkitMarginCollapse:
1383 case CSSPropertyWebkitMarginEnd: 1385 case CSSPropertyWebkitMarginEnd:
1384 case CSSPropertyWebkitMarginStart: 1386 case CSSPropertyWebkitMarginStart:
1385 case CSSPropertyWebkitMarginTopCollapse: 1387 case CSSPropertyWebkitMarginTopCollapse:
1386 case CSSPropertyWordSpacing: 1388 case CSSPropertyWordSpacing:
1387 return true; 1389 return true;
1390 case CSSPropertyFontVariationSettings:
1391 DCHECK(!RuntimeEnabledFeatures::cssVariableFontsEnabled());
1392 return true;
1388 case CSSPropertyTextDecoration: 1393 case CSSPropertyTextDecoration:
1389 DCHECK(!RuntimeEnabledFeatures::css3TextDecorationsEnabled()); 1394 DCHECK(!RuntimeEnabledFeatures::css3TextDecorationsEnabled());
Timothy Loh 2016/12/12 02:15:38 This one is correct -- when the flag is off we tre
1390 return true; 1395 return true;
1391 case CSSPropertyTextDecorationColor: 1396 case CSSPropertyTextDecorationColor:
1392 case CSSPropertyTextDecorationLine: 1397 case CSSPropertyTextDecorationLine:
1393 case CSSPropertyTextDecorationStyle: 1398 case CSSPropertyTextDecorationStyle:
1394 case CSSPropertyTextDecorationSkip: 1399 case CSSPropertyTextDecorationSkip:
1395 DCHECK(RuntimeEnabledFeatures::css3TextDecorationsEnabled()); 1400 DCHECK(RuntimeEnabledFeatures::css3TextDecorationsEnabled());
1396 return true; 1401 return true;
1397 1402
1398 // text-shadow added in text decoration spec: 1403 // text-shadow added in text decoration spec:
1399 // http://www.w3.org/TR/css-text-decor-3/#text-shadow-property 1404 // 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) { 1972 DEFINE_TRACE(StyleResolver) {
1968 visitor->trace(m_matchedPropertiesCache); 1973 visitor->trace(m_matchedPropertiesCache);
1969 visitor->trace(m_selectorFilter); 1974 visitor->trace(m_selectorFilter);
1970 visitor->trace(m_styleSharingLists); 1975 visitor->trace(m_styleSharingLists);
1971 visitor->trace(m_pendingStyleSheets); 1976 visitor->trace(m_pendingStyleSheets);
1972 visitor->trace(m_document); 1977 visitor->trace(m_document);
1973 visitor->trace(m_tracker); 1978 visitor->trace(m_tracker);
1974 } 1979 }
1975 1980
1976 } // namespace blink 1981 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698