Changeset 96870 in webkit
- Timestamp:
- Oct 6, 2011 4:16:01 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 23 added
- 65 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r96868 r96870 1 2011-10-05 Ryosuke Niwa <rniwa@webkit.org> 2 3 Deleting line break before h1 converts h1 to span 4 https://bugs.webkit.org/show_bug.cgi?id=45784 5 6 Reviewed by Enrica Casucci. 7 8 Many rebaselines are due to text nodes merged correctly after ReplaceSelectionCommand because 9 they started to use the fast path (perfromTrivialReplace). 10 11 New tests: 12 * editing/deleting/merge-paragraph-from-address-expected.txt: Added. 13 * editing/deleting/merge-paragraph-from-address.html: Added. 14 * editing/deleting/merge-paragraph-from-h6-expected.txt: Added. 15 * editing/deleting/merge-paragraph-from-h6-with-style-2-expected.txt: Added. 16 * editing/deleting/merge-paragraph-from-h6-with-style-2.html: Added. 17 * editing/deleting/merge-paragraph-from-h6-with-style-3-expected.txt: Added. 18 * editing/deleting/merge-paragraph-from-h6-with-style-3.html: Added. 19 * editing/deleting/merge-paragraph-from-h6-with-style-expected.txt: Added. 20 * editing/deleting/merge-paragraph-from-h6-with-style.html: Added. 21 * editing/deleting/merge-paragraph-from-h6.html: Added. 22 * editing/deleting/merge-paragraph-from-listing-expected.txt: Added. 23 * editing/deleting/merge-paragraph-from-listing.html: Added. 24 * editing/deleting/merge-paragraph-from-p-with-style-2-expected.txt: Added. 25 * editing/deleting/merge-paragraph-from-p-with-style-2.html: Added. 26 * editing/deleting/merge-paragraph-from-p-with-style-expected.txt: Added. 27 * editing/deleting/merge-paragraph-from-p-with-style.html: Added. 28 * editing/deleting/merge-paragraph-into-blockquote-expected.txt: 29 * editing/deleting/merge-paragraph-into-h1-expected.txt: Added. 30 * editing/deleting/merge-paragraph-into-h1-style-expected.txt: Added. 31 * editing/deleting/merge-paragraph-into-h1-with-style-expected.txt: Added. 32 * editing/deleting/merge-paragraph-into-h1-with-style.html: Added. 33 * editing/deleting/merge-paragraph-into-h1.html: Added. 34 * editing/deleting/merge-paragraph-into-pre-expected.txt: Added. 35 * editing/deleting/merge-paragraph-into-pre.html: Added. 36 37 Rebaselines: 38 * editing/pasteboard/5521237-expected.txt: A collapsed br at the end is removed. 39 * editing/spelling/script-tests/spelling-backspace-between-lines.js: text nodes are merged. 40 (testWithDelete): 41 (testWithForwardDelete): 42 * editing/spelling/spelling-backspace-between-lines-expected.txt: 43 * editing/style/apply-through-end-of-document-expected.txt: A collapsed br at the end is removed. 44 * platform/mac/editing/deleting/merge-whitespace-pre-expected.png: 45 * platform/mac/editing/deleting/merge-whitespace-pre-expected.txt: "bar" is merged into p from 46 pre and losing monospace style. 47 * platform/mac/editing/pasteboard/paste-match-style-001-expected.txt: A text node is split into 48 two with no visual effect. 49 50 Rebaselines due to text nodes being merged: 51 * editing/deleting/5032066-expected.txt: 52 * editing/deleting/delete-across-editable-content-boundaries-2-expected.txt: 53 * editing/deleting/delete-across-editable-content-boundaries-3-expected.txt: 54 * editing/deleting/delete-line-011-expected.txt: 55 * editing/deleting/delete-to-end-of-paragraph-expected.txt: 56 * editing/deleting/deleting-line-break-preserves-underline-color-expected.txt: 57 * editing/pasteboard/copy-null-characters-expected.txt: 58 * editing/pasteboard/insert-div-text-into-text-expected.txt: 59 * editing/pasteboard/interchange-newline-1-expected.txt: 60 * editing/pasteboard/interchange-newline-2-expected.txt: 61 * editing/pasteboard/merge-end-3-expected.txt: 62 * editing/pasteboard/merge-end-4-expected.txt: 63 * editing/pasteboard/merge-end-5-expected.txt: 64 * editing/pasteboard/merge-end-list-2-expected.txt: 65 * editing/pasteboard/merge-end-table-2-expected.txt: 66 * editing/pasteboard/paste-after-inline-style-element-expected.txt: 67 * editing/pasteboard/paste-blockquote-2-expected.txt: 68 * editing/pasteboard/paste-blockquote-3-expected.txt: 69 * editing/pasteboard/paste-blockquote-into-blockquote-2-expected.txt: 70 * editing/pasteboard/paste-blockquote-into-blockquote-expected.txt: 71 * editing/pasteboard/paste-into-blockquote-with-document-font-color-expected.txt: 72 * editing/pasteboard/pasting-word-in-div-extra-line-expected.txt: 73 * platform/mac/editing/deleting/delete-block-merge-contents-001-expected.txt: 74 * platform/mac/editing/deleting/delete-block-merge-contents-002-expected.txt: 75 * platform/mac/editing/deleting/delete-block-merge-contents-003-expected.txt: 76 * platform/mac/editing/deleting/delete-block-merge-contents-004-expected.txt: 77 * platform/mac/editing/deleting/delete-block-merge-contents-005-expected.txt: 78 * platform/mac/editing/deleting/delete-block-merge-contents-006-expected.txt: 79 * platform/mac/editing/deleting/delete-block-merge-contents-007-expected.txt: 80 * platform/mac/editing/deleting/delete-block-merge-contents-008-expected.txt: 81 * platform/mac/editing/deleting/delete-block-merge-contents-009-expected.txt: 82 * platform/mac/editing/deleting/delete-block-merge-contents-010-expected.txt: 83 * platform/mac/editing/deleting/delete-block-merge-contents-012-expected.txt: 84 * platform/mac/editing/deleting/delete-block-merge-contents-013-expected.txt: 85 * platform/mac/editing/deleting/delete-block-merge-contents-014-expected.txt: 86 * platform/mac/editing/deleting/delete-block-merge-contents-015-expected.txt: 87 * platform/mac/editing/deleting/delete-block-merge-contents-016-expected.txt: 88 * platform/mac/editing/deleting/delete-block-merge-contents-017-expected.txt: 89 * platform/mac/editing/deleting/delete-br-010-expected.txt: 90 * platform/mac/editing/deleting/delete-line-012-expected.txt: 91 * platform/mac/editing/deleting/delete-listitem-001-expected.txt: 92 * platform/mac/editing/inserting/multiple-lines-selected-expected.txt: 93 * platform/mac/editing/pasteboard/5032095-expected.txt: 94 * platform/mac/editing/pasteboard/merge-after-delete-1-expected.txt: 95 * platform/mac/editing/pasteboard/merge-after-delete-2-expected.txt: 96 * platform/mac/editing/pasteboard/merge-after-delete-expected.txt: 97 * platform/mac/editing/pasteboard/merge-end-blockquote-expected.txt: 98 * platform/mac/editing/pasteboard/paste-blockquote-into-blockquote-4-expected.txt: 99 1 100 2011-10-06 Abhishek Arya <inferno@chromium.org> 2 101 -
trunk/LayoutTests/editing/deleting/5032066-expected.txt
r87466 r96870 5 5 | <tr> 6 6 | <td> 7 | "All the content in this editable region <#selection-caret>" 8 | "should be in one table cell." 7 | "All the content in this editable region <#selection-caret>should be in one table cell." -
trunk/LayoutTests/editing/deleting/delete-across-editable-content-boundaries-2-expected.txt
r89644 r96870 16 16 | <td> 17 17 | contenteditable="true" 18 | "Editable <#selection-caret>" 19 | "content" 18 | "Editable <#selection-caret>content" 20 19 | " 21 20 " -
trunk/LayoutTests/editing/deleting/delete-across-editable-content-boundaries-3-expected.txt
r89644 r96870 17 17 | <td> 18 18 | contenteditable="true" 19 | "Editable <#selection-caret>" 20 | "content" 19 | "Editable <#selection-caret>content" 21 20 | " 22 21 " -
trunk/LayoutTests/editing/deleting/delete-line-011-expected.txt
r96297 r96870 25 25 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 26 26 EDITING DELEGATE: shouldDeleteDOMRange:range from 10 of #text > DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document 27 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 2 of BODY > HTML > #document toDOMRange:range from 10 of #text > DIV > BODY > HTML > #document to 10 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE27 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 10 of #text > DIV > BODY > HTML > #document to 2 of BODY > HTML > #document toDOMRange:range from 10 of #text > DIV > BODY > HTML > #document to 10 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 28 28 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 29 29 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 34 34 RenderBody {BODY} at (8,8) size 784x584 35 35 RenderBlock {DIV} at (0,0) size 600x28 36 RenderText {#text} at (0,0) size 96x28 37 text run at (0,0) width 96: "There is a" 38 RenderText {#text} at (96,0) size 241x28 39 text run at (96,0) width 241: "Which taken at the flood" 36 RenderText {#text} at (0,0) size 337x28 37 text run at (0,0) width 337: "There is aWhich taken at the flood" 40 38 caret: position 10 of child 0 {#text} of child 1 {DIV} of body -
trunk/LayoutTests/editing/deleting/delete-to-end-of-paragraph-expected.txt
r96257 r96870 10 10 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 11 11 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 12 | <span> 13 | style="font-size: medium; " 14 | "<#selection-caret>four five six" 12 | "<#selection-caret>four five six" 15 13 | <br> -
trunk/LayoutTests/editing/deleting/deleting-line-break-preserves-underline-color-expected.txt
r92823 r96870 14 14 | "This should not be underlined.<#selection-caret>" 15 15 | <span> 16 | style="text-decoration: underline; color: blue; 16 | style="text-decoration: underline; color: blue;" 17 17 | <span> 18 18 | style="color:red;" -
trunk/LayoutTests/editing/deleting/merge-paragraph-into-blockquote-expected.txt
r96257 r96870 15 15 " 16 16 | <blockquote> 17 | "hello<#selection-caret>" 18 | "world" 17 | "hello<#selection-caret>world" -
trunk/LayoutTests/editing/pasteboard/5521237-expected.txt
r55271 r96870 1 1 This tests for a bug when pasting a word copied from TextEdit after a regular, breaking space. 2 2 3 Everything 3 Everything in this editable region should be in one paragraph. -
trunk/LayoutTests/editing/pasteboard/copy-null-characters-expected.txt
r93001 r96870 29 29 | "Copy paste me" 30 30 | <span> 31 | style="color: rgb(0, 128, 0); "31 | style="color: green; " 32 32 | "green" 33 33 | "Copy paste me" -
trunk/LayoutTests/editing/pasteboard/insert-div-text-into-text-expected.txt
r96257 r96870 5 5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 6 6 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 7 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 36 of #text > DIV > BODY > HTML > #document to 36 of #text > DIV > BODY > HTML > #document toDOMRange:range from 6 of #text > DIV > BODY > HTML > #document to 6of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE7 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 48 of #text > DIV > BODY > HTML > #document to 48 of #text > DIV > BODY > HTML > #document toDOMRange:range from 12 of #text > DIV > BODY > HTML > #document to 12 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 8 8 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 9 9 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 10 10 EDITING DELEGATE: webViewDidEndEditing:WebViewDidEndEditingNotification 11 11 This tests inserting a text wrapped in a div inside a text node. 12 | "There " 13 | "should<#selection-caret>" 14 | " be no line breaks in this sentence." 12 | "There should<#selection-caret> be no line breaks in this sentence." -
trunk/LayoutTests/editing/pasteboard/interchange-newline-1-expected.txt
r96257 r96870 9 9 There is an interchange newline at the end of the incoming fragment. "bar" and "x" should be in separate paragraphs 10 10 The paragraph "bar" is inside a div wrapped in a span, and the old paste code that handled interchange newlines did not handle this case. 11 | "x" 12 | "foo" 11 | "xfoo" 13 12 | <div> 14 13 | "bar" -
trunk/LayoutTests/editing/pasteboard/interchange-newline-2-expected.txt
r96264 r96870 5 5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 6 6 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 7 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE7 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 8 8 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 9 9 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 12 12 The selection being pasted into contain multiple blocks, which breaks the old code in paste that handled interchange newlines. 13 13 | <div> 14 | "f" 15 | "bar" 14 | "fbar" 16 15 | "baz" 17 16 | <div> -
trunk/LayoutTests/editing/pasteboard/merge-end-3-expected.txt
r96257 r96870 13 13 | "one " 14 14 | <div> 15 | "two<#selection-caret>" 16 | "three" 15 | "two<#selection-caret>three" -
trunk/LayoutTests/editing/pasteboard/merge-end-4-expected.txt
r96257 r96870 11 11 bar 12 12 bazx. 13 | "x" 14 | "foo" 13 | "xfoo" 15 14 | <div> 16 15 | "bar" -
trunk/LayoutTests/editing/pasteboard/merge-end-5-expected.txt
r96257 r96870 8 8 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 9 9 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 10 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document toDOMRange:range from 36 of #text > DIV > DIV > BODY > HTML > #document to 36of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE10 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document toDOMRange:range from 41 of #text > DIV > DIV > BODY > HTML > #document to 41 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 11 11 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 12 12 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 15 15 | <div> 16 16 | style="border: 1px solid red;" 17 | "This " 18 | "text should have a red border around<#selection-caret>" 17 | "This text should have a red border around<#selection-caret>" 19 18 | " it." -
trunk/LayoutTests/editing/pasteboard/merge-end-list-2-expected.txt
r96257 r96870 4 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 5 5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 6 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > LI > UL > DIV > BODY > HTML > #document to 4of #text > DIV > LI > UL > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > LI > UL > DIV > BODY > HTML > #document to 3 of #text > DIV > LI > UL > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE6 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > LI > UL > DIV > BODY > HTML > #document to 7 of #text > DIV > LI > UL > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > LI > UL > DIV > BODY > HTML > #document to 3 of #text > DIV > LI > UL > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 7 7 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 8 8 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 20 20 | <li> 21 21 | <div> 22 | "Item" 23 | "foo" 22 | "Itemfoo" 24 23 | <div> 25 | "bar<#selection-caret>" 26 | " 1" 24 | "bar<#selection-caret> 1" -
trunk/LayoutTests/editing/pasteboard/merge-end-table-2-expected.txt
r96257 r96870 4 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 5 5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 6 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > TD > TR > TBODY > TABLE > DIV > BODY > HTML > #document to 4of #text > DIV > TD > TR > TBODY > TABLE > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > TD > TR > TBODY > TABLE > DIV > BODY > HTML > #document to 3 of #text > DIV > TD > TR > TBODY > TABLE > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE6 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > TD > TR > TBODY > TABLE > DIV > BODY > HTML > #document to 7 of #text > DIV > TD > TR > TBODY > TABLE > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > TD > TR > TBODY > TABLE > DIV > BODY > HTML > #document to 3 of #text > DIV > TD > TR > TBODY > TABLE > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 7 7 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 8 8 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 26 26 | <div> 27 27 | id="test2" 28 | "Item" 29 | "foo" 28 | "Itemfoo" 30 29 | <div> 31 30 | id="test2" 32 | "bar<#selection-caret>" 33 | " 1" 31 | "bar<#selection-caret> 1" 34 32 | <td> 35 33 | "Item 2" -
trunk/LayoutTests/editing/pasteboard/paste-after-inline-style-element-expected.txt
r92695 r96870 5 5 | <b> 6 6 | "line 1 " 7 | "line 2<#selection-caret>" 8 | " " 7 | "line 2<#selection-caret> " 9 8 | <b> 10 9 | <br> -
trunk/LayoutTests/editing/pasteboard/paste-blockquote-2-expected.txt
r86716 r96870 1 1 This tests pasting a blockquote at the start of a paragraph. 2 | "This should not be blockquoted.<#selection-caret>" 3 | " This should not be blockquoted." 2 | "This should not be blockquoted.<#selection-caret> This should not be blockquoted." -
trunk/LayoutTests/editing/pasteboard/paste-blockquote-3-expected.txt
r86716 r96870 1 1 This tests pasting a blockquote into the middle of a paragraph. 2 | "This should not be blockquoted." 3 | " This should not be blockquoted." 2 | "This should not be blockquoted. This should not be blockquoted." 4 3 | <blockquote> 5 4 | type="cite" 6 5 | "This should be blockquoted." 7 6 | <br> 8 | "This should not be blockquoted.<#selection-caret>" 9 | " This should not be blockquoted." 7 | "This should not be blockquoted.<#selection-caret> This should not be blockquoted." -
trunk/LayoutTests/editing/pasteboard/paste-blockquote-into-blockquote-2-expected.txt
r92620 r96870 3 3 | id="block" 4 4 | type="cite" 5 | "One" 6 | "Two" 5 | "OneTwo" 7 6 | <blockquote> 8 7 | type="cite" -
trunk/LayoutTests/editing/pasteboard/paste-blockquote-into-blockquote-expected.txt
r92620 r96870 3 3 | id="block" 4 4 | type="cite" 5 | "One" 6 | "Two" 5 | "OneTwo" 7 6 | <blockquote> 8 7 | type="cite" -
trunk/LayoutTests/editing/pasteboard/paste-into-blockquote-with-document-font-color-expected.txt
r87470 r96870 4 4 | type="cite" 5 5 | <div> 6 | "(" 7 | "This text should be blue.<#selection-caret>" 8 | ")" 6 | "(This text should be blue.<#selection-caret>)" -
trunk/LayoutTests/editing/pasteboard/pasting-word-in-div-extra-line-expected.txt
r87471 r96870 1 1 This test ensures pasting words copied from TextEdit in Mail does not add extra newline. See rdar://problem/5483567. 2 | "x" 3 | "foo<#selection-caret>" 4 | "x" 2 | "xfoo<#selection-caret>x" -
trunk/LayoutTests/editing/spelling/script-tests/spelling-backspace-between-lines.js
r69952 r96870 33 33 sel.modify("move", "right", "line"); // Moves to the line ending to focus the "OK zz OK" text. 34 34 35 shouldBe("sel.anchorNode.data", "'OK zz OK'");35 shouldBe("sel.anchorNode.data", "'OKOK zz OK'"); 36 36 shouldBe("firstLineText()", "'OKOK zz OK'"); 37 shouldBeTrue("layoutTestController.hasSpellingMarker( 3, 2)");37 shouldBeTrue("layoutTestController.hasSpellingMarker(5, 2)"); 38 38 } 39 39 … … 55 55 56 56 shouldBe("firstLineText()", "'OKOK zz OK'"); 57 shouldBe("sel.anchorNode.data", "'OK zz OK'");58 shouldBeTrue("layoutTestController.hasSpellingMarker( 3, 2)");57 shouldBe("sel.anchorNode.data", "'OKOK zz OK'"); 58 shouldBeTrue("layoutTestController.hasSpellingMarker(5, 2)"); 59 59 } 60 60 -
trunk/LayoutTests/editing/spelling/spelling-backspace-between-lines-expected.txt
r69952 r96870 7 7 PASS sel.anchorNode.data is 'OK zz OK' 8 8 PASS layoutTestController.hasSpellingMarker(3, 2) is true 9 PASS sel.anchorNode.data is 'OK zz OK'9 PASS sel.anchorNode.data is 'OKOK zz OK' 10 10 PASS firstLineText() is 'OKOK zz OK' 11 PASS layoutTestController.hasSpellingMarker( 3, 2) is true11 PASS layoutTestController.hasSpellingMarker(5, 2) is true 12 12 PASS firstLineText() is 'OK' 13 13 PASS sel.anchorNode.data is 'OK zz OK' 14 14 PASS layoutTestController.hasSpellingMarker(3, 2) is true 15 15 PASS firstLineText() is 'OKOK zz OK' 16 PASS sel.anchorNode.data is 'OK zz OK'17 PASS layoutTestController.hasSpellingMarker( 3, 2) is true16 PASS sel.anchorNode.data is 'OKOK zz OK' 17 PASS layoutTestController.hasSpellingMarker(5, 2) is true 18 18 PASS successfullyParsed is true 19 19 -
trunk/LayoutTests/editing/style/apply-through-end-of-document-expected.txt
r86777 r96870 5 5 Copy the second word in this sentence. 6 6 the 7 -
trunk/LayoutTests/platform/mac/editing/deleting/delete-block-merge-contents-001-expected.txt
r96264 r96870 7 7 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 8 8 EDITING DELEGATE: shouldDeleteDOMRange:range from 6 of #text > DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > DIV > BODY > HTML > #document 9 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 4of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE9 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 10 10 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 11 11 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 17 17 RenderBlock {DIV} at (0,0) size 784x56 [border: (2px solid #FF0000)] 18 18 RenderBlock {DIV} at (14,14) size 756x28 19 RenderText {#text} at (0,0) size 40x28 20 text run at (0,0) width 40: "One" 21 RenderText {#text} at (40,0) size 44x28 22 text run at (40,0) width 44: "Two" 23 RenderText {#text} at (0,0) size 0x0 19 RenderText {#text} at (0,0) size 84x28 20 text run at (0,0) width 84: "OneTwo" 24 21 caret: position 4 of child 0 {#text} of child 1 {DIV} of child 1 {DIV} of body -
trunk/LayoutTests/platform/mac/editing/deleting/delete-block-merge-contents-002-expected.txt
r96264 r96870 7 7 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 8 8 EDITING DELEGATE: shouldDeleteDOMRange:range from 6 of #text > DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > DIV > BODY > HTML > #document 9 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 4of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE9 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 10 10 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 11 11 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 17 17 RenderBlock {DIV} at (0,0) size 784x84 [border: (2px solid #FF0000)] 18 18 RenderBlock {DIV} at (14,14) size 756x56 19 RenderText {#text} at (0,0) size 40x28 20 text run at (0,0) width 40: "One" 21 RenderText {#text} at (40,0) size 44x28 22 text run at (40,0) width 44: "Two" 19 RenderText {#text} at (0,0) size 84x28 20 text run at (0,0) width 84: "OneTwo" 23 21 RenderBR {BR} at (84,22) size 0x0 24 22 RenderText {#text} at (0,28) size 57x28 -
trunk/LayoutTests/platform/mac/editing/deleting/delete-block-merge-contents-003-expected.txt
r96264 r96870 7 7 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 8 8 EDITING DELEGATE: shouldDeleteDOMRange:range from 6 of #text > DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > DIV > BODY > HTML > #document 9 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 4of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE9 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 10 10 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 11 11 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 17 17 RenderBlock {DIV} at (0,0) size 784x84 [border: (2px solid #FF0000)] 18 18 RenderBlock {DIV} at (14,14) size 756x56 19 RenderText {#text} at (0,0) size 40x28 20 text run at (0,0) width 40: "One" 21 RenderText {#text} at (40,0) size 44x28 22 text run at (40,0) width 44: "Two" 19 RenderText {#text} at (0,0) size 84x28 20 text run at (0,0) width 84: "OneTwo" 23 21 RenderBR {BR} at (84,22) size 0x0 24 22 RenderText {#text} at (0,28) size 57x28 -
trunk/LayoutTests/platform/mac/editing/deleting/delete-block-merge-contents-004-expected.txt
r96264 r96870 7 7 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 8 8 EDITING DELEGATE: shouldDeleteDOMRange:range from 6 of #text > DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > DIV > BODY > HTML > #document 9 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 4of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE9 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 10 10 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 11 11 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 17 17 RenderBlock {DIV} at (0,0) size 784x84 [border: (2px solid #FF0000)] 18 18 RenderBlock {DIV} at (14,14) size 756x56 19 RenderText {#text} at (0,0) size 40x28 20 text run at (0,0) width 40: "One" 21 RenderText {#text} at (40,0) size 44x28 22 text run at (40,0) width 44: "Two" 19 RenderText {#text} at (0,0) size 84x28 20 text run at (0,0) width 84: "OneTwo" 23 21 RenderBR {BR} at (84,22) size 0x0 24 22 RenderText {#text} at (0,28) size 57x28 -
trunk/LayoutTests/platform/mac/editing/deleting/delete-block-merge-contents-005-expected.txt
r96264 r96870 18 18 RenderBlock {DIV} at (14,14) size 756x84 19 19 RenderBlock (anonymous) at (0,0) size 756x28 20 RenderText {#text} at (0,0) size 40x28 21 text run at (0,0) width 40: "One" 22 RenderText {#text} at (40,0) size 44x28 23 text run at (40,0) width 44: "Two" 20 RenderText {#text} at (0,0) size 84x28 21 text run at (0,0) width 84: "OneTwo" 24 22 RenderBlock {DIV} at (0,28) size 756x28 25 23 RenderBlock (anonymous) at (0,0) size 756x0 -
trunk/LayoutTests/platform/mac/editing/deleting/delete-block-merge-contents-006-expected.txt
r96264 r96870 18 18 RenderBlock {DIV} at (14,14) size 756x84 19 19 RenderBlock (anonymous) at (0,0) size 756x28 20 RenderText {#text} at (0,0) size 40x28 21 text run at (0,0) width 40: "One" 22 RenderText {#text} at (40,0) size 44x28 23 text run at (40,0) width 44: "Two" 20 RenderText {#text} at (0,0) size 84x28 21 text run at (0,0) width 84: "OneTwo" 24 22 RenderBlock {DIV} at (0,28) size 756x28 25 23 RenderBlock (anonymous) at (0,0) size 756x0 -
trunk/LayoutTests/platform/mac/editing/deleting/delete-block-merge-contents-007-expected.txt
r96264 r96870 18 18 RenderBlock {DIV} at (14,14) size 756x84 19 19 RenderBlock (anonymous) at (0,0) size 756x28 20 RenderText {#text} at (0,0) size 40x28 21 text run at (0,0) width 40: "One" 22 RenderText {#text} at (40,0) size 44x28 23 text run at (40,0) width 44: "Two" 20 RenderText {#text} at (0,0) size 84x28 21 text run at (0,0) width 84: "OneTwo" 24 22 RenderBlock {DIV} at (0,28) size 756x28 25 23 RenderBlock (anonymous) at (0,0) size 756x0 -
trunk/LayoutTests/platform/mac/editing/deleting/delete-block-merge-contents-008-expected.txt
r96264 r96870 18 18 RenderBlock {DIV} at (14,14) size 756x84 19 19 RenderBlock (anonymous) at (0,0) size 756x28 20 RenderText {#text} at (0,0) size 40x28 21 text run at (0,0) width 40: "One" 22 RenderText {#text} at (40,0) size 44x28 23 text run at (40,0) width 44: "Two" 20 RenderText {#text} at (0,0) size 84x28 21 text run at (0,0) width 84: "OneTwo" 24 22 RenderBlock {DIV} at (0,28) size 756x56 25 23 RenderBlock {DIV} at (0,0) size 756x28 -
trunk/LayoutTests/platform/mac/editing/deleting/delete-block-merge-contents-009-expected.txt
r96264 r96870 11 11 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 12 12 EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of DIV > DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > DIV > DIV > BODY > HTML > #document 13 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > DIV > DIV > DIV > BODY > HTML > #document to 3of #text > DIV > DIV > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > DIV > DIV > BODY > HTML > #document to 3 of #text > DIV > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE13 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 8 of #text > DIV > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > DIV > DIV > BODY > HTML > #document to 3 of #text > DIV > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 14 14 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 15 15 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 25 25 text run at (0,0) width 40: "One" 26 26 RenderBlock {DIV} at (0,28) size 756x56 27 RenderText {#text} at (0,0) size 44x28 28 text run at (0,0) width 44: "Two" 29 RenderText {#text} at (44,0) size 57x28 30 text run at (44,0) width 57: "Three" 27 RenderText {#text} at (0,0) size 101x28 28 text run at (0,0) width 101: "TwoThree" 31 29 RenderBR {BR} at (101,22) size 0x0 32 30 RenderText {#text} at (0,28) size 45x28 -
trunk/LayoutTests/platform/mac/editing/deleting/delete-block-merge-contents-010-expected.txt
r96264 r96870 14 14 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 15 15 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 16 EDITING DELEGATE: shouldDeleteDOMRange:range from 3of #text > DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > DIV > DIV > BODY > HTML > #document17 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > DIV > BODY > HTML > #document to 3of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE16 EDITING DELEGATE: shouldDeleteDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > DIV > DIV > BODY > HTML > #document 17 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 12 of #text > DIV > DIV > BODY > HTML > #document to 12 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 18 18 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 19 19 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 24 24 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 25 25 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 26 EDITING DELEGATE: shouldDeleteDOMRange:range from 3 of DIV > DIV > BODY > HTML > #document to 4of DIV > DIV > BODY > HTML > #document26 EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of DIV > DIV > BODY > HTML > #document to 2 of DIV > DIV > BODY > HTML > #document 27 27 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 28 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE28 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 12 of #text > DIV > DIV > BODY > HTML > #document to 12 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 12 of #text > DIV > DIV > BODY > HTML > #document to 12 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 29 29 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 30 30 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 36 36 RenderBlock {DIV} at (0,0) size 784x56 [border: (2px solid #FF0000)] 37 37 RenderBlock {DIV} at (14,14) size 756x28 38 RenderText {#text} at (0,0) size 40x28 39 text run at (0,0) width 40: "One" 40 RenderText {#text} at (40,0) size 44x28 41 text run at (40,0) width 44: "Two" 42 RenderText {#text} at (84,0) size 57x28 43 text run at (84,0) width 57: "Three" 38 RenderText {#text} at (0,0) size 141x28 39 text run at (0,0) width 141: "OneTwoThree" 44 40 RenderText {#text} at (141,0) size 45x28 45 41 text run at (141,0) width 45: "Four" 46 caret: position 5 of child 2{#text} of child 1 {DIV} of child 1 {DIV} of body42 caret: position 12 of child 0 {#text} of child 1 {DIV} of child 1 {DIV} of body -
trunk/LayoutTests/platform/mac/editing/deleting/delete-block-merge-contents-012-expected.txt
r96264 r96870 42 42 RenderBlock {DIV} at (14,14) size 756x28 43 43 RenderBlock {DIV} at (0,0) size 756x28 44 RenderText {#text} at (0,0) size 71x28 45 text run at (0,0) width 71: "This is " 46 RenderText {#text} at (71,0) size 106x28 47 text run at (71,0) width 106: " some text." 44 RenderText {#text} at (0,0) size 177x28 45 text run at (0,0) width 177: "This is some text." 48 46 caret: position 8 of child 0 {#text} of child 1 {DIV} of child 1 {DIV} of child 1 {DIV} of body -
trunk/LayoutTests/platform/mac/editing/deleting/delete-block-merge-contents-013-expected.txt
r96264 r96870 43 43 RenderBlock {DIV} at (14,14) size 756x28 44 44 RenderBlock {DIV} at (0,0) size 756x28 45 RenderText {#text} at (0,0) size 71x28 46 text run at (0,0) width 71: "This is " 47 RenderText {#text} at (71,0) size 100x28 48 text run at (71,0) width 100: "some text." 45 RenderText {#text} at (0,0) size 171x28 46 text run at (0,0) width 171: "This is some text." 49 47 caret: position 8 of child 0 {#text} of child 1 {DIV} of child 1 {DIV} of child 1 {DIV} of body -
trunk/LayoutTests/platform/mac/editing/deleting/delete-block-merge-contents-014-expected.txt
r96264 r96870 30 30 EDITING DELEGATE: shouldDeleteDOMRange:range from 7 of #text > DIV > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > DIV > BODY > HTML > #document 31 31 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 32 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0of #text > DIV > DIV > DIV > BODY > HTML > #document to 2 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 7 of #text > DIV > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE32 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > DIV > BODY > HTML > #document to 2 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 7 of #text > DIV > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 33 33 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 34 34 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 41 41 RenderBlock {DIV} at (14,14) size 756x28 42 42 RenderBlock {DIV} at (0,0) size 756x28 43 RenderText {#text} at (0,0) size 65x28 44 text run at (0,0) width 65: "This is" 45 RenderText {#text} at (65,0) size 106x28 46 text run at (65,0) width 106: " some text." 43 RenderText {#text} at (0,0) size 171x28 44 text run at (0,0) width 171: "This is some text." 47 45 caret: position 7 of child 0 {#text} of child 1 {DIV} of child 1 {DIV} of child 1 {DIV} of body -
trunk/LayoutTests/platform/mac/editing/deleting/delete-block-merge-contents-015-expected.txt
r96264 r96870 30 30 EDITING DELEGATE: shouldDeleteDOMRange:range from 7 of #text > DIV > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > DIV > BODY > HTML > #document 31 31 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 32 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0of #text > DIV > DIV > DIV > BODY > HTML > #document to 2 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 7 of #text > DIV > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE32 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > DIV > BODY > HTML > #document to 2 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 7 of #text > DIV > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 33 33 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 34 34 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 41 41 RenderBlock {DIV} at (14,14) size 756x28 42 42 RenderBlock {DIV} at (0,0) size 756x28 43 RenderText {#text} at (0,0) size 65x28 44 text run at (0,0) width 65: "This is" 45 RenderText {#text} at (65,0) size 106x28 46 text run at (65,0) width 106: " some text." 43 RenderText {#text} at (0,0) size 171x28 44 text run at (0,0) width 171: "This is some text." 47 45 caret: position 7 of child 0 {#text} of child 1 {DIV} of child 1 {DIV} of child 1 {DIV} of body -
trunk/LayoutTests/platform/mac/editing/deleting/delete-block-merge-contents-016-expected.txt
r96264 r96870 30 30 EDITING DELEGATE: shouldDeleteDOMRange:range from 7 of #text > DIV > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > DIV > BODY > HTML > #document 31 31 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 32 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0of #text > DIV > DIV > DIV > BODY > HTML > #document to 2 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 7 of #text > DIV > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE32 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > DIV > BODY > HTML > #document to 2 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 7 of #text > DIV > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 33 33 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 34 34 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 41 41 RenderBlock {DIV} at (14,14) size 756x28 42 42 RenderBlock {DIV} at (0,0) size 756x28 43 RenderText {#text} at (0,0) size 65x28 44 text run at (0,0) width 65: "This is" 45 RenderText {#text} at (65,0) size 106x28 46 text run at (65,0) width 106: " some text." 43 RenderText {#text} at (0,0) size 171x28 44 text run at (0,0) width 171: "This is some text." 47 45 caret: position 7 of child 0 {#text} of child 1 {DIV} of child 1 {DIV} of child 1 {DIV} of body -
trunk/LayoutTests/platform/mac/editing/deleting/delete-block-merge-contents-017-expected.txt
r96264 r96870 43 43 RenderBlock {DIV} at (14,14) size 756x28 44 44 RenderBlock {DIV} at (0,0) size 756x28 45 RenderText {#text} at (0,0) size 71x28 46 text run at (0,0) width 71: "This is " 47 RenderText {#text} at (71,0) size 106x28 48 text run at (71,0) width 106: " some text." 45 RenderText {#text} at (0,0) size 177x28 46 text run at (0,0) width 177: "This is some text." 49 47 caret: position 8 of child 0 {#text} of child 1 {DIV} of child 1 {DIV} of child 1 {DIV} of body -
trunk/LayoutTests/platform/mac/editing/deleting/delete-br-010-expected.txt
r96264 r96870 20 20 RenderBody {BODY} at (8,8) size 784x584 21 21 RenderBlock {DIV} at (0,0) size 784x56 [border: (2px solid #FF0000)] 22 RenderText {#text} at (14,14) size 40x28 23 text run at (14,14) width 40: "One" 24 RenderText {#text} at (54,14) size 44x28 25 text run at (54,14) width 44: "Two" 22 RenderText {#text} at (14,14) size 84x28 23 text run at (14,14) width 84: "OneTwo" 26 24 RenderBlock (anonymous) at (0,56) size 784x0 27 25 caret: position 3 of child 0 {#text} of child 1 {DIV} of body -
trunk/LayoutTests/platform/mac/editing/deleting/delete-line-012-expected.txt
r96264 r96870 25 25 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 26 26 EDITING DELEGATE: shouldDeleteDOMRange:range from 10 of #text > DIV > BODY > HTML > #document to 2 of DIV > BODY > HTML > #document 27 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 2 of BODY > HTML > #document toDOMRange:range from 10 of #text > DIV > BODY > HTML > #document to 10 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE27 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 10 of #text > DIV > BODY > HTML > #document to 2 of BODY > HTML > #document toDOMRange:range from 10 of #text > DIV > BODY > HTML > #document to 10 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 28 28 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 29 29 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 34 34 RenderBody {BODY} at (8,8) size 784x584 35 35 RenderBlock {DIV} at (0,0) size 600x28 36 RenderText {#text} at (0,0) size 96x28 37 text run at (0,0) width 96: "There is a" 38 RenderText {#text} at (96,0) size 241x28 39 text run at (96,0) width 241: "Which taken at the flood" 36 RenderText {#text} at (0,0) size 337x28 37 text run at (0,0) width 337: "There is aWhich taken at the flood" 40 38 caret: position 10 of child 0 {#text} of child 1 {DIV} of body -
trunk/LayoutTests/platform/mac/editing/deleting/delete-listitem-001-expected.txt
r96264 r96870 18 18 EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > LI > UL > DIV > BODY > HTML > #document to 1 of #text > LI > UL > DIV > BODY > HTML > #document 19 19 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 20 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of LI > UL > DIV > BODY > HTML > #document to 0 of LI > UL > DIV > BODY > HTML > #document toDOMRange:range from 0 of LI > UL > DIV > BODY > HTML > #document to 0 of LI > UL > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE21 20 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 22 21 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 33 32 RenderBlock {UL} at (14,38) size 756x84 34 33 RenderListItem {LI} at (40,0) size 716x28 35 RenderText {#text} at (0,0) size 35x28 36 text run at (0,0) width 35: "one" 37 RenderText {#text} at (35,0) size 49x28 38 text run at (35,0) width 49: "three" 34 RenderText {#text} at (0,0) size 84x28 35 text run at (0,0) width 84: "onethree" 39 36 RenderListItem {LI} at (40,28) size 716x28 40 37 RenderText {#text} at (0,0) size 40x28 -
trunk/LayoutTests/platform/mac/editing/deleting/merge-whitespace-pre-expected.txt
r95745 r96870 11 11 RenderBlock {DIV} at (0,52) size 784x46 12 12 RenderBlock {DIV} at (0,0) size 784x18 13 RenderText {#text} at (0,0) size 21x18 14 text run at (0,0) width 21: "foo" 15 RenderInline {SPAN} at (0,0) size 24x15 16 RenderText {#text} at (21,2) size 24x15 17 text run at (21,2) width 24: "bar" 13 RenderText {#text} at (0,0) size 41x18 14 text run at (0,0) width 41: "foobar" 18 15 RenderBlock {PRE} at (0,31) size 784x15 19 16 RenderText {#text} at (0,0) size 24x15 -
trunk/LayoutTests/platform/mac/editing/inserting/multiple-lines-selected-expected.txt
r96264 r96870 5 5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 6 6 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 7 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 7 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 8 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of DIV > DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 8 9 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 9 10 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification -
trunk/LayoutTests/platform/mac/editing/pasteboard/5032095-expected.txt
r63291 r96870 10 10 text run at (0,18) width 145: "see 'helloworld' below." 11 11 RenderBlock {DIV} at (0,52) size 784x18 12 RenderText {#text} at (0,0) size 31x18 13 text run at (0,0) width 31: "hello" 14 RenderText {#text} at (31,0) size 37x18 15 text run at (31,0) width 37: "world" 16 caret: position 5 of child 1 {#text} of child 2 {DIV} of body 12 RenderText {#text} at (0,0) size 68x18 13 text run at (0,0) width 68: "helloworld" 14 caret: position 10 of child 0 {#text} of child 2 {DIV} of body -
trunk/LayoutTests/platform/mac/editing/pasteboard/merge-after-delete-1-expected.txt
r96264 r96870 5 5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 6 6 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 7 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0of #text > DIV > DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE7 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 8 8 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 9 9 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 29 29 RenderBlock {DIV} at (2,158) size 780x48 [border: (1px solid #000000)] 30 30 RenderBlock {DIV} at (3,3) size 774x20 [border: (1px solid #FF0000)] 31 RenderText {#text} at (1,1) size 8x18 32 text run at (1,1) width 8: "b" 33 RenderText {#text} at (9,1) size 21x18 34 text run at (9,1) width 21: "foo" 31 RenderText {#text} at (1,1) size 29x18 32 text run at (1,1) width 29: "bfoo" 35 33 RenderBlock {DIV} at (3,25) size 774x20 [border: (1px solid #000000)] 36 34 RenderText {#text} at (1,1) size 20x18 -
trunk/LayoutTests/platform/mac/editing/pasteboard/merge-after-delete-2-expected.txt
r96264 r96870 5 5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 6 6 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 7 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0of #text > DIV > DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE7 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 8 8 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 9 9 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 29 29 RenderBlock {DIV} at (2,158) size 780x48 [border: (1px solid #000000)] 30 30 RenderBlock {DIV} at (3,3) size 774x20 [border: (1px solid #FF0000)] 31 RenderText {#text} at (1,1) size 8x18 32 text run at (1,1) width 8: "b" 33 RenderText {#text} at (9,1) size 21x18 34 text run at (9,1) width 21: "foo" 31 RenderText {#text} at (1,1) size 29x18 32 text run at (1,1) width 29: "bfoo" 35 33 RenderBlock (anonymous) at (1,25) size 778x0 36 34 RenderBlock {DIV} at (3,25) size 774x20 [border: (1px solid #000000)] -
trunk/LayoutTests/platform/mac/editing/pasteboard/merge-after-delete-expected.txt
r96264 r96870 5 5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 6 6 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 7 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0of #text > DIV > DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE7 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 8 8 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 9 9 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 15 15 RenderBlock {DIV} at (4,0) size 776x54 [border: (1px solid #0000FF)] 16 16 RenderBlock {DIV} at (5,5) size 766x20 [border: (1px solid #0000FF)] 17 RenderText {#text} at (1,1) size 5x18 18 text run at (1,1) width 5: "f" 19 RenderText {#text} at (6,1) size 21x18 20 text run at (6,1) width 21: "foo" 17 RenderText {#text} at (1,1) size 26x18 18 text run at (1,1) width 26: "ffoo" 21 19 RenderBlock (anonymous) at (1,29) size 774x0 22 20 RenderBlock {DIV} at (5,29) size 766x20 [border: (1px solid #0000FF)] -
trunk/LayoutTests/platform/mac/editing/pasteboard/merge-end-blockquote-expected.txt
r96264 r96870 2 2 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification 3 3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 4 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 16 of #text > DIV > BODY > HTML > #document to 16 of #text >DIV > BODY > HTML > #document toDOMRange:range from 16 of #text > DIV > BODY > HTML > #document to 16 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE4 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 16 of #text > DIV > BODY > HTML > #document to 16 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 5 5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 6 6 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 7 EDITING DELEGATE: shouldEndEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 2of DIV > BODY > HTML > #document7 EDITING DELEGATE: shouldEndEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document 8 8 EDITING DELEGATE: webViewDidEndEditing:WebViewDidEndEditingNotification 9 9 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document … … 12 12 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 13 13 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 14 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 1 of #text > DIV > BLOCKQUOTE > DIV > BODY > HTML > #document to 11 of #text > DIV > BLOCKQUOTE > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > BLOCKQUOTE > DIV > BODY > HTML > #document to 3of #text > DIV > BLOCKQUOTE > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE14 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 14 of #text > DIV > BLOCKQUOTE > DIV > BODY > HTML > #document to 14 of #text > DIV > BLOCKQUOTE > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > BLOCKQUOTE > DIV > BODY > HTML > #document to 4 of #text > DIV > BLOCKQUOTE > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 15 15 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 16 16 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 25 25 text run at (397,0) width 209: "Blockquoting should be stripped." 26 26 RenderBlock {DIV} at (0,34) size 784x18 27 RenderText {#text} at (0,0) size 114x18 28 text run at (0,0) width 114: "Blockquoted Text" 29 RenderText {#text} at (114,0) size 8x18 30 text run at (114,0) width 8: "x" 27 RenderText {#text} at (0,0) size 122x18 28 text run at (0,0) width 122: "Blockquoted Textx" 31 29 RenderBlock {P} at (0,68) size 784x36 32 30 RenderText {#text} at (0,0) size 759x36 … … 37 35 RenderBlock {BLOCKQUOTE} at (40,0) size 704x18 38 36 RenderBlock {DIV} at (0,0) size 704x18 39 RenderText {#text} at (0,0) size 81x18 40 text run at (0,0) width 81: "Blockquoted" 41 RenderText {#text} at (81,0) size 21x18 42 text run at (81,0) width 21: "foo" 37 RenderText {#text} at (0,0) size 102x18 38 text run at (0,0) width 102: "Blockquotedfoo" 43 39 RenderBlock (anonymous) at (0,34) size 784x0 44 40 RenderBlock {BLOCKQUOTE} at (40,34) size 704x18 45 41 RenderBlock {DIV} at (0,0) size 704x18 46 RenderText {#text} at (0,0) size 20x18 47 text run at (0,0) width 20: "bar" 48 RenderText {#text} at (20,0) size 29x18 49 text run at (20,0) width 29: "Text" 50 caret: position 3 of child 0 {#text} of child 0 {DIV} of child 1 {BLOCKQUOTE} of child 10 {DIV} of body 42 RenderText {#text} at (0,0) size 49x18 43 text run at (0,0) width 49: "barText" 44 caret: position 4 of child 0 {#text} of child 0 {DIV} of child 1 {BLOCKQUOTE} of child 10 {DIV} of body -
trunk/LayoutTests/platform/mac/editing/pasteboard/paste-blockquote-into-blockquote-4-expected.txt
r63291 r96870 12 12 text run at (22,0) width 33: "Paste" 13 13 RenderBR {BR} at (55,14) size 0x0 14 RenderText {#text} at (22,18) size 31x18 15 text run at (22,18) width 31: "Here" 16 RenderText {#text} at (53,18) size 27x18 17 text run at (53,18) width 27: "One" 14 RenderText {#text} at (22,18) size 58x18 15 text run at (22,18) width 58: "HereOne" 18 16 RenderBlock (anonymous) at (0,36) size 784x18 19 17 RenderText {#text} at (0,0) size 30x18 -
trunk/LayoutTests/platform/mac/editing/pasteboard/paste-match-style-001-expected.txt
r96264 r96870 12 12 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 13 13 EDITING DELEGATE: shouldInsertText:b replacingDOMRange:range from 1 of #text > B > DIV > DIV > BODY > HTML > #document to 1 of #text > B > DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionPasted 14 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > B > DIV > DIV > BODY > HTML > #document to 1 of #text > B > DIV > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > B > DIV > DIV > BODY > HTML > #document to 2of #text > B > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE14 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > B > DIV > DIV > BODY > HTML > #document to 1 of #text > B > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 15 15 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 16 16 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 42 42 RenderBlock {DIV} at (0,0) size 784x32 [border: (2px solid #FF0000)] 43 43 RenderInline {B} at (0,0) size 25x28 44 RenderText {#text} at (2,2) size 25x28 45 text run at (2,2) width 25: "ab" 46 caret: position 2 of child 0 {#text} of child 0 {B} of child 1 {DIV} of child 3 {DIV} of body 44 RenderText {#text} at (2,2) size 12x28 45 text run at (2,2) width 12: "a" 46 RenderText {#text} at (14,2) size 13x28 47 text run at (14,2) width 13: "b" 48 RenderBlock (anonymous) at (0,32) size 784x0 49 RenderText {#text} at (0,0) size 0x0 50 caret: position 1 of child 1 {#text} of child 0 {B} of child 1 {DIV} of child 3 {DIV} of body -
trunk/Source/WebCore/ChangeLog
r96868 r96870 1 2011-10-05 Ryosuke Niwa <rniwa@webkit.org> 2 3 Deleting line break before h1 converts h1 to span 4 https://bugs.webkit.org/show_bug.cgi?id=45784 5 6 Reviewed by Enrica Casucci. 7 8 This patch fundamentally alters the kind of styles we preserve while merging or moving paragraphs. 9 StylizedMarkupAccumulator no longer wraps nodes by computed style when it's not annotating for interchange. 10 Instead, it accumulates implicit and inline styles of ancestors of the serialized contents. 11 12 The most significant code change is in StyledMarkupAccumulator::serializeNodes where we setup m_wrappingStyle 13 by merging implicit and inline style of ancestors with mergeInlineAndImplicitStyleOfElement. Because it walks up 14 the DOM tree upwards, it should not be overriding any CSS properties. Consequently, mergeStyle, 15 mergeInlineStyleOfElement, and mergeInlineAndImplicitStyleOfElement are modified to take CSSPropertyOverrideMode. 16 17 New behavior matches that of Internet Explorer and Firefox when merging paragraphs. 18 19 Tests: editing/deleting/merge-paragraph-from-address.html 20 editing/deleting/merge-paragraph-from-h6-with-style-2.html 21 editing/deleting/merge-paragraph-from-h6-with-style.html 22 editing/deleting/merge-paragraph-from-h6.html 23 editing/deleting/merge-paragraph-from-listing.html 24 editing/deleting/merge-paragraph-from-p-with-style-2.html 25 editing/deleting/merge-paragraph-from-p-with-style-3.html 26 editing/deleting/merge-paragraph-from-p-with-style.html 27 editing/deleting/merge-paragraph-into-h1-with-style.html 28 editing/deleting/merge-paragraph-into-h1.html 29 editing/deleting/merge-paragraph-into-pre.html 30 31 * css/CSSValueList.cpp: 32 (WebCore::CSSValueList::hasValue): Made const. 33 * css/CSSValueList.h: 34 * editing/ApplyStyleCommand.cpp: 35 (WebCore::ApplyStyleCommand::removeInlineStyleFromElement): Calls mergeInlineStyleOfElement. 36 (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown): Ditto. 37 * editing/EditingStyle.cpp: 38 (WebCore::copyEditingProperties): Takes a boolean includeBackgroundColor. 39 (WebCore::isEditingProperty): Extracted from elementIsStyledSpanOrHTMLEquivalent. 40 (WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent): Calls isEditingProperty. 41 (WebCore::EditingStyle::mergeTypingStyle): Calls mergeStyle. 42 (WebCore::EditingStyle::mergeInlineStyleOfElement): Takes CSSPropertyOverrideMode. 43 (WebCore::elementMatchesAndPropertyIsNotInInlineStyleDecl): Added. 44 (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement): Added. 45 (WebCore::mergeTextDecorationValues): Extracted from mergeStyle. 46 (WebCore::EditingStyle::mergeStyle): Takes CSSPropertyOverrideMode. 47 * editing/EditingStyle.h: 48 * editing/ReplaceSelectionCommand.cpp: 49 (WebCore::nodeToSplitToAvoidPastingIntoInlineNodesWithStyle): Extracted from doApply. 50 (WebCore::ReplaceSelectionCommand::doApply): Calls nodeToSplitToAvoidPastingIntoInlineNodesWithStyle. 51 (WebCore::ReplaceSelectionCommand::performTrivialReplace): Exit early when we need to split the tree to avoid 52 pasting into inline nodes with style. Also remove a collapsed or spurious br. 53 * editing/markup.cpp: 54 (WebCore::StyledMarkupAccumulator::serializeNodes): 55 1 56 2011-10-06 Abhishek Arya <inferno@chromium.org> 2 57 -
trunk/Source/WebCore/css/CSSValueList.cpp
r92106 r96870 77 77 } 78 78 79 bool CSSValueList::hasValue(CSSValue* val) 79 bool CSSValueList::hasValue(CSSValue* val) const 80 80 { 81 81 // FIXME: we should be implementing operator== to CSSValue and its derived classes -
trunk/Source/WebCore/css/CSSValueList.h
r92106 r96870 54 54 void prepend(PassRefPtr<CSSValue>); 55 55 bool removeAll(CSSValue*); 56 bool hasValue(CSSValue*) ;56 bool hasValue(CSSValue*) const; 57 57 PassRefPtr<CSSValueList> copy(); 58 58 -
trunk/Source/WebCore/editing/ApplyStyleCommand.cpp
r94840 r96870 820 820 return true; 821 821 ASSERT(extractedStyle); 822 extractedStyle->mergeInlineStyleOfElement(element.get() );822 extractedStyle->mergeInlineStyleOfElement(element.get(), EditingStyle::OverrideValues); 823 823 removeNodePreservingChildren(element); 824 824 return true; … … 938 938 if (node->isHTMLElement() && static_cast<HTMLElement*>(node)->inlineStyleDecl()) { 939 939 newInlineStyle = style->copy(); 940 newInlineStyle->mergeInlineStyleOfElement(static_cast<HTMLElement*>(node) );940 newInlineStyle->mergeInlineStyleOfElement(static_cast<HTMLElement*>(node), EditingStyle::OverrideValues); 941 941 } 942 942 -
trunk/Source/WebCore/editing/EditingStyle.cpp
r95901 r96870 1 1 /* 2 2 * Copyright (C) 2007, 2008, 2009 Apple Computer, Inc. 3 * Copyright (C) 2010 Google Inc. All rights reserved.3 * Copyright (C) 2010, 2011 Google Inc. All rights reserved. 4 4 * 5 5 * Redistribution and use in source and binary forms, with or without … … 53 53 // Editing style properties must be preserved during editing operation. 54 54 // e.g. when a user inserts a new paragraph, all properties listed here must be copied to the new paragraph. 55 static const int editingInheritableProperties[] = { 55 static const int editingProperties[] = { 56 CSSPropertyBackgroundColor, 57 56 58 // CSS inheritable properties 57 59 CSSPropertyColor, … … 76 78 CSSPropertyWebkitTextStrokeWidth, 77 79 }; 78 size_t numEditingInheritableProperties = WTF_ARRAY_LENGTH(editingInheritableProperties); 79 80 static PassRefPtr<CSSMutableStyleDeclaration> copyEditingProperties(CSSStyleDeclaration* style) 81 { 82 return style->copyPropertiesInSet(editingInheritableProperties, numEditingInheritableProperties); 80 81 static PassRefPtr<CSSMutableStyleDeclaration> copyEditingProperties(CSSStyleDeclaration* style, bool includeBackgroundColor = false) 82 { 83 if (includeBackgroundColor) 84 return style->copyPropertiesInSet(editingProperties, WTF_ARRAY_LENGTH(editingProperties)); 85 return style->copyPropertiesInSet(editingProperties + 1, WTF_ARRAY_LENGTH(editingProperties) - 1); 86 } 87 88 static inline bool isEditingProperty(int id) 89 { 90 for (size_t i = 0; i < WTF_ARRAY_LENGTH(editingProperties); ++i) { 91 if (editingProperties[i] == id) 92 return true; 93 } 94 return false; 83 95 } 84 96 … … 102 114 virtual bool matches(const Element* element) const { return !m_tagName || element->hasTagName(*m_tagName); } 103 115 virtual bool hasAttribute() const { return false; } 104 virtual bool propertyExistsInStyle(CSSStyleDeclaration* style) const { return style ->getPropertyCSSValue(m_propertyID); }116 virtual bool propertyExistsInStyle(CSSStyleDeclaration* style) const { return style && style->getPropertyCSSValue(m_propertyID); } 105 117 virtual bool valueIsPresentInStyle(Element*, CSSStyleDeclaration*) const; 106 118 virtual void addToStyle(Element*, EditingStyle*) const; … … 785 797 CSSMutableStyleDeclaration::const_iterator end = style->end(); 786 798 for (CSSMutableStyleDeclaration::const_iterator it = style->begin(); it != end; ++it) { 787 bool matched = false; 788 for (size_t i = 0; i < numEditingInheritableProperties; ++i) { 789 if (editingInheritableProperties[i] == it->id()) { 790 matched = true; 791 break; 792 } 793 } 794 if (!matched && it->id() != CSSPropertyBackgroundColor) 799 if (!isEditingProperty(it->id())) 795 800 return false; 796 801 } … … 844 849 return; 845 850 846 mergeStyle(typingStyle->style() );847 } 848 849 void EditingStyle::mergeInlineStyleOfElement(StyledElement* element )851 mergeStyle(typingStyle->style(), OverrideValues); 852 } 853 854 void EditingStyle::mergeInlineStyleOfElement(StyledElement* element, CSSPropertyOverrideMode mode, PropertiesToInclude propertiesToInclude) 850 855 { 851 856 ASSERT(element); 852 mergeStyle(element->inlineStyleDecl()); 853 } 854 855 void EditingStyle::mergeStyle(CSSMutableStyleDeclaration* style) 857 if (!element->inlineStyleDecl()) 858 return; 859 860 switch (propertiesToInclude) { 861 case AllProperties: 862 mergeStyle(element->inlineStyleDecl(), mode); 863 return; 864 case OnlyEditingInheritableProperties: 865 case EditingInheritablePropertiesAndBackgroundColorInEffect: 866 mergeStyle(copyEditingProperties(element->inlineStyleDecl(), propertiesToInclude == EditingInheritablePropertiesAndBackgroundColorInEffect).get(), mode); 867 return; 868 } 869 } 870 871 static inline bool elementMatchesAndPropertyIsNotInInlineStyleDecl(const HTMLElementEquivalent* equivalent, const StyledElement* element, 872 EditingStyle::CSSPropertyOverrideMode mode, CSSMutableStyleDeclaration* style) 873 { 874 return equivalent->matches(element) && !equivalent->propertyExistsInStyle(element->inlineStyleDecl()) 875 && (mode == EditingStyle::OverrideValues || !equivalent->propertyExistsInStyle(style)); 876 } 877 878 void EditingStyle::mergeInlineAndImplicitStyleOfElement(StyledElement* element, CSSPropertyOverrideMode mode, PropertiesToInclude propertiesToInclude) 879 { 880 mergeInlineStyleOfElement(element, mode, propertiesToInclude); 881 882 const Vector<OwnPtr<HTMLElementEquivalent> >& elementEquivalents = htmlElementEquivalents(); 883 for (size_t i = 0; i < elementEquivalents.size(); ++i) { 884 if (elementMatchesAndPropertyIsNotInInlineStyleDecl(elementEquivalents[i].get(), element, mode, m_mutableStyle.get())) 885 elementEquivalents[i]->addToStyle(element, this); 886 } 887 888 const Vector<OwnPtr<HTMLAttributeEquivalent> >& attributeEquivalents = htmlAttributeEquivalents(); 889 for (size_t i = 0; i < attributeEquivalents.size(); ++i) { 890 if (elementMatchesAndPropertyIsNotInInlineStyleDecl(attributeEquivalents[i].get(), element, mode, m_mutableStyle.get())) 891 attributeEquivalents[i]->addToStyle(element, this); 892 } 893 } 894 895 static void mergeTextDecorationValues(CSSValueList* mergedValue, const CSSValueList* valueToMerge) 896 { 897 DEFINE_STATIC_LOCAL(const RefPtr<CSSPrimitiveValue>, underline, (CSSPrimitiveValue::createIdentifier(CSSValueUnderline))); 898 DEFINE_STATIC_LOCAL(const RefPtr<CSSPrimitiveValue>, lineThrough, (CSSPrimitiveValue::createIdentifier(CSSValueLineThrough))); 899 900 if (valueToMerge->hasValue(underline.get()) && !mergedValue->hasValue(underline.get())) 901 mergedValue->append(underline.get()); 902 903 if (valueToMerge->hasValue(lineThrough.get()) && !mergedValue->hasValue(lineThrough.get())) 904 mergedValue->append(lineThrough.get()); 905 } 906 907 void EditingStyle::mergeStyle(CSSMutableStyleDeclaration* style, CSSPropertyOverrideMode mode) 856 908 { 857 909 if (!style) … … 865 917 CSSMutableStyleDeclaration::const_iterator end = style->end(); 866 918 for (CSSMutableStyleDeclaration::const_iterator it = style->begin(); it != end; ++it) { 867 RefPtr<CSSValue> value; 868 if ((it->id() == CSSPropertyTextDecoration || it->id() == CSSPropertyWebkitTextDecorationsInEffect) && it->value()->isValueList()) { 869 value = m_mutableStyle->getPropertyCSSValue(it->id()); 870 if (value && !value->isValueList()) 871 value = 0; 919 RefPtr<CSSValue> value = m_mutableStyle->getPropertyCSSValue(it->id()); 920 ExceptionCode ec; 921 922 // text decorations never override values 923 if ((it->id() == CSSPropertyTextDecoration || it->id() == CSSPropertyWebkitTextDecorationsInEffect) && it->value()->isValueList() && value) { 924 if (value->isValueList()) { 925 mergeTextDecorationValues(static_cast<CSSValueList*>(value.get()), static_cast<CSSValueList*>(it->value())); 926 continue; 927 } 928 value = 0; // text-decoration: none is equivalent to not having the property 872 929 } 873 930 874 if (!value) { 875 ExceptionCode ec; 931 if (mode == OverrideValues || (mode == DoNotOverrideValues && !value)) 876 932 m_mutableStyle->setProperty(it->id(), it->value()->cssText(), it->isImportant(), ec); 877 continue;878 }879 880 CSSValueList* newTextDecorations = static_cast<CSSValueList*>(it->value());881 CSSValueList* textDecorations = static_cast<CSSValueList*>(value.get());882 883 DEFINE_STATIC_LOCAL(const RefPtr<CSSPrimitiveValue>, underline, (CSSPrimitiveValue::createIdentifier(CSSValueUnderline)));884 DEFINE_STATIC_LOCAL(const RefPtr<CSSPrimitiveValue>, lineThrough, (CSSPrimitiveValue::createIdentifier(CSSValueLineThrough)));885 886 if (newTextDecorations->hasValue(underline.get()) && !textDecorations->hasValue(underline.get()))887 textDecorations->append(underline.get());888 889 if (newTextDecorations->hasValue(lineThrough.get()) && !textDecorations->hasValue(lineThrough.get()))890 textDecorations->append(lineThrough.get());891 933 } 892 934 } -
trunk/Source/WebCore/editing/EditingStyle.h
r95901 r96870 124 124 void prepareToApplyAt(const Position&, ShouldPreserveWritingDirection = DoNotPreserveWritingDirection); 125 125 void mergeTypingStyle(Document*); 126 void mergeInlineStyleOfElement(StyledElement*); 126 enum CSSPropertyOverrideMode { OverrideValues, DoNotOverrideValues }; 127 void mergeInlineStyleOfElement(StyledElement*, CSSPropertyOverrideMode, PropertiesToInclude = AllProperties); 128 void mergeInlineAndImplicitStyleOfElement(StyledElement*, CSSPropertyOverrideMode, PropertiesToInclude); 127 129 void mergeStyleFromRules(StyledElement*); 128 130 void mergeStyleFromRulesForSerialization(StyledElement*); … … 147 149 void extractFontSizeDelta(); 148 150 bool conflictsWithInlineStyleOfElement(StyledElement*, EditingStyle* extractedStyle, Vector<CSSPropertyID>* conflictingProperties) const; 149 void mergeStyle(CSSMutableStyleDeclaration* );151 void mergeStyle(CSSMutableStyleDeclaration*, CSSPropertyOverrideMode); 150 152 151 153 RefPtr<CSSMutableStyleDeclaration> m_mutableStyle; -
trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp
r96553 r96870 1 1 /* 2 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 755 756 } 756 757 758 inline Node* nodeToSplitToAvoidPastingIntoInlineNodesWithStyle(const Position& insertionPos) 759 { 760 Node* containgBlock = enclosingBlock(insertionPos.containerNode()); 761 return highestEnclosingNodeOfType(insertionPos, isInlineNodeWithStyle, CannotCrossEditingBoundary, containgBlock); 762 } 763 757 764 void ReplaceSelectionCommand::doApply() 758 765 { … … 908 915 } 909 916 910 if (RefPtr<Node> nodeToSplitTo = highestEnclosingNodeOfType(insertionPos, isInlineNodeWithStyle, CannotCrossEditingBoundary, 911 enclosingBlock(insertionPos.containerNode()))) { 917 if (RefPtr<Node> nodeToSplitTo = nodeToSplitToAvoidPastingIntoInlineNodesWithStyle(insertionPos)) { 912 918 if (insertionPos.containerNode() != nodeToSplitTo->parentNode()) { 913 919 nodeToSplitTo = splitTreeToNode(insertionPos.anchorNode(), nodeToSplitTo->parentNode()).get(); … … 1267 1273 if (m_smartReplace || fragment.hasInterchangeNewlineAtStart() || fragment.hasInterchangeNewlineAtEnd()) 1268 1274 return false; 1269 1275 1276 // e.g. when "bar" is inserted after "foo" in <div><u>foo</u></div>, "bar" should not be underlined. 1277 if (nodeToSplitToAvoidPastingIntoInlineNodesWithStyle(endingSelection().start())) 1278 return false; 1279 1280 Node* nodeAfterInsertionPos = endingSelection().end().downstream().anchorNode(); 1270 1281 Text* textNode = static_cast<Text*>(fragment.firstChild()); 1271 1282 // Our fragment creation code handles tabs, spaces, and newlines, so we don't have to worry about those here. … … 1276 1287 return false; 1277 1288 1289 if (nodeAfterInsertionPos && nodeAfterInsertionPos->hasTagName(brTag) && shouldRemoveEndBR(nodeAfterInsertionPos, positionBeforeNode(nodeAfterInsertionPos))) 1290 removeNodeAndPruneAncestors(nodeAfterInsertionPos); 1291 1278 1292 VisibleSelection selectionAfterReplace(m_selectReplacement ? start : end, end); 1279 1293 -
trunk/Source/WebCore/editing/markup.cpp
r95745 r96870 1 1 /* 2 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2008, 2009 Google Inc.3 * Copyright (C) 2008, 2009, 2010, 2011 Google Inc. All rights reserved. 4 4 * Copyright (C) 2011 Igalia S.L. 5 5 * Copyright (C) 2011 Motorola Mobility. All rights reserved. … … 344 344 } 345 345 346 Node* parentOfHighestNode = m_highestNodeToBeSerialized ? m_highestNodeToBeSerialized->parentNode() : 0; 347 if (parentOfHighestNode) { 348 m_wrappingStyle = EditingStyle::create(parentOfHighestNode, EditingStyle::EditingInheritablePropertiesAndBackgroundColorInEffect); 349 350 // Styles that Mail blockquotes contribute should only be placed on the Mail blockquote, 351 // to help us differentiate those styles from ones that the user has applied. 352 // This helps us get the color of content pasted into blockquotes right. 353 m_wrappingStyle->removeStyleAddedByNode(enclosingNodeOfType(firstPositionInOrBeforeNode(parentOfHighestNode), isMailBlockquote, CanCrossEditingBoundary)); 354 355 // Call collapseTextDecorationProperties first or otherwise it'll copy the value over from in-effect to text-decorations. 356 m_wrappingStyle->collapseTextDecorationProperties(); 346 if (Node* parentOfHighestNode = m_highestNodeToBeSerialized ? m_highestNodeToBeSerialized->parentNode() : 0) { 347 if (shouldAnnotate()) { 348 m_wrappingStyle = EditingStyle::create(parentOfHighestNode, EditingStyle::EditingInheritablePropertiesAndBackgroundColorInEffect); 349 350 // Styles that Mail blockquotes contribute should only be placed on the Mail blockquote, 351 // to help us differentiate those styles from ones that the user has applied. 352 // This helps us get the color of content pasted into blockquotes right. 353 m_wrappingStyle->removeStyleAddedByNode(enclosingNodeOfType(firstPositionInOrBeforeNode(parentOfHighestNode), isMailBlockquote, CanCrossEditingBoundary)); 354 355 // Call collapseTextDecorationProperties first or otherwise it'll copy the value over from in-effect to text-decorations. 356 m_wrappingStyle->collapseTextDecorationProperties(); 357 } else { 358 m_wrappingStyle = EditingStyle::create(); 359 360 // When not annotating for interchange, we only preserve inline style declarations. 361 for (Node* node = parentOfHighestNode; node && !node->isDocumentNode(); node = node->parentNode()) { 362 if (node->isStyledElement()) { 363 m_wrappingStyle->mergeInlineAndImplicitStyleOfElement(static_cast<StyledElement*>(node), EditingStyle::DoNotOverrideValues, 364 EditingStyle::EditingInheritablePropertiesAndBackgroundColorInEffect); 365 } 366 } 367 } 357 368 } 358 369
Note: See TracChangeset
for help on using the changeset viewer.