| 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 943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 int Node::maxCharacterOffset() const | 954 int Node::maxCharacterOffset() const |
| 955 { | 955 { |
| 956 ASSERT_NOT_REACHED(); | 956 ASSERT_NOT_REACHED(); |
| 957 return 0; | 957 return 0; |
| 958 } | 958 } |
| 959 | 959 |
| 960 // FIXME: Shouldn't these functions be in the editing code? Code that asks ques
tions about HTML in the core DOM class | 960 // FIXME: Shouldn't these functions be in the editing code? Code that asks ques
tions about HTML in the core DOM class |
| 961 // is obviously misplaced. | 961 // is obviously misplaced. |
| 962 bool Node::canStartSelection() const | 962 bool Node::canStartSelection() const |
| 963 { | 963 { |
| 964 if (isDisabledFormControl(this)) |
| 965 return false; |
| 966 |
| 964 if (hasEditableStyle()) | 967 if (hasEditableStyle()) |
| 965 return true; | 968 return true; |
| 966 | 969 |
| 967 if (layoutObject()) { | 970 if (layoutObject()) { |
| 968 const ComputedStyle& style = layoutObject()->styleRef(); | 971 const ComputedStyle& style = layoutObject()->styleRef(); |
| 969 // We allow selections to begin within an element that has -webkit-user-
select: none set, | 972 // We allow selections to begin within an element that has -webkit-user-
select: none set, |
| 970 // but if the element is draggable then dragging should take priority ov
er selection. | 973 // but if the element is draggable then dragging should take priority ov
er selection. |
| 971 if (style.userDrag() == DRAG_ELEMENT && style.userSelect() == SELECT_NON
E) | 974 if (style.userDrag() == DRAG_ELEMENT && style.userSelect() == SELECT_NON
E) |
| 972 return false; | 975 return false; |
| 973 } | 976 } |
| (...skipping 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2481 | 2484 |
| 2482 void showNodePath(const blink::Node* node) | 2485 void showNodePath(const blink::Node* node) |
| 2483 { | 2486 { |
| 2484 if (node) | 2487 if (node) |
| 2485 node->showNodePathForThis(); | 2488 node->showNodePathForThis(); |
| 2486 else | 2489 else |
| 2487 fprintf(stderr, "Cannot showNodePath for (nil)\n"); | 2490 fprintf(stderr, "Cannot showNodePath for (nil)\n"); |
| 2488 } | 2491 } |
| 2489 | 2492 |
| 2490 #endif | 2493 #endif |
| OLD | NEW |