| 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 5016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5027 if (!element->isInTopLayer()) | 5027 if (!element->isInTopLayer()) |
| 5028 return; | 5028 return; |
| 5029 size_t position = m_topLayerElements.find(element); | 5029 size_t position = m_topLayerElements.find(element); |
| 5030 ASSERT(position != kNotFound); | 5030 ASSERT(position != kNotFound); |
| 5031 m_topLayerElements.remove(position); | 5031 m_topLayerElements.remove(position); |
| 5032 element->setIsInTopLayer(false); | 5032 element->setIsInTopLayer(false); |
| 5033 } | 5033 } |
| 5034 | 5034 |
| 5035 HTMLDialogElement* Document::activeModalDialog() const | 5035 HTMLDialogElement* Document::activeModalDialog() const |
| 5036 { | 5036 { |
| 5037 if (m_topLayerElements.isEmpty()) | 5037 for (auto it = m_topLayerElements.rbegin(); it != m_topLayerElements.rend();
++it) { |
| 5038 return 0; | 5038 Element* currentTopLayerElement = it->get(); |
| 5039 return toHTMLDialogElement(m_topLayerElements.last().get()); | 5039 if (isHTMLDialogElement(currentTopLayerElement)) |
| 5040 return toHTMLDialogElement(currentTopLayerElement); |
| 5041 } |
| 5042 |
| 5043 return nullptr; |
| 5040 } | 5044 } |
| 5041 | 5045 |
| 5042 void Document::exitPointerLock() | 5046 void Document::exitPointerLock() |
| 5043 { | 5047 { |
| 5044 if (!page()) | 5048 if (!page()) |
| 5045 return; | 5049 return; |
| 5046 if (Element* target = page()->pointerLockController().element()) { | 5050 if (Element* target = page()->pointerLockController().element()) { |
| 5047 if (target->document() != this) | 5051 if (target->document() != this) |
| 5048 return; | 5052 return; |
| 5049 } | 5053 } |
| (...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5741 #ifndef NDEBUG | 5745 #ifndef NDEBUG |
| 5742 using namespace blink; | 5746 using namespace blink; |
| 5743 void showLiveDocumentInstances() | 5747 void showLiveDocumentInstances() |
| 5744 { | 5748 { |
| 5745 Document::WeakDocumentSet& set = Document::liveDocumentSet(); | 5749 Document::WeakDocumentSet& set = Document::liveDocumentSet(); |
| 5746 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5750 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 5747 for (Document* document : set) | 5751 for (Document* document : set) |
| 5748 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5752 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
| 5749 } | 5753 } |
| 5750 #endif | 5754 #endif |
| OLD | NEW |