forked from mirrors/gecko-dev
Automatic update from web-platform-tests Reland "Replace cached ::first-line style from getComputedStyle" This is a reland of commit c5f66f4464a569b6735ce51a01d2cb6c57a8ec6c Original change's description: > Replace cached ::first-line style from getComputedStyle > > getComputedStyle may cache a ComputedStyle when requesting ::first-line > compared to which style should be used when the line is laid out. Make > sure we overwrite the cached one when the applied ::first-line style > originates from a parent block. > > Bug: 1323201 > Change-Id: Ief4ab7d07c751d7de339bbef3e6b839a48b6fddf > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3629301 > Commit-Queue: Rune Lillesveen <futhark@chromium.org> > Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org> > Cr-Commit-Position: refs/heads/main@{#1001462} Bug: 1323201 Change-Id: I11a22bee5508d3afef23526bdc95a9474d67081e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3641866 Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org> Commit-Queue: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/main@{#1003343} -- wpt-commits: 330d741500a917a6840a036087fcc2a6ad95cf98 wpt-pr: 34031
14 lines
504 B
HTML
14 lines
504 B
HTML
<!doctype html>
|
|
<title>CSS Pseudo Test: Query ::first-line computed style before outer block ::first-line matches</title>
|
|
<link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#first-line-pseudo">
|
|
<link rel="match" href="first-line-green-ref.html">
|
|
<style>
|
|
#outer::first-line { color: green }
|
|
</style>
|
|
<div id="outer">
|
|
<div id="inner"></div>
|
|
</div>
|
|
<script>
|
|
getComputedStyle(inner, "::first-line").color;
|
|
inner.appendChild(document.createTextNode("This text should be green."));
|
|
</script>
|