Changeset 25634 in webkit
- Timestamp:
- Sep 18, 2007 6:39:59 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r25623 r25634 1 2007-09-18 Timothy Hatcher <timothy@apple.com> 2 3 Reviewed by Darin. 4 5 Test for <rdar://problem/5478250> REGRESSION: After pasting text copied from Mail subject and typing return, the cursor disappears because of negative left margin 6 7 * editing/pasteboard/5478250.html: Added. 8 * platform/mac/editing/pasteboard/5478250-expected.txt: Added. 9 10 Updated results that are affected by the style span being removed or added with different style properties. 11 12 * editing/execCommand/5144139-1-expected.txt: 13 * editing/execCommand/create-list-with-hr-expected.txt: 14 * editing/pasteboard/merge-end-blockquote-expected.txt: 15 * editing/pasteboard/styled-element-markup-expected.txt: 16 1 17 2007-09-18 Sam Weinig <sam@webkit.org> 2 18 -
trunk/LayoutTests/editing/execCommand/5144139-1-expected.txt
r25533 r25634 11 11 RenderBlock {UL} at (0,0) size 784x46 12 12 RenderListItem {LI} at (40,0) size 744x46 13 RenderBlock (anonymous) at (0,0) size 744x18 14 RenderListMarker at (-17,0) size 7x18: bullet 15 RenderTable {TABLE} at (0,18) size 31x28 [border: (1px outset #808080)] 13 RenderTable {TABLE} at (0,0) size 31x28 [border: (1px outset #808080)] 16 14 RenderTableSection {TBODY} at (1,1) size 29x26 17 15 RenderTableRow {TR} at (0,2) size 29x22 … … 19 17 RenderText {#text} at (2,2) size 21x18 20 18 text run at (2,2) width 21: "foo" 21 RenderBlock (anonymous) at (0,46) size 744x0 19 RenderBlock (anonymous) at (0,28) size 744x18 20 RenderListMarker at (-17,0) size 7x18: bullet 22 21 RenderBlock (anonymous) at (0,62) size 784x0 23 22 selection start: position 0 of child 0 {TABLE} of child 0 {LI} of child 0 {UL} of child 2 {DIV} of child 0 {BODY} of child 0 {HTML} of document -
trunk/LayoutTests/editing/execCommand/create-list-with-hr-expected.txt
r20950 r25634 23 23 RenderBlock {UL} at (0,0) size 784x28 24 24 RenderListItem {LI} at (40,0) size 744x28 25 RenderBlock (anonymous) at (0,0) size 744x026 25 RenderBlock {HR} at (0,0) size 744x2 [border: (1px inset #000000)] 27 26 RenderBlock (anonymous) at (0,10) size 744x18 -
trunk/LayoutTests/editing/pasteboard/merge-end-blockquote-expected.txt
r20950 r25634 12 12 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 13 13 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 14 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 3 of #text > DIV > BLOCKQUOTE > DIV > BODY > HTML > #document to 3 of #text> DIV > BLOCKQUOTE > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE14 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 3 of #text > SPAN > DIV > BLOCKQUOTE > DIV > BODY > HTML > #document to 3 of #text > SPAN > DIV > BLOCKQUOTE > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 15 15 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 16 16 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 39 39 RenderText {#text} at (0,0) size 81x18 40 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" 41 RenderInline {SPAN} at (0,0) size 21x18 42 RenderText {#text} at (81,0) size 21x18 43 text run at (81,0) width 21: "foo" 43 44 RenderBlock {DIV} at (0,18) size 704x18 44 RenderText {#text} at (0,0) size 20x18 45 text run at (0,0) width 20: "bar" 45 RenderInline {SPAN} at (0,0) size 20x18 46 RenderText {#text} at (0,0) size 20x18 47 text run at (0,0) width 20: "bar" 46 48 RenderText {#text} at (20,0) size 33x18 47 49 text run at (20,0) width 33: " Text" 48 caret: position 3 of child 0 {#text} of child 1 {DIV} of child 0 {BLOCKQUOTE} of child 10 {DIV} of child 1 {BODY} of child 0 {HTML} of document50 caret: position 3 of child 0 {#text} of child 0 {SPAN} of child 1 {DIV} of child 0 {BLOCKQUOTE} of child 10 {DIV} of child 1 {BODY} of child 0 {HTML} of document -
trunk/LayoutTests/editing/pasteboard/styled-element-markup-expected.txt
r20950 r25634 10 10 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 11 11 EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document givenAction:WebViewInsertActionPasted 12 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 1 of SPAN > DIV > BODY > HTML > #document to 1 of SPAN >DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE12 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 1 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 13 13 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 14 14 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 32 32 RenderImage {IMG} at (354,0) size 76x103 33 33 RenderBlock {DIV} at (0,207) size 784x103 34 RenderInline {SPAN} at (0,0) size 76x14 35 RenderImage {IMG} at (0,0) size 76x103 36 caret: position 1 of child 0 {IMG} of child 0 {SPAN} of child 6 {DIV} of child 1 {BODY} of child 0 {HTML} of document 34 RenderImage {IMG} at (0,0) size 76x103 35 caret: position 1 of child 0 {IMG} of child 6 {DIV} of child 1 {BODY} of child 0 {HTML} of document -
trunk/WebCore/ChangeLog
r25632 r25634 1 2007-09-18 Timothy Hatcher <timothy@apple.com> 2 3 Reviewed by Darin. 4 5 <rdar://problem/5478250> REGRESSION: After pasting text copied from Mail subject and typing return, the cursor disappears because of negative left margin 6 7 When pasting text from the Mail subject line, the RTF pasteboard contains text that has a first line negative indent along with a 8 paragraph indent that has a counteracting positive indent. This results in the first line being flush left justified, and the remaining 9 wrapped lines being indented. When this is converted to a DOM fragment, AppKit makes a block element with a margin-left and a negative 10 text-indent that matches the RTF. So far this is all correct behavior. 11 12 When this content is pasted on the line of an existing paragraph that has content, ReplaceSelectionCommand will decided to merge the paragraphs. 13 This will convert the block element to a style span that has all inherited style properties. These inherited properties will still contain block 14 properties that have no affect on inline elements. These block properties will hang around on the style span and will get cloned to new block 15 elements if the user hit return on that line. The new block elements would then have the text-indent but not the margin-left, so the text would be 16 hidden off the left edge of the page. 17 18 In the end, we should never hang on to block-only properties in our style spans. This cuts out meaningless properties and prevents properties 19 from magically affecting blocks later if the style is cloned for a new block element during a future editing operation. 20 21 * editing/ReplaceSelectionCommand.cpp: 22 (WebCore::ReplaceSelectionCommand::removeRedundantStyles): Remove any inherited block properties that are now in the span's style. 23 * editing/markup.cpp: 24 (WebCore::createMarkup): Ditto. 25 1 26 2007-09-18 Dave Hyatt <hyatt@apple.com> 2 27 -
trunk/WebCore/editing/ReplaceSelectionCommand.cpp
r25484 r25634 414 414 RefPtr<CSSMutableStyleDeclaration> style = computedStyle(node)->copyInheritableProperties(); 415 415 parentStyle->diff(style.get()); 416 416 417 // Remove any inherited block properties that are now in the span's style. This cuts out meaningless properties 418 // and prevents properties from magically affecting blocks later if the style is cloned for a new block element 419 // during a future editing operation. 420 style->removeBlockProperties(); 421 417 422 styles.append(style.release()); 418 423 } -
trunk/WebCore/editing/markup.cpp
r25484 r25634 655 655 if (parentOfLastClosed && parentOfLastClosed->renderer()) { 656 656 RefPtr<CSSMutableStyleDeclaration> style = computedStyle(parentOfLastClosed)->copyInheritableProperties(); 657 657 658 // Styles that Mail blockquotes contribute should only be placed on the Mail blockquote, to help 658 659 // us differentiate those styles from ones that the user has applied. This helps us … … 660 661 removeEnclosingMailBlockquoteStyle(style.get(), parentOfLastClosed); 661 662 663 // Since we are converting blocks to inlines, remove any inherited block properties that are in the style. 664 // This cuts out meaningless properties and prevents properties from magically affecting blocks later 665 // if the style is cloned for a new block element during a future editing operation. 666 if (convertBlocksToInlines) 667 style->removeBlockProperties(); 668 662 669 if (style->length() > 0) { 663 670 DeprecatedString openTag = DeprecatedString("<span class=\"") + AppleStyleSpanClass + "\" style=\"" + escapeTextForMarkup(style->cssText(), true) + "\">";
Note: See TracChangeset
for help on using the changeset viewer.