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

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

Issue 2735183003: PlzNavigate: stop navigations when opening a document for write (Closed)
Patch Set: Rebase 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 2707 matching lines...) Expand 10 before | Expand all | Expand 10 after
2718 if (parser->isParsing()) { 2718 if (parser->isParsing()) {
2719 // FIXME: HTML5 doesn't tell us to check this, it might not be correct. 2719 // FIXME: HTML5 doesn't tell us to check this, it might not be correct.
2720 if (parser->isExecutingScript()) 2720 if (parser->isExecutingScript())
2721 return; 2721 return;
2722 2722
2723 if (!parser->wasCreatedByScript() && parser->hasInsertionPoint()) 2723 if (!parser->wasCreatedByScript() && parser->hasInsertionPoint())
2724 return; 2724 return;
2725 } 2725 }
2726 } 2726 }
2727 2727
2728 // PlzNavigate: We should abort ongoing navigations handled by the client. 2728 if (m_frame->loader().hasProvisionalNavigation()) {
2729 if (m_frame->loader().hasProvisionalNavigation())
2730 m_frame->loader().stopAllLoaders(); 2729 m_frame->loader().stopAllLoaders();
2730 // PlzNavigate: navigations handled by the client should also be
2731 // cancelled.
2732 if (m_frame->loader().client() &&
2733 m_frame->settings()->getBrowserSideNavigationEnabled()) {
2734 m_frame->loader().client()->abortClientNavigation();
2735 }
2736 }
2731 } 2737 }
2732 2738
2733 removeAllEventListenersRecursively(); 2739 removeAllEventListenersRecursively();
2734 resetTreeScope(); 2740 resetTreeScope();
2735 if (m_frame) 2741 if (m_frame)
2736 m_frame->selection().clear(); 2742 m_frame->selection().clear();
2737 implicitOpen(ForceSynchronousParsing); 2743 implicitOpen(ForceSynchronousParsing);
2738 if (ScriptableDocumentParser* parser = scriptableDocumentParser()) 2744 if (ScriptableDocumentParser* parser = scriptableDocumentParser())
2739 parser->setWasCreatedByScript(true); 2745 parser->setWasCreatedByScript(true);
2740 2746
(...skipping 3937 matching lines...) Expand 10 before | Expand all | Expand 10 after
6678 } 6684 }
6679 6685
6680 void showLiveDocumentInstances() { 6686 void showLiveDocumentInstances() {
6681 WeakDocumentSet& set = liveDocumentSet(); 6687 WeakDocumentSet& set = liveDocumentSet();
6682 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6688 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6683 for (blink::Document* document : set) 6689 for (blink::Document* document : set)
6684 fprintf(stderr, "- Document %p URL: %s\n", document, 6690 fprintf(stderr, "- Document %p URL: %s\n", document,
6685 document->url().getString().utf8().data()); 6691 document->url().getString().utf8().data());
6686 } 6692 }
6687 #endif 6693 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698