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

Unified Diff: content/renderer/render_view_impl.cc

Issue 660343003: Fixed the insertion handle showing issue on readonly element. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the review comments. 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
« no previous file with comments | « content/public/android/javatests/src/org/chromium/content/browser/ContentViewCoreSelectionTest.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index f17f982e43a096992f3ded4877e188a4fc469c6e..eae5d1bc566c626b22b89f020788ffd7fa6062a8 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -2520,8 +2520,11 @@ bool RenderViewImpl::IsEditableNode(const WebNode& node) const {
if (node.isElementNode()) {
const WebElement& element = node.toConst<WebElement>();
- if (element.isTextFormControlElement())
- return true;
+ if (element.isTextFormControlElement()) {
+ if (!(element.hasAttribute("readonly") ||
+ element.hasAttribute("disabled")))
+ return true;
+ }
// Also return true if it has an ARIA role of 'textbox'.
for (unsigned i = 0; i < element.attributeCount(); ++i) {
« no previous file with comments | « content/public/android/javatests/src/org/chromium/content/browser/ContentViewCoreSelectionTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698