[webkit-reviews] review denied: [Bug 229699] Addition of CSSNumericFactory in CSS Typed OM : [Attachment 436854] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 31 11:17:40 PDT 2021


Alex Christensen <achristensen at apple.com> has denied  review:
Bug 229699: Addition of CSSNumericFactory in CSS Typed OM
https://bugs.webkit.org/show_bug.cgi?id=229699

Attachment 436854: Patch

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




--- Comment #5 from Alex Christensen <achristensen at apple.com> ---
Comment on attachment 436854
  --> https://bugs.webkit.org/attachment.cgi?id=436854
Patch

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

Looks like there's still one test failing.

> Source/WebCore/css/typedom/CSSNumericFactory.cpp:2
> + * Copyright (C) 2018 Apple Inc. All rights reserved.

2021

> Source/WebCore/css/typedom/CSSNumericFactory.cpp:37
> +CSSNumericFactory* CSSNumericFactory::from(DOMCSSNamespace& css)

This should probably return a CSSNumericFactory& because it makes a new
37CSSNumericFactory if there isn't one already.

> Source/WebCore/css/typedom/CSSNumericFactory.h:41
> +class CSSNumericFactory final : public Supplement<DOMCSSNamespace> {

I've never been a fan of the whole Supplementable/Supplement pattern which does
a hash lookup just to access a member variable.  I think just making a
std::unique_ptr instead of a SupplementMap would be cleaner, but for some
reason DOMCSSNamespace is already Supplementable so this is just following an
existing pattern.  Maybe we shouldn't change it in this patch.

> Source/WebCore/css/typedom/CSSNumericFactory.h:46
> +    static Ref<CSSUnitValue> number(double value) { return
CSSUnitValue::create(value, "number"); }

Can someone make custom units, or could we change CSSUnitValue::m_unit to be an
enum class instead of a String?

> Source/WebCore/css/typedom/CSSNumericFactory.idl:1
> +partial namespace CSS {

This needs a copyright.


More information about the webkit-reviews mailing list