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 5029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5040 if (!element->isInTopLayer()) | 5040 if (!element->isInTopLayer()) |
5041 return; | 5041 return; |
5042 size_t position = m_topLayerElements.find(element); | 5042 size_t position = m_topLayerElements.find(element); |
5043 ASSERT(position != kNotFound); | 5043 ASSERT(position != kNotFound); |
5044 m_topLayerElements.remove(position); | 5044 m_topLayerElements.remove(position); |
5045 element->setIsInTopLayer(false); | 5045 element->setIsInTopLayer(false); |
5046 } | 5046 } |
5047 | 5047 |
5048 HTMLDialogElement* Document::activeModalDialog() const | 5048 HTMLDialogElement* Document::activeModalDialog() const |
5049 { | 5049 { |
5050 if (m_topLayerElements.isEmpty()) | 5050 for (auto it = m_topLayerElements.rbegin(); it != m_topLayerElements.rend();
++it) { |
5051 return 0; | 5051 if (isHTMLDialogElement(*it)) |
5052 return toHTMLDialogElement(m_topLayerElements.last().get()); | 5052 return toHTMLDialogElement((*it).get()); |
| 5053 } |
| 5054 |
| 5055 return nullptr; |
5053 } | 5056 } |
5054 | 5057 |
5055 void Document::exitPointerLock() | 5058 void Document::exitPointerLock() |
5056 { | 5059 { |
5057 if (!page()) | 5060 if (!page()) |
5058 return; | 5061 return; |
5059 if (Element* target = page()->pointerLockController().element()) { | 5062 if (Element* target = page()->pointerLockController().element()) { |
5060 if (target->document() != this) | 5063 if (target->document() != this) |
5061 return; | 5064 return; |
5062 } | 5065 } |
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5754 #ifndef NDEBUG | 5757 #ifndef NDEBUG |
5755 using namespace blink; | 5758 using namespace blink; |
5756 void showLiveDocumentInstances() | 5759 void showLiveDocumentInstances() |
5757 { | 5760 { |
5758 Document::WeakDocumentSet& set = Document::liveDocumentSet(); | 5761 Document::WeakDocumentSet& set = Document::liveDocumentSet(); |
5759 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5762 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5760 for (Document* document : set) | 5763 for (Document* document : set) |
5761 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5764 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
5762 } | 5765 } |
5763 #endif | 5766 #endif |
OLD | NEW |