Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<title>Performance Paint Timing Test: FCP due to ancestor opacity</title>
#main {
width: 100px;
height: 100px;
left: 0px;
position: relative;
top: 0;
#child {
opacity: 0;
/* contentful and intermediate classes are defined in test_fcp script. */
#main.contentful #child {
opacity: 1;
#main.intermediate #child {
opacity: 1;
#main.intermediate {
opacity: 0;
#main.contentful {
opacity: 0.5;
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../resources/utils.js"></script>
<div id="main">
<div id="child">Text</div>
test_fcp("First contentful paint fires due to its ancestor getting positive opacity.");