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