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 5040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5051 if (!element->isInTopLayer()) | 5051 if (!element->isInTopLayer()) |
5052 return; | 5052 return; |
5053 size_t position = m_topLayerElements.find(element); | 5053 size_t position = m_topLayerElements.find(element); |
5054 ASSERT(position != kNotFound); | 5054 ASSERT(position != kNotFound); |
5055 m_topLayerElements.remove(position); | 5055 m_topLayerElements.remove(position); |
5056 element->setIsInTopLayer(false); | 5056 element->setIsInTopLayer(false); |
5057 } | 5057 } |
5058 | 5058 |
5059 HTMLDialogElement* Document::activeModalDialog() const | 5059 HTMLDialogElement* Document::activeModalDialog() const |
5060 { | 5060 { |
5061 if (m_topLayerElements.isEmpty()) | 5061 for (auto it = m_topLayerElements.rbegin(); it != m_topLayerElements.rend();
++it) { |
5062 return 0; | 5062 if (isHTMLDialogElement(*it)) |
5063 return toHTMLDialogElement(m_topLayerElements.last().get()); | 5063 return toHTMLDialogElement((*it).get()); |
| 5064 } |
| 5065 |
| 5066 return nullptr; |
5064 } | 5067 } |
5065 | 5068 |
5066 void Document::exitPointerLock() | 5069 void Document::exitPointerLock() |
5067 { | 5070 { |
5068 if (!page()) | 5071 if (!page()) |
5069 return; | 5072 return; |
5070 if (Element* target = page()->pointerLockController().element()) { | 5073 if (Element* target = page()->pointerLockController().element()) { |
5071 if (target->document() != this) | 5074 if (target->document() != this) |
5072 return; | 5075 return; |
5073 } | 5076 } |
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5772 #ifndef NDEBUG | 5775 #ifndef NDEBUG |
5773 using namespace blink; | 5776 using namespace blink; |
5774 void showLiveDocumentInstances() | 5777 void showLiveDocumentInstances() |
5775 { | 5778 { |
5776 Document::WeakDocumentSet& set = Document::liveDocumentSet(); | 5779 Document::WeakDocumentSet& set = Document::liveDocumentSet(); |
5777 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5780 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5778 for (Document* document : set) | 5781 for (Document* document : set) |
5779 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5782 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
5780 } | 5783 } |
5781 #endif | 5784 #endif |
OLD | NEW |