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 5052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5063 if (!element->isInTopLayer()) | 5063 if (!element->isInTopLayer()) |
5064 return; | 5064 return; |
5065 size_t position = m_topLayerElements.find(element); | 5065 size_t position = m_topLayerElements.find(element); |
5066 ASSERT(position != kNotFound); | 5066 ASSERT(position != kNotFound); |
5067 m_topLayerElements.remove(position); | 5067 m_topLayerElements.remove(position); |
5068 element->setIsInTopLayer(false); | 5068 element->setIsInTopLayer(false); |
5069 } | 5069 } |
5070 | 5070 |
5071 HTMLDialogElement* Document::activeModalDialog() const | 5071 HTMLDialogElement* Document::activeModalDialog() const |
5072 { | 5072 { |
5073 for (auto it = m_topLayerElements.rbegin(); it != m_topLayerElements.rend();
++it) { | 5073 if (m_topLayerElements.isEmpty()) |
5074 if (isHTMLDialogElement(*it)) | 5074 return 0; |
5075 return toHTMLDialogElement((*it).get()); | 5075 return toHTMLDialogElement(m_topLayerElements.last().get()); |
5076 } | |
5077 | |
5078 return nullptr; | |
5079 } | 5076 } |
5080 | 5077 |
5081 void Document::exitPointerLock() | 5078 void Document::exitPointerLock() |
5082 { | 5079 { |
5083 if (!page()) | 5080 if (!page()) |
5084 return; | 5081 return; |
5085 if (Element* target = page()->pointerLockController().element()) { | 5082 if (Element* target = page()->pointerLockController().element()) { |
5086 if (target->document() != this) | 5083 if (target->document() != this) |
5087 return; | 5084 return; |
5088 } | 5085 } |
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5825 #ifndef NDEBUG | 5822 #ifndef NDEBUG |
5826 using namespace blink; | 5823 using namespace blink; |
5827 void showLiveDocumentInstances() | 5824 void showLiveDocumentInstances() |
5828 { | 5825 { |
5829 Document::WeakDocumentSet& set = Document::liveDocumentSet(); | 5826 Document::WeakDocumentSet& set = Document::liveDocumentSet(); |
5830 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5827 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5831 for (Document* document : set) | 5828 for (Document* document : set) |
5832 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5829 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
5833 } | 5830 } |
5834 #endif | 5831 #endif |
OLD | NEW |