[Webkit-unassigned] [Bug 205264] Resolve dynamic media queries without reconstructing RuleSets
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Dec 16 07:31:25 PST 2019
https://bugs.webkit.org/show_bug.cgi?id=205264
--- Comment #3 from Antti Koivisto <koivisto at iki.fi> ---
> @media (width: 0) {
> .myclass * { ... }
> }
>
> Causes "myclass" changes to restyle the whole subtree even if the feature
> doesn't match. Seems it probably would, but it might be ok.
With this patch we still just re-resolve everything. I have a followup that will construct invalidation rulesets for each query. We'll only invalidate the associated elements and only when the query result changes.
> There's nothing preventing you in the future to take the same approach for
> keyframes and font-face and such, right? (as in, track them in the dynamic
> results, and enable / disable them on demand).
Absolutely. This is just a shortcut to get the common case covered (none of the sites I tried hit this case).
> > Source/WebCore/style/RuleSet.h:80
> > + Vector<size_t> affectedRulePositions { };
>
> nit: I think you can just use Vector<size_t> affectedRulePositions; and same
> with the other vectors here.
Explicit { } here allows compact struct initialisation
auto mediaQueryCollector = MediaQueryCollector { evaluator, canUseDynamicMediaQueryResolution };
without providing explicit constructor.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20191216/2719f368/attachment.htm>
More information about the webkit-unassigned
mailing list