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

Side by Side Diff: Source/core/dom/ContainerNode.cpp

Issue 53303002: Have HTMLFrameOwnerElement / SubframeLoadingDisabler deal with references (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: tiny fix Created 7 years, 1 month 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 | « no previous file | Source/core/dom/ContainerNodeAlgorithms.h » ('j') | 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 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExist s(&document())) 533 if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExist s(&document()))
534 fullscreen->removeFullScreenElementOfSubtree(this, true); 534 fullscreen->removeFullScreenElementOfSubtree(this, true);
535 535
536 // Do any prep work needed before actually starting to detach 536 // Do any prep work needed before actually starting to detach
537 // and remove... e.g. stop loading frames, fire unload events. 537 // and remove... e.g. stop loading frames, fire unload events.
538 willRemoveChildren(*this); 538 willRemoveChildren(*this);
539 539
540 { 540 {
541 // Removing focus can cause frames to load, either via events (focusout, blur) 541 // Removing focus can cause frames to load, either via events (focusout, blur)
542 // or widget updates (e.g., for <embed>). 542 // or widget updates (e.g., for <embed>).
543 SubframeLoadingDisabler disabler(this); 543 SubframeLoadingDisabler disabler(*this);
544 544
545 // Exclude this node when looking for removed focusedElement since only 545 // Exclude this node when looking for removed focusedElement since only
546 // children will be removed. 546 // children will be removed.
547 // This must be later than willRemoveChildren, which might change focus 547 // This must be later than willRemoveChildren, which might change focus
548 // state of a child. 548 // state of a child.
549 document().removeFocusedElementOfSubtree(this, true); 549 document().removeFocusedElementOfSubtree(this, true);
550 550
551 // Removing a node from a selection can cause widget updates. 551 // Removing a node from a selection can cause widget updates.
552 document().nodeChildrenWillBeRemoved(this); 552 document().nodeChildrenWillBeRemoved(this);
553 } 553 }
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
991 return true; 991 return true;
992 992
993 if (node->isElementNode() && toElement(node)->shadow()) 993 if (node->isElementNode() && toElement(node)->shadow())
994 return true; 994 return true;
995 995
996 return false; 996 return false;
997 } 997 }
998 #endif 998 #endif
999 999
1000 } // namespace WebCore 1000 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/ContainerNodeAlgorithms.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698