OLD | NEW |
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 4781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4792 if (!element->isInTopLayer()) | 4792 if (!element->isInTopLayer()) |
4793 return; | 4793 return; |
4794 size_t position = m_topLayerElements.find(element); | 4794 size_t position = m_topLayerElements.find(element); |
4795 ASSERT(position != kNotFound); | 4795 ASSERT(position != kNotFound); |
4796 m_topLayerElements.remove(position); | 4796 m_topLayerElements.remove(position); |
4797 element->setIsInTopLayer(false); | 4797 element->setIsInTopLayer(false); |
4798 } | 4798 } |
4799 | 4799 |
4800 HTMLDialogElement* Document::activeModalDialog() const | 4800 HTMLDialogElement* Document::activeModalDialog() const |
4801 { | 4801 { |
4802 if (m_topLayerElements.isEmpty()) | 4802 Vector<RefPtr<Element> >::const_reverse_iterator end = m_topLayerElements.re
nd(); |
4803 return 0; | 4803 for (Vector<RefPtr<Element> >::const_reverse_iterator it = m_topLayerElement
s.rbegin(); it != end; ++it) { |
4804 return toHTMLDialogElement(m_topLayerElements.last().get()); | 4804 if (!it->get()->hasTagName(dialogTag)) |
| 4805 continue; |
| 4806 HTMLDialogElement* dialog = toHTMLDialogElement(it->get()); |
| 4807 if (dialog->isModal()) |
| 4808 return dialog; |
| 4809 } |
| 4810 return 0; |
4805 } | 4811 } |
4806 | 4812 |
4807 void Document::webkitExitPointerLock() | 4813 void Document::webkitExitPointerLock() |
4808 { | 4814 { |
4809 if (!page()) | 4815 if (!page()) |
4810 return; | 4816 return; |
4811 if (Element* target = page()->pointerLockController().element()) { | 4817 if (Element* target = page()->pointerLockController().element()) { |
4812 if (target->document() != this) | 4818 if (target->document() != this) |
4813 return; | 4819 return; |
4814 } | 4820 } |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5319 if (!page->focusController().isActive() || !page->focusController().isFocuse
d()) | 5325 if (!page->focusController().isActive() || !page->focusController().isFocuse
d()) |
5320 return false; | 5326 return false; |
5321 if (Frame* focusedFrame = page->focusController().focusedFrame()) { | 5327 if (Frame* focusedFrame = page->focusController().focusedFrame()) { |
5322 if (focusedFrame->tree().isDescendantOf(frame())) | 5328 if (focusedFrame->tree().isDescendantOf(frame())) |
5323 return true; | 5329 return true; |
5324 } | 5330 } |
5325 return false; | 5331 return false; |
5326 } | 5332 } |
5327 | 5333 |
5328 } // namespace WebCore | 5334 } // namespace WebCore |
OLD | NEW |