Truly independent web browser
Meta: Remove the style FFI baseline workloads
Andreas Kling1c7c7fdc1eed
diff --git a/Meta/StyleFfiBaseline/animation-transition.html b/Meta/StyleFfiBaseline/animation-transition.htmldeleted file mode 100644index 3843737d653..00000000000--- a/Meta/StyleFfiBaseline/animation-transition.html+++ /dev/null@@ -1,39 +0,0 @@-<!DOCTYPE html>-<script src="../../include.js"></script>-<script src="harness.js"></script>-<script>- // Animation and transition updates: 20 paused-animation elements plus 20- // elements whose transitioned property flips once.- test(() => {- const style = document.createElement("style");- style.textContent = `- @keyframes spin { from { transform: rotate(0deg); opacity: 0.2; } to { transform: rotate(360deg); opacity: 0.8; } }- @keyframes move { from { margin-top: 0px; } to { margin-top: 100px; } }- .animated { animation: spin 10s linear infinite paused, move 10s linear infinite paused; }- .transitioned { transition: margin-left 10s linear; margin-left: 0px; }- .moved { margin-left: 100px; }`;- document.head.appendChild(style);-- const root = document.createElement("div");- const transitioned = [];- for (let i = 0; i < 20; ++i) {- const animated = document.createElement("div");- animated.className = "animated";- root.appendChild(animated);- const element = document.createElement("div");- element.className = "transitioned";- root.appendChild(element);- transitioned.push(element);- }- document.body.appendChild(root);- internals.updateStyle();-- internals.resetStyleFfiCounters();- for (const element of transitioned)- element.classList.add("moved");- internals.updateStyle();- const counters = internals.styleFfiCounters();- for (const key of Object.keys(counters))- println(`${key}: ${counters[key]}`);- });-</script>diff --git a/Meta/StyleFfiBaseline/collect.py b/Meta/StyleFfiBaseline/collect.pydeleted file mode 100755index 0a15c9dd9f5..00000000000--- a/Meta/StyleFfiBaseline/collect.py+++ /dev/null@@ -1,43 +0,0 @@-#!/usr/bin/env python3-"""Runs the style FFI baseline workloads and prints the per-workload FFI-boundary counters (see internals.styleFfiCounters()).--The workloads are deterministic pages that build a DOM shape, force a style-update, and print every counter. They are copied into the LibWeb test tree-for the run so test-web can drive them, then removed again; the printed-counts are a measurement of the current boundary, not a regression test.--Usage: Meta/StyleFfiBaseline/collect.py [build-dir]-"""--import pathlib-import shutil-import subprocess-import sys--script_dir = pathlib.Path(__file__).resolve().parent-repo_root = script_dir.parent.parent-build_dir = pathlib.Path(sys.argv[1]) if len(sys.argv) > 1 else repo_root / "Build" / "release"--input_dir = repo_root / "Tests" / "LibWeb" / "Text" / "input" / "css" / "ffi-baseline"-expected_dir = repo_root / "Tests" / "LibWeb" / "Text" / "expected" / "css" / "ffi-baseline"--try:- input_dir.mkdir(parents=True)- for page in sorted(script_dir.glob("*.html")):- shutil.copy(page, input_dir)- shutil.copy(script_dir / "harness.js", input_dir)-- subprocess.run(- ["./bin/test-web", "--rebaseline", "-f", "Text/input/css/ffi-baseline"],- cwd=build_dir,- check=True,- stdout=subprocess.DEVNULL,- )-- for expected in sorted(expected_dir.glob("*.txt")):- print(f"=== {expected.stem}")- print(expected.read_text(), end="")-finally:- shutil.rmtree(input_dir, ignore_errors=True)- shutil.rmtree(expected_dir, ignore_errors=True)diff --git a/Meta/StyleFfiBaseline/custom-property-heavy.html b/Meta/StyleFfiBaseline/custom-property-heavy.htmldeleted file mode 100644index aac85401f43..00000000000--- a/Meta/StyleFfiBaseline/custom-property-heavy.html+++ /dev/null@@ -1,27 +0,0 @@-<!DOCTYPE html>-<script src="../../include.js"></script>-<script src="harness.js"></script>-<script>- // Custom-property-heavy DOM: 50 custom properties on the root, 100- // descendants consuming them through var().- runFfiBaselineWorkload(() => {- let rootCss = ":root {";- for (let i = 0; i < 50; ++i)- rootCss += `--v${i}: ${i}px;`;- rootCss += "}\n";- for (let i = 0; i < 10; ++i)- rootCss += `.u${i} { margin-left: var(--v${i}); padding-left: var(--v${i + 10}, 3px); }\n`;- const style = document.createElement("style");- style.textContent = rootCss;- document.head.appendChild(style);-- const root = document.createElement("div");- for (let i = 0; i < 100; ++i) {- const child = document.createElement("div");- child.className = `u${i % 10}`;- child.textContent = "x";- root.appendChild(child);- }- document.body.appendChild(root);- });-</script>diff --git a/Meta/StyleFfiBaseline/harness.js b/Meta/StyleFfiBaseline/harness.jsdeleted file mode 100644index a48582c6f02..00000000000--- a/Meta/StyleFfiBaseline/harness.js+++ /dev/null@@ -1,11 +0,0 @@-// Shared harness for the (temporary) style FFI baseline workloads: runs the-// workload with counters reset, then prints every counter.-function runFfiBaselineWorkload(workload) {- test(() => {- internals.resetStyleFfiCounters();- workload();- internals.updateStyle();- const counters = internals.styleFfiCounters();- for (const key of Object.keys(counters)) println(`${key}: ${counters[key]}`);- });-}diff --git a/Meta/StyleFfiBaseline/inheritance-heavy.html b/Meta/StyleFfiBaseline/inheritance-heavy.htmldeleted file mode 100644index 27d001d5c2d..00000000000--- a/Meta/StyleFfiBaseline/inheritance-heavy.html+++ /dev/null@@ -1,21 +0,0 @@-<!DOCTYPE html>-<script src="../../include.js"></script>-<script src="harness.js"></script>-<script>- // Inheritance-heavy DOM: a 200-deep chain inheriting from a styled root.- runFfiBaselineWorkload(() => {- const root = document.createElement("div");- root.style.color = "rebeccapurple";- root.style.fontSize = "13px";- root.style.letterSpacing = "1px";- root.style.lineHeight = "1.5";- let current = root;- for (let i = 0; i < 200; ++i) {- const child = document.createElement("div");- current.appendChild(child);- current = child;- }- current.textContent = "leaf";- document.body.appendChild(root);- });-</script>diff --git a/Meta/StyleFfiBaseline/shadow-slots-parts.html b/Meta/StyleFfiBaseline/shadow-slots-parts.htmldeleted file mode 100644index ceae2c9eda9..00000000000--- a/Meta/StyleFfiBaseline/shadow-slots-parts.html+++ /dev/null@@ -1,32 +0,0 @@-<!DOCTYPE html>-<script src="../../include.js"></script>-<script src="harness.js"></script>-<script>- // Shadow DOM with slots and parts: 25 components, slotted light-dom- // children, ::part styling from the outer tree.- runFfiBaselineWorkload(() => {- const style = document.createElement("style");- style.textContent = ".component::part(inner) { color: teal; } .component { display: block; }";- document.head.appendChild(style);-- const root = document.createElement("div");- for (let i = 0; i < 25; ++i) {- const host = document.createElement("div");- host.className = "component";- const shadow = host.attachShadow({ mode: "open" });- const shadowStyle = document.createElement("style");- shadowStyle.textContent = "::slotted(span) { font-weight: bold; } .inner { margin: 1px; }";- shadow.appendChild(shadowStyle);- const inner = document.createElement("div");- inner.className = "inner";- inner.setAttribute("part", "inner");- inner.appendChild(document.createElement("slot"));- shadow.appendChild(inner);- const slotted = document.createElement("span");- slotted.textContent = "s";- host.appendChild(slotted);- root.appendChild(host);- }- document.body.appendChild(root);- });-</script>diff --git a/Meta/StyleFfiBaseline/single-element-restyle.html b/Meta/StyleFfiBaseline/single-element-restyle.htmldeleted file mode 100644index 1c1afd83eee..00000000000--- a/Meta/StyleFfiBaseline/single-element-restyle.html+++ /dev/null@@ -1,31 +0,0 @@-<!DOCTYPE html>-<script src="../../include.js"></script>-<script src="harness.js"></script>-<script>- // Targeted single-element restyle: style a 100-element tree first, then- // measure only the restyle caused by one class flip.- test(() => {- const style = document.createElement("style");- style.textContent = ".hot { color: crimson; background-color: lavender; }";- document.head.appendChild(style);-- const root = document.createElement("div");- let target = null;- for (let i = 0; i < 100; ++i) {- const child = document.createElement("div");- child.textContent = "x";- root.appendChild(child);- if (i === 50)- target = child;- }- document.body.appendChild(root);- internals.updateStyle();-- internals.resetStyleFfiCounters();- target.className = "hot";- internals.updateStyle();- const counters = internals.styleFfiCounters();- for (const key of Object.keys(counters))- println(`${key}: ${counters[key]}`);- });-</script>diff --git a/Meta/StyleFfiBaseline/small-document.html b/Meta/StyleFfiBaseline/small-document.htmldeleted file mode 100644index d9f61882137..00000000000--- a/Meta/StyleFfiBaseline/small-document.html+++ /dev/null@@ -1,15 +0,0 @@-<!DOCTYPE html>-<script src="../../include.js"></script>-<script src="harness.js"></script>-<script>- // Initial style of a small document: 20 plain elements, no author rules.- runFfiBaselineWorkload(() => {- const root = document.createElement("div");- for (let i = 0; i < 19; ++i) {- const child = document.createElement("div");- child.textContent = "x";- root.appendChild(child);- }- document.body.appendChild(root);- });-</script>diff --git a/Meta/StyleFfiBaseline/stylesheet-heavy.html b/Meta/StyleFfiBaseline/stylesheet-heavy.htmldeleted file mode 100644index 204de2b8c11..00000000000--- a/Meta/StyleFfiBaseline/stylesheet-heavy.html+++ /dev/null@@ -1,23 +0,0 @@-<!DOCTYPE html>-<script src="../../include.js"></script>-<script src="harness.js"></script>-<script>- // Stylesheet-heavy document: 500 class rules, 100 elements matching some of them.- runFfiBaselineWorkload(() => {- let css = "";- for (let i = 0; i < 500; ++i)- css += `.c${i} { color: rgb(${i % 256}, 0, 0); margin-left: ${i % 7}px; }\n`;- const style = document.createElement("style");- style.textContent = css;- document.head.appendChild(style);-- const root = document.createElement("div");- for (let i = 0; i < 100; ++i) {- const child = document.createElement("div");- child.className = `c${i * 5} other${i}`;- child.textContent = "x";- root.appendChild(child);- }- document.body.appendChild(root);- });-</script>