| 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 | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
| 6 * rights reserved. | 6 * rights reserved. |
| 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * | 10 * |
| (...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 } | 954 } |
| 955 | 955 |
| 956 int Node::maxCharacterOffset() const { | 956 int Node::maxCharacterOffset() const { |
| 957 NOTREACHED(); | 957 NOTREACHED(); |
| 958 return 0; | 958 return 0; |
| 959 } | 959 } |
| 960 | 960 |
| 961 // FIXME: Shouldn't these functions be in the editing code? Code that asks | 961 // FIXME: Shouldn't these functions be in the editing code? Code that asks |
| 962 // questions about HTML in the core DOM class is obviously misplaced. | 962 // questions about HTML in the core DOM class is obviously misplaced. |
| 963 bool Node::canStartSelection() const { | 963 bool Node::canStartSelection() const { |
| 964 if (isDisabledFormControl(this)) | |
| 965 return false; | |
| 966 | |
| 967 if (hasEditableStyle(*this)) | 964 if (hasEditableStyle(*this)) |
| 968 return true; | 965 return true; |
| 969 | 966 |
| 970 if (layoutObject()) { | 967 if (layoutObject()) { |
| 971 const ComputedStyle& style = layoutObject()->styleRef(); | 968 const ComputedStyle& style = layoutObject()->styleRef(); |
| 972 // We allow selections to begin within an element that has | 969 // We allow selections to begin within an element that has |
| 973 // -webkit-user-select: none set, but if the element is draggable then | 970 // -webkit-user-select: none set, but if the element is draggable then |
| 974 // dragging should take priority over selection. | 971 // dragging should take priority over selection. |
| 975 if (style.userDrag() == DRAG_ELEMENT && style.userSelect() == SELECT_NONE) | 972 if (style.userDrag() == DRAG_ELEMENT && style.userSelect() == SELECT_NONE) |
| 976 return false; | 973 return false; |
| (...skipping 1516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2493 if (node) { | 2490 if (node) { |
| 2494 std::stringstream stream; | 2491 std::stringstream stream; |
| 2495 node->printNodePathTo(stream); | 2492 node->printNodePathTo(stream); |
| 2496 LOG(INFO) << stream.str(); | 2493 LOG(INFO) << stream.str(); |
| 2497 } else { | 2494 } else { |
| 2498 LOG(INFO) << "Cannot showNodePath for <null>"; | 2495 LOG(INFO) << "Cannot showNodePath for <null>"; |
| 2499 } | 2496 } |
| 2500 } | 2497 } |
| 2501 | 2498 |
| 2502 #endif | 2499 #endif |
| OLD | NEW |