| 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 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
| 6 * rights reserved. | 6 * rights reserved. |
| 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * | 10 * |
| (...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 986 // eliminate all the checks since those elements will never have class names, | 986 // eliminate all the checks since those elements will never have class names, |
| 987 // inline style, or other things that this apparently guards against. | 987 // inline style, or other things that this apparently guards against. |
| 988 bool Node::isStyledElement() const { | 988 bool Node::isStyledElement() const { |
| 989 return isHTMLElement() || isSVGElement() || | 989 return isHTMLElement() || isSVGElement() || |
| 990 (isElementNode() && | 990 (isElementNode() && |
| 991 toElement(this)->namespaceURI() == MathMLNames::mathmlNamespaceURI); | 991 toElement(this)->namespaceURI() == MathMLNames::mathmlNamespaceURI); |
| 992 } | 992 } |
| 993 | 993 |
| 994 bool Node::canParticipateInFlatTree() const { | 994 bool Node::canParticipateInFlatTree() const { |
| 995 // TODO(hayato): Return false for pseudo elements. | 995 // TODO(hayato): Return false for pseudo elements. |
| 996 return !isShadowRoot() && !isSlotOrActiveInsertionPoint(); | 996 return !isShadowRoot() && !isActiveSlotOrActiveInsertionPoint(); |
| 997 } | 997 } |
| 998 | 998 |
| 999 bool Node::isSlotOrActiveInsertionPoint() const { | 999 bool Node::isActiveSlotOrActiveInsertionPoint() const { |
| 1000 return isHTMLSlotElement(*this) || isActiveInsertionPoint(*this); | 1000 return (isHTMLSlotElement(*this) && |
| 1001 toHTMLSlotElement(*this).supportsDistribution()) || |
| 1002 isActiveInsertionPoint(*this); |
| 1001 } | 1003 } |
| 1002 | 1004 |
| 1003 AtomicString Node::slotName() const { | 1005 AtomicString Node::slotName() const { |
| 1004 DCHECK(isSlotable()); | 1006 DCHECK(isSlotable()); |
| 1005 if (isElementNode()) | 1007 if (isElementNode()) |
| 1006 return HTMLSlotElement::normalizeSlotName( | 1008 return HTMLSlotElement::normalizeSlotName( |
| 1007 toElement(*this).fastGetAttribute(HTMLNames::slotAttr)); | 1009 toElement(*this).fastGetAttribute(HTMLNames::slotAttr)); |
| 1008 DCHECK(isTextNode()); | 1010 DCHECK(isTextNode()); |
| 1009 return emptyAtom; | 1011 return emptyAtom; |
| 1010 } | 1012 } |
| (...skipping 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2485 if (node) { | 2487 if (node) { |
| 2486 std::stringstream stream; | 2488 std::stringstream stream; |
| 2487 node->printNodePathTo(stream); | 2489 node->printNodePathTo(stream); |
| 2488 LOG(INFO) << stream.str(); | 2490 LOG(INFO) << stream.str(); |
| 2489 } else { | 2491 } else { |
| 2490 LOG(INFO) << "Cannot showNodePath for <null>"; | 2492 LOG(INFO) << "Cannot showNodePath for <null>"; |
| 2491 } | 2493 } |
| 2492 } | 2494 } |
| 2493 | 2495 |
| 2494 #endif | 2496 #endif |
| OLD | NEW |