Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

constellation: focusing and closing webviews #30842

Merged
merged 14 commits into from
Jan 24, 2024
Merged

Conversation

delan
Copy link
Member

@delan delan commented Dec 8, 2023

This patch improves support in the constellation for multiple top-level browsing contexts aka “webviews”, or in some older code, “browsers”.

We also fix two existing bugs in the logic for closing webviews: one where browsing context groups always leak, and one where browsing context groups get removed even when non-empty.

constellation

  • WebviewManager (new) manages webview-related storage and focus order
    • it allows the constellation to store arbitrary data for each webview id
    • it keeps track of which webview is focused, or whether no webview is focused
    • it can refocus the last-focused webview when a webview is removed
  • we now send WebviewClosed directly when a webview is closed rather than relying on script to do it, so that the event gets sent even if the webview was not closed by script

servoshell

  • BrowserManager (was Browser) keeps a copy of the webview focus and creation order
  • but for now, we always focus and show the newest webview only

messages

embedder →* constellation

  • NewWebview (was NewBrowser) behaves as before
  • CloseWebview (was CloseBrowser) behaves as before
  • FocusWebview (new) makes a webview focused for keyboard events
  • BlurWebview (new) makes no webview focused for keyboard events
  • WebviewVisibilityChanged (was ChangeBrowserVisibility) behaves as before

embedder ← constellation

  • AllowOpeningWebview (was AllowOpeningBrowser) behaves as before
  • WebviewOpened (was BrowserCreated) notifies embedder that a webview was opened
  • WebviewClosed (was CloseBrowser) notifies embedder that a webview was closed
  • WebviewFocused (new) notifies embedder that a webview gained focus for keyboard events
  • WebviewBlurred (new) notifies embedder that all webviews lost focus for keyboard events

  • There are tests for these changes OR
  • These changes do not require tests because ___

@delan delan force-pushed the constellation-browser-manager branch from 5036a3d to 2e582d1 Compare December 8, 2023 06:36
@delan delan changed the base branch from main to multiview-feature-flag December 8, 2023 06:37
@delan delan changed the title constellation: rework events and add new BrowserManager constellation: browser focus, browser closing, and native window visibility Dec 8, 2023
@delan delan changed the title constellation: browser focus, browser closing, and native window visibility constellation: focusing, closing, and native window visibility Dec 8, 2023
@delan delan force-pushed the constellation-browser-manager branch 2 times, most recently from 3f92d84 to 90f038b Compare December 8, 2023 06:55
@delan delan added the T-linux-wpt-2020 Do a try run of the WPT label Dec 8, 2023
@github-actions github-actions bot removed the T-linux-wpt-2020 Do a try run of the WPT label Dec 8, 2023
Copy link

github-actions bot commented Dec 8, 2023

🔨 Triggering try run (#7138381764) with platforms=linux and layout=2020

Copy link

github-actions bot commented Dec 8, 2023

Test results for linux-wpt-layout-2020 from try job (#7138381764):

Flaky unexpected result (20)
  • TIMEOUT [expected OK] /FileAPI/url/url-charset.window.html (#26997)
    • TIMEOUT [expected PASS] subtest: Blob charset should override any auto-detected charset. Test timed out
    • TIMEOUT [expected PASS] subtest: Blob charset should override <meta charset>. Test timed out
  • FAIL [expected PASS] /_mozilla/css/dirty_viewport.html (#13731)
  • TIMEOUT [expected OK] /_webgl/conformance/glsl/misc/shader-with-non-reserved-words.html (#16216)
    • NOTRUN [expected PASS] subtest: Overall test
  • TIMEOUT [expected OK] /_webgl/conformance/uniforms/out-of-bounds-uniform-array-access.html (#26225)
    • NOTRUN [expected PASS] subtest: Overall test
  • OK /css/cssom-view/MediaQueryList-addListener-removeListener.html (#24569)
    • PASS [expected FAIL] subtest: listeners are called correct number of times
  • OK /html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-src-aboutblank-navigate-immediately.html (#29048)
    • PASS [expected FAIL] subtest: Navigating to a different document with form submission
  • OK /html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html (#28681)
    • FAIL [expected PASS] subtest: load & pageshow events do not fire on contentWindow of <iframe> element created with src='' assert_unreached: load should not be fired Reached unreachable code
    • FAIL [expected PASS] subtest: load & pageshow events do not fire on contentWindow of <iframe> element created with src='about:blank' assert_unreached: load should not be fired Reached unreachable code
  • OK /html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.html (#28066)
    • FAIL [expected PASS] subtest: 0041 set in href="" targeting a frame and clicked assert_equals: expected "A" but got ""
    • FAIL [expected PASS] subtest: 0080 00FF set in href="" targeting a frame and clicked assert_equals: expected "�ÿ" but got ""
    • FAIL [expected PASS] subtest: 0080 00FF 0100 set in href="" targeting a frame and clicked assert_equals: expected "�ÿĀ" but got ""
    • FAIL [expected PASS] subtest: D83D DE0D set in href="" targeting a frame and clicked assert_equals: expected "😍" but got ""
  • TIMEOUT [expected OK] /html/interaction/focus/the-autofocus-attribute/skip-another-top-level-browsing-context.html (#24161)
    • TIMEOUT [expected PASS] subtest: Autofocus elements queued in another top-level browsing context's documents should be skipped. Test timed out
  • TIMEOUT [expected OK] /html/interaction/focus/the-autofocus-attribute/supported-elements.html (#24145)
    • TIMEOUT [expected FAIL] subtest: Host element with delegatesFocus including no focusable descendants should be skipped Test timed out
    • NOTRUN [expected FAIL] subtest: Area element should support autofocus
  • CRASH [expected OK] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html (#22647)
  • TIMEOUT [expected OK] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html (#24066)
    • NOTRUN [expected FAIL] subtest: Check that popups from a sandboxed iframe do not escape the sandbox
  • OK /html/semantics/forms/form-submission-0/multipart-formdata.window.html (#28725)
    • PASS [expected FAIL] subtest: multipart/form-data: \r\n in value (formdata event)
  • ERROR [expected OK] /html/semantics/scripting-1/the-script-element/defer-script/async-script.html?reload (#29054)
  • OK /html/syntax/parsing/DOMContentLoaded-defer.html (#21550)
    • FAIL [expected PASS] subtest: The end: DOMContentLoaded and defer scripts assert_false: DOMContentLoaded should not have fired before executing a task queued from a defer script expected false got true
  • TIMEOUT [expected OK] /html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html (#25805)
    • TIMEOUT [expected FAIL] subtest: Fulfillment handler on pending-then-fulfilled promise Test timed out
    • TIMEOUT [expected FAIL] subtest: Rejection handler on pending-then-rejected promise Test timed out
  • ERROR /resource-timing/content-type-parsing.html (#29131)
    • FAIL [expected TIMEOUT] subtest: mime-type 16 : text/html;charset=�gbk assert_equals: expected (string) "text/html" but got (undefined) undefined
    • TIMEOUT [expected NOTRUN] subtest: mime-type 17 : text/html;charset= gbk Test timed out
  • CRASH [expected PASS] /streams/readable-streams/crashtests/strategy-worker-terminate.html (#30124)
  • TIMEOUT [expected OK] /wasm/jsapi/functions/entry.html (#27087)
    • TIMEOUT [expected FAIL] subtest: Start function Test timed out
  • TIMEOUT [expected OK] /webmessaging/with-ports/018.html (#24485)
    • TIMEOUT [expected PASS] subtest: origin of the script that invoked the method, javascript: Test timed out
Stable unexpected results that are known to be intermittent (17)
  • TIMEOUT [expected OK] /_webgl/conformance/glsl/misc/shader-uniform-packing-restrictions.html (#28103)
    • NOTRUN [expected PASS] subtest: Overall test
  • OK /css/css-fonts/variations/at-font-face-font-matching.html (#20684)
    • PASS [expected FAIL] subtest: Matching font-weight: '400' should prefer '350 399' over '351 398'
    • PASS [expected FAIL] subtest: Matching font-weight: '430' should prefer '450 460' over '500'
    • FAIL [expected PASS] subtest: Matching font-weight: '430' should prefer '400 425' over '350 399' assert_equals: Unexpected font on test element expected 487 but got 532
    • PASS [expected FAIL] subtest: Matching font-weight: '430' should prefer '340 398' over '501 550'
    • PASS [expected FAIL] subtest: Matching font-weight: '430' should prefer '501 550' over '502 560'
    • FAIL [expected PASS] subtest: Matching font-stretch: '100%' should prefer '110% 120%' over '115% 116%' assert_equals: Unexpected font on test element expected 487 but got 532
    • FAIL [expected PASS] subtest: Matching font-stretch: '90%' should prefer '60% 70%' over '110% 140%' assert_equals: Unexpected font on test element expected 487 but got 532
    • FAIL [expected PASS] subtest: Matching font-style: 'italic' should prefer 'oblique 20deg' over 'oblique 30deg 60deg' assert_equals: Unexpected font on test element expected 487 but got 532
    • FAIL [expected PASS] subtest: Matching font-style: 'italic' should prefer 'normal' over 'oblique 0deg' assert_equals: Unexpected font on test element expected 487 but got 532
    • PASS [expected FAIL] subtest: Matching font-style: 'italic' should prefer 'oblique -60deg -30deg' over 'oblique -50deg -40deg'
    • And 9 more unexpected results...
  • OK /css/cssom-view/MediaQueryList-addListener-handleEvent.html (#24571)
    • PASS [expected FAIL] subtest: doesn't look up handleEvent method on callable event listeners
  • TIMEOUT /css/cssom-view/MediaQueryList-extends-EventTarget.html (#25269)
    • PASS [expected FAIL] subtest: onchange removes listener
  • TIMEOUT /fetch/metadata/generated/css-images.sub.tentative.html (#29047)
    • TIMEOUT [expected PASS] subtest: background-image sec-fetch-site - HTTPS downgrade (header not sent) Test timed out
  • OK /html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin.window.html (#29049)
    • FAIL [expected PASS] subtest: Same-origin navigation started from unload handler must be ignored assert_equals: expected "?pass" but got "?fail"
  • OK /html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/a-click.html (#28697)
    • PASS [expected FAIL] subtest: aElement.click() before the load event must NOT replace
  • OK /html/browsers/the-window-object/open-close/creating_browsing_context_test_01.html (#29046)
  • OK [expected CRASH] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html (#22667)
  • OK [expected CRASH] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html (#24066)
  • OK [expected TIMEOUT] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html (#22154)
    • FAIL [expected NOTRUN] subtest: Check that popups from a sandboxed iframe do not escape the sandbox assert_equals: It came from a sandboxed iframe expected "null" but got "http://web-platform.test:8000"
  • OK /html/semantics/forms/form-submission-0/text-plain.window.html (#28687)
    • FAIL [expected PASS] subtest: text/plain: 0x00 in name (normal form) assert_equals: expected "a\0b=c\r\n" but got ""
    • FAIL [expected PASS] subtest: text/plain: double quote in value (normal form) assert_equals: expected "a=b"c\r\n" but got ""
  • OK /html/semantics/forms/form-submission-0/urlencoded2.window.html (#28687)
    • FAIL [expected PASS] subtest: application/x-www-form-urlencoded: \r\n in filename (formdata event) assert_equals: expected "a=b%0D%0Ac" but got ""
  • OK /html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html (#23205)
    • PASS [expected FAIL] subtest: Check that rel=noopener with target=_self does a normal load
  • OK /webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html (#22849)
    • FAIL [expected PASS] subtest: X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}.
      Index Actual Expected AbsError RelError Test threshold
      [15073] 1.0287357572926128e-36 6.4605611562728882e-1 6.4605611562728882e-1 1.0000000000000000e+0 3.8985999999999999e-3
      [15074] 2.5936898589134216e-1 5.9696805477142334e-1 3.3759906888008118e-1 5.6552283858697683e-1 3.8985999999999999e-3
      Max AbsError of 6.4605611562728882e-1 at index of 15073.
      Max RelError of 1.0000000000000000e+0 at index of 15073.
      assert_true: expected true got false
    • FAIL [expected PASS] subtest: X SNR (46.13279577826709 dB) is not greater than or equal to 65.737. Got 46.13279577826709. assert_true: expected true got false
  • TIMEOUT [expected OK] /webmessaging/with-ports/017.html (#24486)
    • TIMEOUT [expected PASS] subtest: origin of the script that invoked the method, about:blank Test timed out
  • OK [expected TIMEOUT] /webmessaging/without-ports/018.html (#24485)
    • PASS [expected TIMEOUT] subtest: origin of the script that invoked the method, javascript:
Stable unexpected results (1)
  • OK [expected FAIL] /html/infrastructure/urls/base-url/document-base-url-window-initiator-is-not-opener.https.window.html

Copy link

github-actions bot commented Dec 8, 2023

⚠️ Try run (#7138381764) failed.

@delan delan mentioned this pull request Dec 12, 2023
39 tasks
Base automatically changed from multiview-feature-flag to main December 12, 2023 09:51
@delan delan force-pushed the constellation-browser-manager branch from 90f038b to d3ce4a7 Compare January 2, 2024 09:58
@delan delan added the T-full Do a full try run label Jan 4, 2024
@github-actions github-actions bot removed the T-full Do a full try run label Jan 4, 2024
Copy link

github-actions bot commented Jan 4, 2024

🔨 Triggering try run (#7405933481) with platforms=linux,macos,windows and layout=undefined

Copy link

github-actions bot commented Jan 4, 2024

Test results for linux-wpt-layout-2020 from try job (#7405933481):

Flaky unexpected result (12)
  • FAIL [expected PASS] /_mozilla/css/rotate_anim.html (#24247)
  • CRASH [expected PASS] /_webgl/conformance/glsl/bugs/nested-functions-should-not-crash.html (#30680)
  • TIMEOUT [expected OK] /_webgl/conformance/glsl/misc/shader-with-non-reserved-words.html (#16216)
    • NOTRUN [expected PASS] subtest: Overall test
  • TIMEOUT [expected OK] /_webgl/conformance/uniforms/out-of-bounds-uniform-array-access.html (#26225)
    • NOTRUN [expected PASS] subtest: Overall test
  • TIMEOUT /fetch/metadata/generated/element-img-environment-change.sub.html (#30111)
    • FAIL [expected TIMEOUT] subtest: sec-fetch-site - Not sent to non-trustworthy same-site destination, no attributes promise_test: Unhandled rejection with value: object "Error: Failed to query for recorded headers."
    • FAIL [expected NOTRUN] subtest: sec-fetch-site - Not sent to non-trustworthy cross-site destination, no attributes promise_test: Unhandled rejection with value: object "Error: Failed to query for recorded headers."
    • TIMEOUT [expected NOTRUN] subtest: sec-fetch-mode - Not sent to non-trustworthy same-origin destination, no attributes Test timed out
  • TIMEOUT [expected OK] /html/browsers/history/the-history-interface/traverse_the_history_write_onload_1.html (#21581)
    • TIMEOUT [expected PASS] subtest: Traverse the history when a history entry is written in the load event Test timed out
  • FAIL [expected PASS] /html/rendering/non-replaced-elements/the-page/iframe-scrolling-attribute-values.html
  • OK /html/syntax/parsing/DOMContentLoaded-defer.html (#21550)
    • FAIL [expected PASS] subtest: The end: DOMContentLoaded and defer scripts assert_false: DOMContentLoaded should not have fired before executing a task queued from a defer script expected false got true
  • TIMEOUT /html/webappapis/scripting/events/compile-event-handler-settings-objects.html (#24246)
    • FAIL [expected PASS] subtest: The entry settings object while executing the compiled callback via Web IDL's invoke must be that of the node document assert_equals: expected "/html/webappapis/scripting/events/resources/open-window.html" but got "blank"
  • CRASH [expected PASS] /streams/readable-streams/crashtests/strategy-worker-terminate.html (#30124)
  • OK [expected TIMEOUT] /webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active.html (#27664)
  • OK [expected TIMEOUT] /webmessaging/with-ports/017.html (#24486)
    • PASS [expected TIMEOUT] subtest: origin of the script that invoked the method, about:blank
Stable unexpected results that are known to be intermittent (19)
  • TIMEOUT [expected OK] /_webgl/conformance/glsl/misc/shader-uniform-packing-restrictions.html (#28103)
    • NOTRUN [expected PASS] subtest: Overall test
  • TIMEOUT [expected FAIL] /css/compositing/mix-blend-mode/mix-blend-mode-animation.html (#21930)
  • TIMEOUT [expected PASS] /css/css-transitions/render-blocking/no-transition-from-ua-to-blocking-stylesheet.html (#29187)
  • OK /html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html (#28681)
    • PASS [expected FAIL] subtest: load & pageshow events do not fire on contentWindow of <iframe> element created with src='about:blank'
  • OK /html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-window-open.html (#28691)
    • PASS [expected FAIL] subtest: load event does not fire on window.open('about:blank')
  • TIMEOUT [expected OK] /html/browsers/browsing-the-web/navigating-across-documents/javascript-url-referrer.window.html (#29081)
    • TIMEOUT [expected PASS] subtest: no-referrer referrer policy used to create the starting page Test timed out
  • OK /html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.html (#28066)
    • PASS [expected FAIL] subtest: 0041 set in href="" targeting a frame and clicked
  • OK /html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin.window.html (#29049)
    • FAIL [expected PASS] subtest: Same-origin navigation started from unload handler must be ignored assert_equals: expected "?pass" but got "?fail"
  • OK /html/browsers/history/the-history-interface/traverse_the_history_2.html (#21383)
    • FAIL [expected PASS] subtest: Multiple history traversals, last would be aborted assert_array_equals: Pages opened during history navigation expected property 1 to be 3 but got 1 (expected array [6, 3] got [6, 1])
  • OK /html/browsers/history/the-history-interface/traverse_the_history_4.html (#21383)
    • FAIL [expected PASS] subtest: Multiple history traversals, last would be aborted assert_array_equals: Pages opened during history navigation expected property 1 to be 5 but got 3 (expected array [6, 5] got [6, 3])
  • TIMEOUT [expected OK] /html/infrastructure/urls/base-url/document-base-url-window-initiator-is-not-opener.https.window.html (#30970)
  • OK [expected TIMEOUT] /html/interaction/focus/the-autofocus-attribute/autofocus-dialog.html (#29087)
    • FAIL [expected TIMEOUT] subtest: <dialog>-contained autofocus element gets focused when the dialog is shown promise_test: Unhandled rejection with value: object "TypeError: w.document.querySelector(...) is null"
  • TIMEOUT [expected OK] /html/interaction/focus/the-autofocus-attribute/supported-elements.html (#24145)
    • TIMEOUT [expected FAIL] subtest: Host element with delegatesFocus including no focusable descendants should be skipped Test timed out
    • NOTRUN [expected FAIL] subtest: Area element should support autofocus
  • CRASH [expected OK] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html (#22647)
  • OK /html/semantics/forms/form-submission-0/multipart-formdata.window.html (#28725)
    • FAIL [expected PASS] subtest: multipart/form-data: \r\n in value (normal form) assert_equals: expected "\r\nContent-Disposition: form-data; name="a"\r\n\r\nb\r\nc\r\n--\r\n" but got ""
  • OK /html/semantics/forms/form-submission-0/urlencoded2.window.html (#28687)
    • FAIL [expected PASS] subtest: application/x-www-form-urlencoded: backslash in value (normal form) assert_equals: expected "a=b%5Cc" but got ""
  • OK [expected TIMEOUT] /html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html (#25805)
  • ERROR /resource-timing/content-type-parsing.html (#29131)
    • FAIL [expected TIMEOUT] subtest: mime-type 16 : text/html;charset=�gbk assert_equals: expected (string) "text/html" but got (undefined) undefined
    • TIMEOUT [expected NOTRUN] subtest: mime-type 17 : text/html;charset= gbk Test timed out
  • OK /webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html (#22849)
    • FAIL [expected PASS] subtest: X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}.
      Index Actual Expected AbsError RelError Test threshold
      [15073] -4.2446518894625519e+26 6.4605611562728882e-1 4.2446518894625519e+26 6.5700978394751413e+26 3.8985999999999999e-3
      [15074] 2.5936898589134216e-1 5.9696805477142334e-1 3.3759906888008118e-1 5.6552283858697683e-1 3.8985999999999999e-3
      Max AbsError of 4.2446518894625519e+26 at index of 15073.
      Max RelError of 6.5700978394751413e+26 at index of 15073.
      assert_true: expected true got false
    • FAIL [expected PASS] subtest: X SNR (-489.1227556333755 dB) is not greater than or equal to 65.737. Got -489.1227556333755. assert_true: expected true got false

Copy link

github-actions bot commented Jan 4, 2024

Test results for linux-wpt-layout-2013 from try job (#7405933481):

Flaky unexpected result (18)
Stable unexpected results that are known to be intermittent (16)
  • TIMEOUT /FileAPI/url/url-in-tags-revoke.window.html (#19978)
    • FAIL [expected TIMEOUT] subtest: Opening a blob URL in a new window immediately before revoking it works. assert_equals: expected (string) "test_frame_OK" but got (undefined) undefined
  • TIMEOUT [expected OK] /_webgl/conformance/glsl/misc/shader-uniform-packing-restrictions.html (#28103)
    • NOTRUN [expected PASS] subtest: Overall test
  • TIMEOUT [expected FAIL] /css/compositing/mix-blend-mode/mix-blend-mode-animation.html (#21930)
  • TIMEOUT [expected PASS] /css/css-transitions/render-blocking/no-transition-from-ua-to-blocking-stylesheet.html (#29187)
  • OK /css/cssom-view/MediaQueryList-addListener-removeListener.html (#24569)
    • FAIL [expected PASS] subtest: listeners are called correct number of times assert_equals: expected 6 but got 5
  • TIMEOUT /fetch/metadata/generated/css-images.sub.tentative.html (#29047)
    • PASS [expected TIMEOUT] subtest: background-image sec-fetch-site - Not sent to non-trustworthy same-origin destination
    • PASS [expected FAIL] subtest: border-image sec-fetch-site - Not sent to non-trustworthy cross-site destination
    • PASS [expected FAIL] subtest: border-image sec-fetch-site - HTTPS downgrade (header not sent)
  • OK /html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-window-open.html (#28691)
    • FAIL [expected PASS] subtest: load event does not fire on window.open('about:blank') assert_unreached: load should not be fired Reached unreachable code
  • OK /html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin-fragment.html (#20768)
    • PASS [expected FAIL] subtest: Tests that a fragment navigation in the unload handler will not block the initial navigation
  • OK [expected TIMEOUT] /html/semantics/forms/form-submission-0/reparent-form-during-planned-navigation-task.html (#29724)
    • PASS [expected TIMEOUT] subtest: reparent-form-during-planned-navigation-task
  • OK /html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html (#23205)
    • FAIL [expected PASS] subtest: Check that rel=noopener with target=_self does a normal load this.openedWindow.findLink is not a function
  • OK /html/syntax/parsing/DOMContentLoaded-defer.html (#21550)
    • FAIL [expected PASS] subtest: The end: DOMContentLoaded and defer scripts assert_false: DOMContentLoaded should not have fired before executing a task queued from a defer script expected false got true
  • OK /html/webappapis/dynamic-markup-insertion/document-write/module-delayed.html (#27659)
    • PASS [expected FAIL] subtest: async document.write in a module
  • OK /webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html (#22849)
    • FAIL [expected PASS] subtest: X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}.
      Index Actual Expected AbsError RelError Test threshold
      [15073] -3.8636042688921600e+14 6.4605611562728882e-1 3.8636042688921663e+14 5.9802920759302713e+14 3.8985999999999999e-3
      [15074] 2.5936898589134216e-1 5.9696805477142334e-1 3.3759906888008118e-1 5.6552283858697683e-1 3.8985999999999999e-3
      Max AbsError of 3.8636042688921663e+14 at index of 15073.
      Max RelError of 5.9802920759302713e+14 at index of 15073.
      assert_true: expected true got false
    • FAIL [expected PASS] subtest: X SNR (-248.30576680089888 dB) is not greater than or equal to 65.737. Got -248.30576680089888. assert_true: expected true got false
  • OK [expected TIMEOUT] /webmessaging/with-ports/017.html (#24486)
    • PASS [expected TIMEOUT] subtest: origin of the script that invoked the method, about:blank
  • TIMEOUT [expected OK] /webmessaging/with-ports/018.html (#24485)
    • TIMEOUT [expected PASS] subtest: origin of the script that invoked the method, javascript: Test timed out
  • OK [expected TIMEOUT] /webmessaging/without-ports/018.html (#24485)
    • PASS [expected TIMEOUT] subtest: origin of the script that invoked the method, javascript:

Copy link

github-actions bot commented Jan 4, 2024

⚠️ Try run (#7405933481) failed.

Copy link

✨ Try run (#7405933481) succeeded.

@delan delan marked this pull request as ready for review January 10, 2024 08:28
Copy link
Member

@mrobinson mrobinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great to me. I have some comments, some of them quite trivial, but I think the most important conversation is the one about whether the Constellation should have a concept of a window.

components/compositing/windowing.rs Outdated Show resolved Hide resolved
components/constellation/browser.rs Outdated Show resolved Hide resolved
components/constellation/browser.rs Outdated Show resolved Hide resolved
components/constellation/constellation.rs Outdated Show resolved Hide resolved
components/constellation/constellation.rs Outdated Show resolved Hide resolved
components/constellation/constellation.rs Show resolved Hide resolved
components/constellation/constellation.rs Outdated Show resolved Hide resolved
components/script/dom/window.rs Outdated Show resolved Hide resolved
components/servo/lib.rs Outdated Show resolved Hide resolved
components/shared/compositing/constellation_msg.rs Outdated Show resolved Hide resolved
@delan delan added the T-linux-wpt-2020 Do a try run of the WPT label Jan 24, 2024
@delan delan requested a review from mrobinson January 24, 2024 04:25
@github-actions github-actions bot removed the T-linux-wpt-2020 Do a try run of the WPT label Jan 24, 2024
Copy link

🔨 Triggering try run (#7635496423) with platforms=linux and layout=2020

Copy link

Test results for linux-wpt-layout-2020 from try job (#7635496423):

Flaky unexpected result (19)
  • TIMEOUT [expected PASS] /_mozilla/css/transition_calc_implicit.html (#17417)
  • TIMEOUT [expected OK] /_webgl/conformance/glsl/misc/shader-with-non-reserved-words.html (#16216)
    • NOTRUN [expected PASS] subtest: Overall test
  • TIMEOUT [expected OK] /_webgl/conformance/uniforms/out-of-bounds-uniform-array-access.html (#26225)
    • NOTRUN [expected PASS] subtest: Overall test
  • OK /css/cssom-view/MediaQueryList-addListener-removeListener.html (#24569)
    • PASS [expected FAIL] subtest: listeners are called correct number of times
  • TIMEOUT /fetch/metadata/generated/element-img-environment-change.sub.html (#30111)
    • PASS [expected FAIL] subtest: sec-fetch-site - Not sent to non-trustworthy same-origin destination, no attributes
  • OK /html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-window-open.html (#28691)
    • PASS [expected FAIL] subtest: load event does not fire on window.open('about:blank')
  • TIMEOUT [expected OK] /html/browsers/history/the-history-interface/traverse-during-unload.html (#28688)
    • TIMEOUT [expected PASS] subtest: Traversing the history during unload Test timed out
  • OK /html/browsers/history/the-history-interface/traverse_the_history_5.html (#21383)
    • PASS [expected FAIL] subtest: Multiple history traversals, last would be aborted
  • OK /html/browsers/the-window-object/open-close/creating_browsing_context_test_01.html (#29046)
  • TIMEOUT [expected OK] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html (#22667)
    • TIMEOUT [expected FAIL] subtest: Check that popups from a sandboxed iframe escape the sandbox if
      allow-popups-to-escape-sandbox is used Test timed out
  • TIMEOUT [expected OK] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html (#22154)
    • NOTRUN [expected FAIL] subtest: Check that popups from a sandboxed iframe do not escape the sandbox
  • TIMEOUT [expected OK] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html (#24066)
    • NOTRUN [expected FAIL] subtest: Check that popups from a sandboxed iframe do not escape the sandbox
  • TIMEOUT [expected OK] /html/semantics/forms/form-submission-0/reparent-form-during-planned-navigation-task.html (#29724)
    • TIMEOUT [expected PASS] subtest: reparent-form-during-planned-navigation-task Test timed out
  • OK /html/semantics/forms/form-submission-0/text-plain.window.html (#28687)
    • PASS [expected FAIL] subtest: text/plain: 0x00 in filename (formdata event)
    • PASS [expected FAIL] subtest: text/plain: double quote in value (normal form)
    • PASS [expected FAIL] subtest: text/plain: single quote in value (normal form)
  • OK /html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html (#23205)
    • PASS [expected FAIL] subtest: Check that rel=noopener with target=_self does a normal load
  • OK /html/syntax/parsing/DOMContentLoaded-defer.html (#21550)
    • PASS [expected FAIL] subtest: The end: DOMContentLoaded and defer scripts
  • TIMEOUT [expected OK] /webmessaging/with-ports/017.html (#24486)
    • TIMEOUT [expected PASS] subtest: origin of the script that invoked the method, about:blank Test timed out
  • OK [expected TIMEOUT] /webmessaging/with-ports/018.html (#24485)
    • PASS [expected TIMEOUT] subtest: origin of the script that invoked the method, javascript:
  • TIMEOUT [expected OK] /webmessaging/without-ports/018.html (#24485)
    • TIMEOUT [expected PASS] subtest: origin of the script that invoked the method, javascript: Test timed out
Stable unexpected results that are known to be intermittent (15)
  • TIMEOUT [expected OK] /_webgl/conformance/glsl/misc/shader-uniform-packing-restrictions.html (#28103)
    • NOTRUN [expected PASS] subtest: Overall test
  • FAIL [expected TIMEOUT] /css/css-animations/animation-delay-010.html (#26573)
  • OK /css/css-fonts/variations/at-font-face-font-matching.html (#20684)
    • FAIL [expected PASS] subtest: Matching font-weight: '430' should prefer '420 440' over '450 460' assert_equals: Unexpected font on test element expected 487 but got 532
    • FAIL [expected PASS] subtest: Matching font-stretch: '100%' should prefer '110% 120%' over '115% 116%' assert_equals: Unexpected font on test element expected 487 but got 532
    • PASS [expected FAIL] subtest: Matching font-stretch: '90%' should prefer '90% 100%' over '50% 80%'
    • FAIL [expected PASS] subtest: Matching font-style: 'normal' should prefer 'oblique 10deg 40deg' over 'oblique 20deg 30deg' assert_equals: Unexpected font on test element expected 487 but got 532
    • FAIL [expected PASS] subtest: Matching font-style: 'italic' should prefer 'italic' over 'oblique 20deg' assert_equals: Unexpected font on test element expected 487 but got 532
    • PASS [expected FAIL] subtest: Matching font-style: 'oblique 10deg' should prefer 'oblique 15deg 20deg' over 'oblique 30deg 60deg'
    • FAIL [expected PASS] subtest: Matching font-style: 'oblique 10deg' should prefer 'italic' over 'oblique 0deg' assert_equals: Unexpected font on test element expected 487 but got 532
    • PASS [expected FAIL] subtest: Matching font-style: 'oblique -20deg' should prefer 'italic' over 'oblique 0deg'
    • PASS [expected FAIL] subtest: Matching font-style: 'oblique -20deg' should prefer 'oblique 0deg' over 'oblique 30deg 60deg'
    • FAIL [expected PASS] subtest: Matching font-style: 'oblique -21deg' should prefer 'oblique -10deg' over 'italic' assert_equals: Unexpected font on test element expected 487 but got 532
  • PASS [expected TIMEOUT] /css/css-transitions/render-blocking/no-transition-from-ua-to-blocking-stylesheet.html (#29187)
  • OK [expected TIMEOUT] /html/browsers/browsing-the-web/history-traversal/srcdoc/consecutive-srcdoc.html (#29084)
    • FAIL [expected TIMEOUT] subtest: changing srcdoc to about:srcdoc#yo then another srcdoc does two push navigations and we can navigate back assert_equals: expected "about:srcdoc#yo" but got "http://web-platform.test:8000/common/blank.html"
  • OK /html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html (#28681)
    • FAIL [expected PASS] subtest: load & pageshow events do not fire on contentWindow of <iframe> element created with src='' assert_unreached: load should not be fired Reached unreachable code
    • FAIL [expected PASS] subtest: load & pageshow events do not fire on contentWindow of <iframe> element created with src='about:blank' assert_unreached: load should not be fired Reached unreachable code
  • OK /html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin.window.html (#29049)
    • PASS [expected FAIL] subtest: Same-origin navigation started from unload handler must be ignored
  • OK /html/browsers/history/the-history-interface/traverse_the_history_2.html (#21383)
    • FAIL [expected PASS] subtest: Multiple history traversals, last would be aborted assert_array_equals: Pages opened during history navigation expected property 1 to be 3 but got 2 (expected array [6, 3] got [6, 2])
  • OK [expected CRASH] /html/browsers/windows/embedded-opener-remove-frame.html (#23867)
    • FAIL [expected TIMEOUT] subtest: opener of discarded auxiliary browsing context assert_equals: opener after removal expected null but got object "[object Window]"
  • OK [expected CRASH] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html (#22647)
  • PASS [expected FAIL] /html/semantics/embedded-content/the-img-element/image-loading-lazy-slow.html (#30684)
  • OK /html/semantics/forms/form-submission-0/multipart-formdata.window.html (#28725)
    • FAIL [expected PASS] subtest: multipart/form-data: 0x00 in name (normal form) assert_equals: expected "\r\nContent-Disposition: form-data; name="a\0b"\r\n\r\nc\r\n--\r\n" but got ""
  • OK /html/semantics/forms/form-submission-0/urlencoded2.window.html (#28687)
    • PASS [expected FAIL] subtest: application/x-www-form-urlencoded: \r\n in filename (formdata event)
  • OK /html/semantics/forms/historical.html (#28568)
    • FAIL [expected PASS] subtest: <input name=isindex> should not be supported assert_regexp_match: expected object "/?isindex=x$/" but got "about:blank"
  • TIMEOUT /resource-timing/test_resource_timing.html (#25720)
    • FAIL [expected PASS] subtest: PerformanceEntry has correct name, initiatorType, startTime, and duration (img) assert_equals: expected 5205504 but got 5205760

Copy link

✨ Try run (#7635496423) succeeded.

Copy link
Member

@mrobinson mrobinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Just a couple comments below, but otherwise this looks good.

components/constellation/constellation.rs Show resolved Hide resolved
components/constellation/constellation.rs Outdated Show resolved Hide resolved
components/constellation/constellation.rs Outdated Show resolved Hide resolved
components/constellation/constellation.rs Outdated Show resolved Hide resolved
components/constellation/constellation.rs Outdated Show resolved Hide resolved
components/constellation/constellation.rs Outdated Show resolved Hide resolved
components/constellation/constellation.rs Outdated Show resolved Hide resolved
components/constellation/constellation.rs Outdated Show resolved Hide resolved
components/constellation/constellation.rs Outdated Show resolved Hide resolved
@delan delan enabled auto-merge January 24, 2024 09:16
@delan delan added this pull request to the merge queue Jan 24, 2024
github-merge-queue bot pushed a commit that referenced this pull request Jan 24, 2024
* constellation: focusing, closing, and native window visibility

* rename “browser” to “webview”, “unfocus” to “blur”

* remove native window visibility from constellation

* rename more “browser” to “webview”

* guard clauses

* don’t automatically focus when no webviews are focused

* comment spec steps for window.close()

* use format interpolation

Co-authored-by: Martin Robinson <mrobinson@igalia.com>

* fix formatting

* rename “Webview” to “WebView” in types and type parameters

---------

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 24, 2024
@delan delan added this pull request to the merge queue Jan 24, 2024
@delan delan removed this pull request from the merge queue due to a manual request Jan 24, 2024
@delan delan enabled auto-merge January 24, 2024 11:22
@delan delan added this pull request to the merge queue Jan 24, 2024
Merged via the queue into main with commit eb95703 Jan 24, 2024
10 of 11 checks passed
@delan delan deleted the constellation-browser-manager branch January 24, 2024 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants