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

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

Issue 1229273004: Remove Animations and Transitions. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « sky/engine/core/css/resolver/StyleResolverState.cpp ('k') | sky/engine/core/dom/Document.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 12 matching lines...) Expand all
23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 * Boston, MA 02110-1301, USA. 24 * Boston, MA 02110-1301, USA.
25 * 25 *
26 */ 26 */
27 27
28 #ifndef SKY_ENGINE_CORE_DOM_DOCUMENT_H_ 28 #ifndef SKY_ENGINE_CORE_DOM_DOCUMENT_H_
29 #define SKY_ENGINE_CORE_DOM_DOCUMENT_H_ 29 #define SKY_ENGINE_CORE_DOM_DOCUMENT_H_
30 30
31 #include "sky/engine/tonic/dart_value.h" 31 #include "sky/engine/tonic/dart_value.h"
32 #include "sky/engine/bindings/exception_state_placeholder.h" 32 #include "sky/engine/bindings/exception_state_placeholder.h"
33 #include "sky/engine/core/animation/AnimationClock.h"
34 #include "sky/engine/core/animation/PendingAnimations.h"
35 #include "sky/engine/core/dom/ContainerNode.h" 33 #include "sky/engine/core/dom/ContainerNode.h"
36 #include "sky/engine/core/dom/DocumentInit.h" 34 #include "sky/engine/core/dom/DocumentInit.h"
37 #include "sky/engine/core/dom/DocumentLifecycle.h" 35 #include "sky/engine/core/dom/DocumentLifecycle.h"
38 #include "sky/engine/core/dom/DocumentSupplementable.h" 36 #include "sky/engine/core/dom/DocumentSupplementable.h"
39 #include "sky/engine/core/dom/ExecutionContext.h" 37 #include "sky/engine/core/dom/ExecutionContext.h"
40 #include "sky/engine/core/dom/MutationObserver.h" 38 #include "sky/engine/core/dom/MutationObserver.h"
41 #include "sky/engine/core/dom/TextLinkColors.h" 39 #include "sky/engine/core/dom/TextLinkColors.h"
42 #include "sky/engine/core/dom/TreeScope.h" 40 #include "sky/engine/core/dom/TreeScope.h"
43 #include "sky/engine/core/dom/UserActionElementSet.h" 41 #include "sky/engine/core/dom/UserActionElementSet.h"
44 #include "sky/engine/core/loader/DocumentLoadTiming.h" 42 #include "sky/engine/core/loader/DocumentLoadTiming.h"
45 #include "sky/engine/core/page/FocusType.h" 43 #include "sky/engine/core/page/FocusType.h"
46 #include "sky/engine/core/page/PageVisibilityState.h"
47 #include "sky/engine/platform/Length.h" 44 #include "sky/engine/platform/Length.h"
48 #include "sky/engine/platform/Timer.h" 45 #include "sky/engine/platform/Timer.h"
49 #include "sky/engine/platform/heap/Handle.h" 46 #include "sky/engine/platform/heap/Handle.h"
50 #include "sky/engine/platform/weborigin/KURL.h" 47 #include "sky/engine/platform/weborigin/KURL.h"
51 #include "sky/engine/platform/weborigin/ReferrerPolicy.h" 48 #include "sky/engine/platform/weborigin/ReferrerPolicy.h"
52 #include "sky/engine/wtf/HashSet.h" 49 #include "sky/engine/wtf/HashSet.h"
53 #include "sky/engine/wtf/OwnPtr.h" 50 #include "sky/engine/wtf/OwnPtr.h"
54 #include "sky/engine/wtf/PassOwnPtr.h" 51 #include "sky/engine/wtf/PassOwnPtr.h"
55 #include "sky/engine/wtf/PassRefPtr.h" 52 #include "sky/engine/wtf/PassRefPtr.h"
56 #include "sky/engine/wtf/WeakPtr.h" 53 #include "sky/engine/wtf/WeakPtr.h"
57 #include "sky/engine/wtf/text/TextEncoding.h" 54 #include "sky/engine/wtf/text/TextEncoding.h"
58 #include "sky/engine/wtf/text/TextPosition.h" 55 #include "sky/engine/wtf/text/TextPosition.h"
59 56
60 namespace blink { 57 namespace blink {
61 58
62 class AbstractModule; 59 class AbstractModule;
63 class AnimationTimeline;
64 class Attr; 60 class Attr;
65 class Comment; 61 class Comment;
66 class ConsoleMessage; 62 class ConsoleMessage;
67 class CSSStyleDeclaration; 63 class CSSStyleDeclaration;
68 class CSSStyleSheet; 64 class CSSStyleSheet;
69 class CustomElementRegistry; 65 class CustomElementRegistry;
70 class DocumentFragment; 66 class DocumentFragment;
71 class DocumentLifecycleNotifier; 67 class DocumentLifecycleNotifier;
72 class DocumentLoadTiming; 68 class DocumentLoadTiming;
73 class DocumentMarkerController; 69 class DocumentMarkerController;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 167
172 AtomicString encodingName() const; 168 AtomicString encodingName() const;
173 169
174 AtomicString contentType() const; // DOM 4 document.contentType 170 AtomicString contentType() const; // DOM 4 document.contentType
175 171
176 const AtomicString& contentLanguage() const { return m_contentLanguage; } 172 const AtomicString& contentLanguage() const { return m_contentLanguage; }
177 void setContentLanguage(const AtomicString&); 173 void setContentLanguage(const AtomicString&);
178 174
179 KURL baseURI() const; 175 KURL baseURI() const;
180 176
181 String visibilityState() const;
182 bool hidden() const;
183 void didChangeVisibilityState();
184
185 PassRefPtr<Node> adoptNode(PassRefPtr<Node> source, ExceptionState&); 177 PassRefPtr<Node> adoptNode(PassRefPtr<Node> source, ExceptionState&);
186 178
187 struct TransitionElementData {
188 String scope;
189 String selector;
190 String markup;
191 };
192 void getTransitionElementData(Vector<TransitionElementData>&);
193
194 StyleResolver& styleResolver() const; 179 StyleResolver& styleResolver() const;
195 180
196 StyleEngine* styleEngine() { return m_styleEngine.get(); } 181 StyleEngine* styleEngine() { return m_styleEngine.get(); }
197 182
198 // Called when one or more stylesheets in the document may have been added, removed, or changed. 183 // Called when one or more stylesheets in the document may have been added, removed, or changed.
199 void styleResolverChanged(); 184 void styleResolverChanged();
200 185
201 void evaluateMediaQueryList(); 186 void evaluateMediaQueryList();
202 187
203 void setStateForNewFormElements(const Vector<String>&); 188 void setStateForNewFormElements(const Vector<String>&);
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 307
323 // keep track of what types of event listeners are registered, so we don't 308 // keep track of what types of event listeners are registered, so we don't
324 // dispatch events unnecessarily 309 // dispatch events unnecessarily
325 enum ListenerType { 310 enum ListenerType {
326 DOMSUBTREEMODIFIED_LISTENER = 1, 311 DOMSUBTREEMODIFIED_LISTENER = 1,
327 DOMNODEINSERTED_LISTENER = 1 << 1, 312 DOMNODEINSERTED_LISTENER = 1 << 1,
328 DOMNODEREMOVED_LISTENER = 1 << 2, 313 DOMNODEREMOVED_LISTENER = 1 << 2,
329 DOMNODEREMOVEDFROMDOCUMENT_LISTENER = 1 << 3, 314 DOMNODEREMOVEDFROMDOCUMENT_LISTENER = 1 << 3,
330 DOMNODEINSERTEDINTODOCUMENT_LISTENER = 1 << 4, 315 DOMNODEINSERTEDINTODOCUMENT_LISTENER = 1 << 4,
331 DOMCHARACTERDATAMODIFIED_LISTENER = 1 << 5, 316 DOMCHARACTERDATAMODIFIED_LISTENER = 1 << 5,
332 ANIMATIONEND_LISTENER = 1 << 6,
333 ANIMATIONSTART_LISTENER = 1 << 7,
334 ANIMATIONITERATION_LISTENER = 1 << 8,
335 TRANSITIONEND_LISTENER = 1 << 9,
336 }; 317 };
337 318
338 bool hasListenerType(ListenerType listenerType) const { return (m_listenerTy pes & listenerType); } 319 bool hasListenerType(ListenerType listenerType) const { return (m_listenerTy pes & listenerType); }
339 void addListenerTypeIfNeeded(const AtomicString& eventType); 320 void addListenerTypeIfNeeded(const AtomicString& eventType) { }
340 321
341 bool hasMutationObserversOfType(MutationObserver::MutationType type) const 322 bool hasMutationObserversOfType(MutationObserver::MutationType type) const
342 { 323 {
343 return m_mutationObserverTypes & type; 324 return m_mutationObserverTypes & type;
344 } 325 }
345 bool hasMutationObservers() const { return m_mutationObserverTypes; } 326 bool hasMutationObservers() const { return m_mutationObserverTypes; }
346 void addMutationObserverTypes(MutationObserverOptions types) { m_mutationObs erverTypes |= types; } 327 void addMutationObserverTypes(MutationObserverOptions types) { m_mutationObs erverTypes |= types; }
347 328
348 const AtomicString& dir(); 329 const AtomicString& dir();
349 void setDir(const AtomicString&); 330 void setDir(const AtomicString&);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 unsigned activeParserCount() { return m_activeParserCount; } 405 unsigned activeParserCount() { return m_activeParserCount; }
425 void incrementActiveParserCount() { ++m_activeParserCount; } 406 void incrementActiveParserCount() { ++m_activeParserCount; }
426 void decrementActiveParserCount(); 407 void decrementActiveParserCount();
427 408
428 ElementDataCache* elementDataCache() { return m_elementDataCache.get(); } 409 ElementDataCache* elementDataCache() { return m_elementDataCache.get(); }
429 410
430 void didLoadAllParserBlockingResources(); 411 void didLoadAllParserBlockingResources();
431 412
432 bool inStyleRecalc() const { return m_lifecycle.state() == DocumentLifecycle ::InStyleRecalc; } 413 bool inStyleRecalc() const { return m_lifecycle.state() == DocumentLifecycle ::InStyleRecalc; }
433 414
434 AnimationClock& animationClock() { return m_animationClock; }
435 AnimationTimeline& timeline() const { return *m_timeline; }
436 PendingAnimations& pendingAnimations() { return m_pendingAnimations; }
437
438 // A non-null m_templateDocumentHost implies that |this| was created by ensu reTemplateDocument(). 415 // A non-null m_templateDocumentHost implies that |this| was created by ensu reTemplateDocument().
439 bool isTemplateDocument() const { return !!m_templateDocumentHost; } 416 bool isTemplateDocument() const { return !!m_templateDocumentHost; }
440 Document& ensureTemplateDocument(); 417 Document& ensureTemplateDocument();
441 Document* templateDocumentHost() { return m_templateDocumentHost; } 418 Document* templateDocumentHost() { return m_templateDocumentHost; }
442 419
443 virtual void addMessage(PassRefPtr<ConsoleMessage>) override final; 420 virtual void addMessage(PassRefPtr<ConsoleMessage>) override final;
444 421
445 virtual LocalDOMWindow* executingWindow() override final; 422 virtual LocalDOMWindow* executingWindow() override final;
446 LocalFrame* executingFrame(); 423 LocalFrame* executingFrame();
447 424
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 virtual void reportBlockedScriptExecutionToInspector(const String& directive Text) override final; 503 virtual void reportBlockedScriptExecutionToInspector(const String& directive Text) override final;
527 504
528 virtual double timerAlignmentInterval() const override final; 505 virtual double timerAlignmentInterval() const override final;
529 506
530 void updateBaseURL(); 507 void updateBaseURL();
531 508
532 void resumeParserWaitingForResourcesTimerFired(Timer<Document>*); 509 void resumeParserWaitingForResourcesTimerFired(Timer<Document>*);
533 510
534 void loadEventDelayTimerFired(Timer<Document>*); 511 void loadEventDelayTimerFired(Timer<Document>*);
535 512
536 PageVisibilityState pageVisibilityState() const;
537
538 // Note that dispatching a window load event may cause the LocalDOMWindow to be detached from 513 // Note that dispatching a window load event may cause the LocalDOMWindow to be detached from
539 // the LocalFrame, so callers should take a reference to the LocalDOMWindow (which owns us) to 514 // the LocalFrame, so callers should take a reference to the LocalDOMWindow (which owns us) to
540 // prevent the Document from getting blown away from underneath them. 515 // prevent the Document from getting blown away from underneath them.
541 void dispatchWindowLoadEvent(); 516 void dispatchWindowLoadEvent();
542 517
543 void addListenerType(ListenerType listenerType) { m_listenerTypes |= listene rType; } 518 void addListenerType(ListenerType listenerType) { m_listenerTypes |= listene rType; }
544 519
545 void clearFocusedElementSoon(); 520 void clearFocusedElementSoon();
546 void clearFocusedElementTimerFired(Timer<Document>*); 521 void clearFocusedElementTimerFired(Timer<Document>*);
547 522
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 596
622 RefPtr<ScriptedAnimationController> m_scriptedAnimationController; 597 RefPtr<ScriptedAnimationController> m_scriptedAnimationController;
623 598
624 RefPtr<CustomElementRegistry> m_elementRegistry; 599 RefPtr<CustomElementRegistry> m_elementRegistry;
625 600
626 void elementDataCacheClearTimerFired(Timer<Document>*); 601 void elementDataCacheClearTimerFired(Timer<Document>*);
627 Timer<Document> m_elementDataCacheClearTimer; 602 Timer<Document> m_elementDataCacheClearTimer;
628 603
629 OwnPtr<ElementDataCache> m_elementDataCache; 604 OwnPtr<ElementDataCache> m_elementDataCache;
630 605
631 AnimationClock m_animationClock;
632 RefPtr<AnimationTimeline> m_timeline;
633 PendingAnimations m_pendingAnimations;
634
635 RefPtr<Document> m_templateDocument; 606 RefPtr<Document> m_templateDocument;
636 // With Oilpan the templateDocument and the templateDocumentHost 607 // With Oilpan the templateDocument and the templateDocumentHost
637 // live and die together. Without Oilpan, the templateDocumentHost 608 // live and die together. Without Oilpan, the templateDocumentHost
638 // is a manually managed backpointer from m_templateDocument. 609 // is a manually managed backpointer from m_templateDocument.
639 RawPtr<Document> m_templateDocumentHost; 610 RawPtr<Document> m_templateDocumentHost;
640 611
641 bool m_hasViewportUnits; 612 bool m_hasViewportUnits;
642 613
643 int m_styleRecalcElementCounter; 614 int m_styleRecalcElementCounter;
644 mutable DocumentLoadTiming m_documentLoadTiming; 615 mutable DocumentLoadTiming m_documentLoadTiming;
(...skipping 30 matching lines...) Expand all
675 } 646 }
676 647
677 } // namespace blink 648 } // namespace blink
678 649
679 #ifndef NDEBUG 650 #ifndef NDEBUG
680 // Outside the WebCore namespace for ease of invocation from gdb. 651 // Outside the WebCore namespace for ease of invocation from gdb.
681 void showLiveDocumentInstances(); 652 void showLiveDocumentInstances();
682 #endif 653 #endif
683 654
684 #endif // SKY_ENGINE_CORE_DOM_DOCUMENT_H_ 655 #endif // SKY_ENGINE_CORE_DOM_DOCUMENT_H_
OLDNEW
« no previous file with comments | « sky/engine/core/css/resolver/StyleResolverState.cpp ('k') | sky/engine/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698