| 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 4828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4839 if (!element->isInTopLayer()) | 4839 if (!element->isInTopLayer()) |
| 4840 return; | 4840 return; |
| 4841 size_t position = m_topLayerElements.find(element); | 4841 size_t position = m_topLayerElements.find(element); |
| 4842 ASSERT(position != kNotFound); | 4842 ASSERT(position != kNotFound); |
| 4843 m_topLayerElements.remove(position); | 4843 m_topLayerElements.remove(position); |
| 4844 element->setIsInTopLayer(false); | 4844 element->setIsInTopLayer(false); |
| 4845 } | 4845 } |
| 4846 | 4846 |
| 4847 HTMLDialogElement* Document::activeModalDialog() const | 4847 HTMLDialogElement* Document::activeModalDialog() const |
| 4848 { | 4848 { |
| 4849 Vector<RefPtr<Element> >::const_reverse_iterator end = m_topLayerElements.re
nd(); | 4849 if (m_topLayerElements.isEmpty()) |
| 4850 for (Vector<RefPtr<Element> >::const_reverse_iterator it = m_topLayerElement
s.rbegin(); it != end; ++it) { | 4850 return 0; |
| 4851 if (!it->get()->hasTagName(dialogTag)) | 4851 return toHTMLDialogElement(m_topLayerElements.last().get()); |
| 4852 continue; | |
| 4853 HTMLDialogElement* dialog = toHTMLDialogElement(it->get()); | |
| 4854 if (dialog->isModal()) | |
| 4855 return dialog; | |
| 4856 } | |
| 4857 return 0; | |
| 4858 } | 4852 } |
| 4859 | 4853 |
| 4860 void Document::webkitExitPointerLock() | 4854 void Document::webkitExitPointerLock() |
| 4861 { | 4855 { |
| 4862 if (!page()) | 4856 if (!page()) |
| 4863 return; | 4857 return; |
| 4864 if (Element* target = page()->pointerLockController().element()) { | 4858 if (Element* target = page()->pointerLockController().element()) { |
| 4865 if (target->document() != this) | 4859 if (target->document() != this) |
| 4866 return; | 4860 return; |
| 4867 } | 4861 } |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5372 if (!page->focusController().isActive() || !page->focusController().isFocuse
d()) | 5366 if (!page->focusController().isActive() || !page->focusController().isFocuse
d()) |
| 5373 return false; | 5367 return false; |
| 5374 if (Frame* focusedFrame = page->focusController().focusedFrame()) { | 5368 if (Frame* focusedFrame = page->focusController().focusedFrame()) { |
| 5375 if (focusedFrame->tree().isDescendantOf(frame())) | 5369 if (focusedFrame->tree().isDescendantOf(frame())) |
| 5376 return true; | 5370 return true; |
| 5377 } | 5371 } |
| 5378 return false; | 5372 return false; |
| 5379 } | 5373 } |
| 5380 | 5374 |
| 5381 } // namespace WebCore | 5375 } // namespace WebCore |
| OLD | NEW |