diff --git a/Plans/08 WebKit engine/S054-site-pass.md b/Plans/08 WebKit engine/S054-site-pass.md index 4b2c220..e944d74 100644 --- a/Plans/08 WebKit engine/S054-site-pass.md +++ b/Plans/08 WebKit engine/S054-site-pass.md @@ -12,8 +12,8 @@ Supersedes the Servo-era site work of S041 for the engine part. - D-030, D-031, D-035; `tests/smoke/heavy-web.txt`, `site-doctor.txt` headers; `docs/engine/webkit-spike.md` Unproven list. ## Steps -- [ ] Site list: YouTube (home, watch, search, Shorts), Reddit, Discord web, GitHub, Wikipedia, DuckDuckGo, Google search + sign-in page, a news site, Twitch, a maps site; size 1280x800. -- [ ] Hidden Nacre shots (`heavy-web.txt`, `site-doctor.txt` extended) + Chromium pane shots at the same width; Read each pair; list differences in `docs/engine/site-pass-webkit.md`. +- [x] Site list: YouTube (home, watch, search, Shorts), Reddit, Discord web, GitHub, Wikipedia, DuckDuckGo, Google search + sign-in page, a news site, Twitch, a maps site; size 1280x800. +- [x] Hidden Nacre shots (`heavy-web.txt`, `site-doctor.txt` extended) + Chromium pane shots at the same width; Read each pair; list differences in `docs/engine/site-pass-webkit.md`. - [ ] Fix Nacre-side causes (UA, scripts, chrome overlap, input); WebKit engine differences listed, not patched. - [ ] Interaction checks per site: video plays/seeks/full screen, sign-in form typing, infinite scroll, context menu, pop-up sign-in windows. - [ ] GPU path (D-035 unproven): if the user is awake and asks, a `SMOKE_VISIBLE=1` run of the watch page with stats (60 fps video under the overlay, dmabuf path); else write it as open in PROGRESS. @@ -28,3 +28,8 @@ Supersedes the Servo-era site work of S041 for the engine part. ## Handoff (→ PROGRESS.md) Open differences ranked by daily impact. + +## Resume (WIP) +Boxes 1–2 done: `tests/smoke/site-pass.txt`, `docs/engine/site-pass-webkit.md` (pairs table), shots in +`docs/engine/site-pass/`. Box 3 started: autoplay fix in `src/engine/host.rs` (built, site-pass green). Next: other +Nacre-side causes, then the interaction checks (box 4). diff --git a/docs/engine/site-pass-webkit.md b/docs/engine/site-pass-webkit.md new file mode 100644 index 0000000..409ef44 --- /dev/null +++ b/docs/engine/site-pass-webkit.md @@ -0,0 +1,57 @@ +# Site pass on WebKit vs Chromium (S054) + +D-030/D-031: each daily site is shot in Nacre (hidden nested session, software GL, 1280x800) and in the Chromium +reference (the Claude desktop app's browser pane, same width), the pair is read side by side and every visible +difference is listed as fixed or open. Engine differences are listed, not patched. + +## Sites (1280x800) +| # | Site | URL | +|---|---|---| +| 1 | YouTube home | https://www.youtube.com/ | +| 2 | YouTube watch | https://www.youtube.com/watch?v=jNQXAC9IVRw | +| 3 | YouTube search | https://www.youtube.com/results?search_query=webkit | +| 4 | YouTube Shorts | https://www.youtube.com/shorts (redirects to a short) | +| 5 | Reddit | https://www.reddit.com/r/rust/ | +| 6 | Discord web | https://discord.com/login | +| 7 | GitHub | https://github.com/WebKit/WebKit | +| 8 | Wikipedia | https://en.wikipedia.org/wiki/Web_browser | +| 9 | DuckDuckGo | https://duckduckgo.com/?q=webkit+browser+engine | +| 10 | Google search | https://www.google.com/search?q=webkit | +| 11 | Google sign-in | https://accounts.google.com/ | +| 12 | News (The Guardian) | https://www.theguardian.com/international | +| 13 | Twitch | https://www.twitch.tv/directory | +| 14 | Maps (OpenStreetMap) | https://www.openstreetmap.org/#map=12/51.5074/-0.1278 | + +Nacre shots: `SMOKE_SIZE=1280x800 SMOKE_TIMEOUT=900 tools/smoke.sh tests/smoke/site-pass.txt` (hidden). +Shots: Nacre `docs/engine/site-pass/nacre/.jpg` (+ `.json`, what the page had at the shot; from the +second run, after the autoplay fix); Chromium `docs/engine/site-pass/chromium/.jpg` (browser pane, 1280x800, +shown scaled) or `.png` (`tools/refshot.py`, QtWebEngine/Chromium 130, page area 1264x696, light), where the +pane couldn't (it refuses reddit.com; in the background it stalls on Discord, the Guardian and Twitch). Nacre's +pages were light (no dark preference in the throwaway profile), the pane's dark: colour scheme isn't a difference. + +## Pairs +| Site | Nacre | Chromium | Differences (fixed / open / same) | +|---|---|---|---| +| YouTube home | nacre/yt-home.jpg | chromium/yt-home.jpg, chromium/yt-home-ref.png | same: fresh profile gets "Try searching to get started" in both. Nacre's first run shot it at 6 s still as a skeleton; the feed fills by 15–30 s in the hidden session (37 items at 30 s) — slow software painting, not a page fault (see "Hidden runs" below). | +| YouTube watch | nacre/yt-watch.jpg | chromium/yt-watch.jpg | **fixed**: the video stayed paused at 0:00 (WebKit's default autoplay policy allows only muted starts; Chromium and the original Nacre start it with sound) → web views get `AutoplayPolicy::Allow`; `assert currentTime > 0` in site-pass.txt. same: masthead right-hand buttons still skeleton circles a while after load (also in the pane at 8 s). | +| YouTube search | nacre/yt-search.jpg | chromium/yt-search.jpg | same layout (filter chips, Shorts shelf, result rows); the result order and an ad row differ (ads blocked in Nacre, a sponsored row in the pane). | +| YouTube Shorts | nacre/yt-shorts.jpg | chromium/yt-shorts.jpg | **fixed** with autoplay (it plays; 14 s in at the shot). The pane's short sat on its play button (different short; the pane runs in the background). | +| Reddit | nacre/reddit.jpg | chromium/reddit.png | same layout and posts. Nacre gets Google's One Tap card and "Continue with Google" (Google sign-in is offered to WebKit, not to QtWebEngine); Reddit answers both with its JS challenge first (`?js_challenge=1` in Nacre's address). | +| Discord web | nacre/discord.jpg | chromium/discord.png, chromium/discord.jpg | open, not comparable: `discord.com/login` paints nothing in Nacre (white) nor in either Chromium reference (dark, empty `innerText` in both) within 15–18 s. Checked again in the interaction pass. | +| GitHub | nacre/github.jpg | chromium/github.jpg | same. First run shot a black page at 4 s (still painting). | +| Wikipedia | nacre/wikipedia.jpg | chromium/wikipedia.jpg, chromium/wikipedia-ref.png | same, including the blue onboarding dot under the watch star. | +| DuckDuckGo | nacre/ddg.jpg | chromium/ddg.jpg | same (results, side panel, filters). | +| Google search | nacre/google-search.jpg | chromium/google-search.jpg | **open (engine)**: Nacre gets Google's "unusual traffic" page with a reCAPTCHA; the pane gets results from the same address. Not Nacre: the bare WebKitGTK shell (`tools/engine-test/webkit_shell.py`) gets the same page, with WebKit's own, a Safari 26 and a Chrome 142 user agent, and with the bridge off (`NACRE_NO_BRIDGE=1`). Likely the network stack's fingerprint (libsoup/GnuTLS), which Nacre can't change; the captcha itself works (it's there to click). | +| Google sign-in | nacre/google-signin.jpg | chromium/google-signin.jpg | same (Nacre gets Firefox's agent there, `wants_ua_quirk`; Google says "Use a Private Window" instead of "Guest mode", Firefox's wording). | +| News (Guardian) | nacre/news.jpg | chromium/news.png | same layout. Nacre shows "Global Privacy Control Signal Detected; Opt-Out Request Honored" (Nacre sends GPC by default); 22 requests blocked. | +| Twitch | nacre/twitch.jpg | chromium/twitch.png | same layout. Chromium shows the cookie/ads consent bar, Nacre doesn't (GPC / ad blocker's cosmetic rules). | +| Maps (OSM) | nacre/maps.jpg | chromium/maps.png | same. | + +All pairs: Chromium shows classic scrollbars, WebKitGTK overlay ones (engine look, same as GNOME Web). + +## Hidden runs +The hidden session paints with llvmpipe, and while this pass ran another project's `cargo test` kept the 4 cores +busy (load 8): a new page could take 5–20 s to replace the old one on screen even though its DOM was ready +(requestAnimationFrame under 1/s). A shot at 3–6 s then shows the previous site (first run: the DuckDuckGo shot +showed Wikipedia, Twitch showed the Guardian). That is the test machine, not Nacre: `site-pass.txt` gives every +page 15 s. Real-GPU painting is the visible run (GPU path below). diff --git a/docs/engine/site-pass/chromium/ddg.jpg b/docs/engine/site-pass/chromium/ddg.jpg new file mode 100644 index 0000000..6d2944d Binary files /dev/null and b/docs/engine/site-pass/chromium/ddg.jpg differ diff --git a/docs/engine/site-pass/chromium/discord.json b/docs/engine/site-pass/chromium/discord.json new file mode 100644 index 0000000..2edf132 --- /dev/null +++ b/docs/engine/site-pass/chromium/discord.json @@ -0,0 +1 @@ +"{\"ua\":\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36\",\"text\":\"\"}" \ No newline at end of file diff --git a/docs/engine/site-pass/chromium/discord.png b/docs/engine/site-pass/chromium/discord.png new file mode 100644 index 0000000..d0d84fb Binary files /dev/null and b/docs/engine/site-pass/chromium/discord.png differ diff --git a/docs/engine/site-pass/chromium/github.jpg b/docs/engine/site-pass/chromium/github.jpg new file mode 100644 index 0000000..002bbb8 Binary files /dev/null and b/docs/engine/site-pass/chromium/github.jpg differ diff --git a/docs/engine/site-pass/chromium/google-search.jpg b/docs/engine/site-pass/chromium/google-search.jpg new file mode 100644 index 0000000..9a13f6b Binary files /dev/null and b/docs/engine/site-pass/chromium/google-search.jpg differ diff --git a/docs/engine/site-pass/chromium/google-signin.jpg b/docs/engine/site-pass/chromium/google-signin.jpg new file mode 100644 index 0000000..d5b698b Binary files /dev/null and b/docs/engine/site-pass/chromium/google-signin.jpg differ diff --git a/docs/engine/site-pass/chromium/maps.png b/docs/engine/site-pass/chromium/maps.png new file mode 100644 index 0000000..e504adf Binary files /dev/null and b/docs/engine/site-pass/chromium/maps.png differ diff --git a/docs/engine/site-pass/chromium/news.png b/docs/engine/site-pass/chromium/news.png new file mode 100644 index 0000000..28fdd58 Binary files /dev/null and b/docs/engine/site-pass/chromium/news.png differ diff --git a/docs/engine/site-pass/chromium/reddit.json b/docs/engine/site-pass/chromium/reddit.json new file mode 100644 index 0000000..4defd8d --- /dev/null +++ b/docs/engine/site-pass/chromium/reddit.json @@ -0,0 +1 @@ +"{\"ua\":\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36\",\"text\":\"Skip to main content\\nThe Rust Programming Language\\nSign Up\\nLog In\\nExpand user menu\\nr/rust\\nCreate Post\\nCommunity highlights\\nHey Rustaceans! Got a quest\"}" \ No newline at end of file diff --git a/docs/engine/site-pass/chromium/reddit.png b/docs/engine/site-pass/chromium/reddit.png new file mode 100644 index 0000000..63e2f58 Binary files /dev/null and b/docs/engine/site-pass/chromium/reddit.png differ diff --git a/docs/engine/site-pass/chromium/twitch.png b/docs/engine/site-pass/chromium/twitch.png new file mode 100644 index 0000000..4339185 Binary files /dev/null and b/docs/engine/site-pass/chromium/twitch.png differ diff --git a/docs/engine/site-pass/chromium/wikipedia-ref.json b/docs/engine/site-pass/chromium/wikipedia-ref.json new file mode 100644 index 0000000..107a6a2 --- /dev/null +++ b/docs/engine/site-pass/chromium/wikipedia-ref.json @@ -0,0 +1 @@ +"{\"ua\":\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36\",\"text\":\"Jump to content\\nMain menu\\nSearch\\nDonate\\nCreate account\\nLog in\\nContents hide\\n(Top)\\nFunction\\nHistory\\nFeatures\\nBrowser market\\nToggle Browser market subse\"}" \ No newline at end of file diff --git a/docs/engine/site-pass/chromium/wikipedia-ref.png b/docs/engine/site-pass/chromium/wikipedia-ref.png new file mode 100644 index 0000000..799b91b Binary files /dev/null and b/docs/engine/site-pass/chromium/wikipedia-ref.png differ diff --git a/docs/engine/site-pass/chromium/wikipedia.jpg b/docs/engine/site-pass/chromium/wikipedia.jpg new file mode 100644 index 0000000..99363ab Binary files /dev/null and b/docs/engine/site-pass/chromium/wikipedia.jpg differ diff --git a/docs/engine/site-pass/chromium/yt-home-ref.png b/docs/engine/site-pass/chromium/yt-home-ref.png new file mode 100644 index 0000000..77bfd26 Binary files /dev/null and b/docs/engine/site-pass/chromium/yt-home-ref.png differ diff --git a/docs/engine/site-pass/chromium/yt-home.jpg b/docs/engine/site-pass/chromium/yt-home.jpg new file mode 100644 index 0000000..639d124 Binary files /dev/null and b/docs/engine/site-pass/chromium/yt-home.jpg differ diff --git a/docs/engine/site-pass/chromium/yt-search.jpg b/docs/engine/site-pass/chromium/yt-search.jpg new file mode 100644 index 0000000..6b5f3e8 Binary files /dev/null and b/docs/engine/site-pass/chromium/yt-search.jpg differ diff --git a/docs/engine/site-pass/chromium/yt-shorts.jpg b/docs/engine/site-pass/chromium/yt-shorts.jpg new file mode 100644 index 0000000..d01c478 Binary files /dev/null and b/docs/engine/site-pass/chromium/yt-shorts.jpg differ diff --git a/docs/engine/site-pass/chromium/yt-watch.jpg b/docs/engine/site-pass/chromium/yt-watch.jpg new file mode 100644 index 0000000..c34af36 Binary files /dev/null and b/docs/engine/site-pass/chromium/yt-watch.jpg differ diff --git a/docs/engine/site-pass/nacre/ddg.jpg b/docs/engine/site-pass/nacre/ddg.jpg new file mode 100644 index 0000000..23b615d Binary files /dev/null and b/docs/engine/site-pass/nacre/ddg.jpg differ diff --git a/docs/engine/site-pass/nacre/ddg.json b/docs/engine/site-pass/nacre/ddg.json new file mode 100644 index 0000000..4625dc6 --- /dev/null +++ b/docs/engine/site-pass/nacre/ddg.json @@ -0,0 +1 @@ +{"url":"https://duckduckgo.com/?q=webkit+browser+engine&ia=web","results":10,"oops":false} \ No newline at end of file diff --git a/docs/engine/site-pass/nacre/discord.jpg b/docs/engine/site-pass/nacre/discord.jpg new file mode 100644 index 0000000..e5be23d Binary files /dev/null and b/docs/engine/site-pass/nacre/discord.jpg differ diff --git a/docs/engine/site-pass/nacre/discord.json b/docs/engine/site-pass/nacre/discord.json new file mode 100644 index 0000000..4733a97 --- /dev/null +++ b/docs/engine/site-pass/nacre/discord.json @@ -0,0 +1 @@ +{"url":"https://discord.com/login","title":"Discord","email":false,"qr":false,"text":""} \ No newline at end of file diff --git a/docs/engine/site-pass/nacre/github.jpg b/docs/engine/site-pass/nacre/github.jpg new file mode 100644 index 0000000..40e2050 Binary files /dev/null and b/docs/engine/site-pass/nacre/github.jpg differ diff --git a/docs/engine/site-pass/nacre/github.json b/docs/engine/site-pass/nacre/github.json new file mode 100644 index 0000000..394102c --- /dev/null +++ b/docs/engine/site-pass/nacre/github.json @@ -0,0 +1 @@ +{"url":"https://github.com/WebKit/WebKit","title":"GitHub - WebKit/WebKit: Home of the WebKit project, the browser engine used by Safari, Mail, App Store and many other applications on macOS, iOS and Linux. · GitHub","readme":true,"rows":41} \ No newline at end of file diff --git a/docs/engine/site-pass/nacre/google-search.jpg b/docs/engine/site-pass/nacre/google-search.jpg new file mode 100644 index 0000000..319c1a6 Binary files /dev/null and b/docs/engine/site-pass/nacre/google-search.jpg differ diff --git a/docs/engine/site-pass/nacre/google-search.json b/docs/engine/site-pass/nacre/google-search.json new file mode 100644 index 0000000..044453d --- /dev/null +++ b/docs/engine/site-pass/nacre/google-search.json @@ -0,0 +1 @@ +{"url":"https://www.google.com/sorry/index?continue=https://www.google.com/search%3Fq%3D","title":"https://www.google.com/search?q=webkit&sei=hLP4atKoLLuWwbkP3JWGqQ8","results":0,"text":"\n\nAbout this page\n\nOur systems have detected unusual traffic from your computer network. This page checks to see if it's really you sending the requests, and not a robot. Why did this happen?\n\n\nIP add"} \ No newline at end of file diff --git a/docs/engine/site-pass/nacre/google-signin.jpg b/docs/engine/site-pass/nacre/google-signin.jpg new file mode 100644 index 0000000..c54e25a Binary files /dev/null and b/docs/engine/site-pass/nacre/google-signin.jpg differ diff --git a/docs/engine/site-pass/nacre/google-signin.json b/docs/engine/site-pass/nacre/google-signin.json new file mode 100644 index 0000000..c523b71 --- /dev/null +++ b/docs/engine/site-pass/nacre/google-signin.json @@ -0,0 +1 @@ +{"url":"https://accounts.google.com/v3/signin/identifier?continue=https://accounts.googl","text":"Loading\nSign in\nUse your Google Account\nEmail or phone\nForgot email?\nNot your computer? Use a Private Window to sign in. Learn more about using Guest mode\n\nNext\n\nCreate account\nEnglish (United States)"} \ No newline at end of file diff --git a/docs/engine/site-pass/nacre/maps.jpg b/docs/engine/site-pass/nacre/maps.jpg new file mode 100644 index 0000000..f8c3e6c Binary files /dev/null and b/docs/engine/site-pass/nacre/maps.jpg differ diff --git a/docs/engine/site-pass/nacre/maps.json b/docs/engine/site-pass/nacre/maps.json new file mode 100644 index 0000000..8c25a66 --- /dev/null +++ b/docs/engine/site-pass/nacre/maps.json @@ -0,0 +1 @@ +{"url":"https://www.openstreetmap.org/#map=12/51.5074/-0.1278","tiles":24,"canvas":0} \ No newline at end of file diff --git a/docs/engine/site-pass/nacre/news.jpg b/docs/engine/site-pass/nacre/news.jpg new file mode 100644 index 0000000..f3c6ccf Binary files /dev/null and b/docs/engine/site-pass/nacre/news.jpg differ diff --git a/docs/engine/site-pass/nacre/news.json b/docs/engine/site-pass/nacre/news.json new file mode 100644 index 0000000..41e3824 --- /dev/null +++ b/docs/engine/site-pass/nacre/news.json @@ -0,0 +1 @@ +{"url":"https://www.theguardian.com/international","title":"Latest news, sport and opinion from the Guardian","imgs":19,"text":"Skip to main contentSkip to navigation\nSupport the Guardian\nFund independent journalism with $15 per month\nMake a year-end gift\nPrint subscriptions\nNewsletters\nSign in\nThe Saturday read\nIs it finally "} \ No newline at end of file diff --git a/docs/engine/site-pass/nacre/reddit.jpg b/docs/engine/site-pass/nacre/reddit.jpg new file mode 100644 index 0000000..1e638f7 Binary files /dev/null and b/docs/engine/site-pass/nacre/reddit.jpg differ diff --git a/docs/engine/site-pass/nacre/reddit.json b/docs/engine/site-pass/nacre/reddit.json new file mode 100644 index 0000000..43e5879 --- /dev/null +++ b/docs/engine/site-pass/nacre/reddit.json @@ -0,0 +1 @@ +{"url":"https://www.reddit.com/r/rust/?solution=3e63e4f01eea05cb3e63e4f01eea05cb&js_challenge=1&jsc_token=2824be10929bdc604753c70a67a1c33166789507ff33c487f2f14a0d92e068c8&jsc_orig_r=","title":"The Rust Programming Language","posts":54,"blocked":false} \ No newline at end of file diff --git a/docs/engine/site-pass/nacre/twitch.jpg b/docs/engine/site-pass/nacre/twitch.jpg new file mode 100644 index 0000000..d6cd179 Binary files /dev/null and b/docs/engine/site-pass/nacre/twitch.jpg differ diff --git a/docs/engine/site-pass/nacre/twitch.json b/docs/engine/site-pass/nacre/twitch.json new file mode 100644 index 0000000..56042fd --- /dev/null +++ b/docs/engine/site-pass/nacre/twitch.json @@ -0,0 +1 @@ +{"url":"https://www.twitch.tv/directory","title":"All Categories - Twitch","cards":1,"imgs":49} \ No newline at end of file diff --git a/docs/engine/site-pass/nacre/wikipedia.jpg b/docs/engine/site-pass/nacre/wikipedia.jpg new file mode 100644 index 0000000..8ff181c Binary files /dev/null and b/docs/engine/site-pass/nacre/wikipedia.jpg differ diff --git a/docs/engine/site-pass/nacre/wikipedia.json b/docs/engine/site-pass/nacre/wikipedia.json new file mode 100644 index 0000000..c7ad0a5 --- /dev/null +++ b/docs/engine/site-pass/nacre/wikipedia.json @@ -0,0 +1 @@ +{"url":"https://en.wikipedia.org/wiki/Web_browser","title":"Web browser - Wikipedia","imgs":5} \ No newline at end of file diff --git a/docs/engine/site-pass/nacre/yt-home.jpg b/docs/engine/site-pass/nacre/yt-home.jpg new file mode 100644 index 0000000..de5ed5d Binary files /dev/null and b/docs/engine/site-pass/nacre/yt-home.jpg differ diff --git a/docs/engine/site-pass/nacre/yt-home.json b/docs/engine/site-pass/nacre/yt-home.json new file mode 100644 index 0000000..55f4171 --- /dev/null +++ b/docs/engine/site-pass/nacre/yt-home.json @@ -0,0 +1 @@ +{"url":"https://www.youtube.com/","title":"YouTube","items":0,"thumbs":0} \ No newline at end of file diff --git a/docs/engine/site-pass/nacre/yt-search.jpg b/docs/engine/site-pass/nacre/yt-search.jpg new file mode 100644 index 0000000..bd8d9e9 Binary files /dev/null and b/docs/engine/site-pass/nacre/yt-search.jpg differ diff --git a/docs/engine/site-pass/nacre/yt-search.json b/docs/engine/site-pass/nacre/yt-search.json new file mode 100644 index 0000000..8c6467b --- /dev/null +++ b/docs/engine/site-pass/nacre/yt-search.json @@ -0,0 +1 @@ +{"url":"https://www.youtube.com/results?search_query=webkit","results":12,"h":280.546875} \ No newline at end of file diff --git a/docs/engine/site-pass/nacre/yt-shorts.jpg b/docs/engine/site-pass/nacre/yt-shorts.jpg new file mode 100644 index 0000000..37a9bfc Binary files /dev/null and b/docs/engine/site-pass/nacre/yt-shorts.jpg differ diff --git a/docs/engine/site-pass/nacre/yt-shorts.json b/docs/engine/site-pass/nacre/yt-shorts.json new file mode 100644 index 0000000..c2a2f28 --- /dev/null +++ b/docs/engine/site-pass/nacre/yt-shorts.json @@ -0,0 +1 @@ +{"url":"https://www.youtube.com/shorts/EJYdt-jdsxk","t":14.023613515,"paused":false,"w":608} \ No newline at end of file diff --git a/docs/engine/site-pass/nacre/yt-watch.jpg b/docs/engine/site-pass/nacre/yt-watch.jpg new file mode 100644 index 0000000..8c87e2d Binary files /dev/null and b/docs/engine/site-pass/nacre/yt-watch.jpg differ diff --git a/docs/engine/site-pass/nacre/yt-watch.json b/docs/engine/site-pass/nacre/yt-watch.json new file mode 100644 index 0000000..f97463e --- /dev/null +++ b/docs/engine/site-pass/nacre/yt-watch.json @@ -0,0 +1 @@ +{"url":"https://www.youtube.com/watch?v=jNQXAC9IVRw","title":"Me at the zoo - YouTube","src":"blob:https://www.youtube.com/b59f350d-f4","t":5.340589569,"paused":false,"w":320,"err":null,"related":3} \ No newline at end of file diff --git a/src/engine/host.rs b/src/engine/host.rs index c9ea05a..98d8ff1 100644 --- a/src/engine/host.rs +++ b/src/engine/host.rs @@ -550,7 +550,10 @@ impl Engine { hub.push(Event::Page(id, msg)); } }); - let mut builder = webkit::WebView::builder().settings(&self.settings).user_content_manager(&ucm); + // Media may start with sound by itself, as in Chromium and the original Nacre (WebKit's default lets it + // start only muted, so YouTube's watch page stayed paused). + let policies = webkit::WebsitePolicies::builder().autoplay(webkit::AutoplayPolicy::Allow).build(); + let mut builder = webkit::WebView::builder().settings(&self.settings).user_content_manager(&ucm).website_policies(&policies); builder = match related.map(|r| &r.web) { Some(r) => builder.related_view(r), None => builder.network_session(&self.session).web_context(&self.context), diff --git a/tests/smoke/site-pass.txt b/tests/smoke/site-pass.txt new file mode 100644 index 0000000..c102475 --- /dev/null +++ b/tests/smoke/site-pass.txt @@ -0,0 +1,81 @@ +# Site pass (S054, D-030/D-031): every daily site at 1280x800, one shot each, for the side-by-side read against +# the Chromium reference (docs/engine/site-pass-webkit.md). Each site also saves `.json` with what the page +# has (title, address, size, counts), so a blank shot can be told from a page that never loaded. +# Hidden runs paint slowly (llvmpipe, more so with other work on the machine): each page gets 15 s after it is ready. +# NEEDS INTERNET. Direct connections only: never a VPN, Tor or proxy. Nothing is signed in or submitted. +# Run with SMOKE_SIZE=1280x800 SMOKE_TIMEOUT=900 tools/smoke.sh tests/smoke/site-pass.txt; read the PNGs. +wait 3 +open https://www.youtube.com/ +waitfor 120 [...document.querySelectorAll("input[name=search_query]")].some(e => e.getBoundingClientRect().width > 0) +wait 15 +shot yt-home +save yt-home JSON.stringify({ url: location.href, title: document.title, items: document.querySelectorAll("ytd-rich-item-renderer").length, thumbs: [...document.querySelectorAll("ytd-rich-item-renderer img")].filter(i => i.complete && i.naturalWidth > 0).length }) +open https://www.youtube.com/watch?v=jNQXAC9IVRw +waitfor 120 location.pathname === "/watch" && !!document.querySelector("video") +wait 15 +shot yt-watch +# Media may start with sound by itself (autoplay allowed, as in Chromium). +assert document.querySelector("video").currentTime > 0 +save yt-watch JSON.stringify({ url: location.href, title: document.title, src: document.querySelector("video").currentSrc.slice(0, 40), t: document.querySelector("video").currentTime, paused: document.querySelector("video").paused, w: document.querySelector("video").videoWidth, err: document.querySelector("#movie_player .ytp-error") ? document.querySelector("#movie_player .ytp-error").innerText.slice(0, 80) : null, related: document.querySelectorAll("ytd-compact-video-renderer, yt-lockup-view-model").length }) +open https://www.youtube.com/results?search_query=webkit +waitfor 120 !!document.querySelector("ytd-video-renderer") +wait 15 +shot yt-search +save yt-search JSON.stringify({ url: location.href, results: document.querySelectorAll("ytd-video-renderer").length, h: document.querySelector("ytd-video-renderer").getBoundingClientRect().height }) +open https://www.youtube.com/shorts +waitfor 120 location.pathname.startsWith("/shorts/") && !!document.querySelector("video") +wait 15 +shot yt-shorts +save yt-shorts JSON.stringify({ url: location.href, t: document.querySelector("video").currentTime, paused: document.querySelector("video").paused, w: document.querySelector("video").videoWidth }) +open https://www.reddit.com/r/rust/ +waitfor 90 document.readyState === "complete" +wait 15 +shot reddit +save reddit JSON.stringify({ url: location.href, title: document.title, posts: document.querySelectorAll("shreddit-post, article").length, blocked: /blocked|whoa there/i.test(document.body.innerText.slice(0, 2000)) }) +open https://discord.com/login +waitfor 90 document.readyState === "complete" +wait 15 +shot discord +save discord JSON.stringify({ url: location.href, title: document.title, email: !!document.querySelector("input[name=email]"), qr: !!document.querySelector("[class*=qrCode]"), text: document.body.innerText.slice(0, 200) }) +open https://github.com/WebKit/WebKit +waitfor 90 document.readyState === "complete" +wait 15 +shot github +save github JSON.stringify({ url: location.href, title: document.title, readme: !!document.querySelector("article.markdown-body, [data-testid=readme], #readme"), rows: document.querySelectorAll("table tr, [role=row]").length }) +open https://en.wikipedia.org/wiki/Web_browser +waitfor 60 document.readyState === "complete" +wait 15 +shot wikipedia +save wikipedia JSON.stringify({ url: location.href, title: document.title, imgs: [...document.images].filter(i => i.complete && i.naturalWidth > 0).length }) +open https://duckduckgo.com/?q=webkit+browser+engine +waitfor 60 document.querySelectorAll("a[data-testid=result-title-a]").length > 0 +wait 15 +shot ddg +save ddg JSON.stringify({ url: location.href, results: document.querySelectorAll("a[data-testid=result-title-a]").length, oops: document.body.innerText.includes("Oops") }) +open https://www.google.com/search?q=webkit +waitfor 60 document.readyState === "complete" +wait 15 +shot google-search +save google-search JSON.stringify({ url: location.href.slice(0, 80), title: document.title, results: document.querySelectorAll("#search a h3").length, text: document.body.innerText.slice(0, 200) }) +open https://accounts.google.com/ +waitfor 60 !!document.querySelector("#identifierId") +wait 15 +shot google-signin +save google-signin JSON.stringify({ url: location.href.slice(0, 80), text: document.body.innerText.slice(0, 200) }) +open https://www.theguardian.com/international +waitfor 90 document.readyState === "complete" +wait 15 +shot news +save news JSON.stringify({ url: location.href, title: document.title, imgs: [...document.images].filter(i => i.complete && i.naturalWidth > 0).length, text: document.body.innerText.slice(0, 200) }) +open https://www.twitch.tv/directory +waitfor 90 document.readyState === "complete" +wait 15 +shot twitch +save twitch JSON.stringify({ url: location.href, title: document.title, cards: document.querySelectorAll("[data-a-target^=card], article").length, imgs: [...document.images].filter(i => i.complete && i.naturalWidth > 0).length }) +open https://www.openstreetmap.org/#map=12/51.5074/-0.1278 +waitfor 90 document.readyState === "complete" && document.querySelectorAll(".leaflet-tile-loaded").length > 4 +wait 15 +shot maps +save maps JSON.stringify({ url: location.href, tiles: document.querySelectorAll(".leaflet-tile-loaded").length, canvas: document.querySelectorAll("canvas").length }) +status done +quit