RESOLVED FIXED 189990
[Web Animations] Ensure renderers with accelerated animations have layers
https://bugs.webkit.org/show_bug.cgi?id=189990
Summary [Web Animations] Ensure renderers with accelerated animations have layers
Antoine Quint
Reported 2018-09-26 02:53:53 PDT
[Web Animations] Ensure renderers with accelerated animations have layers
Attachments
Patch (8.61 KB, patch)
2018-09-26 03:07 PDT, Antoine Quint
no flags
Archive of layout-test-results from ews106 for mac-sierra-wk2 (3.23 MB, application/zip)
2018-09-26 04:12 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews100 for mac-sierra (2.49 MB, application/zip)
2018-09-26 04:15 PDT, EWS Watchlist
no flags
Patch (8.57 KB, patch)
2018-09-26 04:32 PDT, Antoine Quint
no flags
Patch (7.12 KB, patch)
2018-09-27 06:09 PDT, Antoine Quint
no flags
Patch (10.19 KB, patch)
2018-10-01 08:05 PDT, Antoine Quint
simon.fraser: review+
Antoine Quint
Comment 1 2018-09-26 03:00:12 PDT
We have done some work already in https://bugs.webkit.org/show_bug.cgi?id=189784 to prevent never-ending calls to DocumentTimeline::updateAnimations(). This was due to the change made for https://bugs.webkit.org/show_bug.cgi?id=186930 where we queued calls to updateAnimations() in KeyframeEffectReadOnly::applyPendingAcceleratedActions() while we were waiting for a renderer with a layer backing for a given animation target. Instead of doing this, we ought to ensure renderers always have a layer when they have an accelerated animation applied.
Radar WebKit Bug Importer
Comment 2 2018-09-26 03:00:49 PDT
Antoine Quint
Comment 3 2018-09-26 03:07:36 PDT
EWS Watchlist
Comment 4 2018-09-26 04:12:55 PDT
Comment on attachment 350852 [details] Patch Attachment 350852 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/9354714 New failing tests: transforms/3d/general/perspective-non-layer.html fast/table/overflow-table-collapsed-borders-section-self-painting-layer-painting.html fast/transforms/transform-on-inline.html fast/reflections/inline-crash.html fast/table/overflow-table-collapsed-borders-section-self-painting-layer-table-self-painting-layer.html
EWS Watchlist
Comment 5 2018-09-26 04:12:56 PDT
Created attachment 350853 [details] Archive of layout-test-results from ews106 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
EWS Watchlist
Comment 6 2018-09-26 04:15:37 PDT
Comment on attachment 350852 [details] Patch Attachment 350852 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/9354760 New failing tests: transforms/3d/general/perspective-non-layer.html fast/table/overflow-table-collapsed-borders-section-self-painting-layer-painting.html fast/transforms/transform-on-inline.html fast/reflections/inline-crash.html fast/table/overflow-table-collapsed-borders-section-self-painting-layer-table-self-painting-layer.html
EWS Watchlist
Comment 7 2018-09-26 04:15:39 PDT
Created attachment 350854 [details] Archive of layout-test-results from ews100 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-sierra Platform: Mac OS X 10.12.6
Antoine Quint
Comment 8 2018-09-26 04:32:00 PDT
zalan
Comment 9 2018-09-26 07:25:50 PDT
Comment on attachment 350856 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=350856&action=review > Source/WebCore/rendering/RenderBoxModelObject.cpp:2697 > + return timeline->runningAnimationsForElementAreAllAccelerated(*node); I hope this function is not going to show up in traces.
Antoine Quint
Comment 10 2018-09-26 07:34:18 PDT
Simon Fraser (smfr)
Comment 11 2018-09-26 11:33:38 PDT
Comment on attachment 350856 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=350856&action=review > Source/WebCore/rendering/RenderBox.h:57 > return isDocumentElementRenderer() || isPositioned() || createsGroup() || hasClipPath() || hasOverflowClip() > || hasTransformRelatedProperty() || hasHiddenBackface() || hasReflection() || style().specifiesColumns() > - || !style().hasAutoZIndex(); > + || !style().hasAutoZIndex() || hasRunningAcceleratedAnimations(); > } This is pretty hot code. I'm worried about perf impact. > Source/WebCore/rendering/RenderInline.h:123 > + bool requiresLayer() const override { return isInFlowPositioned() || createsGroup() || hasClipPath() || willChangeCreatesStackingContext() || hasRunningAcceleratedAnimations(); } This is pretty hot code. I'm worried about perf impact.
Antoine Quint
Comment 12 2018-09-26 12:31:48 PDT
I suppose we could set a flag on the RenderBoxModelObject to indicate that an accelerated animation is in progress as the accelerated actions are updated on the KeyframeEffectReadOnly. Then it would just be a bit to read on the RenderBoxModelObject.
Simon Fraser (smfr)
Comment 13 2018-09-26 12:56:24 PDT
We used to have a bit on the style, and removed it. I think for a time we also used to have a bit on renderers, and that was removed too (I can't find the patches).
Antoine Quint
Comment 14 2018-09-26 13:03:45 PDT
(In reply to Simon Fraser (smfr) from comment #13) > We used to have a bit on the style, and removed it. I think for a time we > also used to have a bit on renderers, and that was removed too (I can't find > the patches). Do you have a preference between the two?
Antoine Quint
Comment 15 2018-09-27 06:09:34 PDT
Reopening to attach new patch.
Antoine Quint
Comment 16 2018-09-27 06:09:36 PDT
zalan
Comment 17 2018-09-27 10:10:16 PDT
Comment on attachment 350956 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=350956&action=review > Source/WebCore/rendering/RenderBoxModelObject.h:333 > + bool m_hasRunningAcceleratedAnimations { false }; smfr, what's our current (memory)policy about adding bitfield like members to RenderObject subclasses? Should this be part of RenderObject's boolean bitfield (or even rare data)?
Antoine Quint
Comment 18 2018-10-01 08:05:58 PDT
Antoine Quint
Comment 19 2018-10-01 10:44:46 PDT
Note You need to log in before you can comment on or make changes to this bug.