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

Unified Diff: Source/core/dom/PositionIterator.cpp

Issue 314923003: Make SVG elements not to consider editable. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2014-06-09T04:22:19 Created 6 years, 6 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 | « Source/core/dom/Position.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/PositionIterator.cpp
diff --git a/Source/core/dom/PositionIterator.cpp b/Source/core/dom/PositionIterator.cpp
index 09d35f119ad240aef9ace7caaca0197a6e3e63f2..147ab5ef9644a7e38c668df82e9f4a3cf7a7a577 100644
--- a/Source/core/dom/PositionIterator.cpp
+++ b/Source/core/dom/PositionIterator.cpp
@@ -165,6 +165,12 @@ bool PositionIterator::isCandidate() const
if (renderer->isText())
return !Position::nodeIsUserSelectNone(m_anchorNode) && Position(*this).inRenderedText();
+ if (renderer->isSVG()) {
+ // We don't consider SVG elements are contenteditable except for
+ // associated renderer returns isText() true, e.g. RenderSVGInlineText.
+ return false;
+ }
+
if (isRenderedTableElement(m_anchorNode) || editingIgnoresContent(m_anchorNode))
return (atStartOfNode() || atEndOfNode()) && !Position::nodeIsUserSelectNone(m_anchorNode->parentNode());
« no previous file with comments | « Source/core/dom/Position.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698