From 643ca7872b450ea4efacab6188849e5aac2ba161 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Tue, 15 Dec 2009 10:12:09 +0000 Subject: Merge webkit.org at r51976 : Initial merge by git. Change-Id: Ib0e7e2f0fb4bee5a186610272edf3186f0986b43 --- WebCore/dom/PositionIterator.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'WebCore/dom/PositionIterator.cpp') diff --git a/WebCore/dom/PositionIterator.cpp b/WebCore/dom/PositionIterator.cpp index 8d881ba..f5b65f5 100644 --- a/WebCore/dom/PositionIterator.cpp +++ b/WebCore/dom/PositionIterator.cpp @@ -156,10 +156,14 @@ bool PositionIterator::isCandidate() const if (isTableElement(m_anchorNode) || editingIgnoresContent(m_anchorNode)) return (atStartOfNode() || atEndOfNode()) && !Position::nodeIsUserSelectNone(m_anchorNode->parent()); - if (!m_anchorNode->hasTagName(htmlTag) && renderer->isBlockFlow() && !Position::hasRenderedNonAnonymousDescendantsWithHeight(renderer) && - (toRenderBlock(renderer)->height() || m_anchorNode->hasTagName(bodyTag))) - return atStartOfNode() && !Position::nodeIsUserSelectNone(m_anchorNode); - + if (!m_anchorNode->hasTagName(htmlTag) && renderer->isBlockFlow()) { + if (toRenderBlock(renderer)->height() || m_anchorNode->hasTagName(bodyTag)) { + if (!Position::hasRenderedNonAnonymousDescendantsWithHeight(renderer)) + return atStartOfNode() && !Position::nodeIsUserSelectNone(m_anchorNode); + return m_anchorNode->isContentEditable() && !Position::nodeIsUserSelectNone(m_anchorNode) && Position(*this).atEditingBoundary(); + } + } + return false; } -- cgit v1.1