Changeset 87466 in webkit
- Timestamp:
- May 26, 2011 9:18:25 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r87465 r87466 1 2011-05-26 Annie Sullivan <sullivan@chromium.org> 2 3 Reviewed by Ryosuke Niwa. 4 5 Delete table in contentEditable/designMode produces odd contents 6 https://bugs.webkit.org/show_bug.cgi?id=57148 7 8 Add a test for the case given in the bug: deleting an unstyled table 9 should not leave behind a style span. 10 11 Rebaseline tests now that border-collapse, -webkit-border-horizontal-spacing, 12 and -webkit-border-vertical-spacing style spans are no longer added on 13 table and table cell deletion, and no longer applied when copying to the 14 clipboard. 15 16 * editing/deleting/5026848-2-expected.txt: 17 * editing/deleting/5026848-3-expected.txt: 18 * editing/deleting/5032066-expected.txt: 19 * editing/deleting/5115601-expected.txt: 20 * editing/deleting/5206311-2-expected.txt: 21 * editing/deleting/delete-block-table-expected.txt: 22 * editing/deleting/delete-last-char-in-table-expected.txt: Added. 23 * editing/deleting/delete-last-char-in-table.html: Added. New test for bug. 24 * editing/deleting/delete-select-all-001-expected.txt: 25 * editing/pasteboard/data-transfer-items-expected.txt: 26 * editing/pasteboard/onpaste-text-html-expected.txt: 27 * editing/selection/4895428-1-expected.txt: 28 * editing/selection/4895428-4-expected.txt: 29 * fast/events/ondrop-text-html-expected.txt: 30 1 31 2011-05-26 Ryosuke Niwa <rniwa@webkit.org> 2 32 -
trunk/LayoutTests/editing/deleting/5026848-2-expected.txt
r87132 r87466 17 17 | contenteditable="true" 18 18 | "Editable <#selection-caret>" 19 | <span> 20 | class="Apple-style-span" 21 | style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; " 22 | "content" 19 | "content" 23 20 | " 24 21 " -
trunk/LayoutTests/editing/deleting/5026848-3-expected.txt
r87132 r87466 18 18 | contenteditable="true" 19 19 | "Editable <#selection-caret>" 20 | <span> 21 | class="Apple-style-span" 22 | style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; " 23 | "content" 20 | "content" 24 21 | " 25 22 " -
trunk/LayoutTests/editing/deleting/5032066-expected.txt
r87264 r87466 6 6 | <td> 7 7 | "All the content in this editable region <#selection-caret>" 8 | <span> 9 | class="Apple-style-span" 10 | style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; " 11 | "should be in one table cell." 8 | "should be in one table cell." -
trunk/LayoutTests/editing/deleting/5115601-expected.txt
r87263 r87466 11 11 | contenteditable="true" 12 12 | id="start" 13 | <span> 14 | class="Apple-style-span" 15 | style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; " 16 | "<#selection-caret>This sentence should be inside the editable cell." 13 | "<#selection-caret>This sentence should be inside the editable cell." -
trunk/LayoutTests/editing/deleting/5206311-2-expected.txt
r87262 r87466 25 25 | <td> 26 26 | class="start" 27 | <span> 28 | class="Apple-style-span" 29 | style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; " 30 | "<#selection-caret>world!" 27 | "<#selection-caret>world!" 31 28 | <br> 32 29 | <td> -
trunk/LayoutTests/editing/deleting/delete-block-table-expected.txt
r87261 r87466 5 5 bar buffalfter 6 6 execDeleteCommand: <div>Before</div> <table style="border:3px solid #aaa;"> <tbody><tr> <td> Foo </td> <td> baz </td> </tr> <tr> <td> bar </td> <td> buffalo </td> </tr> </tbody></table> <span id="start">fter</span> 7 execDeleteCommand: <div>Before</div> <table style="border:3px solid #aaa;"> <tbody><tr> <td> Foo </td> <td> baz </td> </tr> <tr> <td> bar </td> <td> buffalo <span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; ">fter</span></td></tr></tbody></table>8 execDeleteCommand: <div>Before</div> <table style="border:3px solid #aaa;"> <tbody><tr> <td> Foo </td> <td> baz </td> </tr> <tr> <td> bar </td> <td> buffal <span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; ">fter</span></td></tr></tbody></table>7 execDeleteCommand: <div>Before</div> <table style="border:3px solid #aaa;"> <tbody><tr> <td> Foo </td> <td> baz </td> </tr> <tr> <td> bar </td> <td> buffalofter</td></tr></tbody></table> 8 execDeleteCommand: <div>Before</div> <table style="border:3px solid #aaa;"> <tbody><tr> <td> Foo </td> <td> baz </td> </tr> <tr> <td> bar </td> <td> buffalfter</td></tr></tbody></table> -
trunk/LayoutTests/editing/deleting/delete-select-all-001-expected.txt
r67170 r87466 1 1 2 execDeleteCommand: <font class="Apple-style-span" size="3">< span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><br></span></font>2 execDeleteCommand: <font class="Apple-style-span" size="3"><br></font> -
trunk/LayoutTests/editing/pasteboard/data-transfer-items-expected.txt
r81632 r87466 21 21 copy: items[0] value: Hello World! 22 22 copy: items[1] value: <b>Hello World! 23 paste: items[0] value: <span class="Apple-style-span" style=" border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">This file tests the basic functionality and properties of DataTransferItems. This test requires DRT.</span>23 paste: items[0] value: <span class="Apple-style-span" style="color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">This file tests the basic functionality and properties of DataTransferItems. This test requires DRT.</span> 24 24 paste: items[1] value: This file tests the basic functionality and properties of DataTransferItems. This test requires DRT. 25 25 -
trunk/LayoutTests/editing/pasteboard/onpaste-text-html-expected.txt
r66589 r87466 1 1 CONSOLE MESSAGE: line 21: text/plain: This test verifies that we can get text/html from the clipboard during an onpaste event. 2 CONSOLE MESSAGE: line 23: text/html: <span class="Apple-style-span" style=" border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">This test verifies that we can get text/html from the clipboard during an onpaste event.<span class="Apple-converted-space"> </span></span>2 CONSOLE MESSAGE: line 23: text/html: <span class="Apple-style-span" style="color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">This test verifies that we can get text/html from the clipboard during an onpaste event.<span class="Apple-converted-space"> </span></span> 3 3 This test verifies that we can get text/html from the clipboard during an onpaste event. This test requires DRT. 4 4 Paste content in this div.This test verifies that we can get text/html from the clipboard during an onpaste event. -
trunk/LayoutTests/editing/selection/4895428-1-expected.txt
r87270 r87466 6 6 | id="source" 7 7 | style="border: 1px solid blue;" 8 | <span> 9 | class="Apple-style-span" 10 | style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;" 11 | <br> 8 | <br> 12 9 | " 13 10 " -
trunk/LayoutTests/editing/selection/4895428-4-expected.txt
r87270 r87466 8 8 | " 9 9 " 10 | <span> 11 | class="Apple-style-span" 12 | style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;" 13 | <br> 10 | <br> 14 11 | " 15 12 " -
trunk/LayoutTests/fast/events/ondrop-text-html-expected.txt
r66589 r87466 1 1 CONSOLE MESSAGE: line 21: text/plain: This test verifies that we can get text/html from the drag object during an ondrop event. 2 CONSOLE MESSAGE: line 23: text/html: <span class="Apple-style-span" style=" border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">This test verifies that we can get text/html from the drag object during an ondrop event.<span class="Apple-converted-space"> </span></span>2 CONSOLE MESSAGE: line 23: text/html: <span class="Apple-style-span" style="color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">This test verifies that we can get text/html from the drag object during an ondrop event.<span class="Apple-converted-space"> </span></span> 3 3 This test verifies that we can get text/html from the drag object during an ondrop event. This test requires DRT. 4 4 PASS -
trunk/Source/WebCore/ChangeLog
r87464 r87466 1 2011-05-26 Annie Sullivan <sullivan@chromium.org> 2 3 Reviewed by Ryosuke Niwa. 4 5 Delete table in contentEditable/designMode produces odd contents 6 https://bugs.webkit.org/show_bug.cgi?id=57148 7 8 Removes border-collapse, -webkit-border-horizontal-spacing, and 9 -webkit-border-vertical-spacing from the list of properties which 10 should be preserved during edit operations. Also renames this 11 list to editingInheritableProperties to be more clear about what 12 the list is for. 13 14 Test: editing/deleting/delete-last-char-in-table.html 15 16 * editing/EditingStyle.cpp: Removes border vertical/horizontal 17 spacing from editingStyleProperties. 18 * editing/EditingStyle.h: Renames OnlyInheritableProperties to 19 OnlyEditingInheritableProperties. 20 * editing/markup.cpp: Renames InheritablePropertiesAndBackgroundColorInEffect. 21 1 22 2011-05-26 Yuta Kitamura <yutak@chromium.org> 2 23 -
trunk/Source/WebCore/editing/EditingStyle.cpp
r87400 r87466 50 50 // Editing style properties must be preserved during editing operation. 51 51 // e.g. when a user inserts a new paragraph, all properties listed here must be copied to the new paragraph. 52 // FIXME: The current editingStyleProperties contains all inheritableProperties but we may not need to preserve all inheritable properties 53 static const int editingStyleProperties[] = { 52 static const int editingInheritableProperties[] = { 54 53 // CSS inheritable properties 55 CSSPropertyBorderCollapse,56 54 CSSPropertyColor, 57 55 CSSPropertyFontFamily, … … 69 67 CSSPropertyWidows, 70 68 CSSPropertyWordSpacing, 71 CSSPropertyWebkitBorderHorizontalSpacing,72 CSSPropertyWebkitBorderVerticalSpacing,73 69 CSSPropertyWebkitTextDecorationsInEffect, 74 70 CSSPropertyWebkitTextFillColor, … … 77 73 CSSPropertyWebkitTextStrokeWidth, 78 74 }; 79 size_t numEditing StyleProperties = WTF_ARRAY_LENGTH(editingStyleProperties);75 size_t numEditingInheritableProperties = WTF_ARRAY_LENGTH(editingInheritableProperties); 80 76 81 77 static PassRefPtr<CSSMutableStyleDeclaration> copyEditingProperties(CSSStyleDeclaration* style) 82 78 { 83 return style->copyPropertiesInSet(editing StyleProperties, numEditingStyleProperties);79 return style->copyPropertiesInSet(editingInheritableProperties, numEditingInheritableProperties); 84 80 } 85 81 … … 338 334 m_mutableStyle = propertiesToInclude == AllProperties && computedStyleAtPosition ? computedStyleAtPosition->copy() : editingStyleFromComputedStyle(computedStyleAtPosition); 339 335 340 if (propertiesToInclude == InheritablePropertiesAndBackgroundColorInEffect) {336 if (propertiesToInclude == EditingInheritablePropertiesAndBackgroundColorInEffect) { 341 337 if (RefPtr<CSSValue> value = backgroundColorInEffect(node)) 342 338 m_mutableStyle->setProperty(CSSPropertyBackgroundColor, value->cssText()); … … 730 726 // If this function was modified in the future to delete all redundant properties, then add a boolean value to indicate 731 727 // which one of editingStyleAtPosition or computedStyle is called. 732 RefPtr<EditingStyle> style = EditingStyle::create(position, InheritablePropertiesAndBackgroundColorInEffect);728 RefPtr<EditingStyle> style = EditingStyle::create(position, EditingInheritablePropertiesAndBackgroundColorInEffect); 733 729 734 730 RefPtr<CSSValue> unicodeBidi; -
trunk/Source/WebCore/editing/EditingStyle.h
r87400 r87466 60 60 public: 61 61 62 enum PropertiesToInclude { AllProperties, Only InheritableProperties,InheritablePropertiesAndBackgroundColorInEffect };62 enum PropertiesToInclude { AllProperties, OnlyEditingInheritableProperties, EditingInheritablePropertiesAndBackgroundColorInEffect }; 63 63 enum ShouldPreserveWritingDirection { PreserveWritingDirection, DoNotPreserveWritingDirection }; 64 64 enum ShouldExtractMatchingStyle { ExtractMatchingStyle, DoNotExtractMatchingStyle }; … … 70 70 } 71 71 72 static PassRefPtr<EditingStyle> create(Node* node, PropertiesToInclude propertiesToInclude = Only InheritableProperties)72 static PassRefPtr<EditingStyle> create(Node* node, PropertiesToInclude propertiesToInclude = OnlyEditingInheritableProperties) 73 73 { 74 74 return adoptRef(new EditingStyle(node, propertiesToInclude)); 75 75 } 76 76 77 static PassRefPtr<EditingStyle> create(const Position& position, PropertiesToInclude propertiesToInclude = Only InheritableProperties)77 static PassRefPtr<EditingStyle> create(const Position& position, PropertiesToInclude propertiesToInclude = OnlyEditingInheritableProperties) 78 78 { 79 79 return adoptRef(new EditingStyle(position, propertiesToInclude)); -
trunk/Source/WebCore/editing/markup.cpp
r87400 r87466 590 590 ContainerNode* parentOfLastClosed = lastClosed ? lastClosed->parentNode() : 0; 591 591 if (parentOfLastClosed && parentOfLastClosed->renderer()) { 592 RefPtr<EditingStyle> style = EditingStyle::create(parentOfLastClosed, EditingStyle:: InheritablePropertiesAndBackgroundColorInEffect);592 RefPtr<EditingStyle> style = EditingStyle::create(parentOfLastClosed, EditingStyle::EditingInheritablePropertiesAndBackgroundColorInEffect); 593 593 594 594 // Styles that Mail blockquotes contribute should only be placed on the Mail blockquote, to help
Note: See TracChangeset
for help on using the changeset viewer.