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 WillBeHeapVector<RefPtrWillBeMember<Element>>::const_reverse_iterator end = m_topLayerElements.rend(); |
5098 return 0; | 5098 WillBeHeapVector<RefPtrWillBeMember<Element>>::const_reverse_iterator it = m _topLayerElements.rbegin(); |
5099 return toHTMLDialogElement(m_topLayerElements.last().get()); | 5099 for (; it != end; ++it) { |
esprehn
2014/12/15 09:45:32
Use C++11 for loop.
Julien - ping for review
2014/12/15 17:02:53
Done
Julien - ping for review
2014/12/15 21:32:03
Actually I probably didn't do what asked for: we c
| |
5100 Element* currentTopLayerElement = it->get(); | |
5101 if (isHTMLDialogElement(currentTopLayerElement)) | |
5102 return toHTMLDialogElement(currentTopLayerElement); | |
5103 } | |
5104 | |
5105 return 0; | |
5100 } | 5106 } |
5101 | 5107 |
5102 void Document::exitPointerLock() | 5108 void Document::exitPointerLock() |
5103 { | 5109 { |
5104 if (!page()) | 5110 if (!page()) |
5105 return; | 5111 return; |
5106 if (Element* target = page()->pointerLockController().element()) { | 5112 if (Element* target = page()->pointerLockController().element()) { |
5107 if (target->document() != this) | 5113 if (target->document() != this) |
5108 return; | 5114 return; |
5109 } | 5115 } |
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5846 #ifndef NDEBUG | 5852 #ifndef NDEBUG |
5847 using namespace blink; | 5853 using namespace blink; |
5848 void showLiveDocumentInstances() | 5854 void showLiveDocumentInstances() |
5849 { | 5855 { |
5850 WeakDocumentSet& set = liveDocumentSet(); | 5856 WeakDocumentSet& set = liveDocumentSet(); |
5851 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5857 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5852 for (Document* document : set) | 5858 for (Document* document : set) |
5853 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); | 5859 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); |
5854 } | 5860 } |
5855 #endif | 5861 #endif |
OLD | NEW |