[webkit-changes] cvs commit: LayoutTests/fast/forms
attributed-strings-expected.txt attributed-strings.html
Geoffrey
ggaren at opensource.apple.com
Thu Oct 27 15:49:56 PDT 2005
ggaren 05/10/27 15:49:56
Modified: . ChangeLog
Added: fast/forms attributed-strings-expected.txt
attributed-strings.html
Log:
Layout test included with http://bugzilla.opendarwin.org/show_bug.cgi?id=5303
TextInputController should support attributed strings
* fast/forms/attributed-strings-expected.txt: Added.
* fast/forms/attributed-strings.html: Added.
Revision Changes Path
1.62 +8 -0 LayoutTests/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/LayoutTests/ChangeLog,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- ChangeLog 27 Oct 2005 22:42:31 -0000 1.61
+++ ChangeLog 27 Oct 2005 22:49:55 -0000 1.62
@@ -1,3 +1,11 @@
+2005-10-27 Geoffrey Garen <ggaren at apple.com>
+
+ Layout test included with http://bugzilla.opendarwin.org/show_bug.cgi?id=5303
+ TextInputController should support attributed strings
+
+ * fast/forms/attributed-strings-expected.txt: Added.
+ * fast/forms/attributed-strings.html: Added.
+
2005-10-27 Eric Seidel <eseidel at apple.com>
Reviewed by darin.
1.1 LayoutTests/fast/forms/attributed-strings-expected.txt
Index: attributed-strings-expected.txt
===================================================================
EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldInsertText:test replacingDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document givenAction:WebViewInsertActionTyped
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 4 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
test
test{}
4
test
4
test
NSForegroundColor,NSToolTip,NSFont,NSObliqueness
NSToolTip,NSForegroundColor,NSFont
0.5
undefined
undefined
NSDeviceRGBColorSpace 1 0.5 1 0.5
1.1 LayoutTests/fast/forms/attributed-strings.html
Index: attributed-strings.html
===================================================================
<html>
<head>
<style>
body { margin: 0; padding: 0 }
</style>
</head>
<body>
<div contenteditable>FAILURE</div>
<p id="console"></p>
<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();
var substr = textInputController.attributedSubstringFromRange(0, 2);
// log(substr); -- attributedSubstringFromRange is not implemented in WebKit yet
var attrString = textInputController.makeAttributedString("test");
log(attrString);
log(attrString.length());
log(attrString.string());
attrString.addAttribute("NSToolTip", "Tool Tip");
attrString.addFontAttribute("NSFont", "Monaco", 14);
attrString.addColorAttribute("NSForegroundColor", 1, 1, 1, 0.5);
attrString.addFontAttributeForRange("NSFont", "Monaco", 12, 0, 2);
attrString.addColorAttributeForRange("NSForegroundColor", 1, 0.5, 1, 0.5, 0, 2);
attrString.addAttributeForRange("NSObliqueness", 0.5, 0, 2);
log(attrString.length());
log(attrString.string());
log(attrString.getAttributeNamesAtIndex(0));
log(attrString.getAttributeNamesAtIndex(3));
log(attrString.getAttributeValueAtIndex("NSObliqueness", 0));
log(attrString.getAttributeValueAtIndex("NSObliqueness", 3));
log(attrString.getAttributeValueAtIndex("NSObliqueness", 10));
log(attrString.getAttributeValueAtIndex("NSForegroundColor", 1));
document.execCommand("SelectAll");
textInputController.insertText(attrString);
} catch (ex) {
document.write("Exception: " + ex.description);
}
document.getElementById("console").appendChild(console_messages);
} else {
document.write("(cannot run interactively)");
}
</script>
</body>
</html>
More information about the webkit-changes
mailing list