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 784x336 [border: (2px solid #FF0000)]
+ RenderBlock {DIV} at (0,0) size 784x392 [border: (2px solid #FF0000)]
RenderBlock (anonymous) at (14,14) size 756x28
RenderText {TEXT} at (0,0) size 63x28
text run at (0,0) width 63: "There "
RenderText {TEXT} at (63,0) size 285x28
text run at (63,0) width 285: "is a tide in the affairs of men,"
- RenderBlock {DIV} at (14,42) size 756x280 [border: (2px solid #FF0000)]
+ RenderBlock {DIV} at (14,42) size 756x224 [border: (2px solid #FF0000)]
RenderBlock (anonymous) at (14,14) size 728x28
RenderText {TEXT} at (0,0) size 434x28
text run at (0,0) width 434: "Which taken at the flood leads on to fortune."
text run at (14,14) width 80: "Omitted"
RenderText {TEXT} at (94,14) size 285x28
text run at (94,14) width 285: "is a tide in the affairs of men,"
- RenderBlock {DIV} at (14,98) size 728x168 [border: (2px solid #FF0000)]
+ RenderBlock {DIV} at (14,98) size 728x112 [border: (2px solid #FF0000)]
RenderBlock (anonymous) at (14,14) size 700x28
RenderText {TEXT} at (0,0) size 434x28
text run at (0,0) width 434: "Which taken at the flood leads on to fortune."
- RenderBlock {DIV} at (14,42) size 700x112 [border: (2px solid #FF0000)]
- RenderBlock (anonymous) at (14,14) size 672x28
- RenderText {TEXT} at (0,0) size 80x28
- text run at (0,0) width 80: "Omitted"
- RenderText {TEXT} at (80,0) size 271x28
- text run at (80,0) width 271: ", all the voyage of their life,"
- RenderBlock {DIV} at (14,42) size 672x56 [border: (2px solid #FF0000)]
- RenderText {TEXT} at (14,14) size 357x28
- text run at (14,14) width 357: "Is bound in shallows and in miseries."
+ RenderBlock {DIV} at (14,42) size 700x56 [border: (2px solid #FF0000)]
+ RenderText {TEXT} at (14,14) size 80x28
+ text run at (14,14) width 80: "Omitted"
+ RenderText {TEXT} at (94,14) size 271x28
+ text run at (94,14) width 271: ", all the voyage of their life,"
+ RenderBlock {DIV} at (14,266) size 756x112 [border: (2px solid #FF0000)]
+ RenderBlock (anonymous) at (14,14) size 728x0
+ RenderBlock {DIV} at (14,14) size 728x84 [border: (2px solid #FF0000)]
+ RenderBlock (anonymous) at (14,14) size 700x0
+ RenderBlock {DIV} at (14,14) size 700x56 [border: (2px solid #FF0000)]
+ RenderText {TEXT} at (14,14) size 357x28
+ text run at (14,14) width 357: "Is bound in shallows and in miseries."
selection is CARET:
start: position 7 of child 1 {TEXT} of child 2 {DIV} of child 3 {DIV} of child 3 {DIV} of child 1 {DIV} of root {BODY}
upstream: position 7 of child 1 {TEXT} of child 2 {DIV} of child 3 {DIV} of child 3 {DIV} of child 1 {DIV} of root {BODY}
+2005-03-18 Ken Kocienda <kocienda@apple.com>
+
+ Reviewed by John
+
+ Fix for this bug:
+
+ <rdar://problem/4056718> Pasting quotes the entire message
+
+ * khtml/editing/htmlediting.cpp:
+ (khtml::ReplaceSelectionCommand::doApply): After pasting, nodes are moved to the block containing
+ the end of the pasted content in certain cases. This move logic used to stop once it moved all the
+ siblings of the node following the last node of the pasted-in content. This means that block elements
+ could get moved, and if the pasted-in content included a mail blockquote, this could result in
+ one quote level getting added. The fix is to stop the move of nodes once a <br>, block element, or
+ <table> is seen. This only affected one of the many test cases we have for such scenarios, and
+ the change to that result makes sense given the code change.
+ * layout-tests/editing/pasteboard/paste-text-003-expected.txt: This test result changed in a way that
+ adequately tests the behavior change, so I did not add a new test.
+
2005-03-17 Ken Kocienda <kocienda@apple.com>
Reviewed by Harrison
NodeImpl *node = beyondEndNode;
NodeImpl *refNode = m_lastNodeInserted;
while (node) {
+ RenderObject *renderer = node->renderer();
+ // Stop at the first table or block.
+ if (renderer && (renderer->isBlockFlow() || renderer->isTable()))
+ break;
NodeImpl *next = node->nextSibling();
blocks.append(node->enclosingBlockFlowElement());
computeAndStoreNodeDesiredStyle(node, styles);
// No need to update inserted node variables.
insertNodeAfter(node, refNode);
refNode = node;
+ // We want to move the first BR we see, so check for that here.
+ if (node->id() == ID_BR)
+ break;
node = next;
}
document()->updateLayout();