diff options
| author | Steve Block <steveblock@google.com> | 2009-12-17 09:55:06 -0800 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2009-12-17 09:55:06 -0800 |
| commit | b880d713c04257ca40abfef97c300afdead423b8 (patch) | |
| tree | 6982576c228bcd1a7efe98afed544d840751094c /WebCore/dom/PositionIterator.cpp | |
| parent | e2e7a5c57b53f01e63a0245b4420d54b454cb373 (diff) | |
| parent | 643ca7872b450ea4efacab6188849e5aac2ba161 (diff) | |
| download | external_webkit-b880d713c04257ca40abfef97c300afdead423b8.zip external_webkit-b880d713c04257ca40abfef97c300afdead423b8.tar.gz external_webkit-b880d713c04257ca40abfef97c300afdead423b8.tar.bz2 | |
am 643ca787: Merge webkit.org at r51976 : Initial merge by git.
Merge commit '643ca7872b450ea4efacab6188849e5aac2ba161' into eclair-mr2-plus-aosp
* commit '643ca7872b450ea4efacab6188849e5aac2ba161':
Merge webkit.org at r51976 : Initial merge by git.
Diffstat (limited to 'WebCore/dom/PositionIterator.cpp')
| -rw-r--r-- | WebCore/dom/PositionIterator.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
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; } |
