Bug 190657 - Parse paint() and store paint callbacks for CSS Painting API
Summary: Parse paint() and store paint callbacks for CSS Painting API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Justin Michaud
URL:
Keywords: InRadar
Depends on:
Blocks: 190217
  Show dependency treegraph
 
Reported: 2018-10-16 22:37 PDT by Justin Michaud
Modified: 2018-10-18 02:01 PDT (History)
9 users (show)

See Also:


Attachments
Patch (25.22 KB, patch)
2018-10-16 23:10 PDT, Justin Michaud
no flags Details | Formatted Diff | Diff
Patch (24.71 KB, patch)
2018-10-17 10:53 PDT, Justin Michaud
no flags Details | Formatted Diff | Diff
Patch (25.29 KB, patch)
2018-10-17 15:26 PDT, Justin Michaud
no flags Details | Formatted Diff | Diff
Patch (25.31 KB, patch)
2018-10-17 15:51 PDT, Justin Michaud
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Michaud 2018-10-16 22:37:22 PDT
Implement support for parsing paint() images in css, and store CSS paint callback objects in the paint definition map.
Comment 1 Justin Michaud 2018-10-16 23:10:17 PDT
Created attachment 352551 [details]
Patch
Comment 2 Justin Michaud 2018-10-17 10:53:12 PDT
Created attachment 352590 [details]
Patch
Comment 3 Justin Michaud 2018-10-17 15:26:35 PDT
Created attachment 352652 [details]
Patch
Comment 4 Dean Jackson 2018-10-17 15:37:48 PDT
Comment on attachment 352652 [details]
Patch

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

> Source/WebCore/css/CSSImageGeneratorValue.cpp:155
> +        return nullptr;

Not essential, but it seems you'll need to implement image() isFixedSize() fixedSize() isPending() and knownToBeOpaque() anyway, so maybe you should do that now with stubs?

> Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:1294
> +    // FIXME: should parse arguments

Nit: .

> Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:1296
> +    while (!args.atEnd())
> +        args.consume();

Should you return nullptr if there are arguments for now? I guess not.

> Source/WebCore/platform/mediastream/mac/RealtimeVideoUtilities.h:27
> +#pragma once
> +

Wow :)
Comment 5 Justin Michaud 2018-10-17 15:51:51 PDT
Created attachment 352656 [details]
Patch
Comment 6 WebKit Commit Bot 2018-10-17 19:47:07 PDT
Comment on attachment 352656 [details]
Patch

Clearing flags on attachment: 352656

Committed r237243: <https://trac.webkit.org/changeset/237243>
Comment 7 WebKit Commit Bot 2018-10-17 19:47:09 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2018-10-17 19:48:23 PDT
<rdar://problem/45360435>
Comment 9 Emilio Cobos Álvarez (:emilio) 2018-10-18 02:01:01 PDT
Comment on attachment 352656 [details]
Patch

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

> Source/WebCore/css/CSSPaintImageValue.cpp:40
> +    result.append(m_name);

Drive-by, but I think this needs to be escaped as an identifier. I'm ~sure this would yield wrong results for stuff like paint(foo\ bar).