2011-03-29 Levi Weintraub <leviw@chromium.org>
authorleviw@chromium.org <leviw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Mar 2011 12:48:08 +0000 (12:48 +0000)
committerleviw@chromium.org <leviw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Mar 2011 12:48:08 +0000 (12:48 +0000)
commitf24d5fad3597bfb1ac3e40869dacbd92ef32df3e
treefcec72326022ac4146e382b8fc6691fa7d6f9f10
parent10e80bc0ab1bc9ea0c5ac25a81620ec49f16bbdb
2011-03-29  Levi Weintraub  <leviw@chromium.org>

        Reviewed by Eric Seidel.

        RTL:  Directionality always reset on hard line break
        https://bugs.webkit.org/show_bug.cgi?id=23124

        Testing that hard line breaks are being treated as paragraph separators but only
        clearing directional state from Unicode control characters, not DOM nodes.
        Also adding expected pixel results for bidi-override-in-anonymous-block as we're
        passing more of the test with this patch.

        * fast/text/international/bidi-br-as-paragraph-separator.html: Added.
        * platform/mac/fast/css/bidi-override-in-anonymous-block-expected.checksum: Added.
        * platform/mac/fast/css/bidi-override-in-anonymous-block-expected.png: Added.
        * platform/mac/fast/text/international/bidi-br-as-paragraph-separator-expected.checksum: Added.
        * platform/mac/fast/text/international/bidi-br-as-paragraph-separator-expected.png: Added.
        * platform/mac/fast/text/international/bidi-br-as-paragraph-separator-expected.txt: Added.
2011-03-30  Levi Weintraub  <leviw@chromium.org>

        Reviewed by Eric Seidel.

        RTL:  Directionality always reset on hard line break
        https://bugs.webkit.org/show_bug.cgi?id=23124

        No longer clearing all BidiContexts when we hit a hard line break.
        Instead, directionality applied by DOM elements is preserved by
        reconstructing the context stack ignoring those that didn't come
        from the DOM.

        Test: fast/text/international/bidi-br-as-paragraph-separator.html

        * platform/text/BidiContext.cpp:
        (WebCore::BidiContext::createUncached):
        (WebCore::BidiContext::create):
        (WebCore::copyContextAndRebaselineLevel): Helper to make a copy of a context
        and recalculate its bidi level.
        (WebCore::BidiContext::copyStackRemovingUnicodeEmbeddingContexts): Returns the top of
        a BidiContext stack that's equivalent but without contexts from Unicode directional
        characters.
        (WebCore::operator==): Now takes into account embedding source.
        * platform/text/BidiContext.h:
        (WebCore::BidiContext::source): Enum to specify whether an embedded
        bidirectional control came from the DOM/Style or Unicode characters
        (WebCore::BidiContext::BidiContext):
        * platform/text/BidiResolver.h:
        (WebCore::BidiEmbedding::BidiEmbedding): An embedding is now a direction
        and a hint about where it came from so we can differentiate DOM directions
        from unicode direction control characters.
        (WebCore::BidiEmbedding::direction):
        (WebCore::BidiEmbedding::source):
        (WebCore::::embed): Now takes a source as well as a direction.
        (WebCore::::commitExplicitEmbedding):
        (WebCore::::createBidiRunsForLine):
        * rendering/InlineIterator.h:
        (WebCore::bidiNext):
        (WebCore::bidiFirst):
        * rendering/RenderBlockLineLayout.cpp:
        (WebCore::RenderBlock::determineStartPosition):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@82424 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/platform/text/BidiContext.cpp
Source/WebCore/platform/text/BidiContext.h
Source/WebCore/platform/text/BidiResolver.h
Source/WebCore/rendering/InlineIterator.h
Source/WebCore/rendering/RenderBlockLineLayout.cpp