| 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 994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1005 | 1005 |
| 1006 if (parent->isShadowRoot()) | 1006 if (parent->isShadowRoot()) |
| 1007 return toShadowRoot(parent)->host(); | 1007 return toShadowRoot(parent)->host(); |
| 1008 | 1008 |
| 1009 if (!parent->isElementNode()) | 1009 if (!parent->isElementNode()) |
| 1010 return nullptr; | 1010 return nullptr; |
| 1011 | 1011 |
| 1012 return toElement(parent); | 1012 return toElement(parent); |
| 1013 } | 1013 } |
| 1014 | 1014 |
| 1015 void Node::setParentOrShadowHostNode(ContainerNode* parent) | |
| 1016 { | |
| 1017 ASSERT(isMainThread()); | |
| 1018 m_parentOrShadowHostNode = parent; | |
| 1019 } | |
| 1020 | |
| 1021 ContainerNode* Node::parentOrShadowHostOrTemplateHostNode() const | 1015 ContainerNode* Node::parentOrShadowHostOrTemplateHostNode() const |
| 1022 { | 1016 { |
| 1023 if (isDocumentFragment() && toDocumentFragment(this)->isTemplateContent()) | 1017 if (isDocumentFragment() && toDocumentFragment(this)->isTemplateContent()) |
| 1024 return static_cast<const TemplateContentDocumentFragment*>(this)->host()
; | 1018 return static_cast<const TemplateContentDocumentFragment*>(this)->host()
; |
| 1025 return parentOrShadowHostNode(); | 1019 return parentOrShadowHostNode(); |
| 1026 } | 1020 } |
| 1027 | 1021 |
| 1028 bool Node::isRootEditableElement() const | 1022 bool Node::isRootEditableElement() const |
| 1029 { | 1023 { |
| 1030 return hasEditableStyle() && isElementNode() && (!parentNode() || !parentNod
e()->hasEditableStyle() | 1024 return hasEditableStyle() && isElementNode() && (!parentNode() || !parentNod
e()->hasEditableStyle() |
| (...skipping 1344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2375 | 2369 |
| 2376 void showNodePath(const blink::Node* node) | 2370 void showNodePath(const blink::Node* node) |
| 2377 { | 2371 { |
| 2378 if (node) | 2372 if (node) |
| 2379 node->showNodePathForThis(); | 2373 node->showNodePathForThis(); |
| 2380 else | 2374 else |
| 2381 fprintf(stderr, "Cannot showNodePath for (nil)\n"); | 2375 fprintf(stderr, "Cannot showNodePath for (nil)\n"); |
| 2382 } | 2376 } |
| 2383 | 2377 |
| 2384 #endif | 2378 #endif |
| OLD | NEW |