Skip to content
  • mitz@apple.com's avatar
    WebCore: · 83d2e872
    mitz@apple.com authored
            Reviewed by Sam Weinig with no hesitation.
    
            - fix the HTML/CSS case of https://bugs.webkit.org/show_bug.cgi?id=19839
              <rdar://problem/6304805> A PDF,RLE sequence that should be a no-op affects bidi reordering
    
            Test: fast/text/bidi-embedding-pop-and-push-same.html
    
            * platform/text/BidiResolver.h:
            (WebCore::BidiResolver::embed): Changed to only add the embedding
            operation to a vector of pending operations.
    
            (WebCore::BidiResolver::lowerExplicitEmbeddingLevel): Added. Moved the
            code that used to be in the PDF case of embed() here, except the part
            that sets the context.
    
            (WebCore::BidiResolver::raiseExplicitEmbeddingLevel): Added. Moved the
            code that used to be in the non-PDF case of embed() here, except the
            part the sets the context.
    
            (WebCore::BidiResolver::commitExplicitEmbedding): Added. Processes the
            explicit embedding operations in the vector by creating an updated
            context and determining the old and new embedding levels. If the levels
            are not the same, calls {lower,raise}ExplicitEmbeddingLevel(). Always
            sets the context to the new one.
    
            (WebCore::BidiResolver::createBidiRunsForLine): Added calls to
            commitExplicitEmbedding() after calling embed() and after calling
            increment().
    
            * rendering/bidi.cpp:
            (WebCore::bidiFirst): Added calls to commitExplicitEmbedding() because
            this function increments the resolver.
    
            (WebCore::RenderBlock::skipLeadingWhitespace): Ditto.
    
    LayoutTests:
    
            Reviewed by Sam Weinig with no hesitation.
    
            - test for the HTML/CSS case of https://bugs.webkit.org/show_bug.cgi?id=19839
              <rdar://problem/6304805> A PDF,RLE sequence that should be a no-op affects bidi reordering
    
            * fast/text/bidi-embedding-pop-and-push-same.html: Added.
            * platform/mac/fast/text/bidi-embedding-pop-and-push-same-expected.checksum: Added.
            * platform/mac/fast/text/bidi-embedding-pop-and-push-same-expected.png: Added.
            * platform/mac/fast/text/bidi-embedding-pop-and-push-same-expected.txt: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37828 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    83d2e872