RESOLVED FIXED 23369
Styling a selection that ends in a line break can sometimes style what's after the break
https://bugs.webkit.org/show_bug.cgi?id=23369
Summary Styling a selection that ends in a line break can sometimes style what's afte...
Justin Garcia
Reported 2009-01-15 17:06:43 PST
Launch Mail Reply to a message Place the caret in the middle of a line of quoted text Hit return Type something Triple click the previous line of text (the quoted line) Bold The unquoted line, that wasn't selected, becomes Bold. <rdar://problem/6444148> Styling a selection that ends in a line break can sometimes style what's after the break
Attachments
patch (7.19 KB, patch)
2009-01-15 17:07 PST, Justin Garcia
oliver: review+
Justin Garcia
Comment 1 2009-01-15 17:07:15 PST
Oliver Hunt
Comment 2 2009-01-15 17:32:28 PST
Comment on attachment 26777 [details] patch r=me, i hate editing code :D
Eric Seidel (no email)
Comment 3 2009-01-15 17:32:43 PST
Comment on attachment 26777 [details] patch This looks sane enough to me. If you feel this needs a review from someone more experienced in this code, I suggest you get one, because I can't promise I understand all the nuances of this change, but it looks sane to me.
Justin Garcia
Comment 4 2009-01-15 18:06:55 PST
I think that the confusing part of the patch is the changes to caretMaxOffset, or maybe it's existence altogether is confusing. It kind of represents two different concepts, and perhaps it should be two separate functions. One pertains only to text nodes, and is the value that ignores unrendered text at the end of text nodes. There's no such thing as unrendered content at the end of non-text nodes, so for those, caretMaxOffset gives us the last offset for the purposes of editing. The number of children for containers, 1 for <hr> and <br>s, etc., i.e. maxDeepOffset.
Justin Garcia
Comment 5 2009-01-15 18:16:17 PST
Note You need to log in before you can comment on or make changes to this bug.