Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: third_party/WebKit/Source/core/dom/Node.cpp

Issue 2461293002: Merge "Revert of Content in disabled input field should not be selectable. (patchset #4 id:80001 of… (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 } 929 }
930 930
931 int Node::maxCharacterOffset() const { 931 int Node::maxCharacterOffset() const {
932 NOTREACHED(); 932 NOTREACHED();
933 return 0; 933 return 0;
934 } 934 }
935 935
936 // FIXME: Shouldn't these functions be in the editing code? Code that asks 936 // FIXME: Shouldn't these functions be in the editing code? Code that asks
937 // questions about HTML in the core DOM class is obviously misplaced. 937 // questions about HTML in the core DOM class is obviously misplaced.
938 bool Node::canStartSelection() const { 938 bool Node::canStartSelection() const {
939 if (isDisabledFormControl(this))
940 return false;
941
942 if (hasEditableStyle(*this)) 939 if (hasEditableStyle(*this))
943 return true; 940 return true;
944 941
945 if (layoutObject()) { 942 if (layoutObject()) {
946 const ComputedStyle& style = layoutObject()->styleRef(); 943 const ComputedStyle& style = layoutObject()->styleRef();
947 // We allow selections to begin within an element that has 944 // We allow selections to begin within an element that has
948 // -webkit-user-select: none set, but if the element is draggable then 945 // -webkit-user-select: none set, but if the element is draggable then
949 // dragging should take priority over selection. 946 // dragging should take priority over selection.
950 if (style.userDrag() == DRAG_ELEMENT && style.userSelect() == SELECT_NONE) 947 if (style.userDrag() == DRAG_ELEMENT && style.userSelect() == SELECT_NONE)
951 return false; 948 return false;
(...skipping 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after
2465 if (node) { 2462 if (node) {
2466 std::stringstream stream; 2463 std::stringstream stream;
2467 node->printNodePathTo(stream); 2464 node->printNodePathTo(stream);
2468 LOG(INFO) << stream.str(); 2465 LOG(INFO) << stream.str();
2469 } else { 2466 } else {
2470 LOG(INFO) << "Cannot showNodePath for <null>"; 2467 LOG(INFO) << "Cannot showNodePath for <null>";
2471 } 2468 }
2472 } 2469 }
2473 2470
2474 #endif 2471 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698