Changeset 61921 in webkit


Ignore:
Timestamp:
Jun 25, 2010 5:31:54 PM (14 years ago)
Author:
mitz@apple.com
Message:

<rdar://problem/8000667> Certain text is repeated before and after a line break

Reviewed by Sam Weinig.

WebCore:

Test: fast/text/bidi-explicit-embedding-past-end.html

  • platform/text/BidiResolver.h:

(WebCore::::createBidiRunsForLine): Committing explicit embedding past the end of the range
creates BidiRuns up to the end of the range, so at that point, we can stop iterating.

LayoutTests:

  • fast/text/bidi-explicit-embedding-past-end-expected.checksum: Added.
  • fast/text/bidi-explicit-embedding-past-end-expected.png: Added.
  • fast/text/bidi-explicit-embedding-past-end-expected.txt: Added.
  • fast/text/bidi-explicit-embedding-past-end.html: Added.
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r61917 r61921  
     12010-06-25  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        <rdar://problem/8000667> Certain text is repeated before and after a line break
     6
     7        * fast/text/bidi-explicit-embedding-past-end-expected.checksum: Added.
     8        * fast/text/bidi-explicit-embedding-past-end-expected.png: Added.
     9        * fast/text/bidi-explicit-embedding-past-end-expected.txt: Added.
     10        * fast/text/bidi-explicit-embedding-past-end.html: Added.
     11
    1122010-06-25  Alpha Lam  <hclam@chromium.org>
    213
  • trunk/WebCore/ChangeLog

    r61916 r61921  
     12010-06-25  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        <rdar://problem/8000667> Certain text is repeated before and after a line break
     6
     7        Test: fast/text/bidi-explicit-embedding-past-end.html
     8
     9        * platform/text/BidiResolver.h:
     10        (WebCore::::createBidiRunsForLine): Committing explicit embedding past the end of the range
     11        creates BidiRuns up to the end of the range, so at that point, we can stop iterating.
     12
    1132010-06-25  Eric Seidel  <eric@webkit.org>
    214
  • trunk/WebCore/platform/text/BidiResolver.h

    r44650 r61921  
    807807        }
    808808
    809         if (pastEnd) {
    810             if (eor == current) {
    811                 if (!reachedEndOfLine) {
    812                     eor = endOfLine;
    813                     switch (m_status.eor) {
    814                         case LeftToRight:
    815                         case RightToLeft:
    816                         case ArabicNumber:
    817                             m_direction = m_status.eor;
    818                             break;
    819                         case EuropeanNumber:
    820                             m_direction = m_status.lastStrong == LeftToRight ? LeftToRight : EuropeanNumber;
    821                             break;
    822                         default:
    823                             ASSERT(false);
    824                     }
    825                     appendRun();
     809        if (pastEnd && eor == current) {
     810            if (!reachedEndOfLine) {
     811                eor = endOfLine;
     812                switch (m_status.eor) {
     813                    case LeftToRight:
     814                    case RightToLeft:
     815                    case ArabicNumber:
     816                        m_direction = m_status.eor;
     817                        break;
     818                    case EuropeanNumber:
     819                        m_direction = m_status.lastStrong == LeftToRight ? LeftToRight : EuropeanNumber;
     820                        break;
     821                    default:
     822                        ASSERT(false);
    826823                }
    827                 current = end;
    828                 m_status = stateAtEnd.m_status;
    829                 sor = stateAtEnd.sor;
    830                 eor = stateAtEnd.eor;
    831                 last = stateAtEnd.last;
    832                 reachedEndOfLine = stateAtEnd.reachedEndOfLine;
    833                 lastBeforeET = stateAtEnd.lastBeforeET;
    834                 emptyRun = stateAtEnd.emptyRun;
    835                 m_direction = OtherNeutral;
    836                 break;
    837             }
     824                appendRun();
     825            }
     826            current = end;
     827            m_status = stateAtEnd.m_status;
     828            sor = stateAtEnd.sor;
     829            eor = stateAtEnd.eor;
     830            last = stateAtEnd.last;
     831            reachedEndOfLine = stateAtEnd.reachedEndOfLine;
     832            lastBeforeET = stateAtEnd.lastBeforeET;
     833            emptyRun = stateAtEnd.emptyRun;
     834            m_direction = OtherNeutral;
     835            break;
    838836        }
    839837
     
    888886
    889887        increment();
    890         if (!m_currentExplicitEmbeddingSequence.isEmpty())
     888        if (!m_currentExplicitEmbeddingSequence.isEmpty()) {
    891889            commitExplicitEmbedding();
     890            if (pastEnd) {
     891                current = end;
     892                m_status = stateAtEnd.m_status;
     893                sor = stateAtEnd.sor;
     894                eor = stateAtEnd.eor;
     895                last = stateAtEnd.last;
     896                reachedEndOfLine = stateAtEnd.reachedEndOfLine;
     897                lastBeforeET = stateAtEnd.lastBeforeET;
     898                emptyRun = stateAtEnd.emptyRun;
     899                m_direction = OtherNeutral;
     900                break;
     901            }
     902        }
    892903
    893904        if (emptyRun && (dirCurrent == RightToLeftEmbedding
Note: See TracChangeset for help on using the changeset viewer.