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 1394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1405 if (renderer()) { | 1405 if (renderer()) { |
1406 RenderStyle* style = renderer()->style(); | 1406 RenderStyle* style = renderer()->style(); |
1407 // We allow selections to begin within an element that has -webkit-user-
select: none set, | 1407 // We allow selections to begin within an element that has -webkit-user-
select: none set, |
1408 // but if the element is draggable then dragging should take priority ov
er selection. | 1408 // but if the element is draggable then dragging should take priority ov
er selection. |
1409 if (style->userDrag() == DRAG_ELEMENT && style->userSelect() == SELECT_N
ONE) | 1409 if (style->userDrag() == DRAG_ELEMENT && style->userSelect() == SELECT_N
ONE) |
1410 return false; | 1410 return false; |
1411 } | 1411 } |
1412 return parentOrHostNode() ? parentOrHostNode()->canStartSelection() : true; | 1412 return parentOrHostNode() ? parentOrHostNode()->canStartSelection() : true; |
1413 } | 1413 } |
1414 | 1414 |
| 1415 Element* Node::shadowHost() const |
| 1416 { |
| 1417 if (ShadowRoot* root = shadowRoot()) |
| 1418 return root->host(); |
| 1419 return 0; |
| 1420 } |
1415 | 1421 |
1416 Node* Node::shadowAncestorNode() const | 1422 Node* Node::shadowAncestorNode() const |
1417 { | 1423 { |
1418 #if ENABLE(SVG) | 1424 #if ENABLE(SVG) |
1419 // SVG elements living in a shadow tree only occur when <use> created them. | 1425 // SVG elements living in a shadow tree only occur when <use> created them. |
1420 // For these cases we do NOT want to return the shadowParentNode() here | 1426 // For these cases we do NOT want to return the shadowParentNode() here |
1421 // but the actual shadow tree element - as main difference to the HTML forms | 1427 // but the actual shadow tree element - as main difference to the HTML forms |
1422 // shadow tree concept. (This function _could_ be made virtual - opinions?) | 1428 // shadow tree concept. (This function _could_ be made virtual - opinions?) |
1423 if (isSVGElement()) | 1429 if (isSVGElement()) |
1424 return const_cast<Node*>(this); | 1430 return const_cast<Node*>(this); |
(...skipping 1370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2795 node->showTreeForThis(); | 2801 node->showTreeForThis(); |
2796 } | 2802 } |
2797 | 2803 |
2798 void showNodePath(const WebCore::Node* node) | 2804 void showNodePath(const WebCore::Node* node) |
2799 { | 2805 { |
2800 if (node) | 2806 if (node) |
2801 node->showNodePathForThis(); | 2807 node->showNodePathForThis(); |
2802 } | 2808 } |
2803 | 2809 |
2804 #endif | 2810 #endif |
OLD | NEW |