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

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

Issue 1552213002: Implement suspend/resume for IntersectionObserver notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@intersection-observer
Patch Set: Create IntersectionObserverController on demand 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 5051 matching lines...) Expand 10 before | Expand all | Expand 10 after
5062 5062
5063 WeakPtrWillBeRawPtr<Document> Document::createWeakPtr() 5063 WeakPtrWillBeRawPtr<Document> Document::createWeakPtr()
5064 { 5064 {
5065 #if ENABLE(OILPAN) 5065 #if ENABLE(OILPAN)
5066 return this; 5066 return this;
5067 #else 5067 #else
5068 return m_weakFactory.createWeakPtr(); 5068 return m_weakFactory.createWeakPtr();
5069 #endif 5069 #endif
5070 } 5070 }
5071 5071
5072 IntersectionObserverController* Document::intersectionObserverController()
5073 {
5074 return m_intersectionObserverController;
5075 }
5076
5072 IntersectionObserverController& Document::ensureIntersectionObserverController() 5077 IntersectionObserverController& Document::ensureIntersectionObserverController()
5073 { 5078 {
5074 if (!m_intersectionObserverController) 5079 if (!m_intersectionObserverController)
5075 m_intersectionObserverController = new IntersectionObserverController(); 5080 m_intersectionObserverController = IntersectionObserverController::creat e(this);
5076 return *m_intersectionObserverController; 5081 return *m_intersectionObserverController;
5077 } 5082 }
5078 5083
5079 void Document::reportBlockedScriptExecutionToInspector(const String& directiveTe xt) 5084 void Document::reportBlockedScriptExecutionToInspector(const String& directiveTe xt)
5080 { 5085 {
5081 InspectorInstrumentation::scriptExecutionBlockedByCSP(this, directiveText); 5086 InspectorInstrumentation::scriptExecutionBlockedByCSP(this, directiveText);
5082 } 5087 }
5083 5088
5084 void Document::addConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage> consoleM essage) 5089 void Document::addConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage> consoleM essage)
5085 { 5090 {
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
5896 #ifndef NDEBUG 5901 #ifndef NDEBUG
5897 using namespace blink; 5902 using namespace blink;
5898 void showLiveDocumentInstances() 5903 void showLiveDocumentInstances()
5899 { 5904 {
5900 Document::WeakDocumentSet& set = Document::liveDocumentSet(); 5905 Document::WeakDocumentSet& set = Document::liveDocumentSet();
5901 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 5906 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
5902 for (Document* document : set) 5907 for (Document* document : set)
5903 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); 5908 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data());
5904 } 5909 }
5905 #endif 5910 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/IntersectionObserver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698