Fix for this bug:
<rdar://problem/
3805594> REGRESSION (Mail): Second return key stroke does not work when first was in blockquote
* khtml/xml/dom_selection.cpp:
(DOM::Selection::toRange): Code to convert caret positions moved the position upstream
before making a range-compliant position, but erroneously would allow the position
to cross blocks. Now it will no longer do so.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7589
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2004-09-17 Ken Kocienda <kocienda@apple.com>
+
+ Reviewed by Darin
+
+ Fix for this bug:
+
+ <rdar://problem/3805594> REGRESSION (Mail): Second return key stroke does not work when first was in blockquote
+
+ * khtml/xml/dom_selection.cpp:
+ (DOM::Selection::toRange): Code to convert caret positions moved the position upstream
+ before making a range-compliant position, but erroneously would allow the position
+ to cross blocks. Now it will no longer do so.
+
2004-09-16 Richard Williamson <rjw@apple.com>
Part 1 of the feature requested in
}
</style>
+
Part 2 will determine the appropriate regions.
Reviewed by Chris.
// If the selection is a caret, move the range start upstream. This helps us match
// the conventions of text editors tested, which make style determinations based
// on the character before the caret, if any.
- s = start().upstream().equivalentRangeCompliantPosition();
+ s = start().upstream(StayInBlock).equivalentRangeCompliantPosition();
e = s;
}
else {
// If the selection is a caret, move the range start upstream. This helps us match
// the conventions of text editors tested, which make style determinations based
// on the character before the caret, if any.
- s = start().upstream().equivalentRangeCompliantPosition();
+ s = start().upstream(StayInBlock).equivalentRangeCompliantPosition();
e = s;
}
else {
// If the selection is a caret, move the range start upstream. This helps us match
// the conventions of text editors tested, which make style determinations based
// on the character before the caret, if any.
- s = start().upstream().equivalentRangeCompliantPosition();
+ s = start().upstream(StayInBlock).equivalentRangeCompliantPosition();
e = s;
}
else {