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

Unified Diff: Source/core/rendering/HitTestResult.cpp

Issue 246203004: Fixed unnecessary Paste Popup showing issue when long press on ReadOnly/Disabled elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated Layout Test case HTML based on review comments. Created 6 years, 7 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/rendering/HitTestResult.cpp
diff --git a/Source/core/rendering/HitTestResult.cpp b/Source/core/rendering/HitTestResult.cpp
index 1705f81fcd2758899f4607c446fb69327d64e867..f4b92e41a8fd28d50f2fb961f40d99828c6ffba0 100644
--- a/Source/core/rendering/HitTestResult.cpp
+++ b/Source/core/rendering/HitTestResult.cpp
@@ -381,10 +381,10 @@ bool HitTestResult::isContentEditable() const
return false;
if (isHTMLTextAreaElement(*m_innerNonSharedNode))
- return true;
+ return !toHTMLFormControlElement(m_innerNonSharedNode)->isDisabledOrReadOnly();
if (isHTMLInputElement(*m_innerNonSharedNode))
- return toHTMLInputElement(*m_innerNonSharedNode).isTextField();
+ return (!toHTMLFormControlElement(m_innerNonSharedNode)->isDisabledOrReadOnly() && toHTMLInputElement(*m_innerNonSharedNode).isTextField());
Yuta Kitamura 2014/06/03 07:01:27 nit: Outermost parentheses are not necessary
return m_innerNonSharedNode->rendererIsEditable();
}

Powered by Google App Engine
This is Rietveld 408576698