Bug 239462 - Implement CSSTransformValue.is2D
Summary: Implement CSSTransformValue.is2D
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-04-18 12:44 PDT by Alex Christensen
Modified: 2022-04-19 13:23 PDT (History)
11 users (show)

See Also:


Attachments
Patch (46.77 KB, patch)
2022-04-18 13:19 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (71.08 KB, patch)
2022-04-18 15:30 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2022-04-18 12:44:40 PDT
Implement CSSTransformValue.is2D
Comment 1 Alex Christensen 2022-04-18 13:19:02 PDT
Created attachment 457819 [details]
Patch
Comment 2 Alex Christensen 2022-04-18 15:30:12 PDT
Created attachment 457831 [details]
Patch
Comment 3 EWS 2022-04-18 19:47:01 PDT
Committed r293005 (249744@main): <https://commits.webkit.org/249744@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 457831 [details].
Comment 4 Radar WebKit Bug Importer 2022-04-18 19:48:15 PDT
<rdar://problem/91934123>
Comment 5 Darin Adler 2022-04-19 13:23:42 PDT
Comment on attachment 457831 [details]
Patch

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

> Source/WebCore/css/typedom/numeric/CSSNumericType.h:80
> +    const std::optional<long>& valueForType(CSSNumericBaseType type) const

This seems like the wrong return type. Should just be std::optional<long>.

> Source/WebCore/css/typedom/transform/CSSPerspective.h:42
> +    static ExceptionOr<Ref<CSSPerspective>> create(CSSPerspectiveValue);

Why pass by value instead of by rvalue reference? I see this change throughout this patch and I don’t understand the rationale. For bindings, I guess both are the same, we will WTFMove from the local to the argument and then from the argument inside the function. But how did you decide this is the preferred style?

> Source/WebCore/css/typedom/transform/CSSTransformComponent.h:53
> +    CSSTransformComponent(Is2D is2D)

explicit

> Source/WebCore/css/typedom/transform/CSSTransformComponent.h:64
> -    bool m_is2D { false };
> +    Is2D m_is2D;

Why change the type of the data member?