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

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

Issue 477133002: Sync fullscreen element removal with the spec (again) (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 | « 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/Fullscreen.cpp
diff --git a/Source/core/dom/Fullscreen.cpp b/Source/core/dom/Fullscreen.cpp
index e2e2d61085182817d15215f6af7ce1fb03380930..acc09b3d66390c2cd28434159c8225711111f20b 100644
--- a/Source/core/dom/Fullscreen.cpp
+++ b/Source/core/dom/Fullscreen.cpp
@@ -556,27 +556,27 @@ void Fullscreen::eventQueueTimerFired(Timer<Fullscreen>*)
}
}
-void Fullscreen::elementRemoved(Element& element)
+void Fullscreen::elementRemoved(Element& oldNode)
{
- // If an element |element| in a fullscreen element stack is removed from a document |document|,
- // run these steps:
+ // Whenever the removing steps run with an |oldNode| and |oldNode| is in its node document's
+ // fullscreen element stack, run these steps:
- // 1. If |element| was at the top of |document|'s fullscreen element stack, act as if the
- // exitFullscreen() method was invoked on that document.
- if (fullscreenElement() == &element) {
+ // 1. If |oldNode| is at the top of its node document's fullscreen element stack, act as if the
+ // exitFullscreen() method was invoked on that document.
+ if (fullscreenElement() == &oldNode) {
exitFullscreen();
return;
}
- // 2. Otherwise, remove |element| from |document|'s fullscreen element stack.
+ // 2. Otherwise, remove |oldNode| from its node document's fullscreen element stack.
for (size_t i = 0; i < m_fullScreenElementStack.size(); ++i) {
- if (m_fullScreenElementStack[i].first.get() == &element) {
+ if (m_fullScreenElementStack[i].first.get() == &oldNode) {
m_fullScreenElementStack.remove(i);
return;
}
}
- // NOTE: |element| was not in the fullscreen element stack.
+ // NOTE: |oldNode| was not in the fullscreen element stack.
}
void Fullscreen::clearFullscreenElementStack()
« 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