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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2168373002: Revert of Reland "Implement FullScreen using top layer." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resolve WebFrameTest.cpp conflict and appease presubmit 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 5291 matching lines...) Expand 10 before | Expand all | Expand 10 after
5302 if (!element->isInTopLayer()) 5302 if (!element->isInTopLayer())
5303 return; 5303 return;
5304 size_t position = m_topLayerElements.find(element); 5304 size_t position = m_topLayerElements.find(element);
5305 DCHECK_NE(position, kNotFound); 5305 DCHECK_NE(position, kNotFound);
5306 m_topLayerElements.remove(position); 5306 m_topLayerElements.remove(position);
5307 element->setIsInTopLayer(false); 5307 element->setIsInTopLayer(false);
5308 } 5308 }
5309 5309
5310 HTMLDialogElement* Document::activeModalDialog() const 5310 HTMLDialogElement* Document::activeModalDialog() const
5311 { 5311 {
5312 for (auto it = m_topLayerElements.rbegin(); it != m_topLayerElements.rend(); ++it) { 5312 if (m_topLayerElements.isEmpty())
5313 if (isHTMLDialogElement(*it)) 5313 return 0;
5314 return toHTMLDialogElement((*it).get()); 5314 return toHTMLDialogElement(m_topLayerElements.last().get());
5315 }
5316
5317 return nullptr;
5318 } 5315 }
5319 5316
5320 void Document::exitPointerLock() 5317 void Document::exitPointerLock()
5321 { 5318 {
5322 if (!page()) 5319 if (!page())
5323 return; 5320 return;
5324 if (Element* target = page()->pointerLockController().element()) { 5321 if (Element* target = page()->pointerLockController().element()) {
5325 if (target->document() != this) 5322 if (target->document() != this)
5326 return; 5323 return;
5327 page()->pointerLockController().requestPointerUnlock(); 5324 page()->pointerLockController().requestPointerUnlock();
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
6039 } 6036 }
6040 6037
6041 void showLiveDocumentInstances() 6038 void showLiveDocumentInstances()
6042 { 6039 {
6043 WeakDocumentSet& set = liveDocumentSet(); 6040 WeakDocumentSet& set = liveDocumentSet();
6044 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6041 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6045 for (Document* document : set) 6042 for (Document* document : set)
6046 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6043 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6047 } 6044 }
6048 #endif 6045 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/Fullscreen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698