Automatic update from web-platform-tests layout: Share styles to inline box children via `SharedInlineStyles` `TextRun`s use their parent style to render. Previously, these styles were cloned and stored directly in the box tree `TextRun` and resulting `TextFragment`s. This presents a problem for incremental layout. Wrapping the style in another layer of shared ownership and mutability will allow updating all `TextFragment`s during repaint-only incremental layout by simply updating the box tree styles of the original text parents. This adds a new set of borrows when accessing text styles, but also makes it so that during box tree block construction `InlineFormattingContext`s are created lazily and now `InlineFormattingContextBuilder::finish` consumes the builder, making the API make a bit more sense. This should also improve performance of box tree block construction slightly. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com> -- wpt-commits: 5ddceefd396980876449039fce19b262ca3fe0a7 wpt-pr: 52442 Differential Revision: https://phabricator.services.mozilla.com/D249363
19 lines
683 B
HTML
19 lines
683 B
HTML
<!DOCTYPE html>
|
|
<meta charset="utf-8">
|
|
<title>CSS Display: display:contents in inline layout should affect style of descendants</title>
|
|
<link rel="author" title="Martin Robinson" href="mailto:mrobinson@igalia.com">
|
|
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
|
|
<link rel="help" href="https://drafts.csswg.org/css-display-3/#valdef-display-contents">
|
|
<link rel="match" href="display-contents-pass-no-red-ref.html">
|
|
<style>
|
|
#contents {
|
|
display: contents;
|
|
color: black;
|
|
}
|
|
.red { color: red; }
|
|
</style>
|
|
<p>You should see the word PASS and no red below.</p>
|
|
<span>
|
|
P<span class="red"><div id="contents">AS</div></span>S
|
|
</span>
|