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

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

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, 2010, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 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) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2011 Google Inc. All rights reserved. 9 * Copyright (C) 2011 Google Inc. All rights reserved.
10 * 10 *
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 #include "sky/engine/wtf/PassRefPtr.h" 56 #include "sky/engine/wtf/PassRefPtr.h"
57 #include "sky/engine/wtf/WeakPtr.h" 57 #include "sky/engine/wtf/WeakPtr.h"
58 #include "sky/engine/wtf/text/TextEncoding.h" 58 #include "sky/engine/wtf/text/TextEncoding.h"
59 #include "sky/engine/wtf/text/TextPosition.h" 59 #include "sky/engine/wtf/text/TextPosition.h"
60 60
61 namespace blink { 61 namespace blink {
62 62
63 class AbstractModule; 63 class AbstractModule;
64 class AnimationTimeline; 64 class AnimationTimeline;
65 class Attr; 65 class Attr;
66 class Comment;
67 class ConsoleMessage;
66 class CSSStyleDeclaration; 68 class CSSStyleDeclaration;
67 class CSSStyleSheet; 69 class CSSStyleSheet;
68 class Comment; 70 class CustomElementRegistry;
69 class ConsoleMessage;
70 class DocumentFragment; 71 class DocumentFragment;
71 class DocumentLifecycleNotifier; 72 class DocumentLifecycleNotifier;
72 class DocumentLoadTiming; 73 class DocumentLoadTiming;
73 class DocumentMarkerController; 74 class DocumentMarkerController;
74 class DocumentParser; 75 class DocumentParser;
75 class Element; 76 class Element;
76 class ElementDataCache; 77 class ElementDataCache;
77 class Event; 78 class Event;
78 class EventListener; 79 class EventListener;
79 class ExceptionState; 80 class ExceptionState;
80 class FloatQuad; 81 class FloatQuad;
81 class FloatRect; 82 class FloatRect;
82 class Frame; 83 class Frame;
83 class FrameHost; 84 class FrameHost;
84 class FrameView; 85 class FrameView;
86 class HitTestRequest;
85 class HTMLDocumentParser; 87 class HTMLDocumentParser;
86 class HTMLElement; 88 class HTMLElement;
87 class HTMLImport; 89 class HTMLImport;
88 class HTMLImportLoader; 90 class HTMLImportLoader;
89 class HTMLImportsController; 91 class HTMLImportsController;
90 class HTMLScriptElement; 92 class HTMLScriptElement;
91 class HitTestRequest;
92 class LayoutPoint; 93 class LayoutPoint;
93 class LocalDOMWindow; 94 class LocalDOMWindow;
94 class LocalFrame; 95 class LocalFrame;
95 class Location; 96 class Location;
96 class MediaQueryListListener; 97 class MediaQueryListListener;
97 class MediaQueryMatcher; 98 class MediaQueryMatcher;
98 class CustomElementRegistry;
99 class Page; 99 class Page;
100 class Picture;
100 class QualifiedName; 101 class QualifiedName;
101 class Range; 102 class Range;
102 class RenderView; 103 class RenderView;
103 class RequestAnimationFrameCallback; 104 class RequestAnimationFrameCallback;
104 class ResourceFetcher; 105 class ResourceFetcher;
106 class ScriptedAnimationController;
105 class ScriptRunner; 107 class ScriptRunner;
106 class ScriptedAnimationController;
107 class SegmentedString; 108 class SegmentedString;
108 class SelectorQueryCache; 109 class SelectorQueryCache;
109 class Settings; 110 class Settings;
110 class StyleEngine; 111 class StyleEngine;
111 class StyleResolver; 112 class StyleResolver;
112 class Text; 113 class Text;
113 114
114 struct AnnotatedRegionValue; 115 struct AnnotatedRegionValue;
115 116
116 typedef int ExceptionCode; 117 typedef int ExceptionCode;
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 void maybeHandleHttpRefresh(const String&, HttpRefreshType); 488 void maybeHandleHttpRefresh(const String&, HttpRefreshType);
488 489
489 PassOwnPtr<LifecycleNotifier<Document> > createLifecycleNotifier(); 490 PassOwnPtr<LifecycleNotifier<Document> > createLifecycleNotifier();
490 491
491 void setHasViewportUnits() { m_hasViewportUnits = true; } 492 void setHasViewportUnits() { m_hasViewportUnits = true; }
492 bool hasViewportUnits() const { return m_hasViewportUnits; } 493 bool hasViewportUnits() const { return m_hasViewportUnits; }
493 void notifyResizeForViewportUnits(); 494 void notifyResizeForViewportUnits();
494 495
495 void didRecalculateStyleForElement() { ++m_styleRecalcElementCounter; } 496 void didRecalculateStyleForElement() { ++m_styleRecalcElementCounter; }
496 497
498 Picture* rootPicture() const;
499 void setRootPicture(PassRefPtr<Picture> picture);
500
497 protected: 501 protected:
498 explicit Document(const DocumentInit&); 502 explicit Document(const DocumentInit&);
499 503
500 #if !ENABLE(OILPAN) 504 #if !ENABLE(OILPAN)
501 virtual void dispose() override; 505 virtual void dispose() override;
502 #endif 506 #endif
503 507
504 PassRefPtr<Document> cloneDocumentWithoutChildren(); 508 PassRefPtr<Document> cloneDocumentWithoutChildren();
505 509
506 bool importContainerNodeChildren(ContainerNode* oldContainerNode, PassRefPtr <ContainerNode> newContainerNode, ExceptionState&); 510 bool importContainerNodeChildren(ContainerNode* oldContainerNode, PassRefPtr <ContainerNode> newContainerNode, ExceptionState&);
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 RefPtr<Document> m_templateDocument; 675 RefPtr<Document> m_templateDocument;
672 // With Oilpan the templateDocument and the templateDocumentHost 676 // With Oilpan the templateDocument and the templateDocumentHost
673 // live and die together. Without Oilpan, the templateDocumentHost 677 // live and die together. Without Oilpan, the templateDocumentHost
674 // is a manually managed backpointer from m_templateDocument. 678 // is a manually managed backpointer from m_templateDocument.
675 RawPtr<Document> m_templateDocumentHost; 679 RawPtr<Document> m_templateDocumentHost;
676 680
677 bool m_hasViewportUnits; 681 bool m_hasViewportUnits;
678 682
679 int m_styleRecalcElementCounter; 683 int m_styleRecalcElementCounter;
680 mutable DocumentLoadTiming m_documentLoadTiming; 684 mutable DocumentLoadTiming m_documentLoadTiming;
685
686 RefPtr<Picture> m_picture;
681 }; 687 };
682 688
683 inline void Document::scheduleRenderTreeUpdateIfNeeded() 689 inline void Document::scheduleRenderTreeUpdateIfNeeded()
684 { 690 {
685 // Inline early out to avoid the function calls below. 691 // Inline early out to avoid the function calls below.
686 if (hasPendingStyleRecalc()) 692 if (hasPendingStyleRecalc())
687 return; 693 return;
688 if (shouldScheduleRenderTreeUpdate() && needsRenderTreeUpdate()) 694 if (shouldScheduleRenderTreeUpdate() && needsRenderTreeUpdate())
689 scheduleRenderTreeUpdate(); 695 scheduleRenderTreeUpdate();
690 } 696 }
(...skipping 16 matching lines...) Expand all
707 } 713 }
708 714
709 } // namespace blink 715 } // namespace blink
710 716
711 #ifndef NDEBUG 717 #ifndef NDEBUG
712 // Outside the WebCore namespace for ease of invocation from gdb. 718 // Outside the WebCore namespace for ease of invocation from gdb.
713 void showLiveDocumentInstances(); 719 void showLiveDocumentInstances();
714 #endif 720 #endif
715 721
716 #endif // SKY_ENGINE_CORE_DOM_DOCUMENT_H_ 722 #endif // SKY_ENGINE_CORE_DOM_DOCUMENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698