OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
6 * (C) 2007 David Smith (catfish.man@gmail.com) | 6 * (C) 2007 David Smith (catfish.man@gmail.com) |
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. |
8 * (C) 2007 Eric Seidel (eric@webkit.org) | 8 * (C) 2007 Eric Seidel (eric@webkit.org) |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 1496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1507 if (document()->styleSheetCollection()->usesRemUnits() && document()->do
cumentElement() == this && localChange != NoChange && currentStyle && newStyle &
& currentStyle->fontSize() != newStyle->fontSize()) { | 1507 if (document()->styleSheetCollection()->usesRemUnits() && document()->do
cumentElement() == this && localChange != NoChange && currentStyle && newStyle &
& currentStyle->fontSize() != newStyle->fontSize()) { |
1508 // Cached RenderStyles may depend on the re units. | 1508 // Cached RenderStyles may depend on the re units. |
1509 document()->styleResolver()->invalidateMatchedPropertiesCache(); | 1509 document()->styleResolver()->invalidateMatchedPropertiesCache(); |
1510 change = Force; | 1510 change = Force; |
1511 } | 1511 } |
1512 | 1512 |
1513 if (styleChangeType() >= SubtreeStyleChange) | 1513 if (styleChangeType() >= SubtreeStyleChange) |
1514 change = Force; | 1514 change = Force; |
1515 else if (change != Force) | 1515 else if (change != Force) |
1516 change = localChange; | 1516 change = localChange; |
| 1517 } else { |
| 1518 // We still want to seed the style sharing list when just walking the tr
ee to maximize sharing. |
| 1519 document()->styleResolver()->addToStyleSharingList(this); |
1517 } | 1520 } |
1518 StyleResolverParentPusher parentPusher(this); | 1521 StyleResolverParentPusher parentPusher(this); |
1519 | 1522 |
1520 for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadow
Root()) { | 1523 for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadow
Root()) { |
1521 if (shouldRecalcStyle(change, root)) { | 1524 if (shouldRecalcStyle(change, root)) { |
1522 parentPusher.push(); | 1525 parentPusher.push(); |
1523 root->recalcStyle(change); | 1526 root->recalcStyle(change); |
1524 } | 1527 } |
1525 } | 1528 } |
1526 | 1529 |
(...skipping 24 matching lines...) Expand all Loading... |
1551 | 1554 |
1552 if (forceCheckOfNextElementSibling || forceCheckOfAnyElementSibling) | 1555 if (forceCheckOfNextElementSibling || forceCheckOfAnyElementSibling) |
1553 element->setNeedsStyleRecalc(); | 1556 element->setNeedsStyleRecalc(); |
1554 | 1557 |
1555 forceCheckOfNextElementSibling = childRulesChanged && hasDirectAdjac
entRules; | 1558 forceCheckOfNextElementSibling = childRulesChanged && hasDirectAdjac
entRules; |
1556 forceCheckOfAnyElementSibling = forceCheckOfAnyElementSibling || (ch
ildRulesChanged && hasIndirectAdjacentRules); | 1559 forceCheckOfAnyElementSibling = forceCheckOfAnyElementSibling || (ch
ildRulesChanged && hasIndirectAdjacentRules); |
1557 | 1560 |
1558 if (shouldRecalcStyle(change, element)) { | 1561 if (shouldRecalcStyle(change, element)) { |
1559 parentPusher.push(); | 1562 parentPusher.push(); |
1560 didReattach = element->recalcStyle(change); | 1563 didReattach = element->recalcStyle(change); |
| 1564 } else { |
| 1565 document()->styleResolver()->addToStyleSharingList(element); |
1561 } | 1566 } |
1562 } | 1567 } |
1563 | 1568 |
1564 forceReattachOfAnyWhitespaceSibling = didReattach || forceReattachOfAnyW
hitespaceSibling; | 1569 forceReattachOfAnyWhitespaceSibling = didReattach || forceReattachOfAnyW
hitespaceSibling; |
1565 } | 1570 } |
1566 | 1571 |
1567 if (shouldRecalcStyle(change, this)) { | 1572 if (shouldRecalcStyle(change, this)) { |
1568 updatePseudoElement(AFTER, change); | 1573 updatePseudoElement(AFTER, change); |
1569 updatePseudoElement(BACKDROP, change); | 1574 updatePseudoElement(BACKDROP, change); |
1570 } | 1575 } |
(...skipping 2072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3643 return 0; | 3648 return 0; |
3644 } | 3649 } |
3645 | 3650 |
3646 Attribute* UniqueElementData::attributeItem(unsigned index) | 3651 Attribute* UniqueElementData::attributeItem(unsigned index) |
3647 { | 3652 { |
3648 ASSERT_WITH_SECURITY_IMPLICATION(index < length()); | 3653 ASSERT_WITH_SECURITY_IMPLICATION(index < length()); |
3649 return &m_attributeVector.at(index); | 3654 return &m_attributeVector.at(index); |
3650 } | 3655 } |
3651 | 3656 |
3652 } // namespace WebCore | 3657 } // namespace WebCore |
OLD | NEW |