WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
216374
[Repaint] RenderLayerModelObject::styleWillChange may issue redundant repaint
https://bugs.webkit.org/show_bug.cgi?id=216374
Summary
[Repaint] RenderLayerModelObject::styleWillChange may issue redundant repaint
zalan
Reported
2020-09-10 12:19:36 PDT
by calling layer()->repaintIncludingDescendants()
Attachments
Patch
(9.55 KB, patch)
2020-09-10 12:26 PDT
,
zalan
no flags
Details
Formatted Diff
Diff
Patch
(9.53 KB, patch)
2020-09-10 14:51 PDT
,
zalan
no flags
Details
Formatted Diff
Diff
Patch
(9.66 KB, patch)
2020-09-10 15:10 PDT
,
zalan
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2020-09-10 12:20:05 PDT
<
rdar://problem/68657490
>
zalan
Comment 2
2020-09-10 12:26:40 PDT
Created
attachment 408467
[details]
Patch
zalan
Comment 3
2020-09-10 12:27:15 PDT
EWS testing first.
Simon Fraser (smfr)
Comment 4
2020-09-10 12:57:03 PDT
Comment on
attachment 408467
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=408467&action=review
> Source/WebCore/rendering/RenderElement.cpp:389 > + enum RepaintCoverage { None, RendererOnly, RendererAndDescendantsRenderersWithLayers };
RepaintCoverage is a bit ambiguous; it's not clear if it's "repaints done" or "repaints that need to be done". Maybe call it RequiredRepaint?
> Source/WebCore/rendering/RenderElement.cpp:400 > + // When a layout hint happens, we do a repaint of the layer, since the layer could end up being destroyed.
"layout hint" seems like old terminology.
> Source/WebCore/rendering/RenderElement.cpp:401 > + auto layerMayGetDestroyed = oldStyle.position() != newStyle.position() || oldStyle.usedZIndex() != newStyle.usedZIndex() || oldStyle.clip() != newStyle.clip() || oldStyle.hasClip() != newStyle.hasClip()
We can clearly do a better job of testing which style changes will result in the layer actually being destroyed.
zalan
Comment 5
2020-09-10 14:17:48 PDT
(In reply to Simon Fraser (smfr) from
comment #4
)
> Comment on
attachment 408467
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=408467&action=review
> > > Source/WebCore/rendering/RenderElement.cpp:389 > > + enum RepaintCoverage { None, RendererOnly, RendererAndDescendantsRenderersWithLayers }; > > RepaintCoverage is a bit ambiguous; it's not clear if it's "repaints done" > or "repaints that need to be done". Maybe call it RequiredRepaint?
Yeah, that sounds better.
> > > Source/WebCore/rendering/RenderElement.cpp:400 > > + // When a layout hint happens, we do a repaint of the layer, since the layer could end up being destroyed. > > "layout hint" seems like old terminology.
Will remove.
> > > Source/WebCore/rendering/RenderElement.cpp:401 > > + auto layerMayGetDestroyed = oldStyle.position() != newStyle.position() || oldStyle.usedZIndex() != newStyle.usedZIndex() || oldStyle.clip() != newStyle.clip() || oldStyle.hasClip() != newStyle.hasClip() > > We can clearly do a better job of testing which style changes will result in > the layer actually being destroyed.
I am sure we can. I don't think it should be part of this patch though.
zalan
Comment 6
2020-09-10 14:51:24 PDT
Created
attachment 408479
[details]
Patch
Simon Fraser (smfr)
Comment 7
2020-09-10 14:57:53 PDT
Comment on
attachment 408479
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=408479&action=review
> Source/WebCore/rendering/RenderElement.cpp:401 > + auto layerMayGetDestroyed = oldStyle.position() != newStyle.position() || oldStyle.usedZIndex() != newStyle.usedZIndex() || oldStyle.clip() != newStyle.clip() || oldStyle.hasClip() != newStyle.hasClip() > + || oldStyle.hasAutoUsedZIndex() != newStyle.hasAutoUsedZIndex() || oldStyle.opacity() != newStyle.opacity() || oldStyle.transform() != newStyle.transform() || oldStyle.filter() != newStyle.filter();
I prefer the more wrapped version but ¯\_(ツ)_/¯
zalan
Comment 8
2020-09-10 15:10:45 PDT
Created
attachment 408482
[details]
Patch
EWS
Comment 9
2020-09-10 17:32:50 PDT
Committed
r266901
: <
https://trac.webkit.org/changeset/266901
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 408482
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug