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 | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
6 * rights reserved. | 6 * rights reserved. |
7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * | 10 * |
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
906 } | 906 } |
907 | 907 |
908 void Node::detachLayoutTree(const AttachContext& context) { | 908 void Node::detachLayoutTree(const AttachContext& context) { |
909 DCHECK(document().lifecycle().stateAllowsDetach()); | 909 DCHECK(document().lifecycle().stateAllowsDetach()); |
910 DocumentLifecycle::DetachScope willDetach(document().lifecycle()); | 910 DocumentLifecycle::DetachScope willDetach(document().lifecycle()); |
911 | 911 |
912 if (layoutObject()) | 912 if (layoutObject()) |
913 layoutObject()->destroyAndCleanupAnonymousWrappers(); | 913 layoutObject()->destroyAndCleanupAnonymousWrappers(); |
914 setLayoutObject(nullptr); | 914 setLayoutObject(nullptr); |
915 setStyleChange(NeedsReattachStyleChange); | 915 setStyleChange(NeedsReattachStyleChange); |
| 916 setFlag(NeedsReattachLayoutTree); |
916 clearChildNeedsStyleInvalidation(); | 917 clearChildNeedsStyleInvalidation(); |
917 } | 918 } |
918 | 919 |
919 void Node::reattachWhitespaceSiblingsIfNeeded(Text* start) { | 920 void Node::reattachWhitespaceSiblingsIfNeeded(Text* start) { |
920 ScriptForbiddenScope forbidScriptDuringRawIteration; | 921 ScriptForbiddenScope forbidScriptDuringRawIteration; |
921 for (Node* sibling = start; sibling; sibling = sibling->nextSibling()) { | 922 for (Node* sibling = start; sibling; sibling = sibling->nextSibling()) { |
922 if (sibling->isTextNode() && toText(sibling)->containsOnlyWhitespace()) { | 923 if (sibling->isTextNode() && toText(sibling)->containsOnlyWhitespace()) { |
923 bool hadLayoutObject = !!sibling->layoutObject(); | 924 bool hadLayoutObject = !!sibling->layoutObject(); |
924 toText(sibling)->reattachLayoutTreeIfNeeded(); | 925 toText(sibling)->reattachLayoutTreeIfNeeded(); |
925 // If sibling's layout object status didn't change we don't need to | 926 // If sibling's layout object status didn't change we don't need to |
(...skipping 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2542 if (node) { | 2543 if (node) { |
2543 std::stringstream stream; | 2544 std::stringstream stream; |
2544 node->printNodePathTo(stream); | 2545 node->printNodePathTo(stream); |
2545 LOG(INFO) << stream.str(); | 2546 LOG(INFO) << stream.str(); |
2546 } else { | 2547 } else { |
2547 LOG(INFO) << "Cannot showNodePath for <null>"; | 2548 LOG(INFO) << "Cannot showNodePath for <null>"; |
2548 } | 2549 } |
2549 } | 2550 } |
2550 | 2551 |
2551 #endif | 2552 #endif |
OLD | NEW |