Page MenuHomePhabricator

Bug 1601865 - Fix scrollbar cache slices having extra primitives.
ClosedPublic

Authored by gw on Feb 4 2020, 3:04 AM.

Details

Summary

There's two potential cases handled by this patch:

(1) A scrollbar container followed by another scrollbar container.

In this case, we need to ensure these are placed into separate
clusters, even though the cluster flags otherwise match, to
ensure that slice creation will see the two clusters.

(2) If a fixed position scroll root trails a scrollbar container.

In this case, ensure that a scrollbar contains marks the
cluster flags to create a slice straight after the scrollbar,
to avoid other primitives with the same scroll root sneaking
into the scrollbar container.

Diff Detail

Repository
rMOZILLACENTRAL mozilla-central
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

gw created this revision.Feb 4 2020, 3:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 4 2020, 3:04 AM
phab-bot requested review of this revision.Feb 4 2020, 3:04 AM
phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: Restricted Project.
nical accepted this revision.Feb 4 2020, 9:21 AM
This revision is now accepted and ready to land.Feb 4 2020, 9:21 AM

Small typo in the commit:

In this case, ensure that a scrollbar container marks the cluster flag

Cool fix, thanks a lot for going back and getting to the bottom of it!

gfx/wr/webrender/src/scene_building.rs
3609

I'm slightly worried that sooner or later somebody will trip up on the assumption that cluster_flags and cluster.flags are the same thing. But I don't know what to do about that worry :)

3637

Should we skip doing this if the above if was true? The only possible outcome is setting CREATE_PICTURE_CACHE_PRE which we already have (we lost the short-circuit-|| from the original).