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 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1079 | 1079 |
1080 if (parent->isShadowRoot()) | 1080 if (parent->isShadowRoot()) |
1081 return &toShadowRoot(parent)->host(); | 1081 return &toShadowRoot(parent)->host(); |
1082 | 1082 |
1083 if (!parent->isElementNode()) | 1083 if (!parent->isElementNode()) |
1084 return nullptr; | 1084 return nullptr; |
1085 | 1085 |
1086 return toElement(parent); | 1086 return toElement(parent); |
1087 } | 1087 } |
1088 | 1088 |
1089 ContainerNode* Node::parentOrShadowHostOrTemplateHostNode() const { | 1089 ContainerNode* Node::parentOrShadowHostOrTemplateHostNodeForDocumentFragment() |
1090 if (isDocumentFragment() && toDocumentFragment(this)->isTemplateContent()) | 1090 const { |
| 1091 DCHECK(isDocumentFragment() && !isShadowRoot()); |
| 1092 if (toDocumentFragment(this)->isTemplateContent()) |
1091 return static_cast<const TemplateContentDocumentFragment*>(this)->host(); | 1093 return static_cast<const TemplateContentDocumentFragment*>(this)->host(); |
1092 return parentOrShadowHostNode(); | 1094 return parentOrShadowHostNode(); |
1093 } | 1095 } |
1094 | 1096 |
1095 Document* Node::ownerDocument() const { | 1097 Document* Node::ownerDocument() const { |
1096 Document* doc = &document(); | 1098 Document* doc = &document(); |
1097 return doc == this ? nullptr : doc; | 1099 return doc == this ? nullptr : doc; |
1098 } | 1100 } |
1099 | 1101 |
1100 const KURL& Node::baseURI() const { | 1102 const KURL& Node::baseURI() const { |
(...skipping 1386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2487 if (node) { | 2489 if (node) { |
2488 std::stringstream stream; | 2490 std::stringstream stream; |
2489 node->printNodePathTo(stream); | 2491 node->printNodePathTo(stream); |
2490 LOG(INFO) << stream.str(); | 2492 LOG(INFO) << stream.str(); |
2491 } else { | 2493 } else { |
2492 LOG(INFO) << "Cannot showNodePath for <null>"; | 2494 LOG(INFO) << "Cannot showNodePath for <null>"; |
2493 } | 2495 } |
2494 } | 2496 } |
2495 | 2497 |
2496 #endif | 2498 #endif |
OLD | NEW |