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

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

Issue 2272773002: Use intersection observer to control frame throttling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix rebase typo Created 4 years, 2 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 5139 matching lines...) Expand 10 before | Expand all | Expand 10 after
5150 if (!isRenderingReady()) 5150 if (!isRenderingReady())
5151 return; 5151 return;
5152 if (LocalFrame* frame = this->frame()) { 5152 if (LocalFrame* frame = this->frame()) {
5153 // Avoid pumping frames for the initially empty document. 5153 // Avoid pumping frames for the initially empty document.
5154 if (!frame->loader().stateMachine()->committedFirstRealDocumentLoad()) 5154 if (!frame->loader().stateMachine()->committedFirstRealDocumentLoad())
5155 return; 5155 return;
5156 // The compositor will "defer commits" for the main frame until we 5156 // The compositor will "defer commits" for the main frame until we
5157 // explicitly request them. 5157 // explicitly request them.
5158 if (frame->isMainFrame()) 5158 if (frame->isMainFrame())
5159 frame->page()->chromeClient().beginLifecycleUpdates(); 5159 frame->page()->chromeClient().beginLifecycleUpdates();
5160 if (frame->view())
5161 frame->view()->setupRenderThrottling();
5160 } 5162 }
5161 } 5163 }
5162 5164
5163 Vector<IconURL> Document::iconURLs(int iconTypesMask) { 5165 Vector<IconURL> Document::iconURLs(int iconTypesMask) {
5164 IconURL firstFavicon; 5166 IconURL firstFavicon;
5165 IconURL firstTouchIcon; 5167 IconURL firstTouchIcon;
5166 IconURL firstTouchPrecomposedIcon; 5168 IconURL firstTouchPrecomposedIcon;
5167 Vector<IconURL> secondaryIcons; 5169 Vector<IconURL> secondaryIcons;
5168 5170
5169 // Start from the last child node so that icons seen later take precedence as 5171 // Start from the last child node so that icons seen later take precedence as
(...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after
6401 } 6403 }
6402 6404
6403 void showLiveDocumentInstances() { 6405 void showLiveDocumentInstances() {
6404 WeakDocumentSet& set = liveDocumentSet(); 6406 WeakDocumentSet& set = liveDocumentSet();
6405 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6407 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6406 for (Document* document : set) 6408 for (Document* document : set)
6407 fprintf(stderr, "- Document %p URL: %s\n", document, 6409 fprintf(stderr, "- Document %p URL: %s\n", document,
6408 document->url().getString().utf8().data()); 6410 document->url().getString().utf8().data());
6409 } 6411 }
6410 #endif 6412 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698