Changeset 32226 in webkit


Ignore:
Timestamp:
Apr 18, 2008 2:18:26 PM (16 years ago)
Author:
mitz@apple.com
Message:

WebCore:

Reviewed by Darin Adler.

Test: fast/text/trailing-white-space.html

Made trailing white space on the line always behave like it has the base
bidi level of the block, meaning it will always go on the right (left)
of the line in a left-to-right (right-to-left) block. Made the trailing
white space vanish when it is next to a margin that the text should
be touching, and made its width not count when computing the center
point for center alignment.

  • platform/text/BidiResolver.h: (WebCore::::prependRun): Added.
  • rendering/RenderBlock.h:
  • rendering/bidi.cpp: (WebCore::RenderBlock::computeHorizontalPositionsForLine): Changed the logicallyLastRun parameter to an optional trailingSpaceRun and changed the alignment logic to implement the above rules. (WebCore::RenderBlock::layoutInlineChildren): Added code to identify when there is trailing white space that needs to be split into its own run and optionally re-ordered. (WebCore::RenderBlock::findNextLineBreak): Removed code that split some trailing space into a separate run in one special case.

LayoutTests:

Reviewed by Darin Adler.

  • fast/text/trailing-white-space.html: Added.
  • http/tests/misc/acid3-expected.txt:
  • platform/mac/editing/deleting/delete-block-table-expected.txt:
  • platform/mac/editing/deleting/delete-to-select-table-expected.txt:
  • platform/mac/editing/deleting/deletionUI-single-instance-expected.txt:
  • platform/mac/editing/execCommand/5482023-expected.txt:
  • platform/mac/editing/execCommand/boldSelection-expected.txt:
  • platform/mac/editing/execCommand/italicizeByCharacter-expected.txt:
  • platform/mac/editing/execCommand/modifyForeColorByCharacter-expected.txt:
  • platform/mac/editing/execCommand/print-expected.txt:
  • platform/mac/editing/execCommand/selectAll-expected.txt:
  • platform/mac/editing/execCommand/strikethroughSelection-expected.txt:
  • platform/mac/editing/inserting/editable-html-element-expected.txt:
  • platform/mac/editing/inserting/insert-div-027-expected.txt:
  • platform/mac/editing/pasteboard/5028447-expected.txt:
  • platform/mac/editing/pasteboard/block-wrappers-necessary-expected.checksum:
  • platform/mac/editing/pasteboard/block-wrappers-necessary-expected.png:
  • platform/mac/editing/pasteboard/block-wrappers-necessary-expected.txt:
  • platform/mac/editing/pasteboard/nested-blocks-with-text-area-expected.checksum:
  • platform/mac/editing/pasteboard/nested-blocks-with-text-area-expected.png:
  • platform/mac/editing/pasteboard/nested-blocks-with-text-area-expected.txt:
  • platform/mac/editing/pasteboard/nested-blocks-with-text-field-expected.checksum:
  • platform/mac/editing/pasteboard/nested-blocks-with-text-field-expected.png:
  • platform/mac/editing/pasteboard/nested-blocks-with-text-field-expected.txt:
  • platform/mac/editing/selection/5081257-1-expected.txt:
  • platform/mac/editing/selection/after-line-wrap-expected.txt:
  • platform/mac/editing/selection/mixed-editability-1-expected.txt:
  • platform/mac/editing/selection/select-all-001-expected.txt:
  • platform/mac/editing/selection/select-all-002-expected.txt:
  • platform/mac/editing/selection/select-all-003-expected.txt:
  • platform/mac/editing/style/apple-style-editable-mix-expected.txt:
  • platform/mac/editing/style/create-block-for-style-012-expected.checksum:
  • platform/mac/editing/style/create-block-for-style-012-expected.png:
  • platform/mac/editing/style/create-block-for-style-012-expected.txt:
  • platform/mac/fast/clip/outline-overflowClip-expected.txt:
  • platform/mac/fast/forms/textarea-rows-cols-expected.txt:
  • platform/mac/fast/replaced/width100percent-textarea-expected.txt:
  • platform/mac/fast/text/embed-at-end-of-pre-wrap-line-expected.txt:
  • platform/mac/fast/text/justified-text-rect-expected.txt:
  • platform/mac/fast/text/trailing-white-space-expected.checksum: Added.
  • platform/mac/fast/text/trailing-white-space-expected.png: Added.
  • platform/mac/fast/text/trailing-white-space-expected.txt: Added.
  • platform/mac/fast/text/whitespace/pre-wrap-last-char-expected.txt:
  • platform/mac/fast/text/whitespace/pre-wrap-overflow-selection-expected.txt:
  • platform/mac/fast/text/whitespace/pre-wrap-spaces-after-newline-expected.txt:
Location:
trunk
Files:
4 added
46 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r32216 r32226  
     12008-04-18  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        - test and updated results for https://bugs.webkit.org/show_bug.cgi?id=17921
     6          Extra white space at the end of right-aligned or justified text with -webkit-line-break: after-white-space
     7
     8        * fast/text/trailing-white-space.html: Added.
     9        * http/tests/misc/acid3-expected.txt:
     10        * platform/mac/editing/deleting/delete-block-table-expected.txt:
     11        * platform/mac/editing/deleting/delete-to-select-table-expected.txt:
     12        * platform/mac/editing/deleting/deletionUI-single-instance-expected.txt:
     13        * platform/mac/editing/execCommand/5482023-expected.txt:
     14        * platform/mac/editing/execCommand/boldSelection-expected.txt:
     15        * platform/mac/editing/execCommand/italicizeByCharacter-expected.txt:
     16        * platform/mac/editing/execCommand/modifyForeColorByCharacter-expected.txt:
     17        * platform/mac/editing/execCommand/print-expected.txt:
     18        * platform/mac/editing/execCommand/selectAll-expected.txt:
     19        * platform/mac/editing/execCommand/strikethroughSelection-expected.txt:
     20        * platform/mac/editing/inserting/editable-html-element-expected.txt:
     21        * platform/mac/editing/inserting/insert-div-027-expected.txt:
     22        * platform/mac/editing/pasteboard/5028447-expected.txt:
     23        * platform/mac/editing/pasteboard/block-wrappers-necessary-expected.checksum:
     24        * platform/mac/editing/pasteboard/block-wrappers-necessary-expected.png:
     25        * platform/mac/editing/pasteboard/block-wrappers-necessary-expected.txt:
     26        * platform/mac/editing/pasteboard/nested-blocks-with-text-area-expected.checksum:
     27        * platform/mac/editing/pasteboard/nested-blocks-with-text-area-expected.png:
     28        * platform/mac/editing/pasteboard/nested-blocks-with-text-area-expected.txt:
     29        * platform/mac/editing/pasteboard/nested-blocks-with-text-field-expected.checksum:
     30        * platform/mac/editing/pasteboard/nested-blocks-with-text-field-expected.png:
     31        * platform/mac/editing/pasteboard/nested-blocks-with-text-field-expected.txt:
     32        * platform/mac/editing/selection/5081257-1-expected.txt:
     33        * platform/mac/editing/selection/after-line-wrap-expected.txt:
     34        * platform/mac/editing/selection/mixed-editability-1-expected.txt:
     35        * platform/mac/editing/selection/select-all-001-expected.txt:
     36        * platform/mac/editing/selection/select-all-002-expected.txt:
     37        * platform/mac/editing/selection/select-all-003-expected.txt:
     38        * platform/mac/editing/style/apple-style-editable-mix-expected.txt:
     39        * platform/mac/editing/style/create-block-for-style-012-expected.checksum:
     40        * platform/mac/editing/style/create-block-for-style-012-expected.png:
     41        * platform/mac/editing/style/create-block-for-style-012-expected.txt:
     42        * platform/mac/fast/clip/outline-overflowClip-expected.txt:
     43        * platform/mac/fast/forms/textarea-rows-cols-expected.txt:
     44        * platform/mac/fast/replaced/width100percent-textarea-expected.txt:
     45        * platform/mac/fast/text/embed-at-end-of-pre-wrap-line-expected.txt:
     46        * platform/mac/fast/text/justified-text-rect-expected.txt:
     47        * platform/mac/fast/text/trailing-white-space-expected.checksum: Added.
     48        * platform/mac/fast/text/trailing-white-space-expected.png: Added.
     49        * platform/mac/fast/text/trailing-white-space-expected.txt: Added.
     50        * platform/mac/fast/text/whitespace/pre-wrap-last-char-expected.txt:
     51        * platform/mac/fast/text/whitespace/pre-wrap-overflow-selection-expected.txt:
     52        * platform/mac/fast/text/whitespace/pre-wrap-spaces-after-newline-expected.txt:
     53
    1542008-04-18  Dan Bernstein  <mitz@apple.com>
    255
  • trunk/LayoutTests/http/tests/misc/acid3-expected.txt

    r31391 r32226  
    3636                  RenderImage {IMG} at (0,0) size 1x1
    3737          RenderPartObject {IFRAME} at (0,0) size 0x0
    38             layer at (0,0) size 8x2151
     38            layer at (0,0) size 16x2151
    3939              RenderView at (0,0) size 0x0
    40             layer at (0,0) size 8x2151
     40            layer at (0,0) size 16x2151
    4141              RenderBlock {HTML} at (0,0) size 0x2151
    4242                RenderBody {BODY} at (8,8) size 0x2130
    4343                  RenderBlock {PRE} at (0,0) size 0x2130
    44                     RenderText {#text} at (0,0) size 0x2130
    45                       text run at (0,0) width 0: "<"
    46                       text run at (0,15) width 0: "!"
    47                       text run at (0,30) width 0: "D"
    48                       text run at (0,45) width 0: "O"
    49                       text run at (0,60) width 0: "C"
    50                       text run at (0,75) width 0: "T"
    51                       text run at (0,90) width 0: "Y"
    52                       text run at (0,105) width 0: "P"
    53                       text run at (0,120) width 0: "E"
    54                       text run at (0,135) width 0: "h"
    55                       text run at (0,150) width 0: "t"
    56                       text run at (0,165) width 0: "m"
    57                       text run at (0,180) width 0: "l"
    58                       text run at (0,195) width 0: ">"
    59                       text run at (0,210) width 0: "<"
    60                       text run at (0,225) width 0: "h"
    61                       text run at (0,240) width 0: "t"
    62                       text run at (0,255) width 0: "m"
    63                       text run at (0,270) width 0: "l"
    64                       text run at (0,285) width 0: ">"
    65                       text run at (0,300) width 0: "<"
    66                       text run at (0,315) width 0: "h"
    67                       text run at (0,330) width 0: "e"
    68                       text run at (0,345) width 0: "a"
    69                       text run at (0,360) width 0: "d"
    70                       text run at (0,375) width 0: ">"
    71                       text run at (0,390) width 0: "<"
    72                       text run at (0,405) width 0: "t"
    73                       text run at (0,420) width 0: "i"
    74                       text run at (0,435) width 0: "t"
    75                       text run at (0,450) width 0: "l"
    76                       text run at (0,465) width 0: "e"
    77                       text run at (0,480) width 0: ">"
    78                       text run at (0,495) width 0: "F"
    79                       text run at (0,510) width 0: "A"
    80                       text run at (0,525) width 0: "I"
    81                       text run at (0,540) width 0: "L"
    82                       text run at (0,555) width 0: "<"
    83                       text run at (0,570) width 0: "/"
    84                       text run at (0,585) width 0: "t"
    85                       text run at (0,600) width 0: "i"
    86                       text run at (0,615) width 0: "t"
    87                       text run at (0,630) width 0: "l"
    88                       text run at (0,645) width 0: "e"
    89                       text run at (0,660) width 0: ">"
    90                       text run at (0,675) width 0: "<"
    91                       text run at (0,690) width 0: "/"
    92                       text run at (0,705) width 0: "h"
    93                       text run at (0,720) width 0: "e"
    94                       text run at (0,735) width 0: "a"
    95                       text run at (0,750) width 0: "d"
    96                       text run at (0,765) width 0: ">"
    97                       text run at (0,780) width 0: "<"
    98                       text run at (0,795) width 0: "b"
    99                       text run at (0,810) width 0: "o"
    100                       text run at (0,825) width 0: "d"
    101                       text run at (0,840) width 0: "y"
    102                       text run at (0,855) width 0: ">"
    103                       text run at (0,870) width 0: "<"
    104                       text run at (0,885) width 0: "p"
    105                       text run at (0,900) width 0: ">"
    106                       text run at (0,915) width 0: "F"
    107                       text run at (0,930) width 0: "A"
    108                       text run at (0,945) width 0: "I"
    109                       text run at (0,960) width 0: "L"
    110                       text run at (0,975) width 0: "<"
    111                       text run at (0,990) width 0: "/"
    112                       text run at (0,1005) width 0: "p"
    113                       text run at (0,1020) width 0: ">"
    114                       text run at (0,1035) width 0: "<"
    115                       text run at (0,1050) width 0: "s"
    116                       text run at (0,1065) width 0: "c"
    117                       text run at (0,1080) width 0: "r"
    118                       text run at (0,1095) width 0: "i"
    119                       text run at (0,1110) width 0: "p"
    120                       text run at (0,1125) width 0: "t"
    121                       text run at (0,1140) width 0: ">"
    122                       text run at (0,1155) width 0: "p"
    123                       text run at (0,1170) width 0: "a"
    124                       text run at (0,1185) width 0: "r"
    125                       text run at (0,1200) width 0: "e"
    126                       text run at (0,1215) width 0: "n"
    127                       text run at (0,1230) width 0: "t"
    128                       text run at (0,1245) width 0: "."
    129                       text run at (0,1260) width 0: "n"
    130                       text run at (0,1275) width 0: "o"
    131                       text run at (0,1290) width 0: "t"
    132                       text run at (0,1305) width 0: "i"
    133                       text run at (0,1320) width 0: "f"
    134                       text run at (0,1335) width 0: "y"
    135                       text run at (0,1350) width 0: "("
    136                       text run at (0,1365) width 0: "\""
    137                       text run at (0,1380) width 0: "r"
    138                       text run at (0,1395) width 0: "e"
    139                       text run at (0,1410) width 0: "s"
    140                       text run at (0,1425) width 0: "o"
    141                       text run at (0,1440) width 0: "u"
    142                       text run at (0,1455) width 0: "r"
    143                       text run at (0,1470) width 0: "c"
    144                       text run at (0,1485) width 0: "e"
    145                       text run at (0,1500) width 0: "s"
    146                       text run at (0,1515) width 0: "/"
    147                       text run at (0,1530) width 0: "a"
    148                       text run at (0,1545) width 0: "c"
    149                       text run at (0,1560) width 0: "i"
    150                       text run at (0,1575) width 0: "d"
    151                       text run at (0,1590) width 0: "3"
    152                       text run at (0,1605) width 0: "/"
    153                       text run at (0,1620) width 0: "e"
    154                       text run at (0,1635) width 0: "m"
    155                       text run at (0,1650) width 0: "p"
    156                       text run at (0,1665) width 0: "t"
    157                       text run at (0,1680) width 0: "y"
    158                       text run at (0,1695) width 0: "."
    159                       text run at (0,1710) width 0: "t"
    160                       text run at (0,1725) width 0: "x"
    161                       text run at (0,1740) width 0: "t"
    162                       text run at (0,1755) width 0: "\""
    163                       text run at (0,1770) width 0: ")"
    164                       text run at (0,1785) width 0: "<"
    165                       text run at (0,1800) width 0: "/"
    166                       text run at (0,1815) width 0: "s"
    167                       text run at (0,1830) width 0: "c"
    168                       text run at (0,1845) width 0: "r"
    169                       text run at (0,1860) width 0: "i"
    170                       text run at (0,1875) width 0: "p"
    171                       text run at (0,1890) width 0: "t"
    172                       text run at (0,1905) width 0: ">"
    173                       text run at (0,1920) width 0: "<"
    174                       text run at (0,1935) width 0: "/"
    175                       text run at (0,1950) width 0: "b"
    176                       text run at (0,1965) width 0: "o"
    177                       text run at (0,1980) width 0: "d"
    178                       text run at (0,1995) width 0: "y"
    179                       text run at (0,2010) width 0: ">"
    180                       text run at (0,2025) width 0: "<"
    181                       text run at (0,2040) width 0: "/"
    182                       text run at (0,2055) width 0: "h"
    183                       text run at (0,2070) width 0: "t"
    184                       text run at (0,2085) width 0: "m"
    185                       text run at (0,2100) width 0: "l"
    186                       text run at (0,2115) width 0: ">"
     44                    RenderText {#text} at (0,0) size 8x2130
     45                      text run at (0,0) width 8: "<"
     46                      text run at (0,15) width 8: "!"
     47                      text run at (0,30) width 8: "D"
     48                      text run at (0,45) width 8: "O"
     49                      text run at (0,60) width 8: "C"
     50                      text run at (0,75) width 8: "T"
     51                      text run at (0,90) width 8: "Y"
     52                      text run at (0,105) width 8: "P"
     53                      text run at (0,120) width 8: "E"
     54                      text run at (0,135) width 8: "h"
     55                      text run at (0,150) width 8: "t"
     56                      text run at (0,165) width 8: "m"
     57                      text run at (0,180) width 8: "l"
     58                      text run at (0,195) width 8: ">"
     59                      text run at (0,210) width 8: "<"
     60                      text run at (0,225) width 8: "h"
     61                      text run at (0,240) width 8: "t"
     62                      text run at (0,255) width 8: "m"
     63                      text run at (0,270) width 8: "l"
     64                      text run at (0,285) width 8: ">"
     65                      text run at (0,300) width 8: "<"
     66                      text run at (0,315) width 8: "h"
     67                      text run at (0,330) width 8: "e"
     68                      text run at (0,345) width 8: "a"
     69                      text run at (0,360) width 8: "d"
     70                      text run at (0,375) width 8: ">"
     71                      text run at (0,390) width 8: "<"
     72                      text run at (0,405) width 8: "t"
     73                      text run at (0,420) width 8: "i"
     74                      text run at (0,435) width 8: "t"
     75                      text run at (0,450) width 8: "l"
     76                      text run at (0,465) width 8: "e"
     77                      text run at (0,480) width 8: ">"
     78                      text run at (0,495) width 8: "F"
     79                      text run at (0,510) width 8: "A"
     80                      text run at (0,525) width 8: "I"
     81                      text run at (0,540) width 8: "L"
     82                      text run at (0,555) width 8: "<"
     83                      text run at (0,570) width 8: "/"
     84                      text run at (0,585) width 8: "t"
     85                      text run at (0,600) width 8: "i"
     86                      text run at (0,615) width 8: "t"
     87                      text run at (0,630) width 8: "l"
     88                      text run at (0,645) width 8: "e"
     89                      text run at (0,660) width 8: ">"
     90                      text run at (0,675) width 8: "<"
     91                      text run at (0,690) width 8: "/"
     92                      text run at (0,705) width 8: "h"
     93                      text run at (0,720) width 8: "e"
     94                      text run at (0,735) width 8: "a"
     95                      text run at (0,750) width 8: "d"
     96                      text run at (0,765) width 8: ">"
     97                      text run at (0,780) width 8: "<"
     98                      text run at (0,795) width 8: "b"
     99                      text run at (0,810) width 8: "o"
     100                      text run at (0,825) width 8: "d"
     101                      text run at (0,840) width 8: "y"
     102                      text run at (0,855) width 8: ">"
     103                      text run at (0,870) width 8: "<"
     104                      text run at (0,885) width 8: "p"
     105                      text run at (0,900) width 8: ">"
     106                      text run at (0,915) width 8: "F"
     107                      text run at (0,930) width 8: "A"
     108                      text run at (0,945) width 8: "I"
     109                      text run at (0,960) width 8: "L"
     110                      text run at (0,975) width 8: "<"
     111                      text run at (0,990) width 8: "/"
     112                      text run at (0,1005) width 8: "p"
     113                      text run at (0,1020) width 8: ">"
     114                      text run at (0,1035) width 8: "<"
     115                      text run at (0,1050) width 8: "s"
     116                      text run at (0,1065) width 8: "c"
     117                      text run at (0,1080) width 8: "r"
     118                      text run at (0,1095) width 8: "i"
     119                      text run at (0,1110) width 8: "p"
     120                      text run at (0,1125) width 8: "t"
     121                      text run at (0,1140) width 8: ">"
     122                      text run at (0,1155) width 8: "p"
     123                      text run at (0,1170) width 8: "a"
     124                      text run at (0,1185) width 8: "r"
     125                      text run at (0,1200) width 8: "e"
     126                      text run at (0,1215) width 8: "n"
     127                      text run at (0,1230) width 8: "t"
     128                      text run at (0,1245) width 8: "."
     129                      text run at (0,1260) width 8: "n"
     130                      text run at (0,1275) width 8: "o"
     131                      text run at (0,1290) width 8: "t"
     132                      text run at (0,1305) width 8: "i"
     133                      text run at (0,1320) width 8: "f"
     134                      text run at (0,1335) width 8: "y"
     135                      text run at (0,1350) width 8: "("
     136                      text run at (0,1365) width 8: "\""
     137                      text run at (0,1380) width 8: "r"
     138                      text run at (0,1395) width 8: "e"
     139                      text run at (0,1410) width 8: "s"
     140                      text run at (0,1425) width 8: "o"
     141                      text run at (0,1440) width 8: "u"
     142                      text run at (0,1455) width 8: "r"
     143                      text run at (0,1470) width 8: "c"
     144                      text run at (0,1485) width 8: "e"
     145                      text run at (0,1500) width 8: "s"
     146                      text run at (0,1515) width 8: "/"
     147                      text run at (0,1530) width 8: "a"
     148                      text run at (0,1545) width 8: "c"
     149                      text run at (0,1560) width 8: "i"
     150                      text run at (0,1575) width 8: "d"
     151                      text run at (0,1590) width 8: "3"
     152                      text run at (0,1605) width 8: "/"
     153                      text run at (0,1620) width 8: "e"
     154                      text run at (0,1635) width 8: "m"
     155                      text run at (0,1650) width 8: "p"
     156                      text run at (0,1665) width 8: "t"
     157                      text run at (0,1680) width 8: "y"
     158                      text run at (0,1695) width 8: "."
     159                      text run at (0,1710) width 8: "t"
     160                      text run at (0,1725) width 8: "x"
     161                      text run at (0,1740) width 8: "t"
     162                      text run at (0,1755) width 8: "\""
     163                      text run at (0,1770) width 8: ")"
     164                      text run at (0,1785) width 8: "<"
     165                      text run at (0,1800) width 8: "/"
     166                      text run at (0,1815) width 8: "s"
     167                      text run at (0,1830) width 8: "c"
     168                      text run at (0,1845) width 8: "r"
     169                      text run at (0,1860) width 8: "i"
     170                      text run at (0,1875) width 8: "p"
     171                      text run at (0,1890) width 8: "t"
     172                      text run at (0,1905) width 8: ">"
     173                      text run at (0,1920) width 8: "<"
     174                      text run at (0,1935) width 8: "/"
     175                      text run at (0,1950) width 8: "b"
     176                      text run at (0,1965) width 8: "o"
     177                      text run at (0,1980) width 8: "d"
     178                      text run at (0,1995) width 8: "y"
     179                      text run at (0,2010) width 8: ">"
     180                      text run at (0,2025) width 8: "<"
     181                      text run at (0,2040) width 8: "/"
     182                      text run at (0,2055) width 8: "h"
     183                      text run at (0,2070) width 8: "t"
     184                      text run at (0,2085) width 8: "m"
     185                      text run at (0,2100) width 8: "l"
     186                      text run at (0,2115) width 8: ">"
    187187          RenderPartObject {IFRAME} at (0,0) size 0x0
    188188            layer at (0,0) size 8x8
  • trunk/LayoutTests/platform/mac/editing/deleting/delete-block-table-expected.txt

    r30635 r32226  
    3838              RenderTableCell {TD} at (2,24) size 27x20 [r=1 c=0 rs=1 cs=1]
    3939                RenderText {#text} at (1,1) size 25x18
    40                   text run at (1,1) width 24: "bar "
    41                   text run at (25,1) width 1: "     "
     40                  text run at (1,1) width 25: "bar      "
    4241              RenderTableCell {TD} at (31,24) size 60x20 [r=1 c=1 rs=1 cs=1]
    4342                RenderText {#text} at (1,1) size 37x18
  • trunk/LayoutTests/platform/mac/editing/deleting/delete-to-select-table-expected.txt

    r30635 r32226  
    5050              RenderTableCell {TD} at (2,24) size 27x20 [r=1 c=0 rs=1 cs=1]
    5151                RenderText {#text} at (1,1) size 25x18
    52                   text run at (1,1) width 24: "bar "
    53                   text run at (25,1) width 1: "     "
     52                  text run at (1,1) width 25: "bar      "
    5453              RenderTableCell {TD} at (31,24) size 47x20 [r=1 c=1 rs=1 cs=1]
    5554                RenderText {#text} at (1,1) size 45x18
  • trunk/LayoutTests/platform/mac/editing/deleting/deletionUI-single-instance-expected.txt

    r30635 r32226  
    2020        RenderTableCell {TD} at (2,2) size 748x74 [r=0 c=0 rs=1 cs=1]
    2121          RenderText {#text} at (1,1) size 746x72
    22             text run at (1,1) width 743: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas odio. Morbi sed tortor id nisl bibendum commodo."
    23             text run at (744,1) width 3: " "
     22            text run at (1,1) width 746: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas odio. Morbi sed tortor id nisl bibendum commodo. "
    2423            text run at (1,19) width 743: "Donec pede. Praesent accumsan dui vitae mauris. Mauris non dui at neque lacinia pulvinar. Quisque nibh. Nulla vitae "
    2524            text run at (1,37) width 719: "lectus. Pellentesque enim. Mauris hendrerit molestie dui. Etiam pretium ligula a pede. Fusce consectetuer purus sit "
  • trunk/LayoutTests/platform/mac/editing/execCommand/5482023-expected.txt

    r30635 r32226  
    77        RenderText {#text} at (0,0) size 784x111
    88          text run at (0,0) width 729: "This tests for a bug when performing a FormatBlock "
    9           text run at (0,37) width 779: "inside a body with no visible content.  This text should be"
    10           text run at (779,37) width 5: " "
     9          text run at (0,37) width 784: "inside a body with no visible content.  This text should be "
    1110          text run at (0,74) width 287: "inside an h1 element."
    1211caret: position 132 of child 0 {#text} of child 0 {H1} of child 1 {BODY} of child 0 {HTML} of document
  • trunk/LayoutTests/platform/mac/editing/execCommand/boldSelection-expected.txt

    r25970 r32226  
    173173              text run at (0,84) width 197: "disagree with them, "
    174174              text run at (197,84) width 218: "glorify or vilify them, "
    175               text run at (415,84) width 340: "about the only thing you can't do is"
    176               text run at (755,84) width 1: " "
     175              text run at (415,84) width 341: "about the only thing you can't do is "
    177176              text run at (0,112) width 129: "ignore them. "
    178177              text run at (129,112) width 281: "Because they change things. "
    179               text run at (410,112) width 344: "They push the human race forward."
    180               text run at (754,112) width 2: "  "
     178              text run at (410,112) width 346: "They push the human race forward.  "
    181179              text run at (0,140) width 481: "And while some may see them as the crazy ones, "
    182180              text run at (481,140) width 146: "we see genius. "
  • trunk/LayoutTests/platform/mac/editing/execCommand/italicizeByCharacter-expected.txt

    r25970 r32226  
    3333              text run at (0,84) width 197: "disagree with them, "
    3434              text run at (197,84) width 218: "glorify or vilify them, "
    35               text run at (415,84) width 340: "about the only thing you can't do is"
    36               text run at (755,84) width 1: " "
     35              text run at (415,84) width 341: "about the only thing you can't do is "
    3736              text run at (0,112) width 129: "ignore them. "
    3837              text run at (129,112) width 281: "Because they change things. "
    39               text run at (410,112) width 344: "They push the human race forward."
    40               text run at (754,112) width 2: "  "
     38              text run at (410,112) width 346: "They push the human race forward.  "
    4139              text run at (0,140) width 481: "And while some may see them as the crazy ones, "
    4240              text run at (481,140) width 146: "we see genius. "
  • trunk/LayoutTests/platform/mac/editing/execCommand/modifyForeColorByCharacter-expected.txt

    r25970 r32226  
    3333              text run at (0,84) width 197: "disagree with them, "
    3434              text run at (197,84) width 218: "glorify or vilify them, "
    35               text run at (415,84) width 340: "about the only thing you can't do is"
    36               text run at (755,84) width 1: " "
     35              text run at (415,84) width 341: "about the only thing you can't do is "
    3736              text run at (0,112) width 129: "ignore them. "
    3837              text run at (129,112) width 281: "Because they change things. "
    39               text run at (410,112) width 344: "They push the human race forward."
    40               text run at (754,112) width 2: "  "
     38              text run at (410,112) width 346: "They push the human race forward.  "
    4139              text run at (0,140) width 481: "And while some may see them as the crazy ones, "
    4240              text run at (481,140) width 146: "we see genius. "
  • trunk/LayoutTests/platform/mac/editing/execCommand/print-expected.txt

    r25970 r32226  
    2626              text run at (0,84) width 197: "disagree with them, "
    2727              text run at (197,84) width 218: "glorify or vilify them, "
    28               text run at (415,84) width 340: "about the only thing you can't do is"
    29               text run at (755,84) width 1: " "
     28              text run at (415,84) width 341: "about the only thing you can't do is "
    3029              text run at (0,112) width 129: "ignore them. "
    3130              text run at (129,112) width 281: "Because they change things. "
    32               text run at (410,112) width 344: "They push the human race forward."
    33               text run at (754,112) width 2: "  "
     31              text run at (410,112) width 346: "They push the human race forward.  "
    3432              text run at (0,140) width 481: "And while some may see them as the crazy ones, "
    3533              text run at (481,140) width 146: "we see genius. "
  • trunk/LayoutTests/platform/mac/editing/execCommand/selectAll-expected.txt

    r25970 r32226  
    2828              text run at (0,84) width 197: "disagree with them, "
    2929              text run at (197,84) width 218: "glorify or vilify them, "
    30               text run at (415,84) width 340: "about the only thing you can't do is"
    31               text run at (755,84) width 1: " "
     30              text run at (415,84) width 341: "about the only thing you can't do is "
    3231              text run at (0,112) width 129: "ignore them. "
    3332              text run at (129,112) width 281: "Because they change things. "
    34               text run at (410,112) width 344: "They push the human race forward."
    35               text run at (754,112) width 2: "  "
     33              text run at (410,112) width 346: "They push the human race forward.  "
    3634              text run at (0,140) width 481: "And while some may see them as the crazy ones, "
    3735              text run at (481,140) width 146: "we see genius. "
  • trunk/LayoutTests/platform/mac/editing/execCommand/strikethroughSelection-expected.txt

    r30635 r32226  
    173173              text run at (0,84) width 197: "disagree with them, "
    174174              text run at (197,84) width 218: "glorify or vilify them, "
    175               text run at (415,84) width 340: "about the only thing you can't do is"
    176               text run at (755,84) width 1: " "
     175              text run at (415,84) width 341: "about the only thing you can't do is "
    177176              text run at (0,112) width 129: "ignore them. "
    178177              text run at (129,112) width 281: "Because they change things. "
    179               text run at (410,112) width 344: "They push the human race forward."
    180               text run at (754,112) width 2: "  "
     178              text run at (410,112) width 346: "They push the human race forward.  "
    181179              text run at (0,140) width 481: "And while some may see them as the crazy ones, "
    182180              text run at (481,140) width 146: "we see genius. "
  • trunk/LayoutTests/platform/mac/editing/inserting/editable-html-element-expected.txt

    r30635 r32226  
    1919      RenderBlock (anonymous) at (0,0) size 784x54
    2020        RenderText {#text} at (0,0) size 784x54
    21           text run at (0,0) width 783: "This tests to make sure that when the enclosing block is the body element, and when the html element is editable,  inserting a"
    22           text run at (783,0) width 1: " "
     21          text run at (0,0) width 784: "This tests to make sure that when the enclosing block is the body element, and when the html element is editable,  inserting a "
    2322          text run at (0,18) width 755: "paragraph separator doesn't split the body (inserting a paragraph separator usually splits/clones the enclosing block flow "
    2423          text run at (0,36) width 58: "element)."
  • trunk/LayoutTests/platform/mac/editing/inserting/insert-div-027-expected.txt

    r25970 r32226  
    1919      RenderBlock (anonymous) at (0,0) size 784x56
    2020        RenderText {#text} at (0,0) size 784x56
    21           text run at (0,0) width 781: "Test inserting paragraphs: should see two blue boxes, where the second blue box"
    22           text run at (781,0) width 3: " "
     21          text run at (0,0) width 784: "Test inserting paragraphs: should see two blue boxes, where the second blue box "
    2322          text run at (0,28) width 245: "starts with an empty line."
    2423      RenderBlock {DIV} at (0,56) size 784x36
  • trunk/LayoutTests/platform/mac/editing/pasteboard/5028447-expected.txt

    r30635 r32226  
    77        text run at (0,0) width 418: "All the text here should be the same size. "
    88      RenderText {#text} at (418,0) size 784x58
    9         text run at (418,0) width 361: "All the text here should be the same"
    10         text run at (779,0) width 5: " "
     9        text run at (418,0) width 366: "All the text here should be the same "
    1110        text run at (0,29) width 51: "size. "
    1211      RenderText {#text} at (0,0) size 0x0
  • trunk/LayoutTests/platform/mac/editing/pasteboard/block-wrappers-necessary-expected.checksum

    r26026 r32226  
    1 53b060e628656ef527d733f3d96c943f
     175b51fb128eb45f45d2e5fd826f91838
  • trunk/LayoutTests/platform/mac/editing/pasteboard/block-wrappers-necessary-expected.txt

    r25970 r32226  
    4545            RenderBlock {P} at (0,0) size 780x150
    4646              RenderBlock {P} at (0,0) size 780x110
    47                 RenderText {#text} at (0,0) size 71x22
    48                   text run at (0,0) width 71: "This is an"
    49                 RenderText {#text} at (71,0) size 5x22
    50                   text run at (71,0) width 5: " "
     47                RenderText {#text} at (2,0) size 71x22
     48                  text run at (2,0) width 71: "This is an"
     49                RenderText {#text} at (73,0) size 5x22
     50                  text run at (73,0) width 5: " "
    5151                RenderInline {B} at (0,0) size 82x22
    52                   RenderText {#text} at (76,0) size 82x22
    53                     text run at (76,0) width 82: "interactive"
    54                 RenderText {#text} at (158,0) size 5x22
    55                   text run at (158,0) width 5: " "
    56                 RenderText {#text} at (163,0) size 617x44
    57                   text run at (163,0) width 617: "documentation site, so please help out by posting any useful information that you've "
     52                  RenderText {#text} at (78,0) size 82x22
     53                    text run at (78,0) width 82: "interactive"
     54                RenderText {#text} at (160,0) size 5x22
     55                  text run at (160,0) width 5: " "
     56                RenderText {#text} at (165,0) size 615x44
     57                  text run at (165,0) width 612: "documentation site, so please help out by posting any useful information that you've"
     58                  text run at (777,0) width 3: " "
    5859                  text run at (325,22) width 129: "had to search out."
    5960                RenderBR {BR} at (454,39) size 0x0
  • trunk/LayoutTests/platform/mac/editing/pasteboard/nested-blocks-with-text-area-expected.checksum

    r26026 r32226  
    1 3c3b2aa5eae2525fe3e036987986fbe3
     1fd1a438b6a758137fb6421bfb2c149a9
  • trunk/LayoutTests/platform/mac/editing/pasteboard/nested-blocks-with-text-area-expected.txt

    r30635 r32226  
    1919        RenderBR {BR} at (526,14) size 0x0
    2020      RenderBlock {DIV} at (0,18) size 784x36
    21         RenderText {#text} at (29,0) size 725x36
    22           text run at (29,0) width 725: "This test checks that pasing in a combination of nested blocks where one starts with a text field doesn't crash or fail "
     21        RenderText {#text} at (31,0) size 725x36
     22          text run at (31,0) width 721: "This test checks that pasing in a combination of nested blocks where one starts with a text field doesn't crash or fail"
     23          text run at (752,0) width 4: " "
    2324          text run at (359,18) width 65: "assertions."
    2425      RenderBlock {DIV} at (0,54) size 784x36
  • trunk/LayoutTests/platform/mac/editing/pasteboard/nested-blocks-with-text-field-expected.checksum

    r26026 r32226  
    1 4e57f303fe71cc80791e13d1c3a4ce8d
     15fb4217d7366ed225f19698dd3faf00d
  • trunk/LayoutTests/platform/mac/editing/pasteboard/nested-blocks-with-text-field-expected.txt

    r30635 r32226  
    1919        RenderBR {BR} at (526,14) size 0x0
    2020      RenderBlock {DIV} at (0,18) size 784x36
    21         RenderText {#text} at (29,0) size 725x36
    22           text run at (29,0) width 725: "This test checks that pasing in a combination of nested blocks where one starts with a text field doesn't crash or fail "
     21        RenderText {#text} at (31,0) size 725x36
     22          text run at (31,0) width 721: "This test checks that pasing in a combination of nested blocks where one starts with a text field doesn't crash or fail"
     23          text run at (752,0) width 4: " "
    2324          text run at (359,18) width 65: "assertions."
    2425      RenderBlock {DIV} at (0,54) size 784x23
  • trunk/LayoutTests/platform/mac/editing/selection/5081257-1-expected.txt

    r30635 r32226  
    88          text run at (0,0) width 731: "This tests for setting the selection at a position inside the document when the document node is non-editable and the "
    99          text run at (0,18) width 251: "document's body element *is* editable. "
    10           text run at (251,18) width 532: "The expected behavior is to create a selection at [body, 0]. There should be a caret at"
    11           text run at (783,18) width 1: " "
     10          text run at (251,18) width 533: "The expected behavior is to create a selection at [body, 0]. There should be a caret at "
    1211          text run at (0,36) width 163: "the start of this paragraph."
    1312caret: position 0 of child 0 {#text} of child 1 {P} of child 0 {BODY} of child 0 {HTML} of document
  • trunk/LayoutTests/platform/mac/editing/selection/after-line-wrap-expected.txt

    r30635 r32226  
    3131      RenderBlock {DIV} at (16,104) size 752x38 [border: (1px solid #000000)]
    3232        RenderText {#text} at (1,1) size 750x18
    33           text run at (1,1) width 749: "don't select me                                                                                                                                                                    "
    34           text run at (750,1) width 1: "                                                                                                                                                                                         "
     33          text run at (1,1) width 750: "don't select me                                                                                                                                                                                                                                                                                                                                                             "
    3534        RenderInline {I} at (0,0) size 150x18
    3635          RenderText {#text} at (1,19) size 150x18
  • trunk/LayoutTests/platform/mac/editing/selection/mixed-editability-1-expected.txt

    r30635 r32226  
    1515      RenderText {#text} at (20,0) size 784x36
    1616        text run at (20,0) width 464: "ly the first two letters of the first word in this sentence should be selected. "
    17         text run at (484,0) width 298: "To run this test manually, double click between"
    18         text run at (782,0) width 2: " "
     17        text run at (484,0) width 300: "To run this test manually, double click between "
    1918        text run at (0,18) width 351: "the first two letters of the first word of the first sentence."
    2019      RenderText {#text} at (0,0) size 0x0
  • trunk/LayoutTests/platform/mac/editing/selection/select-all-001-expected.txt

    r25970 r32226  
    1515            text run at (0,58) width 589: "upon this continent, a new nation, conceived in Liberty, and "
    1616            text run at (0,106) width 577: "dedicated to the proposition that all men are created equal. "
    17             text run at (0,154) width 596: "Now we are engaged in a great civil war, testing whether that"
    18             text run at (596,154) width 4: " "
     17            text run at (0,154) width 600: "Now we are engaged in a great civil war, testing whether that "
    1918            text run at (0,202) width 565: "nation, or any nation, so conceived, and so dedicated, can "
    2019            text run at (0,250) width 571: "long endure. We are met here on a great battlefield of that "
     
    2322            text run at (0,394) width 579: "nation might live. It is altogether fitting and proper that we "
    2423            text run at (0,442) width 565: "should do this. Four score and seven years ago our fathers "
    25             text run at (0,490) width 598: "brought forth, upon this continent, a new nation, conceived in"
    26             text run at (598,490) width 2: " "
     24            text run at (0,490) width 600: "brought forth, upon this continent, a new nation, conceived in "
    2725            text run at (0,538) width 560: "Liberty, and dedicated to the proposition that all men are "
    2826            text run at (0,586) width 136: "created equal."
  • trunk/LayoutTests/platform/mac/editing/selection/select-all-002-expected.txt

    r25970 r32226  
    2222          RenderBR {BR} at (569,272) size 0x0
    2323          RenderText {#text} at (0,298) size 600x172
    24             text run at (0,298) width 600: "battlefield of that war. We have come to dedicate a portion of"
    25             text run at (600,298) width 0: " "
     24            text run at (0,298) width 600: "battlefield of that war. We have come to dedicate a portion of "
    2625            text run at (0,346) width 585: "it as a final resting place for those who here gave their lives "
    2726            text run at (0,394) width 588: "that that nation might live. It is altogether fitting and proper "
  • trunk/LayoutTests/platform/mac/editing/selection/select-all-003-expected.txt

    r25970 r32226  
    1616          text run at (0,154) width 589: "upon this continent, a new nation, conceived in Liberty, and "
    1717          text run at (0,202) width 577: "dedicated to the proposition that all men are created equal. "
    18           text run at (0,250) width 596: "Now we are engaged in a great civil war, testing whether that"
    19           text run at (596,250) width 4: " "
     18          text run at (0,250) width 600: "Now we are engaged in a great civil war, testing whether that "
    2019          text run at (0,298) width 565: "nation, or any nation, so conceived, and so dedicated, can "
    2120          text run at (0,346) width 571: "long endure. We are met here on a great battlefield of that "
     
    2423          text run at (0,490) width 579: "nation might live. It is altogether fitting and proper that we "
    2524          text run at (0,538) width 565: "should do this. Four score and seven years ago our fathers "
    26           text run at (0,586) width 598: "brought forth, upon this continent, a new nation, conceived in"
    27           text run at (598,586) width 2: " "
     25          text run at (0,586) width 600: "brought forth, upon this continent, a new nation, conceived in "
    2826          text run at (0,634) width 560: "Liberty, and dedicated to the proposition that all men are "
    2927          text run at (0,682) width 142: "created equal. "
  • trunk/LayoutTests/platform/mac/editing/style/apple-style-editable-mix-expected.txt

    r30635 r32226  
    1414            RenderTableCell {TD} at (2,2) size 644x20 [r=0 c=0 rs=1 cs=1]
    1515              RenderText {#text} at (1,1) size 642x18
    16                 text run at (1,1) width 642: "This tests that a style can be applied to a selection that contains both editable and non-editable content."
    17                 text run at (643,1) width 0: "             "
     16                text run at (1,1) width 642: "This tests that a style can be applied to a selection that contains both editable and non-editable content.             "
    1817            RenderTableCell {TD} at (648,2) size 108x20 [r=0 c=1 rs=1 cs=1]
    1918              RenderInline {SPAN} at (0,0) size 106x18
     
    2827            RenderTableCell {TD} at (2,2) size 596x20 [r=0 c=0 rs=1 cs=1]
    2928              RenderText {#text} at (1,1) size 594x18
    30                 text run at (1,1) width 594: "The test passes if the editable content is bold, and the non editable content remains unchanged."
    31                 text run at (595,1) width 0: "             "
     29                text run at (1,1) width 594: "The test passes if the editable content is bold, and the non editable content remains unchanged.             "
    3230            RenderTableCell {TD} at (600,2) size 108x20 [r=0 c=1 rs=1 cs=1]
    3331              RenderInline {SPAN} at (0,0) size 106x18
  • trunk/LayoutTests/platform/mac/editing/style/create-block-for-style-012-expected.checksum

    r26026 r32226  
    1 b17a5eb73d0d0adb210f702e69e722a6
     1e813eee918036a82e057b87c496d73ba
  • trunk/LayoutTests/platform/mac/editing/style/create-block-for-style-012-expected.txt

    r25970 r32226  
    2525          RenderBlock {DIV} at (14,42) size 756x84 [border: (2px solid #FF0000)]
    2626            RenderBlock {DIV} at (14,14) size 728x28
    27               RenderText {#text} at (345,0) size 37x28
    28                 text run at (345,0) width 37: "bar "
     27              RenderText {#text} at (348,0) size 37x28
     28                text run at (348,0) width 31: "bar"
     29                text run at (379,0) width 6: " "
    2930            RenderBlock {DIV} at (14,42) size 728x28
    3031              RenderText {#text} at (347,0) size 34x28
  • trunk/LayoutTests/platform/mac/fast/clip/outline-overflowClip-expected.txt

    r25970 r32226  
    1919  RenderBlock (positioned) {DIV} at (52,20) size 105x24 [bgcolor=#EEEEEE] [border: (3px solid #FF0000)]
    2020    RenderText {#text} at (3,3) size 99x18
    21       text run at (3,3) width 99: "text in inner div"
    22       text run at (102,3) width 0: " "
     21      text run at (3,3) width 99: "text in inner div "
  • trunk/LayoutTests/platform/mac/fast/forms/textarea-rows-cols-expected.txt

    r25562 r32226  
    110110  RenderBlock {DIV} at (1,1) size 161x26
    111111    RenderText {#text} at (3,0) size 155x26
    112       text run at (3,0) width 153: "cols = -1; should be default"
    113       text run at (156,0) width 2: " "
     112      text run at (3,0) width 155: "cols = -1; should be default "
    114113      text run at (3,13) width 30: "width"
    115114layer at (11,545) size 161x26
  • trunk/LayoutTests/platform/mac/fast/replaced/width100percent-textarea-expected.txt

    r30635 r32226  
    3838    RenderText {#text} at (3,0) size 20x13
    3939      text run at (3,0) width 20: "one"
    40 layer at (177,31) size 6x26 clip at (0,0) size 0x0 scrollWidth 4 scrollHeight 39
     40layer at (177,31) size 6x26 clip at (0,0) size 0x0 scrollWidth 13 scrollHeight 39
    4141  RenderBlock {DIV} at (1,1) size 6x26
    42     RenderText {#text} at (3,0) size 0x39
    43       text run at (3,0) width 0: "t"
    44       text run at (3,13) width 0: "w"
    45       text run at (3,26) width 0: "o"
    46 layer at (182,31) size 6x26 clip at (0,0) size 0x0 scrollWidth 4 scrollHeight 65
     42    RenderText {#text} at (3,0) size 9x39
     43      text run at (3,0) width 5: "t"
     44      text run at (3,13) width 9: "w"
     45      text run at (3,26) width 7: "o"
     46layer at (182,31) size 6x26 clip at (0,0) size 0x0 scrollWidth 11 scrollHeight 65
    4747  RenderBlock {DIV} at (1,1) size 6x26
    48     RenderText {#text} at (3,0) size 0x65
    49       text run at (3,0) width 0: "t"
    50       text run at (3,13) width 0: "h"
    51       text run at (3,26) width 0: "r"
    52       text run at (3,39) width 0: "e"
    53       text run at (3,52) width 0: "e"
     48    RenderText {#text} at (3,0) size 7x65
     49      text run at (3,0) width 5: "t"
     50      text run at (3,13) width 7: "h"
     51      text run at (3,26) width 5: "r"
     52      text run at (3,39) width 7: "e"
     53      text run at (3,52) width 7: "e"
    5454layer at (11,103) size 230x26
    5555  RenderBlock {DIV} at (1,1) size 230x26
    5656    RenderText {#text} at (3,0) size 74x13
    5757      text run at (3,0) width 74: "one two three"
    58 layer at (246,103) size 6x26 clip at (0,0) size 0x0 scrollWidth 4 scrollHeight 39
     58layer at (246,103) size 6x26 clip at (0,0) size 0x0 scrollWidth 13 scrollHeight 39
    5959  RenderBlock {DIV} at (1,1) size 6x26
    60     RenderText {#text} at (3,0) size 0x39
    61       text run at (3,0) width 0: "t"
    62       text run at (3,13) width 0: "w"
    63       text run at (3,26) width 0: "o"
    64 layer at (251,103) size 6x26 clip at (0,0) size 0x0 scrollWidth 4 scrollHeight 65
     60    RenderText {#text} at (3,0) size 9x39
     61      text run at (3,0) width 5: "t"
     62      text run at (3,13) width 9: "w"
     63      text run at (3,26) width 7: "o"
     64layer at (251,103) size 6x26 clip at (0,0) size 0x0 scrollWidth 11 scrollHeight 65
    6565  RenderBlock {DIV} at (1,1) size 6x26
    66     RenderText {#text} at (3,0) size 0x65
    67       text run at (3,0) width 0: "t"
    68       text run at (3,13) width 0: "h"
    69       text run at (3,26) width 0: "r"
    70       text run at (3,39) width 0: "e"
    71       text run at (3,52) width 0: "e"
     66    RenderText {#text} at (3,0) size 7x65
     67      text run at (3,0) width 5: "t"
     68      text run at (3,13) width 7: "h"
     69      text run at (3,26) width 5: "r"
     70      text run at (3,39) width 7: "e"
     71      text run at (3,52) width 7: "e"
  • trunk/LayoutTests/platform/mac/fast/text/embed-at-end-of-pre-wrap-line-expected.txt

    r30664 r32226  
    99      RenderBlock {DIV} at (0,34) size 80x46 [border: (1px solid #000000)]
    1010        RenderText {#text} at (5,5) size 70x18
    11           text run at (5,5) width 70: "Lorem......."
    12           text run at (75,5) width 0: " "
     11          text run at (5,5) width 70: "Lorem....... "
    1312        RenderInline {SPAN} at (0,0) size 38x18
    1413          RenderText {#text} at (5,23) size 38x18
     
    1817      RenderBlock {DIV} at (0,88) size 80x46 [border: (1px solid #000000)]
    1918        RenderText {#text} at (5,5) size 70x36
    20           text run at (5,5) width 70: "Lorem......."
    21           text run at (75,5) width 0: " "
     19          text run at (5,5) width 70: "Lorem....... "
    2220          text run at (5,23) width 38: "ipsum"
    2321          text run at (43,23) width 0: " "
  • trunk/LayoutTests/platform/mac/fast/text/justified-text-rect-expected.txt

    r26600 r32226  
    1818          RenderText {#text} at (38,0) size 10x18
    1919            text run at (38,0) width 10: "is"
    20         RenderText {#text} at (48,0) size 70x36
    21           text run at (48,0) width 22: " "
     20        RenderText {#text} at (48,0) size 52x36
     21          text run at (48,0) width 4: " "
    2222          text run at (0,18) width 50: "justified"
    2323      RenderBlock (anonymous) at (0,136) size 800x18
  • trunk/LayoutTests/platform/mac/fast/text/whitespace/pre-wrap-last-char-expected.txt

    r30635 r32226  
    2121          text run at (0,0) width 227: "The following line should not wrap."
    2222      RenderBlock {DIV} at (0,86) size 150x18 [bgcolor=#D3D3D3]
    23         RenderText {#text} at (0,0) size 150x18
    24           text run at (0,0) width 150: "abcdefghijklmnopqrstuvwxyz"
     23        RenderText {#text} at (0,0) size 188x18
     24          text run at (0,0) width 188: "abcdefghijklmnopqrstuvwxyz"
  • trunk/LayoutTests/platform/mac/fast/text/whitespace/pre-wrap-overflow-selection-expected.txt

    r25970 r32226  
    2323      RenderBlock {PRE} at (0,212) size 108x83 [border: (4px solid #0000FF)]
    2424        RenderText {#text} at (4,4) size 100x75
    25           text run at (4,4) width 96: "This   text "
    26           text run at (100,4) width 4: "    "
     25          text run at (4,4) width 100: "This   text     "
    2726          text run at (4,19) width 72: "will wrap"
    2827          text run at (76,19) width 0: " "
     
    3534  RenderBlock {PRE} at (0,101) size 108x83 [border: (4px solid #A52A2A)]
    3635    RenderText {#text} at (4,4) size 100x75
    37       text run at (4,4) width 96: "This   text "
    38       text run at (100,4) width 4: "    "
     36      text run at (4,4) width 100: "This   text     "
    3937      text run at (4,19) width 72: "will wrap"
    4038      text run at (76,19) width 0: " "
  • trunk/LayoutTests/platform/mac/fast/text/whitespace/pre-wrap-spaces-after-newline-expected.txt

    r30635 r32226  
    3333      RenderBlock {PRE} at (0,104) size 51x30 [bgcolor=#C0C0C0]
    3434        RenderText {#text} at (0,0) size 51x30
    35           text run at (0,0) width 48: "foo   "
    36           text run at (48,0) width 3: "   "
     35          text run at (0,0) width 51: "foo      "
    3736          text run at (0,15) width 24: "bar"
    3837      RenderBlock {P} at (0,150) size 769x18
     
    7877          text run at (0,15) width 48: "   bar"
    7978      RenderBlock {PRE} at (0,442) size 51x30 [bgcolor=#C0C0C0]
    80         RenderText {#text} at (0,0) size 51x30
     79        RenderText {#text} at (0,0) size 64x30
    8180          text run at (0,0) width 48: "foo   "
    82           text run at (48,0) width 3: "  "
     81          text run at (48,0) width 16: "  "
    8382          text run at (0,15) width 48: "   bar"
    8483      RenderBlock {P} at (0,488) size 769x18
  • trunk/WebCore/ChangeLog

    r32225 r32226  
     12008-04-18  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        - fix https://bugs.webkit.org/show_bug.cgi?id=17921
     6          Extra white space at the end of right-aligned or justified text with -webkit-line-break: after-white-space
     7
     8        Test: fast/text/trailing-white-space.html
     9
     10        Made trailing white space on the line always behave like it has the base
     11        bidi level of the block, meaning it will always go on the right (left)
     12        of the line in a left-to-right (right-to-left) block. Made the trailing
     13        white space vanish when it is next to a margin that the text should
     14        be touching, and made its width not count when computing the center
     15        point for center alignment.
     16
     17        * platform/text/BidiResolver.h:
     18        (WebCore::::prependRun): Added.
     19        * rendering/RenderBlock.h:
     20        * rendering/bidi.cpp:
     21        (WebCore::RenderBlock::computeHorizontalPositionsForLine): Changed the
     22        logicallyLastRun parameter to an optional trailingSpaceRun and changed
     23        the alignment logic to implement the above rules.
     24        (WebCore::RenderBlock::layoutInlineChildren): Added code to identify
     25        when there is trailing white space that needs to be split into its own
     26        run and optionally re-ordered.
     27        (WebCore::RenderBlock::findNextLineBreak): Removed code that split some
     28        trailing space into a separate run in one special case.
     29
    1302008-04-10  Mark Rowe  <mrowe@apple.com>
    231
  • trunk/WebCore/platform/text/BidiResolver.h

    r30963 r32226  
    144144
    145145    void addRun(Run*);
     146    void prependRun(Run*);
    146147    void deleteRuns();
    147148
     
    175176        m_lastRun->m_next = run;
    176177    m_lastRun = run;
     178    m_runCount++;
     179}
     180
     181template <class Iterator, class Run>
     182inline void BidiResolver<Iterator, Run>::prependRun(Run* run)
     183{
     184    ASSERT(!run->m_next);
     185
     186    if (!m_lastRun)
     187        m_lastRun = run;
     188    else
     189        run->m_next = m_firstRun;
     190    m_firstRun = run;
    177191    m_runCount++;
    178192}
  • trunk/WebCore/rendering/RenderBlock.h

    r31200 r32226  
    152152    RootInlineBox* constructLine(unsigned runCount, BidiRun* firstRun, BidiRun* lastRun, bool lastLine, RenderObject* endObject);
    153153    InlineFlowBox* createLineBoxes(RenderObject*);
    154     void computeHorizontalPositionsForLine(RootInlineBox*, BidiRun* firstRun, BidiRun* logicallyLastRun, bool reachedEnd);
     154    void computeHorizontalPositionsForLine(RootInlineBox*, BidiRun* firstRun, BidiRun* trailingSpaceRun, bool reachedEnd);
    155155    void computeVerticalPositionsForLine(RootInlineBox*, BidiRun*);
    156156    void checkLinesForOverflow();
  • trunk/WebCore/rendering/bidi.cpp

    r31734 r32226  
    560560}
    561561
    562 void RenderBlock::computeHorizontalPositionsForLine(RootInlineBox* lineBox, BidiRun* firstRun, BidiRun* logicallyLastRun, bool reachedEnd)
     562void RenderBlock::computeHorizontalPositionsForLine(RootInlineBox* lineBox, BidiRun* firstRun, BidiRun* trailingSpaceRun, bool reachedEnd)
    563563{
    564564    // First determine our total width.
     
    577577            RenderText* rt = static_cast<RenderText*>(r->m_object);
    578578
    579             if (textAlign == JUSTIFY) {
     579            if (textAlign == JUSTIFY && r != trailingSpaceRun) {
    580580                const UChar* characters = rt->characters();
    581581                for (int i = r->m_start; i < r->m_stop; i++) {
     
    602602        if (!r->m_compact)
    603603            totWidth += r->m_box->width();
    604     }
    605 
    606     if (totWidth > availableWidth && logicallyLastRun->m_object->style(m_firstLine)->autoWrap()
    607         && logicallyLastRun->m_object->style(m_firstLine)->breakOnlyAfterWhiteSpace() && !logicallyLastRun->m_compact) {
    608         logicallyLastRun->m_box->setWidth(logicallyLastRun->m_box->width() - totWidth + availableWidth);
    609         totWidth = availableWidth;
    610604    }
    611605
     
    620614            // The direction of the block should determine what happens with wide lines.  In
    621615            // particular with RTL blocks, wide lines should still spill out to the left.
    622             if (style()->direction() == RTL && totWidth > availableWidth)
    623                 x -= (totWidth - availableWidth);
     616            if (style()->direction() == LTR) {
     617                if (totWidth > availableWidth && trailingSpaceRun)
     618                    trailingSpaceRun->m_box->setWidth(trailingSpaceRun->m_box->width() - totWidth + availableWidth);
     619            } else {
     620                if (trailingSpaceRun)
     621                    trailingSpaceRun->m_box->setWidth(0);
     622                else if (totWidth > availableWidth)
     623                    x -= (totWidth - availableWidth);
     624            }
    624625            break;
    625626        case JUSTIFY:
    626             if (numSpaces && !reachedEnd && !lineBox->endsWithBreak())
     627            if (numSpaces && !reachedEnd && !lineBox->endsWithBreak()) {
     628                if (trailingSpaceRun) {
     629                    totWidth -= trailingSpaceRun->m_box->width();
     630                    trailingSpaceRun->m_box->setWidth(0);
     631                }
    627632                break;
     633            }
    628634            // fall through
    629635        case TAAUTO:
    630636            numSpaces = 0;
    631637            // for right to left fall through to right aligned
    632             if (style()->direction() == LTR)
     638            if (style()->direction() == LTR) {
     639                if (totWidth > availableWidth && trailingSpaceRun)
     640                    trailingSpaceRun->m_box->setWidth(trailingSpaceRun->m_box->width() - totWidth + availableWidth);
    633641                break;
     642            }
    634643        case RIGHT:
    635644        case WEBKIT_RIGHT:
     
    637646            // So even if text-align is right, if direction is LTR, wide lines should overflow out of the right
    638647            // side of the block.
    639             if (style()->direction() == RTL || totWidth < availableWidth)
    640                 x += availableWidth - totWidth;
     648            if (style()->direction() == LTR) {
     649                if (trailingSpaceRun) {
     650                    totWidth -= trailingSpaceRun->m_box->width();
     651                    trailingSpaceRun->m_box->setWidth(0);
     652                }
     653                if (totWidth < availableWidth)
     654                    x += availableWidth - totWidth;
     655            } else {
     656                if (totWidth > availableWidth && trailingSpaceRun) {
     657                    trailingSpaceRun->m_box->setWidth(trailingSpaceRun->m_box->width() - totWidth + availableWidth);
     658                    totWidth -= trailingSpaceRun->m_box->width();
     659                } else
     660                    x += availableWidth - totWidth;
     661            }
    641662            break;
    642663        case CENTER:
    643664        case WEBKIT_CENTER:
     665            int trailingSpaceWidth = 0;
     666            if (trailingSpaceRun) {
     667                totWidth -= trailingSpaceRun->m_box->width();
     668                trailingSpaceWidth = min(trailingSpaceRun->m_box->width(), (availableWidth - totWidth + 1) / 2);
     669                trailingSpaceRun->m_box->setWidth(trailingSpaceWidth);
     670            }
    644671            if (style()->direction() == LTR)
    645672                x += max((availableWidth - totWidth) / 2, 0);
    646673            else
    647                 x += totWidth > availableWidth ? (availableWidth - totWidth) : (availableWidth - totWidth) / 2;
     674                x += totWidth > availableWidth ? (availableWidth - totWidth) : (availableWidth - totWidth) / 2 - trailingSpaceWidth;
    648675            break;
    649676    }
     
    651678    if (numSpaces) {
    652679        for (BidiRun* r = firstRun; r; r = r->next()) {
    653             if (!r->m_box)
     680            if (!r->m_box || r == trailingSpaceRun)
    654681                continue;
    655682
     
    749776    sCurrMidpoint = 0;
    750777    betweenMidpoints = false;
     778}
     779
     780static inline bool isCollapsibleSpace(UChar character, RenderText* renderer)
     781{
     782    if (character == ' ' || character == '\t' || character == softHyphen)
     783        return true;
     784    if (character == '\n')
     785        return !renderer->style()->preserveNewline();
     786    if (character == noBreakSpace)
     787        return renderer->style()->nbspMode() == SPACE;
     788    return false;
    751789}
    752790
     
    908946            if (!isLineEmpty) {
    909947                bidiReorderLine(start, end);
     948                ASSERT(start.position() == end);
     949
     950                BidiRun* trailingSpaceRun = 0;
     951                if (!previousLineBrokeCleanly && start.runCount() && start.logicallyLastRun()->m_object->style()->breakOnlyAfterWhiteSpace()) {
     952                    trailingSpaceRun = start.logicallyLastRun();
     953                    RenderObject* lastObject = trailingSpaceRun->m_object;
     954                    if (lastObject->isText()) {
     955                        RenderText* lastText = static_cast<RenderText*>(lastObject);
     956                        const UChar* characters = lastText->characters();
     957                        int firstSpace = trailingSpaceRun->stop();
     958                        while (firstSpace > trailingSpaceRun->start()) {
     959                            UChar current = characters[firstSpace - 1];
     960                            if (!isCollapsibleSpace(current, lastText))
     961                                break;
     962                            firstSpace--;
     963                        }
     964                        if (firstSpace == trailingSpaceRun->stop())
     965                            trailingSpaceRun = 0;
     966                        else if (firstSpace != trailingSpaceRun->start()) {
     967                            ETextAlign textAlign = style()->textAlign();
     968                            // If the trailing white space is at the right hand side of a left-aligned line, then computeHorizontalPositionsForLine()
     969                            // does not care if trailingSpaceRun includes non-spaces at the beginning. In all other cases, trailingSpaceRun has to
     970                            // contain only the spaces, either because we re-order them or because computeHorizontalPositionsForLine() needs to know
     971                            // their width.
     972                            bool shouldSeparateSpaces = textAlign != LEFT && textAlign != WEBKIT_LEFT && textAlign != TAAUTO || trailingSpaceRun->m_level % 2 || style()->direction() == RTL || trailingSpaceRun != start.lastRun();
     973
     974                            if (shouldSeparateSpaces) {
     975                                BidiContext* baseContext = start.context();
     976                                while (BidiContext* parent = baseContext->parent())
     977                                    baseContext = parent;
     978
     979                                BidiRun* newTrailingRun = new (renderArena()) BidiRun(firstSpace, trailingSpaceRun->m_stop, trailingSpaceRun->m_object, baseContext, OtherNeutral);
     980                                trailingSpaceRun->m_stop = firstSpace;
     981                                if (style()->direction() == LTR)
     982                                    start.addRun(newTrailingRun);
     983                                else
     984                                    start.prependRun(newTrailingRun);
     985                                trailingSpaceRun = newTrailingRun;
     986                            }
     987                        }
     988                    } else
     989                        trailingSpaceRun = 0;
     990                }
    910991
    911992                // Now that the runs have been ordered, we create the line boxes.
     
    9201001
    9211002                        // Now we position all of our text runs horizontally.
    922                         computeHorizontalPositionsForLine(lineBox, start.firstRun(), start.logicallyLastRun(), end.atEnd());
     1003                        computeHorizontalPositionsForLine(lineBox, start.firstRun(), trailingSpaceRun, end.atEnd());
    9231004
    9241005                        // Now position our text runs vertically.
     
    17881869                                lBreak.obj = o;
    17891870                                lBreak.pos = pos;
    1790                                 if (pos > 0) {
    1791                                     // Separate the trailing space into its own box, which we will
    1792                                     // resize to fit on the line in computeHorizontalPositionsForLine().
    1793                                     addMidpoint(BidiIterator(0, o, pos - 1)); // Stop
    1794                                     addMidpoint(BidiIterator(0, o, pos)); // Start
    1795                                 }
    17961871                                skipWhitespace(lBreak);
    17971872                            }
Note: See TracChangeset for help on using the changeset viewer.