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

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

Issue 806183005: Remove FrameLoader's checkLoadComplete and checkLoadCompleteForThisFrame (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Helpers Created 5 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 | Annotate | Revision Log
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 5007 matching lines...) Expand 10 before | Expand all | Expand 10 after
5018 { 5018 {
5019 if (!page() || page()->pointerLockController().lockPending()) 5019 if (!page() || page()->pointerLockController().lockPending())
5020 return 0; 5020 return 0;
5021 if (Element* element = page()->pointerLockController().element()) { 5021 if (Element* element = page()->pointerLockController().element()) {
5022 if (element->document() == this) 5022 if (element->document() == this)
5023 return element; 5023 return element;
5024 } 5024 }
5025 return 0; 5025 return 0;
5026 } 5026 }
5027 5027
5028 void Document::suppressLoadEvent()
5029 {
5030 if (!loadEventFinished())
5031 m_loadEventProgress = LoadEventCompleted;
5032 }
5033
5028 void Document::decrementLoadEventDelayCount() 5034 void Document::decrementLoadEventDelayCount()
5029 { 5035 {
5030 ASSERT(m_loadEventDelayCount); 5036 ASSERT(m_loadEventDelayCount);
5031 --m_loadEventDelayCount; 5037 --m_loadEventDelayCount;
5032 5038
5033 if (!m_loadEventDelayCount) 5039 if (!m_loadEventDelayCount)
5034 checkLoadEventSoon(); 5040 checkLoadEventSoon();
5035 } 5041 }
5036 5042
5037 void Document::checkLoadEventSoon() 5043 void Document::checkLoadEventSoon()
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
5197 LayoutRect visibleContentRect = view()->visualViewportRect(); 5203 LayoutRect visibleContentRect = view()->visualViewportRect();
5198 rect.move(-FloatSize(visibleContentRect.x().toFloat(), visibleContentRect.y( ).toFloat())); 5204 rect.move(-FloatSize(visibleContentRect.x().toFloat(), visibleContentRect.y( ).toFloat()));
5199 adjustFloatRectForAbsoluteZoom(rect, renderer); 5205 adjustFloatRectForAbsoluteZoom(rect, renderer);
5200 } 5206 }
5201 5207
5202 bool Document::hasActiveParser() 5208 bool Document::hasActiveParser()
5203 { 5209 {
5204 return m_activeParserCount || (m_parser && m_parser->processingData()); 5210 return m_activeParserCount || (m_parser && m_parser->processingData());
5205 } 5211 }
5206 5212
5207 void Document::decrementActiveParserCount()
5208 {
5209 --m_activeParserCount;
5210 if (!frame())
5211 return;
5212 frame()->loader().checkLoadComplete();
5213 }
5214
5215 void Document::setContextFeatures(ContextFeatures& features) 5213 void Document::setContextFeatures(ContextFeatures& features)
5216 { 5214 {
5217 m_contextFeatures = PassRefPtrWillBeRawPtr<ContextFeatures>(features); 5215 m_contextFeatures = PassRefPtrWillBeRawPtr<ContextFeatures>(features);
5218 } 5216 }
5219 5217
5220 static RenderObject* nearestCommonHoverAncestor(RenderObject* obj1, RenderObject * obj2) 5218 static RenderObject* nearestCommonHoverAncestor(RenderObject* obj1, RenderObject * obj2)
5221 { 5219 {
5222 if (!obj1 || !obj2) 5220 if (!obj1 || !obj2)
5223 return 0; 5221 return 0;
5224 5222
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
5758 #ifndef NDEBUG 5756 #ifndef NDEBUG
5759 using namespace blink; 5757 using namespace blink;
5760 void showLiveDocumentInstances() 5758 void showLiveDocumentInstances()
5761 { 5759 {
5762 WeakDocumentSet& set = liveDocumentSet(); 5760 WeakDocumentSet& set = liveDocumentSet();
5763 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 5761 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
5764 for (Document* document : set) 5762 for (Document* document : set)
5765 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); 5763 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data());
5766 } 5764 }
5767 #endif 5765 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698