12018-11-29 Justin Michaud <justin_michaud@apple.com>
2
3 CSS Painting API should allow image values in inputProperties
4 https://bugs.webkit.org/show_bug.cgi?id=192200
5
6 Reviewed by NOBODY (OOPS!).
7
8 Adds new TypedOMCSSImageValue wrapper. We rename all the existing ones so that the naming is consistent (CSSImageValue is already a thing).
9 Finally, we let CanvasRenderingContext2DBase render these.
10
11 Tests: fast/css-custom-paint/arguments.html
12 fast/css-custom-paint/image.html
13
14 * CMakeLists.txt:
15 * DerivedSources.make:
16 * Sources.txt:
17 * WebCore.xcodeproj/project.pbxproj:
18 * bindings/js/CallTracerTypes.h:
19 * bindings/js/JSTypedOMCSSStyleValueCustom.cpp: Renamed from Source/WebCore/bindings/js/JSCSSStyleValueCustom.cpp.
20 (WebCore::toJSNewlyCreated):
21 (WebCore::toJS):
22 * bindings/js/WebCoreBuiltinNames.h:
23 * css/CSSComputedStyleDeclaration.cpp:
24 (WebCore::ComputedStyleExtractor::customPropertyValue):
25 * css/CSSCustomPropertyValue.cpp:
26 (WebCore::CSSCustomPropertyValue::equals const):
27 (WebCore::CSSCustomPropertyValue::customCSSText const):
28 (WebCore::CSSCustomPropertyValue::tokens const):
29 * css/CSSCustomPropertyValue.h:
30 * css/CSSPaintImageValue.cpp:
31 (WebCore::CSSPaintImageValue::image):
32 * css/typedom/StylePropertyMapReadOnly.h:
33 (WebCore::StylePropertyMapReadOnly::create):
34 (WebCore::StylePropertyMapReadOnly::get const):
35 (WebCore::StylePropertyMapReadOnly::StylePropertyMapReadOnly):
36 * css/typedom/StylePropertyMapReadOnly.idl:
37 * css/typedom/TypedOMCSSImageValue.h: Copied from Source/WebCore/css/typedom/CSSUnitValue.h.
38 * css/typedom/TypedOMCSSImageValue.idl: Copied from Source/WebCore/css/typedom/CSSStyleValue.idl.
39 * css/typedom/TypedOMCSSNumericValue.h: Renamed from Source/WebCore/css/typedom/CSSNumericValue.h.
40 * css/typedom/TypedOMCSSNumericValue.idl: Renamed from Source/WebCore/css/typedom/CSSNumericValue.idl.
41 * css/typedom/TypedOMCSSStyleValue.h: Renamed from Source/WebCore/css/typedom/CSSStyleValue.h.
42 (WebCore::TypedOMCSSStyleValue::isImageValue):
43 * css/typedom/TypedOMCSSStyleValue.idl: Renamed from Source/WebCore/css/typedom/CSSStyleValue.idl.
44 * css/typedom/TypedOMCSSUnitValue.h: Renamed from Source/WebCore/css/typedom/CSSUnitValue.h.
45 * css/typedom/TypedOMCSSUnitValue.idl: Renamed from Source/WebCore/css/typedom/CSSUnitValue.idl.
46 * css/typedom/TypedOMCSSUnparsedValue.h: Renamed from Source/WebCore/css/typedom/CSSUnparsedValue.h.
47 * css/typedom/TypedOMCSSUnparsedValue.idl: Renamed from Source/WebCore/css/typedom/CSSUnparsedValue.idl.
48 * html/ImageBitmap.cpp:
49 (WebCore::ImageBitmap::createPromise):
50 * html/ImageBitmap.h:
51 * html/canvas/CanvasDrawImage.idl:
52 * html/canvas/CanvasFillStrokeStyles.idl:
53 * html/canvas/CanvasRenderingContext.cpp:
54 (WebCore::CanvasRenderingContext::checkOrigin):
55 * html/canvas/CanvasRenderingContext.h:
56 * html/canvas/CanvasRenderingContext2DBase.cpp:
57 (WebCore::size):
58 (WebCore::CanvasRenderingContext2DBase::drawImage):
59 (WebCore::CanvasRenderingContext2DBase::createPattern):
60 * html/canvas/CanvasRenderingContext2DBase.h:
61 * inspector/InspectorCanvas.cpp:
62 (WebCore::InspectorCanvas::buildAction):
63 * page/WindowOrWorkerGlobalScope.idl:
64 * platform/graphics/CustomPaintImage.cpp:
65 (WebCore::CustomPaintImage::doCustomPaint):
66