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

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

Issue 2869183002: Initial implementation of WorkletAnimation (Closed)
Patch Set: DCHECK for threaded animation support Created 3 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, 2010, 2012 Apple Inc. All 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All
7 * rights reserved. 7 * rights reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 class StyleResolver; 164 class StyleResolver;
165 class StyleSheetList; 165 class StyleSheetList;
166 class TextAutosizer; 166 class TextAutosizer;
167 class Touch; 167 class Touch;
168 class TouchList; 168 class TouchList;
169 class TransformSource; 169 class TransformSource;
170 class TreeWalker; 170 class TreeWalker;
171 class V8NodeFilterCondition; 171 class V8NodeFilterCondition;
172 class VisitedLinkState; 172 class VisitedLinkState;
173 class WebMouseEvent; 173 class WebMouseEvent;
174 class WorkletAnimationBase;
175 class WorkletAnimationController;
174 struct AnnotatedRegionValue; 176 struct AnnotatedRegionValue;
175 struct FocusParams; 177 struct FocusParams;
176 struct IconURL; 178 struct IconURL;
177 179
178 using MouseEventWithHitTestResults = EventWithHitTestResults<WebMouseEvent>; 180 using MouseEventWithHitTestResults = EventWithHitTestResults<WebMouseEvent>;
179 using ExceptionCode = int; 181 using ExceptionCode = int;
180 182
181 enum NodeListInvalidationType { 183 enum NodeListInvalidationType {
182 kDoNotInvalidateOnAttributeChanges = 0, 184 kDoNotInvalidateOnAttributeChanges = 0,
183 kInvalidateOnClassAttrChange, 185 kInvalidateOnClassAttrChange,
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after
1127 float rotation_angle, 1129 float rotation_angle,
1128 float force) const; 1130 float force) const;
1129 TouchList* createTouchList(HeapVector<Member<Touch>>&) const; 1131 TouchList* createTouchList(HeapVector<Member<Touch>>&) const;
1130 1132
1131 const DocumentTiming& GetTiming() const { return document_timing_; } 1133 const DocumentTiming& GetTiming() const { return document_timing_; }
1132 1134
1133 int RequestAnimationFrame(FrameRequestCallback*); 1135 int RequestAnimationFrame(FrameRequestCallback*);
1134 void CancelAnimationFrame(int id); 1136 void CancelAnimationFrame(int id);
1135 void ServiceScriptedAnimations(double monotonic_animation_start_time); 1137 void ServiceScriptedAnimations(double monotonic_animation_start_time);
1136 1138
1139 WorkletAnimationController& GetWorkletAnimationController() {
1140 return *worklet_animation_controller_;
1141 }
1142 void RegisterWorkletAnimation(WorkletAnimationBase*);
majidvp 2017/06/06 16:04:27 nit: should take a const ref.
smcgruer 2017/06/07 18:23:25 Made it take a ref (in WorkletAnimationController)
1143 void DeregisterWorkletAnimation(WorkletAnimationBase*);
1144
1137 int RequestIdleCallback(IdleRequestCallback*, const IdleRequestOptions&); 1145 int RequestIdleCallback(IdleRequestCallback*, const IdleRequestOptions&);
1138 void CancelIdleCallback(int id); 1146 void CancelIdleCallback(int id);
1139 1147
1140 EventTarget* ErrorEventTarget() final; 1148 EventTarget* ErrorEventTarget() final;
1141 void ExceptionThrown(ErrorEvent*) final; 1149 void ExceptionThrown(ErrorEvent*) final;
1142 1150
1143 void InitDNSPrefetch(); 1151 void InitDNSPrefetch();
1144 1152
1145 bool IsInDocumentWrite() const { return write_recursion_depth_ > 0; } 1153 bool IsInDocumentWrite() const { return write_recursion_depth_ > 0; }
1146 1154
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
1647 TaskRunnerTimer<Document> element_data_cache_clear_timer_; 1655 TaskRunnerTimer<Document> element_data_cache_clear_timer_;
1648 1656
1649 Member<ElementDataCache> element_data_cache_; 1657 Member<ElementDataCache> element_data_cache_;
1650 1658
1651 using LocaleIdentifierToLocaleMap = 1659 using LocaleIdentifierToLocaleMap =
1652 HashMap<AtomicString, std::unique_ptr<Locale>>; 1660 HashMap<AtomicString, std::unique_ptr<Locale>>;
1653 LocaleIdentifierToLocaleMap locale_cache_; 1661 LocaleIdentifierToLocaleMap locale_cache_;
1654 1662
1655 Member<DocumentTimeline> timeline_; 1663 Member<DocumentTimeline> timeline_;
1656 Member<CompositorPendingAnimations> compositor_pending_animations_; 1664 Member<CompositorPendingAnimations> compositor_pending_animations_;
1665 Member<WorkletAnimationController> worklet_animation_controller_;
1657 1666
1658 Member<Document> template_document_; 1667 Member<Document> template_document_;
1659 Member<Document> template_document_host_; 1668 Member<Document> template_document_host_;
1660 1669
1661 TaskRunnerTimer<Document> did_associate_form_controls_timer_; 1670 TaskRunnerTimer<Document> did_associate_form_controls_timer_;
1662 1671
1663 HeapHashSet<Member<SVGUseElement>> use_elements_needing_update_; 1672 HeapHashSet<Member<SVGUseElement>> use_elements_needing_update_;
1664 1673
1665 DOMTimerCoordinator timers_; 1674 DOMTimerCoordinator timers_;
1666 1675
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
1741 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); 1750 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true);
1742 1751
1743 } // namespace blink 1752 } // namespace blink
1744 1753
1745 #ifndef NDEBUG 1754 #ifndef NDEBUG
1746 // Outside the WebCore namespace for ease of invocation from gdb. 1755 // Outside the WebCore namespace for ease of invocation from gdb.
1747 CORE_EXPORT void showLiveDocumentInstances(); 1756 CORE_EXPORT void showLiveDocumentInstances();
1748 #endif 1757 #endif
1749 1758
1750 #endif // Document_h 1759 #endif // Document_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698