Skip to content

Commit

Permalink
Bug 1813109 [wpt PR 38222] - VT: Require a documentElement for the tr…
Browse files Browse the repository at this point in the history
…ansition to happen, a=testonly

Automatic update from web-platform-tests
VT: Require a documentElement for the transition to happen

This patch ensures that we don't start a transition if we don't
have a document element. This is because documentElement is the
originating element for the pseudo tree, so we need to have it
for the transition to happen.

Note that if we want to support documents that don't have a
documentElement, then we need to figure out where to put the
pseudo elements.

[email protected]

Fixed: 1410435
Change-Id: Ib380e87dba2986ace6a567f37ff2cfa5b30268ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4198955
Reviewed-by: Khushal Sagar <[email protected]>
Commit-Queue: Khushal Sagar <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1097990}

--

wpt-commits: 30e0b260a99eb53f0de4a838b50c60406a42efc0
wpt-pr: 38222
  • Loading branch information
vmpstr authored and moz-wptsync-bot committed Feb 2, 2023
1 parent 910f20a commit 2691844
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<title>View transitions: try to start a transition without a document element</title>
<link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/">
<link rel="author" href="mailto:[email protected]">

<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

<iframe id=frame srcdoc='<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10"></svg>'>
</iframe>

<script>
async_test((t) => {
requestAnimationFrame(() => requestAnimationFrame(() => {
t.step(() => assert_equals(frame.contentDocument.documentElement, null, "document element"));
t.step(() => assert_equals(frame.contentDocument.startViewTransition(), null, "transition object"));
t.done();
}));
}, "transition without document element is null")
</script>

0 comments on commit 2691844

Please sign in to comment.