| 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 r
ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 988 bool Node::canParticipateInFlatTree() const | 988 bool Node::canParticipateInFlatTree() const |
| 989 { | 989 { |
| 990 return !isShadowRoot() && !isSlotOrActiveInsertionPoint(); | 990 return !isShadowRoot() && !isSlotOrActiveInsertionPoint(); |
| 991 } | 991 } |
| 992 | 992 |
| 993 bool Node::isSlotOrActiveInsertionPoint() const | 993 bool Node::isSlotOrActiveInsertionPoint() const |
| 994 { | 994 { |
| 995 return isHTMLSlotElement(*this) || isActiveInsertionPoint(*this); | 995 return isHTMLSlotElement(*this) || isActiveInsertionPoint(*this); |
| 996 } | 996 } |
| 997 | 997 |
| 998 AtomicString Node::slotName() const |
| 999 { |
| 1000 DCHECK(slottable()); |
| 1001 if (isElementNode()) |
| 1002 return normalizeSlotName(toElement(*this).fastGetAttribute(HTMLNames::sl
otAttr)); |
| 1003 DCHECK(isTextNode()); |
| 1004 return emptyAtom; |
| 1005 } |
| 1006 |
| 1007 // static |
| 1008 AtomicString Node::normalizeSlotName(const AtomicString& name) |
| 1009 { |
| 1010 return (name.isNull() || name.isEmpty()) ? emptyAtom : name; |
| 1011 } |
| 1012 |
| 998 bool Node::isInV1ShadowTree() const | 1013 bool Node::isInV1ShadowTree() const |
| 999 { | 1014 { |
| 1000 ShadowRoot* shadowRoot = containingShadowRoot(); | 1015 ShadowRoot* shadowRoot = containingShadowRoot(); |
| 1001 return shadowRoot && shadowRoot->isV1(); | 1016 return shadowRoot && shadowRoot->isV1(); |
| 1002 } | 1017 } |
| 1003 | 1018 |
| 1004 bool Node::isInV0ShadowTree() const | 1019 bool Node::isInV0ShadowTree() const |
| 1005 { | 1020 { |
| 1006 ShadowRoot* shadowRoot = containingShadowRoot(); | 1021 ShadowRoot* shadowRoot = containingShadowRoot(); |
| 1007 return shadowRoot && !shadowRoot->isV1(); | 1022 return shadowRoot && !shadowRoot->isV1(); |
| (...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2462 | 2477 |
| 2463 void showNodePath(const blink::Node* node) | 2478 void showNodePath(const blink::Node* node) |
| 2464 { | 2479 { |
| 2465 if (node) | 2480 if (node) |
| 2466 node->showNodePathForThis(); | 2481 node->showNodePathForThis(); |
| 2467 else | 2482 else |
| 2468 fprintf(stderr, "Cannot showNodePath for (nil)\n"); | 2483 fprintf(stderr, "Cannot showNodePath for (nil)\n"); |
| 2469 } | 2484 } |
| 2470 | 2485 |
| 2471 #endif | 2486 #endif |
| OLD | NEW |