Skip to content

stylo: Use f64 everywhere in animation logic - #45682

Merged
Loirooriol merged 1 commit into
servo:mainfrom
Loirooriol:animation-f64
Jun 15, 2026
Merged

Loirooriol merged 1 commit into
servo:mainfrom
Loirooriol:animation-f64

Conversation

@Loirooriol

@Loirooriol Loirooriol commented Jun 14, 2026 •

Copy link
Copy Markdown
Contributor

Bumps Stylo to servo/stylo#392

This avoids potential assert failures due to the precision loss of converting f64 into f32.

Testing: Adds a crashtest. Since the problem was dependent on timing, it would only fail intermittently. With the fix it should never fail.
Fixes: #45008

@Loirooriol Loirooriol added T-linux-wpt Do a try run of the WPT dependencies Pull requests that update a dependency file labels Jun 14, 2026
@github-actions github-actions Bot removed the T-linux-wpt Do a try run of the WPT label Jun 14, 2026
@github-actions

Copy link
Copy Markdown

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

@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

🤖 Opened new upstream WPT pull request (web-platform-tests/wpt#60622) with upstreamable changes.

@github-actions

Copy link
Copy Markdown

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

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

      assert_false: expected false got true
      

  • CRASH [expected OK] /content-security-policy/meta/sandbox-iframe.html (#43478)
  • FAIL [expected PASS] /css/css-backgrounds/background-size-042.html
  • OK /css/css-cascade/layer-font-face-override.html (#35935)
    • PASS [expected FAIL] subtest: @font-face override update with appended sheet 1
    • PASS [expected FAIL] subtest: @font-face override update with appended sheet 2
  • OK /css/css-fonts/variations/at-font-face-font-matching.html (#20684)
    • PASS [expected FAIL] subtest: Matching font-style: 'oblique 0deg' should prefer 'oblique -40deg -30deg' over 'italic'
  • OK /dom/nodes/moveBefore/iframe-document-preserve.window.html (#43152)
    • 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
      

  • OK [expected TIMEOUT] /fetch/api/redirect/redirect-keepalive.https.any.html (#32153)
    • PASS [expected TIMEOUT] subtest: [keepalive][iframe][load] mixed content redirect; setting up
  • OK /fetch/metadata/window-open.https.sub.html (#40339)
    • FAIL [expected PASS] subtest: Same-site window, forced, reloaded

      The operation is insecure.
      

  • 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/semantics/forms/form-submission-0/jsurl-form-submit.tentative.html (#36489)
    • PASS [expected FAIL] subtest: Verifies that form submissions scheduled inside javascript: urls take precedence over the javascript: url's return value.
  • CRASH [expected ERROR] /html/semantics/forms/the-select-element/customizable-select/select-appearance-button-after-span.html
  • OK /html/semantics/scripting-1/the-script-element/module/dynamic-import/blob-url.any.worker-module.html (#43510)
    • FAIL [expected PASS] subtest: Revoking a blob URL immediately after calling import will not fail

      promise_test: Unhandled rejection with value: object "TypeError: Module fetching failed"
      

  • OK /html/semantics/scripting-1/the-script-element/module/dynamic-import/blob-url.any.worker.html (#33909)
    • FAIL [expected PASS] subtest: Revoking a blob URL immediately after calling import will not fail

      promise_test: Unhandled rejection with value: object "TypeError: Module fetching failed"
      

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

      Unhandled rejection: assert_unreached: click failed Reached unreachable code
      

  • OK [expected TIMEOUT] /infrastructure/testdriver/click_nested.html (#43887)
    • FAIL [expected NOTRUN] subtest: TestDriver click method with multiple windows and nested iframe

      can't access property "document", child.frames[2] is undefined
      

  • ERROR [expected TIMEOUT] /performance-timeline/not-restored-reasons/abort-block-bfcache.window.html (#42802)
  • TIMEOUT [expected OK] /pointerevents/compat/pointerevent_touch-action_two-finger_interaction.html (#44693)
    • 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 /resource-timing/buffer-full-add-then-clear.html (#40819)
    • FAIL [expected PASS] subtest: Test that if the buffer is cleared after entries were added to the secondary buffer, those entries make it into the primary one

      assert_equals: Number of entries does not match the expected value. expected 3 but got 0
      

  • TIMEOUT [expected OK] /svg/painting/fill-rule-no-interpolation.html
  • TIMEOUT /trusted-types/trusted-types-navigation.html?06-10 (#37920)
    • TIMEOUT [expected FAIL] subtest: Navigate a frame via anchor with javascript:-urls in report-only mode.

      Test timed out
      

    • NOTRUN [expected TIMEOUT] subtest: Navigate a frame via anchor with javascript:-urls w/ default policy in report-only mode.
  • OK [expected TIMEOUT] /trusted-types/trusted-types-navigation.html?26-30 (#38807)
    • PASS [expected TIMEOUT] subtest: Navigate a window via form-submission with javascript:-urls in report-only mode.
    • PASS [expected NOTRUN] subtest: Navigate a window via form-submission with javascript:-urls w/ default policy in report-only mode.
    • PASS [expected NOTRUN] subtest: Navigate a frame via form-submission with javascript:-urls in enforcing mode.
    • PASS [expected NOTRUN] subtest: Navigate a frame via form-submission with javascript:-urls w/ default policy in enforcing mode.
  • TIMEOUT [expected OK] /upgrade-insecure-requests/gen/iframe-blank-inherit.meta/unset/worker-classic.https.html
    • TIMEOUT [expected PASS] subtest: Upgrade-Insecure-Requests: Expects blocked for worker-classic to same-http-downgrade origin and downgrade redirection from https context.

      Test timed out
      

    • NOTRUN [expected PASS] subtest: Upgrade-Insecure-Requests: Expects blocked for worker-classic to same-http-downgrade origin and no-redirect redirection from https context.
    • NOTRUN [expected PASS] subtest: Upgrade-Insecure-Requests: Expects blocked for worker-classic to same-https origin and downgrade redirection from https context.
  • OK /visual-viewport/resize-event-order.html (#41981)
    • PASS [expected FAIL] subtest: Popup: DOMWindow resize fired before VisualViewport.
  • OK /webdriver/tests/classic/dismiss_alert/dismiss.py (#39098)
    • FAIL [expected PASS] subtest: test_dismiss_in_popup_window

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

  • OK /webxr/xrSession_features_deviceSupport.https.html (#24357)
    • FAIL [expected PASS] subtest: Immersive XRSession requests with no supported device should reject

      assert_unreached: Should have rejected: undefined Reached unreachable code
      

  • CRASH [expected OK] /workers/SharedWorker-exception-propagation.html
  • CRASH [expected OK] /workers/SharedWorker-extendedLifetime-data.html
  • CRASH [expected OK] /workers/WorkerLocation_hostname.htm
  • CRASH [expected OK] /workers/WorkerLocation_port.htm
  • CRASH [expected OK] /workers/WorkerLocation_search_empty.htm
  • CRASH [expected ERROR] /workers/WorkerNavigator-hardware-concurrency.any.sharedworker.html
  • CRASH [expected OK] /workers/constructors/SharedWorker/null-arguments.html
  • CRASH [expected OK] /workers/constructors/SharedWorker/port-properties.html
  • CRASH [expected OK] /workers/constructors/SharedWorker/setting-port-members.html
  • CRASH [expected OK] /workers/constructors/SharedWorker/unexpected-global-properties.html
  • CRASH [expected OK] /workers/constructors/Worker/constructor-utf16-bom.html
  • CRASH [expected OK] /workers/constructors/Worker/terminate.html
  • CRASH [expected OK] /workers/dedicated-worker-parse-error-failure.html
  • CRASH [expected OK] /workers/interfaces/DedicatedWorkerGlobalScope/EventTarget.worker.html
  • CRASH [expected OK] /workers/interfaces/WorkerGlobalScope/location/setting-members.html
  • CRASH [expected OK] /workers/interfaces/WorkerGlobalScope/location/worker-separate-file.html
  • CRASH [expected OK] /workers/interfaces/WorkerUtils/WindowTimers/002.html
  • CRASH [expected OK] /workers/interfaces/WorkerUtils/importScripts/001.worker.html
  • CRASH [expected ERROR] /workers/interfaces/WorkerUtils/importScripts/report-error-same-origin.sub.any.sharedworker.html
  • CRASH [expected OK] /workers/interfaces/WorkerUtils/importScripts/report-error-same-origin.sub.any.worker.html
  • CRASH [expected OK] /workers/modules/dedicated-worker-import-referrer.html
  • CRASH [expected OK] /workers/modules/shared-worker-import-meta.html
  • CRASH [expected OK] /workers/nested_worker_importScripts.worker.html
  • CRASH [expected OK] /workers/same-site-cookies/third-party.default.tentative.sub.https.window.html
  • CRASH [expected OK] /workers/semantics/reporting-errors/002.html
  • CRASH [expected OK] /xhr/abort-during-unsent.any.html
  • CRASH [expected OK] /xhr/formdata/submitter-coordinate-value.html
Stable unexpected results that are known to be intermittent (21)
  • PASS [expected FAIL] /css/css-fonts/font-feature-settings-descriptor-01.html (#45418)
  • ERROR [expected OK] /fetch/fetch-later/quota/same-origin-iframe/accumulated-oversized-payload.https.window.html (#41705)
  • TIMEOUT /fetch/metadata/generated/css-images.sub.tentative.html (#29047)
    • TIMEOUT [expected PASS] subtest: background-image sec-fetch-site - Not sent to non-trustworthy same-origin destination

      Test timed out
      

  • OK [expected ERROR] /focus/focus-event-after-switching-iframes.sub.html (#40368)
  • OK /html/browsers/browsing-the-web/navigating-across-documents/005.html (#27062)
    • FAIL [expected PASS] subtest: Link with onclick navigation and href navigation

      assert_equals: expected "href" but got "click"
      

  • OK /html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-cross-origin.sub.window.html (#29056)
    • PASS [expected FAIL] subtest: Cross-origin navigation started from unload handler must be ignored
  • OK /html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin-fragment.html (#20768)
    • FAIL [expected PASS] subtest: Tests that a fragment navigation in the unload handler will not block the initial navigation

      assert_equals: expected "" but got "#fragment"
      

  • TIMEOUT [expected OK] /html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/form-requestsubmit.html (#44098)
    • TIMEOUT [expected FAIL] subtest: Replace before load, triggered by formElement.requestSubmit()

      Test timed out
      

  • OK [expected TIMEOUT] /html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/form-submit-button-click.html (#44099)
    • FAIL [expected TIMEOUT] subtest: Replace before load, triggered by submitButton.click()

      assert_equals: expected "http://web-platform.test:8000/common/blank.html?thereplacement=" but got "http://web-platform.test:8000/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/resources/code-injector.html?pipe=sub(none)&code=%0A%20%20%20%20const%20form%20%3D%20document.createElement(%22form%22)%3B%0A%20%20%20%20form.action%20%3D%20%22%2Fcommon%2Fblank.html%22%3B%0A%0A%20%20%20%20const%20input%20%3D%20document.createElement(%22input%22)%3B%0A%20%20%20%20input.type%20%3D%20%22hidden%22%3B%0A%20%20%20%20input.name%20%3D%20%22thereplacement%22%3B%0A%20%20%20%20form.append(input)%3B%0A%0A%20%20%20%20const%20button%20%3D%20document.createElement(%22button%22)%3B%0A%20%20%20%20button.type%20%3D%20%22submit%22%3B%0A%20%20%20%20form.append(button)%3B%0A%0A%20%20%20%20document.currentScript.before(form)%3B%0A%20%20%20%20button.click()%3B%0A%20%20"
      

  • ERROR [expected CRASH] /html/browsers/history/the-location-interface/location_replace_session_history.html (#41896)
  • TIMEOUT [expected OK] /html/infrastructure/urls/base-url/document-base-url-window-initiator-is-not-opener.https.window.html (#30970)
  • TIMEOUT /html/interaction/focus/the-autofocus-attribute/supported-elements.html (#24145)
    • TIMEOUT [expected PASS] subtest: Non-HTMLElement should not support autofocus

      Test timed out
      

    • NOTRUN [expected FAIL] subtest: Host element with delegatesFocus should support autofocus
    • NOTRUN [expected FAIL] subtest: Host element with delegatesFocus including no focusable descendants should be skipped
  • TIMEOUT [expected OK] /html/user-activation/navigation-state-reset-sameorigin.html (#45151)
    • TIMEOUT [expected PASS] subtest: Post-navigation state reset.

      Test timed out
      

  • OK /preload/prefetch-document.html (#37210)
    • PASS [expected FAIL] subtest: different-site document prefetch with 'as=document' should not be consumed
  • OK [expected CRASH] /resource-timing/render-blocking-status-link.html (#41664)
    • FAIL [expected PASS] subtest: Validate render blocking status of link resources in PerformanceResourceTiming

      assert_equals: render blocking status for http://web-platform.test:8000/resource-timing/resources/empty_style.css?stylesheet-head-dynamic-docWrite should be blocking expected (string) "blocking" but got (undefined) undefined
      

  • OK /resource-timing/test_resource_timing.html (#25720)
    • PASS [expected FAIL] subtest: PerformanceEntry has correct name, initiatorType, startTime, and duration (iframe)
    • PASS [expected FAIL] subtest: PerformanceEntry has correct name, initiatorType, startTime, and duration (link)
  • OK /resource-timing/test_resource_timing.https.html (#25216)
    • PASS [expected FAIL] subtest: PerformanceEntry has correct name, initiatorType, startTime, and duration (img)
  • OK /sanitizer-api/sanitizer-inert-document.html (#45260)
    • PASS [expected FAIL] subtest: Test whether setHTML loads the image.
    • FAIL [expected PASS] subtest: Test whether setHTMLUnsafe loads the image.

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

  • OK /touch-events/single-tap-when-touchend-listener-use-sync-xhr.html (#41175)
    • FAIL [expected PASS] subtest: Click event should be fired when touchend opens synchronous XHR

      assert_equals: expected "touchend@div, mousedown@div, mouseup@div, click@div" but got "touchend@div"
      

  • TIMEOUT [expected OK] /trusted-types/trusted-types-navigation.html?16-20 (#44835)
    • FAIL [expected PASS] subtest: Navigate a frame via area with javascript:-urls in report-only mode.

      promise_test: Unhandled rejection with value: "Unexpected message received: \"No securitypolicyviolation reported!\""
      

    • TIMEOUT [expected PASS] subtest: Navigate a frame via area with javascript:-urls w/ default policy in report-only mode.

      Test timed out
      

  • TIMEOUT [expected OK] /webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.html (#29053)
    • TIMEOUT [expected FAIL] subtest: StorageKey: test 3P about:blank window opened from a 3P iframe

      Test timed out
      

@github-actions

Copy link
Copy Markdown

✨ Try run (#27505416445) succeeded.

@Loirooriol
Loirooriol marked this pull request as ready for review June 14, 2026 17:23
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jun 14, 2026
@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Jun 14, 2026
@mrobinson

Copy link
Copy Markdown
Member

@Loirooriol Before landing, I think you need to correct the issue link in the PR description.

@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#60622) title and body.

@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jun 15, 2026
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#60622).

Psychpsyo pushed a commit to Psychpsyo/stylo that referenced this pull request Jun 15, 2026
We were previously using a mix of f32 and f64. Then it could happen that
we would first check that `a < b` in f64, but when converting to f32,
they might become equal due to the precision loss. Thus this could break
invariants in the logic, making a `debug_unreachable!()` reachable.

Servo PR: servo/servo#45682

Signed-off-by: Oriol Brufau <[email protected]>
Co-authored-by: Martin Robinson <[email protected]>
Co-authored-by: Martin Robinson <[email protected]>
Signed-off-by: Oriol Brufau <[email protected]>
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#60622).

1 similar comment
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#60622).

@Loirooriol
Loirooriol added this pull request to the merge queue Jun 15, 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 Jun 15, 2026
Merged via the queue into servo:main with commit a62dccb Jun 15, 2026
31 checks passed
@Loirooriol
Loirooriol deleted the animation-f64 branch June 15, 2026 12:25
@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 Jun 15, 2026
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

⛔ Failed to properly merge the upstream pull request (web-platform-tests/wpt#60622). Please address any CI issues and try to merge manually.

TG199 pushed a commit to TG199/servo that referenced this pull request Jun 21, 2026
Bumps Stylo to servo/stylo#392

This avoids potential assert failures due to the precision loss of
converting f64 into f32.

Testing: Adds a crashtest. Since the problem was dependent on timing, it
would only fail intermittently. With the fix it should never fail.
Fixes: servo#45008

Signed-off-by: Oriol Brufau <[email protected]>
Co-authored-by: Martin Robinson <[email protected]>
Loirooriol added a commit to servo/stylo that referenced this pull request Jul 1, 2026
We were previously using a mix of f32 and f64. Then it could happen that
we would first check that `a < b` in f64, but when converting to f32,
they might become equal due to the precision loss. Thus this could break
invariants in the logic, making a `debug_unreachable!()` reachable.

Servo PR: servo/servo#45682

Signed-off-by: Oriol Brufau <[email protected]>
Co-authored-by: Martin Robinson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

4 participants