--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {DIV} at (0,0) size 784x184 [border: (2px solid #0000FF)]
+ RenderBlock {DIV} at (14,14) size 756x84
+ RenderText {TEXT} at (0,0) size 67x28
+ text run at (0,0) width 67: "Tests: "
+ RenderBR {BR} at (0,0) size 0x0
+ RenderText {TEXT} at (0,28) size 113x28
+ text run at (0,28) width 113: "Bug fix for "
+ RenderInline {A} at (0,0) size 260x28 [color=#0000EE]
+ RenderText {TEXT} at (113,28) size 260x28
+ text run at (113,28) width 260: "<rdar://problem/3998892>"
+ RenderText {TEXT} at (373,28) size 698x56
+ text run at (373,28) width 325: " REGRESSION (Mail): bolding a"
+ text run at (0,56) width 93: "selection "
+ text run at (93,56) width 551: "from end of line changes unselected text on starting line."
+ RenderBlock {DIV} at (14,114) size 756x56
+ RenderText {TEXT} at (0,0) size 189x28
+ text run at (0,0) width 189: "Expected Results: "
+ RenderBR {BR} at (0,0) size 0x0
+ RenderText {TEXT} at (0,28) size 604x28
+ text run at (0,28) width 604: "Should see first line (\"foo\") not bold; second line (\"bar\") bold."
+ RenderBlock {DIV} at (0,208) size 784x60
+ RenderBlock {DIV} at (0,0) size 784x60 [border: (2px solid #FF0000)]
+ RenderBlock {DIV} at (2,2) size 780x28
+ RenderText {TEXT} at (0,0) size 32x28
+ text run at (0,0) width 32: "foo"
+ RenderBlock {DIV} at (2,30) size 780x28
+ RenderInline {B} at (0,0) size 36x28
+ RenderText {TEXT} at (0,0) size 36x28
+ text run at (0,0) width 36: "bar"
+selection is RANGE:
+start: position 3 of child 1 {TEXT} of child 2 {DIV} of child 1 {DIV} of root {DIV}
+upstream: position 3 of child 1 {TEXT} of child 2 {DIV} of child 1 {DIV} of root {DIV}
+downstream: position 3 of child 1 {TEXT} of child 2 {DIV} of child 1 {DIV} of root {DIV}
+end: position 3 of child 1 {TEXT} of child 1 {B} of child 4 {DIV} of child 1 {DIV} of root {DIV}
+upstream: position 3 of child 1 {TEXT} of child 1 {B} of child 4 {DIV} of child 1 {DIV} of root {DIV}
+downstream: position 3 of child 1 {TEXT} of child 1 {B} of child 4 {DIV} of child 1 {DIV} of root {DIV}
--- /dev/null
+<html>
+<head>
+
+<style>
+.editing {
+ border: 2px solid red;
+ font-size: 24px;
+}
+.explanation {
+ border: 2px solid blue;
+ padding: 12px;
+ font-size: 24px;
+ margin-bottom: 24px;
+}
+.scenario { margin-bottom: 16px;}
+.scenario:first-line { font-weight: bold; margin-bottom: 16px;}
+.expected-results:first-line { font-weight: bold }
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ for (i = 0; i < 3; i++)
+ moveSelectionForwardByCharacterCommand();
+ extendSelectionForwardByLineCommand();
+ boldCommand();
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body>
+
+<div class="explanation">
+<div class="scenario">
+Tests:
+<br>
+Bug fix for <a href="rdar://problem/3998892"><rdar://problem/3998892></a> REGRESSION (Mail): bolding a selection
+from end of line changes unselected text on starting line.
+</div>
+<div class="expected-results">
+Expected Results:
+<br>
+Should see first line ("foo") not bold; second line ("bar") bold.
+</div>
+</div>
+
+<div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
+<div id="test" class="editing">
+<div>foo</div>
+<div>bar</div>
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
+2005-02-17 Ken Kocienda <kocienda@apple.com>
+
+ Reviewed by Hyatt
+
+ Fix for this bug:
+
+ The styling code did not move to the next node when the starting position was
+ at the last offset of a node. Instead, it styled it. Clearly wrong. Solution
+ is to borrow a check from the delete algorithm. Though I call caretMaxOffset(),
+ which I consider deprecated, it is still the simplest and most strightforward
+ way to ask the right question for this kind of problem.
+
+ * khtml/editing/htmlediting.cpp:
+ (khtml::ApplyStyleCommand::applyInlineStyle): Fixed, as described above.
+ * layout-tests/editing/style/style-3998892-fix-expected.txt: Added.
+ * layout-tests/editing/style/style-3998892-fix.html: Added.
+
2005-02-16 Chris Blumenberg <cblu@apple.com>
Fixed: <rdar://problem/3954842> Forward/reply to an HTML email can result in nothing (in cases with <link> tags for CSS)