+2006-07-18 Mitz Pettel <opendarwin.org@mitzpettel.com>
+
+ Reviewed by Justin.
+
+ - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9978
+ REGRESSION (r12949-r12988): Clicking the first letter on a line places the caret at the end of the previous line
+
+ * editing/selection/click-start-of-line-expected.checksum: Added.
+ * editing/selection/click-start-of-line-expected.png: Added.
+ * editing/selection/click-start-of-line-expected.txt: Added.
+ * editing/selection/click-start-of-line.html: Added.
+
2006-07-18 Anders Carlsson <acarlsson@apple.com>
Reviewed by Darin.
--- /dev/null
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 10 of #text > DIV > BODY > HTML > #document to 10 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+layer at (0,0) size 800x600
+ RenderView 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 {P} at (0,0) size 784x36
+ RenderText {#text} at (0,0) size 104x18
+ text run at (0,0) width 104: "This is a test for "
+ RenderInline {I} at (0,0) size 776x36
+ RenderInline {A} at (0,0) size 348x18 [color=#0000EE]
+ RenderText {#text} at (104,0) size 348x18
+ text run at (104,0) width 348: "http://bugzilla.opendarwin.org/show_bug.cgi?id=9978"
+ RenderText {#text} at (452,0) size 776x36
+ text run at (452,0) width 4: " "
+ text run at (456,0) width 320: "REGRESSION (r12949-r12988): Clicking the first"
+ text run at (0,18) width 384: "letter on a line places the caret at the end of the previous line"
+ RenderText {#text} at (384,18) size 4x18
+ text run at (384,18) width 4: "."
+ RenderBlock {P} at (0,52) size 784x18
+ RenderText {#text} at (0,0) size 730x18
+ text run at (0,0) width 551: "To test interactively, click the left side of the W on the second line. The caret should be "
+ text run at (551,0) width 179: "move to the start of that line."
+ RenderBlock {HR} at (0,86) size 784x2 [border: (1px inset #000000)]
+ RenderBlock {DIV} at (0,96) size 250x110
+ RenderText {#text} at (0,0) size 236x110
+ text run at (0,0) width 164: "Alice in "
+ text run at (0,55) width 236: "Wonderland"
+caret: position 10 of child 0 {#text} of child 7 {DIV} of child 1 {BODY} of child 0 {HTML} of document
--- /dev/null
+<html>
+<head>
+
+<script>
+
+function editingTest() {
+ var target = document.getElementById("test");
+
+ x = target.offsetLeft + 10;
+ y = target.offsetTop + target.offsetHeight - 10;
+
+ eventSender.mouseMoveTo(x, y);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+}
+
+</script>
+</head>
+<body>
+<p>
+ This is a test for <i><a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=9978">http://bugzilla.opendarwin.org/show_bug.cgi?id=9978</a>
+ REGRESSION (r12949-r12988): Clicking the first letter on a line places the caret at the end of the previous line</i>.
+</p>
+<p>
+ To test interactively, click the left side of the W on the second line. The caret should be
+ move to the start of that line.
+</p>
+<hr>
+<div contenteditable id="test" style="font-size: 48; width: 250px;">
+Alice in Wonderland
+</div>
+<script>
+editingTest();
+</script>
+</html>
+2006-07-18 Mitz Pettel <opendarwin.org@mitzpettel.com>
+
+ Reviewed by Justin.
+
+ - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9978
+ REGRESSION (r12949-r12988): Clicking the first letter on a line places the caret at the end of the previous line
+
+ Test: editing/selection/click-start-of-line.html
+
+ * rendering/RenderText.cpp:
+ (WebCore::RenderText::positionForCoordinates): Changed to return downstream
+ affinity if the x coordinate is to the left of the middle of the first character
+ in the text box.
+
2006-07-18 Anders Carlsson <acarlsson@apple.com>
Reviewed by Darin.