Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 59cd2096d26ab40a0e1319f3d38c469a0cdc7d57
      
https://github.com/WebKit/WebKit/commit/59cd2096d26ab40a0e1319f3d38c469a0cdc7d57
  Author: Claudio Saavedra <csaave...@igalia.com>
  Date:   2025-08-07 (Thu, 07 Aug 2025)

  Changed paths:
    M Source/WebCore/Modules/WebGPU/GPUDevice.cpp
    M Source/WebCore/Modules/WebGPU/GPUDevice.h
    M Source/WebCore/Modules/mediasource/SourceBuffer.cpp
    M Source/WebCore/Modules/mediasource/SourceBuffer.h
    M Source/WebCore/Modules/mediastream/MediaDevices.cpp
    M Source/WebCore/Modules/mediastream/MediaDevices.h
    M Source/WebCore/Modules/mediastream/MediaStream.cpp
    M Source/WebCore/Modules/mediastream/MediaStream.h
    M Source/WebCore/Modules/mediastream/RTCDataChannel.cpp
    M Source/WebCore/Modules/mediastream/RTCDataChannel.h
    M Source/WebCore/Modules/mediastream/RTCDtlsTransport.cpp
    M Source/WebCore/Modules/mediastream/RTCDtlsTransport.h
    M Source/WebCore/Modules/mediastream/RTCRtpSFrameTransform.cpp
    M Source/WebCore/Modules/mediastream/RTCRtpSFrameTransform.h
    M Source/WebCore/Modules/webcodecs/WebCodecsBase.cpp
    M Source/WebCore/Modules/webcodecs/WebCodecsBase.h
    M Source/WebCore/Modules/webdatabase/DatabaseContext.cpp
    M Source/WebCore/Modules/webdatabase/DatabaseContext.h
    M Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
    M Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp
    M Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.h
    M 
Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionGenerateIsReachable.cpp
    M 
Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionGenerateIsReachable.h
    M 
Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp
    M 
Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.h
    M 
Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp
    M 
Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.h
    M 
Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithVariadic.cpp
    M 
Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithVariadic.h
    M Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp
    M Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.h
    M 
Source/WebCore/bindings/scripts/test/JS/JSTestCallbackWithFunctionOrDict.cpp
    M Source/WebCore/bindings/scripts/test/JS/JSTestCallbackWithFunctionOrDict.h
    M Source/WebCore/bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp
    M Source/WebCore/bindings/scripts/test/JS/JSTestVoidCallbackFunction.h
    M Source/WebCore/dom/ViewTransition.cpp
    M Source/WebCore/dom/ViewTransition.h
    M Source/WebCore/html/MediaController.cpp
    M Source/WebCore/html/MediaController.h
    M Source/WebCore/html/track/TrackListBase.cpp
    M Source/WebCore/html/track/TrackListBase.h
    M Source/WebCore/page/IntersectionObserver.cpp
    M Source/WebCore/page/IntersectionObserver.h
    M Source/WebCore/rendering/LegacyInlineBox.cpp
    M Source/WebCore/rendering/LegacyInlineBox.h
    M Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp
    M Source/WebCore/rendering/mathml/RenderMathMLFraction.h
    M Source/WebCore/rendering/mathml/RenderMathMLSpace.cpp
    M Source/WebCore/rendering/mathml/RenderMathMLSpace.h
    M 
Source/WebCore/workers/service/background-fetch/BackgroundFetchRegistration.cpp
    M 
Source/WebCore/workers/service/background-fetch/BackgroundFetchRegistration.h
    M Source/WebCore/xml/XMLHttpRequestProgressEventThrottle.cpp
    M Source/WebCore/xml/XMLHttpRequestProgressEventThrottle.h

  Log Message:
  -----------
  Move implementation for methods using inline-declared methods out from headers
https://bugs.webkit.org/show_bug.cgi?id=296934

Reviewed by Ross Kirsling.

There are many, often trivial, methods implemented
in header files that are using methods from other classes
that are defined in a Inlines.h header file. The convention
in WebKit (enforced by the style-checker) is that one
should never include Inlines.h files in a header, as it has
a negative impact in build time.

The problem with this status-quo is that this obscures
the fact that those Inlines.h files are not always
included when needed, particularly in non-unified builds, but
also when the unified compilation units change. This causes
compilation warnings and/or of the likes of:

    error: inline function 
'WebCore::ContextDestructionObserver::scriptExecutionContext' is not defined

Since we don't want to include Inlines.h in headers,
the correct usage of the methods defined in those files
is to not use them in headers, but to have the implementations
using them defined in the CPP files instead.

This patch is an attempt to remedy this situation but
it's not exhaustive, but it fixes a lot of those errors.
Notably, it also modifies CodeGeneratorJS.pm to fix
this issue in generated-code as well.

* Source/WebCore/Modules/WebGPU/GPUDevice.cpp:
(WebCore::GPUDevice::scriptExecutionContext const):
* Source/WebCore/Modules/WebGPU/GPUDevice.h:
* Source/WebCore/Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::scriptExecutionContext const):
* Source/WebCore/Modules/mediasource/SourceBuffer.h:
* Source/WebCore/Modules/mediastream/MediaDevices.cpp:
(WebCore::MediaDevices::scriptExecutionContext const):
* Source/WebCore/Modules/mediastream/MediaDevices.h:
* Source/WebCore/Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::scriptExecutionContext const):
* Source/WebCore/Modules/mediastream/MediaStream.h:
* Source/WebCore/Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::scriptExecutionContext const):
* Source/WebCore/Modules/mediastream/RTCDataChannel.h:
* Source/WebCore/Modules/mediastream/RTCDtlsTransport.cpp:
(WebCore::RTCDtlsTransport::scriptExecutionContext const):
* Source/WebCore/Modules/mediastream/RTCDtlsTransport.h:
* Source/WebCore/Modules/mediastream/RTCRtpSFrameTransform.cpp:
(WebCore::RTCRtpSFrameTransform::scriptExecutionContext const):
* Source/WebCore/Modules/mediastream/RTCRtpSFrameTransform.h:
* Source/WebCore/Modules/webcodecs/WebCodecsBase.cpp:
(WebCore::WebCodecsBase::scriptExecutionContext const):
* Source/WebCore/Modules/webcodecs/WebCodecsBase.h:
* Source/WebCore/Modules/webdatabase/DatabaseContext.cpp:
(WebCore::DatabaseContext::document const):
* Source/WebCore/Modules/webdatabase/DatabaseContext.h:
* Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackHeaderContent):
(GenerateCallbackImplementationContent):
* Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
(WebCore::JSTestCallbackFunction::scriptExecutionContext const):
* Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.h:
* 
Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionGenerateIsReachable.cpp:
(WebCore::JSTestCallbackFunctionGenerateIsReachable::scriptExecutionContext 
const):
* 
Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionGenerateIsReachable.h:
* 
Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp:
(WebCore::JSTestCallbackFunctionWithThisObject::scriptExecutionContext const):
* 
Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.h:
* 
Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp:
(WebCore::JSTestCallbackFunctionWithTypedefs::scriptExecutionContext const):
* Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.h:
* 
Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithVariadic.cpp:
(WebCore::JSTestCallbackFunctionWithVariadic::scriptExecutionContext const):
* Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithVariadic.h:
* Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
(WebCore::JSTestCallbackInterface::scriptExecutionContext const):
* Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.h:
* Source/WebCore/bindings/scripts/test/JS/JSTestCallbackWithFunctionOrDict.cpp:
(WebCore::JSTestCallbackWithFunctionOrDict::scriptExecutionContext const):
* Source/WebCore/bindings/scripts/test/JS/JSTestCallbackWithFunctionOrDict.h:
* Source/WebCore/bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp:
(WebCore::JSTestVoidCallbackFunction::scriptExecutionContext const):
* Source/WebCore/bindings/scripts/test/JS/JSTestVoidCallbackFunction.h:
* Source/WebCore/dom/ViewTransition.cpp:
(WebCore::ViewTransition::document const):
* Source/WebCore/dom/ViewTransition.h:
(WebCore::ViewTransition::document const): Deleted.
* Source/WebCore/html/MediaController.cpp:
(WebCore::MediaController::scriptExecutionContext const):
* Source/WebCore/html/MediaController.h:
* Source/WebCore/html/track/TrackListBase.cpp:
(WebCore::TrackListBase::scriptExecutionContext const):
* Source/WebCore/html/track/TrackListBase.h:
* Source/WebCore/page/IntersectionObserver.cpp:
(WebCore::IntersectionObserver::trackingDocument const):
* Source/WebCore/page/IntersectionObserver.h:
(WebCore::IntersectionObserver::trackingDocument const): Deleted.
* Source/WebCore/rendering/LegacyInlineBox.cpp:
(WebCore::LegacyInlineBox::lineStyle const):
* Source/WebCore/rendering/LegacyInlineBox.h:
(WebCore::LegacyInlineBox::lineStyle const): Deleted.
* Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::element const):
* Source/WebCore/rendering/mathml/RenderMathMLFraction.h:
* Source/WebCore/rendering/mathml/RenderMathMLSpace.cpp:
(WebCore::RenderMathMLSpace::element const):
* Source/WebCore/rendering/mathml/RenderMathMLSpace.h:
* 
Source/WebCore/workers/service/background-fetch/BackgroundFetchRegistration.cpp:
(WebCore::BackgroundFetchRegistration::scriptExecutionContext const):
* Source/WebCore/workers/service/background-fetch/BackgroundFetchRegistration.h:
* Source/WebCore/xml/XMLHttpRequestProgressEventThrottle.cpp:
(WebCore::XMLHttpRequestProgressEventThrottle::protectedTarget):
* Source/WebCore/xml/XMLHttpRequestProgressEventThrottle.h:
(WebCore::XMLHttpRequestProgressEventThrottle::protectedTarget): Deleted.

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



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

Reply via email to