Skip to content
Permalink
Browse files
[GTK][WPE] Refactor the XDGDBusProxy launcher to simplify it and fix …
…some issues

https://bugs.webkit.org/show_bug.cgi?id=236437

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Make accessibility bus address API available for ATK too.

* platform/graphics/PlatformDisplay.cpp:
* platform/graphics/PlatformDisplay.h:
* platform/graphics/x11/PlatformDisplayX11.cpp:
* platform/graphics/x11/PlatformDisplayX11.h:

Source/WebKit:

This patch moves the XDGDBusProxy launcher implementation to its own file and fixes the following issues:

  - r289369 introduced an issue with old versions of bwrap that fails to mount over an existing file, so we need
    to ensure we only bind the original socket for the a11y socket and not the session bus one.
  - bindA11y is GTK specific for some reason, which means WPE doesn't have a11y under the sandbox.
  - The names of the socket paths for a11y and session bus use the same pattern dbus-proxy-XXXXXX, it helps to
    use a different one.
  - The code to get the a11y DBus address is now duplicated in PlatformDisplay, we can just use the
    PlatformDisplay to get the address.

* SourcesGTK.txt:
* SourcesWPE.txt:
* UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
(WebKit::argumentsToFileDescriptor):
(WebKit::bindDBusSession):
(WebKit::bindA11y):
(WebKit::bubblewrapSpawn):
(WebKit::argsToFd): Deleted.
(WebKit::XDGDBusProxyLauncher::setAddress): Deleted.
(WebKit::XDGDBusProxyLauncher::isRunning const): Deleted.
(WebKit::XDGDBusProxyLauncher::path const): Deleted.
(WebKit::XDGDBusProxyLauncher::proxyPath const): Deleted.
(WebKit::XDGDBusProxyLauncher::setPermissions): Deleted.
(WebKit::XDGDBusProxyLauncher::launch): Deleted.
(WebKit::XDGDBusProxyLauncher::makeProxyPath): Deleted.
(WebKit::XDGDBusProxyLauncher::dbusAddressToPath): Deleted.
(): Deleted.
* UIProcess/Launcher/glib/BubblewrapLauncher.h:
* UIProcess/Launcher/glib/XDGDBusProxy.cpp: Added.
(WebKit::XDGDBusProxy::XDGDBusProxy):
(WebKit::XDGDBusProxy::makeProxy const):
(WebKit::XDGDBusProxy::launch const):
* UIProcess/Launcher/glib/XDGDBusProxy.h: Added.
(WebKit::XDGDBusProxy::proxyPath const):
(WebKit::XDGDBusProxy::path const):


Canonical link: https://commits.webkit.org/247059@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289528 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
carlosgcampos committed Feb 10, 2022
1 parent a013922 commit 2dbb11247d999671af1c8bd14837fcf4961e1c53
Showing 12 changed files with 350 additions and 233 deletions.
@@ -1,3 +1,17 @@
2022-02-10 Carlos Garcia Campos <cgarcia@igalia.com>

[GTK][WPE] Refactor the XDGDBusProxy launcher to simplify it and fix some issues
https://bugs.webkit.org/show_bug.cgi?id=236437

Reviewed by Adrian Perez de Castro.

Make accessibility bus address API available for ATK too.

* platform/graphics/PlatformDisplay.cpp:
* platform/graphics/PlatformDisplay.h:
* platform/graphics/x11/PlatformDisplayX11.cpp:
* platform/graphics/x11/PlatformDisplayX11.h:

2022-02-10 Rob Buis <rbuis@igalia.com>

Incorrect abspos layout when toggling contain
@@ -293,7 +293,7 @@ cmsHPROFILE PlatformDisplay::colorProfile() const
}
#endif

#if USE(ATSPI)
#if USE(ATSPI) || USE(ATK)
const String& PlatformDisplay::accessibilityBusAddress() const
{
if (m_accessibilityBusAddress)
@@ -90,7 +90,7 @@ class PlatformDisplay {
virtual cmsHPROFILE colorProfile() const;
#endif

#if USE(ATSPI)
#if USE(ATSPI) || USE(ATK)
void setAccessibilityBusAddress(String&& address) { m_accessibilityBusAddress = WTFMove(address); }
const String& accessibilityBusAddress() const;
#endif
@@ -117,7 +117,7 @@ class PlatformDisplay {
mutable LCMSProfilePtr m_iccProfile;
#endif

#if USE(ATSPI)
#if USE(ATSPI) || USE(ATK)
virtual String plartformAccessibilityBusAddress() const { return { }; }

mutable std::optional<String> m_accessibilityBusAddress;
@@ -217,7 +217,7 @@ cmsHPROFILE PlatformDisplayX11::colorProfile() const
}
#endif

#if USE(ATSPI)
#if USE(ATSPI) || USE(ATK)
String PlatformDisplayX11::plartformAccessibilityBusAddress() const
{
Atom atspiBusAtom = XInternAtom(m_display, "AT_SPI_BUS", False);
@@ -64,7 +64,7 @@ class PlatformDisplayX11 final : public PlatformDisplay {
cmsHPROFILE colorProfile() const override;
#endif

#if USE(ATSPI)
#if USE(ATSPI) || USE(ATK)
String plartformAccessibilityBusAddress() const override;
#endif

@@ -1,3 +1,46 @@
2022-02-10 Carlos Garcia Campos <cgarcia@igalia.com>

[GTK][WPE] Refactor the XDGDBusProxy launcher to simplify it and fix some issues
https://bugs.webkit.org/show_bug.cgi?id=236437

Reviewed by Adrian Perez de Castro.

This patch moves the XDGDBusProxy launcher implementation to its own file and fixes the following issues:

- r289369 introduced an issue with old versions of bwrap that fails to mount over an existing file, so we need
to ensure we only bind the original socket for the a11y socket and not the session bus one.
- bindA11y is GTK specific for some reason, which means WPE doesn't have a11y under the sandbox.
- The names of the socket paths for a11y and session bus use the same pattern dbus-proxy-XXXXXX, it helps to
use a different one.
- The code to get the a11y DBus address is now duplicated in PlatformDisplay, we can just use the
PlatformDisplay to get the address.

* SourcesGTK.txt:
* SourcesWPE.txt:
* UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
(WebKit::argumentsToFileDescriptor):
(WebKit::bindDBusSession):
(WebKit::bindA11y):
(WebKit::bubblewrapSpawn):
(WebKit::argsToFd): Deleted.
(WebKit::XDGDBusProxyLauncher::setAddress): Deleted.
(WebKit::XDGDBusProxyLauncher::isRunning const): Deleted.
(WebKit::XDGDBusProxyLauncher::path const): Deleted.
(WebKit::XDGDBusProxyLauncher::proxyPath const): Deleted.
(WebKit::XDGDBusProxyLauncher::setPermissions): Deleted.
(WebKit::XDGDBusProxyLauncher::launch): Deleted.
(WebKit::XDGDBusProxyLauncher::makeProxyPath): Deleted.
(WebKit::XDGDBusProxyLauncher::dbusAddressToPath): Deleted.
(): Deleted.
* UIProcess/Launcher/glib/BubblewrapLauncher.h:
* UIProcess/Launcher/glib/XDGDBusProxy.cpp: Added.
(WebKit::XDGDBusProxy::XDGDBusProxy):
(WebKit::XDGDBusProxy::makeProxy const):
(WebKit::XDGDBusProxy::launch const):
* UIProcess/Launcher/glib/XDGDBusProxy.h: Added.
(WebKit::XDGDBusProxy::proxyPath const):
(WebKit::XDGDBusProxy::path const):

2022-02-10 Kimmo Kinnunen <kkinnunen@apple.com>

Introduce a RemoteMediaSampleProxy to represent captured video frames used in Media Streams and present in GPUP
@@ -234,6 +234,7 @@ UIProcess/Inspector/gtk/WebKitInspectorWindow.cpp
UIProcess/Launcher/glib/ProcessLauncherGLib.cpp @no-unify
UIProcess/Launcher/glib/BubblewrapLauncher.cpp @no-unify
UIProcess/Launcher/glib/FlatpakLauncher.cpp @no-unify
UIProcess/Launcher/glib/XDGDBusProxy.cpp @no-unify

UIProcess/linux/MemoryPressureMonitor.cpp

@@ -210,6 +210,7 @@ UIProcess/glib/WebsiteDataStoreGLib.cpp @no-unify
UIProcess/Launcher/glib/ProcessLauncherGLib.cpp
UIProcess/Launcher/glib/BubblewrapLauncher.cpp
UIProcess/Launcher/glib/FlatpakLauncher.cpp
UIProcess/Launcher/glib/XDGDBusProxy.cpp

UIProcess/WebsiteData/soup/WebsiteDataStoreSoup.cpp
UIProcess/WebsiteData/unix/WebsiteDataStoreUnix.cpp

0 comments on commit 2dbb112

Please sign in to comment.