[webkit-changes] cvs commit: WebCore/layout-tests/fast/replaced/resources webkit-background.png

Darin darin at opensource.apple.com
Sat Jun 18 20:39:57 PDT 2005


darin       05/06/18 20:39:57

  Modified:    .        ChangeLog
               khtml/html html_objectimpl.cpp
  Added:       layout-tests/fast/replaced
                        object-align-hspace-vspace-expected.txt
                        object-align-hspace-vspace.html
               layout-tests/fast/replaced/resources webkit-background.png
  Log:
          Change by Niels Leenheer (also done by Dave Hyatt on stage at WWDC).
          Reviewed by me.
  
          Test cases added:
          * layout-tests/fast/replaced/object-align-hspace-vspace-expected.txt: Added.
          * layout-tests/fast/replaced/object-align-hspace-vspace.html: Added.
          * layout-tests/fast/replaced/resources/webkit-background.png: Added.
  
          * khtml/html/html_objectimpl.cpp:
          (DOM::HTMLObjectElementImpl::mapToEntry): Add cases for ATTR_ALIGN, ATTR_VSPACE and ATTR_HSPACE.
          (DOM::HTMLObjectElementImpl::parseMappedAttribute): Ditto.
  
  Revision  Changes    Path
  1.4278    +14 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.4277
  retrieving revision 1.4278
  diff -u -r1.4277 -r1.4278
  --- ChangeLog	19 Jun 2005 02:27:32 -0000	1.4277
  +++ ChangeLog	19 Jun 2005 03:39:51 -0000	1.4278
  @@ -4,6 +4,20 @@
           Reviewed by me.
   
           Test cases added:
  +        * layout-tests/fast/replaced/object-align-hspace-vspace-expected.txt: Added.
  +        * layout-tests/fast/replaced/object-align-hspace-vspace.html: Added.
  +        * layout-tests/fast/replaced/resources/webkit-background.png: Added.
  +
  +        * khtml/html/html_objectimpl.cpp:
  +        (DOM::HTMLObjectElementImpl::mapToEntry): Add cases for ATTR_ALIGN, ATTR_VSPACE and ATTR_HSPACE.
  +        (DOM::HTMLObjectElementImpl::parseMappedAttribute): Ditto.
  +
  +2005-06-18  Darin Adler  <darin at apple.com>
  +
  +        Change by Niels Leenheer (also done by Dave Hyatt on stage at WWDC).
  +        Reviewed by me.
  +
  +        Test cases added:
           * layout-tests/fast/replaced/applet-hspace-expected.txt: Added.
           * layout-tests/fast/replaced/applet-hspace.html: Added.
           * layout-tests/fast/replaced/applet-vspace-expected.txt: Added.
  
  
  
  1.66      +16 -0     WebCore/khtml/html/html_objectimpl.cpp
  
  Index: html_objectimpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/html/html_objectimpl.cpp,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- html_objectimpl.cpp	19 Jun 2005 02:27:35 -0000	1.65
  +++ html_objectimpl.cpp	19 Jun 2005 03:39:56 -0000	1.66
  @@ -561,8 +561,13 @@
       switch (attr) {
           case ATTR_WIDTH:
           case ATTR_HEIGHT:
  +        case ATTR_VSPACE:
  +        case ATTR_HSPACE:
               result = eUniversal;
               return false;
  +        case ATTR_ALIGN:
  +            result = eReplaced; // Share with <img> since the alignment behavior is the same.
  +            return false;
           default:
               break;
       }
  @@ -604,6 +609,17 @@
       case ATTR_HEIGHT:
         addCSSLength( attr, CSS_PROP_HEIGHT, attr->value());
         break;
  +    case ATTR_VSPACE:
  +        addCSSLength(attr, CSS_PROP_MARGIN_TOP, attr->value());
  +        addCSSLength(attr, CSS_PROP_MARGIN_BOTTOM, attr->value());
  +        break;
  +    case ATTR_HSPACE:
  +        addCSSLength(attr, CSS_PROP_MARGIN_LEFT, attr->value());
  +        addCSSLength(attr, CSS_PROP_MARGIN_RIGHT, attr->value());
  +        break;
  +    case ATTR_ALIGN:
  +        addHTMLAlignment(attr);
  +        break;
       case ATTR_CLASSID:
         classId = val;
         if (m_render)
  
  
  
  1.1                  WebCore/layout-tests/fast/replaced/object-align-hspace-vspace-expected.txt
  
  Index: object-align-hspace-vspace-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 784x18
          RenderText {TEXT} at (0,0) size 580x18
            text run at (0,0) width 580: "vspace and hspace test (20 pixel white margin between blue border and yellow background)"
        RenderBlock {DIV} at (0,34) size 784x223 [border: (4px solid #0000FF)]
          RenderImage {OBJECT} at (24,24) size 233x175 [bgcolor=#FFFF00]
          RenderText {TEXT} at (0,0) size 0x0
        RenderBlock {P} at (0,273) size 784x18
          RenderText {TEXT} at (0,0) size 220x18
            text run at (0,0) width 220: "align test (aligned to the right) -->>"
        RenderImage {OBJECT} at (551,307) size 233x175
  
  
  
  1.1                  WebCore/layout-tests/fast/replaced/object-align-hspace-vspace.html
  
  Index: object-align-hspace-vspace.html
  ===================================================================
  <html>
  <body>
  
  <p>vspace and hspace test (20 pixel white margin between blue border and yellow background)</p>
  
  <div style='border: 4px solid blue;'>
  <object style="width:233px; height:175px; background-color: yellow;" hspace=20 vspace=20 data='resources/webkit-background.png' type='image/png'></object>
  </div>
  
  <p>align test (aligned to the right) --&gt;&gt;</p>
  
  <object style="width:233px; height:175px;" align='right' data='resources/webkit-background.png' type='image/png'></object>
  
  </body>
  </html>
  
  
  
  1.1                  WebCore/layout-tests/fast/replaced/resources/webkit-background.png
  
  	<<Binary file>>
  
  



More information about the webkit-changes mailing list