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

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

Powered by Google App Engine
This is Rietveld 408576698