Skip to content

Instantly share code, notes, and snippets.

@lauromoura
lauromoura / sdk_21.08_update.md
Last active Sep 20, 2021
WebKit Flatpak SDK 21.08 update package comparison
View sdk_21.08_update.md

WebKit flatpak SDK version comparison

SDK versions:

  • 21.08: r282308
  • 0.3: r280380

Packages with different versions

| package | 21.08 | 0.3 |

@lauromoura
lauromoura / browser.py
Created Sep 18, 2021
WebKitGTK Hello World
View browser.py
#!/usr/bin/env python3
from urllib.parse import urlparse
import gi
gi.require_version("Gtk", "3.0")
gi.require_version("WebKit2", "4.0")
from gi.repository import Gtk
from gi.repository import WebKit2
@lauromoura
lauromoura / patch.diff
Created Jul 29, 2021
Webkitgtk/wpe buildfix
View patch.diff
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 3dabc55867d0..8de67e814021 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,14 @@
+2021-07-29 Lauro Moura <lmoura@igalia.com>
+
+ REGRESSION(r280423) [GSTREAMER][EME] Add missing gpg-error library
+ Need the bug URL (OOPS!).
+
@lauromoura
lauromoura / wpe_lichess.py
Last active May 31, 2021
WPE WebDriver demo with lichess
View wpe_lichess.py
# Copyright (C) 2021 Igalia S.L.
#
# Distributed under terms of the MIT license.
import argparse
import sys
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
@lauromoura
lauromoura / webkit-bwrap.diff
Created Feb 10, 2021
webkit-bwrap debugging
View webkit-bwrap.diff
diff --git a/Tools/flatpak/flatpakutils.py b/Tools/flatpak/flatpakutils.py
index b4061a5d1886..a2663c87b663 100644
--- a/Tools/flatpak/flatpakutils.py
+++ b/Tools/flatpak/flatpakutils.py
@@ -852,6 +852,8 @@ class WebkitFlatpak:
for envvar, value in sandbox_environment.items():
flatpak_command.append("--env=%s=%s" % (envvar, value))
+ flatpak_command.append("--env=WEBKIT_FOO=42")
+
@lauromoura
lauromoura / gist:de2bba50e5d5b6aa3258e0b3871039a2
Created Jan 27, 2021
Python3 issue in run-webdriver-tests
View gist:de2bba50e5d5b6aa3258e0b3871039a2
webkitpy.common.system.logutils: [DEBUG] Debug logging enabled.
webkitpy.port.win: [DEBUG] Not running on native Windows.
webkitpy.webdriver_tests.webdriver_test_runner: [INFO] Using port gtk
webkitpy.webdriver_tests.webdriver_test_runner: [INFO] Test configuration: <, x86, release>
webkitpy.webdriver_tests.webdriver_test_runner: [INFO] Using display server xvfb
webkitpy.common.system.executive: [DEBUG] "which Xvfb" took 0.00s
webkitpy.common.system.executive: [DEBUG] "perl Tools/Scripts/webkit-build-directory --configuration --release --gtk" took 0.09s
webkitpy.webdriver_tests.webdriver_test_runner: [INFO] Using driver at /home/lauro/dev/WebKit/WebKitBuild/Release/bin/WebKitWebDriver
webkitpy.webdriver_tests.webdriver_test_runner: [INFO] Browser: MiniBrowser
webkitpy.webdriver_tests.webdriver_test_runner: [INFO] Parsing expectations
@lauromoura
lauromoura / kill.patch
Created Sep 9, 2020
kill-old-processes fix
View kill.patch
diff --git a/Tools/BuildSlaveSupport/kill-old-processes b/Tools/BuildSlaveSupport/kill-old-processes
index 880258d1c324..d831e3b5be45 100755
--- a/Tools/BuildSlaveSupport/kill-old-processes
+++ b/Tools/BuildSlaveSupport/kill-old-processes
@@ -180,7 +180,7 @@ def main(user=None):
builddir_bin = "WebKitBuild/Release/bin" if os.path.isdir("WebKitBuild/Release/bin") else "WebKitBuild/Debug/bin"
for task in tasksToKill + taskToKillUnix + listAllWebKitPrograms(builddir_bin):
os.system("killall -9 -v " + task)
- os.system("ps aux | grep -P '.+/python .+(run_webkit_tests|run-webkit-tests|mod_pywebsocket)' | grep -v grep | awk '{print $2}' | xargs kill")
+ os.system("ps aux | grep -P '.+/python .+(run_webkit_tests|run-webkit-tests|mod_pywebsocket)' | grep -v grep | awk '{print $2}' | xargs -r kill")
View output.txt
go //rb:bundle # Install gem dependencies for the current Ruby
go //rb:cdp # Call class cdp in build/rb
go //rb:chrome # Build chrome in build/rb
go //rb:chrome-test # Run ruby tests for chrome
go //rb:common # Build common in build/rb
go //rb:devtools # Build devtools in build/rb
go //rb:docs # Generate Ruby API docs
go //rb:edge # Build edge in build/rb
go //rb:edge-chrome # Build edge-chrome in build/rb
go //rb:edge-chrome-test # Run ruby tests for edge-chrome
@lauromoura
lauromoura / parallel_wtr.py
Created Apr 9, 2020
Script to try to run multiple WTR in parallel
View parallel_wtr.py
#!/usr/bin/python3
import os
import sys
import argparse
from multiprocessing import Pool
def parse_args():
parser = argparse.ArgumentParser()
@lauromoura
lauromoura / disk-cache.patch
Created Mar 24, 2020
WebkitGTK disk-cache fix
View disk-cache.patch
From a5b0d220c1527e5a06db46505bc56f7c49ae57b5 Mon Sep 17 00:00:00 2001
From: Lauro Moura <lmoura@igalia.com>
Date: Tue, 24 Mar 2020 00:28:13 -0300
Subject: [PATCH xserver] [GTK] Using --skip-failing-tests cause some
disk-cache tests to fail https://bugs.webkit.org/show_bug.cgi?id=209338
Reviewed by NOBODY (OOPS!).
GLIB's getVolumeFreeSpace implementation requires the file to exist to
return the correct size. During the NetworkProcess initialization it