Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(740)

Unified Diff: Source/core/dom/Fullscreen.cpp

Issue 482543002: Ignore fullscreen requests for the current fullscreen element (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fullscreen/full-screen-twice-newapi-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Fullscreen.cpp
diff --git a/Source/core/dom/Fullscreen.cpp b/Source/core/dom/Fullscreen.cpp
index e2e2d61085182817d15215f6af7ce1fb03380930..327f05a12c15849a3b42d4230f4fc8e751a1edb9 100644
--- a/Source/core/dom/Fullscreen.cpp
+++ b/Source/core/dom/Fullscreen.cpp
@@ -207,6 +207,10 @@ void Fullscreen::requestFullscreen(Element& element, RequestType requestType)
if (!document()->isActive())
return;
+ // If |element| is on top of |doc|'s fullscreen element stack, terminate these substeps.
+ if (&element == fullscreenElement())
+ return;
+
do {
// 1. If any of the following conditions are true, terminate these steps and queue a task to fire
// an event named fullscreenerror with its bubbles attribute set to true on the context object's
« no previous file with comments | « LayoutTests/fullscreen/full-screen-twice-newapi-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698