[webkit-changes] cvs commit: LayoutTests/fast/text/international bidi-LDB-2-HTML-expected.checksum bidi-LDB-2-HTML-expected.png bidi-LDB-2-HTML-expected.txt

Darin darin at opensource.apple.com
Sat Oct 8 19:14:08 PDT 2005


darin       05/10/08 19:14:08

  Modified:    .        ChangeLog
               khtml/css html4.css
               khtml/html html_elementimpl.cpp
               khtml/xml dom_elementimpl.h
               .        ChangeLog
               fast/dom/HTMLElement bdo-expected.checksum bdo-expected.png
                        bdo-expected.txt bdo.html
               fast/text/international bidi-LDB-2-HTML-expected.checksum
                        bidi-LDB-2-HTML-expected.png
                        bidi-LDB-2-HTML-expected.txt
  Log:
  LayoutTests:
  
          - Updated test results for fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3245
            Support the 'bdo' element
  
          * fast/dom/HTMLElement/bdo.html: Updated test, no longer says to expect failure.
          * fast/dom/HTMLElement/bdo-expected.checksum: Correct results.
          * fast/dom/HTMLElement/bdo-expected.png: Ditto.
          * fast/dom/HTMLElement/bdo-expected.txt: Ditto.
  
          * fast/text/international/bidi-LDB-2-HTML-expected.checksum: Updated to expect correct
          results for the section done with <bdo>.
          * fast/text/international/bidi-LDB-2-HTML-expected.png: Ditto.
          * fast/text/international/bidi-LDB-2-HTML-expected.txt: Ditto.
  
  WebCore:
  
          Reviewed by Darin.
  
          - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3245
            Support the 'bdo' element
  
          Fixes the results of some existing layout tests.
  
          * khtml/xml/dom_elementimpl.h: Add eBDO to the list of entry types so there's a way to
          keep <bdo> dir attribute mappings separate from those of other elements.
  
          * khtml/html/html_elementimpl.cpp:
          (HTMLElementImpl::mapToEntry): Add special case to use eBDO for the dir attribute on
          elements with the <bdo> tag.
          (HTMLElementImpl::parseMappedAttribute): Use bidi-override for the unicode-bidi CSS property
          when setting it based on the dir attribute on a <bdo> tag. Along with the change above this
          obviates the need for an HTMLElementImpl subclass for <bdo>, but we could refactor it that
          way later if we decide there's an advantage to doing it that way.
  
          * khtml/css/html4.css: Remove the rules about <bdo>. They are insufficient, and now
          they are also unnecessary with the changes above.
  
  Revision  Changes    Path
  1.222     +29 -6     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.221
  retrieving revision 1.222
  diff -u -r1.221 -r1.222
  --- ChangeLog	9 Oct 2005 01:46:09 -0000	1.221
  +++ ChangeLog	9 Oct 2005 02:14:01 -0000	1.222
  @@ -2,17 +2,40 @@
   
           Reviewed by Darin.
   
  +        - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3245
  +          Support the 'bdo' element
  +
  +        Fixes the results of some existing layout tests.
  +
  +        * khtml/xml/dom_elementimpl.h: Add eBDO to the list of entry types so there's a way to
  +        keep <bdo> dir attribute mappings separate from those of other elements.
  +
  +        * khtml/html/html_elementimpl.cpp:
  +        (HTMLElementImpl::mapToEntry): Add special case to use eBDO for the dir attribute on
  +        elements with the <bdo> tag.
  +        (HTMLElementImpl::parseMappedAttribute): Use bidi-override for the unicode-bidi CSS property
  +        when setting it based on the dir attribute on a <bdo> tag. Along with the change above this
  +        obviates the need for an HTMLElementImpl subclass for <bdo>, but we could refactor it that
  +        way later if we decide there's an advantage to doing it that way.
  +
  +        * khtml/css/html4.css: Remove the rules about <bdo>. They are insufficient, and now
  +        they are also unnecessary with the changes above.
  +
  +2005-10-08  Mitz Pettel  <opendarwin.org at mitzpettel.com>
  +
  +        Reviewed by Darin.
  +
           - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4898
             Failures in dbaron's bidi ordering tests
   
  -        Added 3 dbaron bidi ordering tests to LayoutTests.
  +        Added 3 dbaron bidi ordering tests to layout tests.
   
           * khtml/rendering/bidi.cpp:
  -        (khtml::deleteBidiRuns):
  -        (khtml::Bidinext):
  -        (khtml::appendRunsForObject):
  -        (khtml::embed):
  -        (khtml::RenderBlock::bidiReorderLine):
  +        (khtml::deleteBidiRuns): Set emptyRun back to true.
  +        (khtml::Bidinext): Remove emptyRun checks here.
  +        (khtml::appendRunsForObject): Add a check here to avoid adding an empty run.
  +        (khtml::embed): Add handling for various cases that was missing before.
  +        (khtml::RenderBlock::bidiReorderLine): Many different fixes.
   
   2005-10-08  Rob Buis  <rwlbuis at xs4all.nl>
   
  
  
  
  1.77      +0 -14     WebCore/khtml/css/html4.css
  
  Index: html4.css
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/css/html4.css,v
  retrieving revision 1.76
  retrieving revision 1.77
  diff -u -r1.76 -r1.77
  --- html4.css	20 Sep 2005 23:01:39 -0000	1.76
  +++ html4.css	9 Oct 2005 02:14:05 -0000	1.77
  @@ -402,20 +402,6 @@
       color: -khtml-activelink
   }
   
  -/* Bidirectionality settings */
  -
  -bdo[dir="ltr"]  {
  -    direction: ltr;
  -    unicode-bidi: bidi-override
  -}
  -
  -bdo[dir="rtl"]  {
  -    direction: rtl;
  -    unicode-bidi: bidi-override
  -}
  -      
  -/* End bidi settings */
  -
   /* other elements */
   
   noframes {
  
  
  
  1.108     +6 -3      WebCore/khtml/html/html_elementimpl.cpp
  
  Index: html_elementimpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/html/html_elementimpl.cpp,v
  retrieving revision 1.107
  retrieving revision 1.108
  diff -u -r1.107 -r1.108
  --- html_elementimpl.cpp	3 Oct 2005 21:12:28 -0000	1.107
  +++ html_elementimpl.cpp	9 Oct 2005 02:14:05 -0000	1.108
  @@ -123,11 +123,14 @@
   bool HTMLElementImpl::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const
   {
       if (attrName == alignAttr ||
  -        attrName == contenteditableAttr ||
  -        attrName == dirAttr) {
  +        attrName == contenteditableAttr) {
           result = eUniversal;
           return false;
       }
  +    if (attrName == dirAttr) {
  +        result = hasTagName(bdoTag) ? eBDO : eUniversal;
  +        return false;
  +    }
   
       return StyledElementImpl::mapToEntry(attrName, result);
   }
  @@ -153,7 +156,7 @@
           // FIXME: Implement
       } else if (attr->name() == dirAttr) {
           addCSSProperty(attr, CSS_PROP_DIRECTION, attr->value());
  -        addCSSProperty(attr, CSS_PROP_UNICODE_BIDI, CSS_VAL_EMBED);
  +        addCSSProperty(attr, CSS_PROP_UNICODE_BIDI, hasTagName(bdoTag) ? CSS_VAL_BIDI_OVERRIDE : CSS_VAL_EMBED);
       }
   // standard events
       else if (attr->name() == onclickAttr) {
  
  
  
  1.56      +1 -1      WebCore/khtml/xml/dom_elementimpl.h
  
  Index: dom_elementimpl.h
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/xml/dom_elementimpl.h,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- dom_elementimpl.h	3 Oct 2005 21:12:52 -0000	1.55
  +++ dom_elementimpl.h	9 Oct 2005 02:14:05 -0000	1.56
  @@ -333,7 +333,7 @@
   
   // When adding new entries, make sure to keep eLastEntry at the end of the list.
   enum MappedAttributeEntry { eNone, eUniversal, ePersistent, eReplaced, eBlock, eHR, eUnorderedList, eListItem,
  -    eTable, eCell, eCaption, eLastEntry };
  +    eTable, eCell, eCaption, eBDO, eLastEntry };
   
   class CSSMappedAttributeDeclarationImpl : public CSSMutableStyleDeclarationImpl
   {
  
  
  
  1.20      +15 -0     LayoutTests/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/LayoutTests/ChangeLog,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- ChangeLog	9 Oct 2005 01:46:15 -0000	1.19
  +++ ChangeLog	9 Oct 2005 02:14:06 -0000	1.20
  @@ -1,5 +1,20 @@
   2005-10-08  Darin Adler  <darin at apple.com>
   
  +        - Updated test results for fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3245
  +          Support the 'bdo' element
  +
  +        * fast/dom/HTMLElement/bdo.html: Updated test, no longer says to expect failure.
  +        * fast/dom/HTMLElement/bdo-expected.checksum: Correct results.
  +        * fast/dom/HTMLElement/bdo-expected.png: Ditto.
  +        * fast/dom/HTMLElement/bdo-expected.txt: Ditto.
  +
  +        * fast/text/international/bidi-LDB-2-HTML-expected.checksum: Updated to expect correct
  +        results for the section done with <bdo>.
  +        * fast/text/international/bidi-LDB-2-HTML-expected.png: Ditto.
  +        * fast/text/international/bidi-LDB-2-HTML-expected.txt: Ditto.
  +
  +2005-10-08  Darin Adler  <darin at apple.com>
  +
           Test cases for http://bugzilla.opendarwin.org/show_bug.cgi?id=4898
           (Failures in dbaron's bidi ordering tests).
   
  
  
  
  1.3       +1 -1      LayoutTests/fast/dom/HTMLElement/bdo-expected.checksum
  
  Index: bdo-expected.checksum
  ===================================================================
  RCS file: /cvs/root/LayoutTests/fast/dom/HTMLElement/bdo-expected.checksum,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- bdo-expected.checksum	1 Sep 2005 06:13:23 -0000	1.2
  +++ bdo-expected.checksum	9 Oct 2005 02:14:06 -0000	1.3
  @@ -1 +1 @@
  -df270798fecd34af5282d188ad5fdcc6
  \ No newline at end of file
  +31a0446c083ce980f8ec490ab9c76b7f
  \ No newline at end of file
  
  
  
  1.3       +60 -71    LayoutTests/fast/dom/HTMLElement/bdo-expected.png
  
  	<<Binary file>>
  
  
  1.3       +5 -15     LayoutTests/fast/dom/HTMLElement/bdo-expected.txt
  
  Index: bdo-expected.txt
  ===================================================================
  RCS file: /cvs/root/LayoutTests/fast/dom/HTMLElement/bdo-expected.txt,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- bdo-expected.txt	9 Oct 2005 01:46:15 -0000	1.2
  +++ bdo-expected.txt	9 Oct 2005 02:14:06 -0000	1.3
  @@ -6,30 +6,20 @@
         RenderBlock {P} at (0,0) size 784x18
           RenderText {TEXT} at (0,0) size 111x18
             text run at (0,0) width 111: "Tests: the bdo tag"
  -        RenderBR {BR} at (0,0) size 0x0
         RenderBlock {P} at (0,34) size 784x18
  -        RenderInline {B} at (0,0) size 180x18
  -          RenderText {TEXT} at (0,0) size 180x18
  -            text run at (0,0) width 180: "This test is expected to fail."
  -        RenderText {TEXT} at (0,0) size 0x0
  +        RenderText {TEXT} at (0,0) size 328x18
  +          text run at (0,0) width 328: "The bdo element overrides the default text direction."
         RenderBlock {P} at (0,68) size 784x36
  -        RenderText {TEXT} at (0,0) size 73x18
  -          text run at (0,0) width 73: "Conditions:"
  -        RenderBR {BR} at (0,0) size 0x0
  -        RenderText {TEXT} at (0,18) size 328x18
  -          text run at (0,18) width 328: "The bdo element overrides the default text direction."
  -      RenderBlock {P} at (0,120) size 784x36
           RenderText {TEXT} at (0,0) size 762x36
             text run at (0,0) width 727: "If successful, the first sentence would be backward, and the second sentence regular. There should then be an extra "
             text run at (727,0) width 35: "blank"
             text run at (0,18) width 698: "line, followed by a line reading only \"A,\" and finally, a sentence where only the word \"umbrella\" is backward."
  -      RenderBlock {HR} at (0,172) size 784x2 [border: (1px inset #000000)]
  -      RenderBlock (anonymous) at (0,182) size 784x108
  +      RenderBlock {HR} at (0,120) size 784x2 [border: (1px inset #000000)]
  +      RenderBlock (anonymous) at (0,130) size 784x108
           RenderBR {BR} at (0,0) size 0x18
           RenderInline {BDO} at (0,0) size 221x18
             RenderText {TEXT} at (0,18) size 221x18
  -            text run at (0,18) width 4: "."
  -            text run at (4,18) width 217: "This sentence should be backward"
  +            text run at (0,18) width 221: "This sentence should be backward."
           RenderText {TEXT} at (221,18) size 4x18
             text run at (221,18) width 4: " "
           RenderBR {BR} at (0,0) size 0x0
  
  
  
  1.2       +4 -9      LayoutTests/fast/dom/HTMLElement/bdo.html
  
  Index: bdo.html
  ===================================================================
  RCS file: /cvs/root/LayoutTests/fast/dom/HTMLElement/bdo.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- bdo.html	5 Jul 2005 21:10:46 -0000	1.1
  +++ bdo.html	9 Oct 2005 02:14:06 -0000	1.2
  @@ -5,17 +5,12 @@
   
   <body>
   
  -<p>Tests: the bdo tag<br>
  -</p>
  -<p>
  -<b>This test is expected to fail.</b>
  -</p>
  -<p>Conditions:<br>
  -The bdo element overrides the default text direction.
  +<p>Tests: the bdo tag</p>
  +<p>The bdo element overrides the default text direction.
   </p>
   <p>If successful, the first sentence would be backward, and the second sentence regular. There should then be an extra 
  -blank line, followed by a line reading only "A," and finally, a sentence where only the word "umbrella" is backward.
  -</p>
  +blank line, followed by a line reading only "A," and finally, a sentence where only the word "umbrella" is backward.</p>
  +
   <hr>
   
   <br>
  
  
  
  1.2       +1 -1      LayoutTests/fast/text/international/bidi-LDB-2-HTML-expected.checksum
  
  Index: bidi-LDB-2-HTML-expected.checksum
  ===================================================================
  RCS file: /cvs/root/LayoutTests/fast/text/international/bidi-LDB-2-HTML-expected.checksum,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- bidi-LDB-2-HTML-expected.checksum	9 Oct 2005 01:46:16 -0000	1.1
  +++ bidi-LDB-2-HTML-expected.checksum	9 Oct 2005 02:14:07 -0000	1.2
  @@ -1 +1 @@
  -34f7d4b8d84b59a27b9d1ccc1c45558a
  \ No newline at end of file
  +14ad9f3091e126e0f2c6e10692935fed
  \ No newline at end of file
  
  
  
  1.2       +186 -191  LayoutTests/fast/text/international/bidi-LDB-2-HTML-expected.png
  
  	<<Binary file>>
  
  
  1.2       +5 -11     LayoutTests/fast/text/international/bidi-LDB-2-HTML-expected.txt
  
  Index: bidi-LDB-2-HTML-expected.txt
  ===================================================================
  RCS file: /cvs/root/LayoutTests/fast/text/international/bidi-LDB-2-HTML-expected.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- bidi-LDB-2-HTML-expected.txt	9 Oct 2005 01:46:16 -0000	1.1
  +++ bidi-LDB-2-HTML-expected.txt	9 Oct 2005 02:14:07 -0000	1.2
  @@ -286,8 +286,7 @@
                 text run at (64,0) width 28: "\x{5D3}\x{5D4}\x{5D5} "
               RenderInline {BDO} at (0,0) size 64x18
                 RenderText {TEXT} at (0,0) size 64x18
  -                text run at (0,0) width 30: " \x{5D0}\x{5D1}\x{5D2}"
  -                text run at (30,0) width 34: "CBA"
  +                text run at (0,0) width 64: "CBA \x{5D0}\x{5D1}\x{5D2}"
               RenderText {TEXT} at (92,0) size 65x18
                 text run at (92,0) width 39: " DEF "
                 text run at (131,0) width 26: "\x{5D6}\x{5D7}\x{5D8}"
  @@ -297,8 +296,7 @@
                 text run at (26,0) width 4: " "
               RenderInline {BDO} at (0,0) size 62x18
                 RenderText {TEXT} at (30,0) size 62x18
  -                text run at (30,0) width 38: "ABC "
  -                text run at (68,0) width 24: "\x{5D5}\x{5D4}\x{5D3}"
  +                text run at (30,0) width 62: "ABC \x{5D5}\x{5D4}\x{5D3}"
               RenderText {TEXT} at (92,0) size 65x18
                 text run at (92,0) width 39: " DEF "
                 text run at (131,0) width 26: "\x{5D6}\x{5D7}\x{5D8}"
  @@ -307,8 +305,7 @@
                 text run at (127,0) width 30: "\x{5D6}\x{5D7}\x{5D8} "
               RenderInline {BDO} at (0,0) size 62x18
                 RenderText {TEXT} at (30,0) size 62x18
  -                text run at (30,0) width 38: "ABC "
  -                text run at (68,0) width 24: "\x{5D5}\x{5D4}\x{5D3}"
  +                text run at (30,0) width 62: "ABC \x{5D5}\x{5D4}\x{5D3}"
               RenderText {TEXT} at (0,0) size 127x18
                 text run at (0,0) width 30: " \x{5D0}\x{5D1}\x{5D2}"
                 text run at (92,0) width 35: " DEF"
  @@ -479,9 +476,7 @@
                 text run at (97,0) width 30: "\x{5D0}\x{5D1}\x{5D2} "
               RenderInline {BDO} at (0,0) size 97x18
                 RenderText {TEXT} at (0,0) size 97x18
  -                text run at (0,0) width 31: "DEF"
  -                text run at (31,0) width 32: " \x{5D3}\x{5D4}\x{5D5} "
  -                text run at (63,0) width 34: "ABC"
  +                text run at (0,0) width 97: "ABC \x{5D3}\x{5D4}\x{5D5} DEF"
               RenderText {TEXT} at (127,0) size 63x18
                 text run at (127,0) width 37: " GHI "
                 text run at (164,0) width 26: "\x{5D6}\x{5D7}\x{5D8}"
  @@ -568,8 +563,7 @@
                 text run at (26,0) width 42: " ABC "
               RenderInline {BDO} at (0,0) size 59x18
                 RenderText {TEXT} at (68,0) size 59x18
  -                text run at (68,0) width 31: "DEF"
  -                text run at (99,0) width 28: "\x{5D3}\x{5D4}\x{5D5} "
  +                text run at (68,0) width 59: "\x{5D3}\x{5D4}\x{5D5} DEF"
               RenderText {TEXT} at (127,0) size 63x18
                 text run at (127,0) width 37: " GHI "
                 text run at (164,0) width 26: "\x{5D6}\x{5D7}\x{5D8}"
  
  
  



More information about the webkit-changes mailing list