RESOLVED FIXED Bug 235503
Pass the Document through bindings to KeyframeEffect::setKeyframes()
https://bugs.webkit.org/show_bug.cgi?id=235503
Summary Pass the Document through bindings to KeyframeEffect::setKeyframes()
Antoine Quint
Reported 2022-01-24 01:33:42 PST
Pass the Document through bindings to KeyframeEffect::setKeyframes()
Attachments
Patch (16.41 KB, patch)
2022-01-24 01:41 PST, Antoine Quint
sam: review+
ews-feeder: commit-queue-
Antoine Quint
Comment 1 2022-01-24 01:41:15 PST
Sam Weinig
Comment 2 2022-01-24 09:07:02 PST
Comment on attachment 449790 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=449790&action=review > Source/WebCore/animation/KeyframeEffect.cpp:210 > - auto* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(&lexicalGlobalObject)->scriptExecutionContext(); > - if (is<Document>(scriptExecutionContext)) { > - if (downcast<Document>(*scriptExecutionContext).settings().webAnimationsCompositeOperationsEnabled()) > - baseProperties.composite = baseKeyframe.composite; > - } > + if (document.settings().webAnimationsCompositeOperationsEnabled()) > + baseProperties.composite = baseKeyframe.composite; This seems right, but in future, you can actually get settings directly from the ScriptExecutionContext via the settingsValues() accessor.
Antoine Quint
Comment 3 2022-01-24 10:34:56 PST
(In reply to Sam Weinig from comment #2) > Comment on attachment 449790 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=449790&action=review > > > Source/WebCore/animation/KeyframeEffect.cpp:210 > > - auto* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(&lexicalGlobalObject)->scriptExecutionContext(); > > - if (is<Document>(scriptExecutionContext)) { > > - if (downcast<Document>(*scriptExecutionContext).settings().webAnimationsCompositeOperationsEnabled()) > > - baseProperties.composite = baseKeyframe.composite; > > - } > > + if (document.settings().webAnimationsCompositeOperationsEnabled()) > > + baseProperties.composite = baseKeyframe.composite; > > This seems right, but in future, you can actually get settings directly from > the ScriptExecutionContext via the settingsValues() accessor. Good to know! This patch could have just passed the ScriptExecutionContext in then, but as it turns out we also needed a Document further down to establish a CSSParserContext so it turned out to be handy.
Antoine Quint
Comment 4 2022-01-24 10:41:33 PST
Radar WebKit Bug Importer
Comment 5 2022-01-24 10:42:19 PST
Antoine Quint
Comment 6 2022-01-24 11:09:28 PST
Note You need to log in before you can comment on or make changes to this bug.