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 3526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3537 } | 3537 } |
3538 | 3538 |
3539 void Document::removeFocusedElementOfSubtree(Node* node, bool amongChildrenOnly) | 3539 void Document::removeFocusedElementOfSubtree(Node* node, bool amongChildrenOnly) |
3540 { | 3540 { |
3541 if (!m_focusedElement) | 3541 if (!m_focusedElement) |
3542 return; | 3542 return; |
3543 | 3543 |
3544 // We can't be focused if we're not in the document. | 3544 // We can't be focused if we're not in the document. |
3545 if (!node->inDocument()) | 3545 if (!node->inDocument()) |
3546 return; | 3546 return; |
3547 bool contains = node->containsIncludingShadowDOM(m_focusedElement.get()); | 3547 bool contains = node->isShadowIncludingInclusiveAncestorOf(m_focusedElement.
get()); |
3548 if (contains && (m_focusedElement != node || !amongChildrenOnly)) | 3548 if (contains && (m_focusedElement != node || !amongChildrenOnly)) |
3549 clearFocusedElement(); | 3549 clearFocusedElement(); |
3550 } | 3550 } |
3551 | 3551 |
3552 void Document::hoveredNodeDetached(Element& element) | 3552 void Document::hoveredNodeDetached(Element& element) |
3553 { | 3553 { |
3554 if (!m_hoverNode) | 3554 if (!m_hoverNode) |
3555 return; | 3555 return; |
3556 | 3556 |
3557 m_hoverNode->updateDistribution(); | 3557 m_hoverNode->updateDistribution(); |
(...skipping 2486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6044 #ifndef NDEBUG | 6044 #ifndef NDEBUG |
6045 using namespace blink; | 6045 using namespace blink; |
6046 void showLiveDocumentInstances() | 6046 void showLiveDocumentInstances() |
6047 { | 6047 { |
6048 Document::WeakDocumentSet& set = Document::liveDocumentSet(); | 6048 Document::WeakDocumentSet& set = Document::liveDocumentSet(); |
6049 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6049 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6050 for (Document* document : set) | 6050 for (Document* document : set) |
6051 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get
String().utf8().data()); | 6051 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get
String().utf8().data()); |
6052 } | 6052 } |
6053 #endif | 6053 #endif |
OLD | NEW |