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

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

Issue 840463002: Fix assert when interpolating using unset (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove unset handling code in StyleResolver::applyProperties Created 5 years, 11 months 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/resolver/StyleBuilderCustom.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 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1350 // If the property value is explicitly inherited, we need to apply f urther non-inherited properties 1350 // If the property value is explicitly inherited, we need to apply f urther non-inherited properties
1351 // as they might override the value inherited here. For this reason we don't allow declarations with 1351 // as they might override the value inherited here. For this reason we don't allow declarations with
1352 // explicitly inherited properties to be cached. 1352 // explicitly inherited properties to be cached.
1353 ASSERT(!current.value()->isInheritedValue()); 1353 ASSERT(!current.value()->isInheritedValue());
1354 continue; 1354 continue;
1355 } 1355 }
1356 1356
1357 if (!isPropertyForPass<pass>(property)) 1357 if (!isPropertyForPass<pass>(property))
1358 continue; 1358 continue;
1359 1359
1360 if (current.value()->isUnsetValue()) {
1361 if (CSSPropertyMetadata::isInheritedProperty(property))
1362 StyleBuilder::applyProperty(property, state, cssValuePool().crea teInheritedValue().get());
1363 else
1364 StyleBuilder::applyProperty(property, state, cssValuePool().crea teExplicitInitialValue().get());
1365 continue;
1366 }
1367
1368 StyleBuilder::applyProperty(current.id(), state, current.value()); 1360 StyleBuilder::applyProperty(current.id(), state, current.value());
1369 } 1361 }
1370 } 1362 }
1371 1363
1372 template <StyleResolver::StyleApplicationPass pass> 1364 template <StyleResolver::StyleApplicationPass pass>
1373 void StyleResolver::applyMatchedProperties(StyleResolverState& state, const Matc hResult& matchResult, bool isImportant, int startIndex, int endIndex, bool inher itedOnly) 1365 void StyleResolver::applyMatchedProperties(StyleResolverState& state, const Matc hResult& matchResult, bool isImportant, int startIndex, int endIndex, bool inher itedOnly)
1374 { 1366 {
1375 if (startIndex == -1) 1367 if (startIndex == -1)
1376 return; 1368 return;
1377 1369
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
1604 visitor->trace(m_uncommonAttributeRuleSet); 1596 visitor->trace(m_uncommonAttributeRuleSet);
1605 visitor->trace(m_watchedSelectorsRules); 1597 visitor->trace(m_watchedSelectorsRules);
1606 visitor->trace(m_treeBoundaryCrossingRules); 1598 visitor->trace(m_treeBoundaryCrossingRules);
1607 visitor->trace(m_styleSharingLists); 1599 visitor->trace(m_styleSharingLists);
1608 visitor->trace(m_pendingStyleSheets); 1600 visitor->trace(m_pendingStyleSheets);
1609 visitor->trace(m_document); 1601 visitor->trace(m_document);
1610 #endif 1602 #endif
1611 } 1603 }
1612 1604
1613 } // namespace blink 1605 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/resolver/StyleBuilderCustom.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698