forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[view-transitions] Skip view transition on hidden pages
https://bugs.webkit.org/show_bug.cgi?id=271248 rdar://125017653 Reviewed by NOBODY (OOPS!). Follow: - https://drafts.csswg.org/css-view-transitions-1/#page-visibility-change-steps - w3c/csswg-drafts#9543 Add transition-in-hidden-page.html WPT from upstream. * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/transition-in-hidden-page-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/transition-in-hidden-page.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/window-resize-aborts-transition-before-ready-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/window-resize-aborts-transition-expected.txt: * Source/WebCore/dom/Document.cpp: (WebCore::Document::visibilityStateChanged): Make this more robust to allow unregistering clients while iterating. (WebCore::Document::startViewTransition): * Source/WebCore/dom/ViewTransition.cpp: (WebCore::ViewTransition::ViewTransition): (WebCore::ViewTransition::skipViewTransition): (WebCore::ViewTransition::stop): (WebCore::ViewTransition::visibilityStateChanged): * Source/WebCore/dom/ViewTransition.h:
- Loading branch information
Showing
6 changed files
with
42 additions
and
11 deletions.
There are no files selected for viewing
9 changes: 6 additions & 3 deletions
9
...ed/w3c/web-platform-tests/css/css-view-transitions/transition-in-hidden-page-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
CONSOLE MESSAGE: Unhandled Promise Rejection: InvalidStateError: View transition was skipped because document visibility state is hidden. | ||
|
||
FAIL A view transition should be immediately skipped if started when document is hidden assert_unreached: Should have rejected: undefined Reached unreachable code | ||
FAIL A view transition should be skipped when a document becomes hidden while processing update callback assert_equals: expected "rejected" but got "fulfilled" | ||
FAIL A view transition should be skipped when a document becomes hidden while animating assert_equals: expected "finished" but got "timeout" | ||
Harness Error (FAIL), message = Unhandled rejection: View transition was skipped because document visibility state is hidden. | ||
|
||
PASS A view transition should be immediately skipped if started when document is hidden | ||
PASS A view transition should be skipped when a document becomes hidden while processing update callback | ||
PASS A view transition should be skipped when a document becomes hidden while animating | ||
|
4 changes: 2 additions & 2 deletions
4
...-tests/css/css-view-transitions/window-resize-aborts-transition-before-ready-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
PASS | ||
FAIL | ||
View transitions: Resizing viewport before animating rejects the ready promise. | ||
|
||
assert_true: Transition must be skipped. expected true got false | ||
|
9 changes: 8 additions & 1 deletion
9
.../web-platform-tests/css/css-view-transitions/window-resize-aborts-transition-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
CONSOLE MESSAGE: Unhandled Promise Rejection: InvalidStateError: View transition was skipped because document visibility state is hidden. | ||
|
||
PASS View transitions: Resizing viewport skips the transition | ||
Harness Error (FAIL), message = Unhandled rejection: View transition was skipped because document visibility state is hidden. | ||
|
||
TIMEOUT View transitions: Resizing viewport skips the transition Test timed out | ||
|
||
Harness Error (FAIL), message = Unhandled rejection: View transition was skipped because document visibility state is hidden. | ||
|
||
TIMEOUT View transitions: Resizing viewport skips the transition Test timed out | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters