Parse paint() and store paint callbacks for CSS Painting API
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Oct 2018 02:47:00 +0000 (02:47 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Oct 2018 02:47:00 +0000 (02:47 +0000)
commit933be586872d2b43fbb34129bcb3c7fb0815b5c9
treeb7d65dcbc4150fee9afa732c641230ebef59ecaf
parent63822f3fa06e9efe8735faedeccd5ad4f3464653
Parse paint() and store paint callbacks for CSS Painting API
https://bugs.webkit.org/show_bug.cgi?id=190657

Patch by Justin Michaud <justin_michaud@apple.com> on 2018-10-17
Reviewed by Dean Jackson.

Source/WebCore:

Implement support for parsing paint() images in css, and store CSS paint callback objects in the paint definition map.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp:
(WebCore::JSCSSPaintWorkletGlobalScope::visitAdditionalChildren):
(WebCore::JSCSSPaintWorkletGlobalScope::registerPaint):
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::image):
(WebCore::CSSImageGeneratorValue::isFixedSize const):
(WebCore::CSSImageGeneratorValue::fixedSize):
(WebCore::CSSImageGeneratorValue::isPending const):
(WebCore::CSSImageGeneratorValue::knownToBeOpaque const):
(WebCore::CSSImageGeneratorValue::loadSubimages):
* css/CSSPaintImageValue.cpp: Added.
(WebCore::CSSPaintImageValue::customCSSText const):
* css/CSSPaintImageValue.h: Added.
* css/CSSPaintWorkletGlobalScope.h:
* css/CSSPaintWorkletGlobalScope.idl:
* css/CSSValue.cpp:
(WebCore::CSSValue::equals const):
(WebCore::CSSValue::cssText const):
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::isPaintImageValue const):
* css/CSSValueKeywords.in:
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeCustomPaint):
(WebCore::CSSPropertyParserHelpers::consumeGeneratedImage):
(WebCore::CSSPropertyParserHelpers::isGeneratedImage):
* platform/mediastream/mac/RealtimeVideoUtilities.h:

LayoutTests:

* fast/css-custom-paint/basic-expected.txt:
* fast/css-custom-paint/basic.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237243 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css-custom-paint/basic-expected.txt
LayoutTests/fast/css-custom-paint/basic.html
Source/WebCore/ChangeLog
Source/WebCore/Sources.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp
Source/WebCore/css/CSSImageGeneratorValue.cpp
Source/WebCore/css/CSSPaintImageValue.cpp [new file with mode: 0644]
Source/WebCore/css/CSSPaintImageValue.h [new file with mode: 0644]
Source/WebCore/css/CSSPaintWorkletGlobalScope.h
Source/WebCore/css/CSSPaintWorkletGlobalScope.idl
Source/WebCore/css/CSSValue.cpp
Source/WebCore/css/CSSValue.h
Source/WebCore/css/CSSValueKeywords.in
Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp
Source/WebCore/platform/mediastream/mac/RealtimeVideoUtilities.h