Skip to content

layout: Implement quote depth calculation for CSS quotes #52501

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

servo-wpt-sync
Copy link
Collaborator

@servo-wpt-sync servo-wpt-sync commented May 13, 2025

This PR is a supplement to the initial CSS quotes implementation (servo/servo#34770) and implements CSS quotes depth calculation. It also addresses the other issue related to depth calculation. (servo/servo#36686)

  • implements CSS quotes depth calculation in layout context level
    • supports nested quotes
    • supports ::before ::after content-based quotes (content: open-quote "Test1" close-quote; in ::before was only supported in initial, but now supports ::after content: open-quote; & ::before content: close-quote; way.)
    • ignore close-quote if the depth is 0
  • implements no-open-quote and no-close-quote according to the spec

However, this PR has the problem that the calculation sometimes fails and sometimes succeeds. The fail/success timing depends on the layout, and I suspect that the problem is not the calculation logic itself.
I gess the underlying problem would be the parallelization of reflow step.
It'd be great if I could get your opinion on whether the potential problem should be solved in this PR or could be a pending for the future.

Testing: A new reftest is added. (css/css-content/content-quotes-depth.html) However, the test is currently marked as FAIL since it's flaky because of the reason previously mentioned.
Fixes: servo/servo#36686

Reviewed in servo/servo#36998

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

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

The review process for this patch is being conducted in the Servo project.

@servo-wpt-sync servo-wpt-sync force-pushed the servo_export_36998 branch 3 times, most recently from 967238b to 21247bd Compare May 15, 2025 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

content: close-quote should do nothing if there is no open quotation
3 participants