[webkit-reviews] review granted: [Bug 236096] [CSS Container Queries] Add ContainerQueryEvaluator : [Attachment 451091] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 7 07:39:05 PST 2022


Darin Adler <darin at apple.com> has granted Antti Koivisto <koivisto at iki.fi>'s
request for review:
Bug 236096: [CSS Container Queries] Add ContainerQueryEvaluator
https://bugs.webkit.org/show_bug.cgi?id=236096

Attachment 451091: Patch

https://bugs.webkit.org/attachment.cgi?id=451091&action=review




--- Comment #3 from Darin Adler <darin at apple.com> ---
Comment on attachment 451091
  --> https://bugs.webkit.org/attachment.cgi?id=451091
Patch

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

> Source/WebCore/style/ContainerQueryEvaluator.cpp:2
> + * Copyright (C) 2021 Apple Inc. All rights reserved.

2022?

> Source/WebCore/style/ContainerQueryEvaluator.h:2
> + * Copyright (C) 2021 Apple Inc. All rights reserved.

2022?

> Source/WebCore/style/ContainerQueryEvaluator.h:35
> +    ContainerQueryEvaluator(const Vector<Ref<const Element>>& containers);

Can this take a Span instead of a const Vector&? Should be just as efficient
for creating a new vector copy and can pass things without having to create a
vector.

> Source/WebCore/style/ElementRuleCollector.cpp:513
> +    ContainerQueryEvaluator
evaluator(m_selectorMatchingState->queryContainers);

Here we copy the vector of containers but we don’t need to. I suppose it’s
safer but it’s also an extra malloc/delete and reference count churn for all
the containers.


More information about the webkit-reviews mailing list