https://bugs.webkit.org/show_bug.cgi?id=229380
Reviewed by Adrian Perez de Castro.
Tools:
r280774 added support for fullscreen in the WindowViewBackend, but
many webdriver tests started failing as they run in the headless
backend.
This commits adds basic support in HeadlessBackend to make some
tests pass. Currently, just storing the fullscreen state and
forwarding the events to the WPE backend functions.
A number of tests are still failing due to the missing multiple window
support (required through the `session` fixtures), but also there are
still some failing that expect the view to be started in
non-fullscreen mode, which does not happen in the headless backend.
* wpe/backends/HeadlessViewBackend.cpp:
(WPEToolingBackends::HeadlessViewBackend::HeadlessViewBackend):
(WPEToolingBackends::HeadlessViewBackend::onDOMFullScreenRequest):
(WPEToolingBackends::HeadlessViewBackend::dispatchFullscreenEvent):
* wpe/backends/HeadlessViewBackend.h:
WebDriverTests:
* TestExpectations.json: Skip some tests still failing, mainly due to multiple window support missing.
Canonical link: https://commits.webkit.org/240817@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281430 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=228530
Reviewed by Adrian Perez de Castro.
Script Tools/wpe/install-dependencies was not installing all the required
package dependencies necessary to build WPE. There were several
packages missing or other ones which were only present in the
WebKitGTK list of package dependencies (moved to GLIB).
* glib/dependencies/apt:
* gtk/dependencies/apt:
* wpe/dependencies/apt:
Canonical link: https://commits.webkit.org/240023@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280379 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=228326
Reviewed by Adrian Perez de Castro.
WebKitGTK and WPE share many dependency packages. Until now each port
maintained its own list of dependencies. It was a common mistake to
add a new package dependency to one of the ports but not to the other
one.
This patch adds a common GLIB for dependency packages, which can help
prevent mistakes like the one described above.
* glib/dependencies/apt: Copied from Tools/wpe/dependencies/apt.
* glib/dependencies/dnf: Copied from Tools/wpe/dependencies/dnf.
* glib/dependencies/pacman: Copied from Tools/wpe/dependencies/pacman.
* gtk/dependencies/apt:
* gtk/dependencies/dnf:
* gtk/dependencies/pacman:
* wpe/dependencies/apt:
* wpe/dependencies/dnf:
* wpe/dependencies/pacman:
Canonical link: https://commits.webkit.org/240001@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280354 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=228276
Reviewed by Adrian Perez de Castro.
When deploying a new bot from scratch for Ubuntu LTS, which builds
using system libraries, I realized the list of package dependencies
for WPE is not exhaustive.
This patch refactorizes the package dependencies list putting each
group of dependencies on its own file depending on platform (apt, dnf,
pacman and brew).
On a follow-up step I plan to put in common the WebKitGTK and WPE
dependencies plus add the missing WPE package dependencies. Also I'll
remove the duplicated packages that are currently happening in the
dependencies list of several platforms.
* gtk/dependencies/apt: Added.
* gtk/dependencies/brew: Added.
* gtk/dependencies/dnf: Added.
* gtk/dependencies/pacman: Added.
* gtk/install-dependencies:
* wpe/dependencies/apt: Added.
* wpe/dependencies/dnf: Added.
* wpe/dependencies/pacman: Added.
* wpe/install-dependencies:
Canonical link: https://commits.webkit.org/239986@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280339 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=120665
Reviewed by Philippe Normand.
Source/WebCore:
Solved a deadlock when processing samples from a text track while the main thread is starting to play.
In those circumstances, the text sink is set by Playbin as non-async, so the main thread calling
MediaPlayerPrivateGStreamer::play() is blocked waiting for the preroll to finish. While prerolling,
a text sample is detected in a non-main thread and sent to the main thread for processing. The current
code waits in the non-main thread for the processing to finish, but that won't ever happen because
the main thread is busy in play() waiting for the preroll to complete. Since the non-main thread
doesn't need any result from the main thread, a simple change to avoid the wait is enough to solve the
deadlock.
There was also a bug preventing all the languages of the text tracks being detected on time. Sometimes
the tag event specifying the track language emitted by the demuxer arrives too late to the
webkittextcombiner sink pad (up to several seconds since sent!) and the language remains unset when
the test checks for it. As a result, the test fails because the second track isn't reported to be in
French language ("fr"). The solution to this is to find an earlier (more upstream) pad and listen
there for the (sticky) tag events. There can be multiple tag events, so all of them are checked until
one having the GST_TAG_LANGUAGE_CODE tag is found.
Covered by existing tests (now unskipped).
* platform/graphics/gstreamer/TextSinkGStreamer.cpp:
(webkitTextSinkHandleSample): Don't wait for handleTextSample() to be completed in the main thread. This avoids the deadlock.
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
(WebCore::findBestUpstreamPad): Find a pad more upstream than the current one.
(WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer): Call setPad() instead of setting it by hand here.
(WebCore::TrackPrivateBaseGStreamer::setPad): Also manage m_bestUpstreamPad in parallel to m_pad. Add a probe to listen to the tag events instead of checking the "tags" property (the property wasn't present in the best upstream pad).
(WebCore::TrackPrivateBaseGStreamer::disconnect): Remove the probe from m_bestUpstreamPad, instead of removing the old notify::tags listener from m_pad.
(WebCore::TrackPrivateBaseGStreamer::tagsChanged): Check the sticky tag events until the language one is found (or the last event if no language event is available).
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: Added m_bestUpstreamPad and m_eventProbe. Moved setPad() implementation to the cpp file.
Tools:
Fix media/track/in-band/tests
Add libkate as dependency, so gst-plugins-bad detects it and can build the GstKateDec element.
This isn't actually needed when using Flatpak (the dependency has been added there), but is still
useful when using jhbuild and is also coherent with the need of other multimedia dependencies
such as libvpx.
* gtk/install-dependencies:
* wpe/install-dependencies:
LayoutTests:
Removed track-in-band-mpegts-metadata.html because it relies on private streams on mpegts
and those won't ever be exposed by tsdemux. Made testCuesAddedOnce() test more robust
when finding text tracks.
* media/content/user-private-streams.ts: Removed.
* media/in-band-tracks.js:
(pollProgress): Make sure that the function repeated at intervals is properly stopped in all the cases.
(canplaythrough): More robust track detection.
(testCuesAddedOnce): Ditto.
* media/track/in-band/track-in-band-mpegts-metadata.html: Removed.
* platform/glib/TestExpectations: Unskip media/track/in-band tests.
Canonical link: https://commits.webkit.org/237022@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276586 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=223763
Reviewed by Michael Catanzaro.
.:
Remove any usages of DERIVED_SOURCES_DIR and FOWARDING_HEADERS_DIR. There are still some
uses in GTK/WPE but those should be phased out.
Sets the directory structure to look like an Apple build in terms of where headers and
derived sources are held. Rather than having one root derived sources and one root
header directory those directories are now per project. This helps catch any errors with
header includes.
Deletes some old Mac CMake code that is no longer relevant around creating forwarding
headers.
For AppleWin the old structure is used because of its internal build which assumes the
old structure.
* Source/cmake/OptionsAppleWin.cmake:
* Source/cmake/OptionsFTW.cmake:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsPlayStation.cmake:
* Source/cmake/OptionsWPE.cmake:
* Source/cmake/OptionsWinCairo.cmake:
* Source/cmake/WebKitCommon.cmake:
* Source/cmake/WebKitFS.cmake:
* Source/cmake/WebKitMacros.cmake:
Source/JavaScriptCore:
Remove any usages of DERIVED_SOURCES_DIR and FOWARDING_HEADERS_DIR.
* CMakeLists.txt:
* PlatformMac.cmake:
Source/WebCore:
Remove any usages of DERIVED_SOURCES_DIR and FOWARDING_HEADERS_DIR.
* PlatformFTW.cmake:
* PlatformWin.cmake:
Source/WebKit:
Remove any usages of DERIVED_SOURCES_DIR and FOWARDING_HEADERS_DIR.
* PlatformGTK.cmake:
* PlatformMac.cmake: Remove creation of forwarding headers.
Source/WebKitLegacy:
Remove any usages of DERIVED_SOURCES_DIR and FOWARDING_HEADERS_DIR.
* PlatformMac.cmake:
Tools:
Remove any usages of DERIVED_SOURCES_DIR and FOWARDING_HEADERS_DIR.
* DumpRenderTree/PlatformMac.cmake:
* MiniBrowser/gtk/CMakeLists.txt:
* MiniBrowser/mac/CMakeLists.txt:
* WebKitTestRunner/PlatformMac.cmake:
* wpe/backends/CMakeLists.txt:
Canonical link: https://commits.webkit.org/235819@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275111 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=223437
Reviewed by Adrian Perez de Castro.
.:
Use 1.1 as the API version when building with soup3.
* Source/PlatformWPE.cmake:
* Source/cmake/OptionsWPE.cmake:
Source/WebKit:
* PlatformWPE.cmake: Use WPE_API_DOC_VERSION instead of WPE_API_VERSION for gtkdoc config files.
* wpe/wpe-web-extension-uninstalled.pc.in: Add variable for libsoup version.
* wpe/wpe-web-extension.pc.in: Ditto.
* wpe/wpe-webkit-uninstalled.pc.in: Ditto.
* wpe/wpe-webkit.pc.in: Ditto.
Tools:
Use WPE_API_DOC_VERSION instead of WPE_API_VERSION.
* wpe/manifest.txt.in:
Canonical link: https://commits.webkit.org/235468@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274641 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=219942
Reviewed by Žan Doberšek.
Source/WebKit:
Interpret axis motion events with a zero value as axis stop events and
send the appropriate wheel event phase. This enables kinetic scrolling
when using touchpads and other smooth-scrolling devices.
* UIProcess/API/wpe/PageClientImpl.cpp:
(WebKit::PageClientImpl::doneWithTouchEvent):
* UIProcess/API/wpe/WPEView.cpp:
(WKWPE::m_backend):
* UIProcess/API/wpe/WPEView.h:
Tools:
* wpe/backends/WindowViewBackend.cpp:
Update to Wayland protocol 5 and interpret axis stop, discrete and
smooth axis motion events.
Canonical link: https://commits.webkit.org/232871@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271292 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=218068
Reviewed by Adrian Perez de Castro.
On r268591 I updated the version of wpebackend-fdo to the last stable 1.8
but this version is failing to build on Ubuntu-18.04 because of the cmake version.
Backport a patch to fix this.
* gtk/jhbuild.modules:
* gtk/patches/wpebackend-fdo-cmake-buildfix-3.10.patch: Added.
* jhbuild/jhbuild-minimal.modules:
* jhbuild/patches/wpebackend-fdo-cmake-buildfix-3.10.patch: Added.
* wpe/jhbuild.modules:
* wpe/patches/wpebackend-fdo-cmake-buildfix-3.10.patch: Added.
Canonical link: https://commits.webkit.org/230783@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=217825
Reviewed by Adrian Perez de Castro.
libmanette 0.2.4 is required for enabling gamepad support, which
defaults to on since r268389 for developer builds. The version
shipped by ubuntu-20.04 is not enough (0.2.3), so we should include
this on the minimal moduleset which is used to generate the bundle
products on the packaging bots.
Seize to also update the libwpe and wpebackend-fdo libraries.
* gtk/jhbuild.modules:
* jhbuild/jhbuild-minimal.modules:
* wpe/jhbuild.modules:
Canonical link: https://commits.webkit.org/230553@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268591 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=217380
Reviewed by Philippe Normand.
Before the ATK::Bridge target got introduced in r267399 a couple of CMake variables were
used, which were empty when the accessility support was disabled and nothing was being
added to the WebKit and WPEToolingBackends targets. Now that an imported target is used
it is needed to add it as a dependency conditionally to avoid using an undefined target
name.
Source/WebKit:
No new tests needed.
* PlatformWPE.cmake: Use the ATK::Bridge target only when ENABLE_ACCESSIBILITY is set.
Tools:
* wpe/backends/CMakeLists.txt: Use the ATK::Bridge target only when ENABLE_ACCESSIBILITY is set.
Canonical link: https://commits.webkit.org/230145@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268046 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=216773
Reviewed by Don Olmstead.
.:
* Source/cmake/FindATKBridge.cmake: Rewrite to define an ATK::Bridge imported target.
* Source/cmake/OptionsWPE.cmake: Use the ATK::Bridge imported target.
Source/WebKit:
No new tests needed.
* PlatformWPE.cmake: Use the ATK::Bridge imported target.
Tools:
* wpe/backends/CMakeLists.txt: Use the ATK::Bridge imported target.
Canonical link: https://commits.webkit.org/229609@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267399 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=215699
Reviewed by Darin Adler.
.:
* Source/cmake/WebKitCompilerFlags.cmake: Disable tautological-compare and
misleading-indentation warnings triggering false-positive when building JSC.
Source/WebCore:
* Modules/indexeddb/server/SQLiteIDBBackingStore.h: Mark class as final because its destructor is marked as such.
(WebCore::IDBServer::SQLiteIDBBackingStore::databaseDirectory const): Deleted.
(WebCore::IDBServer::SQLiteIDBBackingStore::sessionID const): Deleted.
(WebCore::IDBServer::SQLiteIDBBackingStore::databaseRootDirectoryIsolatedCopy const): Deleted.
* dom/messageports/MessagePortChannelProviderImpl.h: Ditto.
* layout/Verification.cpp:
(WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded): Remove spurious
matchingRuns assignment. I have no idea how this was supposed to work?
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::JPEGImageReader::decode): Use FALLTHROUGH macro.
* platform/image-decoders/webp/WEBPImageDecoder.cpp:
(WebCore::WEBPImageDecoder::decodeFrame): Ditto.
Source/WebKit:
* UIProcess/API/wpe/PageClientImpl.cpp:
(WebKit::PageClientImpl::doneWithTouchEvent): Use null input touch event enum value for touch event handling.
Tools:
* TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp: Wrap m_geometry private field in GTK
ifdefs, this is not used in WPE.
* WebKitTestRunner/wpe/PlatformWebViewWPE.cpp:
(WTR::PlatformWebView::windowFrame): Return rect built with explicit initializers.
* wpe/backends/WindowViewBackend.cpp: Supply additional touch client callbacks, mandated by the interface.
Canonical link: https://commits.webkit.org/228502@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=214249
Reviewed by Carlos Garcia Campos.
The -70 GLib source priority was a magic baseline used to align other
GLib source priorities throughout the WPE stack. We moved to the
G_PRIORITY_DEFAULT value since then, so that's the value that should
be used in the two in-tree view backend implementations as well.
* wpe/backends/HeadlessViewBackend.cpp:
(WPEToolingBackends::HeadlessViewBackend::HeadlessViewBackend):
* wpe/backends/WindowViewBackend.cpp:
(WPEToolingBackends::WindowViewBackend::WindowViewBackend):
Canonical link: https://commits.webkit.org/227060@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=213550
Reviewed by Philippe Normand.
.:
Added support to enable OpenCDM and find it it needed.
* Source/cmake/FindOpenCDM.cmake: Added.
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsWPE.cmake:
* Source/cmake/WebKitFeatures.cmake:
Source/WebCore:
Implemented the OpenCDM support in the CDMOpenCDM and
CDMProxyOpenCDM related classes. CDMOpenCDM classes check for
Widevine support in OpenCDM and glues the JavaScript API to the
OpenCDM/Thunder framework. Building this is optional and --opencdm
parameter needs to be passed to build-webkit to get it.
CDMProxy related needed changes because of several reasons. First
is that Key was considering only a Vector<uint8_t> as a type and
OpenCDM has session objects. Key is also renamed to KeyHandle as
this name reflects in a better way the purpose of the class. This
bleeds out to all CDMProxy related classes. CDMInstanceSessionProxy
gets support to remove itself from the CDMSessionProxy.
Regarding ClearKey, we adapt the changes to the CDMProxy classes
and de-cable protection system from the decryptors as the OpenCDM
decryptor could handle more than one system.
No new tests. YouTube TV 2019 tests are green.
* Headers.cmake:
* WebCore.xcodeproj/project.pbxproj:
* platform/GStreamer.cmake:
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::dataAsUInt8Ptr const):
* platform/SharedBuffer.h:
* platform/encryptedmedia/CDMInstance.h:
* platform/encryptedmedia/CDMOpenCDMTypes.h: Copied from Source/WebCore/platform/graphics/gstreamer/eme/CDMFactoryGStreamer.cpp.
* platform/encryptedmedia/CDMProxy.cpp:
(WebCore::KeyHandle::idAsString const):
(WebCore::KeyHandle::takeValueIfDifferent):
(WebCore::KeyStore::containsKeyID const):
(WebCore::KeyStore::merge):
(WebCore::KeyStore::allKeysAs const):
(WebCore::KeyStore::addKeys):
(WebCore::KeyStore::add):
(WebCore::KeyStore::remove):
(WebCore::KeyStore::keyHandle const):
(WebCore::CDMProxy::keyHandle const):
(WebCore::CDMProxy::tryWaitForKeyHandle const):
(WebCore::CDMProxy::keyAvailableUnlocked const):
(WebCore::CDMProxy::keyAvailable const):
(WebCore::CDMProxy::getOrWaitForKeyHandle const):
(WebCore::CDMProxy::getOrWaitForKeyValue const):
(WebCore::CDMInstanceSessionProxy::CDMInstanceSessionProxy):
(WebCore::CDMInstanceSessionProxy::removeFromInstanceProxy):
* platform/encryptedmedia/CDMProxy.h:
(WebCore::KeyHandle::create):
(WebCore::KeyHandle::id const):
(WebCore::KeyHandle::value const):
(WebCore::KeyHandle::value):
(WebCore::KeyHandle::isStatusCurrentlyValid):
(WebCore::KeyHandle::operator==):
(WebCore::KeyHandle::operator<):
(WebCore::KeyHandle::KeyHandle):
(WebCore::KeyStore::isEmpty const):
(WebCore::CDMProxy::instance const):
(WebCore::CDMInstanceSessionProxy::releaseDecryptionResources):
(WebCore::CDMInstanceSessionProxy::cdmInstanceProxy const):
(WebCore::CDMInstanceProxy::proxy const):
(WebCore::CDMInstanceProxy::removeSession):
* platform/encryptedmedia/CDMUtilities.cpp: Copied from Source/WebCore/platform/graphics/gstreamer/eme/CDMFactoryGStreamer.cpp.
(WebCore::CDMUtilities::parseJSONObject):
* platform/encryptedmedia/CDMUtilities.h: Copied from Source/WebCore/platform/graphics/gstreamer/eme/CDMFactoryGStreamer.cpp.
* platform/encryptedmedia/clearkey/CDMClearKey.cpp:
(WebCore::parseLicenseFormat):
(WebCore::CDMPrivateClearKey::supportsInitData const):
(WebCore::CDMPrivateClearKey::sanitizeResponse const):
(WebCore::CDMInstanceSessionClearKey::updateLicense):
(WebCore::CDMInstanceSessionClearKey::removeSessionData):
(WebCore::CDMInstanceSessionClearKey::parentInstance const):
* platform/encryptedmedia/clearkey/CDMClearKey.h:
* platform/graphics/gstreamer/GStreamerCommon.cpp:
(WebCore::isOpenCDMRanked):
(WebCore::initializeGStreamerAndRegisterWebKitElements):
(WebCore::GstMappedBuffer::createVector):
* platform/graphics/gstreamer/GStreamerCommon.h:
(WebCore::GstMappedBuffer::create):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::waitForCDMAttachment):
* platform/graphics/gstreamer/eme/CDMFactoryGStreamer.cpp:
(WebCore::CDMFactory::platformRegisterFactories):
* platform/graphics/gstreamer/eme/CDMOpenCDM.cpp: Added.
(openCDMLicenseType):
(WebCore::initDataMD5):
(WebCore::sessionLoadFailureFromOpenCDM):
(WebCore::OpenCDM::destructOpenCDMSession):
(WebCore::OpenCDM::createSharedOpenCDMSession):
(WebCore::CDMFactoryOpenCDM::singleton):
(WebCore::CDMFactoryOpenCDM::createCDM):
(WebCore::CDMFactoryOpenCDM::createCDMProxy):
(WebCore::CDMFactoryOpenCDM::supportedKeySystems const):
(WebCore::CDMFactoryOpenCDM::supportsKeySystem):
(WebCore::CDMPrivateOpenCDM::supportedInitDataTypes const):
(WebCore::CDMPrivateOpenCDM::supportsConfiguration const):
(WebCore::CDMPrivateOpenCDM::supportedRobustnesses const):
(WebCore::CDMPrivateOpenCDM::distinctiveIdentifiersRequirement const):
(WebCore::CDMPrivateOpenCDM::persistentStateRequirement const):
(WebCore::CDMPrivateOpenCDM::distinctiveIdentifiersAreUniquePerOriginAndClearable const):
(WebCore::CDMPrivateOpenCDM::createInstance):
(WebCore::CDMPrivateOpenCDM::loadAndInitialize):
(WebCore::CDMPrivateOpenCDM::supportsServerCertificates const):
(WebCore::CDMPrivateOpenCDM::supportsSessions const):
(WebCore::CDMPrivateOpenCDM::supportsInitData const):
(WebCore::CDMPrivateOpenCDM::sanitizeResponse const):
(WebCore::CDMPrivateOpenCDM::sanitizeSessionId const):
(WebCore::CDMInstanceOpenCDM::CDMInstanceOpenCDM):
(WebCore::CDMInstanceOpenCDM::initializeWithConfiguration):
(WebCore::CDMInstanceOpenCDM::setServerCertificate):
(WebCore::CDMInstanceOpenCDM::setStorageDirectory):
(WebCore::CDMInstanceSessionOpenCDM::CDMInstanceSessionOpenCDM):
(WebCore::CDMInstanceOpenCDM::createSession):
(WebCore::ParsedResponseMessage::ParsedResponseMessage):
(WebCore::ParsedResponseMessage::hasPayload const):
(WebCore::ParsedResponseMessage::payload const):
(WebCore::ParsedResponseMessage::payload):
(WebCore::ParsedResponseMessage::hasType const):
(WebCore::ParsedResponseMessage::type const):
(WebCore::ParsedResponseMessage::typeOr const):
(WebCore::CDMInstanceSessionOpenCDM::challengeGeneratedCallback):
(WebCore::toString):
(WebCore::CDMInstanceSessionOpenCDM::status const):
(WebCore::CDMInstanceSessionOpenCDM::keyUpdatedCallback):
(WebCore::CDMInstanceSessionOpenCDM::keysUpdateDoneCallback):
(WebCore::CDMInstanceSessionOpenCDM::errorCallback):
(WebCore::CDMInstanceSessionOpenCDM::requestLicense):
(WebCore::CDMInstanceSessionOpenCDM::sessionFailure):
(WebCore::CDMInstanceSessionOpenCDM::updateLicense):
(WebCore::CDMInstanceSessionOpenCDM::loadSession):
(WebCore::CDMInstanceSessionOpenCDM::closeSession):
(WebCore::CDMInstanceSessionOpenCDM::removeSessionData):
(WebCore::CDMInstanceSessionOpenCDM::storeRecordOfKeyUsage):
(WebCore:: const):
* platform/graphics/gstreamer/eme/CDMOpenCDM.h: Added.
(WebCore::OpenCDM::OpenCDMSystemDeleter::operator() const):
(WebCore::OpenCDM::OpenCDMSessionDeleter::operator() const):
* platform/graphics/gstreamer/eme/CDMProxyClearKey.cpp:
(WebCore::CDMProxyClearKey::cencSetDecryptionKey):
* platform/graphics/gstreamer/eme/CDMProxyOpenCDM.cpp: Added.
(WebCore::CDMProxyOpenCDM::getDecryptionSession const):
(WebCore::CDMProxyOpenCDM::decrypt):
* platform/graphics/gstreamer/eme/CDMProxyOpenCDM.h: Copied from Source/WebCore/platform/graphics/gstreamer/eme/CDMFactoryGStreamer.cpp.
* platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h:
(WebCore::InitData::InitData):
(WebCore::InitData::payload const):
(WebCore::GStreamerEMEUtilities::isWidevineKeySystem):
(WebCore::GStreamerEMEUtilities::keySystemToUuid):
* platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
(webkit_media_clear_key_decrypt_class_init):
(protectionSystemId):
* platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
(transformCaps):
(transformInPlace):
* platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h:
* platform/graphics/gstreamer/eme/WebKitOpenCDMDecryptorGStreamer.cpp: Added.
(webkit_media_opencdm_decrypt_class_init):
(webkit_media_opencdm_decrypt_init):
(finalize):
(protectionSystemId):
(cdmProxyAttached):
(decrypt):
* platform/graphics/gstreamer/eme/WebKitOpenCDMDecryptorGStreamer.h: Added.
Source/WTF:
* wtf/PlatformEnable.h: Disable OPENCDM by default.
Tools:
Added support to build OpenCDM and its dependencies. There is an
opt in env var to get JHBuild building Thunder its Widevine
dependencies. We also include a couple of GStreamer patches needed
to get key IDs in the decryptors.
Widevine is obviously proprietary and as you need to be licensed
to access it, you need credentials to build it.
* Scripts/webkitperl/FeatureList.pm:
* gstreamer/jhbuild.modules:
* gstreamer/patches/gst-plugins-bad-0006-mssdemux-parse-protection-data.patch: Added.
* gstreamer/patches/gst-plugins-good-0002-Check-if-an-upstream-demuxer-provided-a-default-kid.patch: Added.
* gtk/install-dependencies:
* jhbuild/jhbuildrc_common.py:
(init):
* wpe/install-dependencies:
Canonical link: https://commits.webkit.org/226987@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=214045
Reviewed by Adrian Perez de Castro.
When building webkit against system libraries (without flatpak/jhbuild)
its needed to have installed the webkit plugins to play media files.
The install-dependencies script should install them.
gstreamer-plugins-ugly its likely not needed for the majority of the cases,
but it can be required by some ugly media files that require an ugly decoder.
Since we are installing it on the flatpak, let's add it here as well.
* gtk/install-dependencies:
* wpe/install-dependencies:
Canonical link: https://commits.webkit.org/226878@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264094 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=213614
Reviewed by Carlos Garcia Campos.
This patch introduces a way of specifying a moduleset other than the default
via the environment variable WEBKIT_JHBUILD_MODULESET and adds a minimal moduleset
that allows building WebKit with it. This minimal moduleset includes the libraries
needed for building WebKit on Ubuntu-18.04, and those libraries are only build if
needed since they include the <pkg-config> entries that tells JHBuild to not build
them if those are already installed system wide. So this minimal moduleset should
work also on newer versions of Ubuntu or even other distributions.
Currently a recipe for newer libsoup than the one shipped by Ubuntu-18.04 is included
since we need this to have support for SameSite cookie support.
The minimal moduleset is shared between WPE and GTK to reduce code duplication.
To use this, you have to export on the build environment:
WEBKIT_JHBUILD=1
WEBKIT_JHBUILD_MODULESET=minimal
* Scripts/update-webkit-libs-jhbuild:
(getJhbuildIncludedFilePaths):
(jhbuildModulesetNameChanged):
(jhbuildConfigurationChanged):
(saveJhbuildMd5):
(saveJhbuildModulesetName):
(saveJhbuildConfig):
(deleteJhbuildMd5):
(deleteJhbuildModulesetName):
(deleteJhbuildConfig):
* Scripts/webkitdirs.pm:
(getJhbuildModulesetName):
* gtk/jhbuild-minimal.modules: Added.
* jhbuild/jhbuild-minimal.modules: Added.
* jhbuild/jhbuildrc_common.py:
(init):
* jhbuild/patches/libsoup-lower-glib-dependency-to-2.38.patch: Added.
* wpe/jhbuild-minimal.modules: Added.
Canonical link: https://commits.webkit.org/226876@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264092 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=211982
Reviewed by Carlos Garcia Campos.
Instead of using WPEBackend-fdo's EGL mode that optionally allows the
GL operations to be done through software rasterization, have the
HeadlessViewBackend use the SHM mode which enforces this behavior.
Under the hood, the graphics library will be forced to set up and use
the software rasterization mechanisms, and on our side we are required
to properly handle SHM-backed buffers. This avoids any use of EGL or
GL operations inside HeadlessViewBackend, enabling to use this setup
in systems and environments that don't have GPUs available.
All GL-y things are pushed into the WindowViewBackend class. Inside
HeadlessViewBackend, the whole SHM logic requires WPEBackend-fdo APIs
that are part of the current 1.7 development cycle. When building
against older versions, HeadlessViewBackend itself remains buildable
but is not operational otherwise.
* WebKitTestRunner/wpe/PlatformWebViewWPE.cpp:
(WTR::PlatformWebView::windowSnapshotImage):
* wpe/backends/HeadlessViewBackend.cpp:
(WPEToolingBackends::HeadlessInstance::singleton):
(WPEToolingBackends::HeadlessViewBackend::HeadlessViewBackend):
(WPEToolingBackends::HeadlessViewBackend::~HeadlessViewBackend):
(WPEToolingBackends::HeadlessViewBackend::backend const):
(WPEToolingBackends::HeadlessViewBackend::snapshot):
(WPEToolingBackends::HeadlessViewBackend::updateSnapshot):
(WPEToolingBackends::HeadlessViewBackend::vsync):
(): Deleted.
(WPEToolingBackends::HeadlessEGLConnection::singleton): Deleted.
(WPEToolingBackends::HeadlessViewBackend::createSnapshot): Deleted.
(WPEToolingBackends::HeadlessViewBackend::createEGLSnapshot): Deleted.
(WPEToolingBackends::HeadlessViewBackend::createSHMSnapshot): Deleted.
(WPEToolingBackends::HeadlessViewBackend::performUpdate): Deleted.
(WPEToolingBackends::HeadlessViewBackend::displayBuffer): Deleted.
* wpe/backends/HeadlessViewBackend.h:
* wpe/backends/ViewBackend.cpp:
(WPEToolingBackends::ViewBackend::initialize): Deleted.
(WPEToolingBackends::ViewBackend::deinitialize): Deleted.
(WPEToolingBackends::ViewBackend::backend const): Deleted.
* wpe/backends/ViewBackend.h:
* wpe/backends/WindowViewBackend.cpp:
(WPEToolingBackends::WindowViewBackend::backend const):
(WPEToolingBackends::WindowViewBackend::initialize):
(WPEToolingBackends::WindowViewBackend::deinitialize):
* wpe/backends/WindowViewBackend.h:
Canonical link: https://commits.webkit.org/224941@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@261851 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=207473
Patch by Michael Catanzaro <mcatanzaro@gnome.org> on 2020-05-04
Reviewed by Adrian Perez de Castro.
If python3-secretstorage is not installed, webkit-patch will use a custom encrypted file
for password storage instead of utilizing the system keyring. This means unnecessary
password prompts to unlock the custom encrypted key storage.
There is no benefit to using custom key storage over the system keyring.
* gtk/install-dependencies:
* wpe/install-dependencies:
Canonical link: https://commits.webkit.org/224262@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@261087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=205658
Reviewed by Carlos Alberto Lopez Perez.
Source/WebCore:
* platform/text/hyphen/HyphenationLibHyphen.cpp:
(WebCore::scanTestDictionariesDirectoryIfNecessary): Check for flatpak-installed dictionaries.
Tools:
JHBuild will now be used only if the WEBKIT_JHBUILD environment
variable is set to 1, which is the case for the time being on the
GTK and WPE EWS/build bots.
By default the build dependencies are now locally installed from a
Flatpak repository hosted at https://software.igalia.com. The
repository can be regenerated with the scripts from the
webkit-flatpak-sdk Github project
(https://github.com/Igalia/webkit-flatpak-sdk). This is done
transparently with the update-webkit{gtk,wpe}-libs scripts. As
there is no need to rebuild the dependencies from scratch, the
developer user-experience should now be much more friendly and
overall build times reduced.
As an additional commodity, the new environment supports the
GStreamer gst-build-based workflow. Just set the GST_BUILD_PATH
environment variable to your gst-build path. This feature was
contributed by Thibault Saunier.
The JHBuild infrastructure will be removed once all the bots have
been switched over to Flatpak.
* BuildSlaveSupport/ews-build/steps.py:
(InstallGtkDependencies):
(InstallWpeDependencies):
(CompileWebKit.start):
* BuildSlaveSupport/gtk/buildbot/run:
* Scripts/build-webkit:
* Scripts/run-bindings-tests:
* Scripts/run-builtins-generator-tests:
* Scripts/run-gtk-tests:
* Scripts/run-javascriptcore-tests:
* Scripts/run-minibrowser:
* Scripts/run-qt-wpe-minibrowser:
* Scripts/run-webdriver-tests:
* Scripts/run-wpe-tests:
* Scripts/test-webkitperl:
* Scripts/test-webkitpy:
* Scripts/test262-runner:
* Scripts/update-webkit-flatpak: Renamed from Tools/Scripts/update-webkitgtk-flatpak.
* Scripts/update-webkitgtk-libs:
* Scripts/update-webkitwpe-flatpak: Removed.
* Scripts/update-webkitwpe-libs:
* Scripts/webkitdirs.pm:
(getUserFlatpakPath):
(inFlatpakSandbox):
(runInFlatpakIfAvailable):
(wrapperPrefixIfNeeded):
(shouldUseJhbuild):
(shouldUseFlatpak):
(shouldRemoveCMakeCache):
* Scripts/webkitpy/common/system/executive.py:
(Executive.kill_all):
* Scripts/webkitpy/port/base.py:
(Port._path_to_apache):
(Port._should_run_as_pixel_test):
(Port._in_flatpak_sandbox):
* Scripts/webkitpy/port/gtk.py:
(GtkPort.setup_environ_for_server):
(GtkPort._get_crash_log):
* Scripts/webkitpy/port/linux_get_crash_log.py:
(GDBCrashLogGenerator):
(GDBCrashLogGenerator.__init__):
(GDBCrashLogGenerator.generate_crash_log):
* Scripts/webkitpy/port/linux_get_crash_log_unittest.py:
(GDBCrashLogGeneratorTest.test_generate_crash_log):
* Scripts/webkitpy/port/wpe.py:
(WPEPort.setup_environ_for_server):
(WPEPort._get_crash_log):
* Scripts/webkitpy/port/xvfbdriver.py:
(XvfbDriver._setup_environ_for_test):
* WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp:
(WTR::getFontsPath):
* WebKitTestRunner/InjectedBundle/wpe/ActivateFontsWPE.cpp:
(WTR::getFontsPath):
* flatpak/files/default.xkm: Removed.
* flatpak/files/httpd-autogen.sh: Removed.
* flatpak/flatpakutils.py:
(check_flatpak):
(FlatpakRepos.update):
(FlatpakPackage.__repr__):
(FlatpakPackage.__str__):
(WebkitFlatpak.load_from_args):
(WebkitFlatpak.__init__):
(WebkitFlatpak.clean_args):
(WebkitFlatpak.setup_builddir):
(WebkitFlatpak):
(WebkitFlatpak.setup_gstbuild):
(WebkitFlatpak.run_in_sandbox):
(WebkitFlatpak.run):
(WebkitFlatpak.has_environment):
(WebkitFlatpak.save_config):
(WebkitFlatpak.setup_dev_env):
(WebkitFlatpak.install_all):
(WebkitFlatpak.run_gdb):
* flatpak/org.webkit.CommonModules.yaml: Removed.
* flatpak/org.webkit.GTK.yaml: Removed.
* flatpak/org.webkit.WPE.yaml: Removed.
* flatpak/org.webkit.WPEModules.yaml: Removed.
* flatpak/org.webkit.WPEQT.yaml: Removed.
* flatpak/org.webkit.WebKit.yaml: Removed.
* flatpak/patches/httpd-0001-configure-use-pkg-config-for-PCRE-detection.patch: Removed.
* flatpak/patches/libgcrypt-0001-Use-pkg-config-to-detect-gpg-error.patch: Removed.
* flatpak/patches/xvfb-0001-HACK-Avoid-compiling-a-kbm-file.patch: Removed.
LayoutTests:
* http/conf/flatpak-httpd.conf: Adjust paths.
Canonical link: https://commits.webkit.org/222139@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258626 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=207970
Reviewed by Adrian Perez de Castro.
.:
Redo the WPE find module to export a target.
* Source/cmake/FindWPE.cmake:
Source/WebCore:
Use the WPE::libwpe target.
* PlatformGTK.cmake:
* PlatformPlayStation.cmake:
* PlatformWPE.cmake:
Source/WebKit:
Use the WPE::libwpe target.
* PlatformGTK.cmake:
* PlatformWPE.cmake:
Tools:
Use the WPE::libwpe target.
* MiniBrowser/wpe/CMakeLists.txt:
* TestWebKitAPI/PlatformWPE.cmake:
* TestWebKitAPI/glib/PlatformWPE.cmake:
* wpe/backends/CMakeLists.txt:
Canonical link: https://commits.webkit.org/220966@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257053 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=207881
Reviewed by Carlos Garcia Campos.
Source/WebKit:
WPE's WebEventFactory should also handle axis events that are capable
of providing information about axis change in both dimensions. In case
of smooth motion, the delta values should be preserved and not
transformed into line-steps.
Similarly, the ScrollGestureController should also adopt the 2D axis
event type, producing smooth-motion events when dispatching handling
a scroll gesture.
The changes are guarded and only enabled when building against at least
libwpe 1.5.0 since that's when the new API was added.
* Shared/libwpe/WebEventFactory.cpp:
(WebKit::WebEventFactory::createWebWheelEvent):
* UIProcess/API/wpe/ScrollGestureController.cpp:
(WebKit::ScrollGestureController::handleEvent):
* UIProcess/API/wpe/ScrollGestureController.h:
(WebKit::ScrollGestureController::axisEvent):
Tools:
* wpe/jhbuild.modules: Bump to a newer libwpe commit.
Canonical link: https://commits.webkit.org/220909@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256913 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=206925
Reviewed by Carlos Garcia Campos.
Add cups-daemon to the list of packages to be installed, which is necessary to sucessfully
run the printing related GTK API tests. Add also the liberation fonts, which are needed to
run the complex text controller API tests.
* gtk/install-dependencies:
* wpe/install-dependencies: Don't add cups packages, because WPE currently doesn't run print-related API test.
Canonical link: https://commits.webkit.org/219947@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255353 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=206283
Reviewed by Adrian Perez de Castro.
The ViewBackend class should also handle any SHM-based exports from
the wpe_view_backend_exportable_fdo_egl instance. In case of such an
export, the buffer is transported down into the implementing object.
For WindowViewBackend, we do nothing with this yet, except emit a
warning. For HeadlessViewBackend, we repeat what's currently done with
EGL exports, storing pending updates until the update timer is fired
and we move the buffer into the locked position, clearing up any
previous locked buffer.
Upon creating a snapshot of the current contents, we add additional
separation in how EGL and SHM exports are handled. Nothing changes
for the former, while for the latter we simply retrieve the
wl_shm_buffer object, map it, copy data from it into the pixel data
storage that's basis for the returned Cairo surface, and unmap it.
* Scripts/webkitpy/port/wpe.py:
(WPEPort.setup_environ_for_server): Copy the LIBGL_ALWAYS_SOFTWARE
environment variable, if present. This variable is normally used to
force Mesa into software rasterizing mode.
* wpe/backends/HeadlessViewBackend.cpp:
(WPEToolingBackends::HeadlessViewBackend::~HeadlessViewBackend):
(WPEToolingBackends::HeadlessViewBackend::createSnapshot):
(WPEToolingBackends::HeadlessViewBackend::createEGLSnapshot):
(WPEToolingBackends::HeadlessViewBackend::createSHMSnapshot):
(WPEToolingBackends::HeadlessViewBackend::performUpdate):
(WPEToolingBackends::HeadlessViewBackend::displayBuffer):
* wpe/backends/HeadlessViewBackend.h:
* wpe/backends/ViewBackend.cpp:
(WPEToolingBackends::ViewBackend::initialize):
* wpe/backends/ViewBackend.h:
* wpe/backends/WindowViewBackend.cpp:
* wpe/backends/WindowViewBackend.h:
Canonical link: https://commits.webkit.org/219548@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254810 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=206289
Patch by Philippe Normand <philn@igalia.com> on 2020-01-16
Reviewed by Xabier Rodriguez-Calvar.
.:
Add a new compile-time option to enable client-side video
rendering support. With this feature enabled the UIProcess will be
in charge of positioning and rendering video surfaces, thanks to
the WPEBackend-FDO video-plane-display-dmabuf protocol.
* Source/cmake/GStreamerDefinitions.cmake: Add
USE_WPE_VIDEO_PLANE_DISPLAY_DMABUF CMake option, disabled by
default.
* Source/cmake/GStreamerDependencies.cmake: This new option
depends on GStreamer-GL.
* Source/cmake/OptionsWPE.cmake: It depends also on the presence
of the WPEBackend-FDO library.
Source/WebCore:
With the WPE_VIDEO_PLANE_DISPLAY_DMABUF option enabled the player
will render a transparent placeholder for videos, using the
HolePunch code path. Then it is up to the UIProcess to listen to
the incoming video dmabufs and render them. This allows the
browser to use Wayland protocols related with Protection (HDCP,
for instance).
* PlatformWPE.cmake:
* platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
(WTF::adoptGRef):
(WTF::refGPtr<GstEGLImage>):
(WTF::derefGPtr<GstEGLImage>):
* platform/graphics/gstreamer/GRefPtrGStreamer.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
(WebCore::GstVideoFrameHolder::handoffVideoDmaBuf):
(WebCore::GstVideoFrameHolder::waitForCPUSync):
(WebCore::GstVideoFrameHolder::updateTexture):
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::didEnd):
(WebCore::GStreamerDMABufHolePunchClient::GStreamerDMABufHolePunchClient):
(WebCore::MediaPlayerPrivateGStreamer::pushTextureToCompositor):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
Tools:
* wpe/jhbuild.modules: Bump to libwpe and wpebackend-fdo git
snapshots, until 1.5.x releases are published.
Canonical link: https://commits.webkit.org/219432@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254682 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=204568
Reviewed by Frédéric Wang.
Gawk 5 throws errors when compiling libgpg-error. To avoid those, we
have to bump libgpg-error to the latest 1.36 version and have the
upstream fix applied on top of that.
Autoreconf has to be invoked to regenerate automake files. Because
autogen.sh script (which is present in the release tarballs) falters
under jhbuild, we invoke autoreconf directly for libgpg-error builds.
* gtk/jhbuild.modules:
* gtk/patches/libgpg-error-prepare-for-gawk-5-0.patch: Added.
* wpe/jhbuild.modules:
* wpe/patches/libgpg-error-prepare-for-gawk-5-0.patch: Added.
Canonical link: https://commits.webkit.org/217820@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@252845 268f45cc-cd09-0410-ab3c-d52691b4dbfc