[webkit-changes] cvs commit: LayoutTests/editing/input
firstrectforcharacterrange-plain-expected.txt
firstrectforcharacterrange-plain.html
firstrectforcharacterrange-styled-expected.txt
firstrectforcharacterrange-styled.html
Justin
justing at opensource.apple.com
Tue Dec 20 18:06:19 PST 2005
justing 05/12/20 18:06:19
Modified: . ChangeLog
Added: editing/input firstrectforcharacterrange-plain-expected.txt
firstrectforcharacterrange-plain.html
firstrectforcharacterrange-styled-expected.txt
firstrectforcharacterrange-styled.html
Log:
Reviewed by justin
New layout tests for:
<http://bugzilla.opendarwin.org/show_bug.cgi?id=4682>
-[WebHTMLView firstRectForCharacterRange:] is using _selectedRange instead of the given range if no marked text
* editing/input/firstrectforcharacterrange-plain-expected.txt: Added.
* editing/input/firstrectforcharacterrange-plain.html: Added.
* editing/input/firstrectforcharacterrange-styled-expected.txt: Added.
* editing/input/firstrectforcharacterrange-styled.html: Added.
Revision Changes Path
1.175 +13 -0 LayoutTests/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/LayoutTests/ChangeLog,v
retrieving revision 1.174
retrieving revision 1.175
diff -u -r1.174 -r1.175
--- ChangeLog 21 Dec 2005 00:23:51 -0000 1.174
+++ ChangeLog 21 Dec 2005 02:06:17 -0000 1.175
@@ -1,5 +1,18 @@
2005-12-20 Justin Garcia <justin.garcia at apple.com>
+ Reviewed by justin
+
+ New layout tests for:
+ <http://bugzilla.opendarwin.org/show_bug.cgi?id=4682>
+ -[WebHTMLView firstRectForCharacterRange:] is using _selectedRange instead of the given range if no marked text
+
+ * editing/input/firstrectforcharacterrange-plain-expected.txt: Added.
+ * editing/input/firstrectforcharacterrange-plain.html: Added.
+ * editing/input/firstrectforcharacterrange-styled-expected.txt: Added.
+ * editing/input/firstrectforcharacterrange-styled.html: Added.
+
+2005-12-20 Justin Garcia <justin.garcia at apple.com>
+
Reviewed by darin
Layout test for:
1.1 LayoutTests/editing/input/firstrectforcharacterrange-plain-expected.txt
Index: firstrectforcharacterrange-plain-expected.txt
===================================================================
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
123456
10,572,0,18
18,572,0,18
58,572,0,18
58,572,0,18
10,572,8,18
50,572,8,18
50,572,8,18
50,572,8,18
10,572,48,18
10,572,48,18
10,572,48,18
18,572,40,18
0,0,0,0
0,0,0,0
0,0,0,0
0,0,0,0
1.1 LayoutTests/editing/input/firstrectforcharacterrange-plain.html
Index: firstrectforcharacterrange-plain.html
===================================================================
<html>
<head>
<style>
body { margin: 10; padding: 0 }
</style>
</head>
<body contenteditable>
123456
<script type="text/javascript">
var console_messages = document.createElement("ol");
function log(message)
{
var item = document.createElement("li");
item.appendChild(document.createTextNode(message));
console_messages.appendChild(item);
}
if (window.layoutTestController) {
try {
layoutTestController.dumpAsText();
window.getSelection().setPosition(document.body, 0);
log(textInputController.firstRectForCharacterRange(0, 0)); // caret at the beginning
log(textInputController.firstRectForCharacterRange(1, 0)); // caret after the first character
log(textInputController.firstRectForCharacterRange(6, 0)); // caret at the end of line
log(textInputController.firstRectForCharacterRange(6, 100)); // -"-
log(textInputController.firstRectForCharacterRange(0, 1)); // first character
log(textInputController.firstRectForCharacterRange(5, 1)); // last character
log(textInputController.firstRectForCharacterRange(5, 2)); // -"-
log(textInputController.firstRectForCharacterRange(5, 100)); // -"-
log(textInputController.firstRectForCharacterRange(0, 6)); // first line
log(textInputController.firstRectForCharacterRange(0, 7)); // -"-
log(textInputController.firstRectForCharacterRange(0, 4294967295)); // -"-
log(textInputController.firstRectForCharacterRange(1, 4294967295)); // first line without the first character
log(textInputController.firstRectForCharacterRange(7, 0)); // out of bounds, should be zero rect
log(textInputController.firstRectForCharacterRange(1000, 0)); // -"-
log(textInputController.firstRectForCharacterRange(7, 1)); // -"-
log(textInputController.firstRectForCharacterRange(7, 4294967295)); // -"-
} catch (ex) {
log("Exception: " + ex.description);
}
var console = document.createElement("p");
console.appendChild(console_messages);
document.body.appendChild(console);
} else {
document.write("(cannot run interactively)");
}
</script>
</body>
</html>
1.1 LayoutTests/editing/input/firstrectforcharacterrange-styled-expected.txt
Index: firstrectforcharacterrange-styled-expected.txt
===================================================================
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > I > B > BODY > HTML > #document to 1 of #text > I > B > BODY > HTML > #document toDOMRange:range from 1 of #text > I > B > BODY > HTML > #document to 3 of #text > I > B > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
123456
10,572,0,18
18,572,0,18
58,572,0,18
58,572,0,18
10,572,8,18
50,572,8,18
50,572,8,18
50,572,8,18
10,572,48,18
10,572,48,18
10,572,48,18
18,572,40,18
0,0,0,0
0,0,0,0
0,0,0,0
0,0,0,0
1.1 LayoutTests/editing/input/firstrectforcharacterrange-styled.html
Index: firstrectforcharacterrange-styled.html
===================================================================
<html>
<head>
<style>
body { margin: 10; padding: 0 }
</style>
</head>
<body contenteditable>
12<b>3<i>4</i></b>
<script type="text/javascript">
var console_messages = document.createElement("ol");
function log(message)
{
var item = document.createElement("li");
item.appendChild(document.createTextNode(message));
console_messages.appendChild(item);
}
if (window.layoutTestController) {
try {
layoutTestController.dumpAsText();
window.getSelection().setPosition(document.body, 4);
textInputController.setMarkedText("56", 0, 1);
log(textInputController.firstRectForCharacterRange(0, 0)); // caret at the beginning
log(textInputController.firstRectForCharacterRange(1, 0)); // caret after the first character
log(textInputController.firstRectForCharacterRange(6, 0)); // caret at the end of line
log(textInputController.firstRectForCharacterRange(6, 100)); // -"-
log(textInputController.firstRectForCharacterRange(0, 1)); // first character
log(textInputController.firstRectForCharacterRange(5, 1)); // last character
log(textInputController.firstRectForCharacterRange(5, 2)); // -"-
log(textInputController.firstRectForCharacterRange(5, 100)); // -"-
log(textInputController.firstRectForCharacterRange(0, 6)); // first line
log(textInputController.firstRectForCharacterRange(0, 7)); // -"-
log(textInputController.firstRectForCharacterRange(0, 4294967295)); // -"-
log(textInputController.firstRectForCharacterRange(1, 4294967295)); // first line without the first character
log(textInputController.firstRectForCharacterRange(7, 0)); // out of bounds, should be zero rect
log(textInputController.firstRectForCharacterRange(1000, 0)); // -"-
log(textInputController.firstRectForCharacterRange(7, 1)); // -"-
log(textInputController.firstRectForCharacterRange(7, 4294967295)); // -"-
} catch (ex) {
log("Exception: " + ex.description);
}
var console = document.createElement("p");
console.appendChild(console_messages);
document.body.appendChild(console);
} else {
document.write("(cannot run interactively)");
}
</script>
</body>
</html>
More information about the webkit-changes
mailing list