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

Add initial support for css-text-3 whitespace handling #29828

Merged
merged 2 commits into from
Jul 20, 2023

Conversation

atbrakhi
Copy link
Member

@atbrakhi atbrakhi commented Jun 1, 2023

This adds initial support for whitespace handling from the CSS
specification for Layout 2020. In general, the basics are covered. Since
test output is very sensitive to whitespace handling, this change
incorporates several fixes:

  1. Whitespace is collapsed according to the Phase 1 rules of the
    specification, though language-specific unbreaking rules are not
    handled properly yet.
  2. Whitespace is mostly trimmed and positioned according to the Phase 2
    rules, but full support for removing whitespace at the end of lines
    is pending on a temporary data structure to hold lines under
    construction.
  3. Completely empty box fragments left over immediately after line
    breaks are now trimmed from the fragment tree.
  4. This change tries to detect when an inline formatting context
    collapses through.

Fixes #29994.
Fixes #29590.

@stshine
Copy link
Contributor

stshine commented Jun 1, 2023

@bors-servo try=wpt-2020

@bors-servo
Copy link
Contributor

⌛ Trying commit 021c724 with merge 4dd634d...

bors-servo added a commit that referenced this pull request Jun 1, 2023
…try>

Preserve whitespace between atomic inlines

White space are not preserved between atomic inlines , this PR fixes that

|Before in layout 2020 | Now in layout 2020 |
| --- | --- |
| ![image](https://user-images.githubusercontent.com/465303/230285516-306d2a7d-af55-42c3-b712-bcc06972b322.png) | ![image](https://user-images.githubusercontent.com/465303/230285563-a0b28003-3e31-46a8-a391-62ffd79b1a4f.png) |
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #29590

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo
Copy link
Contributor

💔 Test failed - checks-github

@stshine
Copy link
Contributor

stshine commented Jun 1, 2023

Too many failed tests, maybe this is not the right fix?

@atbrakhi
Copy link
Member Author

atbrakhi commented Jun 1, 2023

Too many failed tests, maybe this is not the right fix?

yeah maybe, I am looking into it.

@atbrakhi
Copy link
Member Author

atbrakhi commented Jun 2, 2023

@bors-servo try=wpt-2020

@bors-servo
Copy link
Contributor

@atbrakhi: 🔑 Insufficient privileges: not in try users

@stshine
Copy link
Contributor

stshine commented Jun 2, 2023

@bors-servo try=wpt-2020

@bors-servo
Copy link
Contributor

⌛ Trying commit 544f5f4 with merge 617c752...

bors-servo added a commit that referenced this pull request Jun 2, 2023
…try>

Preserve whitespace between atomic inlines

White space are not preserved between atomic inlines , this PR fixes that

|layout 2013 |Before in layout 2020 | Now in layout 2020 |
| --- | --- | --- |
| ![image](https://user-images.githubusercontent.com/465303/230285563-a0b28003-3e31-46a8-a391-62ffd79b1a4f.png) | ![image](https://user-images.githubusercontent.com/465303/230285516-306d2a7d-af55-42c3-b712-bcc06972b322.png) | ![image](https://user-images.githubusercontent.com/465303/230285563-a0b28003-3e31-46a8-a391-62ffd79b1a4f.png) |
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #29590

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo
Copy link
Contributor

🙁 There is no try chooser wept-2020 for this repo, try one of: linux, mac, windows, windows-rdp, wpt, wpt-2020, wpt-mac, wpt-android, android, magicleap, arm

@mrobinson
Copy link
Member

@bors-servo try=wpt-2020

@atbrakhi Can you make a PR against the servo/saltfs repository giving yourself try access? You should be able to find previous commits doing the same.

@bors-servo
Copy link
Contributor

🙁 There is no try chooser wept-2020 for this repo, try one of: linux, mac, windows, windows-rdp, wpt, wpt-2020, wpt-mac, wpt-android, android, magicleap, arm

@github-actions
Copy link

github-actions bot commented Jun 2, 2023

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

Stable unexpected results that are known to be intermittent (1)
  • PASS [expected FAIL] /_mozilla/mozilla/simple_scroll_to_fragment.html (#14606)
Stable unexpected results (16)
  • PASS [expected FAIL] /_mozilla/css/inline_absolute_hypothetical_baseline_a.html
  • FAIL [expected PASS] /_mozilla/css/inline_block_margin_auto_a.html
  • FAIL [expected PASS] /_mozilla/css/list_style_position_a.html
  • FAIL [expected PASS] /css/CSS2/abspos/remove-block-between-inline-and-abspos.html
  • FAIL [expected PASS] /css/CSS2/linebox/baseline-block-with-overflow-001.html
  • FAIL [expected PASS] /css/CSS2/margin-padding-clear/padding-right-applies-to-012.xht
  • OK /css/CSS2/normal-flow/block-in-inline-client-rects-001.html
    • FAIL [expected PASS] subtest: t1.getBoundingClientRect().width assert_equals: expected 200 but got 205
  • PASS [expected FAIL] /css/CSS2/normal-flow/inlines-013.xht
  • PASS [expected FAIL] /css/CSS2/visudet/inline-block-baseline-001.xht
  • PASS [expected FAIL] /css/CSS2/visudet/inline-block-baseline-003.xht
  • PASS [expected FAIL] /css/CSS2/visudet/inline-block-baseline-004.xht
  • FAIL [expected PASS] /css/css-content/pseudo-element-inline-box.html
  • FAIL [expected PASS] /css/css-flexbox/flex-direction-row-reverse.html
  • FAIL [expected PASS] /css/css-flexbox/flex-vertical-align-effect.html
  • FAIL [expected PASS] /css/css-flexbox/grandchild-span-height.html
  • FAIL [expected PASS] /css/css-flexbox/stretch-obeys-min-max-002.html

@bors-servo
Copy link
Contributor

💥 Test timed out

@atbrakhi
Copy link
Member Author

atbrakhi commented Jun 4, 2023

@bors-servo try=wpt-2020

@bors-servo
Copy link
Contributor

@atbrakhi: 🔑 Insufficient privileges: not in try users

@stshine
Copy link
Contributor

stshine commented Jun 4, 2023

@bors-servo try=wpt-2020

@stshine
Copy link
Contributor

stshine commented Jun 4, 2023

@bors-servo retry

@bors-servo
Copy link
Contributor

⌛ Trying commit 544f5f4 with merge 027adda...

bors-servo added a commit that referenced this pull request Jun 4, 2023
…try>

Preserve whitespace between atomic inlines

White space are not preserved between atomic inlines , this PR fixes that

|layout 2013 |Before in layout 2020 | Now in layout 2020 |
| --- | --- | --- |
| ![image](https://user-images.githubusercontent.com/465303/230285563-a0b28003-3e31-46a8-a391-62ffd79b1a4f.png) | ![image](https://user-images.githubusercontent.com/465303/230285516-306d2a7d-af55-42c3-b712-bcc06972b322.png) | ![image](https://user-images.githubusercontent.com/465303/230285563-a0b28003-3e31-46a8-a391-62ffd79b1a4f.png) |
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #29590

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@github-actions
Copy link

github-actions bot commented Jun 4, 2023

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

Flaky unexpected result (2)
  • OK /_mozilla/mozilla/task_queue_throttling.any.html (#22519)
    • FAIL [expected PASS] subtest: Throttling the performance timeline task queue. assert_true: expected true got false
  • PASS [expected FAIL] /css/CSS2/floats/float-nowrap-4.html
Stable unexpected results that are known to be intermittent (3)
  • PASS [expected FAIL] /_mozilla/mozilla/simple_scroll_to_fragment.html (#14606)
  • OK /css/CSS2/linebox/inline-negative-margin-001.html (#23862)
    • PASS [expected FAIL] subtest: [data-expected-height] 3
    • PASS [expected FAIL] subtest: [data-expected-height] 4
    • PASS [expected FAIL] subtest: [data-expected-height] 5
    • PASS [expected FAIL] subtest: [data-expected-height] 6
  • OK /css/css-flexbox/flex-aspect-ratio-img-row-005.html (#27009)
    • PASS [expected FAIL] subtest: img 4
Stable unexpected results (19)
  • PASS [expected FAIL] /_mozilla/css/inline_absolute_hypothetical_baseline_a.html
  • FAIL [expected PASS] /_mozilla/css/inline_block_margin_auto_a.html
  • FAIL [expected PASS] /_mozilla/css/list_style_position_a.html
  • FAIL [expected PASS] /css/CSS2/abspos/remove-block-between-inline-and-abspos.html
  • PASS [expected FAIL] /css/CSS2/css1/c5525-fltwidth-003.xht
  • FAIL [expected PASS] /css/CSS2/linebox/baseline-block-with-overflow-001.html
  • FAIL [expected PASS] /css/CSS2/margin-padding-clear/margin-right-applies-to-012.xht
  • FAIL [expected PASS] /css/CSS2/margin-padding-clear/padding-right-applies-to-012.xht
  • OK /css/CSS2/normal-flow/block-in-inline-client-rects-001.html
    • FAIL [expected PASS] subtest: t1.getBoundingClientRect().width assert_equals: expected 200 but got 205
  • PASS [expected FAIL] /css/CSS2/visudet/inline-block-baseline-001.xht
  • PASS [expected FAIL] /css/CSS2/visudet/inline-block-baseline-003.xht
  • PASS [expected FAIL] /css/CSS2/visudet/inline-block-baseline-004.xht
  • FAIL [expected PASS] /css/css-content/pseudo-element-inline-box.html
  • FAIL [expected PASS] /css/css-flexbox/flex-direction-row-reverse.html
  • FAIL [expected PASS] /css/css-flexbox/flex-vertical-align-effect.html
  • PASS [expected FAIL] /css/css-flexbox/flex-wrap-003.html
  • PASS [expected FAIL] /css/css-flexbox/flex-wrap-004.html
  • FAIL [expected PASS] /css/css-flexbox/grandchild-span-height.html
  • FAIL [expected PASS] /css/css-flexbox/stretch-obeys-min-max-002.html

@bors-servo
Copy link
Contributor

💔 Test failed - checks-github

@mrobinson mrobinson force-pushed the fix_white_space_not_being_preserved branch 2 times, most recently from 4e25277 to a5565ef Compare July 6, 2023 15:47
@stshine
Copy link
Contributor

stshine commented Jul 7, 2023

@bors-servo try

@bors-servo
Copy link
Contributor

⌛ Trying commit a5565ef with merge cbfab9a...

bors-servo added a commit that referenced this pull request Jul 7, 2023
…try>

Preserve whitespace between atomic inlines

White space are not preserved between atomic inlines , this PR fixes that

|layout 2013 |Before in layout 2020 | Now in layout 2020 |
| --- | --- | --- |
| ![image](https://user-images.githubusercontent.com/465303/230285563-a0b28003-3e31-46a8-a391-62ffd79b1a4f.png) | ![image](https://user-images.githubusercontent.com/465303/230285516-306d2a7d-af55-42c3-b712-bcc06972b322.png) | ![image](https://user-images.githubusercontent.com/465303/230285563-a0b28003-3e31-46a8-a391-62ffd79b1a4f.png) |
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #29590

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
co-authors: @mrobinson @mukilan
@github-actions
Copy link

github-actions bot commented Jul 7, 2023

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

Flaky unexpected result (19)
  • CRASH [expected PASS] /_mozilla/mozilla/webgl/tex_image_2d_abv.html
  • TIMEOUT [expected OK] /_webgl/conformance/glsl/misc/shader-uniform-packing-restrictions.html (#28103)
    • NOTRUN [expected PASS] subtest: Overall test
  • 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
  • ERROR [expected TIMEOUT] /html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html (#28541)
  • OK /html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-cross-origin.sub.window.html (#29056)
    • FAIL [expected PASS] subtest: Cross-origin navigation started from unload handler must be ignored promise_test: Unhandled rejection with value: object "SecurityError: The operation is insecure."
  • 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"
  • TIMEOUT [expected OK] /html/browsers/the-window-object/navigate-to-about-blank-while-initial-load-pending.html (#27964)
    • TIMEOUT [expected PASS] subtest: Navigating to about:blank while window.open initial load pending. Test timed out
  • CRASH [expected OK] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html (#24066)
  • 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 [expected TIMEOUT] /html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child-special-cases.tentative.sub.window.html (#29069)
  • OK /html/syntax/parsing/DOMContentLoaded-defer.html (#21550)
    • PASS [expected FAIL] subtest: The end: DOMContentLoaded and defer scripts
  • OK [expected TIMEOUT] /html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html (#25805)
  • OK [expected TIMEOUT] /html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html (#26371)
    • FAIL [expected TIMEOUT] subtest: delayed handling: delaying handling rejected promise created from createImageBitmap will cause both events to fire assert_array_equals: expected property 0 to be "InvalidStateError" but got "NotSupportedError" (expected array ["InvalidStateError"] got ["NotSupportedError"])
  • 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 /resource-timing/status-codes-create-entry.html (#28675)
    • PASS [expected FAIL] subtest: Make sure all status codes are reported
  • OK [expected TIMEOUT] /webmessaging/without-ports/018.html (#24485)
    • PASS [expected TIMEOUT] subtest: origin of the script that invoked the method, javascript:
  • TIMEOUT [expected OK] /webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html (#29053)
    • TIMEOUT [expected PASS] subtest: StorageKey: test 3P about:blank window opened from a 3P iframe Test timed out
  • ERROR [expected OK] /workers/constructors/Worker/Worker-constructor.html (#22991)
Stable unexpected results that are known to be intermittent (12)
  • OK /_mozilla/css/stylesheet_media_queries.html (#17159)
    • PASS [expected FAIL] subtest: Media queries within stylesheets
  • PASS [expected TIMEOUT] /css/css-color/animation/opacity-animation-ending-correctly-001.html (#29215)
  • TIMEOUT /fetch/metadata/generated/css-images.sub.tentative.html (#29047)
    • PASS [expected TIMEOUT] subtest: background-image sec-fetch-user - Not sent to non-trustworthy same-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/empty-iframe-load-event.html (#29066)
    • PASS [expected FAIL] subtest: Check execution order on load handler
    • PASS [expected FAIL] subtest: Check execution order from nested timeout
  • TIMEOUT /html/browsers/browsing-the-web/navigating-across-documents/javascript-url-no-beforeunload.window.html (#29055)
    • PASS [expected TIMEOUT] subtest: Navigating an opened window via location.href to a javascript: URL must not fire beforeunload: undefined completion
    • FAIL [expected NOTRUN] subtest: Navigating an opened window with an iframe via location.href to a javascript: URL must not fire beforeunload on the iframe: undefined completion promise_test: Unhandled rejection with value: object "TypeError: w.frames[0] is undefined"
    • PASS [expected NOTRUN] subtest: Navigating an iframe via location.href to a javascript: URL must not fire beforeunload: string completion
    • PASS [expected NOTRUN] subtest: Navigating an iframe via src="" to a javascript: URL after insertion must not fire beforeunload: string completion
    • TIMEOUT [expected NOTRUN] subtest: Navigating an opened window via location.href to a javascript: URL must not fire beforeunload: string completion Test timed out
  • FAIL [expected TIMEOUT] /html/canvas/element/manual/drawing-text-to-the-canvas/canvas.2d.disconnected.html (#29224)
  • 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)
    • FAIL [expected PASS] subtest: application/x-www-form-urlencoded: non-ASCII in filename (formdata event) assert_equals: expected "a=%C9%99.txt" but got ""
  • OK /html/semantics/forms/historical.html (#28568)
    • PASS [expected FAIL] subtest: <input name=isindex> should not be supported
  • TIMEOUT [expected OK] /html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html (#23205)
    • NOTRUN [expected FAIL] subtest: Check that rel=noopener with target=_self does a normal load
  • 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 TIMEOUT] /webaudio/the-audio-api/the-audiocontext-interface/audiocontextoptions.html (#21408)

@github-actions
Copy link

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

Stable unexpected results that are known to be intermittent (1)
  • OK /css/CSS2/linebox/inline-negative-margin-001.html (#23862)
    • FAIL [expected PASS] subtest: [data-expected-height] 3 assert_equals:
      <div class="w4" data-expected-height="10">123 <span style="margin-left: -4ch">1234 </span></div>
      height expected 10 but got 20
    • FAIL [expected PASS] subtest: [data-expected-height] 4 assert_equals:
      <div class="w4" data-expected-height="10">123 <span style="margin-left: -4ch">123 </span></div>
      height expected 10 but got 20
Stable unexpected results (122)
  • PASS [expected FAIL] /_mozilla/css/inline_absolute_hypothetical_baseline_a.html
  • PASS [expected FAIL] /_mozilla/css/inline_absolute_hypothetical_metrics_a.html
  • FAIL [expected PASS] /_mozilla/css/input_whitespace.html
  • PASS [expected FAIL] /_mozilla/css/line_break_nowrap.html
  • PASS [expected FAIL] /_mozilla/css/linebreak_inline_span_a.html
  • PASS [expected FAIL] /_mozilla/css/linebreak_simple_a.html
  • PASS [expected FAIL] /_mozilla/css/position_fixed_a.html
  • PASS [expected FAIL] /_mozilla/css/pseudo_element_a.html
  • PASS [expected FAIL] /_mozilla/css/text_overflow_basic_a.html
  • PASS [expected FAIL] /_mozilla/css/white-space-pre-line.htm
  • PASS [expected FAIL] /_mozilla/css/white-space-pre-wrap.htm
  • FAIL [expected PASS] /_mozilla/css/word-break-keep-all-006.htm
  • FAIL [expected PASS] /_mozilla/css/word-break-keep-all-007.htm
  • FAIL [expected PASS] /css/CSS2/abspos/remove-block-between-inline-and-abspos.html
  • PASS [expected FAIL] /css/CSS2/bidi-text/bidi-box-model-019.xht
  • PASS [expected FAIL] /css/CSS2/bidi-text/bidi-box-model-020.xht
  • PASS [expected FAIL] /css/CSS2/bidi-text/bidi-box-model-021.xht
  • PASS [expected FAIL] /css/CSS2/bidi-text/bidi-box-model-023.xht
  • PASS [expected FAIL] /css/CSS2/bidi-text/bidi-box-model-024.xht
  • PASS [expected FAIL] /css/CSS2/bidi-text/bidi-box-model-025.xht
  • PASS [expected FAIL] /css/CSS2/bidi-text/bidi-box-model-026.xht
  • PASS [expected FAIL] /css/CSS2/bidi-text/bidi-box-model-027.xht
  • PASS [expected FAIL] /css/CSS2/bidi-text/bidi-box-model-037.xht
  • PASS [expected FAIL] /css/CSS2/bidi-text/bidi-box-model-038.xht
  • PASS [expected FAIL] /css/CSS2/bidi-text/bidi-box-model-039.xht
  • PASS [expected FAIL] /css/CSS2/bidi-text/bidi-box-model-041.xht
  • PASS [expected FAIL] /css/CSS2/bidi-text/bidi-box-model-042.xht
  • PASS [expected FAIL] /css/CSS2/bidi-text/bidi-box-model-043.xht
  • PASS [expected FAIL] /css/CSS2/bidi-text/bidi-box-model-044.xht
  • PASS [expected FAIL] /css/CSS2/bidi-text/bidi-box-model-045.xht
  • PASS [expected FAIL] /css/CSS2/borders/border-color-012.xht
  • PASS [expected FAIL] /css/CSS2/box-display/anonymous-box-generation-001.xht
  • PASS [expected FAIL] /css/CSS2/box-display/insert-inline-in-blocks-n-inlines-begin-001.xht
  • PASS [expected FAIL] /css/CSS2/box-display/insert-inline-in-blocks-n-inlines-end-001.xht
  • PASS [expected FAIL] /css/CSS2/box-display/insert-inline-in-blocks-n-inlines-middle-001.xht
  • PASS [expected FAIL] /css/CSS2/css1/c414-flt-fit-002.xht
  • PASS [expected FAIL] /css/CSS2/css1/c414-flt-fit-003.xht
  • PASS [expected FAIL] /css/CSS2/css1/c414-flt-fit-004.xht
  • PASS [expected FAIL] /css/CSS2/css1/c414-flt-fit-005.xht
  • FAIL [expected PASS] /css/CSS2/css1/c542-letter-sp-001.xht
  • PASS [expected FAIL] /css/CSS2/css1/c547-indent-001.xht
  • PASS [expected FAIL] /css/CSS2/css1/c5501-imrgn-t-000.xht
  • PASS [expected FAIL] /css/CSS2/css1/c5502-mrgn-r-000.xht
  • PASS [expected FAIL] /css/CSS2/css1/c5503-imrgn-b-000.xht
  • PASS [expected FAIL] /css/CSS2/css1/c5506-ipadn-t-000.xht
  • PASS [expected FAIL] /css/CSS2/css1/c5506-ipadn-t-001.xht
  • PASS [expected FAIL] /css/CSS2/css1/c5507-padn-r-000.xht
  • PASS [expected FAIL] /css/CSS2/css1/c5508-ipadn-b-000.xht
  • PASS [expected FAIL] /css/CSS2/css1/c5508-ipadn-b-001.xht
  • PASS [expected FAIL] /css/CSS2/css1/c5509-padn-l-000.xht
  • PASS [expected FAIL] /css/CSS2/css1/c5525-fltwidth-003.xht
  • PASS [expected FAIL] /css/CSS2/floats-clear/floats-124.xht
  • PASS [expected FAIL] /css/CSS2/floats-clear/floats-125.xht
  • PASS [expected FAIL] /css/CSS2/floats-clear/floats-143.xht
  • PASS [expected FAIL] /css/CSS2/floats/float-no-content-beside-001.html
  • PASS [expected FAIL] /css/CSS2/floats/floats-wrap-bfc-002-right-overflow.xht
  • PASS [expected FAIL] /css/CSS2/floats/floats-wrap-bfc-002-right-table.xht
  • PASS [expected FAIL] /css/CSS2/fonts/font-applies-to-017.xht
  • PASS [expected FAIL] /css/CSS2/fonts/font-variant-applies-to-017.xht
  • PASS [expected FAIL] /css/CSS2/fonts/font-weight-applies-to-017.xht
  • PASS [expected FAIL] /css/CSS2/generated-content/after-content-display-001.xht
  • PASS [expected FAIL] /css/CSS2/generated-content/after-content-display-018.xht
  • PASS [expected FAIL] /css/CSS2/generated-content/content-173.xht
  • PASS [expected FAIL] /css/CSS2/generated-content/content-white-space-001.xht
  • PASS [expected FAIL] /css/CSS2/linebox/border-padding-bleed-001.xht
  • PASS [expected FAIL] /css/CSS2/linebox/border-padding-bleed-002.xht
  • PASS [expected FAIL] /css/CSS2/linebox/border-padding-bleed-003.xht
  • PASS [expected FAIL] /css/CSS2/linebox/inline-formatting-context-007.xht
  • PASS [expected FAIL] /css/CSS2/linebox/inline-formatting-context-013.xht
  • PASS [expected FAIL] /css/CSS2/normal-flow/block-in-inline-align-001.html
  • FAIL [expected PASS] /css/CSS2/normal-flow/block-in-inline-empty-001.xht
  • PASS [expected FAIL] /css/CSS2/normal-flow/block-in-inline-first-line-001.html
  • FAIL [expected PASS] /css/CSS2/normal-flow/block-in-inline-insert-006-nosplit-ref.xht
  • FAIL [expected PASS] /css/CSS2/normal-flow/block-in-inline-insert-006-ref.xht
  • FAIL [expected PASS] /css/CSS2/normal-flow/block-in-inline-insert-006.xht
  • PASS [expected FAIL] /css/CSS2/normal-flow/block-in-inline-margins-003.html
  • FAIL [expected PASS] /css/CSS2/normal-flow/block-in-inline-nested-002.xht
  • FAIL [expected PASS] /css/CSS2/normal-flow/block-in-inline-whitespace-001a.xht
  • FAIL [expected PASS] /css/CSS2/normal-flow/block-in-inline-whitespace-001b.xht
  • PASS [expected FAIL] /css/CSS2/normal-flow/inline-block-replaced-width-001.xht
  • PASS [expected FAIL] /css/CSS2/normal-flow/inline-block-replaced-width-006.xht
  • PASS [expected FAIL] /css/CSS2/normal-flow/inline-block-width-001a.xht
  • PASS [expected FAIL] /css/CSS2/normal-flow/inline-block-width-001b.xht
  • PASS [expected FAIL] /css/CSS2/normal-flow/inline-block-width-002a.xht
  • PASS [expected FAIL] /css/CSS2/normal-flow/inline-block-width-002b.xht
  • PASS [expected FAIL] /css/CSS2/normal-flow/max-width-percentage-001.xht
  • PASS [expected FAIL] /css/CSS2/normal-flow/min-width-percentage-001.xht
  • PASS [expected FAIL] /css/CSS2/normal-flow/replaced-intrinsic-002.xht
  • PASS [expected FAIL] /css/CSS2/normal-flow/width-percentage-001.xht
  • PASS [expected FAIL] /css/CSS2/normal-flow/width-percentage-002.xht
  • PASS [expected FAIL] /css/CSS2/positioning/abspos-008.xht
  • PASS [expected FAIL] /css/CSS2/positioning/position-relative-029.xht
  • PASS [expected FAIL] /css/CSS2/positioning/position-relative-030.xht
  • PASS [expected FAIL] /css/CSS2/positioning/position-relative-031.xht
  • PASS [expected FAIL] /css/CSS2/text/text-indent-014.xht
  • FAIL [expected PASS] /css/CSS2/text/text-indent-on-blank-line-rtl-left-align.html
  • PASS [expected FAIL] /css/CSS2/text/white-space-007.xht
  • FAIL [expected PASS] /css/CSS2/text/white-space-008.xht
  • PASS [expected FAIL] /css/CSS2/text/white-space-collapsing-003.xht
  • PASS [expected FAIL] /css/CSS2/text/white-space-collapsing-breaks-001.xht
  • PASS [expected FAIL] /css/CSS2/text/white-space-normal-008.xht
  • PASS [expected FAIL] /css/CSS2/text/white-space-processing-043.xht
  • PASS [expected FAIL] /css/CSS2/text/white-space-processing-044.xht
  • PASS [expected FAIL] /css/CSS2/text/white-space-processing-045.xht
  • PASS [expected FAIL] /css/CSS2/text/white-space-processing-053.xht
  • PASS [expected FAIL] /css/CSS2/visudet/inline-block-baseline-001.xht
  • PASS [expected FAIL] /css/CSS2/visudet/inline-block-baseline-003.xht
  • PASS [expected FAIL] /css/CSS2/visudet/inline-block-baseline-004.xht
  • FAIL [expected PASS] /css/CSS2/visuren/emptyspan-1.html
  • FAIL [expected PASS] /css/CSS2/visuren/split-inner-inline-2.html
  • FAIL [expected PASS] /css/CSS2/visuren/whitespace-present-1a.html
  • FAIL [expected PASS] /css/CSS2/visuren/whitespace-present-1b.html
  • PASS [expected FAIL] /css/css-flexbox/css-box-justify-content.html
  • PASS [expected FAIL] /css/css-flexbox/fieldset-baseline-alignment.html
  • PASS [expected FAIL] /css/css-flexbox/flex-wrap-003.html
  • PASS [expected FAIL] /css/css-flexbox/flex-wrap-004.html
  • PASS [expected FAIL] /css/css-flexbox/flexbox-anonymous-items-001.html
  • PASS [expected FAIL] /css/css-flexbox/flexbox-min-width-auto-005.html
  • PASS [expected FAIL] /css/css-flexbox/flexbox-with-multi-column-property.html
  • PASS [expected FAIL] /css/css-flexbox/flexbox_flex-none-wrappable-content.html
  • OK /css/css-flexbox/percentage-size-quirks-002.html
    • FAIL [expected PASS] subtest: .pct 1 assert_equals:
      <div class="pct" data-expected-height="50"></div>
      height expected 50 but got 69
  • FAIL [expected PASS] /css/css-text-decor/text-decoration-subelements-001.html

@bors-servo
Copy link
Contributor

💥 Test timed out

@bors-servo
Copy link
Contributor

☔ The latest upstream changes (presumably 4f4c2a5) made this pull request unmergeable. Please resolve the merge conflicts.

This adds initial support for whitespace handling from the CSS
specification for Layout 2020. In general, the basics are covered. Since
test output is very sensitive to whitespace handling, this change
incorporates several fixes:

1. Whitespace is collapsed according to the Phase 1 rules of the
   specification, though language-specific unbreaking rules are not
   handled properly yet.
2. Whitespace is mostly trimmed and positioned according to the Phase 2
   rules, but full support for removing whitespace at the end of lines
   is pending on a temporary data structure to hold lines under
   construction.
3. Completely empty box fragments left over immediately after line
   breaks are now trimmed from the fragment tree.
4. This change tries to detect when an inline formatting context
   collapses through.

Fixes #29994.

Co-authored-by: Mukilan Thiyagarajan <me@mukilan.in>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
@mrobinson mrobinson force-pushed the fix_white_space_not_being_preserved branch from 903639c to 817d2e4 Compare July 19, 2023 09:39
@mrobinson
Copy link
Member

@bors-servo try=wpt-2020

@bors-servo
Copy link
Contributor

⌛ Trying commit 817d2e4 with merge 7821fcc...

bors-servo added a commit that referenced this pull request Jul 19, 2023
…try>

Add initial support for css-text-3 whitespace handling

This adds initial support for whitespace handling from the CSS
specification for Layout 2020. In general, the basics are covered. Since
test output is very sensitive to whitespace handling, this change
incorporates several fixes:

1. Whitespace is collapsed according to the Phase 1 rules of the
   specification, though language-specific unbreaking rules are not
   handled properly yet.
2. Whitespace is mostly trimmed and positioned according to the Phase 2
   rules, but full support for removing whitespace at the end of lines
   is pending on a temporary data structure to hold lines under
   construction.
3. Completely empty box fragments left over immediately after line
   breaks are now trimmed from the fragment tree.
4. This change tries to detect when an inline formatting context
   collapses through.

Fixes #29994.
Fixes #29590.

<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #29590, #29994.
- [x] There are tests for these changes
@github-actions
Copy link

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

Flaky unexpected result (4)
  • TIMEOUT [expected PASS] /_mozilla/css/float_intrinsic_width_a.html
  • OK /_mozilla/mozilla/task_queue_throttling.any.html (#22519)
    • FAIL [expected PASS] subtest: Throttling the performance timeline task queue. assert_true: expected true got false
  • TIMEOUT [expected FAIL] /css/CSS2/normal-flow/inline-table-zorder-005.xht
  • TIMEOUT [expected FAIL] /css/css-backgrounds/border-image-repeat-space-2.html
Stable unexpected results that are known to be intermittent (1)
  • PASS [expected FAIL] /css/css-flexbox/flexbox_fbfc.html (#28693)

@mrobinson mrobinson force-pushed the fix_white_space_not_being_preserved branch from 817d2e4 to 947f3ad Compare July 19, 2023 10:14
@mrobinson
Copy link
Member

@bors-servo try=wpt-2020

@bors-servo
Copy link
Contributor

⌛ Trying commit 947f3ad with merge 4bf3233...

bors-servo added a commit that referenced this pull request Jul 19, 2023
…try>

Add initial support for css-text-3 whitespace handling

This adds initial support for whitespace handling from the CSS
specification for Layout 2020. In general, the basics are covered. Since
test output is very sensitive to whitespace handling, this change
incorporates several fixes:

1. Whitespace is collapsed according to the Phase 1 rules of the
   specification, though language-specific unbreaking rules are not
   handled properly yet.
2. Whitespace is mostly trimmed and positioned according to the Phase 2
   rules, but full support for removing whitespace at the end of lines
   is pending on a temporary data structure to hold lines under
   construction.
3. Completely empty box fragments left over immediately after line
   breaks are now trimmed from the fragment tree.
4. This change tries to detect when an inline formatting context
   collapses through.

Fixes #29994.
Fixes #29590.

<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #29590, #29994.
- [x] There are tests for these changes
@mrobinson mrobinson marked this pull request as ready for review July 19, 2023 11:43
@github-actions
Copy link

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

Flaky unexpected result (1)
  • OK /css/cssom-view/scroll-behavior-smooth-navigation.html (#29564)
    • FAIL [expected PASS] subtest: Smooth scrolling while doing history navigation. assert_not_equals: Shouldn't be scrolled to top anymore. got disallowed value 0

@bors-servo
Copy link
Contributor

💥 Test timed out

@mukilan mukilan added this pull request to the merge queue Jul 20, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 20, 2023
@mrobinson mrobinson added this pull request to the merge queue Jul 20, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 20, 2023
@mrobinson mrobinson added this pull request to the merge queue Jul 20, 2023
Merged via the queue into master with commit 2b67392 Jul 20, 2023
10 of 11 checks passed
@mrobinson mrobinson deleted the fix_white_space_not_being_preserved branch July 20, 2023 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants