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

Side by Side Diff: sky/engine/core/dom/Document.cpp

Issue 1122423009: Make it possible to custom-paint without an Element. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Comment tweak Created 5 years, 7 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 #include "sky/engine/core/html/parser/NestingLevelIncrementer.h" 97 #include "sky/engine/core/html/parser/NestingLevelIncrementer.h"
98 #include "sky/engine/core/html/parser/TextResourceDecoder.h" 98 #include "sky/engine/core/html/parser/TextResourceDecoder.h"
99 #include "sky/engine/core/inspector/ConsoleMessage.h" 99 #include "sky/engine/core/inspector/ConsoleMessage.h"
100 #include "sky/engine/core/inspector/InspectorCounters.h" 100 #include "sky/engine/core/inspector/InspectorCounters.h"
101 #include "sky/engine/core/loader/FrameLoaderClient.h" 101 #include "sky/engine/core/loader/FrameLoaderClient.h"
102 #include "sky/engine/core/loader/ImageLoader.h" 102 #include "sky/engine/core/loader/ImageLoader.h"
103 #include "sky/engine/core/page/ChromeClient.h" 103 #include "sky/engine/core/page/ChromeClient.h"
104 #include "sky/engine/core/page/EventHandler.h" 104 #include "sky/engine/core/page/EventHandler.h"
105 #include "sky/engine/core/page/FocusController.h" 105 #include "sky/engine/core/page/FocusController.h"
106 #include "sky/engine/core/page/Page.h" 106 #include "sky/engine/core/page/Page.h"
107 #include "sky/engine/core/painting/PaintingTasks.h"
108 #include "sky/engine/core/painting/Picture.h"
107 #include "sky/engine/core/rendering/HitTestResult.h" 109 #include "sky/engine/core/rendering/HitTestResult.h"
108 #include "sky/engine/core/rendering/RenderView.h" 110 #include "sky/engine/core/rendering/RenderView.h"
109 #include "sky/engine/platform/DateComponents.h" 111 #include "sky/engine/platform/DateComponents.h"
110 #include "sky/engine/platform/EventDispatchForbiddenScope.h" 112 #include "sky/engine/platform/EventDispatchForbiddenScope.h"
111 #include "sky/engine/platform/Language.h" 113 #include "sky/engine/platform/Language.h"
112 #include "sky/engine/platform/Logging.h" 114 #include "sky/engine/platform/Logging.h"
113 #include "sky/engine/platform/ScriptForbiddenScope.h" 115 #include "sky/engine/platform/ScriptForbiddenScope.h"
114 #include "sky/engine/platform/TraceEvent.h" 116 #include "sky/engine/platform/TraceEvent.h"
115 #include "sky/engine/platform/network/HTTPParsers.h" 117 #include "sky/engine/platform/network/HTTPParsers.h"
116 #include "sky/engine/platform/text/SegmentedString.h" 118 #include "sky/engine/platform/text/SegmentedString.h"
(...skipping 2080 matching lines...) Expand 10 before | Expand all | Expand 10 after
2197 { 2199 {
2198 Page* page = this->page(); 2200 Page* page = this->page();
2199 if (!page) 2201 if (!page)
2200 return false; 2202 return false;
2201 if (!page->focusController().isActive() || !page->focusController().isFocuse d()) 2203 if (!page->focusController().isActive() || !page->focusController().isFocuse d())
2202 return false; 2204 return false;
2203 Frame* focusedFrame = page->focusController().focusedFrame(); 2205 Frame* focusedFrame = page->focusController().focusedFrame();
2204 return focusedFrame && focusedFrame == frame(); 2206 return focusedFrame && focusedFrame == frame();
2205 } 2207 }
2206 2208
2209 Picture* Document::rootPicture() const
2210 {
2211 return m_picture.get();
2212 }
2213
2214 void Document::setRootPicture(PassRefPtr<Picture> picture)
2215 {
2216 m_picture = picture;
2217 if (m_picture)
2218 PaintingTasks::enqueueCommit(this, m_picture->displayList());
2219 scheduleVisualUpdate();
2220 }
2221
2207 } // namespace blink 2222 } // namespace blink
2208 2223
2209 #ifndef NDEBUG 2224 #ifndef NDEBUG
2210 using namespace blink; 2225 using namespace blink;
2211 void showLiveDocumentInstances() 2226 void showLiveDocumentInstances()
2212 { 2227 {
2213 WeakDocumentSet& set = liveDocumentSet(); 2228 WeakDocumentSet& set = liveDocumentSet();
2214 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 2229 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
2215 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) { 2230 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) {
2216 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data()); 2231 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data());
2217 } 2232 }
2218 } 2233 }
2219 #endif 2234 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698