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