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

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: Rebased Created 4 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
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 4867 matching lines...) Expand 10 before | Expand all | Expand 10 after
4878 if (!isRenderingReady()) 4878 if (!isRenderingReady())
4879 return; 4879 return;
4880 if (LocalFrame* frame = this->frame()) { 4880 if (LocalFrame* frame = this->frame()) {
4881 // Avoid pumping frames for the initially empty document. 4881 // Avoid pumping frames for the initially empty document.
4882 if (!frame->loader().stateMachine()->committedFirstRealDocumentLoad()) 4882 if (!frame->loader().stateMachine()->committedFirstRealDocumentLoad())
4883 return; 4883 return;
4884 // The compositor will "defer commits" for the main frame until we 4884 // The compositor will "defer commits" for the main frame until we
4885 // explicitly request them. 4885 // explicitly request them.
4886 if (frame->isMainFrame()) 4886 if (frame->isMainFrame())
4887 frame->page()->chromeClient().beginLifecycleUpdates(); 4887 frame->page()->chromeClient().beginLifecycleUpdates();
4888 if (frame->view())
4889 frame->view()->setupRenderThrottling();
dgrogan 2016/09/21 17:55:56 Just for my understanding, why call this here in a
4888 } 4890 }
4889 } 4891 }
4890 4892
4891 Vector<IconURL> Document::iconURLs(int iconTypesMask) 4893 Vector<IconURL> Document::iconURLs(int iconTypesMask)
4892 { 4894 {
4893 IconURL firstFavicon; 4895 IconURL firstFavicon;
4894 IconURL firstTouchIcon; 4896 IconURL firstTouchIcon;
4895 IconURL firstTouchPrecomposedIcon; 4897 IconURL firstTouchPrecomposedIcon;
4896 Vector<IconURL> secondaryIcons; 4898 Vector<IconURL> secondaryIcons;
4897 4899
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after
6089 } 6091 }
6090 6092
6091 void showLiveDocumentInstances() 6093 void showLiveDocumentInstances()
6092 { 6094 {
6093 WeakDocumentSet& set = liveDocumentSet(); 6095 WeakDocumentSet& set = liveDocumentSet();
6094 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6096 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6095 for (Document* document : set) 6097 for (Document* document : set)
6096 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6098 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6097 } 6099 }
6098 #endif 6100 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698