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 5076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5087 if (!element->isInTopLayer()) | 5087 if (!element->isInTopLayer()) |
5088 return; | 5088 return; |
5089 size_t position = m_topLayerElements.find(element); | 5089 size_t position = m_topLayerElements.find(element); |
5090 ASSERT(position != kNotFound); | 5090 ASSERT(position != kNotFound); |
5091 m_topLayerElements.remove(position); | 5091 m_topLayerElements.remove(position); |
5092 element->setIsInTopLayer(false); | 5092 element->setIsInTopLayer(false); |
5093 } | 5093 } |
5094 | 5094 |
5095 HTMLDialogElement* Document::activeModalDialog() const | 5095 HTMLDialogElement* Document::activeModalDialog() const |
5096 { | 5096 { |
5097 if (m_topLayerElements.isEmpty()) | 5097 for (auto it = m_topLayerElements.rbegin(); it != m_topLayerElements.rend();
++it) { |
5098 return 0; | 5098 Element* currentTopLayerElement = it->get(); |
5099 return toHTMLDialogElement(m_topLayerElements.last().get()); | 5099 if (isHTMLDialogElement(currentTopLayerElement)) |
| 5100 return toHTMLDialogElement(currentTopLayerElement); |
| 5101 } |
| 5102 |
| 5103 return 0; |
5100 } | 5104 } |
5101 | 5105 |
5102 void Document::exitPointerLock() | 5106 void Document::exitPointerLock() |
5103 { | 5107 { |
5104 if (!page()) | 5108 if (!page()) |
5105 return; | 5109 return; |
5106 if (Element* target = page()->pointerLockController().element()) { | 5110 if (Element* target = page()->pointerLockController().element()) { |
5107 if (target->document() != this) | 5111 if (target->document() != this) |
5108 return; | 5112 return; |
5109 } | 5113 } |
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5846 #ifndef NDEBUG | 5850 #ifndef NDEBUG |
5847 using namespace blink; | 5851 using namespace blink; |
5848 void showLiveDocumentInstances() | 5852 void showLiveDocumentInstances() |
5849 { | 5853 { |
5850 WeakDocumentSet& set = liveDocumentSet(); | 5854 WeakDocumentSet& set = liveDocumentSet(); |
5851 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5855 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5852 for (Document* document : set) | 5856 for (Document* document : set) |
5853 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5857 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
5854 } | 5858 } |
5855 #endif | 5859 #endif |
OLD | NEW |