[Webkit-unassigned] [Bug 226369] REGRESSION(r276882): Style not invalidated correctly for media queries in shadow trees that share style

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 1 09:17:16 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=226369

Sam Weinig <sam at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #430197|review?                     |review+
              Flags|                            |

--- Comment #4 from Sam Weinig <sam at webkit.org> ---
Comment on attachment 430197
  --> https://bugs.webkit.org/attachment.cgi?id=430197
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=430197&action=review

> Source/WebCore/style/StyleScope.cpp:684
> +    auto resolverScopes = collectResolverScopes();
> +    for (auto& resolverAndScopes : resolverScopes) {
> +        auto& resolver = resolverAndScopes.key.get();
> +        auto& scopes = resolverAndScopes.value;

I think you can write this:

for (auto& [resolver, scopes] : collectResolverScopes()) {

(though you will then have to call .get() on the resolver below).

> Source/WebCore/style/StyleScope.cpp:691
> +        for (auto& scope : scopes) {

As these scopes are WeakPtrs, what is guaranteeing they are alive? Do they really have to be WeakPtrs? Given how short lived this Vector is, could they Ref<>s? Should you be null checking them?

-- 
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/20210601/37820703/attachment-0001.htm>


More information about the webkit-unassigned mailing list