| 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 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1033 } | 1033 } |
| 1034 | 1034 |
| 1035 // FIXME: Shouldn't these functions be in the editing code? Code that asks ques
tions about HTML in the core DOM class | 1035 // FIXME: Shouldn't these functions be in the editing code? Code that asks ques
tions about HTML in the core DOM class |
| 1036 // is obviously misplaced. | 1036 // is obviously misplaced. |
| 1037 bool Node::canStartSelection() const | 1037 bool Node::canStartSelection() const |
| 1038 { | 1038 { |
| 1039 if (hasEditableStyle()) | 1039 if (hasEditableStyle()) |
| 1040 return true; | 1040 return true; |
| 1041 | 1041 |
| 1042 if (renderer()) { | 1042 if (renderer()) { |
| 1043 const LayoutStyle& style = renderer()->styleRef(); | 1043 LayoutStyle* style = renderer()->style(); |
| 1044 // We allow selections to begin within an element that has -webkit-user-
select: none set, | 1044 // We allow selections to begin within an element that has -webkit-user-
select: none set, |
| 1045 // but if the element is draggable then dragging should take priority ov
er selection. | 1045 // but if the element is draggable then dragging should take priority ov
er selection. |
| 1046 if (style.userDrag() == DRAG_ELEMENT && style.userSelect() == SELECT_NON
E) | 1046 if (style->userDrag() == DRAG_ELEMENT && style->userSelect() == SELECT_N
ONE) |
| 1047 return false; | 1047 return false; |
| 1048 } | 1048 } |
| 1049 return parentOrShadowHostNode() ? parentOrShadowHostNode()->canStartSelectio
n() : true; | 1049 return parentOrShadowHostNode() ? parentOrShadowHostNode()->canStartSelectio
n() : true; |
| 1050 } | 1050 } |
| 1051 | 1051 |
| 1052 bool Node::canParticipateInComposedTree() const | 1052 bool Node::canParticipateInComposedTree() const |
| 1053 { | 1053 { |
| 1054 return !isShadowRoot() && !isActiveInsertionPoint(*this); | 1054 return !isShadowRoot() && !isActiveInsertionPoint(*this); |
| 1055 } | 1055 } |
| 1056 | 1056 |
| (...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2438 node->showTreeForThis(); | 2438 node->showTreeForThis(); |
| 2439 } | 2439 } |
| 2440 | 2440 |
| 2441 void showNodePath(const blink::Node* node) | 2441 void showNodePath(const blink::Node* node) |
| 2442 { | 2442 { |
| 2443 if (node) | 2443 if (node) |
| 2444 node->showNodePathForThis(); | 2444 node->showNodePathForThis(); |
| 2445 } | 2445 } |
| 2446 | 2446 |
| 2447 #endif | 2447 #endif |
| OLD | NEW |