Changeset 15418 in webkit
- Timestamp:
- Jul 13, 2006, 9:42:01 PM (19 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r15417 r15418 1 2006-07-13 Mitz Pettel <opendarwin.org@mitzpettel.com> 2 3 Reviewed by Hyatt. 4 5 - test and updated results for http://bugzilla.opendarwin.org/show_bug.cgi?id=9670 6 REGRESSION: RTL white-space:pre-wrap text is offset to the right 7 8 * editing/deleting/delete-to-select-table-expected.txt: 9 * editing/execCommand/boldSelection-expected.txt: 10 * editing/execCommand/italicizeByCharacter-expected.txt: 11 * editing/execCommand/modifyForeColorByCharacter-expected.txt: 12 * editing/execCommand/print-expected.txt: 13 * editing/execCommand/selectAll-expected.txt: 14 * editing/execCommand/strikethroughSelection-expected.txt: 15 * editing/inserting/insert-div-027-expected.txt: 16 * editing/selection/after-line-wrap-expected.txt: 17 * editing/selection/mixed-editability-1-expected.txt: 18 * editing/selection/select-all-001-expected.txt: 19 * editing/selection/select-all-002-expected.txt: 20 * editing/selection/select-all-003-expected.txt: 21 * fast/clip/outline-overflowClip-expected.txt: 22 * fast/text/international/rtl-white-space-pre-wrap-expected.checksum: Added. 23 * fast/text/international/rtl-white-space-pre-wrap-expected.png: Added. 24 * fast/text/international/rtl-white-space-pre-wrap-expected.txt: Added. 25 * fast/text/international/rtl-white-space-pre-wrap.html: Added. 26 * fast/text/whitespace/pre-wrap-overflow-selection-expected.txt: 27 * fast/text/whitespace/pre-wrap-spaces-after-newline-expected.txt: 28 1 29 2006-07-13 Mark Rowe <opendarwin.org@bdash.net.nz> 2 30 -
trunk/LayoutTests/editing/deleting/delete-to-select-table-expected.txt
r15206 r15418 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 25: "bar " 52 text run at (1,1) width 24: "bar " 53 text run at (25,1) width 1: " " 53 54 RenderTableCell {TD} at (31,24) size 47x20 [r=1 c=1 rs=1 cs=1] 54 55 RenderText {#text} at (1,1) size 45x18 -
trunk/LayoutTests/editing/execCommand/boldSelection-expected.txt
r14684 r15418 153 153 text run at (0,84) width 197: "disagree with them, " 154 154 text run at (197,84) width 218: "glorify or vilify them, " 155 text run at (415,84) width 341: "about the only thing you can't do is " 155 text run at (415,84) width 340: "about the only thing you can't do is" 156 text run at (755,84) width 1: " " 156 157 text run at (0,112) width 129: "ignore them. " 157 158 text run at (129,112) width 281: "Because they change things. " 158 text run at (410,112) width 346: "They push the human race forward. " 159 text run at (410,112) width 344: "They push the human race forward." 160 text run at (754,112) width 2: " " 159 161 text run at (0,140) width 481: "And while some may see them as the crazy ones, " 160 162 text run at (481,140) width 146: "we see genius. " -
trunk/LayoutTests/editing/execCommand/italicizeByCharacter-expected.txt
r14684 r15418 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 341: "about the only thing you can't do is " 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: " " 36 37 text run at (0,112) width 129: "ignore them. " 37 38 text run at (129,112) width 281: "Because they change things. " 38 text run at (410,112) width 346: "They push the human race forward. " 39 text run at (410,112) width 344: "They push the human race forward." 40 text run at (754,112) width 2: " " 39 41 text run at (0,140) width 481: "And while some may see them as the crazy ones, " 40 42 text run at (481,140) width 146: "we see genius. " -
trunk/LayoutTests/editing/execCommand/modifyForeColorByCharacter-expected.txt
r14684 r15418 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 341: "about the only thing you can't do is " 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: " " 36 37 text run at (0,112) width 129: "ignore them. " 37 38 text run at (129,112) width 281: "Because they change things. " 38 text run at (410,112) width 346: "They push the human race forward. " 39 text run at (410,112) width 344: "They push the human race forward." 40 text run at (754,112) width 2: " " 39 41 text run at (0,140) width 481: "And while some may see them as the crazy ones, " 40 42 text run at (481,140) width 146: "we see genius. " -
trunk/LayoutTests/editing/execCommand/print-expected.txt
r14684 r15418 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 341: "about the only thing you can't do is " 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: " " 29 30 text run at (0,112) width 129: "ignore them. " 30 31 text run at (129,112) width 281: "Because they change things. " 31 text run at (410,112) width 346: "They push the human race forward. " 32 text run at (410,112) width 344: "They push the human race forward." 33 text run at (754,112) width 2: " " 32 34 text run at (0,140) width 481: "And while some may see them as the crazy ones, " 33 35 text run at (481,140) width 146: "we see genius. " -
trunk/LayoutTests/editing/execCommand/selectAll-expected.txt
r14684 r15418 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 341: "about the only thing you can't do is " 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: " " 31 32 text run at (0,112) width 129: "ignore them. " 32 33 text run at (129,112) width 281: "Because they change things. " 33 text run at (410,112) width 346: "They push the human race forward. " 34 text run at (410,112) width 344: "They push the human race forward." 35 text run at (754,112) width 2: " " 34 36 text run at (0,140) width 481: "And while some may see them as the crazy ones, " 35 37 text run at (481,140) width 146: "we see genius. " -
trunk/LayoutTests/editing/execCommand/strikethroughSelection-expected.txt
r14684 r15418 153 153 text run at (0,84) width 197: "disagree with them, " 154 154 text run at (197,84) width 218: "glorify or vilify them, " 155 text run at (415,84) width 341: "about the only thing you can't do is " 155 text run at (415,84) width 340: "about the only thing you can't do is" 156 text run at (755,84) width 1: " " 156 157 text run at (0,112) width 129: "ignore them. " 157 158 text run at (129,112) width 281: "Because they change things. " 158 text run at (410,112) width 346: "They push the human race forward. " 159 text run at (410,112) width 344: "They push the human race forward." 160 text run at (754,112) width 2: " " 159 161 text run at (0,140) width 481: "And while some may see them as the crazy ones, " 160 162 text run at (481,140) width 146: "we see genius. " -
trunk/LayoutTests/editing/inserting/insert-div-027-expected.txt
r14684 r15418 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 784: "Test inserting paragraphs: should see two blue boxes, where the second blue box " 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: " " 22 23 text run at (0,28) width 245: "starts with an empty line." 23 24 RenderBlock {DIV} at (0,56) size 784x36 -
trunk/LayoutTests/editing/selection/after-line-wrap-expected.txt
r14684 r15418 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 750: "don't select me " 33 text run at (1,1) width 749: "don't select me " 34 text run at (750,1) width 1: " " 34 35 RenderInline {I} at (0,0) size 150x18 35 36 RenderText {#text} at (1,19) size 150x18 -
trunk/LayoutTests/editing/selection/mixed-editability-1-expected.txt
r15195 r15418 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 300: "To run this test manually, double click between " 17 text run at (484,0) width 298: "To run this test manually, double click between" 18 text run at (782,0) width 2: " " 18 19 text run at (0,18) width 351: "the first two letters of the first word of the first sentence." 19 20 RenderText {#text} at (0,0) size 0x0 -
trunk/LayoutTests/editing/selection/select-all-001-expected.txt
r14684 r15418 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 600: "Now we are engaged in a great civil war, testing whether that " 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: " " 18 19 text run at (0,202) width 565: "nation, or any nation, so conceived, and so dedicated, can " 19 20 text run at (0,250) width 571: "long endure. We are met here on a great battlefield of that " … … 22 23 text run at (0,394) width 579: "nation might live. It is altogether fitting and proper that we " 23 24 text run at (0,442) width 565: "should do this. Four score and seven years ago our fathers " 24 text run at (0,490) width 600: "brought forth, upon this continent, a new nation, conceived in " 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: " " 25 27 text run at (0,538) width 560: "Liberty, and dedicated to the proposition that all men are " 26 28 text run at (0,586) width 136: "created equal." -
trunk/LayoutTests/editing/selection/select-all-002-expected.txt
r14684 r15418 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 " 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: " " 25 26 text run at (0,346) width 585: "it as a final resting place for those who here gave their lives " 26 27 text run at (0,394) width 588: "that that nation might live. It is altogether fitting and proper " -
trunk/LayoutTests/editing/selection/select-all-003-expected.txt
r14684 r15418 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 600: "Now we are engaged in a great civil war, testing whether that " 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: " " 19 20 text run at (0,298) width 565: "nation, or any nation, so conceived, and so dedicated, can " 20 21 text run at (0,346) width 571: "long endure. We are met here on a great battlefield of that " … … 23 24 text run at (0,490) width 579: "nation might live. It is altogether fitting and proper that we " 24 25 text run at (0,538) width 565: "should do this. Four score and seven years ago our fathers " 25 text run at (0,586) width 600: "brought forth, upon this continent, a new nation, conceived in " 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: " " 26 28 text run at (0,634) width 560: "Liberty, and dedicated to the proposition that all men are " 27 29 text run at (0,682) width 142: "created equal. " -
trunk/LayoutTests/fast/clip/outline-overflowClip-expected.txt
r14684 r15418 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 " 21 text run at (3,3) width 99: "text in inner div" 22 text run at (102,3) width 0: " " -
trunk/LayoutTests/fast/text/whitespace/pre-wrap-overflow-selection-expected.txt
r14684 r15418 24 24 RenderBlock {PRE} at (0,212) size 108x83 [border: (4px solid #0000FF)] 25 25 RenderText {#text} at (4,4) size 100x75 26 text run at (4,4) width 100: "This text " 26 text run at (4,4) width 96: "This text " 27 text run at (100,4) width 4: " " 27 28 text run at (4,19) width 72: "will wrap" 28 29 text run at (76,19) width 0: " " … … 35 36 RenderBlock {PRE} at (0,101) size 108x83 [border: (4px solid #A52A2A)] 36 37 RenderText {#text} at (4,4) size 100x75 37 text run at (4,4) width 100: "This text " 38 text run at (4,4) width 96: "This text " 39 text run at (100,4) width 4: " " 38 40 text run at (4,19) width 72: "will wrap" 39 41 text run at (76,19) width 0: " " -
trunk/LayoutTests/fast/text/whitespace/pre-wrap-spaces-after-newline-expected.txt
r14684 r15418 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 51: "foo " 35 text run at (0,0) width 48: "foo " 36 text run at (48,0) width 3: " " 36 37 text run at (0,15) width 24: "bar" 37 38 RenderBlock {P} at (0,150) size 769x18 … … 50 51 text run at (0,15) width 48: " bar" 51 52 RenderBlock {PRE} at (0,227) size 51x30 [bgcolor=#C0C0C0] 52 RenderText {#text} at (0,0) size 5 1x1553 RenderText {#text} at (0,0) size 56x15 53 54 text run at (0,0) width 48: "foo " 54 text run at (48,0) width 3: " "55 RenderBR {BR} at (5 1,12) size 0x055 text run at (48,0) width 8: " " 56 RenderBR {BR} at (56,12) size 0x0 56 57 RenderText {#text} at (0,15) size 48x15 57 58 text run at (0,15) width 48: " bar" -
trunk/WebCore/ChangeLog
r15415 r15418 1 2006-07-13 Mitz Pettel <opendarwin.org@mitzpettel.com> 2 3 Reviewed by Hyatt. 4 5 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9670 6 REGRESSION: RTL white-space:pre-wrap text is offset to the right 7 8 Test: fast/text/international/rtl-white-space-pre-wrap.html 9 10 * rendering/RenderText.cpp: 11 (WebCore::RenderText::caretRect): Fixed LTR case and added the RTL case 12 of clipping the caret position to the text box when the caret is after 13 the trailing space of an autowrapped line. 14 * rendering/bidi.cpp: 15 (WebCore::RenderBlock::computeHorizontalPositionsForLine): Changed to truncate- 16 to-fit the logically last text box if it contains the trailing spaces of an 17 autowrapped line. 18 (WebCore::RenderBlock::bidiReorderLine): Remember the logically last text run. 19 In the case of autowrapped text with white space that overflows beyond the line, 20 the last text run is the one containing the overflowing white space. 21 (WebCore::RenderBlock::findNextLineBreak): Split overflowing white space on a 22 line that autowraps only after white space into a separate text run. 23 1 24 2006-07-13 David Harrison <harrison@apple.com> 2 25 -
trunk/WebCore/rendering/RenderText.cpp
r15286 r15418 416 416 417 417 RenderBlock *cb = containingBlock(); 418 int availableWidth = cb->lineWidth(top); 419 if (style()->autoWrap()) 420 left = min(left, absx + box->m_x + availableWidth - 1); 421 418 if (style()->autoWrap()) { 419 int availableWidth = cb->lineWidth(top); 420 if (!box->m_reversed) 421 left = min(left, absx + availableWidth - 1); 422 else 423 left = max(left, absx + box->m_x); 424 } 425 422 426 return IntRect(left, top, 1, height); 423 427 } -
trunk/WebCore/rendering/bidi.cpp
r15319 r15418 85 85 static BidiRun* sFirstBidiRun; 86 86 static BidiRun* sLastBidiRun; 87 static BidiRun* sLogicallyLastBidiRun; 87 88 static int sBidiRunCount; 88 89 static BidiRun* sCompactFirstBidiRun; … … 868 869 // Similarly, line break boxes have no effect on the width. 869 870 if (r->obj->isText()) { 870 RenderText *rt = static_cast<RenderText*>(r->obj);871 RenderText* rt = static_cast<RenderText*>(r->obj); 871 872 int textWidth = rt->width(r->start, r->stop-r->start, totWidth, m_firstLine); 872 873 int effectiveWidth = textWidth; … … 877 878 needsWordSpacing = !DeprecatedChar(rt->text()[r->stop-1]).isSpace() && r->stop == rtLength; 878 879 } 879 if (!r->compact) {880 RenderStyle *style = r->obj->style();881 if (style->autoWrap() && style->breakOnlyAfterWhiteSpace()) {882 // shrink the box as needed to keep the line from overflowing the available width883 textWidth = min(effectiveWidth, availableWidth - totWidth);884 }885 }886 880 r->box->setWidth(textWidth); 887 881 } else if (!r->obj->isInlineFlow()) { … … 895 889 if (!r->compact) 896 890 totWidth += r->box->width(); 891 } 892 893 if (totWidth > availableWidth && sLogicallyLastBidiRun->obj->style(m_firstLine)->autoWrap() && 894 sLogicallyLastBidiRun->obj->style(m_firstLine)->breakOnlyAfterWhiteSpace() && 895 !sLogicallyLastBidiRun->compact) { 896 sLogicallyLastBidiRun->box->setWidth(sLogicallyLastBidiRun->box->width() - totWidth + availableWidth); 897 totWidth = availableWidth; 897 898 } 898 899 … … 1389 1390 } 1390 1391 1392 sLogicallyLastBidiRun = sLastBidiRun; 1393 1391 1394 // reorder line according to run structure... 1392 1395 // do not reverse for visually ordered web sites … … 2271 2274 lBreak.obj = o; 2272 2275 lBreak.pos = pos; 2276 if (pos > 0) { 2277 // Separate the trailing space into its own box, which we will 2278 // resize to fit on the line in computeHorizontalPositionsForLine(). 2279 BidiIterator midpoint(0, o, pos); 2280 addMidpoint(BidiIterator(0, o, pos-1)); // Stop 2281 addMidpoint(BidiIterator(0, o, pos)); // Start 2282 } 2273 2283 skipWhitespace(lBreak, bidi); 2274 2284 }
Note:
See TracChangeset
for help on using the changeset viewer.