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

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

Issue 139743005: Replace RenderFullScreen with top layer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: protect widget more selectively Created 6 years, 11 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 | Annotate | Revision Log
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 4777 matching lines...) Expand 10 before | Expand all | Expand 10 after
4788 if (!element->isInTopLayer()) 4788 if (!element->isInTopLayer())
4789 return; 4789 return;
4790 size_t position = m_topLayerElements.find(element); 4790 size_t position = m_topLayerElements.find(element);
4791 ASSERT(position != kNotFound); 4791 ASSERT(position != kNotFound);
4792 m_topLayerElements.remove(position); 4792 m_topLayerElements.remove(position);
4793 element->setIsInTopLayer(false); 4793 element->setIsInTopLayer(false);
4794 } 4794 }
4795 4795
4796 HTMLDialogElement* Document::activeModalDialog() const 4796 HTMLDialogElement* Document::activeModalDialog() const
4797 { 4797 {
4798 if (m_topLayerElements.isEmpty()) 4798 Vector<RefPtr<Element> >::const_reverse_iterator end = m_topLayerElements.re nd();
4799 return 0; 4799 for (Vector<RefPtr<Element> >::const_reverse_iterator it = m_topLayerElement s.rbegin(); it != end; ++it) {
4800 return toHTMLDialogElement(m_topLayerElements.last().get()); 4800 if (!it->get()->hasTagName(dialogTag))
4801 continue;
4802 HTMLDialogElement* dialog = toHTMLDialogElement(it->get());
4803 if (dialog->isModal())
4804 return dialog;
4805 }
4806 return 0;
4801 } 4807 }
4802 4808
4803 void Document::webkitExitPointerLock() 4809 void Document::webkitExitPointerLock()
4804 { 4810 {
4805 if (!page()) 4811 if (!page())
4806 return; 4812 return;
4807 if (Element* target = page()->pointerLockController().element()) { 4813 if (Element* target = page()->pointerLockController().element()) {
4808 if (target->document() != this) 4814 if (target->document() != this)
4809 return; 4815 return;
4810 } 4816 }
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
5333 if (!page->focusController().isActive() || !page->focusController().isFocuse d()) 5339 if (!page->focusController().isActive() || !page->focusController().isFocuse d())
5334 return false; 5340 return false;
5335 if (Frame* focusedFrame = page->focusController().focusedFrame()) { 5341 if (Frame* focusedFrame = page->focusController().focusedFrame()) {
5336 if (focusedFrame->tree().isDescendantOf(frame())) 5342 if (focusedFrame->tree().isDescendantOf(frame()))
5337 return true; 5343 return true;
5338 } 5344 }
5339 return false; 5345 return false;
5340 } 5346 }
5341 5347
5342 } // namespace WebCore 5348 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698