Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: third_party/WebKit/Source/core/dom/Node.cpp

Issue 1533683002: Persist invalidation sets on detach root (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avoid detaching when in inactive state Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/dom/Node.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 } 901 }
902 902
903 void Node::detach(const AttachContext& context) 903 void Node::detach(const AttachContext& context)
904 { 904 {
905 ASSERT(document().lifecycle().stateAllowsDetach()); 905 ASSERT(document().lifecycle().stateAllowsDetach());
906 DocumentLifecycle::DetachScope willDetach(document().lifecycle()); 906 DocumentLifecycle::DetachScope willDetach(document().lifecycle());
907 907
908 if (layoutObject()) 908 if (layoutObject())
909 layoutObject()->destroyAndCleanupAnonymousWrappers(); 909 layoutObject()->destroyAndCleanupAnonymousWrappers();
910 setLayoutObject(nullptr); 910 setLayoutObject(nullptr);
911
912 setStyleChange(NeedsReattachStyleChange); 911 setStyleChange(NeedsReattachStyleChange);
913 clearChildNeedsStyleInvalidation(); 912 clearChildNeedsStyleInvalidation();
914 } 913 }
915 914
916 void Node::reattachWhitespaceSiblingsIfNeeded(Text* start) 915 void Node::reattachWhitespaceSiblingsIfNeeded(Text* start)
917 { 916 {
918 ScriptForbiddenScope forbidScriptDuringRawIteration; 917 ScriptForbiddenScope forbidScriptDuringRawIteration;
919 for (Node* sibling = start; sibling; sibling = sibling->nextSibling()) { 918 for (Node* sibling = start; sibling; sibling = sibling->nextSibling()) {
920 if (sibling->isTextNode() && toText(sibling)->containsOnlyWhitespace()) { 919 if (sibling->isTextNode() && toText(sibling)->containsOnlyWhitespace()) {
921 bool hadLayoutObject = !!sibling->layoutObject(); 920 bool hadLayoutObject = !!sibling->layoutObject();
(...skipping 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after
2370 2369
2371 void showNodePath(const blink::Node* node) 2370 void showNodePath(const blink::Node* node)
2372 { 2371 {
2373 if (node) 2372 if (node)
2374 node->showNodePathForThis(); 2373 node->showNodePathForThis();
2375 else 2374 else
2376 fprintf(stderr, "Cannot showNodePath for (nil)\n"); 2375 fprintf(stderr, "Cannot showNodePath for (nil)\n");
2377 } 2376 }
2378 2377
2379 #endif 2378 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Node.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698