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

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

Issue 1397713004: Don't bother layout until first navigation is done. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Document::isInitialEmptyDocument() Created 4 years, 11 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 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 5420 matching lines...) Expand 10 before | Expand all | Expand 10 after
5431 bool Document::threadedParsingEnabledForTesting() 5431 bool Document::threadedParsingEnabledForTesting()
5432 { 5432 {
5433 return s_threadedParsingEnabledForTesting; 5433 return s_threadedParsingEnabledForTesting;
5434 } 5434 }
5435 5435
5436 bool Document::hasActiveParser() 5436 bool Document::hasActiveParser()
5437 { 5437 {
5438 return m_activeParserCount || (m_parser && m_parser->processingData()); 5438 return m_activeParserCount || (m_parser && m_parser->processingData());
5439 } 5439 }
5440 5440
5441 bool Document::isInitialEmptyDocument() const
5442 {
5443 return m_frame && !m_frame->loader().stateMachine()->committedFirstRealDocum entLoad();
5444 }
5445
5441 void Document::setContextFeatures(ContextFeatures& features) 5446 void Document::setContextFeatures(ContextFeatures& features)
5442 { 5447 {
5443 m_contextFeatures = PassRefPtrWillBeRawPtr<ContextFeatures>(features); 5448 m_contextFeatures = PassRefPtrWillBeRawPtr<ContextFeatures>(features);
5444 } 5449 }
5445 5450
5446 static LayoutObject* nearestCommonHoverAncestor(LayoutObject* obj1, LayoutObject * obj2) 5451 static LayoutObject* nearestCommonHoverAncestor(LayoutObject* obj1, LayoutObject * obj2)
5447 { 5452 {
5448 if (!obj1 || !obj2) 5453 if (!obj1 || !obj2)
5449 return 0; 5454 return 0;
5450 5455
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
5916 #ifndef NDEBUG 5921 #ifndef NDEBUG
5917 using namespace blink; 5922 using namespace blink;
5918 void showLiveDocumentInstances() 5923 void showLiveDocumentInstances()
5919 { 5924 {
5920 Document::WeakDocumentSet& set = Document::liveDocumentSet(); 5925 Document::WeakDocumentSet& set = Document::liveDocumentSet();
5921 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 5926 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
5922 for (Document* document : set) 5927 for (Document* document : set)
5923 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); 5928 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data());
5924 } 5929 }
5925 #endif 5930 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698