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

Unified Diff: third_party/WebKit/Source/core/editing/EditingUtilities.cpp

Issue 2151803003: [Editing][Regression] Contenteditable w/ "-webkit-user-select:all" should be editable for drag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 4 years, 5 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: third_party/WebKit/Source/core/editing/EditingUtilities.cpp
diff --git a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
index f49d88fa5cb99062c29e0146ace994920cc096a7..1b2ab62e44b3cc6b1bc66b1a6d5d481af1b93bff 100644
--- a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
+++ b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
@@ -818,6 +818,20 @@ bool nodeIsUserSelectAll(const Node* node)
}
+EUserSelect usedValueOfUserSelect(const Node& node)
+{
+ if (node.isHTMLElement() && toHTMLElement(node).isTextFormControl())
+ return SELECT_TEXT;
+ if (!node.layoutObject())
+ return SELECT_NONE;
+
+ const ComputedStyle* style = node.layoutObject()->style();
+ if (style->userModify() != READ_ONLY)
+ return SELECT_TEXT;
+
+ return style->userSelect();
+}
+
template <typename Strategy>
TextDirection directionOfEnclosingBlockAlgorithm(const PositionTemplate<Strategy>& position)
{

Powered by Google App Engine
This is Rietveld 408576698