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

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

Issue 1189543002: Do not traverse nodes not having a layout object while searching editable visible position. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Resolved conflicts. Created 5 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
« no previous file with comments | « no previous file | Source/core/editing/htmlediting.cpp » ('j') | 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 c610f14236bdf0e6cdf73b0788ba9188d0f991e6..ef8f22f1b899e1580d9a8e310376e05d39f3c366 100644
--- a/Source/core/dom/PositionIterator.cpp
+++ b/Source/core/dom/PositionIterator.cpp
@@ -77,7 +77,7 @@ void PositionIteratorAlgorithm<Strategy>::increment()
return;
}
- if (!Strategy::hasChildren(*m_anchorNode) && m_offsetInAnchor < Strategy::lastOffsetForEditing(m_anchorNode)) {
+ if (m_anchorNode->layoutObject() && !Strategy::hasChildren(*m_anchorNode) && m_offsetInAnchor < Strategy::lastOffsetForEditing(m_anchorNode)) {
yosin_UTC9 2015/07/17 12:00:21 Please check layoutObject() only for nodes which r
changseok 2015/07/28 05:05:37 Done.
m_offsetInAnchor = PositionAlgorithm<Strategy>::uncheckedNextOffset(m_anchorNode, m_offsetInAnchor);
} else {
m_nodeAfterPositionInAnchor = m_anchorNode;
@@ -110,7 +110,7 @@ void PositionIteratorAlgorithm<Strategy>::decrement()
m_anchorNode = Strategy::lastChild(*m_anchorNode);
m_offsetInAnchor = Strategy::hasChildren(*m_anchorNode)? 0 : Strategy::lastOffsetForEditing(m_anchorNode);
} else {
- if (m_offsetInAnchor) {
+ if (m_offsetInAnchor && m_anchorNode->layoutObject()) {
yosin_UTC9 2015/07/17 12:00:21 Same as L80
changseok 2015/07/28 05:05:37 Done.
m_offsetInAnchor = PositionAlgorithm<Strategy>::uncheckedPreviousOffset(m_anchorNode, m_offsetInAnchor);
} else {
m_nodeAfterPositionInAnchor = m_anchorNode;
« no previous file with comments | « no previous file | Source/core/editing/htmlediting.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698