Changeset 32226 in webkit
- Timestamp:
- Apr 18, 2008 2:18:26 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 46 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r32216 r32226 1 2008-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 1 54 2008-04-18 Dan Bernstein <mitz@apple.com> 2 55 -
trunk/LayoutTests/http/tests/misc/acid3-expected.txt
r31391 r32226 36 36 RenderImage {IMG} at (0,0) size 1x1 37 37 RenderPartObject {IFRAME} at (0,0) size 0x0 38 layer at (0,0) size 8x215138 layer at (0,0) size 16x2151 39 39 RenderView at (0,0) size 0x0 40 layer at (0,0) size 8x215140 layer at (0,0) size 16x2151 41 41 RenderBlock {HTML} at (0,0) size 0x2151 42 42 RenderBody {BODY} at (8,8) size 0x2130 43 43 RenderBlock {PRE} at (0,0) size 0x2130 44 RenderText {#text} at (0,0) size 0x213045 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: ">" 187 187 RenderPartObject {IFRAME} at (0,0) size 0x0 188 188 layer at (0,0) size 8x8 -
trunk/LayoutTests/platform/mac/editing/deleting/delete-block-table-expected.txt
r30635 r32226 38 38 RenderTableCell {TD} at (2,24) size 27x20 [r=1 c=0 rs=1 cs=1] 39 39 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 " 42 41 RenderTableCell {TD} at (31,24) size 60x20 [r=1 c=1 rs=1 cs=1] 43 42 RenderText {#text} at (1,1) size 37x18 -
trunk/LayoutTests/platform/mac/editing/deleting/delete-to-select-table-expected.txt
r30635 r32226 50 50 RenderTableCell {TD} at (2,24) size 27x20 [r=1 c=0 rs=1 cs=1] 51 51 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 " 54 53 RenderTableCell {TD} at (31,24) size 47x20 [r=1 c=1 rs=1 cs=1] 55 54 RenderText {#text} at (1,1) size 45x18 -
trunk/LayoutTests/platform/mac/editing/deleting/deletionUI-single-instance-expected.txt
r30635 r32226 20 20 RenderTableCell {TD} at (2,2) size 748x74 [r=0 c=0 rs=1 cs=1] 21 21 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. " 24 23 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 " 25 24 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 7 7 RenderText {#text} at (0,0) size 784x111 8 8 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 " 11 10 text run at (0,74) width 287: "inside an h1 element." 12 11 caret: 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 173 173 text run at (0,84) width 197: "disagree with them, " 174 174 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 " 177 176 text run at (0,112) width 129: "ignore them. " 178 177 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. " 181 179 text run at (0,140) width 481: "And while some may see them as the crazy ones, " 182 180 text run at (481,140) width 146: "we see genius. " -
trunk/LayoutTests/platform/mac/editing/execCommand/italicizeByCharacter-expected.txt
r25970 r32226 33 33 text run at (0,84) width 197: "disagree with them, " 34 34 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 " 37 36 text run at (0,112) width 129: "ignore them. " 38 37 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. " 41 39 text run at (0,140) width 481: "And while some may see them as the crazy ones, " 42 40 text run at (481,140) width 146: "we see genius. " -
trunk/LayoutTests/platform/mac/editing/execCommand/modifyForeColorByCharacter-expected.txt
r25970 r32226 33 33 text run at (0,84) width 197: "disagree with them, " 34 34 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 " 37 36 text run at (0,112) width 129: "ignore them. " 38 37 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. " 41 39 text run at (0,140) width 481: "And while some may see them as the crazy ones, " 42 40 text run at (481,140) width 146: "we see genius. " -
trunk/LayoutTests/platform/mac/editing/execCommand/print-expected.txt
r25970 r32226 26 26 text run at (0,84) width 197: "disagree with them, " 27 27 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 " 30 29 text run at (0,112) width 129: "ignore them. " 31 30 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. " 34 32 text run at (0,140) width 481: "And while some may see them as the crazy ones, " 35 33 text run at (481,140) width 146: "we see genius. " -
trunk/LayoutTests/platform/mac/editing/execCommand/selectAll-expected.txt
r25970 r32226 28 28 text run at (0,84) width 197: "disagree with them, " 29 29 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 " 32 31 text run at (0,112) width 129: "ignore them. " 33 32 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. " 36 34 text run at (0,140) width 481: "And while some may see them as the crazy ones, " 37 35 text run at (481,140) width 146: "we see genius. " -
trunk/LayoutTests/platform/mac/editing/execCommand/strikethroughSelection-expected.txt
r30635 r32226 173 173 text run at (0,84) width 197: "disagree with them, " 174 174 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 " 177 176 text run at (0,112) width 129: "ignore them. " 178 177 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. " 181 179 text run at (0,140) width 481: "And while some may see them as the crazy ones, " 182 180 text run at (481,140) width 146: "we see genius. " -
trunk/LayoutTests/platform/mac/editing/inserting/editable-html-element-expected.txt
r30635 r32226 19 19 RenderBlock (anonymous) at (0,0) size 784x54 20 20 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 " 23 22 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 " 24 23 text run at (0,36) width 58: "element)." -
trunk/LayoutTests/platform/mac/editing/inserting/insert-div-027-expected.txt
r25970 r32226 19 19 RenderBlock (anonymous) at (0,0) size 784x56 20 20 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 " 23 22 text run at (0,28) width 245: "starts with an empty line." 24 23 RenderBlock {DIV} at (0,56) size 784x36 -
trunk/LayoutTests/platform/mac/editing/pasteboard/5028447-expected.txt
r30635 r32226 7 7 text run at (0,0) width 418: "All the text here should be the same size. " 8 8 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 " 11 10 text run at (0,29) width 51: "size. " 12 11 RenderText {#text} at (0,0) size 0x0 -
trunk/LayoutTests/platform/mac/editing/pasteboard/block-wrappers-necessary-expected.checksum
r26026 r32226 1 53b060e628656ef527d733f3d96c943f 1 75b51fb128eb45f45d2e5fd826f91838 -
trunk/LayoutTests/platform/mac/editing/pasteboard/block-wrappers-necessary-expected.txt
r25970 r32226 45 45 RenderBlock {P} at (0,0) size 780x150 46 46 RenderBlock {P} at (0,0) size 780x110 47 RenderText {#text} at ( 0,0) size 71x2248 text run at ( 0,0) width 71: "This is an"49 RenderText {#text} at (7 1,0) size 5x2250 text run at (7 1,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: " " 51 51 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: " " 58 59 text run at (325,22) width 129: "had to search out." 59 60 RenderBR {BR} at (454,39) size 0x0 -
trunk/LayoutTests/platform/mac/editing/pasteboard/nested-blocks-with-text-area-expected.checksum
r26026 r32226 1 3c3b2aa5eae2525fe3e036987986fbe3 1 fd1a438b6a758137fb6421bfb2c149a9 -
trunk/LayoutTests/platform/mac/editing/pasteboard/nested-blocks-with-text-area-expected.txt
r30635 r32226 19 19 RenderBR {BR} at (526,14) size 0x0 20 20 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: " " 23 24 text run at (359,18) width 65: "assertions." 24 25 RenderBlock {DIV} at (0,54) size 784x36 -
trunk/LayoutTests/platform/mac/editing/pasteboard/nested-blocks-with-text-field-expected.checksum
r26026 r32226 1 4e57f303fe71cc80791e13d1c3a4ce8d1 5fb4217d7366ed225f19698dd3faf00d -
trunk/LayoutTests/platform/mac/editing/pasteboard/nested-blocks-with-text-field-expected.txt
r30635 r32226 19 19 RenderBR {BR} at (526,14) size 0x0 20 20 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: " " 23 24 text run at (359,18) width 65: "assertions." 24 25 RenderBlock {DIV} at (0,54) size 784x23 -
trunk/LayoutTests/platform/mac/editing/selection/5081257-1-expected.txt
r30635 r32226 8 8 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 " 9 9 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 " 12 11 text run at (0,36) width 163: "the start of this paragraph." 13 12 caret: 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 31 31 RenderBlock {DIV} at (16,104) size 752x38 [border: (1px solid #000000)] 32 32 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 " 35 34 RenderInline {I} at (0,0) size 150x18 36 35 RenderText {#text} at (1,19) size 150x18 -
trunk/LayoutTests/platform/mac/editing/selection/mixed-editability-1-expected.txt
r30635 r32226 15 15 RenderText {#text} at (20,0) size 784x36 16 16 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 " 19 18 text run at (0,18) width 351: "the first two letters of the first word of the first sentence." 20 19 RenderText {#text} at (0,0) size 0x0 -
trunk/LayoutTests/platform/mac/editing/selection/select-all-001-expected.txt
r25970 r32226 15 15 text run at (0,58) width 589: "upon this continent, a new nation, conceived in Liberty, and " 16 16 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 " 19 18 text run at (0,202) width 565: "nation, or any nation, so conceived, and so dedicated, can " 20 19 text run at (0,250) width 571: "long endure. We are met here on a great battlefield of that " … … 23 22 text run at (0,394) width 579: "nation might live. It is altogether fitting and proper that we " 24 23 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 " 27 25 text run at (0,538) width 560: "Liberty, and dedicated to the proposition that all men are " 28 26 text run at (0,586) width 136: "created equal." -
trunk/LayoutTests/platform/mac/editing/selection/select-all-002-expected.txt
r25970 r32226 22 22 RenderBR {BR} at (569,272) size 0x0 23 23 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 " 26 25 text run at (0,346) width 585: "it as a final resting place for those who here gave their lives " 27 26 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 16 16 text run at (0,154) width 589: "upon this continent, a new nation, conceived in Liberty, and " 17 17 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 " 20 19 text run at (0,298) width 565: "nation, or any nation, so conceived, and so dedicated, can " 21 20 text run at (0,346) width 571: "long endure. We are met here on a great battlefield of that " … … 24 23 text run at (0,490) width 579: "nation might live. It is altogether fitting and proper that we " 25 24 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 " 28 26 text run at (0,634) width 560: "Liberty, and dedicated to the proposition that all men are " 29 27 text run at (0,682) width 142: "created equal. " -
trunk/LayoutTests/platform/mac/editing/style/apple-style-editable-mix-expected.txt
r30635 r32226 14 14 RenderTableCell {TD} at (2,2) size 644x20 [r=0 c=0 rs=1 cs=1] 15 15 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. " 18 17 RenderTableCell {TD} at (648,2) size 108x20 [r=0 c=1 rs=1 cs=1] 19 18 RenderInline {SPAN} at (0,0) size 106x18 … … 28 27 RenderTableCell {TD} at (2,2) size 596x20 [r=0 c=0 rs=1 cs=1] 29 28 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. " 32 30 RenderTableCell {TD} at (600,2) size 108x20 [r=0 c=1 rs=1 cs=1] 33 31 RenderInline {SPAN} at (0,0) size 106x18 -
trunk/LayoutTests/platform/mac/editing/style/create-block-for-style-012-expected.checksum
r26026 r32226 1 b17a5eb73d0d0adb210f702e69e722a6 1 e813eee918036a82e057b87c496d73ba -
trunk/LayoutTests/platform/mac/editing/style/create-block-for-style-012-expected.txt
r25970 r32226 25 25 RenderBlock {DIV} at (14,42) size 756x84 [border: (2px solid #FF0000)] 26 26 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: " " 29 30 RenderBlock {DIV} at (14,42) size 728x28 30 31 RenderText {#text} at (347,0) size 34x28 -
trunk/LayoutTests/platform/mac/fast/clip/outline-overflowClip-expected.txt
r25970 r32226 19 19 RenderBlock (positioned) {DIV} at (52,20) size 105x24 [bgcolor=#EEEEEE] [border: (3px solid #FF0000)] 20 20 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 110 110 RenderBlock {DIV} at (1,1) size 161x26 111 111 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 " 114 113 text run at (3,13) width 30: "width" 115 114 layer at (11,545) size 161x26 -
trunk/LayoutTests/platform/mac/fast/replaced/width100percent-textarea-expected.txt
r30635 r32226 38 38 RenderText {#text} at (3,0) size 20x13 39 39 text run at (3,0) width 20: "one" 40 layer at (177,31) size 6x26 clip at (0,0) size 0x0 scrollWidth 4scrollHeight 3940 layer at (177,31) size 6x26 clip at (0,0) size 0x0 scrollWidth 13 scrollHeight 39 41 41 RenderBlock {DIV} at (1,1) size 6x26 42 RenderText {#text} at (3,0) size 0x3943 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 4scrollHeight 6542 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" 46 layer at (182,31) size 6x26 clip at (0,0) size 0x0 scrollWidth 11 scrollHeight 65 47 47 RenderBlock {DIV} at (1,1) size 6x26 48 RenderText {#text} at (3,0) size 0x6549 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" 54 54 layer at (11,103) size 230x26 55 55 RenderBlock {DIV} at (1,1) size 230x26 56 56 RenderText {#text} at (3,0) size 74x13 57 57 text run at (3,0) width 74: "one two three" 58 layer at (246,103) size 6x26 clip at (0,0) size 0x0 scrollWidth 4scrollHeight 3958 layer at (246,103) size 6x26 clip at (0,0) size 0x0 scrollWidth 13 scrollHeight 39 59 59 RenderBlock {DIV} at (1,1) size 6x26 60 RenderText {#text} at (3,0) size 0x3961 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 4scrollHeight 6560 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" 64 layer at (251,103) size 6x26 clip at (0,0) size 0x0 scrollWidth 11 scrollHeight 65 65 65 RenderBlock {DIV} at (1,1) size 6x26 66 RenderText {#text} at (3,0) size 0x6567 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 9 9 RenderBlock {DIV} at (0,34) size 80x46 [border: (1px solid #000000)] 10 10 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....... " 13 12 RenderInline {SPAN} at (0,0) size 38x18 14 13 RenderText {#text} at (5,23) size 38x18 … … 18 17 RenderBlock {DIV} at (0,88) size 80x46 [border: (1px solid #000000)] 19 18 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....... " 22 20 text run at (5,23) width 38: "ipsum" 23 21 text run at (43,23) width 0: " " -
trunk/LayoutTests/platform/mac/fast/text/justified-text-rect-expected.txt
r26600 r32226 18 18 RenderText {#text} at (38,0) size 10x18 19 19 text run at (38,0) width 10: "is" 20 RenderText {#text} at (48,0) size 70x3621 text run at (48,0) width 22: " "20 RenderText {#text} at (48,0) size 52x36 21 text run at (48,0) width 4: " " 22 22 text run at (0,18) width 50: "justified" 23 23 RenderBlock (anonymous) at (0,136) size 800x18 -
trunk/LayoutTests/platform/mac/fast/text/whitespace/pre-wrap-last-char-expected.txt
r30635 r32226 21 21 text run at (0,0) width 227: "The following line should not wrap." 22 22 RenderBlock {DIV} at (0,86) size 150x18 [bgcolor=#D3D3D3] 23 RenderText {#text} at (0,0) size 1 50x1824 text run at (0,0) width 1 50: "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 23 23 RenderBlock {PRE} at (0,212) size 108x83 [border: (4px solid #0000FF)] 24 24 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 " 27 26 text run at (4,19) width 72: "will wrap" 28 27 text run at (76,19) width 0: " " … … 35 34 RenderBlock {PRE} at (0,101) size 108x83 [border: (4px solid #A52A2A)] 36 35 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 " 39 37 text run at (4,19) width 72: "will wrap" 40 38 text run at (76,19) width 0: " " -
trunk/LayoutTests/platform/mac/fast/text/whitespace/pre-wrap-spaces-after-newline-expected.txt
r30635 r32226 33 33 RenderBlock {PRE} at (0,104) size 51x30 [bgcolor=#C0C0C0] 34 34 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 " 37 36 text run at (0,15) width 24: "bar" 38 37 RenderBlock {P} at (0,150) size 769x18 … … 78 77 text run at (0,15) width 48: " bar" 79 78 RenderBlock {PRE} at (0,442) size 51x30 [bgcolor=#C0C0C0] 80 RenderText {#text} at (0,0) size 51x3079 RenderText {#text} at (0,0) size 64x30 81 80 text run at (0,0) width 48: "foo " 82 text run at (48,0) width 3: " "81 text run at (48,0) width 16: " " 83 82 text run at (0,15) width 48: " bar" 84 83 RenderBlock {P} at (0,488) size 769x18 -
trunk/WebCore/ChangeLog
r32225 r32226 1 2008-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 1 30 2008-04-10 Mark Rowe <mrowe@apple.com> 2 31 -
trunk/WebCore/platform/text/BidiResolver.h
r30963 r32226 144 144 145 145 void addRun(Run*); 146 void prependRun(Run*); 146 147 void deleteRuns(); 147 148 … … 175 176 m_lastRun->m_next = run; 176 177 m_lastRun = run; 178 m_runCount++; 179 } 180 181 template <class Iterator, class Run> 182 inline 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; 177 191 m_runCount++; 178 192 } -
trunk/WebCore/rendering/RenderBlock.h
r31200 r32226 152 152 RootInlineBox* constructLine(unsigned runCount, BidiRun* firstRun, BidiRun* lastRun, bool lastLine, RenderObject* endObject); 153 153 InlineFlowBox* createLineBoxes(RenderObject*); 154 void computeHorizontalPositionsForLine(RootInlineBox*, BidiRun* firstRun, BidiRun* logicallyLastRun, bool reachedEnd);154 void computeHorizontalPositionsForLine(RootInlineBox*, BidiRun* firstRun, BidiRun* trailingSpaceRun, bool reachedEnd); 155 155 void computeVerticalPositionsForLine(RootInlineBox*, BidiRun*); 156 156 void checkLinesForOverflow(); -
trunk/WebCore/rendering/bidi.cpp
r31734 r32226 560 560 } 561 561 562 void RenderBlock::computeHorizontalPositionsForLine(RootInlineBox* lineBox, BidiRun* firstRun, BidiRun* logicallyLastRun, bool reachedEnd)562 void RenderBlock::computeHorizontalPositionsForLine(RootInlineBox* lineBox, BidiRun* firstRun, BidiRun* trailingSpaceRun, bool reachedEnd) 563 563 { 564 564 // First determine our total width. … … 577 577 RenderText* rt = static_cast<RenderText*>(r->m_object); 578 578 579 if (textAlign == JUSTIFY ) {579 if (textAlign == JUSTIFY && r != trailingSpaceRun) { 580 580 const UChar* characters = rt->characters(); 581 581 for (int i = r->m_start; i < r->m_stop; i++) { … … 602 602 if (!r->m_compact) 603 603 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;610 604 } 611 605 … … 620 614 // The direction of the block should determine what happens with wide lines. In 621 615 // 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 } 624 625 break; 625 626 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 } 627 632 break; 633 } 628 634 // fall through 629 635 case TAAUTO: 630 636 numSpaces = 0; 631 637 // 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); 633 641 break; 642 } 634 643 case RIGHT: 635 644 case WEBKIT_RIGHT: … … 637 646 // So even if text-align is right, if direction is LTR, wide lines should overflow out of the right 638 647 // 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 } 641 662 break; 642 663 case CENTER: 643 664 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 } 644 671 if (style()->direction() == LTR) 645 672 x += max((availableWidth - totWidth) / 2, 0); 646 673 else 647 x += totWidth > availableWidth ? (availableWidth - totWidth) : (availableWidth - totWidth) / 2 ;674 x += totWidth > availableWidth ? (availableWidth - totWidth) : (availableWidth - totWidth) / 2 - trailingSpaceWidth; 648 675 break; 649 676 } … … 651 678 if (numSpaces) { 652 679 for (BidiRun* r = firstRun; r; r = r->next()) { 653 if (!r->m_box )680 if (!r->m_box || r == trailingSpaceRun) 654 681 continue; 655 682 … … 749 776 sCurrMidpoint = 0; 750 777 betweenMidpoints = false; 778 } 779 780 static 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; 751 789 } 752 790 … … 908 946 if (!isLineEmpty) { 909 947 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 } 910 991 911 992 // Now that the runs have been ordered, we create the line boxes. … … 920 1001 921 1002 // 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()); 923 1004 924 1005 // Now position our text runs vertically. … … 1788 1869 lBreak.obj = o; 1789 1870 lBreak.pos = pos; 1790 if (pos > 0) {1791 // Separate the trailing space into its own box, which we will1792 // resize to fit on the line in computeHorizontalPositionsForLine().1793 addMidpoint(BidiIterator(0, o, pos - 1)); // Stop1794 addMidpoint(BidiIterator(0, o, pos)); // Start1795 }1796 1871 skipWhitespace(lBreak); 1797 1872 }
Note: See TracChangeset
for help on using the changeset viewer.