Changeset 159071 in webkit
- Timestamp:
- Nov 11, 2013, 2:39:40 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r159070 r159071 1 2013-11-11 Antti Koivisto <antti@apple.com> 2 3 End of line whitespace should collapse with white-space:pre-wrap; overflow-wrap:break-word in all cases 4 https://bugs.webkit.org/show_bug.cgi?id=124158 5 6 Reviewed by Dave Hyatt. 7 8 Added a specific test and updates the test results of some complex tests that demonstrate the same issue. 9 10 * fast/text/break-word-pre-wrap-expected.html: Added. 11 * fast/text/break-word-pre-wrap.html: Added. 12 * platform/mac/fast/forms/basic-textareas-expected.png: 13 * platform/mac/fast/forms/basic-textareas-expected.txt: 14 * platform/mac/fast/forms/basic-textareas-quirks-expected.png: 15 * platform/mac/fast/forms/basic-textareas-quirks-expected.txt: 16 * platform/mac-mountainlion/fast/forms/basic-textareas-expected.txt: 17 * platform/mac-mountainlion/fast/forms/basic-textareas-quirks-expected.txt: 18 1 19 2013-11-11 Bear Travis <betravis@adobe.com> 2 20 -
trunk/LayoutTests/platform/mac-mountainlion/fast/forms/basic-textareas-expected.txt
r159017 r159071 547 547 text run at (29,26) width 5: " " 548 548 text run at (0,39) width 130: "abcdefghijklmnopqrstuv" 549 layer at (583,422) size 56x58 clip at (584,423) size 39x56 scrollHeight 1 86549 layer at (583,422) size 56x58 clip at (584,423) size 39x56 scrollHeight 173 550 550 RenderTextControl {TEXTAREA} at (3,31) size 56x58 [bgcolor=#FFFFFF] [border: (1px solid #000000)] 551 RenderBlock {DIV} at (3,3) size 35x1 82552 RenderText {#text} at (0,0) size 35x1 82551 RenderBlock {DIV} at (3,3) size 35x169 552 RenderText {#text} at (0,0) size 35x169 553 553 text run at (0,0) width 34: "Lorem" 554 554 text run at (33,0) width 2: " " 555 555 text run at (0,13) width 33: "ipsum" 556 text run at ( 0,26) width 7: " "557 text run at (0, 39) width 29: "dolor"558 text run at (28, 39) width 4: " "559 text run at (0, 52) width 30: "ABCD"560 text run at (0, 65) width 35: "EFGHIJ"561 text run at (0, 78) width 31: "KLMN"562 text run at (0, 91) width 31: "OPQR"563 text run at (0, 104) width 28: "STUV"564 text run at (0,1 17) width 30: "WXYZ"565 text run at (29,1 17) width 5: " "566 text run at (0,1 30) width 32: "abcde"567 text run at (0,1 43) width 34: "fghijkl"568 text run at (0,1 56) width 31: "mnop"569 text run at (0,1 69) width 34: "qrstuv"556 text run at (32,13) width 3: " " 557 text run at (0,26) width 29: "dolor" 558 text run at (28,26) width 4: " " 559 text run at (0,39) width 30: "ABCD" 560 text run at (0,52) width 35: "EFGHIJ" 561 text run at (0,65) width 31: "KLMN" 562 text run at (0,78) width 31: "OPQR" 563 text run at (0,91) width 28: "STUV" 564 text run at (0,104) width 30: "WXYZ" 565 text run at (29,104) width 5: " " 566 text run at (0,117) width 32: "abcde" 567 text run at (0,130) width 34: "fghijkl" 568 text run at (0,143) width 31: "mnop" 569 text run at (0,156) width 34: "qrstuv" 570 570 layer at (3,503) size 161x47 clip at (4,504) size 159x30 scrollWidth 427 571 571 RenderTextControl {TEXTAREA} at (3,17) size 161x47 [bgcolor=#FFFFFF] [border: (1px solid #000000)] … … 1246 1246 text run at (29,26) width 5: " " 1247 1247 text run at (0,39) width 130: "abcdefghijklmnopqrstuv" 1248 layer at (583,401) size 56x58 clip at (584,402) size 39x56 scrollHeight 1 861248 layer at (583,401) size 56x58 clip at (584,402) size 39x56 scrollHeight 173 1249 1249 RenderTextControl {TEXTAREA} at (3,31) size 56x58 [bgcolor=#FFFFFF] [border: (1px solid #000000)] 1250 RenderBlock {DIV} at (3,3) size 35x1 821251 RenderText {#text} at (0,0) size 35x1 821250 RenderBlock {DIV} at (3,3) size 35x169 1251 RenderText {#text} at (0,0) size 35x169 1252 1252 text run at (0,0) width 34: "Lorem" 1253 1253 text run at (33,0) width 2: " " 1254 1254 text run at (0,13) width 33: "ipsum" 1255 text run at ( 0,26) width 7: " "1256 text run at (0, 39) width 29: "dolor"1257 text run at (28, 39) width 4: " "1258 text run at (0, 52) width 30: "ABCD"1259 text run at (0, 65) width 35: "EFGHIJ"1260 text run at (0, 78) width 31: "KLMN"1261 text run at (0, 91) width 31: "OPQR"1262 text run at (0, 104) width 28: "STUV"1263 text run at (0,1 17) width 30: "WXYZ"1264 text run at (29,1 17) width 5: " "1265 text run at (0,1 30) width 32: "abcde"1266 text run at (0,1 43) width 34: "fghijkl"1267 text run at (0,1 56) width 31: "mnop"1268 text run at (0,1 69) width 34: "qrstuv"1255 text run at (32,13) width 3: " " 1256 text run at (0,26) width 29: "dolor" 1257 text run at (28,26) width 4: " " 1258 text run at (0,39) width 30: "ABCD" 1259 text run at (0,52) width 35: "EFGHIJ" 1260 text run at (0,65) width 31: "KLMN" 1261 text run at (0,78) width 31: "OPQR" 1262 text run at (0,91) width 28: "STUV" 1263 text run at (0,104) width 30: "WXYZ" 1264 text run at (29,104) width 5: " " 1265 text run at (0,117) width 32: "abcde" 1266 text run at (0,130) width 34: "fghijkl" 1267 text run at (0,143) width 31: "mnop" 1268 text run at (0,156) width 34: "qrstuv" 1269 1269 layer at (3,479) size 161x47 clip at (4,480) size 159x30 scrollWidth 427 1270 1270 RenderTextControl {TEXTAREA} at (3,17) size 161x47 [bgcolor=#FFFFFF] [border: (1px solid #000000)] -
trunk/LayoutTests/platform/mac-mountainlion/fast/forms/basic-textareas-quirks-expected.txt
r157961 r159071 366 366 text run at (0,39) width 130: "abcdefghijklmnopqrstuv" 367 367 text run at (129,39) width 5: " " 368 layer at (26,761) size 56x58 clip at (27,762) size 39x56 scrollHeight 1 86368 layer at (26,761) size 56x58 clip at (27,762) size 39x56 scrollHeight 173 369 369 RenderTextControl {TEXTAREA} at (17,3) size 56x58 [bgcolor=#FFFFFF] [border: (1px solid #000000)] 370 RenderBlock {DIV} at (3,3) size 35x1 82371 RenderText {#text} at (0,0) size 35x1 82370 RenderBlock {DIV} at (3,3) size 35x169 371 RenderText {#text} at (0,0) size 35x169 372 372 text run at (0,0) width 34: "Lorem" 373 373 text run at (33,0) width 2: " " … … 387 387 text run at (0,143) width 31: "mnop" 388 388 text run at (0,156) width 34: "qrstuv" 389 text run at ( 0,169) width 4: " "389 text run at (33,156) width 2: " " 390 390 layer at (376,26) size 60x32 clip at (377,27) size 43x30 scrollHeight 160 391 391 RenderTextControl {TEXTAREA} at (15,3) size 60x32 [bgcolor=#FFFFFF] [border: (1px solid #000000)] -
trunk/LayoutTests/platform/mac/fast/forms/basic-textareas-expected.txt
r159017 r159071 547 547 text run at (29,26) width 5: " " 548 548 text run at (0,39) width 130: "abcdefghijklmnopqrstuv" 549 layer at (583,422) size 56x58 clip at (584,423) size 39x56 scrollHeight 1 86549 layer at (583,422) size 56x58 clip at (584,423) size 39x56 scrollHeight 173 550 550 RenderTextControl {TEXTAREA} at (3,31) size 56x58 [bgcolor=#FFFFFF] [border: (1px solid #000000)] 551 RenderBlock {DIV} at (3,3) size 35x1 82552 RenderText {#text} at (0,0) size 35x1 82551 RenderBlock {DIV} at (3,3) size 35x169 552 RenderText {#text} at (0,0) size 35x169 553 553 text run at (0,0) width 34: "Lorem" 554 554 text run at (33,0) width 2: " " 555 555 text run at (0,13) width 33: "ipsum" 556 text run at ( 0,26) width 7: " "557 text run at (0, 39) width 29: "dolor"558 text run at (28, 39) width 4: " "559 text run at (0, 52) width 30: "ABCD"560 text run at (0, 65) width 35: "EFGHIJ"561 text run at (0, 78) width 31: "KLMN"562 text run at (0, 91) width 31: "OPQR"563 text run at (0, 104) width 28: "STUV"564 text run at (0,1 17) width 30: "WXYZ"565 text run at (29,1 17) width 5: " "566 text run at (0,1 30) width 32: "abcde"567 text run at (0,1 43) width 34: "fghijkl"568 text run at (0,1 56) width 31: "mnop"569 text run at (0,1 69) width 34: "qrstuv"556 text run at (32,13) width 3: " " 557 text run at (0,26) width 29: "dolor" 558 text run at (28,26) width 4: " " 559 text run at (0,39) width 30: "ABCD" 560 text run at (0,52) width 35: "EFGHIJ" 561 text run at (0,65) width 31: "KLMN" 562 text run at (0,78) width 31: "OPQR" 563 text run at (0,91) width 28: "STUV" 564 text run at (0,104) width 30: "WXYZ" 565 text run at (29,104) width 5: " " 566 text run at (0,117) width 32: "abcde" 567 text run at (0,130) width 34: "fghijkl" 568 text run at (0,143) width 31: "mnop" 569 text run at (0,156) width 34: "qrstuv" 570 570 layer at (3,503) size 161x47 clip at (4,504) size 159x30 scrollWidth 425 571 571 RenderTextControl {TEXTAREA} at (3,17) size 161x47 [bgcolor=#FFFFFF] [border: (1px solid #000000)] … … 1246 1246 text run at (29,26) width 5: " " 1247 1247 text run at (0,39) width 130: "abcdefghijklmnopqrstuv" 1248 layer at (583,401) size 56x58 clip at (584,402) size 39x56 scrollHeight 1 861248 layer at (583,401) size 56x58 clip at (584,402) size 39x56 scrollHeight 173 1249 1249 RenderTextControl {TEXTAREA} at (3,31) size 56x58 [bgcolor=#FFFFFF] [border: (1px solid #000000)] 1250 RenderBlock {DIV} at (3,3) size 35x1 821251 RenderText {#text} at (0,0) size 35x1 821250 RenderBlock {DIV} at (3,3) size 35x169 1251 RenderText {#text} at (0,0) size 35x169 1252 1252 text run at (0,0) width 34: "Lorem" 1253 1253 text run at (33,0) width 2: " " 1254 1254 text run at (0,13) width 33: "ipsum" 1255 text run at ( 0,26) width 7: " "1256 text run at (0, 39) width 29: "dolor"1257 text run at (28, 39) width 4: " "1258 text run at (0, 52) width 30: "ABCD"1259 text run at (0, 65) width 35: "EFGHIJ"1260 text run at (0, 78) width 31: "KLMN"1261 text run at (0, 91) width 31: "OPQR"1262 text run at (0, 104) width 28: "STUV"1263 text run at (0,1 17) width 30: "WXYZ"1264 text run at (29,1 17) width 5: " "1265 text run at (0,1 30) width 32: "abcde"1266 text run at (0,1 43) width 34: "fghijkl"1267 text run at (0,1 56) width 31: "mnop"1268 text run at (0,1 69) width 34: "qrstuv"1255 text run at (32,13) width 3: " " 1256 text run at (0,26) width 29: "dolor" 1257 text run at (28,26) width 4: " " 1258 text run at (0,39) width 30: "ABCD" 1259 text run at (0,52) width 35: "EFGHIJ" 1260 text run at (0,65) width 31: "KLMN" 1261 text run at (0,78) width 31: "OPQR" 1262 text run at (0,91) width 28: "STUV" 1263 text run at (0,104) width 30: "WXYZ" 1264 text run at (29,104) width 5: " " 1265 text run at (0,117) width 32: "abcde" 1266 text run at (0,130) width 34: "fghijkl" 1267 text run at (0,143) width 31: "mnop" 1268 text run at (0,156) width 34: "qrstuv" 1269 1269 layer at (3,479) size 161x47 clip at (4,480) size 159x30 scrollWidth 425 1270 1270 RenderTextControl {TEXTAREA} at (3,17) size 161x47 [bgcolor=#FFFFFF] [border: (1px solid #000000)] -
trunk/LayoutTests/platform/mac/fast/forms/basic-textareas-quirks-expected.txt
r157961 r159071 366 366 text run at (0,39) width 130: "abcdefghijklmnopqrstuv" 367 367 text run at (129,39) width 4: " " 368 layer at (26,761) size 56x58 clip at (27,762) size 39x56 scrollHeight 1 86368 layer at (26,761) size 56x58 clip at (27,762) size 39x56 scrollHeight 173 369 369 RenderTextControl {TEXTAREA} at (17,3) size 56x58 [bgcolor=#FFFFFF] [border: (1px solid #000000)] 370 RenderBlock {DIV} at (3,3) size 35x1 82371 RenderText {#text} at (0,0) size 35x1 82370 RenderBlock {DIV} at (3,3) size 35x169 371 RenderText {#text} at (0,0) size 35x169 372 372 text run at (0,0) width 34: "Lorem" 373 373 text run at (33,0) width 2: " " … … 387 387 text run at (0,143) width 31: "mnop" 388 388 text run at (0,156) width 34: "qrstuv" 389 text run at ( 0,169) width 4: " "389 text run at (33,156) width 2: " " 390 390 layer at (376,26) size 60x32 clip at (377,27) size 43x30 scrollHeight 160 391 391 RenderTextControl {TEXTAREA} at (15,3) size 60x32 [bgcolor=#FFFFFF] [border: (1px solid #000000)] -
trunk/Source/WebCore/ChangeLog
r159070 r159071 1 2013-11-11 Antti Koivisto <antti@apple.com> 2 3 End of line whitespace should collapse with white-space:pre-wrap; overflow-wrap:break-word in all cases 4 https://bugs.webkit.org/show_bug.cgi?id=124158 5 6 Reviewed by Dave Hyatt. 7 8 If a word just fits the line but the following space overflows we fail to collapse whitespaces 9 at the end of the line. This happens because with break-word we end up taking word breaking 10 code path that does not have pre-wrap whitespace handling. 11 12 This patch makes the behavior consistent and also matches Firefox. 13 14 Test: fast/text/break-word-pre-wrap.html 15 16 * rendering/RenderBlockLineLayout.cpp: 17 (WebCore::BreakingContext::handleText): 18 19 Don't take the word break code path if we are pre-wrap and the current character is space. 20 Instead proceed to break the line normally as this is a valid break position. 21 1 22 2013-11-11 Bear Travis <betravis@adobe.com> 2 23 -
trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp
r159027 r159071 3091 3091 m_currentCharacterIsWS = m_currentCharacterIsSpace || (breakNBSP && c == noBreakSpace); 3092 3092 3093 if ((breakAll || breakWords) && !midWordBreak ) {3093 if ((breakAll || breakWords) && !midWordBreak && (!m_currentCharacterIsSpace || style.whiteSpace() != PRE_WRAP)) { 3094 3094 wrapW += charWidth; 3095 3095 bool midWordBreakIsBeforeSurrogatePair = U16_IS_LEAD(c) && m_current.m_pos + 1 < renderText->textLength() && U16_IS_TRAIL((*renderText)[m_current.m_pos + 1]);
Note:
See TracChangeset
for help on using the changeset viewer.