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

Side by Side 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. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 5287 matching lines...) Expand 10 before | Expand all | Expand 10 after
5298 if (!element->isInTopLayer()) 5298 if (!element->isInTopLayer())
5299 return; 5299 return;
5300 size_t position = m_topLayerElements.find(element); 5300 size_t position = m_topLayerElements.find(element);
5301 DCHECK_NE(position, kNotFound); 5301 DCHECK_NE(position, kNotFound);
5302 m_topLayerElements.remove(position); 5302 m_topLayerElements.remove(position);
5303 element->setIsInTopLayer(false); 5303 element->setIsInTopLayer(false);
5304 } 5304 }
5305 5305
5306 HTMLDialogElement* Document::activeModalDialog() const 5306 HTMLDialogElement* Document::activeModalDialog() const
5307 { 5307 {
5308 if (m_topLayerElements.isEmpty()) 5308 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
5309 return 0; 5309 if (isHTMLDialogElement(*it))
5310 return toHTMLDialogElement(m_topLayerElements.last().get()); 5310 return toHTMLDialogElement((*it).get());
5311 }
5312
5313 return nullptr;
5311 } 5314 }
5312 5315
5313 void Document::exitPointerLock() 5316 void Document::exitPointerLock()
5314 { 5317 {
5315 if (!page()) 5318 if (!page())
5316 return; 5319 return;
5317 if (Element* target = page()->pointerLockController().element()) { 5320 if (Element* target = page()->pointerLockController().element()) {
5318 if (target->document() != this) 5321 if (target->document() != this)
5319 return; 5322 return;
5320 page()->pointerLockController().requestPointerUnlock(); 5323 page()->pointerLockController().requestPointerUnlock();
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
6034 } 6037 }
6035 6038
6036 void showLiveDocumentInstances() 6039 void showLiveDocumentInstances()
6037 { 6040 {
6038 WeakDocumentSet& set = liveDocumentSet(); 6041 WeakDocumentSet& set = liveDocumentSet();
6039 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6042 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6040 for (Document* document : set) 6043 for (Document* document : set)
6041 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6044 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6042 } 6045 }
6043 #endif 6046 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698