Chromium Code Reviews| 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 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. |
| 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 758 m_nodeFlags = (m_nodeFlags & ~StyleChangeMask) | changeType; | 758 m_nodeFlags = (m_nodeFlags & ~StyleChangeMask) | changeType; |
| 759 } | 759 } |
| 760 | 760 |
| 761 void Node::markAncestorsWithChildNeedsStyleRecalc() | 761 void Node::markAncestorsWithChildNeedsStyleRecalc() |
| 762 { | 762 { |
| 763 for (ContainerNode* p = parentOrShadowHostNode(); p && !p->childNeedsStyleRe calc(); p = p->parentOrShadowHostNode()) | 763 for (ContainerNode* p = parentOrShadowHostNode(); p && !p->childNeedsStyleRe calc(); p = p->parentOrShadowHostNode()) |
| 764 p->setChildNeedsStyleRecalc(); | 764 p->setChildNeedsStyleRecalc(); |
| 765 document().scheduleRenderTreeUpdateIfNeeded(); | 765 document().scheduleRenderTreeUpdateIfNeeded(); |
| 766 } | 766 } |
| 767 | 767 |
| 768 void Node::setNeedsStyleRecalc(StyleChangeType changeType) | 768 void Node::setNeedsStyleRecalc(StyleChangeReasonString reason, StyleChangeType c hangeType) |
| 769 { | 769 { |
| 770 ASSERT(changeType != NoStyleChange); | 770 ASSERT(changeType != NoStyleChange); |
| 771 if (!inActiveDocument()) | 771 if (!inActiveDocument()) |
| 772 return; | 772 return; |
| 773 | 773 |
| 774 StyleChangeType existingChangeType = styleChangeType(); | 774 StyleChangeType existingChangeType = styleChangeType(); |
| 775 if (changeType > existingChangeType) { | 775 if (changeType > existingChangeType) { |
| 776 setStyleChange(changeType); | 776 setStyleChange(changeType); |
| 777 if (changeType >= SubtreeStyleChange) | 777 if (changeType >= SubtreeStyleChange) |
| 778 traceStyleChangeIfNeeded(changeType); | 778 traceStyleChangeIfNeeded(changeType); |
| (...skipping 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2419 case Upgraded: | 2419 case Upgraded: |
| 2420 ASSERT(WaitingForUpgrade == oldState); | 2420 ASSERT(WaitingForUpgrade == oldState); |
| 2421 break; | 2421 break; |
| 2422 } | 2422 } |
| 2423 | 2423 |
| 2424 ASSERT(isHTMLElement() || isSVGElement()); | 2424 ASSERT(isHTMLElement() || isSVGElement()); |
| 2425 setFlag(CustomElementFlag); | 2425 setFlag(CustomElementFlag); |
| 2426 setFlag(newState == Upgraded, CustomElementUpgradedFlag); | 2426 setFlag(newState == Upgraded, CustomElementUpgradedFlag); |
| 2427 | 2427 |
| 2428 if (oldState == NotCustomElement || newState == Upgraded) | 2428 if (oldState == NotCustomElement || newState == Upgraded) |
| 2429 setNeedsStyleRecalc(SubtreeStyleChange); // :unresolved has changed | 2429 setNeedsStyleRecalc(StyleChangeReasonForTracing::CustomElement, SubtreeS tyleChange); // :unresolved has changed |
|
esprehn
2014/09/19 04:53:09
UnresolvedPseudoClass ? Seems like it should be co
kouhei (in TOK)
2014/09/22 09:03:54
Done.
| |
| 2430 } | 2430 } |
| 2431 | 2431 |
| 2432 void Node::trace(Visitor* visitor) | 2432 void Node::trace(Visitor* visitor) |
| 2433 { | 2433 { |
| 2434 #if ENABLE(OILPAN) | 2434 #if ENABLE(OILPAN) |
| 2435 visitor->trace(m_parentOrShadowHostNode); | 2435 visitor->trace(m_parentOrShadowHostNode); |
| 2436 visitor->trace(m_previous); | 2436 visitor->trace(m_previous); |
| 2437 visitor->trace(m_next); | 2437 visitor->trace(m_next); |
| 2438 // rareData() and m_data.m_renderer share their storage. We have to trace | 2438 // rareData() and m_data.m_renderer share their storage. We have to trace |
| 2439 // only one of them. | 2439 // only one of them. |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2505 node->showTreeForThis(); | 2505 node->showTreeForThis(); |
| 2506 } | 2506 } |
| 2507 | 2507 |
| 2508 void showNodePath(const blink::Node* node) | 2508 void showNodePath(const blink::Node* node) |
| 2509 { | 2509 { |
| 2510 if (node) | 2510 if (node) |
| 2511 node->showNodePathForThis(); | 2511 node->showNodePathForThis(); |
| 2512 } | 2512 } |
| 2513 | 2513 |
| 2514 #endif | 2514 #endif |
| OLD | NEW |