layout: Implement quote depth calculation for CSS quotes
#52501
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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)
::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.)close-quote
if the depth is 0no-open-quote
andno-close-quote
according to the specHowever, 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