Changeset 233667 in webkit
- Timestamp:
- Jul 9, 2018, 4:52:54 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
- 2 copied
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/DocumentTimeline/constructor-expected.txt (modified) (1 diff)
-
Source/WebCore/CMakeLists.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/DerivedSources.make (modified) (1 diff)
-
Source/WebCore/Sources.txt (modified) (1 diff)
-
Source/WebCore/WebCore.xcodeproj/project.pbxproj (modified) (8 diffs)
-
Source/WebCore/animation/DocumentTimeline.cpp (modified) (3 diffs)
-
Source/WebCore/animation/DocumentTimeline.h (modified) (4 diffs)
-
Source/WebCore/animation/DocumentTimeline.idl (modified) (1 diff)
-
Source/WebCore/animation/DocumentTimelineOptions.h (copied) (copied from trunk/Source/WebCore/animation/DocumentTimeline.idl ) (2 diffs)
-
Source/WebCore/animation/DocumentTimelineOptions.idl (copied) (copied from trunk/Source/WebCore/animation/DocumentTimeline.idl ) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r233666 r233667 1 2018-07-09 Antoine Quint <graouts@apple.com> 2 3 [Web Animations] Make WPT test at interfaces/DocumentTimeline/constructor.html pass reliably 4 https://bugs.webkit.org/show_bug.cgi?id=186498 5 <rdar://problem/41000205> 6 7 Reviewed by Dean Jackson. 8 9 Mark 4 new WPT progressions. 10 11 * web-platform-tests/web-animations/interfaces/DocumentTimeline/constructor-expected.txt: 12 1 13 2018-07-09 Antoine Quint <graouts@apple.com> 2 14 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/DocumentTimeline/constructor-expected.txt
r227598 r233667 1 1 2 FAIL An origin time of zero is used when none is supplied function is not a constructor (evaluating 'new DocumentTimeline()') 3 FAIL A zero origin time produces a document timeline with a current time identical to the default document timeline function is not a constructor (evaluating 'new DocumentTimeline({ originTime: 0 })') 4 FAIL A positive origin time makes the document timeline's current time lag behind the default document timeline function is not a constructor (evaluating 'new DocumentTimeline({ originTime: 10 * MS_PER_SEC })') 5 FAIL A negative origin time makes the document timeline's current time run ahead of the default document timeline function is not a constructor (evaluating 'new DocumentTimeline({ originTime: -10 * MS_PER_SEC })') 2 PASS An origin time of zero is used when none is supplied 3 PASS A zero origin time produces a document timeline with a current time identical to the default document timeline 4 PASS A positive origin time makes the document timeline's current time lag behind the default document timeline 5 PASS A negative origin time makes the document timeline's current time run ahead of the default document timeline 6 6 -
trunk/Source/WebCore/CMakeLists.txt
r233443 r233667 455 455 animation/ComputedTimingProperties.idl 456 456 animation/DocumentTimeline.idl 457 animation/DocumentTimelineOptions.idl 457 458 animation/FillMode.idl 458 459 animation/IterationCompositeOperation.idl -
trunk/Source/WebCore/ChangeLog
r233666 r233667 1 2018-07-09 Antoine Quint <graouts@apple.com> 2 3 [Web Animations] Make WPT test at interfaces/DocumentTimeline/constructor.html pass reliably 4 https://bugs.webkit.org/show_bug.cgi?id=186498 5 <rdar://problem/41000205> 6 7 Reviewed by Dean Jackson. 8 9 Add a Constructor to the DocumentTimeline IDL to match the spec and ensure we respect the provided 10 origin time. To ensure all DocumentTimeline instances report matching current times, we read the 11 current time from the "main" document timeline, the one created by the Document automatically. 12 13 * CMakeLists.txt: 14 * DerivedSources.make: 15 * Sources.txt: 16 * WebCore.xcodeproj/project.pbxproj: 17 * animation/DocumentTimeline.cpp: 18 (WebCore::DocumentTimeline::create): 19 (WebCore::DocumentTimeline::DocumentTimeline): 20 (WebCore::DocumentTimeline::currentTime): 21 * animation/DocumentTimeline.h: 22 * animation/DocumentTimeline.idl: 23 * animation/DocumentTimelineOptions.h: 24 * animation/DocumentTimelineOptions.idl: 25 1 26 2018-07-09 Antoine Quint <graouts@apple.com> 2 27 -
trunk/Source/WebCore/DerivedSources.make
r233443 r233667 375 375 $(WebCore)/animation/CSSTransition.idl \ 376 376 $(WebCore)/animation/DocumentTimeline.idl \ 377 $(WebCore)/animation/DocumentTimelineOptions.idl \ 377 378 $(WebCore)/animation/FillMode.idl \ 378 379 $(WebCore)/animation/IterationCompositeOperation.idl \ -
trunk/Source/WebCore/Sources.txt
r233520 r233667 2497 2497 JSCustomEvent.cpp 2498 2498 JSDocumentTimeline.cpp 2499 JSDocumentTimelineOptions.cpp 2499 2500 JSDOMApplicationCache.cpp 2500 2501 JSDOMCSSNamespace.cpp -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r233520 r233667 2028 2028 715AD7212050513F00D592DC /* CSSTransition.h in Headers */ = {isa = PBXBuildFile; fileRef = 7123C186204739BA00789392 /* CSSTransition.h */; }; 2029 2029 716E55B020DBABF100F0CF29 /* DocumentAnimationScheduler.h in Headers */ = {isa = PBXBuildFile; fileRef = 716E55AD20DBABDC00F0CF29 /* DocumentAnimationScheduler.h */; settings = {ATTRIBUTES = (Private, ); }; }; 2030 71729F7B20F3BA4900801CE6 /* DocumentTimelineOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 71729F7A20F3BA3A00801CE6 /* DocumentTimelineOptions.h */; settings = {ATTRIBUTES = (Private, ); }; }; 2031 71729F7E20F3BB4700801CE6 /* JSDocumentTimelineOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 71729F7C20F3BAB900801CE6 /* JSDocumentTimelineOptions.h */; }; 2030 2032 71A1B6081DEE5AD70073BCFB /* modern-media-controls-localized-strings.js in Resources */ = {isa = PBXBuildFile; fileRef = 71A1B6061DEE5A820073BCFB /* modern-media-controls-localized-strings.js */; }; 2031 2033 71A57DF2154BE25C0009D120 /* SVGPathUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 71A57DF0154BE25C0009D120 /* SVGPathUtilities.h */; }; … … 9106 9108 716FA0FF1DB26591007323CC /* volume-slider.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = "volume-slider.css"; sourceTree = "<group>"; }; 9107 9109 716FA1001DB26591007323CC /* volume-slider.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = "volume-slider.js"; sourceTree = "<group>"; }; 9110 71729F7920F3BA3900801CE6 /* DocumentTimelineOptions.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DocumentTimelineOptions.idl; sourceTree = "<group>"; }; 9111 71729F7A20F3BA3A00801CE6 /* DocumentTimelineOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentTimelineOptions.h; sourceTree = "<group>"; }; 9112 71729F7C20F3BAB900801CE6 /* JSDocumentTimelineOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDocumentTimelineOptions.h; sourceTree = "<group>"; }; 9113 71729F7D20F3BABA00801CE6 /* JSDocumentTimelineOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDocumentTimelineOptions.cpp; sourceTree = "<group>"; }; 9108 9114 7177E2461DB80D2F00919A0B /* media-controller-support.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = "media-controller-support.js"; sourceTree = "<group>"; }; 9109 9115 7177E2471DB80D2F00919A0B /* mute-support.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = "mute-support.js"; sourceTree = "<group>"; }; … … 15812 15818 71025EDB1F99F1A8004A250C /* JSDocumentTimeline.cpp */, 15813 15819 71025EDC1F99F1A8004A250C /* JSDocumentTimeline.h */, 15820 71729F7D20F3BABA00801CE6 /* JSDocumentTimelineOptions.cpp */, 15821 71729F7C20F3BAB900801CE6 /* JSDocumentTimelineOptions.h */, 15814 15822 712BE4841FE867C2002031CC /* JSFillMode.cpp */, 15815 15823 712BE4851FE86818002031CC /* JSFillMode.h */, … … 19533 19541 71025EC51F99F096004A250C /* DocumentTimeline.h */, 19534 19542 71025ECA1F99F096004A250C /* DocumentTimeline.idl */, 19543 71729F7A20F3BA3A00801CE6 /* DocumentTimelineOptions.h */, 19544 71729F7920F3BA3900801CE6 /* DocumentTimelineOptions.idl */, 19535 19545 712BE4811FE865D4002031CC /* FillMode.h */, 19536 19546 712BE4821FE865D5002031CC /* FillMode.idl */, … … 27545 27555 A80E6D000A1989CA007FB8C5 /* CSSPageRule.h in Headers */, 27546 27556 946D372E1D6CB2940077084F /* CSSParser.h in Headers */, 27557 E4A7995220EE4B1400C19568 /* CSSParserContext.h in Headers */, 27547 27558 949C77011D6E1D9800C0DE4F /* CSSParserFastPaths.h in Headers */, 27548 27559 946D37441D6CF7B20077084F /* CSSParserIdioms.h in Headers */, … … 27718 27729 0B90561A0F2578BF0095FF6A /* DocumentThreadableLoader.h in Headers */, 27719 27730 71025ED01F99F0CE004A250C /* DocumentTimeline.h in Headers */, 27731 71729F7B20F3BA4900801CE6 /* DocumentTimelineOptions.h in Headers */, 27720 27732 86D982F7125C154000AD9E3D /* DocumentTiming.h in Headers */, 27721 27733 A8185F3909765766005826D9 /* DocumentType.h in Headers */, … … 28511 28523 1A494EDF0A123F4C00FDAFC1 /* JSDocumentFragment.h in Headers */, 28512 28524 71025EE01F99F1EC004A250C /* JSDocumentTimeline.h in Headers */, 28525 71729F7E20F3BB4700801CE6 /* JSDocumentTimelineOptions.h in Headers */, 28513 28526 65DF31F609D1CC60000BE325 /* JSDocumentType.h in Headers */, 28514 28527 7C57BFE71EDE2F6100534A48 /* JSDOMAbstractOperations.h in Headers */, … … 28795 28808 E1ADEDDA0E76BD93004A1A5E /* JSMessagePort.h in Headers */, 28796 28809 A86629D109DA2B48009633A5 /* JSMouseEvent.h in Headers */, 28797 E4A7995220EE4B1400C19568 /* CSSParserContext.h in Headers */,28798 28810 830A36BD1DAC5FAD006D7D09 /* JSMouseEventInit.h in Headers */, 28799 28811 65DF31FC09D1CC60000BE325 /* JSMutationEvent.h in Headers */, -
trunk/Source/WebCore/animation/DocumentTimeline.cpp
r233585 r233667 43 43 Ref<DocumentTimeline> DocumentTimeline::create(Document& document) 44 44 { 45 return adoptRef(*new DocumentTimeline(document)); 46 } 47 48 DocumentTimeline::DocumentTimeline(Document& document) 45 return adoptRef(*new DocumentTimeline(document, 0_s)); 46 } 47 48 Ref<DocumentTimeline> DocumentTimeline::create(Document& document, DocumentTimelineOptions&& options) 49 { 50 return adoptRef(*new DocumentTimeline(document, Seconds::fromMilliseconds(options.originTime))); 51 } 52 53 DocumentTimeline::DocumentTimeline(Document& document, Seconds originTime) 49 54 : AnimationTimeline(DocumentTimelineClass) 50 55 , m_document(&document) 56 , m_originTime(originTime) 51 57 , m_animationScheduleTimer(*this, &DocumentTimeline::animationScheduleTimerFired) 52 58 #if !USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) … … 134 140 if (m_paused || m_isSuspended || !m_document || !m_document->domWindow()) 135 141 return AnimationTimeline::currentTime(); 142 143 if (auto* mainDocumentTimeline = m_document->existingTimeline()) { 144 if (mainDocumentTimeline != this) { 145 if (auto mainDocumentTimelineCurrentTime = mainDocumentTimeline->currentTime()) 146 return mainDocumentTimelineCurrentTime.value() - m_originTime; 147 return std::nullopt; 148 } 149 } 136 150 137 151 #if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) … … 166 180 }); 167 181 } 168 return m_cachedCurrentTime ;182 return m_cachedCurrentTime.value() - m_originTime; 169 183 } 170 184 -
trunk/Source/WebCore/animation/DocumentTimeline.h
r233394 r233667 27 27 28 28 #include "AnimationTimeline.h" 29 #include "DocumentTimelineOptions.h" 29 30 #include "GenericTaskQueue.h" 30 31 #include "Timer.h" … … 40 41 public: 41 42 static Ref<DocumentTimeline> create(Document&); 43 static Ref<DocumentTimeline> create(Document&, DocumentTimelineOptions&&); 42 44 ~DocumentTimeline(); 43 45 … … 75 77 76 78 private: 77 DocumentTimeline(Document& );79 DocumentTimeline(Document&, Seconds); 78 80 79 81 void scheduleInvalidationTaskIfNeeded(); … … 87 89 88 90 RefPtr<Document> m_document; 91 Seconds m_originTime; 89 92 bool m_paused { false }; 90 93 bool m_isSuspended { false }; -
trunk/Source/WebCore/animation/DocumentTimeline.idl
r223779 r233667 25 25 26 26 [ 27 EnabledAtRuntime=WebAnimations 27 EnabledAtRuntime=WebAnimations, 28 Exposed=Window, 29 ConstructorCallWith=Document, 30 Constructor (optional DocumentTimelineOptions options) 28 31 ] interface DocumentTimeline : AnimationTimeline { 29 32 }; -
trunk/Source/WebCore/animation/DocumentTimelineOptions.h
r233666 r233667 1 1 /* 2 * Copyright (C) 201 7Apple Inc. All rights reserved.2 * Copyright (C) 2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 [ 27 EnabledAtRuntime=WebAnimations 28 ] interface DocumentTimeline : AnimationTimeline { 26 #pragma once 27 28 #include "DOMHighResTimeStamp.h" 29 30 namespace WebCore { 31 32 struct DocumentTimelineOptions { 33 DOMHighResTimeStamp originTime; 29 34 }; 35 36 } // namespace WebCore -
trunk/Source/WebCore/animation/DocumentTimelineOptions.idl
r233666 r233667 1 1 /* 2 * Copyright (C) 201 7Apple Inc. All rights reserved.2 * Copyright (C) 2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 [ 27 EnabledAtRuntime=WebAnimations 28 ] interface DocumentTimeline : AnimationTimeline { 26 typedef double DOMHighResTimeStamp; 27 28 dictionary DocumentTimelineOptions { 29 DOMHighResTimeStamp originTime = 0; 29 30 };
Note:
See TracChangeset
for help on using the changeset viewer.