Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 37ee1bd3a1c782907718faf17e55a3dc37a21b49
      
https://github.com/WebKit/WebKit/commit/37ee1bd3a1c782907718faf17e55a3dc37a21b49
  Author: Sam Weinig <[email protected]>
  Date:   2025-09-28 (Sun, 28 Sep 2025)

  Changed paths:
    M Source/WebCore/SaferCPPExpectations/ForwardDeclCheckerExpectations
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/bindings/js/JSDOMConvertResult.h
    M Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
    M Source/WebCore/bindings/scripts/test/JS/JSTestCallTracer.cpp
    M Source/WebCore/html/canvas/ImageSmoothingQuality.h
    M Source/WebCore/inspector/InspectorCanvas.cpp
    M Source/WebCore/inspector/InspectorCanvas.h
    A Source/WebCore/inspector/InspectorCanvasArguments.cpp
    A Source/WebCore/inspector/InspectorCanvasArguments.h
    M Source/WebCore/inspector/InspectorCanvasCallTracer.cpp
    M Source/WebCore/inspector/InspectorCanvasCallTracer.h
    A Source/WebCore/inspector/InspectorCanvasProcessedArguments.h
    M Source/WebCore/inspector/InspectorController.cpp
    M Source/WebCore/inspector/agents/InspectorAnimationAgent.h
    M Source/WebCore/inspector/agents/InspectorCanvasAgent.cpp
    M Source/WebCore/inspector/agents/InspectorCanvasAgent.h

  Log Message:
  -----------
  Replace overload based resolution of the canvas inspector argument tracer 
with resolution using explicit IDLType specialization
https://bugs.webkit.org/show_bug.cgi?id=299682

Reviewed by Darin Adler.

While trying to modify the the bindings generator for http://webkit.org/b/297124
I continually ran into issues with the canvas inspector call tracer, both
finding it hard to fix build issues without causing overload ambiguity, or
worse, getting it all to compile, only to realize it some type was now getting
converted to `bool` and getting encoded incorrectly.

The crux of both issues is the use of overloading combined with the somewhat
haphazard return types of the bindings generator.

This change introduces a new resolution mechanism using explicit specialization
based on IDLTypes. The bindings generator now invokes the call tracer code
with an explicit IDLType template parameter (e.g. 
`processArgument<IDLLong>(...)`)
and a new set specialized argument processors are used to do the processing.

This has the added benefit of allowing us to use partial specialization to
implement multiple processors at once. For example, there is now only a
single processor for all enums via a partial specialization of 
`IDLEnumeration<T>`.

* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/bindings/js/JSDOMConvertResult.h:
* Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:
* Source/WebCore/bindings/scripts/test/JS/JSTestCallTracer.cpp:
* Source/WebCore/html/canvas/ImageSmoothingQuality.h:
* Source/WebCore/inspector/InspectorCanvas.cpp:
* Source/WebCore/inspector/InspectorCanvas.h:
* Source/WebCore/inspector/InspectorCanvasArguments.cpp: Added.
* Source/WebCore/inspector/InspectorCanvasArguments.h: Added.
* Source/WebCore/inspector/InspectorCanvasCallTracer.cpp:
* Source/WebCore/inspector/InspectorCanvasCallTracer.h:
* Source/WebCore/inspector/InspectorCanvasProcessedArguments.h: Added.
* Source/WebCore/inspector/agents/InspectorCanvasAgent.cpp:
* Source/WebCore/inspector/agents/InspectorCanvasAgent.h:

Canonical link: https://commits.webkit.org/300666@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to