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

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

Issue 775153002: Implement unset value handling (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add test Created 6 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
« no previous file with comments | « Source/core/css/parser/CSSPropertyParser.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after
1360 // If the property value is explicitly inherited, we need to apply f urther non-inherited properties 1360 // If the property value is explicitly inherited, we need to apply f urther non-inherited properties
1361 // as they might override the value inherited here. For this reason we don't allow declarations with 1361 // as they might override the value inherited here. For this reason we don't allow declarations with
1362 // explicitly inherited properties to be cached. 1362 // explicitly inherited properties to be cached.
1363 ASSERT(!current.value()->isInheritedValue()); 1363 ASSERT(!current.value()->isInheritedValue());
1364 continue; 1364 continue;
1365 } 1365 }
1366 1366
1367 if (!isPropertyForPass<pass>(property)) 1367 if (!isPropertyForPass<pass>(property))
1368 continue; 1368 continue;
1369 1369
1370 if (current.value()->isUnsetValue()) {
1371 if (CSSPropertyMetadata::isInheritedProperty(property))
1372 StyleBuilder::applyProperty(property, state, cssValuePool().crea teInheritedValue().get());
1373 else
1374 StyleBuilder::applyProperty(property, state, cssValuePool().crea teExplicitInitialValue().get());
1375 continue;
1376 }
1377
1370 StyleBuilder::applyProperty(current.id(), state, current.value()); 1378 StyleBuilder::applyProperty(current.id(), state, current.value());
1371 } 1379 }
1372 } 1380 }
1373 1381
1374 template <StyleResolver::StyleApplicationPass pass> 1382 template <StyleResolver::StyleApplicationPass pass>
1375 void StyleResolver::applyMatchedProperties(StyleResolverState& state, const Matc hResult& matchResult, bool isImportant, int startIndex, int endIndex, bool inher itedOnly) 1383 void StyleResolver::applyMatchedProperties(StyleResolverState& state, const Matc hResult& matchResult, bool isImportant, int startIndex, int endIndex, bool inher itedOnly)
1376 { 1384 {
1377 if (startIndex == -1) 1385 if (startIndex == -1)
1378 return; 1386 return;
1379 1387
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
1606 visitor->trace(m_uncommonAttributeRuleSet); 1614 visitor->trace(m_uncommonAttributeRuleSet);
1607 visitor->trace(m_watchedSelectorsRules); 1615 visitor->trace(m_watchedSelectorsRules);
1608 visitor->trace(m_treeBoundaryCrossingRules); 1616 visitor->trace(m_treeBoundaryCrossingRules);
1609 visitor->trace(m_styleSharingLists); 1617 visitor->trace(m_styleSharingLists);
1610 visitor->trace(m_pendingStyleSheets); 1618 visitor->trace(m_pendingStyleSheets);
1611 visitor->trace(m_document); 1619 visitor->trace(m_document);
1612 #endif 1620 #endif
1613 } 1621 }
1614 1622
1615 } // namespace blink 1623 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/parser/CSSPropertyParser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698