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

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

Issue 2120913002: [Editing][Regression] Contenteditable w/ "-webkit-user-select:all" should be editable. (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/dom/Node.cpp
diff --git a/third_party/WebKit/Source/core/dom/Node.cpp b/third_party/WebKit/Source/core/dom/Node.cpp
index 84a8cea65e1140ef19992d5e3c884b1fd0ce5c1f..c4cf180839ef4ae124141a4e3fbc4879e58bd6b2 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -557,9 +557,10 @@ bool Node::hasEditableStyle(EditableLevel editableLevel, UserSelectAllTreatment
for (const Node& node : NodeTraversal::inclusiveAncestorsOf(*this)) {
if ((node.isHTMLElement() || node.isDocumentNode()) && node.layoutObject()) {
+ const bool isContentEditable = node.isHTMLElement() && toHTMLElement(node).contentEditable() == "true";
yosin_UTC9 2016/07/06 07:56:48 We should not check "contentEditable" attribute. e
yoichio 2016/07/07 07:57:02 Done.
// Elements with user-select: all style are considered atomic
// therefore non editable.
- if (nodeIsUserSelectAll(&node) && treatment == UserSelectAllIsAlwaysNonEditable)
+ if (!isContentEditable && nodeIsUserSelectAll(&node) && treatment == UserSelectAllIsAlwaysNonEditable)
return false;
switch (node.layoutObject()->style()->userModify()) {
case READ_ONLY:

Powered by Google App Engine
This is Rietveld 408576698