| 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 4844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4855 if (!element->isInTopLayer()) | 4855 if (!element->isInTopLayer()) |
| 4856 return; | 4856 return; |
| 4857 size_t position = m_topLayerElements.find(element); | 4857 size_t position = m_topLayerElements.find(element); |
| 4858 ASSERT(position != kNotFound); | 4858 ASSERT(position != kNotFound); |
| 4859 m_topLayerElements.remove(position); | 4859 m_topLayerElements.remove(position); |
| 4860 element->setIsInTopLayer(false); | 4860 element->setIsInTopLayer(false); |
| 4861 } | 4861 } |
| 4862 | 4862 |
| 4863 HTMLDialogElement* Document::activeModalDialog() const | 4863 HTMLDialogElement* Document::activeModalDialog() const |
| 4864 { | 4864 { |
| 4865 if (m_topLayerElements.isEmpty()) | 4865 Vector<RefPtr<Element> >::const_reverse_iterator end = m_topLayerElements.re
nd(); |
| 4866 return 0; | 4866 for (Vector<RefPtr<Element> >::const_reverse_iterator it = m_topLayerElement
s.rbegin(); it != end; ++it) { |
| 4867 return toHTMLDialogElement(m_topLayerElements.last().get()); | 4867 if (!it->get()->hasTagName(dialogTag)) |
| 4868 continue; |
| 4869 HTMLDialogElement* dialog = toHTMLDialogElement(it->get()); |
| 4870 if (dialog->isModal()) |
| 4871 return dialog; |
| 4872 } |
| 4873 return 0; |
| 4868 } | 4874 } |
| 4869 | 4875 |
| 4870 void Document::webkitExitPointerLock() | 4876 void Document::webkitExitPointerLock() |
| 4871 { | 4877 { |
| 4872 if (!page()) | 4878 if (!page()) |
| 4873 return; | 4879 return; |
| 4874 if (Element* target = page()->pointerLockController().element()) { | 4880 if (Element* target = page()->pointerLockController().element()) { |
| 4875 if (target->document() != this) | 4881 if (target->document() != this) |
| 4876 return; | 4882 return; |
| 4877 } | 4883 } |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5402 if (!page->focusController().isActive() || !page->focusController().isFocuse
d()) | 5408 if (!page->focusController().isActive() || !page->focusController().isFocuse
d()) |
| 5403 return false; | 5409 return false; |
| 5404 if (Frame* focusedFrame = page->focusController().focusedFrame()) { | 5410 if (Frame* focusedFrame = page->focusController().focusedFrame()) { |
| 5405 if (focusedFrame->tree().isDescendantOf(frame())) | 5411 if (focusedFrame->tree().isDescendantOf(frame())) |
| 5406 return true; | 5412 return true; |
| 5407 } | 5413 } |
| 5408 return false; | 5414 return false; |
| 5409 } | 5415 } |
| 5410 | 5416 |
| 5411 } // namespace WebCore | 5417 } // namespace WebCore |
| OLD | NEW |