+2006-06-30 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by harrison
+
+ Added:
+ * editing/selection/skip-non-editable-1-expected.txt: Added.
+ * editing/selection/skip-non-editable-1.html: Added.
+ * editing/selection/skip-non-editable-2-expected.txt: Added.
+ * editing/selection/skip-non-editable-2.html: Added.
+
+ Equivalent render tree:
+ * editing/execCommand/format-block-with-braces-expected.txt:
+
+ Fixes:
+ * editing/selection/iframe-expected.checksum:
+ * editing/selection/iframe-expected.png:
+ * editing/selection/iframe-expected.txt:
+ * editing/selection/inline-table-expected.checksum:
+ * editing/selection/inline-table-expected.png:
+ * editing/selection/inline-table-expected.txt:
+ * editing/selection/move-between-blocks-no-001-expected.checksum:
+ * editing/selection/move-between-blocks-no-001-expected.png:
+ * editing/selection/move-between-blocks-no-001-expected.txt:
+ * editing/selection/select-box-expected.checksum:
+ * editing/selection/select-box-expected.png:
+ * editing/selection/select-box-expected.txt:
+
2006-06-30 David Kilzer <ddkilzer@kilzer.net>
Reviewed by Darin.
text run at (0,0) width 156: "Format Me"
RenderBlock (anonymous) at (0,115) size 784x0
RenderInline {DIV} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
caret: position 0 of child 0 {#text} of child 0 {DIV} of child 0 {H1} of child 4 {DIV} of child 0 {BODY} of child 0 {HTML} of document
-869fa4c8c0258388b1acb0f5ec1e356a
\ No newline at end of file
+6950bf936f869b9c32342977c0ef82ee
\ No newline at end of file
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
text run at (212,62) width 67: "The End..."
RenderText {#text} at (450,188) size 66x18
text run at (450,188) width 66: " the end ..."
-caret: position 127 of child 0 {#text} of child 1 {P} of child 1 {BODY} of child 0 {HTML} of document
+caret: position 1 of child 0 {#text} of child 1 {DIV} of child 3 {DIV} of child 1 {BODY} of child 0 {HTML} of document
-ef501de743d6e9546b6bf6b2fa0de46f
\ No newline at end of file
+864af36d8ec3cff54652542133dcb86d
\ No newline at end of file
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
text run at (2,2) width 31: "Nine"
RenderText {#text} at (212,62) size 67x18
text run at (212,62) width 67: "The End..."
-caret: position 266 of child 0 {#text} of child 1 {P} of child 1 {BODY} of child 0 {HTML} of document
+caret: position 1 of child 0 {#text} of child 1 {DIV} of child 3 {DIV} of child 1 {BODY} of child 0 {HTML} of document
-493bb88b937eeb7a0ae543fc0bc47552
\ No newline at end of file
+b6d919f37e95762718c1cdc6fabd99f8
\ No newline at end of file
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldEndEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document
-EDITING DELEGATE: webViewDidEndEditing:WebViewDidEndEditingNotification
-EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document
-EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 10 of #text > DIV > BODY > HTML > #document to 10 of #text > DIV > BODY > HTML > #document toDOMRange:range from 9 of #text > DIV > BODY > HTML > #document to 9 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 39 of #text > SPAN > DIV > BODY > HTML > #document to 39 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 39 of #text > SPAN > DIV > BODY > HTML > #document to 39 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 9 of #text > DIV > BODY > HTML > #document to 9 of #text > DIV > BODY > HTML > #document toDOMRange:range from 8 of #text > DIV > BODY > HTML > #document to 8 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 38 of #text > SPAN > DIV > BODY > HTML > #document to 38 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 38 of #text > SPAN > DIV > BODY > HTML > #document to 38 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 8 of #text > DIV > BODY > HTML > #document to 8 of #text > DIV > BODY > HTML > #document toDOMRange:range from 7 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 37 of #text > SPAN > DIV > BODY > HTML > #document to 37 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 37 of #text > SPAN > DIV > BODY > HTML > #document to 37 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document toDOMRange:range from 6 of #text > DIV > BODY > HTML > #document to 6 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 36 of #text > SPAN > DIV > BODY > HTML > #document to 36 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 36 of #text > SPAN > DIV > BODY > HTML > #document to 36 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 6 of #text > DIV > BODY > HTML > #document to 6 of #text > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 35 of #text > SPAN > DIV > BODY > HTML > #document to 35 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 35 of #text > SPAN > DIV > BODY > HTML > #document to 35 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 4 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 34 of #text > SPAN > DIV > BODY > HTML > #document to 34 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 34 of #text > SPAN > DIV > BODY > HTML > #document to 34 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 4 of #text > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 33 of #text > SPAN > DIV > BODY > HTML > #document to 33 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 33 of #text > SPAN > DIV > BODY > HTML > #document to 33 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 3 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: shouldChangeSelectedDOMRange:range from 32 of #text > SPAN > DIV > BODY > HTML > #document to 32 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 32 of #text > SPAN > DIV > BODY > HTML > #document to 32 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document 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 31 of #text > SPAN > DIV > BODY > HTML > #document to 31 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 31 of #text > SPAN > DIV > BODY > HTML > #document to 31 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document 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 30 of #text > SPAN > DIV > BODY > HTML > #document to 30 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 30 of #text > SPAN > DIV > BODY > HTML > #document to 30 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document 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 29 of #text > SPAN > DIV > BODY > HTML > #document to 29 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 29 of #text > SPAN > DIV > BODY > HTML > #document to 29 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document 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 28 of #text > SPAN > DIV > BODY > HTML > #document to 28 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 28 of #text > SPAN > DIV > BODY > HTML > #document to 28 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document 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 27 of #text > SPAN > DIV > BODY > HTML > #document to 27 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 27 of #text > SPAN > DIV > BODY > HTML > #document to 27 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document 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 26 of #text > SPAN > DIV > BODY > HTML > #document to 26 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 26 of #text > SPAN > DIV > BODY > HTML > #document to 26 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document 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 25 of #text > SPAN > DIV > BODY > HTML > #document to 25 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 25 of #text > SPAN > DIV > BODY > HTML > #document to 25 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
layer at (0,0) size 800x600
RenderView 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 784x56 [border: (2px solid #FF0000)]
- RenderInline {SPAN} at (0,0) size 381x28
- RenderText {#text} at (14,14) size 381x28
- text run at (14,14) width 381: "We hold these truths to be self-evident,"
- RenderText {#text} at (0,0) size 0x0
+ RenderInline {SPAN} at (0,0) size 243x28
+ RenderText {#text} at (14,14) size 243x28
+ text run at (14,14) width 243: "We hold these truths to b"
RenderBlock {DIV} at (0,56) size 784x56 [border: (2px solid #FF0000)]
- RenderText {#text} at (14,14) size 244x28
- text run at (14,14) width 244: "men are created equal, ..."
-caret: position 0 of child 0 {#text} of child 4 {DIV} of child 1 {BODY} of child 0 {HTML} of document
+ RenderText {#text} at (14,14) size 318x28
+ text run at (14,14) width 318: "that all men are created equal, ..."
+caret: position 25 of child 0 {#text} of child 1 {SPAN} of child 2 {DIV} of child 1 {BODY} of child 0 {HTML} of document
-30983dba6d07c9f20fdfed0cd8bf72da
\ No newline at end of file
+ac836d92967ca91f8ae6bbb795d2d658
\ No newline at end of file
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
DeprecatedRenderSelect {SELECT} at (73,2) size 38x18
RenderText {#text} at (113,1) size 66x18
text run at (113,1) width 66: " the end ..."
-caret: position 89 of child 0 {#text} of child 1 {P} of child 1 {BODY} of child 0 {HTML} of document
+caret: position 1 of child 0 {#text} of child 1 {DIV} of child 3 {DIV} of child 1 {BODY} of child 0 {HTML} of document
--- /dev/null
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 13 of BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldEndEditingInDOMRange:range from 0 of BODY > HTML > #document to 13 of BODY > HTML > #document
+EDITING DELEGATE: webViewDidEndEditing:WebViewDidEndEditingNotification
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of TD > TR > TBODY > TABLE > BODY > HTML > #document to 1 of TD > TR > TBODY > TABLE > BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldEndEditingInDOMRange:range from 0 of TD > TR > TBODY > TABLE > BODY > HTML > #document to 1 of TD > TR > TBODY > TABLE > BODY > HTML > #document
+EDITING DELEGATE: webViewDidEndEditing:WebViewDidEndEditingNotification
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 13 of BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldEndEditingInDOMRange:range from 0 of BODY > HTML > #document to 13 of BODY > HTML > #document
+EDITING DELEGATE: webViewDidEndEditing:WebViewDidEndEditingNotification
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of TD > TR > TBODY > TABLE > BODY > HTML > #document to 1 of TD > TR > TBODY > TABLE > BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldEndEditingInDOMRange:range from 0 of TD > TR > TBODY > TABLE > BODY > HTML > #document to 1 of TD > TR > TBODY > TABLE > BODY > HTML > #document
+EDITING DELEGATE: webViewDidEndEditing:WebViewDidEndEditingNotification
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 13 of BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldEndEditingInDOMRange:range from 0 of BODY > HTML > #document to 13 of BODY > HTML > #document
+EDITING DELEGATE: webViewDidEndEditing:WebViewDidEndEditingNotification
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of TD > TR > TBODY > TABLE > BODY > HTML > #document to 1 of TD > TR > TBODY > TABLE > BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+This tests moving the caret in content of mixed editability. The caret should jump to the next editable region that shares a common editable ancestor when it reaches non-editable content.
+
+editable content
+non-editable content non-editable content editable content
+editable content
+Success
+Success
+Success
+Success
+
--- /dev/null
+<head>
+<style>
+table, td {
+ border: 1px solid #aaa;
+}
+</style>
+
+<script>
+function log(str) {
+ var li = document.createElement("li");
+ li.appendChild(document.createTextNode(str));
+ var console = document.getElementById("console");
+ console.appendChild(li);
+}
+
+function assert(bool) {
+ if (!bool)
+ log("Failure");
+ else
+ log("Success");
+}
+</script>
+</head>
+
+<body contentEditable="true">
+<p>This tests moving the caret in content of mixed editability. The caret should jump to the next editable region that shares a common editable ancestor when it reaches non-editable content.</p>
+<div id="e1">editable content</div>
+<table cellpadding="5" contentEditable="false">
+<tr>
+<td>non-editable content</td>
+<td>non-editable content</td>
+<td id="e2" contentEditable="true">editable content</td>
+</table>
+<div id="e3">editable content</div>
+
+<ul id="console"></ul>
+</body>
+
+<script>
+if (window.layoutTestController)
+ window.layoutTestController.dumpAsText();
+
+var s = window.getSelection();
+var e1 = document.getElementById("e1");
+var e2 = document.getElementById("e2");
+var e3 = document.getElementById("e3");
+
+s.setPosition(e1.firstChild, e1.firstChild.length);
+s.modify("move", "forward", "character");
+assert(s.anchorNode == e2.firstChild && s.anchorOffset == 0);
+
+s.modify("move", "backward", "character");
+assert(s.anchorNode == e1.firstChild && s.anchorOffset == e1.firstChild.length);
+
+s.setPosition(e2.firstChild, e2.firstChild.length);
+s.modify("move", "forward", "character");
+assert(s.anchorNode == e3.firstChild && s.anchorOffset == 0);
+
+s.modify("move", "backward", "character");
+assert(s.anchorNode == e2.firstChild && s.anchorOffset == e2.firstChild.length)
+</script>
\ No newline at end of file
--- /dev/null
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 11 of BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+This tests moving the caret in content of mixed editability. The caret should jump to the next editable region that shares a common editable ancestor when it reaches non-editable content.
+
+editablenoneditableeditable
+Success
+Success
+
--- /dev/null
+<head>
+<script>
+function log(str) {
+ var li = document.createElement("li");
+ li.appendChild(document.createTextNode(str));
+ var console = document.getElementById("console");
+ console.appendChild(li);
+}
+
+function assert(bool) {
+ if (!bool)
+ log("Failure");
+ else
+ log("Success");
+}
+</script>
+</head>
+
+<body contentEditable="true">
+<p>This tests moving the caret in content of mixed editability. The caret should jump to the next editable region that shares a common editable ancestor when it reaches non-editable content.</p>
+<span id="e1">editable</span><span id="e2" contentEditable="false" style="font-weight:bold">noneditable</span><span id="e3">editable</span>
+
+
+<ul id="console"></ul>
+</body>
+
+<script>
+if (window.layoutTestController)
+ window.layoutTestController.dumpAsText();
+
+var s = window.getSelection();
+var e1 = document.getElementById("e1");
+var e2 = document.getElementById("e2");
+var e3 = document.getElementById("e3");
+
+s.setPosition(e1.firstChild, e1.firstChild.length);
+s.modify("move", "forward", "character");
+assert(s.anchorNode == e3.firstChild && s.anchorOffset == 0);
+
+s.modify("move", "backward", "character");
+assert(s.anchorNode == e1.firstChild && s.anchorOffset == e1.firstChild.length);
+</script>
+2006-06-30 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by harrison
+
+ <rdar://problem/4598309
+ Caret gets stuck when it hits non editable content within an editable body
+ <http://bugzilla.opendarwin.org/show_bug.cgi?id=9510>
+ Caret will jump out of an editable region
+
+ * dom/Position.cpp:
+ (WebCore::Position::upstream): Don't move into a new editable region so that
+ candidates that that straddle an editable/non-editable boundary will
+ correspond to different VisiblePositions.
+ (WebCore::Position::downstream): Ditto.
+ * editing/SelectionController.cpp:
+ (WebCore::SelectionController::modifyMovingRightForward): Use VisiblePosition::next(true)
+ (WebCore::SelectionController::modifyMovingLeftBackward): Use VisiblePosition::previous(true)
+ * editing/VisiblePosition.cpp:
+ (WebCore::VisiblePosition::next): Added code to jump to the next editable region as long
+ as it has the same highest editable root.
+ (WebCore::VisiblePosition::previous): Ditto.
+ * editing/VisiblePosition.h:
+ * editing/htmlediting.cpp:
+ (WebCore::highestEditableRoot): Added, returns the highest editable root of a node if that
+ node is in editable content, otherwise 0.
+ * editing/htmlediting.h:
+
2006-06-30 David Kilzer <ddkilzer@kilzer.net>
Reviewed by Darin.
FAE04190097596C9000540BE /* SVGImageLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = FAE0418E097596C9000540BE /* SVGImageLoader.h */; };
/* End PBXBuildFile section */
+/* Begin PBXBuildStyle section */
+ D06749E30A54CE6D00DA0E29 /* Development */ = {
+ isa = PBXBuildStyle;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ };
+ name = Development;
+ };
+ D06749E40A54CE6D00DA0E29 /* Deployment */ = {
+ isa = PBXBuildStyle;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ };
+ name = Deployment;
+ };
+/* End PBXBuildStyle section */
+
/* Begin PBXContainerItemProxy section */
DD041FF009D9E3250010AF2A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
+ buildSettings = {
+ };
+ buildStyles = (
+ D06749E30A54CE6D00DA0E29 /* Development */,
+ D06749E40A54CE6D00DA0E29 /* Deployment */,
+ );
hasScannedForEncodings = 1;
knownRegions = (
English,
Node *block = startNode->enclosingBlockFlowOrTableElement();
Position lastVisible = *this;
Position currentPos = start;
+ Node* originalRoot = node()->rootEditableElement();
for (; !currentPos.atStart(); currentPos = currentPos.previous(UsingComposedCharacters)) {
Node *currentNode = currentPos.node();
int currentOffset = currentPos.offset();
+
+ if (currentNode->rootEditableElement() != originalRoot)
+ break;
// Don't enter a new enclosing block flow or table element. There is code below that
// terminates early if we're about to leave an enclosing block flow or table element.
Node *block = startNode->enclosingBlockFlowOrTableElement();
Position lastVisible = *this;
Position currentPos = start;
+ Node* originalRoot = node()->rootEditableElement();
for (; !currentPos.atEnd(); currentPos = currentPos.next(UsingComposedCharacters)) {
Node *currentNode = currentPos.node();
int currentOffset = currentPos.offset();
+
+ if (currentNode->rootEditableElement() != originalRoot)
+ break;
// stop before going above the body, up into the head
// return the last visible streamer position
VisiblePosition SelectionController::modifyMovingRightForward(TextGranularity granularity)
{
VisiblePosition pos;
+ // FIXME: Stay in editable content for the less common granularities.
switch (granularity) {
case CharacterGranularity:
if (isRange())
pos = VisiblePosition(m_sel.end(), m_sel.affinity());
else
- pos = VisiblePosition(m_sel.extent(), m_sel.affinity()).next();
+ pos = VisiblePosition(m_sel.extent(), m_sel.affinity()).next(true);
break;
case WordGranularity:
pos = nextWordPosition(VisiblePosition(m_sel.extent(), m_sel.affinity()));
VisiblePosition SelectionController::modifyMovingLeftBackward(TextGranularity granularity)
{
VisiblePosition pos;
+ // FIXME: Stay in editable content for the less common granularities.
switch (granularity) {
case CharacterGranularity:
if (isRange())
pos = VisiblePosition(m_sel.start(), m_sel.affinity());
else
- pos = VisiblePosition(m_sel.extent(), m_sel.affinity()).previous();
+ pos = VisiblePosition(m_sel.extent(), m_sel.affinity()).previous(true);
break;
case WordGranularity:
pos = previousWordPosition(VisiblePosition(m_sel.extent(), m_sel.affinity()));
m_affinity = DOWNSTREAM;
}
-VisiblePosition VisiblePosition::next(bool stayInCurrentEditableRegion) const
+VisiblePosition VisiblePosition::next(bool stayInEditableContent) const
{
VisiblePosition next(nextVisiblePosition(m_deepPosition), m_affinity);
- Element* currentRoot = rootEditableElement();
- return !stayInCurrentEditableRegion || next.rootEditableElement() == currentRoot ? next : VisiblePosition();
+
+ if (!stayInEditableContent || next.isNull())
+ return next;
+
+ Node* highestRoot = highestEditableRoot(deepEquivalent().node());
+
+ if (!next.deepEquivalent().node()->isAncestor(highestRoot))
+ return VisiblePosition();
+
+ if (highestEditableRoot(next.deepEquivalent().node()) == highestRoot)
+ return next;
+
+ Position p = next.deepEquivalent();
+ Node* node = p.node();
+ Node* child = node->childNode(p.offset());
+ node = child ? child : node->traverseNextSibling(highestRoot);
+
+ while (node && !node->isContentEditable())
+ node = node->traverseNextNode(highestRoot);
+
+ if (!node)
+ return VisiblePosition();
+
+ return VisiblePosition(Position(node, 0));
}
-VisiblePosition VisiblePosition::previous(bool stayInCurrentEditableRegion) const
+VisiblePosition VisiblePosition::previous(bool stayInEditableContent) const
{
// find first previous DOM position that is visible
Position pos = previousVisiblePosition(m_deepPosition);
if (pos.atStart())
return VisiblePosition();
- VisiblePosition result = VisiblePosition(pos, DOWNSTREAM);
- ASSERT(result != *this);
+ VisiblePosition prev = VisiblePosition(pos, DOWNSTREAM);
+ ASSERT(prev != *this);
#ifndef NDEBUG
// we should always be able to make the affinity DOWNSTREAM, because going previous from an
// UPSTREAM position can never yield another UPSTREAM position (unless line wrap length is 0!).
- if (result.isNotNull() && m_affinity == UPSTREAM) {
- VisiblePosition temp = result;
+ if (prev.isNotNull() && m_affinity == UPSTREAM) {
+ VisiblePosition temp = prev;
temp.setAffinity(UPSTREAM);
- ASSERT(inSameLine(temp, result));
+ ASSERT(inSameLine(temp, prev));
}
#endif
- Element* currentRoot = rootEditableElement();
- return !stayInCurrentEditableRegion || result.rootEditableElement() == currentRoot ? result : VisiblePosition();
+
+ if (!stayInEditableContent || prev.isNull())
+ return prev;
+
+ Node* highestRoot = highestEditableRoot(deepEquivalent().node());
+
+ if (!prev.deepEquivalent().node()->isAncestor(highestRoot))
+ return VisiblePosition();
+
+ if (highestEditableRoot(prev.deepEquivalent().node()) == highestRoot)
+ return prev;
+
+ Position p = prev.deepEquivalent();
+ Node* node = p.node();
+ Node* child = node->firstChild() && p.offset() > 1 ? node->childNode(p.offset() - 1) : 0;
+ node = child ? child : node->traversePreviousNode(highestRoot);
+
+ while (node && !node->isContentEditable())
+ node = node->traversePreviousNodePostOrder(highestRoot);
+
+ if (!node)
+ return VisiblePosition();
+
+ return VisiblePosition(Position(node, maxDeepOffset(node)));
}
Position VisiblePosition::previousVisiblePosition(const Position& pos)
void setAffinity(EAffinity affinity) { m_affinity = affinity; }
// next() and previous() will increment/decrement by a character cluster.
- VisiblePosition next(bool stayInCurrentEditableRegion = false) const;
- VisiblePosition previous(bool stayInCurrentEditableRegion = false) const;
+ VisiblePosition next(bool stayInEditableContent = false) const;
+ VisiblePosition previous(bool stayInEditableContent = false) const;
bool isLastInBlock() const;
!node->isTextNode();
}
+Node* highestEditableRoot(Node* node)
+{
+ if (!node)
+ return 0;
+
+ Node* highestRoot = node->rootEditableElement();
+ if (!highestRoot)
+ return 0;
+
+ node = highestRoot;
+ while (node) {
+ if (node->isContentEditable())
+ highestRoot = node;
+ if (node->hasTagName(bodyTag))
+ break;
+ node = node->parentNode();
+ }
+
+ return highestRoot;
+}
+
// antidote for maxDeepOffset()
Position rangeCompliantEquivalent(const Position& pos)
{
bool isAtomicNode(const Node*);
bool editingIgnoresContent(const Node*);
bool canHaveChildrenForEditing(const Node*);
+Node* highestEditableRoot(Node*);
void rebalanceWhitespaceInTextNode(Node*, unsigned start, unsigned length);
const String& nonBreakingSpaceString();