[webkit-changes] cvs commit: LayoutTests/editing/inserting
editing-empty-divs-expected.checksum editing-empty-divs-expected.png
editing-empty-divs-expected.txt editing-empty-divs.html
Justin
justing at opensource.apple.com
Fri Dec 2 01:00:52 PST 2005
justing 05/12/02 01:00:52
Modified: . ChangeLog
editing/deleting delete-3775172-fix-expected.txt
Added: editing/inserting editing-empty-divs-expected.checksum
editing-empty-divs-expected.png
editing-empty-divs-expected.txt
editing-empty-divs.html
Log:
Reviewed by justin
Updated/added tests for:
<http://bugzilla.opendarwin.org/show_bug.cgi?id=4003>
contentEditable div cannot be edited if it starts out with empty or <p/>
* editing/deleting/delete-3775172-fix-expected.txt: Fixed.
* editing/inserting/editing-empty-divs-expected.checksum: Added.
* editing/inserting/editing-empty-divs-expected.png: Added.
* editing/inserting/editing-empty-divs-expected.txt: Added.
* editing/inserting/editing-empty-divs.html: Added.
Revision Changes Path
1.120 +14 -0 LayoutTests/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/LayoutTests/ChangeLog,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -r1.119 -r1.120
--- ChangeLog 1 Dec 2005 23:45:12 -0000 1.119
+++ ChangeLog 2 Dec 2005 09:00:50 -0000 1.120
@@ -1,3 +1,17 @@
+2005-12-01 Graham Dennis <Graham.Dennis at gmail.com>
+
+ Reviewed by justin
+
+ Updated/added tests for:
+ <http://bugzilla.opendarwin.org/show_bug.cgi?id=4003>
+ contentEditable div cannot be edited if it starts out with empty or <p/>
+
+ * editing/deleting/delete-3775172-fix-expected.txt: Fixed.
+ * editing/inserting/editing-empty-divs-expected.checksum: Added.
+ * editing/inserting/editing-empty-divs-expected.png: Added.
+ * editing/inserting/editing-empty-divs-expected.txt: Added.
+ * editing/inserting/editing-empty-divs.html: Added.
+
2005-12-01 Adele Peterson <adele at apple.com>
Added test for <rdar://problem/4356771> Regression: Mail always scrolls to the bottom of a message when replying/forwarding
1.12 +7 -5 LayoutTests/editing/deleting/delete-3775172-fix-expected.txt
Index: delete-3775172-fix-expected.txt
===================================================================
RCS file: /cvs/root/LayoutTests/editing/deleting/delete-3775172-fix-expected.txt,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- delete-3775172-fix-expected.txt 17 Nov 2005 01:04:51 -0000 1.11
+++ delete-3775172-fix-expected.txt 2 Dec 2005 09:00:51 -0000 1.12
@@ -1,8 +1,8 @@
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of BODY > HTML > #document to 0 of BODY > HTML > #document toDOMRange:range from 1 of #text > BODY > HTML > #document to 1 of #text > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text to 1 of #text toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text to 1 of #text toDOMRange:range from 0 of BODY > HTML > #document to 0 of BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
layer at (0,0) size 800x600
@@ -10,6 +10,8 @@
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 784x18
- RenderBR {BR} at (0,0) size 0x18
-caret: position 0 of child 0 {BR} of child 1 {DIV} of child 1 {BODY} of child 0 {HTML} of document
+ RenderBlock (anonymous) at (0,0) size 784x0
+ RenderBlock {DIV} at (0,0) size 784x0
+ RenderInline {SPAN} at (0,0) size 0x0
+ RenderText {TEXT} at (0,0) size 0x0
+caret: position 0 of child 1 {BODY} of child 0 {HTML} of document
1.1 LayoutTests/editing/inserting/editing-empty-divs-expected.checksum
Index: editing-empty-divs-expected.checksum
===================================================================
aec0ed73646b9acc6e3419a04ea9a482
1.1 LayoutTests/editing/inserting/editing-empty-divs-expected.png
<<Binary file>>
1.1 LayoutTests/editing/inserting/editing-empty-divs-expected.txt
Index: editing-empty-divs-expected.txt
===================================================================
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of P > DIV > BODY > HTML > #document to 0 of P > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > P > DIV > BODY > HTML > #document to 1 of #text > P > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
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 {P} at (0,0) size 784x36
RenderText {TEXT} at (0,0) size 772x36
text run at (0,0) width 562: "This tests the ability to start editing in blocks that are visible, but have little or no content. "
text run at (562,0) width 210: "Each of the divs below should be"
text run at (0,18) width 135: "able to accept a caret."
RenderBlock {P} at (0,52) size 784x18
RenderText {TEXT} at (0,0) size 176x18
text run at (0,0) width 176: "This div contains some text."
RenderBlock {DIV} at (0,86) size 707x22 [border: (1px dotted #0000FF)]
RenderText {TEXT} at (1,1) size 42x18
text run at (1,1) width 42: " chello"
RenderBlock {P} at (0,124) size 784x18
RenderText {TEXT} at (0,0) size 186x18
text run at (0,0) width 186: "This div is completely empty."
RenderBlock {DIV} at (0,158) size 707x22 [border: (1px dotted #0000FF)]
RenderText {TEXT} at (1,1) size 7x18
text run at (1,1) width 7: "c"
RenderBlock {P} at (0,196) size 784x18
RenderText {TEXT} at (0,0) size 340x18
text run at (0,0) width 340: "This div contains some collapsable whitespace (a '\\n')."
RenderBlock {DIV} at (0,230) size 707x22 [border: (1px dotted #0000FF)]
RenderText {TEXT} at (1,1) size 7x18
text run at (1,1) width 7: "c"
RenderBlock {P} at (0,268) size 784x18
RenderText {TEXT} at (0,0) size 234x18
text run at (0,0) width 234: "This div contains a self-closing p tag."
RenderBlock {DIV} at (0,302) size 707x52 [border: (1px dotted #0000FF)]
RenderBlock {P} at (1,17) size 705x18
RenderText {TEXT} at (0,0) size 7x18
text run at (0,0) width 7: "c"
RenderBlock {P} at (0,370) size 784x18
RenderText {TEXT} at (0,0) size 720x18
text run at (0,0) width 720: "This div contains a self-closing p tag and some collapsable whitespace (two '\\n's before and after the self closing p."
RenderBlock {DIV} at (0,404) size 707x36 [border: (1px dotted #0000FF)]
RenderBlock (anonymous) at (1,1) size 705x18
RenderText {TEXT} at (0,0) size 7x18
text run at (0,0) width 7: "c"
RenderBlock {P} at (1,35) size 705x0
caret: position 1 of child 0 {TEXT} of child 21 {DIV} of child 3 {BODY} of child 0 {HTML} of document
1.1 LayoutTests/editing/inserting/editing-empty-divs.html
Index: editing-empty-divs.html
===================================================================
<html>
<head>
<script>
</script>
</head>
<style>
div {
border: 1px dotted blue;
min-height: 20px;
width: 90%;
}
</style>
<script>
function foo() {
var selection = window.getSelection();
var bar = 1;
var divs = document.getElementsByTagName("div");
for (var i = 0; divs[i]; i++) {
selection.setPosition(divs[i], 0);
document.execCommand("InsertText", false, 'c');
}
}
</script>
<body onload="foo()">
<p>This tests the ability to start editing in blocks that are visible, but have little or no content. Each of the divs below should be able to accept a caret.</p>
<p>This div contains some text.</p>
<div contentEditable="true">
hello
</div>
<p>This div is completely empty.</p>
<div contentEditable="true"></div>
<p>This div contains some collapsable whitespace (a '\n').</p>
<div contentEditable="true">
</div>
<p>This div contains a self-closing p tag.</p>
<div contentEditable="true"><p /></div>
<p>This div contains a self-closing p tag and some collapsable whitespace (two '\n's before and after the self closing p.</p>
<div contentEditable="true">
<p />
</div>
</body>
</html>
More information about the webkit-changes
mailing list