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

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

Issue 2005593002: Initial ResizeObserver implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update to master: Vector<WeakMember> no longer ok. Created 4 years, 6 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 #include "core/layout/api/LayoutViewItem.h" 181 #include "core/layout/api/LayoutViewItem.h"
182 #include "core/layout/compositing/PaintLayerCompositor.h" 182 #include "core/layout/compositing/PaintLayerCompositor.h"
183 #include "core/loader/CookieJar.h" 183 #include "core/loader/CookieJar.h"
184 #include "core/loader/DocumentLoader.h" 184 #include "core/loader/DocumentLoader.h"
185 #include "core/loader/FrameFetchContext.h" 185 #include "core/loader/FrameFetchContext.h"
186 #include "core/loader/FrameLoader.h" 186 #include "core/loader/FrameLoader.h"
187 #include "core/loader/FrameLoaderClient.h" 187 #include "core/loader/FrameLoaderClient.h"
188 #include "core/loader/ImageLoader.h" 188 #include "core/loader/ImageLoader.h"
189 #include "core/loader/NavigationScheduler.h" 189 #include "core/loader/NavigationScheduler.h"
190 #include "core/loader/appcache/ApplicationCacheHost.h" 190 #include "core/loader/appcache/ApplicationCacheHost.h"
191 #include "core/observer/ResizeObserverController.h"
191 #include "core/page/ChromeClient.h" 192 #include "core/page/ChromeClient.h"
192 #include "core/page/EventWithHitTestResults.h" 193 #include "core/page/EventWithHitTestResults.h"
193 #include "core/page/FocusController.h" 194 #include "core/page/FocusController.h"
194 #include "core/page/FrameTree.h" 195 #include "core/page/FrameTree.h"
195 #include "core/page/Page.h" 196 #include "core/page/Page.h"
196 #include "core/page/PointerLockController.h" 197 #include "core/page/PointerLockController.h"
197 #include "core/page/scrolling/RootScrollerController.h" 198 #include "core/page/scrolling/RootScrollerController.h"
198 #include "core/page/scrolling/ScrollingCoordinator.h" 199 #include "core/page/scrolling/ScrollingCoordinator.h"
199 #include "core/page/scrolling/SnapCoordinator.h" 200 #include "core/page/scrolling/SnapCoordinator.h"
200 #include "core/page/scrolling/ViewportScrollCallback.h" 201 #include "core/page/scrolling/ViewportScrollCallback.h"
(...skipping 4970 matching lines...) Expand 10 before | Expand all | Expand 10 after
5171 return *m_intersectionObserverController; 5172 return *m_intersectionObserverController;
5172 } 5173 }
5173 5174
5174 NodeIntersectionObserverData& Document::ensureIntersectionObserverData() 5175 NodeIntersectionObserverData& Document::ensureIntersectionObserverData()
5175 { 5176 {
5176 if (!m_intersectionObserverData) 5177 if (!m_intersectionObserverData)
5177 m_intersectionObserverData = new NodeIntersectionObserverData(); 5178 m_intersectionObserverData = new NodeIntersectionObserverData();
5178 return *m_intersectionObserverData; 5179 return *m_intersectionObserverData;
5179 } 5180 }
5180 5181
5182 ResizeObserverController& Document::ensureResizeObserverController()
5183 {
5184 if (!m_resizeObserverController)
5185 m_resizeObserverController = new ResizeObserverController();
5186 return *m_resizeObserverController;
5187 }
5188
5181 void Document::reportBlockedScriptExecutionToInspector(const String& directiveTe xt) 5189 void Document::reportBlockedScriptExecutionToInspector(const String& directiveTe xt)
5182 { 5190 {
5183 InspectorInstrumentation::scriptExecutionBlockedByCSP(this, directiveText); 5191 InspectorInstrumentation::scriptExecutionBlockedByCSP(this, directiveText);
5184 } 5192 }
5185 5193
5186 void Document::addConsoleMessage(ConsoleMessage* consoleMessage) 5194 void Document::addConsoleMessage(ConsoleMessage* consoleMessage)
5187 { 5195 {
5188 if (!isContextThread()) { 5196 if (!isContextThread()) {
5189 m_taskRunner->postTask(BLINK_FROM_HERE, AddConsoleMessageTask::create(co nsoleMessage->source(), consoleMessage->level(), consoleMessage->message())); 5197 m_taskRunner->postTask(BLINK_FROM_HERE, AddConsoleMessageTask::create(co nsoleMessage->source(), consoleMessage->level(), consoleMessage->message()));
5190 return; 5198 return;
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
5973 visitor->trace(m_templateDocumentHost); 5981 visitor->trace(m_templateDocumentHost);
5974 visitor->trace(m_userActionElements); 5982 visitor->trace(m_userActionElements);
5975 visitor->trace(m_svgExtensions); 5983 visitor->trace(m_svgExtensions);
5976 visitor->trace(m_timeline); 5984 visitor->trace(m_timeline);
5977 visitor->trace(m_compositorPendingAnimations); 5985 visitor->trace(m_compositorPendingAnimations);
5978 visitor->trace(m_contextDocument); 5986 visitor->trace(m_contextDocument);
5979 visitor->trace(m_canvasFontCache); 5987 visitor->trace(m_canvasFontCache);
5980 visitor->trace(m_intersectionObserverController); 5988 visitor->trace(m_intersectionObserverController);
5981 visitor->trace(m_intersectionObserverData); 5989 visitor->trace(m_intersectionObserverData);
5982 visitor->trace(m_snapCoordinator); 5990 visitor->trace(m_snapCoordinator);
5991 visitor->trace(m_resizeObserverController);
5983 Supplementable<Document>::trace(visitor); 5992 Supplementable<Document>::trace(visitor);
5984 TreeScope::trace(visitor); 5993 TreeScope::trace(visitor);
5985 ContainerNode::trace(visitor); 5994 ContainerNode::trace(visitor);
5986 ExecutionContext::trace(visitor); 5995 ExecutionContext::trace(visitor);
5987 SecurityContext::trace(visitor); 5996 SecurityContext::trace(visitor);
5988 } 5997 }
5989 5998
5990 DEFINE_TRACE_WRAPPERS(Document) 5999 DEFINE_TRACE_WRAPPERS(Document)
5991 { 6000 {
5992 visitor->traceWrappers(m_importsController); 6001 visitor->traceWrappers(m_importsController);
(...skipping 25 matching lines...) Expand all
6018 } 6027 }
6019 6028
6020 void showLiveDocumentInstances() 6029 void showLiveDocumentInstances()
6021 { 6030 {
6022 WeakDocumentSet& set = liveDocumentSet(); 6031 WeakDocumentSet& set = liveDocumentSet();
6023 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6032 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6024 for (Document* document : set) 6033 for (Document* document : set)
6025 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6034 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6026 } 6035 }
6027 #endif 6036 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698