Bug 190657

Summary: Parse paint() and store paint callbacks for CSS Painting API
Product: WebKit Reporter: Justin Michaud <justin_michaud>
Component: Layout and RenderingAssignee: Justin Michaud <justin_michaud>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, dino, emilio, koivisto, rniwa, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 190217    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

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).