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

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: Review comments 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 4845 matching lines...) Expand 10 before | Expand all | Expand 10 after
4856 if (!isRenderingReady()) 4856 if (!isRenderingReady())
4857 return; 4857 return;
4858 if (LocalFrame* frame = this->frame()) { 4858 if (LocalFrame* frame = this->frame()) {
4859 // Avoid pumping frames for the initially empty document. 4859 // Avoid pumping frames for the initially empty document.
4860 if (!frame->loader().stateMachine()->committedFirstRealDocumentLoad()) 4860 if (!frame->loader().stateMachine()->committedFirstRealDocumentLoad())
4861 return; 4861 return;
4862 // The compositor will "defer commits" for the main frame until we 4862 // The compositor will "defer commits" for the main frame until we
4863 // explicitly request them. 4863 // explicitly request them.
4864 if (frame->isMainFrame()) 4864 if (frame->isMainFrame())
4865 frame->page()->chromeClient().beginLifecycleUpdates(); 4865 frame->page()->chromeClient().beginLifecycleUpdates();
4866 if (frame->view())
4867 frame->view()->setupRenderThrottling();
4866 } 4868 }
4867 } 4869 }
4868 4870
4869 Vector<IconURL> Document::iconURLs(int iconTypesMask) 4871 Vector<IconURL> Document::iconURLs(int iconTypesMask)
4870 { 4872 {
4871 IconURL firstFavicon; 4873 IconURL firstFavicon;
4872 IconURL firstTouchIcon; 4874 IconURL firstTouchIcon;
4873 IconURL firstTouchPrecomposedIcon; 4875 IconURL firstTouchPrecomposedIcon;
4874 Vector<IconURL> secondaryIcons; 4876 Vector<IconURL> secondaryIcons;
4875 4877
(...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after
6049 } 6051 }
6050 6052
6051 void showLiveDocumentInstances() 6053 void showLiveDocumentInstances()
6052 { 6054 {
6053 WeakDocumentSet& set = liveDocumentSet(); 6055 WeakDocumentSet& set = liveDocumentSet();
6054 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6056 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6055 for (Document* document : set) 6057 for (Document* document : set)
6056 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6058 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6057 } 6059 }
6058 #endif 6060 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698