<rdar://problem/
4055127> Dictionary pop-up panel misplaced at beginning of text blocks (breaks double-clicking in Dictionary.app)
SimplifiedBackwardsTextIterator::advance() needed to not limit to textnodes
when checking whether moving back across block boundaries
VisibleUnits previousBoundary() needed to INIT_DOWN when creating result VisiblePosition
All editing tests pass.
* khtml/editing/visible_text.cpp:
(khtml::SimplifiedBackwardsTextIterator::advance):
* khtml/editing/visible_units.cpp:
(khtml::previousBoundary):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8943
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2005-03-20 David Harrison <harrison@apple.com>
+
+ Reviewed by Darin.
+
+ <rdar://problem/4055127> Dictionary pop-up panel misplaced at beginning of text blocks (breaks double-clicking in Dictionary.app)
+
+ SimplifiedBackwardsTextIterator::advance() needed to not limit to textnodes
+ when checking whether moving back across block boundaries
+
+ VisibleUnits previousBoundary() needed to INIT_DOWN when creating result VisiblePosition
+
+ All editing tests pass.
+
+ * khtml/editing/visible_text.cpp:
+ (khtml::SimplifiedBackwardsTextIterator::advance):
+ * khtml/editing/visible_units.cpp:
+ (khtml::previousBoundary):
+
2005-03-20 Darin Adler <darin@apple.com>
Reviewed by Harrison.
}
}
- // Check for leaving a text node and iterating backwards
+ // Check for leaving a node and iterating backwards
// into a different block that is an descendent of the
- // block containing the text node (as in leaving
+ // block containing the node (as in leaving
// the "bar" node in this example: <p>foo</p>bar).
// Must emit newline when leaving node containing "bar".
- if (next && m_node->renderer() && m_node->renderer()->isText() &&
- m_node->renderer()->style()->visibility() == VISIBLE) {
+ if (next && m_node->renderer() && m_node->renderer()->style()->visibility() == VISIBLE) {
NodeImpl *block = m_node->enclosingBlockFlowElement();
if (block) {
NodeImpl *nextBlock = next->enclosingBlockFlowElement();
}
}
- return VisiblePosition(pos, DOWNSTREAM, VisiblePosition::INIT_UP);
+ return VisiblePosition(pos, DOWNSTREAM, VisiblePosition::INIT_DOWN);
}
static VisiblePosition nextBoundary(const VisiblePosition &c, unsigned (*searchFunction)(const QChar *, unsigned))