| 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 1910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1921 | 1921 |
| 1922 m_lifecycle.advanceTo(DocumentLifecycle::LayoutSubtreeChangeClean); | 1922 m_lifecycle.advanceTo(DocumentLifecycle::LayoutSubtreeChangeClean); |
| 1923 } | 1923 } |
| 1924 | 1924 |
| 1925 bool Document::needsLayoutTreeUpdateForNode(const Node& node) const | 1925 bool Document::needsLayoutTreeUpdateForNode(const Node& node) const |
| 1926 { | 1926 { |
| 1927 if (!node.canParticipateInFlatTree()) | 1927 if (!node.canParticipateInFlatTree()) |
| 1928 return false; | 1928 return false; |
| 1929 if (!needsLayoutTreeUpdate()) | 1929 if (!needsLayoutTreeUpdate()) |
| 1930 return false; | 1930 return false; |
| 1931 if (!node.inDocument()) | 1931 if (!node.inShadowIncludingDocument()) |
| 1932 return false; | 1932 return false; |
| 1933 | 1933 |
| 1934 if (needsFullLayoutTreeUpdate() || node.needsStyleRecalc() || node.needsStyl
eInvalidation()) | 1934 if (needsFullLayoutTreeUpdate() || node.needsStyleRecalc() || node.needsStyl
eInvalidation()) |
| 1935 return true; | 1935 return true; |
| 1936 for (const ContainerNode* ancestor = LayoutTreeBuilderTraversal::parent(node
); ancestor; ancestor = LayoutTreeBuilderTraversal::parent(*ancestor)) { | 1936 for (const ContainerNode* ancestor = LayoutTreeBuilderTraversal::parent(node
); ancestor; ancestor = LayoutTreeBuilderTraversal::parent(*ancestor)) { |
| 1937 if (ancestor->needsStyleRecalc() || ancestor->needsStyleInvalidation() |
| ancestor->needsAdjacentStyleRecalc()) | 1937 if (ancestor->needsStyleRecalc() || ancestor->needsStyleInvalidation() |
| ancestor->needsAdjacentStyleRecalc()) |
| 1938 return true; | 1938 return true; |
| 1939 } | 1939 } |
| 1940 return false; | 1940 return false; |
| 1941 } | 1941 } |
| (...skipping 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3534 | 3534 |
| 3535 m_activeHoverElement = newActiveElement; | 3535 m_activeHoverElement = newActiveElement; |
| 3536 } | 3536 } |
| 3537 | 3537 |
| 3538 void Document::removeFocusedElementOfSubtree(Node* node, bool amongChildrenOnly) | 3538 void Document::removeFocusedElementOfSubtree(Node* node, bool amongChildrenOnly) |
| 3539 { | 3539 { |
| 3540 if (!m_focusedElement) | 3540 if (!m_focusedElement) |
| 3541 return; | 3541 return; |
| 3542 | 3542 |
| 3543 // We can't be focused if we're not in the document. | 3543 // We can't be focused if we're not in the document. |
| 3544 if (!node->inDocument()) | 3544 if (!node->inShadowIncludingDocument()) |
| 3545 return; | 3545 return; |
| 3546 bool contains = node->isShadowIncludingInclusiveAncestorOf(m_focusedElement.
get()); | 3546 bool contains = node->isShadowIncludingInclusiveAncestorOf(m_focusedElement.
get()); |
| 3547 if (contains && (m_focusedElement != node || !amongChildrenOnly)) | 3547 if (contains && (m_focusedElement != node || !amongChildrenOnly)) |
| 3548 clearFocusedElement(); | 3548 clearFocusedElement(); |
| 3549 } | 3549 } |
| 3550 | 3550 |
| 3551 void Document::hoveredNodeDetached(Element& element) | 3551 void Document::hoveredNodeDetached(Element& element) |
| 3552 { | 3552 { |
| 3553 if (!m_hoverNode) | 3553 if (!m_hoverNode) |
| 3554 return; | 3554 return; |
| (...skipping 2490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6045 #ifndef NDEBUG | 6045 #ifndef NDEBUG |
| 6046 using namespace blink; | 6046 using namespace blink; |
| 6047 void showLiveDocumentInstances() | 6047 void showLiveDocumentInstances() |
| 6048 { | 6048 { |
| 6049 Document::WeakDocumentSet& set = Document::liveDocumentSet(); | 6049 Document::WeakDocumentSet& set = Document::liveDocumentSet(); |
| 6050 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6050 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6051 for (Document* document : set) | 6051 for (Document* document : set) |
| 6052 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get
String().utf8().data()); | 6052 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get
String().utf8().data()); |
| 6053 } | 6053 } |
| 6054 #endif | 6054 #endif |
| OLD | NEW |