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 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 685 | 685 |
| 686 inline void Node::setStyleChange(StyleChangeType changeType) | 686 inline void Node::setStyleChange(StyleChangeType changeType) |
| 687 { | 687 { |
| 688 m_nodeFlags = (m_nodeFlags & ~StyleChangeMask) | changeType; | 688 m_nodeFlags = (m_nodeFlags & ~StyleChangeMask) | changeType; |
| 689 } | 689 } |
| 690 | 690 |
| 691 void Node::markAncestorsWithChildNeedsStyleRecalc() | 691 void Node::markAncestorsWithChildNeedsStyleRecalc() |
| 692 { | 692 { |
| 693 for (ContainerNode* p = parentOrShadowHostNode(); p && !p->childNeedsStyleRe calc(); p = p->parentOrShadowHostNode()) | 693 for (ContainerNode* p = parentOrShadowHostNode(); p && !p->childNeedsStyleRe calc(); p = p->parentOrShadowHostNode()) |
| 694 p->setChildNeedsStyleRecalc(); | 694 p->setChildNeedsStyleRecalc(); |
| 695 // TODO(nainar): Move this to Node::markAncestorsWithChildNeedsReattachLayou tTree() | |
| 695 document().scheduleLayoutTreeUpdateIfNeeded(); | 696 document().scheduleLayoutTreeUpdateIfNeeded(); |
| 696 } | 697 } |
| 697 | 698 |
| 699 void Node::markNodeAndAncestorsWithChildNeedsReattachLayoutTree() | |
|
Bugs Nash
2016/09/29 03:15:24
This name implies that you're marking the current
nainar
2016/09/29 04:05:15
Done.
| |
| 700 { | |
| 701 setNeedsReattachLayoutTree(); | |
| 702 for (ContainerNode* p = parentOrShadowHostNode(); p && !p->childNeedsReattac hLayoutTree(); p = p->parentOrShadowHostNode()) | |
| 703 p->setChildNeedsReattachLayoutTree(); | |
| 704 } | |
| 705 | |
| 706 | |
| 698 void Node::setNeedsStyleRecalc(StyleChangeType changeType, const StyleChangeReas onForTracing& reason) | 707 void Node::setNeedsStyleRecalc(StyleChangeType changeType, const StyleChangeReas onForTracing& reason) |
| 699 { | 708 { |
| 700 DCHECK(changeType != NoStyleChange); | 709 DCHECK(changeType != NoStyleChange); |
| 701 if (!inActiveDocument()) | 710 if (!inActiveDocument()) |
| 702 return; | 711 return; |
| 703 | 712 |
| 704 TRACE_EVENT_INSTANT1( | 713 TRACE_EVENT_INSTANT1( |
| 705 TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidationTracking"), | 714 TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidationTracking"), |
| 706 "StyleRecalcInvalidationTracking", | 715 "StyleRecalcInvalidationTracking", |
| 707 TRACE_EVENT_SCOPE_THREAD, | 716 TRACE_EVENT_SCOPE_THREAD, |
| (...skipping 1702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2410 if (node) { | 2419 if (node) { |
| 2411 std::stringstream stream; | 2420 std::stringstream stream; |
| 2412 node->printNodePathTo(stream); | 2421 node->printNodePathTo(stream); |
| 2413 LOG(INFO) << stream.str(); | 2422 LOG(INFO) << stream.str(); |
| 2414 } else { | 2423 } else { |
| 2415 LOG(INFO) << "Cannot showNodePath for <null>"; | 2424 LOG(INFO) << "Cannot showNodePath for <null>"; |
| 2416 } | 2425 } |
| 2417 } | 2426 } |
| 2418 | 2427 |
| 2419 #endif | 2428 #endif |
| OLD | NEW |