Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 50c1d97fdef710ce465805de08a4d2d6c3c788f4
      
https://github.com/WebKit/WebKit/commit/50c1d97fdef710ce465805de08a4d2d6c3c788f4
  Author: Lauro Moura <[email protected]>
  Date:   2025-10-22 (Wed, 22 Oct 2025)

  Changed paths:
    M Source/WebKit/Shared/WebBackForwardListItem.h
    M Source/WebKit/SourcesWPE.txt
    M Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp
    M Source/WebKit/UIProcess/API/wpe/PageClientImpl.h
    M Source/WebKit/UIProcess/API/wpe/WPEWebViewPlatform.cpp
    M Source/WebKit/UIProcess/API/wpe/WPEWebViewPlatform.h
    M Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp
    M Source/WebKit/UIProcess/Automation/skia/WebAutomationSessionSkia.cpp
    M Source/WebKit/UIProcess/PageClient.h
    M Source/WebKit/UIProcess/ViewSnapshotStore.cpp
    M Source/WebKit/UIProcess/ViewSnapshotStore.h
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.h
    A Source/WebKit/UIProcess/skia/ViewSnapshotSkia.cpp
    M Source/WebKit/UIProcess/wpe/AcceleratedBackingStore.cpp
    M Source/WebKit/UIProcess/wpe/AcceleratedBackingStore.h
    M WebDriverTests/TestExpectations.json

  Log Message:
  -----------
  [WPE][WebDriver] Support taking the screenshots from the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=299732

Reviewed by Carlos Garcia Campos.

Currently, WPE's implentation of taking screenshots rely on asking the
root `RenderLayer` on the WebProcess to paint its content. While it
worked fine for most elements, this approach could lead to differences
from the final composited frame that we send back to the UIProcess,
especially for some kinds of accelerated content, like animated 3D CSS
filters.

On top of that, the recent ANGLE bump in 295416@main included a stricter
check on ReadPixels that affected taking screenshots of WebGL scenes on
WebGL 1.0 environments, as the GraphicsContextGLAngle used it to read
the WebGL scenes contents for this code path.

To address these issues, this commits adds support for taking
screenshots on the UIProcess, by reading the last buffer committed to
the system.

* Source/WebKit/Shared/WebBackForwardListItem.h:
* Source/WebKit/SourcesWPE.txt:
* Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp:
(WebKit::PageClientImpl::takeViewSnapshot):
* Source/WebKit/UIProcess/API/wpe/PageClientImpl.h:
* Source/WebKit/UIProcess/API/wpe/WPEWebViewPlatform.cpp:
(WKWPE::ViewPlatform::takeViewSnapshot):
* Source/WebKit/UIProcess/API/wpe/WPEWebViewPlatform.h:
* Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::takeScreenshot):
* Source/WebKit/UIProcess/Automation/skia/WebAutomationSessionSkia.cpp:
(WebKit::base64EncodedPNGData):
(WebKit::WebAutomationSession::platformGetBase64EncodedPNGData):
* Source/WebKit/UIProcess/PageClient.h:
* Source/WebKit/UIProcess/ViewSnapshotStore.cpp:
* Source/WebKit/UIProcess/ViewSnapshotStore.h:
(WebKit::ViewSnapshot::image const):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/skia/ViewSnapshotSkia.cpp: Copied from 
Source/WebKit/UIProcess/Automation/skia/WebAutomationSessionSkia.cpp.
(WebKit::ViewSnapshot::create):
(WebKit::ViewSnapshot::ViewSnapshot):
(WebKit::ViewSnapshot::hasImage const):
(WebKit::ViewSnapshot::clearImage):
(WebKit::ViewSnapshot::estimatedImageSizeInBytes const):
(WebKit::ViewSnapshot::size const):
* Source/WebKit/UIProcess/wpe/AcceleratedBackingStore.cpp:
(WebKit::getImageInfoFromBuffer):
(WebKit::saveBufferSnapshot):
(WebKit::AcceleratedBackingStore::takeSnapshot):
* Source/WebKit/UIProcess/wpe/AcceleratedBackingStore.h:
* WebDriverTests/TestExpectations.json:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to