Changeset 16452 in webkit


Ignore:
Timestamp:
Sep 19, 2006 3:01:33 PM (18 years ago)
Author:
justing
Message:

LayoutTests:

Reviewed by harrison

  • editing/pasteboard/pasting-tabs-expected.checksum: Added.
  • editing/pasteboard/pasting-tabs-expected.png: Added.
  • editing/pasteboard/pasting-tabs-expected.txt: Added.
  • editing/pasteboard/pasting-tabs.html: Added.

WebCore:

Reviewed by harrison


<rdar://problem/4727383> REGRESSION: Pasting plain text with tabs into Blot converts the tabs to single spaces

Pasting plain text results in a match style paste, and the insertion
position is whitespace normal, which clobbers the whitespace:pre on
tab spans. Skip changes to the whitespace mode when computing a style
change for tab spans or the text nodes inside tab spans.

  • editing/ApplyStyleCommand.cpp: (WebCore::StyleChange::init): Don't change the whitespace mode inside tab spans.
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r16449 r16452  
     12006-09-19  Justin Garcia  <justin.garcia@apple.com>
     2
     3        Reviewed by harrison
     4
     5        * editing/pasteboard/pasting-tabs-expected.checksum: Added.
     6        * editing/pasteboard/pasting-tabs-expected.png: Added.
     7        * editing/pasteboard/pasting-tabs-expected.txt: Added.
     8        * editing/pasteboard/pasting-tabs.html: Added.
     9
    1102006-09-18  Adam Roben  <aroben@apple.com>
    211
  • trunk/WebCore/ChangeLog

    r16451 r16452  
     12006-09-19  Justin Garcia  <justin.garcia@apple.com>
     2
     3        Reviewed by harrison
     4       
     5        <rdar://problem/4727383> REGRESSION: Pasting plain text with tabs into Blot converts the tabs to single spaces
     6
     7        Pasting plain text results in a match style paste, and the insertion
     8        position is whitespace normal, which clobbers the whitespace:pre on
     9        tab spans.  Skip changes to the whitespace mode when computing a style
     10        change for tab spans or the text nodes inside tab spans.
     11
     12        * editing/ApplyStyleCommand.cpp:
     13        (WebCore::StyleChange::init): Don't change the whitespace mode inside
     14        tab spans.
     15
    1162006-09-19  David Hyatt  <hyatt@apple.com>
    217
  • trunk/WebCore/editing/ApplyStyleCommand.cpp

    r16405 r16452  
    108108        // style, just move on.
    109109        if (position.isNotNull() && currentlyHasStyle(position, property))
     110            continue;
     111       
     112        // Changing the whitespace style in a tab span would collapse the tab into a space.
     113        if (property->id() == CSS_PROP_WHITE_SPACE && (isTabSpanTextNode(position.node()) || isTabSpanNode((position.node()))))
    110114            continue;
    111115       
Note: See TracChangeset for help on using the changeset viewer.