Commit 93263ae7 authored by philipj@opera.com's avatar philipj@opera.com
parent d19406cb
...@@ -556,27 +556,27 @@ void Fullscreen::eventQueueTimerFired(Timer<Fullscreen>*) ...@@ -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|, // Whenever the removing steps run with an |oldNode| and |oldNode| is in its node document's
// run these steps: // fullscreen element stack, run these steps:
// 1. If |element| was at the top of |document|'s fullscreen element stack, act as if the // 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. // exitFullscreen() method was invoked on that document.
if (fullscreenElement() == &element) { if (fullscreenElement() == &oldNode) {
exitFullscreen(); exitFullscreen();
return; 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) { 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); m_fullScreenElementStack.remove(i);
return; return;
} }
} }
// NOTE: |element| was not in the fullscreen element stack. // NOTE: |oldNode| was not in the fullscreen element stack.
} }
void Fullscreen::clearFullscreenElementStack() void Fullscreen::clearFullscreenElementStack()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment