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

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

Issue 354393002: Clarify FullscreenElementStack::addDocumentToFullScreenChangeEventQueue (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/FullscreenElementStack.cpp
diff --git a/Source/core/dom/FullscreenElementStack.cpp b/Source/core/dom/FullscreenElementStack.cpp
index 239fe6a6a818725700a660821d6efb5922a8b9b2..30f945dbd12d6969d4363d71113616e005d3de34 100644
--- a/Source/core/dom/FullscreenElementStack.cpp
+++ b/Source/core/dom/FullscreenElementStack.cpp
@@ -566,13 +566,12 @@ void FullscreenElementStack::pushFullscreenElementStack(Element& element)
void FullscreenElementStack::addDocumentToFullScreenChangeEventQueue(Document& doc)
{
- Node* target = 0;
- if (FullscreenElementStack* fullscreen = fromIfExists(doc)) {
- target = fullscreen->webkitFullscreenElement();
- if (!target)
- target = fullscreen->webkitCurrentFullScreenElement();
- }
+ ASSERT(doc.hasFullscreenElementStack());
+ FullscreenElementStack& fullscreen = from(doc);
+ Node* target = fullscreen.webkitFullscreenElement();
+ if (!target)
+ target = fullscreen.webkitCurrentFullScreenElement();
if (!target)
target = &doc;
m_fullScreenChangeEventTargetQueue.append(target);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698