[webkit-changes] cvs commit: LayoutTests/fast/text/international bidi-ignored-for-first-child-inline-expected.checksum bidi-ignored-for-first-child-inline-expected.png bidi-ignored-for-first-child-inline-expected.txt bidi-ignored-for-first-child-inline.html

Darin darin at opensource.apple.com
Sun Dec 18 14:55:35 PST 2005


darin       05/12/18 14:55:35

  Modified:    .        ChangeLog
               khtml/rendering bidi.cpp
               .        ChangeLog
  Added:       fast/text/international
                        bidi-ignored-for-first-child-inline-expected.checksum
                        bidi-ignored-for-first-child-inline-expected.png
                        bidi-ignored-for-first-child-inline-expected.txt
                        bidi-ignored-for-first-child-inline.html
  Log:
  LayoutTests:
  
          Reviewed by Hyatt, landed by Darin.
  
          Test for: http://bugzilla.opendarwin.org/show_bug.cgi?id=5980
          Bidi properties of an inline container whose first child is an
          inline container are ignored
  
          * fast/text/international/bidi-ignored-for-first-child-inline-expected.checksum: Added.
          * fast/text/international/bidi-ignored-for-first-child-inline-expected.png: Added.
          * fast/text/international/bidi-ignored-for-first-child-inline-expected.txt: Added.
          * fast/text/international/bidi-ignored-for-first-child-inline.html: Added.
  
  WebCore:
  
          Reviewed by Hyatt, landed by Darin.
  
          Test: fast/text/international/bidi-ignored-for-first-child-inline.html
  
          Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=5980
          Bidi properties of an inline container whose first child is an
          inline container are ignored
  
          * khtml/rendering/bidi.cpp:
          (khtml::RenderBlock::bidiNext):
          Adjust embedding at inline containers' boundaries instead of inside.
          (khtml::RenderBlock::bidiFirst):
          (khtml::RenderBlock::determineStartPosition):
  
  Revision  Changes    Path
  1.562     +16 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.561
  retrieving revision 1.562
  diff -u -r1.561 -r1.562
  --- ChangeLog	18 Dec 2005 22:37:24 -0000	1.561
  +++ ChangeLog	18 Dec 2005 22:55:32 -0000	1.562
  @@ -1,3 +1,19 @@
  +2005-12-18  Mitz Pettel  <opendarwin.org at mitzpettel.com>
  +
  +        Reviewed by Hyatt, landed by Darin.
  +
  +        Test: fast/text/international/bidi-ignored-for-first-child-inline.html
  +
  +        Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=5980
  +        Bidi properties of an inline container whose first child is an
  +        inline container are ignored
  +
  +        * khtml/rendering/bidi.cpp:
  +        (khtml::RenderBlock::bidiNext):
  +        Adjust embedding at inline containers' boundaries instead of inside.
  +        (khtml::RenderBlock::bidiFirst):
  +        (khtml::RenderBlock::determineStartPosition):
  +
   2005-12-18  Alexey Proskuryakov  <ap at nypop.com>
   
           Reviewed and landed by Darin.
  
  
  
  1.163     +28 -6     WebCore/khtml/rendering/bidi.cpp
  
  Index: bidi.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/bidi.cpp,v
  retrieving revision 1.162
  retrieving revision 1.163
  diff -u -r1.162 -r1.163
  --- bidi.cpp	16 Dec 2005 18:18:50 -0000	1.162
  +++ bidi.cpp	18 Dec 2005 22:55:34 -0000	1.163
  @@ -276,7 +276,7 @@
       while (current) {
           if (!oldEndOfInline && !current->isFloating() && !current->isReplaced() && !current->isPositioned()) {
               next = current->firstChild();
  -            if (next && bidi.adjustEmbedding) {
  +            if (next && bidi.adjustEmbedding && next->isInlineFlow()) {
                   EUnicodeBidi ub = next->style()->unicodeBidi();
                   if (ub != UBNormal) {
                       EDirection dir = next->style()->direction();
  @@ -296,13 +296,23 @@
               }
   
               while (current && current != block) {
  +                if (bidi.adjustEmbedding && current->isInlineFlow() && current->style()->unicodeBidi() != UBNormal)
  +                    embed(QChar::DirPDF, bidi);
  +
                   next = current->nextSibling();
  -                if (next)
  +                if (next) {
  +                    if (bidi.adjustEmbedding && next->isInlineFlow()) {
  +                        EUnicodeBidi ub = next->style()->unicodeBidi();
  +                        if (ub != UBNormal) {
  +                            EDirection dir = next->style()->direction();
  +                            QChar::Direction d = (ub == Embed ? (dir == RTL ? QChar::DirRLE : QChar::DirLRE)
  +                                                    : (dir == RTL ? QChar::DirRLO : QChar::DirLRO));
  +                            embed(d, bidi);
  +                        }
  +                    }
                       break;
  +                }
                   
  -                if (bidi.adjustEmbedding && current->style()->unicodeBidi() != UBNormal)
  -                    embed(QChar::DirPDF, bidi);
  -
                   current = current->parent();
                   if (!skipInlines && current && current != block && current->isInlineFlow()) {
                       next = current;
  @@ -332,6 +342,15 @@
       
       RenderObject* o = block->firstChild();
       if (o->isInlineFlow()) {
  +        if (bidi.adjustEmbedding) {
  +            EUnicodeBidi ub = o->style()->unicodeBidi();
  +            if (ub != UBNormal) {
  +                EDirection dir = o->style()->direction();
  +                QChar::Direction d = (ub == Embed ? (dir == RTL ? QChar::DirRLE : QChar::DirLRE)
  +                                        : (dir == RTL ? QChar::DirRLO : QChar::DirLRO));
  +                embed(d, bidi);
  +            }
  +        }
           if (skipInlines && o->firstChild())
               o = bidiNext(block, o, bidi, skipInlines);
           else
  @@ -1762,8 +1781,11 @@
           pos = last->lineBreakPos();
           bidi.status = last->lineBreakBidiStatus();
           bidi.context = last->lineBreakBidiContext();
  -    } else
  +    } else {
  +        bidi.adjustEmbedding = true;
           startObj = bidiFirst(this, bidi, 0);
  +        bidi.adjustEmbedding = false;
  +    }
           
       start = BidiIterator(this, startObj, pos);
       
  
  
  
  1.168     +13 -0     LayoutTests/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/LayoutTests/ChangeLog,v
  retrieving revision 1.167
  retrieving revision 1.168
  diff -u -r1.167 -r1.168
  --- ChangeLog	18 Dec 2005 22:37:26 -0000	1.167
  +++ ChangeLog	18 Dec 2005 22:55:34 -0000	1.168
  @@ -1,3 +1,16 @@
  +2005-12-18  Mitz Pettel  <opendarwin.org at mitzpettel.com>
  +
  +        Reviewed by Hyatt, landed by Darin.
  +
  +        Test for: http://bugzilla.opendarwin.org/show_bug.cgi?id=5980
  +        Bidi properties of an inline container whose first child is an
  +        inline container are ignored
  +
  +        * fast/text/international/bidi-ignored-for-first-child-inline-expected.checksum: Added.
  +        * fast/text/international/bidi-ignored-for-first-child-inline-expected.png: Added.
  +        * fast/text/international/bidi-ignored-for-first-child-inline-expected.txt: Added.
  +        * fast/text/international/bidi-ignored-for-first-child-inline.html: Added.
  +
   2005-12-18  Alexey Proskuryakov  <ap at nypop.com>
   
           Reviewed and landed by Darin.
  
  
  
  1.1                  LayoutTests/fast/text/international/bidi-ignored-for-first-child-inline-expected.checksum
  
  Index: bidi-ignored-for-first-child-inline-expected.checksum
  ===================================================================
  ac6fbc16b18cbb9f4f8fa380249985d2
  \ No newline at end of file
  
  
  
  1.1                  LayoutTests/fast/text/international/bidi-ignored-for-first-child-inline-expected.png
  
  	<<Binary file>>
  
  
  1.1                  LayoutTests/fast/text/international/bidi-ignored-for-first-child-inline-expected.txt
  
  Index: bidi-ignored-for-first-child-inline-expected.txt
  ===================================================================
  layer at (0,0) size 800x600
    RenderCanvas at (0,0) size 800x600
  layer at (0,0) size 800x600
    RenderBlock {HTML} at (0,0) size 800x600
      RenderBody {BODY} at (8,8) size 784x576
        RenderBlock {P} at (0,0) size 784x36
          RenderText {TEXT} at (0,0) size 104x18
            text run at (0,0) width 104: "This is a test for "
          RenderInline {I} at (0,0) size 761x36
            RenderText {TEXT} at (104,0) size 761x36
              text run at (104,0) width 657: "http://bugzilla.opendarwin.org/show_bug.cgi?id=5980 Bidi properties of an inline container whose first"
              text run at (0,18) width 246: "child is an inline container are ignored"
          RenderText {TEXT} at (246,18) size 4x18
            text run at (246,18) width 4: "."
        RenderBlock {HR} at (0,52) size 784x2 [border: (1px inset #000000)]
        RenderBlock {P} at (0,70) size 784x18
          RenderText {TEXT} at (0,0) size 316x18
            text run at (0,0) width 316: "The following lines should read \x{201C}ABCDEFGHI\x{201D}:"
        RenderBlock {P} at (0,104) size 784x18
          RenderText {TEXT} at (0,0) size 34x18
            text run at (0,0) width 34: "ABC"
          RenderInline {SPAN} at (0,0) size 31x18
            RenderText {TEXT} at (34,0) size 31x18
              text run at (34,0) width 31 RTL override: "FED"
          RenderText {TEXT} at (65,0) size 29x18
            text run at (65,0) width 29: "GHI"
        RenderBlock {P} at (0,138) size 784x18
          RenderText {TEXT} at (0,0) size 34x18
            text run at (0,0) width 34: "ABC"
          RenderInline {SPAN} at (0,0) size 31x18
            RenderInline {SPAN} at (0,0) size 31x18
              RenderText {TEXT} at (34,0) size 31x18
                text run at (34,0) width 31 RTL override: "FED"
          RenderText {TEXT} at (65,0) size 29x18
            text run at (65,0) width 29: "GHI"
        RenderBlock {P} at (0,172) size 784x18
          RenderText {TEXT} at (0,0) size 34x18
            text run at (0,0) width 34: "ABC"
          RenderInline {SPAN} at (0,0) size 31x18
            RenderText {TEXT} at (56,0) size 9x18
              text run at (56,0) width 9 RTL override: "F"
            RenderInline {SPAN} at (0,0) size 22x18
              RenderText {TEXT} at (34,0) size 22x18
                text run at (34,0) width 22 RTL override: "ED"
          RenderText {TEXT} at (65,0) size 29x18
            text run at (65,0) width 29: "GHI"
        RenderBlock {P} at (0,206) size 784x18
          RenderText {TEXT} at (0,0) size 34x18
            text run at (0,0) width 34: "ABC"
          RenderInline {SPAN} at (0,0) size 31x18
            RenderText {TEXT} at (56,0) size 9x18
              text run at (56,0) width 9 RTL override: "F"
            RenderInline {SPAN} at (0,0) size 10x18
              RenderText {TEXT} at (46,0) size 10x18
                text run at (46,0) width 10 RTL override: "E"
            RenderText {TEXT} at (34,0) size 12x18
              text run at (34,0) width 12 RTL override: "D"
          RenderText {TEXT} at (65,0) size 29x18
            text run at (65,0) width 29: "GHI"
        RenderBlock {P} at (0,240) size 784x18
          RenderText {TEXT} at (0,0) size 34x18
            text run at (0,0) width 34: "ABC"
          RenderInline {SPAN} at (0,0) size 31x18
            RenderInline {SPAN} at (0,0) size 19x18
              RenderText {TEXT} at (46,0) size 19x18
                text run at (46,0) width 19 RTL override: "FE"
            RenderText {TEXT} at (34,0) size 12x18
              text run at (34,0) width 12 RTL override: "D"
          RenderText {TEXT} at (65,0) size 29x18
            text run at (65,0) width 29: "GHI"
        RenderBlock {P} at (0,274) size 784x18
          RenderInline {SPAN} at (0,0) size 94x18
            RenderText {TEXT} at (0,0) size 94x18
              text run at (0,0) width 94 RTL override: "IHGFEDCBA"
          RenderText {TEXT} at (0,0) size 0x0
        RenderBlock {P} at (0,308) size 784x18
          RenderInline {SPAN} at (0,0) size 94x18
            RenderText {TEXT} at (0,0) size 94x18
              text run at (0,0) width 94 RTL override: "IHGFEDCBA"
          RenderText {TEXT} at (0,0) size 0x0
        RenderBlock {HR} at (0,342) size 784x2 [border: (1px inset #000000)]
        RenderBlock (anonymous) at (0,352) size 784x18
          RenderText {TEXT} at (0,0) size 249x18
            text run at (0,0) width 249: "The following lines should be identical:"
        RenderBlock {P} at (0,386) size 784x18
          RenderText {TEXT} at (0,0) size 60x18
            text run at (0,0) width 24 RTL: "\x{5D3}\x{5D4}\x{5D5}"
            text run at (24,0) width 10: "(["
            text run at (34,0) width 26 RTL: "\x{5D0}\x{5D1}\x{5D2}"
        RenderBlock {P} at (0,420) size 784x18
          RenderText {TEXT} at (0,0) size 34x18
            text run at (0,0) width 24 RTL: "\x{5D3}\x{5D4}\x{5D5}"
            text run at (24,0) width 10: "(["
          RenderInline {SPAN} at (0,0) size 0x18
          RenderText {TEXT} at (34,0) size 26x18
            text run at (34,0) width 26 RTL: "\x{5D0}\x{5D1}\x{5D2}"
        RenderBlock {P} at (0,454) size 784x18
          RenderText {TEXT} at (0,0) size 34x18
            text run at (0,0) width 24 RTL: "\x{5D3}\x{5D4}\x{5D5}"
            text run at (24,0) width 10: "(["
          RenderInline {SPAN} at (0,0) size 0x18
            RenderInline {SPAN} at (0,0) size 0x18
          RenderText {TEXT} at (34,0) size 26x18
            text run at (34,0) width 26 RTL: "\x{5D0}\x{5D1}\x{5D2}"
        RenderBlock {P} at (0,488) size 784x18
          RenderText {TEXT} at (0,0) size 34x18
            text run at (0,0) width 24 RTL: "\x{5D3}\x{5D4}\x{5D5}"
            text run at (24,0) width 10: "(["
          RenderInline {SPAN} at (0,0) size 0x18
            RenderInline {SPAN} at (0,0) size 0x18
          RenderText {TEXT} at (34,0) size 26x18
            text run at (34,0) width 26 RTL: "\x{5D0}\x{5D1}\x{5D2}"
  
  
  
  1.1                  LayoutTests/fast/text/international/bidi-ignored-for-first-child-inline.html
  
  Index: bidi-ignored-for-first-child-inline.html
  ===================================================================
  <html>
  <head>
  <title>Bidi properties ignored for inline container whose first child is an inline container</title>
  <style type="text/css">
  .rlo { direction: rtl; unicode-bidi: bidi-override; }
  </style>
  </head>
  <body>
  <p>
  This is a test for <i>http://bugzilla.opendarwin.org/show_bug.cgi?id=5980 Bidi properties of an inline container whose first child is an inline container are ignored</i>.
  </p>
  <hr>
  <p>
  The following lines should read &ldquo;ABCDEFGHI&rdquo;:
  </p>
  <p>
  ABC<span class="rlo">FED</span>GHI
  </p>
  <p>
  ABC<span class="rlo"><span>FED</span></span>GHI
  </p>
  <p>
  ABC<span class="rlo">F<span>ED</span></span>GHI
  </p>
  <p>
  ABC<span class="rlo">F<span>E</span>D</span>GHI
  </p>
  <p>
  ABC<span class="rlo"><span>FE</span>D</span>GHI
  </p>
  <p><span class="rlo">IHGFEDCBA</span>
  </p>
  <p>
  <span class="rlo">IHGFEDCBA</span>
  </p>
  <hr>
  The following lines should be identical:
  <p>
  &#x05d3;&#x05d4;&#x05d5;([&#x202a;&#x202c;&#x05d0;&#x05d1;&#x05d2;
  </p>
  <p>
  &#x05d3;&#x05d4;&#x05d5;([<span dir="ltr"></span>&#x05d0;&#x05d1;&#x05d2;
  </p>
  <p>
  &#x05d3;&#x05d4;&#x05d5;([<span dir="ltr"><span></span></span>&#x05d0;&#x05d1;&#x05d2;
  </p>
  <p>
  &#x05d3;&#x05d4;&#x05d5;([<span><span dir="ltr"></span></span>&#x05d0;&#x05d1;&#x05d2;
  </p>
  </body>
  </html>
  
  
  



More information about the webkit-changes mailing list