Changeset 17724 in webkit
- Timestamp:
- Nov 11, 2006 4:04:50 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r17720 r17724 1 2006-11-11 Graham Dennis <graham.dennis@gmail.com> 2 3 Reviewed by mitz. 4 5 REGRESSION (r16122): min/max widths incorrectly calculated for contentEditable text 6 http://bugs.webkit.org/show_bug.cgi?id=11570 7 8 * fast/text/whitespace/nbsp-mode-and-linewraps-expected.checksum: Added. 9 * fast/text/whitespace/nbsp-mode-and-linewraps-expected.png: Added. 10 * fast/text/whitespace/nbsp-mode-and-linewraps-expected.txt: Added. 11 * fast/text/whitespace/nbsp-mode-and-linewraps.html: Added. 12 1 13 2006-11-10 Justin Garcia <justin.garcia@apple.com> 2 14 -
trunk/WebCore/ChangeLog
r17722 r17724 1 2006-11-11 Graham Dennis <graham.dennis@gmail.com> 2 3 Reviewed by mitz. 4 5 REGRESSION (r16122): min/max widths incorrectly calculated for contentEditable text 6 http://bugs.webkit.org/show_bug.cgi?id=11570 7 8 * rendering/RenderStyle.h: 9 (WebCore::RenderStyle::isSpace): Added. 10 * rendering/RenderText.cpp: 11 (WebCore::RenderText::calcMinMaxWidth): For the purposes of calculating the line widths, 12 treat non-breaking spaces the same as normal spaces if -webkit-nbsp-mode is 'space' 13 1 14 2006-11-10 Zalan Bujtas <zalan.bujtas@nokia.com> 2 15 -
trunk/WebCore/rendering/RenderStyle.h
r17717 r17724 6 6 * (C) 2000 Dirk Mueller (mueller@kde.org) 7 7 * Copyright (C) 2003, 2005, 2006 Apple Computer, Inc. 8 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 8 9 * 9 10 * This library is free software; you can redistribute it and/or … … 1328 1329 return false; 1329 1330 } 1331 bool isSpace(UChar c) const { return c == ' ' || (c == 0xa0 && nbspMode() == SPACE); } 1330 1332 bool breakOnlyAfterWhiteSpace() const { 1331 1333 return whiteSpace() == PRE_WRAP || khtmlLineBreak() == AFTER_WHITE_SPACE; -
trunk/WebCore/rendering/RenderText.cpp
r17667 r17724 6 6 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. 7 7 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) 8 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 8 9 * 9 10 * This library is free software; you can redistribute it and/or … … 622 623 bool firstLine = true; 623 624 int nextBreakable = -1; 625 bool breakNBSP = style()->autoWrap() && style()->nbspMode() == SPACE; 626 624 627 for (int i = 0; i < len; i++) { 625 628 UChar c = txt[i]; … … 661 664 } 662 665 663 bool hasBreak = isBreakable(txt, i, len, nextBreakable );666 bool hasBreak = isBreakable(txt, i, len, nextBreakable, breakNBSP); 664 667 int j = i; 665 while (c != '\n' && c != ' '&& c != '\t' && c != SOFT_HYPHEN) {668 while (c != '\n' && !style()->isSpace(c) && c != '\t' && c != SOFT_HYPHEN) { 666 669 j++; 667 670 if (j == len) 668 671 break; 669 672 c = txt[j]; 670 if (isBreakable(txt, j, len, nextBreakable ))673 if (isBreakable(txt, j, len, nextBreakable, breakNBSP)) 671 674 break; 672 675 } … … 678 681 currMaxWidth += w; 679 682 680 bool isSpace = (j < len) && c == ' ';683 bool isSpace = (j < len) && style()->isSpace(c); 681 684 bool isCollapsibleWhiteSpace = (j < len) && style()->isCollapsibleWhiteSpace(c); 682 685 if (j < len && style()->autoWrap())
Note: See TracChangeset
for help on using the changeset viewer.