Skip to content

stylo: add device-aspect-ratio media feature - #49775

Merged
Loirooriol merged 1 commit into
servo:mainfrom
z11i:device-aspect-ratio
Nov 16, 2026
Merged

Loirooriol merged 1 commit into
servo:mainfrom
z11i:device-aspect-ratio

Conversation

@z11i

@z11i z11i commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Update stylo to include device-aspect-ratio support: servo/stylo#515

Part of #39068

Testing: 3 tests improve:

  • /css/mediaqueries/device-aspect-ratio-002.html
  • /css/mediaqueries/device-aspect-ratio-003.html
  • /css/mediaqueries/test_media_queries.html

staging-devin-ai-integration Bot pushed a commit to DioxusLabs/stylo that referenced this pull request Nov 15, 2026
Servo companion PR: servo/servo#49775

Tests against Servo's WPT about device-aspect-ratio htmls pass.

Signed-off-by: Elliot Zhang <[email protected]>
@Loirooriol Loirooriol added the T-linux-wpt Do a try run of the WPT label Nov 16, 2026
@github-actions github-actions Bot removed the T-linux-wpt Do a try run of the WPT label Nov 16, 2026
@github-actions

Copy link
Copy Markdown

🔨 Triggering try run (#43855359590) for Linux (WPT)

@github-actions

Copy link
Copy Markdown

Test results for linux-wpt from try job (#43855359590):

Flaky unexpected result (19)
  • OK /beacon/beacon-basic.https.window.html (#41723)
    • FAIL [expected PASS] subtest: Payload size restriction should be accumulated: type = string

      assert_false: expected false got true
      

    • FAIL [expected PASS] subtest: Payload size restriction should be accumulated: type = arraybuffer

      assert_false: expected false got true
      

  • FAIL [expected PASS] /css/css-backgrounds/background-size-041.html
  • 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 /html/browsers/browsing-the-web/navigating-across-documents/refresh/same-document-refresh.html (#34597)
    • FAIL [expected PASS] subtest: Same-Document Referrer from Refresh

      assert_equals: original page loads expected "http://web-platform.test:8000/html/browsers/browsing-the-web/navigating-across-documents/refresh/resources/refresh-with-section.sub.html?url=%23section" but got "http://web-platform.test:8000/html/browsers/browsing-the-web/navigating-across-documents/refresh/resources/refresh-with-section.sub.html?url=%23section#section"
      

  • TIMEOUT [expected OK] /html/browsers/windows/consume-user-activation/window-open-multi-global.html (#47399)
    • TIMEOUT [expected FAIL] subtest: window.open() and consuming user activation with multiple globals in play

      Test timed out
      

  • OK /html/semantics/embedded-content/media-elements/audio_loop_seek_to_eos.html (#41226)
    • FAIL [expected PASS] subtest: seeking to the end of looping audio

      promise_test: Unhandled rejection with value: object "TypeError: this argument is not a finite floating-point value"
      

  • OK /html/semantics/interactive-elements/the-summary-element/interactive-content.html
    • FAIL [expected PASS] subtest: Clicking on non-interactive child of a &lt;summary&gt; opens its &lt;details&gt;

      assert_true: expected true got false
      

  • OK /html/semantics/scripting-1/the-script-element/execution-timing/077.html (#22139)
    • FAIL [expected PASS] subtest: adding several types of scripts through the DOM and removing some of them confuses scheduler

      assert_array_equals: expected property 1 to be "Script #1 ran" but got "Script #3 ran" (expected array ["Script #2 ran", "Script #1 ran", "Script #3 ran", "Script #4 ran"] got ["Script #2 ran", "Script #3 ran", "Script #4 ran", "Script #1 ran"])
      

  • TIMEOUT [expected OK] /html/user-activation/navigation-state-reset-sameorigin.html (#45151)
    • TIMEOUT [expected FAIL] subtest: Post-navigation state reset.

      Test timed out
      

  • TIMEOUT [expected OK] /html/user-activation/propagation-sameorigin.html (#49544)
    • NOTRUN [expected PASS] subtest: Propagation test
  • OK /html/webappapis/user-prompts/print-during-unload.html (#35944)
    • FAIL [expected PASS] subtest: print() during unload

      assert_array_equals: expected property 1 to be "destination" but got "error: window.print is not a function" (expected array ["start", "destination"] got ["start", "error: window.print is not a function"])
      

  • OK /infrastructure/testdriver/click_iframe.html (#47688)
    • FAIL [expected PASS] subtest: TestDriver click on a document in an iframe

      Unhandled rejection: assert_unreached: click failed Reached unreachable code
      

  • ERROR [expected OK] /intersection-observer/v2/animated-opacity.html (#40827)
  • PASS [expected FAIL] /mathml/presentation-markup/operators/operator-dictionary-empty-and-three-chars.html (#49173)
  • TIMEOUT [expected OK] /pointerevents/compat/pointerevent_touch-action_two-finger_interaction.html
    • NOTRUN [expected PASS] subtest: touch two-finger pan on 'touch-action: pan-x pan-y'
    • NOTRUN [expected FAIL] subtest: touch two-finger pan on 'touch-action: pinch-zoom'
  • OK /sanitizer-api/sanitizer-inert-document.html (#45260)
    • FAIL [expected PASS] subtest: Test whether setHTML loads the image.

      promise_test: Unhandled rejection with value: "The server observed a request. It shouldn't have."
      

    • PASS [expected FAIL] subtest: Test whether setHTMLUnsafe loads the image.
  • TIMEOUT [expected PASS] /streams/readable-streams/crashtests/from-cross-realm.https.html
  • OK /webdriver/tests/classic/get_alert_text/get.py
    • FAIL [expected PASS] subtest: test_get_confirm_text

      AssertionError: no such alert (404): No user prompt is currently active.
      

    • FAIL [expected PASS] subtest: test_get_prompt_text

      AssertionError: assert 'Hello' == 'Enter Your Name: '
      

  • OK /webdriver/tests/classic/perform_actions/pointer_mouse.py (#49662)
    • FAIL [expected PASS] subtest: test_down_closes_browsing_context[without up]

      Failed: DID NOT RAISE &lt;class 'webdriver.error.NoSuchWindowException'&gt;
      

Stable unexpected results that are known to be intermittent (10)
  • OK [expected TIMEOUT] /IndexedDB/idbcursor-request-source.any.worker.html (#48700)
    • PASS [expected TIMEOUT] subtest: IDBObjectStore::openCursor's request source must be the IDBObjectStore instance that opened the cursor
  • TIMEOUT /dom/xpath-evaluation-detached-nodes.html (#49715)
    • FAIL [expected PASS] subtest: Axis traversal on detached attribute does not crash and returns empty node-set

      assert_equals: Expression "ancestor-or-self::*" on detached attribute should return empty node-set expected 0 but got 1
      

  • OK [expected TIMEOUT] /fetch/api/redirect/redirect-keepalive.https.any.html (#32153)
    • PASS [expected TIMEOUT] subtest: [keepalive][iframe][load] mixed content redirect; setting up
  • TIMEOUT [expected OK] /html/browsers/browsing-the-web/navigating-across-documents/cross-origin-top-navigation-with-user-activation-in-parent.window.html (#48205)
    • TIMEOUT [expected FAIL] subtest: Cross-origin top navigation is blocked without user activation, even if the parent has user activation

      Test timed out
      

  • CRASH [expected TIMEOUT] /html/browsers/history/the-location-interface/location_replace_session_history.html (#41896)
  • TIMEOUT /html/semantics/embedded-content/media-elements/preserves-pitch.html (#49303)
    • PASS [expected TIMEOUT] subtest: The default playbackRate should not affect pitch
    • PASS [expected NOTRUN] subtest: The default playbackRate should not affect pitch, even with preservesPitch=false
    • PASS [expected NOTRUN] subtest: Speed-ups should not change the pitch when preservesPitch=true
    • PASS [expected NOTRUN] subtest: Slow-downs should not change the pitch when preservesPitch=true
    • TIMEOUT [expected NOTRUN] subtest: Speed-ups should change the pitch when preservesPitch=false

      Test timed out
      

  • OK /infrastructure/testdriver/click_window.html (#47303)
    • FAIL [expected PASS] subtest: TestDriver click method in window

      Unhandled rejection: assert_unreached: click failed Reached unreachable code
      

  • FAIL [expected PASS] /mathml/presentation-markup/operators/mo-single-char-and-children.html (#49318)
  • OK /user-timing/measure_associated_with_navigation_timing.html (#47273)
    • FAIL [expected PASS] subtest: loadTime plus loadEventEnd to a mark "a" should equal to navigationStart to "a".

      assert_equals: loadTime plus loadEventEnd to a mark "a" should equal to navigationStart to "a". expected 11.72 but got 11.709999999999999
      

  • TIMEOUT [expected OK] /webdriver/tests/classic/perform_actions/navigation.py (#38822)
Stable unexpected results (1)
  • OK /css/mediaqueries/test_media_queries.html
    • PASS [expected FAIL] subtest: should_apply: (device-aspect-ratio: ${real_dar})
    • PASS [expected FAIL] subtest: should_apply: not all and (device-aspect-ratio: ${high_dar_1})
    • PASS [expected FAIL] subtest: should_apply: not all and (device-aspect-ratio: ${low_dar_2})
    • PASS [expected FAIL] subtest: should_apply: (device-aspect-ratio)
    • PASS [expected FAIL] subtest: should_apply: (min-device-aspect-ratio: ${real_dar})
    • PASS [expected FAIL] subtest: should_apply: not all and (min-device-aspect-ratio: ${high_dar_2})
    • PASS [expected FAIL] subtest: should_apply: all and (min-device-aspect-ratio: ${low_dar_2})
    • PASS [expected FAIL] subtest: should_apply: all and (max-device-aspect-ratio: ${real_dar})
    • PASS [expected FAIL] subtest: should_apply: (max-device-aspect-ratio: ${high_dar_1})
    • PASS [expected FAIL] subtest: should_apply: (max-device-aspect-ratio: ${high_dar_2})
    • And 13 more unexpected results...

@github-actions

Copy link
Copy Markdown

⚠️ Try run (#43855359590) failed!

Update stylo to include device-aspect-ratio support. Remove ini files that no longer fail.

Part of servo#39068

Testing:
```
> ./mach test-wpt tests/wpt/tests/css/mediaqueries/device-aspect-ratio-*.html

...
 0:02.54 TEST_END: PASS
 0:02.56 TEST_END: PASS
 0:02.57 TEST_END: PASS
 0:02.58 TEST_END: PASS
 0:03.78 SUITE_END

web-platform-test
~~~~~~~~~~~~~~~~~
Ran 4 checks (4 tests)
Expected results: 4
Unexpected results: 0
OK
```

Signed-off-by: Elliot Zhang <[email protected]>
@Loirooriol
Loirooriol marked this pull request as ready for review November 16, 2026 13:03
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Nov 16, 2026
@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Nov 16, 2026
@Loirooriol
Loirooriol enabled auto-merge November 16, 2026 13:03
@Loirooriol
Loirooriol added this pull request to the merge queue Nov 16, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Nov 16, 2026
@github-actions

Copy link
Copy Markdown

Test results for linux-wpt from merge queue job (#43876804467):

Flaky unexpected result (17)
  • CRASH [expected OK] /_webgl/conformance2/wasm/readpixels-2gb-in-4gb-wasm-memory.html
  • OK /css/css-position/static-position/inline-containing-block-with-border.html
    • FAIL [expected PASS] subtest: writing-mode: horizontal-tb; direction: ltr; inline box 'border-inline-start: 30px solid; padding-inline-start: 7px'; originally inline-level absolutely positioned box

      assert_equals: left expected 111 but got 137
      

  • OK /css/css-text-decor/parsing/text-decoration-inset-computed.html (#47617)
    • FAIL [expected PASS] subtest: Property text-decoration-inset value '0'

      assert_true: text-decoration-inset doesn't seem to be supported in the computed style expected true got false
      

    • FAIL [expected PASS] subtest: Property text-decoration-inset value '0px 0px'

      assert_true: text-decoration-inset doesn't seem to be supported in the computed style expected true got false
      

    • FAIL [expected PASS] subtest: Property text-decoration-inset value '0.5em'

      assert_true: text-decoration-inset doesn't seem to be supported in the computed style expected true got false
      

    • FAIL [expected PASS] subtest: Property text-decoration-inset value '-1em'

      assert_true: text-decoration-inset doesn't seem to be supported in the computed style expected true got false
      

    • FAIL [expected PASS] subtest: Property text-decoration-inset value '-1ch -1ch'

      assert_true: text-decoration-inset doesn't seem to be supported in the computed style expected true got false
      

    • FAIL [expected PASS] subtest: Property text-decoration-inset value '1px 2px'

      assert_true: text-decoration-inset doesn't seem to be supported in the computed style expected true got false
      

    • FAIL [expected PASS] subtest: Property text-decoration-inset value '1ch -1ch'

      assert_true: text-decoration-inset doesn't seem to be supported in the computed style expected true got false
      

    • FAIL [expected PASS] subtest: Property text-decoration-inset value 'calc(1em / 4) calc(-1ch)'

      assert_true: text-decoration-inset doesn't seem to be supported in the computed style expected true got false
      

    • FAIL [expected PASS] subtest: Property text-decoration-inset value 'auto'

      assert_true: text-decoration-inset doesn't seem to be supported in the computed style expected true got false
      

    • FAIL [expected PASS] subtest: Property text-decoration-inset value '10%'

      assert_true: text-decoration-inset doesn't seem to be supported in the computed style expected true got false
      

    • And 5 more unexpected results...
  • OK /dom/nodes/moveBefore/iframe-document-preserve.window.html (#43152)
    • FAIL [expected PASS] subtest: moveBefore(): cross-origin iframe is preserved: remove new parent

      assert_equals: iframe does not fire a second load event expected 1 but got 0
      

    • FAIL [expected PASS] subtest: moveBefore(): cross-origin iframe is preserved: remove self

      assert_equals: iframe does not fire a second load event expected 1 but got 0
      

    • FAIL [expected PASS] subtest: moveBefore(): cross-origin iframe is preserved: remove self via innerHTML

      assert_equals: iframe does not fire a second load event expected 1 but got 0
      

  • OK [expected TIMEOUT] /html/browsers/browsing-the-web/navigating-across-documents/cross-origin-top-navigation-with-user-activation-in-parent.window.html (#48205)
    • FAIL [expected TIMEOUT] subtest: Cross-origin top navigation is blocked without user activation, even if the parent has user activation

      assert_equals: expected "Denied" but got "Allowed"
      

  • TIMEOUT [expected ERROR] /html/browsers/history/the-location-interface/location_replace_session_history.html (#41896)
  • CRASH [expected TIMEOUT] /html/browsers/the-window-object/open-close/open-features-is-popup-condition.html?single-2
  • TIMEOUT [expected OK] /html/browsers/windows/consume-user-activation/window-open-multi-global.html (#47399)
    • TIMEOUT [expected FAIL] subtest: window.open() and consuming user activation with multiple globals in play

      Test timed out
      

  • TIMEOUT [expected OK] /html/user-activation/navigation-state-reset-sameorigin.html (#45151)
    • TIMEOUT [expected FAIL] subtest: Post-navigation state reset.

      Test timed out
      

  • OK /html/webappapis/user-prompts/print-during-unload.html (#35944)
    • FAIL [expected PASS] subtest: print() during unload

      assert_array_equals: expected property 1 to be "destination" but got "error: window.print is not a function" (expected array ["start", "destination"] got ["start", "error: window.print is not a function"])
      

  • PASS [expected FAIL] /mathml/presentation-markup/operators/operator-dictionary-empty-and-three-chars.html (#49173)
  • ERROR [expected TIMEOUT] /performance-timeline/not-restored-reasons/abort-block-bfcache.window.html (#42802)
  • OK /pointerevents/compat/pointerevent_touch-action_two-finger_interaction.html
    • FAIL [expected PASS] subtest: touch two-finger pan on 'touch-action: pan-x pan-y'

      assert_equals: expected 2 but got 1
      

  • OK /pointerevents/pointerevent_pointercapture_in_frame.html?pen (#45536)
    • PASS [expected FAIL] subtest: Test penpointer capture in same-origin frame: Pointer down at inner frame and set pointer capture.
    • PASS [expected FAIL] subtest: Test penpointer capture in same-origin frame: Pointer down at inner frame and set pointer capture to outer frame should not capture.
  • OK /pointerevents/pointerevent_pointercapture_in_frame.html?touch (#45445)
    • FAIL [expected PASS] subtest: Test touchpointer capture in same-origin frame: Pointer down at inner frame and set pointer capture.

      assert_true: Timed out waiting for lostpointercapture expected true got false
      

    • FAIL [expected PASS] subtest: Test touchpointer capture in same-origin frame: Pointer down at inner frame and set pointer capture to outer frame should not capture.

      assert_array_equals: Received events: innerFrame received pointerdown,innerFrame received pointermove,innerFrame received pointerup,innerFrame received lostpointercapture lengths differ, expected array ["innerFrame received pointerdown", "innerFrame received pointermove", "innerFrame received pointerup"] length 3, got ["innerFrame received pointerdown", "innerFrame received pointermove", "innerFrame received pointerup", "innerFrame received lostpointercapture"] length 4
      

  • OK /upgrade-insecure-requests/gen/sharedworker-classic-data.http-rp/upgrade/fetch.https.html
    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and downgrade redirection from https context.

      assert_equals: The resource request should be 'allowed'. expected "allowed" but got "blocked"
      

    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects allowed for fetch to cross-http-downgrade origin and no-redirect redirection from https context.

      assert_equals: The resource request should be 'allowed'. expected "allowed" but got "blocked"
      

    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects allowed for fetch to cross-https origin and downgrade redirection from https context.

      assert_equals: The resource request should be 'allowed'. expected "allowed" but got "blocked"
      

    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and downgrade redirection from https context.

      assert_equals: The resource request should be 'allowed'. expected "allowed" but got "blocked"
      

    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects allowed for fetch to same-http-downgrade origin and no-redirect redirection from https context.

      assert_equals: The resource request should be 'allowed'. expected "allowed" but got "blocked"
      

    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects allowed for fetch to same-https origin and downgrade redirection from https context.

      assert_equals: The resource request should be 'allowed'. expected "allowed" but got "blocked"
      

  • OK /webdriver/tests/classic/perform_actions/iframe.py
    • FAIL [expected PASS] subtest: test_perform_actions_on_element_in_frame[cross_origin]

      AssertionError: assert '' == 'clicked'
      

Stable unexpected results that are known to be intermittent (10)
  • OK /beacon/beacon-basic.https.window.html (#41723)
    • FAIL [expected PASS] subtest: Payload size restriction should be accumulated: type = string

      assert_false: expected false got true
      

    • FAIL [expected PASS] subtest: Payload size restriction should be accumulated: type = arraybuffer

      assert_false: expected false got true
      

    • FAIL [expected PASS] subtest: Payload size restriction should be accumulated: type = blob

      assert_false: expected false got true
      

  • OK /css/CSS2/floats/float-in-block-in-inline-position-001.html (#49534)
    • FAIL [expected PASS] subtest: A line after a bordered block containing a float avoids it at the block's position (sibling)

      assert_equals: the line's block-axis position expected 108 but got 106.35000000000002
      

  • OK /css/CSS2/floats/floats-in-inline-content-intrinsic-size-001.html (#49728)
    • FAIL [expected PASS] subtest: An empty float next to text (emptyFloatAndText, min-content)

      assert_equals: expected 70 but got 50
      

  • OK /css/CSS2/visudet/inline-block-baseline-with-block-in-inline-001.html (#49559)
    • FAIL [expected PASS] subtest: An inline-block whose last line box holds a block level box exports that line's baseline

      assert_equals: the text after the inline-block is aligned to the inline-block's last line box baseline expected 20 but got 18.35
      

  • OK /css/css-fonts/variations/at-font-face-font-matching.html (#20684)
    • FAIL [expected PASS] subtest: Matching font-style: 'oblique 21deg' should prefer 'oblique 30deg 60deg' over 'oblique 40deg 50deg'

      assert_equals: Unexpected font on test element expected 487 but got 532
      

  • CRASH [expected TIMEOUT] /dom/xpath-evaluation-detached-nodes.html (#49715)
  • OK [expected ERROR] /focus/focus-event-after-switching-iframes.sub.html (#40368)
  • TIMEOUT /html/browsers/history/the-history-interface/001.html (#12580)
    • FAIL [expected PASS] subtest: traversing history must also traverse hash changes

      assert_equals: (this could cause other failures later on) expected "" but got "test"
      

  • PASS [expected FAIL] /mathml/presentation-markup/operators/mo-lspace-rspace-dynamic.html (#49168)
  • OK /preload/prefetch-document.html (#37210)
    • PASS [expected FAIL] subtest: different-site document prefetch with 'as=document' should not be consumed

Merged via the queue into servo:main with commit d6dc775 Nov 16, 2026
39 checks passed
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Nov 16, 2026
@z11i
z11i deleted the device-aspect-ratio branch November 18, 2026 01:29
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.

4 participants