Changeset 26746 in webkit


Ignore:
Timestamp:
Oct 18, 2007 9:21:34 AM (17 years ago)
Author:
mitz
Message:

WebCore:

Reviewed by Nikolas Zimmermann.

Test: fast/text/word-break-soft-hyphen.html

  • rendering/RenderText.cpp: (WebCore::RenderText::calcPrefWidths): Changed to treat soft hyphens as word boundaries. This fixes the bug and is consistent with the fact that run rounding does occur at soft hyphens.

LayoutTests:

Reviewed by Nikolas Zimmermann.

  • fast/text/word-break-soft-hyphen.html: Added.
  • platform/mac/fast/text/word-break-soft-hyphen-expected.checksum: Added.
  • platform/mac/fast/text/word-break-soft-hyphen-expected.png: Added.
  • platform/mac/fast/text/word-break-soft-hyphen-expected.txt: Added.
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r26745 r26746  
     12007-10-18  Dan Bernstein  <dan.bernstein@apple.com>
     2
     3        Reviewed by Nikolas Zimmermann.
     4
     5        - test for http://bugs.webkit.org/show_bug.cgi?id=15367
     6          Assertion failure inspecting a document including soft hyphen code (0xad)
     7
     8        * fast/text/word-break-soft-hyphen.html: Added.
     9        * platform/mac/fast/text/word-break-soft-hyphen-expected.checksum: Added.
     10        * platform/mac/fast/text/word-break-soft-hyphen-expected.png: Added.
     11        * platform/mac/fast/text/word-break-soft-hyphen-expected.txt: Added.
     12
    1132007-10-18  Nikolas Zimmermann  <zimmermann@kde.org>
    214
  • trunk/WebCore/ChangeLog

    r26745 r26746  
     12007-10-18  Dan Bernstein  <dan.bernstein@apple.com>
     2
     3        Reviewed by Nikolas Zimmermann.
     4
     5        - fix http://bugs.webkit.org/show_bug.cgi?id=15367
     6          Assertion failure inspecting a document including soft hyphen code (0xad)
     7
     8        Test: fast/text/word-break-soft-hyphen.html
     9
     10        * rendering/RenderText.cpp:
     11        (WebCore::RenderText::calcPrefWidths): Changed to treat soft hyphens as
     12        word boundaries. This fixes the bug and is consistent with the fact that
     13        run rounding does occur at soft hyphens.
     14
    1152007-10-18  Nikolas Zimmermann  <zimmermann@kde.org>
    216
  • trunk/WebCore/rendering/RenderText.cpp

    r26676 r26746  
    583583
    584584        // Ignore spaces and soft hyphens
    585         if (ignoringSpaces || c == softHyphen) {
     585        if (ignoringSpaces) {
    586586            ASSERT(lastWordBoundary == i);
    587587            lastWordBoundary++;
     588            continue;
     589        } else if (c == softHyphen) {
     590            currMaxWidth += widthFromCache(f, lastWordBoundary, i - lastWordBoundary, leadWidth + currMaxWidth);
     591            lastWordBoundary = i + 1;
    588592            continue;
    589593        }
Note: See TracChangeset for help on using the changeset viewer.