Skip to content

layout: Create table fragments using logical rectangles - #49964

Merged
mrobinson merged 2 commits into
servo:mainfrom
SimonSapin:table-logical-fragments
Nov 18, 2026
Merged

mrobinson merged 2 commits into
servo:mainfrom
SimonSapin:table-logical-fragments

Conversation

@SimonSapin

@SimonSapin SimonSapin commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

This change continues the conversion of various layout modes to collect
logical rectangles, only converting to physical rectangles when the final
size of their container is known.

Follow up to #49898
Testing: One new WPT failure due to lacking full orthogonal flow support.

@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Nov 16, 2026
@SimonSapin
SimonSapin force-pushed the table-logical-fragments branch from 94f257c to cfb0759 Compare November 16, 2026 16:10
@SimonSapin SimonSapin added the T-linux-wpt Do a try run of the WPT label Nov 17, 2026
@github-actions github-actions Bot removed the T-linux-wpt Do a try run of the WPT label Nov 17, 2026
@github-actions

Copy link
Copy Markdown

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

@github-actions

Copy link
Copy Markdown

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

Flaky unexpected result (24)
  • CRASH [expected OK] /IndexedDB/idb-binary-key-roundtrip.any.worker.html
  • TIMEOUT [expected OK] /IndexedDB/idbcursor-continuePrimaryKey-exception-order.any.sharedworker.html
    • TIMEOUT [expected PASS] subtest: InvalidAccessError(incorrect source) v.s. InvalidStateError(iteration ongoing)

      Test timed out
      

  • 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/css-position/static-position/inline-containing-block-with-border.html (#49970)
    • 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 [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.window.html
    • TIMEOUT [expected PASS] subtest: Cross-origin top navigation is allowed with user activation

      Test timed out
      

  • 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
      

  • TIMEOUT [expected PASS] /html/semantics/document-metadata/the-link-element/link-error-handler-triggers-abort-crash.html (#49503)
  • TIMEOUT [expected OK] /html/semantics/embedded-content/media-elements/playing-the-media-resource/fragmented-mp4-end.html (#48349)
    • TIMEOUT [expected PASS] subtest: fragmented-mp4-end

      Test timed out
      

  • OK /html/semantics/embedded-content/media-elements/seeking/seek-to-negative-time.htm (#48267)
    • FAIL [expected PASS] subtest: seek to negative time

      The index is not in the allowed range.
      

  • OK /html/semantics/forms/form-submission-0/form-submit-iframe-then-location-navigate.html (#29634)
    • PASS [expected FAIL] subtest: Verifies that location navigations take precedence when following form submissions.
  • 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
      

  • 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
      

  • PASS [expected FAIL] /mathml/presentation-markup/operators/operator-dictionary-empty-and-three-chars.html (#49173)
  • OK /mixed-content/tentative/autoupgrades/video-upgrade.https.sub.html (#41135)
    • FAIL [expected PASS] subtest: Video autoupgraded

      assert_equals: Length. expected 1 but got Infinity
      

  • 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 /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 /preload/prefetch-document.html (#37210)
    • PASS [expected FAIL] subtest: different-site document prefetch with 'as=document' should not be consumed
  • CRASH [expected TIMEOUT] /referrer-policy/gen/top.http-rp/unsafe-url/svg-a-tag.http.html
  • 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 OK] /webaudio/the-audio-api/the-stereopanner-interface/stereopannernode-panning.html
  • OK /webdriver/tests/classic/set_window_rect/user_prompts.py
    • ERROR [expected PASS] subtest: test_accept[alert-None]

      teardown error: ConnectionRefusedError: [Errno 111] Connection refused
      

    • ERROR [expected PASS] subtest: test_accept[confirm-True]

      setup error: ConnectionRefusedError: [Errno 111] Connection refused
      

    • ERROR [expected PASS] subtest: test_accept[prompt-]

      setup error: ConnectionRefusedError: [Errno 111] Connection refused
      

    • ERROR [expected PASS] subtest: test_accept_and_notify[alert-None]

      setup error: ConnectionRefusedError: [Errno 111] Connection refused
      

    • ERROR [expected PASS] subtest: test_accept_and_notify[confirm-True]

      setup error: ConnectionRefusedError: [Errno 111] Connection refused
      

    • ERROR [expected PASS] subtest: test_accept_and_notify[prompt-]

      setup error: ConnectionRefusedError: [Errno 111] Connection refused
      

    • ERROR [expected PASS] subtest: test_dismiss[alert-None]

      setup error: ConnectionRefusedError: [Errno 111] Connection refused
      

    • ERROR [expected PASS] subtest: test_dismiss[confirm-False]

      setup error: ConnectionRefusedError: [Errno 111] Connection refused
      

    • ERROR [expected PASS] subtest: test_dismiss[prompt-None]

      setup error: ConnectionRefusedError: [Errno 111] Connection refused
      

    • ERROR [expected PASS] subtest: test_dismiss_and_notify[alert-None]

      setup error: ConnectionRefusedError: [Errno 111] Connection refused
      

    • And 8 more unexpected results...
Stable unexpected results that are known to be intermittent (6)
  • 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 = 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/css-fonts/variations/at-font-face-font-matching.html (#20684)
    • FAIL [expected PASS] subtest: Matching font-stretch: '90%' should prefer '50% 80%' over '60% 70%'

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

    • FAIL [expected PASS] subtest: Matching font-style: 'oblique 20deg' should prefer 'oblique 30deg 60deg' over 'oblique 40deg 50deg'

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

  • OK [expected ERROR] /focus/focus-event-after-switching-iframes.sub.html (#40368)
  • CRASH [expected ERROR] /html/browsers/history/the-location-interface/location_replace_session_history.html (#41896)
  • 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 42.62 but got 42.620000000000005
      

Stable unexpected results (7)
  • FAIL [expected PASS] /_mozilla/css/table-row-direction.html
  • FAIL [expected PASS] /css/CSS2/bidi-text/direction-applies-to-001.xht
  • FAIL [expected PASS] /css/CSS2/bidi-text/direction-applies-to-002.xht
  • FAIL [expected PASS] /css/CSS2/bidi-text/direction-applies-to-003.xht
  • FAIL [expected PASS] /css/CSS2/bidi-text/direction-applies-to-004.xht
  • FAIL [expected PASS] /css/css-writing-modes/border-conflict-element-vrl-008.xht
  • FAIL [expected PASS] /css/css-writing-modes/table-progression-htb-001.html

@github-actions

Copy link
Copy Markdown

⚠️ Try run (#44160826934) failed!

Follow up to servo#49898
Part of servo#2560
Testing: WPT

Signed-off-by: Simon Sapin <[email protected]>
Other browsers also do this and it fixes a good number of tests.

Signed-off-by: Martin Robinson <[email protected]>
@mrobinson
mrobinson force-pushed the table-logical-fragments branch from cfb0759 to 753720f Compare November 18, 2026 16:22
@mrobinson

Copy link
Copy Markdown
Member

I've pushed a new commit that fixes most of the failures. It turns out that other browsers use the table writing mode for rows and row groups and it does the same thing. The remaining failure seems to be due to lacking full support for orthogonal flows.

@mrobinson mrobinson changed the title Port table layout to create fragments with logical rects layout: Create table fragments using logical rectangles Nov 18, 2026
@SimonSapin

Copy link
Copy Markdown
Member Author

Looks good, thanks! The spec for the writing-mode property indeed says:

https://drafts.csswg.org/css-writing-modes/#propdef-writing-mode

Applies to: All elements except table row groups, table column groups, table rows, table columns, ruby base containers, ruby annotation containers

And it makes sense to have the entire table in a consistent mode.

@mrobinson
mrobinson added this pull request to the merge queue Nov 18, 2026
@servo-highfive servo-highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Nov 18, 2026
Merged via the queue into servo:main with commit e8a83ae Nov 18, 2026
37 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 18, 2026
@SimonSapin
SimonSapin deleted the table-logical-fragments branch November 19, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants