EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 21 of #text > LI > OL > DIV > BODY > HTML > #document to 21 of #text > LI > OL > DIV > BODY > HTML > #document givenAction:WebViewInsertActionPasted
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 21 of #text > LI > OL > DIV > BODY > HTML > #document to 21 of #text > LI > OL > DIV > BODY > HTML > #document toDOMRange:range from 21 of #text > LI > OL > SPAN > OL > DIV > BODY > HTML > #document to 21 of #text > LI > OL > SPAN > OL > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 21 of #text > LI > OL > DIV > BODY > HTML > #document to 21 of #text > LI > OL > DIV > BODY > HTML > #document toDOMRange:range from 21 of #text > LI > OL > SPAN > LI > OL > DIV > BODY > HTML > #document to 21 of #text > LI > OL > SPAN > LI > OL > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
layer at (0,0) size 800x600
text run at (0,0) width 211: "I should be number 1."
RenderListItem {LI} at (40,28) size 716x28
RenderListMarker at (-31,0) size 24x28
- RenderListItem {LI} at (40,56) size 716x28
- RenderListMarker at (-31,0) size 24x28
- RenderText {#text} at (0,0) size 211x28
- text run at (0,0) width 211: "I should be number 3."
- RenderBlock (anonymous) at (40,84) size 716x0
- RenderInline {SPAN} at (0,0) size 0x0
- RenderBlock (anonymous) at (40,84) size 716x84
- RenderBlock {OL} at (0,0) size 716x84
- RenderListItem {LI} at (40,0) size 676x28
- RenderListMarker at (-31,0) size 24x28
- RenderText {#text} at (0,0) size 211x28
- text run at (0,0) width 211: "I should be number 1."
- RenderListItem {LI} at (40,28) size 676x28
- RenderListMarker at (-31,0) size 24x28
- RenderListItem {LI} at (40,56) size 676x28
- RenderListMarker at (-31,0) size 24x28
- RenderText {#text} at (0,0) size 211x28
- text run at (0,0) width 211: "I should be number 3."
- RenderBlock (anonymous) at (40,168) size 716x0
- RenderInline {SPAN} at (0,0) size 0x0
-caret: position 21 of child 0 {#text} of child 2 {LI} of child 0 {OL} of child 6 {SPAN} of child 4 {OL} of child 1 {DIV} of child 1 {BODY} of child 0 {HTML} of document
+ RenderListItem {LI} at (40,56) size 716x112
+ RenderBlock (anonymous) at (0,0) size 716x28
+ RenderListMarker at (-31,0) size 24x28
+ RenderText {#text} at (0,0) size 211x28
+ text run at (0,0) width 211: "I should be number 3."
+ RenderInline {SPAN} at (0,0) size 0x18
+ RenderBlock (anonymous) at (0,28) size 716x84
+ RenderBlock {OL} at (0,0) size 716x84
+ RenderListItem {LI} at (40,0) size 676x28
+ RenderListMarker at (-31,0) size 24x28
+ RenderText {#text} at (0,0) size 211x28
+ text run at (0,0) width 211: "I should be number 1."
+ RenderListItem {LI} at (40,28) size 676x28
+ RenderListMarker at (-31,0) size 24x28
+ RenderListItem {LI} at (40,56) size 676x28
+ RenderListMarker at (-31,0) size 24x28
+ RenderText {#text} at (0,0) size 211x28
+ text run at (0,0) width 211: "I should be number 3."
+ RenderBlock (anonymous) at (0,112) size 716x0
+ RenderInline {SPAN} at (0,0) size 0x0
+caret: position 21 of child 0 {#text} of child 2 {LI} of child 0 {OL} of child 1 {SPAN} of child 5 {LI} of child 4 {OL} of child 1 {DIV} of child 1 {BODY} of child 0 {HTML} of document
bool selectionEndWasEndOfParagraph = isEndOfParagraph(visibleEnd);
bool selectionStartWasStartOfParagraph = isStartOfParagraph(visibleStart);
+ Node* startBlock = enclosingBlock(visibleStart.deepEquivalent().node());
+
if (selectionStartWasStartOfParagraph && selectionEndWasEndOfParagraph ||
- enclosingBlock(visibleStart.deepEquivalent().node()) == currentRoot)
+ startBlock == currentRoot ||
+ startBlock->renderer() && startBlock->renderer()->isListItem())
m_preventNesting = false;
Position insertionPos = selection.start();
insertParagraphSeparator();
}
insertionPos = endingSelection().start();
- }
- else {
+ } else {
ASSERT(selection.isCaret());
if (fragment.hasInterchangeNewlineAtStart()) {
VisiblePosition next = visibleStart.next(true);
// away, there are positions after the br which map to the same visible position as [br, 0]).
Node* endBR = insertionPos.downstream().node()->hasTagName(brTag) ? insertionPos.downstream().node() : 0;
- Node* startBlock = enclosingBlock(insertionPos.node());
+ startBlock = enclosingBlock(insertionPos.node());
// Adjust insertionPos to prevent nesting.
if (m_preventNesting) {