Chromium Code Reviews

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2107233002: Reland "Implement FullScreen using top layer." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix ::backdrop for replaced content Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 063abb03f90b2b3e0d45974732d43eafb74beb80..bf647c99461b486b2c2bfc68179c08868e988820 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -5305,9 +5305,12 @@ void Document::removeFromTopLayer(Element* element)
HTMLDialogElement* Document::activeModalDialog() const
{
- if (m_topLayerElements.isEmpty())
- return 0;
- return toHTMLDialogElement(m_topLayerElements.last().get());
+ for (auto it = m_topLayerElements.rbegin(); it != m_topLayerElements.rend(); ++it) {
eae 2016/07/12 17:09:49 Why are we iterating backwards here?
foolip 2016/07/12 20:19:48 This is merely because the end of the m_topLayerEl
+ if (isHTMLDialogElement(*it))
+ return toHTMLDialogElement((*it).get());
+ }
+
+ return nullptr;
}
void Document::exitPointerLock()

Powered by Google App Engine