Commit d35708c0 authored by Steinar H. Gunderson's avatar Steinar H. Gunderson Committed by moz-wptsync-bot
Browse files

Bug 1769972 [wpt PR 34108] - Turn off independent inheritance if children have...

Bug 1769972 [wpt PR 34108] - Turn off independent inheritance if children have explicitly inherited properties., a=testonly

Automatic update from web-platform-tests
Turn off independent inheritance if children have explicitly inherited properties.

If any of our children have explicit inheritance of a non-inherited
property, we cannot mark it as using independently inherited properties
only, as some of the explicit properties might inherit (our diffing
considers inherited properties only). We used to gate this behind
a test of diffs in the non-inherited properties, but that would only
consider that difference on this element, not its children (and the
problem could propagate fro there to its grandchildren).

This seems to have been broken in a refactor in
d7e0cc711958dfb3aa39f0f912db1f154617bd98.

Fixed: 1325340
Change-Id: If6b790fea727ad68322cde7c4c2a342322283f68
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3650513


Commit-Queue: Steinar H Gunderson <sesse@chromium.org>
Reviewed-by: default avatarRune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1005798}

--

wpt-commits: e4226161361351158d2486a7ef588cc2a3b74474
wpt-pr: 34108
parent 0e7f0340
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
<!DOCTYPE html>
<html>
  <body style="color: black; background-color: white">
    <div><div>PASS if black on white</div></div>
  </body>
</html>
+41 −0
Original line number Diff line number Diff line
<!DOCTYPE html>
<html id="html" class="reftest-wait">
  <title>Verifies that 'background-color' from a transition inherits explicitly down if requested</title>
  <link rel="help" href="https://crbug.com/1325340">
  <link rel="match" href="inherit-background-color-transition-ref.html">
  <script src="support/helper.js"></script>
  <style>
    body { transition: background-color 1s; color: white; background-color: black; }
    .light { color: black; background-color: white; }
  </style>
</head>
<body id="body">
  <div style="background-color: inherit">
    <div style="background-color: inherit" class="hoverdemo">PASS if black on white</div>
  </div>
  <script>
    body.offsetTop;

    async function run() {
      let transitionEnd = new Promise((resolve) => {
        body.addEventListener('transitionend', resolve);
      });

      // Trigger transition:
      body.classList.toggle('light');

      const transition = body.getAnimations()[0];
      await transition.ready;
      await waitForFrame();

      // Expedite transition, but let it finish naturally.
      transition.currentTime = transition.effect.getTiming().duration - 1;
      await transitionEnd;

      await waitForFrame();
    }

    run().then(() => html.classList.toggle('reftest-wait'));
  </script>
</body>
</html>