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

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

Issue 2727563002: Selection API: document.open() should reset Selection. (Closed)
Patch Set: . Created 3 years, 9 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
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 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All
7 * rights reserved. 7 * rights reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
(...skipping 2712 matching lines...) Expand 10 before | Expand all | Expand 10 after
2723 return; 2723 return;
2724 } 2724 }
2725 } 2725 }
2726 2726
2727 // PlzNavigate: We should abort ongoing navigations handled by the client. 2727 // PlzNavigate: We should abort ongoing navigations handled by the client.
2728 if (m_frame->loader().hasProvisionalNavigation()) 2728 if (m_frame->loader().hasProvisionalNavigation())
2729 m_frame->loader().stopAllLoaders(); 2729 m_frame->loader().stopAllLoaders();
2730 } 2730 }
2731 2731
2732 removeAllEventListenersRecursively(); 2732 removeAllEventListenersRecursively();
2733 resetTreeScope();
2734 if (m_frame)
2735 m_frame->selection().clear();
2733 implicitOpen(ForceSynchronousParsing); 2736 implicitOpen(ForceSynchronousParsing);
2734 if (ScriptableDocumentParser* parser = scriptableDocumentParser()) 2737 if (ScriptableDocumentParser* parser = scriptableDocumentParser())
2735 parser->setWasCreatedByScript(true); 2738 parser->setWasCreatedByScript(true);
2736 2739
2737 if (m_frame) 2740 if (m_frame)
2738 m_frame->loader().didExplicitOpen(); 2741 m_frame->loader().didExplicitOpen();
2739 if (m_loadEventProgress != LoadEventInProgress && 2742 if (m_loadEventProgress != LoadEventInProgress &&
2740 pageDismissalEventBeingDispatched() == NoDismissal) 2743 pageDismissalEventBeingDispatched() == NoDismissal)
2741 m_loadEventProgress = LoadEventNotRun; 2744 m_loadEventProgress = LoadEventNotRun;
2742 } 2745 }
(...skipping 3914 matching lines...) Expand 10 before | Expand all | Expand 10 after
6657 } 6660 }
6658 6661
6659 void showLiveDocumentInstances() { 6662 void showLiveDocumentInstances() {
6660 WeakDocumentSet& set = liveDocumentSet(); 6663 WeakDocumentSet& set = liveDocumentSet();
6661 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6664 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6662 for (blink::Document* document : set) 6665 for (blink::Document* document : set)
6663 fprintf(stderr, "- Document %p URL: %s\n", document, 6666 fprintf(stderr, "- Document %p URL: %s\n", document,
6664 document->url().getString().utf8().data()); 6667 document->url().getString().utf8().data());
6665 } 6668 }
6666 #endif 6669 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698