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 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 737 inline void Node::setStyleChange(StyleChangeType changeType) | 737 inline void Node::setStyleChange(StyleChangeType changeType) |
| 738 { | 738 { |
| 739 m_nodeFlags = (m_nodeFlags & ~StyleChangeMask) | changeType; | 739 m_nodeFlags = (m_nodeFlags & ~StyleChangeMask) | changeType; |
| 740 } | 740 } |
| 741 | 741 |
| 742 void Node::markAncestorsWithChildNeedsStyleRecalc() | 742 void Node::markAncestorsWithChildNeedsStyleRecalc() |
| 743 { | 743 { |
| 744 for (ContainerNode* p = parentOrShadowHostNode(); p && !p->childNeedsStyleRe calc(); p = p->parentOrShadowHostNode()) | 744 for (ContainerNode* p = parentOrShadowHostNode(); p && !p->childNeedsStyleRe calc(); p = p->parentOrShadowHostNode()) |
| 745 p->setChildNeedsStyleRecalc(); | 745 p->setChildNeedsStyleRecalc(); |
| 746 | 746 |
| 747 if (document().hasPendingStyleRecalc()) | |
|
eseidel
2014/03/31 21:01:34
Why this additional check? Does document().schedu
| |
| 748 return; | |
| 749 | |
| 747 if (document().needsStyleRecalc() || document().childNeedsStyleRecalc()) | 750 if (document().needsStyleRecalc() || document().childNeedsStyleRecalc()) |
| 748 document().scheduleRenderTreeUpdate(); | 751 document().scheduleRenderTreeUpdate(); |
| 749 } | 752 } |
| 750 | 753 |
| 751 void Node::setNeedsStyleRecalc(StyleChangeType changeType) | 754 void Node::setNeedsStyleRecalc(StyleChangeType changeType) |
| 752 { | 755 { |
| 753 ASSERT(changeType != NoStyleChange); | 756 ASSERT(changeType != NoStyleChange); |
| 754 if (!inActiveDocument()) | 757 if (!inActiveDocument()) |
| 755 return; | 758 return; |
| 756 | 759 |
| (...skipping 1767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2524 node->showTreeForThis(); | 2527 node->showTreeForThis(); |
| 2525 } | 2528 } |
| 2526 | 2529 |
| 2527 void showNodePath(const WebCore::Node* node) | 2530 void showNodePath(const WebCore::Node* node) |
| 2528 { | 2531 { |
| 2529 if (node) | 2532 if (node) |
| 2530 node->showNodePathForThis(); | 2533 node->showNodePathForThis(); |
| 2531 } | 2534 } |
| 2532 | 2535 |
| 2533 #endif | 2536 #endif |
| OLD | NEW |