Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 94e061f54bdab7b585afe1445375d14103ba50b6
https://github.com/WebKit/WebKit/commit/94e061f54bdab7b585afe1445375d14103ba50b6
Author: Said Abou-Hallawa <[email protected]>
Date: 2026-08-02 (Sun, 02 Aug 2026)
Changed paths:
M Source/WebCore/CMakeLists.txt
M Source/WebCore/DerivedSources.make
M Source/WebCore/Headers.cmake
A Source/WebCore/Modules/WebGPU/GPUCopyElementImageDestination.h
A Source/WebCore/Modules/WebGPU/GPUCopyElementImageDestination.idl
A Source/WebCore/Modules/WebGPU/GPUCopyElementImageSource.h
A Source/WebCore/Modules/WebGPU/GPUCopyElementImageSource.idl
M Source/WebCore/Modules/WebGPU/GPUQueue.cpp
M Source/WebCore/Modules/WebGPU/GPUQueue.h
M Source/WebCore/Modules/WebGPU/GPUQueue.idl
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/bindings/js/WebCoreBuiltinNames.h
M Source/WebCore/dom/EventInterfaces.in
M Source/WebCore/dom/EventNames.json
M Source/WebCore/html/HTMLAttributeNames.in
M Source/WebCore/html/HTMLCanvasElement.cpp
M Source/WebCore/html/HTMLCanvasElement.h
M Source/WebCore/html/HTMLCanvasElement.idl
M Source/WebCore/html/OffscreenCanvas.cpp
M Source/WebCore/html/OffscreenCanvas.h
M Source/WebCore/html/OffscreenCanvas.idl
A Source/WebCore/html/canvas/CanvasDrawElementImage.idl
A Source/WebCore/html/canvas/CanvasElementImage.cpp
A Source/WebCore/html/canvas/CanvasElementImage.h
A Source/WebCore/html/canvas/CanvasElementImage.idl
A Source/WebCore/html/canvas/CanvasPaintEvent.cpp
A Source/WebCore/html/canvas/CanvasPaintEvent.h
A Source/WebCore/html/canvas/CanvasPaintEvent.idl
M Source/WebCore/html/canvas/CanvasRenderingContext2D.idl
M Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp
M Source/WebCore/html/canvas/CanvasRenderingContext2DBase.h
M Source/WebCore/html/canvas/OffscreenCanvasRenderingContext2D.idl
A Source/WebCore/html/canvas/WebGLCopyElementImageConfig.h
A Source/WebCore/html/canvas/WebGLCopyElementImageConfig.idl
M Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
M Source/WebCore/html/canvas/WebGLRenderingContextBase.h
M Source/WebCore/html/canvas/WebGLRenderingContextBase.idl
M Source/WebCore/inspector/InspectorCanvasArguments.cpp
M Source/WebCore/inspector/InspectorCanvasArguments.h
Log Message:
-----------
[HTML-in-Canvas] Implement the IDL changes for HTML-in-Canvas
https://bugs.webkit.org/show_bug.cgi?id=320677
rdar://183661820
Reviewed by Simon Fraser.
This change implements the IDL additions which are required for
HTML-in-Canvas[1].
The WebCore sources were changed just to allow compiling. New functionalities
will
be filled later. Here is the summary of this change:
1. The attribute layoutSubtree is added to HTMLCanvasElement. This attribute
will
force the layout for the canvas children.
2. The interface ElementImage is added. It represents a the drawing of an
Element
into a DisplayList
3. The event Paint is added. This event will fire any time, a canvas child is
repainted.
4. The ElementImage drawing functions to HTMLCanvasElement, OffscreenCanvas,
WebGL
and WebGPU are added.
5. Capturing a canvas child Element to ElementImage is added.
[1] https://github.com/WICG/html-in-canvas
* Source/WebCore/DerivedSources.make:
* Source/WebCore/Modules/WebGPU/GPUCopyElementImageDestination.h: Added.
* Source/WebCore/Modules/WebGPU/GPUCopyElementImageDestination.idl: Added.
* Source/WebCore/Modules/WebGPU/GPUCopyElementImageSource.h: Added.
* Source/WebCore/Modules/WebGPU/GPUCopyElementImageSource.idl: Added.
* Source/WebCore/Modules/WebGPU/GPUQueue.cpp:
(WebCore::GPUQueue::copyElementImageToTexture):
* Source/WebCore/Modules/WebGPU/GPUQueue.h:
* Source/WebCore/Modules/WebGPU/GPUQueue.idl:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/bindings/js/WebCoreBuiltinNames.h:
* Source/WebCore/dom/EventInterfaces.in:
* Source/WebCore/dom/EventNames.json:
* Source/WebCore/html/HTMLAttributeNames.in:
* Source/WebCore/html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::setLayoutSubtree):
(WebCore::HTMLCanvasElement::layoutSubtree const):
(WebCore::HTMLCanvasElement::requestPaint):
(WebCore::HTMLCanvasElement::getElementTransform):
(WebCore::HTMLCanvasElement::captureElementImage):
* Source/WebCore/html/HTMLCanvasElement.h:
* Source/WebCore/html/HTMLCanvasElement.idl:
* Source/WebCore/html/canvas/CanvasDrawElementImage.idl: Added.
* Source/WebCore/html/canvas/CanvasElementImage.cpp: Added.
(WebCore::CanvasElementImage::create):
(WebCore::CanvasElementImage::CanvasElementImage):
(WebCore::CanvasElementImage::width const):
(WebCore::CanvasElementImage::height const):
(WebCore::CanvasElementImage::close):
* Source/WebCore/html/canvas/CanvasElementImage.h: Added.
* Source/WebCore/html/canvas/CanvasElementImage.idl: Added.
* Source/WebCore/html/canvas/CanvasPaintEvent.cpp: Added.
(WebCore::CanvasPaintEvent::create):
(WebCore::CanvasPaintEvent::CanvasPaintEvent):
(WebCore::CanvasPaintEvent::changedElements const):
* Source/WebCore/html/canvas/CanvasPaintEvent.h: Added.
* Source/WebCore/html/canvas/CanvasPaintEvent.idl: Added.
* Source/WebCore/html/canvas/CanvasRenderingContext2D.idl:
* Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::drawElementImage):
* Source/WebCore/html/canvas/CanvasRenderingContext2DBase.h:
* Source/WebCore/html/canvas/OffscreenCanvasRenderingContext2D.idl:
* Source/WebCore/html/canvas/WebGLCopyElementImageConfig.h: Added.
* Source/WebCore/html/canvas/WebGLCopyElementImageConfig.idl: Added.
* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::texElementImage2D):
* Source/WebCore/html/canvas/WebGLRenderingContextBase.h:
* Source/WebCore/html/canvas/WebGLRenderingContextBase.idl:
* Source/WebCore/inspector/InspectorCanvasArguments.cpp:
(WebCore::InspectorCanvasArgumentProcessor<IDLDictionary<WebGLCopyElementImageConfig>>::operator):
(WebCore::InspectorCanvasArgumentProcessor<IDLInterface<CanvasElementImage>>::operator):
(WebCore::InspectorCanvasArgumentProcessor<IDLCanvasElementImageSourceUnion>::operator):
* Source/WebCore/inspector/InspectorCanvasArguments.h:
* Source/WebCore/Headers.cmake:
* Source/WebCore/CMakeLists.txt:
* Source/WebCore/html/OffscreenCanvas.cpp:
(WebCore::OffscreenCanvas::getElementTransform):
* Source/WebCore/html/OffscreenCanvas.h:
* Source/WebCore/html/OffscreenCanvas.idl:
Canonical link: https://commits.webkit.org/318425@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications