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

Unified Diff: Source/core/dom/Node.cpp

Issue 22751005: Convert USERSELECT_ALL to a runtime enabled feature. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: undo reordering of if statements Created 7 years, 4 months 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index e6df0b1534454c2e2a8cf208f040c85a316b5104..39360244d6c71b9c30c72f0f15c46559cc1c6797 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -652,14 +652,10 @@ bool Node::rendererIsEditable(EditableLevel editableLevel, UserSelectAllTreatmen
for (const Node* node = this; node; node = node->parentNode()) {
if ((node->isHTMLElement() || node->isDocumentNode()) && node->renderer()) {
-#if ENABLE(USERSELECT_ALL)
// Elements with user-select: all style are considered atomic
// therefore non editable.
- if (node->renderer()->style()->userSelect() == SELECT_ALL && treatment == UserSelectAllIsAlwaysNonEditable)
+ if (Position::nodeIsUserSelectAll(node) && treatment == UserSelectAllIsAlwaysNonEditable)
return false;
-#else
- UNUSED_PARAM(treatment);
-#endif
switch (node->renderer()->style()->userModify()) {
case READ_ONLY:
return false;
« no previous file with comments | « LayoutTests/platform/linux/editing/selection/user-select-all-with-shift-expected.txt ('k') | Source/core/dom/Position.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698