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

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

Issue 1460353002: Remove last use of the toLocalFrameTemporary macro. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | third_party/WebKit/Source/core/frame/LocalFrame.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 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 } 983 }
984 default: 984 default:
985 if (source->isShadowRoot()) { 985 if (source->isShadowRoot()) {
986 // ShadowRoot cannot disconnect itself from the host node. 986 // ShadowRoot cannot disconnect itself from the host node.
987 exceptionState.throwDOMException(HierarchyRequestError, "The node pr ovided is a shadow root, which may not be adopted."); 987 exceptionState.throwDOMException(HierarchyRequestError, "The node pr ovided is a shadow root, which may not be adopted.");
988 return nullptr; 988 return nullptr;
989 } 989 }
990 990
991 if (source->isFrameOwnerElement()) { 991 if (source->isFrameOwnerElement()) {
992 HTMLFrameOwnerElement* frameOwnerElement = toHTMLFrameOwnerElement(s ource.get()); 992 HTMLFrameOwnerElement* frameOwnerElement = toHTMLFrameOwnerElement(s ource.get());
993 // FIXME(kenrb): the downcast can be removed when the FrameTree supp orts RemoteFrames. 993 // FIXME(kenrb): the downcast can be removed when the FrameTree supp orts RemoteFrames.
sof 2015/11/20 21:20:38 remove the FIXME?
dcheng 2015/11/21 00:11:56 Oops, missed this when I was pulling cleanup patch
994 if (frame() && frame()->tree().isDescendantOf(toLocalFrameTemporary( frameOwnerElement->contentFrame()))) { 994 if (frame() && frame()->tree().isDescendantOf(frameOwnerElement->con tentFrame())) {
995 exceptionState.throwDOMException(HierarchyRequestError, "The nod e provided is a frame which contains this document."); 995 exceptionState.throwDOMException(HierarchyRequestError, "The nod e provided is a frame which contains this document.");
996 return nullptr; 996 return nullptr;
997 } 997 }
998 } 998 }
999 if (source->parentNode()) { 999 if (source->parentNode()) {
1000 source->parentNode()->removeChild(source.get(), exceptionState); 1000 source->parentNode()->removeChild(source.get(), exceptionState);
1001 if (exceptionState.hadException()) 1001 if (exceptionState.hadException())
1002 return nullptr; 1002 return nullptr;
1003 RELEASE_ASSERT(!source->parentNode()); 1003 RELEASE_ASSERT(!source->parentNode());
1004 } 1004 }
(...skipping 4903 matching lines...) Expand 10 before | Expand all | Expand 10 after
5908 #ifndef NDEBUG 5908 #ifndef NDEBUG
5909 using namespace blink; 5909 using namespace blink;
5910 void showLiveDocumentInstances() 5910 void showLiveDocumentInstances()
5911 { 5911 {
5912 Document::WeakDocumentSet& set = Document::liveDocumentSet(); 5912 Document::WeakDocumentSet& set = Document::liveDocumentSet();
5913 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 5913 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
5914 for (Document* document : set) 5914 for (Document* document : set)
5915 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); 5915 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data());
5916 } 5916 }
5917 #endif 5917 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/LocalFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698