Title: [134160] trunk/Source/WebCore
- Revision
- 134160
- Author
- [email protected]
- Date
- 2012-11-10 11:48:24 -0800 (Sat, 10 Nov 2012)
Log Message
Document::m_fullScreenElementStack should be a Vector
https://bugs.webkit.org/show_bug.cgi?id=101844
Reviewed by Andreas Kling.
m_fullScreenElementStack is currently a Deque where elements are being prepended
and removed from the beginning in LIFO order, so it can be replaced with a Vector.
* dom/Document.cpp:
(WebCore::Document::requestFullScreenForElement):
(WebCore::Document::webkitCancelFullScreen):
(WebCore::Document::popFullscreenElementStack):
(WebCore::Document::pushFullscreenElementStack):
* dom/Document.h:
(WebCore::Document::webkitFullscreenElement):
(Document):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (134159 => 134160)
--- trunk/Source/WebCore/ChangeLog 2012-11-10 18:25:10 UTC (rev 134159)
+++ trunk/Source/WebCore/ChangeLog 2012-11-10 19:48:24 UTC (rev 134160)
@@ -1,3 +1,22 @@
+2012-11-10 Anders Carlsson <[email protected]>
+
+ Document::m_fullScreenElementStack should be a Vector
+ https://bugs.webkit.org/show_bug.cgi?id=101844
+
+ Reviewed by Andreas Kling.
+
+ m_fullScreenElementStack is currently a Deque where elements are being prepended
+ and removed from the beginning in LIFO order, so it can be replaced with a Vector.
+
+ * dom/Document.cpp:
+ (WebCore::Document::requestFullScreenForElement):
+ (WebCore::Document::webkitCancelFullScreen):
+ (WebCore::Document::popFullscreenElementStack):
+ (WebCore::Document::pushFullscreenElementStack):
+ * dom/Document.h:
+ (WebCore::Document::webkitFullscreenElement):
+ (Document):
+
2012-11-10 Adam Barth <[email protected]>
[V8] Clean up header includes and ifdefs in V8GCController
Modified: trunk/Source/WebCore/dom/Document.cpp (134159 => 134160)
--- trunk/Source/WebCore/dom/Document.cpp 2012-11-10 18:25:10 UTC (rev 134159)
+++ trunk/Source/WebCore/dom/Document.cpp 2012-11-10 19:48:24 UTC (rev 134160)
@@ -5082,7 +5082,7 @@
// The context object's node document fullscreen element stack is not empty and its top element
// is not an ancestor of the context object. (NOTE: Ignore this requirement if the request was
// made via the legacy Mozilla-style API.)
- if (!m_fullScreenElementStack.isEmpty() && !m_fullScreenElementStack.first()->contains(element) && !inLegacyMozillaMode)
+ if (!m_fullScreenElementStack.isEmpty() && !m_fullScreenElementStack.last()->contains(element) && !inLegacyMozillaMode)
break;
// A descendant browsing context's document has a non-empty fullscreen element stack.
@@ -5188,8 +5188,8 @@
// To achieve that aim, remove all the elements from the top document's stack except for the first before
// calling webkitExitFullscreen():
- Deque<RefPtr<Element> > replacementFullscreenElementStack;
- replacementFullscreenElementStack.prepend(topDocument()->webkitFullscreenElement());
+ Vector<RefPtr<Element> > replacementFullscreenElementStack;
+ replacementFullscreenElementStack.append(topDocument()->webkitFullscreenElement());
topDocument()->m_fullScreenElementStack.swap(replacementFullscreenElementStack);
topDocument()->webkitExitFullscreen();
@@ -5519,12 +5519,12 @@
if (m_fullScreenElementStack.isEmpty())
return;
- m_fullScreenElementStack.removeFirst();
+ m_fullScreenElementStack.removeLast();
}
void Document::pushFullscreenElementStack(Element* element)
{
- m_fullScreenElementStack.prepend(element);
+ m_fullScreenElementStack.append(element);
}
void Document::addDocumentToFullScreenChangeEventQueue(Document* doc)
Modified: trunk/Source/WebCore/dom/Document.h (134159 => 134160)
--- trunk/Source/WebCore/dom/Document.h 2012-11-10 18:25:10 UTC (rev 134159)
+++ trunk/Source/WebCore/dom/Document.h 2012-11-10 19:48:24 UTC (rev 134160)
@@ -1083,7 +1083,7 @@
// W3C API
bool webkitFullscreenEnabled() const;
- Element* webkitFullscreenElement() const { return !m_fullScreenElementStack.isEmpty() ? m_fullScreenElementStack.first().get() : 0; }
+ Element* webkitFullscreenElement() const { return !m_fullScreenElementStack.isEmpty() ? m_fullScreenElementStack.last().get() : 0; }
void webkitExitFullscreen();
#endif
@@ -1458,7 +1458,7 @@
#if ENABLE(FULLSCREEN_API)
bool m_areKeysEnabledInFullScreen;
RefPtr<Element> m_fullScreenElement;
- Deque<RefPtr<Element> > m_fullScreenElementStack;
+ Vector<RefPtr<Element> > m_fullScreenElementStack;
RenderFullScreen* m_fullScreenRenderer;
Timer<Document> m_fullScreenChangeDelayTimer;
Deque<RefPtr<Node> > m_fullScreenChangeEventTargetQueue;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes