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

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: Refined the Layout test case. Created 6 years, 2 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 cf5316427df867774fbe854bff10e323791591f5..4286f6636251f5c4777642092ad8e2949b921652 100644
--- a/Source/core/rendering/HitTestResult.cpp
+++ b/Source/core/rendering/HitTestResult.cpp
@@ -371,10 +371,10 @@ bool HitTestResult::isContentEditable() const
return false;
if (isHTMLTextAreaElement(*m_innerNonSharedNode))
- return true;
+ return !toHTMLFormControlElement(m_innerNonSharedNode)->isDisabledOrReadOnly();
Yuta Kitamura 2014/10/16 04:01:23 nit: Since we know m_innerNodeSharedNode is non-nu
AKVT 2014/10/16 17:17:14 Done. Thank you
if (isHTMLInputElement(*m_innerNonSharedNode))
- return toHTMLInputElement(*m_innerNonSharedNode).isTextField();
+ return !toHTMLFormControlElement(m_innerNonSharedNode)->isDisabledOrReadOnly() && toHTMLInputElement(*m_innerNonSharedNode).isTextField();
Yuta Kitamura 2014/10/16 04:01:23 nit: Doing the type cast twice for the same object
AKVT 2014/10/16 17:17:14 Done. Thank you
return m_innerNonSharedNode->hasEditableStyle();
}

Powered by Google App Engine
This is Rietveld 408576698