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