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

Side by Side Diff: Source/core/frame/LocalFrame.cpp

Issue 495743003: Add an extra guard to replaceDocument() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Landing Created 6 years, 3 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
« no previous file with comments | « Source/core/frame/LocalFrame.h ('k') | Source/core/loader/DocumentLoader.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) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Simon Hausmann <hausmann@kde.org> 5 * 2000 Simon Hausmann <hausmann@kde.org>
6 * 2000 Stefan Schimanski <1Stein@gmx.de> 6 * 2000 Stefan Schimanski <1Stein@gmx.de>
7 * 2001 George Staikos <staikos@kde.org> 7 * 2001 George Staikos <staikos@kde.org>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 continue; 539 continue;
540 if (equalIgnoringFragmentIdentifier(toLocalFrame(frame)->document()->url (), url)) { 540 if (equalIgnoringFragmentIdentifier(toLocalFrame(frame)->document()->url (), url)) {
541 if (foundSelfReference) 541 if (foundSelfReference)
542 return false; 542 return false;
543 foundSelfReference = true; 543 foundSelfReference = true;
544 } 544 }
545 } 545 }
546 return true; 546 return true;
547 } 547 }
548 548
549 bool LocalFrame::shouldReuseDefaultView(const KURL& url) const
550 {
551 return loader().stateMachine()->isDisplayingInitialEmptyDocument() && docume nt()->isSecureTransitionTo(url);
552 }
553
549 void LocalFrame::removeSpellingMarkersUnderWords(const Vector<String>& words) 554 void LocalFrame::removeSpellingMarkersUnderWords(const Vector<String>& words)
550 { 555 {
551 spellChecker().removeSpellingMarkersUnderWords(words); 556 spellChecker().removeSpellingMarkersUnderWords(words);
552 } 557 }
553 558
554 struct ScopedFramePaintingState { 559 struct ScopedFramePaintingState {
555 ScopedFramePaintingState(LocalFrame* frame, Node* node) 560 ScopedFramePaintingState(LocalFrame* frame, Node* node)
556 : frame(frame) 561 : frame(frame)
557 , node(node) 562 , node(node)
558 , paintBehavior(frame->view()->paintBehavior()) 563 , paintBehavior(frame->view()->paintBehavior())
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 LocalFrame* LocalFrame::localFrameRoot() 670 LocalFrame* LocalFrame::localFrameRoot()
666 { 671 {
667 LocalFrame* curFrame = this; 672 LocalFrame* curFrame = this;
668 while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->i sLocalFrame()) 673 while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->i sLocalFrame())
669 curFrame = toLocalFrame(curFrame->tree().parent()); 674 curFrame = toLocalFrame(curFrame->tree().parent());
670 675
671 return curFrame; 676 return curFrame;
672 } 677 }
673 678
674 } // namespace blink 679 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/LocalFrame.h ('k') | Source/core/loader/DocumentLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698