[webkit-reviews] review granted: [Bug 226369] REGRESSION(r276882): Style not invalidated correctly for media queries in shadow trees that share style : [Attachment 430197] patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jun 1 09:17:16 PDT 2021
Sam Weinig <sam at webkit.org> has granted Antti Koivisto <koivisto at iki.fi>'s
request for review:
Bug 226369: REGRESSION(r276882): Style not invalidated correctly for media
queries in shadow trees that share style
https://bugs.webkit.org/show_bug.cgi?id=226369
Attachment 430197: patch
https://bugs.webkit.org/attachment.cgi?id=430197&action=review
--- 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?
More information about the webkit-reviews
mailing list