Bug 1768442 [wpt PR 33992] - [@container] Walk ancestry if ::first-line style is null, a=testonly

Automatic update from web-platform-tests
[@container] Walk ancestry if ::first-line style is null

HasPseudoElementStyle may return true even if the element does not
currently apply any ::first-line rules because we
SetHasPseudoElementStyle when only container queries fail.

If we get a null ComputedStyle for an element which returns true for
HasPseudoElementStyle(kPseudoIdFirstLine), continue to walk ancestors to
look for the ::first-line style.

Bug: 1273913
Change-Id: I87b7f9c04f818f2d9c82c6eb417b81465f15d913
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3629362
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1001435}

--

wpt-commits: 9456ecd8ee24fde91ae592673deeaed7cc5255b5
wpt-pr: 33992
This commit is contained in:
Rune Lillesveen 2022-05-16 10:07:58 +00:00 коммит произвёл moz-wptsync-bot
Родитель c443c2c5cd
Коммит b1ad06b598
2 изменённых файлов: 16 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,3 @@
<!doctype html>
<title>CSS Test Reference</title>
<div style="color:green">This text should be green.</div>

Просмотреть файл

@ -0,0 +1,13 @@
<!doctype html>
<title>CSS Container Queries Test: Non-matching ::first-line in @container</title>
<link rel="help" href="https://drafts.csswg.org/css-contain-3/#container-queries">
<link rel="match" href="inner-first-line-non-matching-ref.html">
<style>
#outer::first-line { color: green }
@container (width > 99999px) {
#inner::first-line { color: red }
}
</style>
<div id="outer">
<div id="inner">This text should be green.</div>
</div>