[webkit-changes] cvs commit: WebCore/layout-tests/fast/replaced/resources applet.class applet.java

Darin darin at opensource.apple.com
Sat Jun 18 19:27:36 PDT 2005


darin       05/06/18 19:27:36

  Modified:    .        ChangeLog
               khtml/html html_objectimpl.cpp
  Added:       layout-tests/fast/replaced applet-hspace.html
                        applet-vspace.html
               layout-tests/fast/replaced/resources applet.class
                        applet.java
  Log:
          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.
          * layout-tests/fast/replaced/applet-vspace.html: Added.
          * layout-tests/fast/replaced/resources/applet.class: Added.
          * layout-tests/fast/replaced/resources/applet.java: Added.
  
          - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3246>
            HSPACE and VSPACE attributes are ignored in APPLET element
  
          * khtml/html/html_objectimpl.cpp:
          (DOM::HTMLAppletElementImpl::mapToEntry): Add cases for ATTR_VSPACE and ATTR_HSPACE.
          (DOM::HTMLAppletElementImpl::parseMappedAttribute): Ditto.
  
  Revision  Changes    Path
  1.4277    +20 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.4276
  retrieving revision 1.4277
  diff -u -r1.4276 -r1.4277
  --- ChangeLog	19 Jun 2005 01:58:33 -0000	1.4276
  +++ ChangeLog	19 Jun 2005 02:27:32 -0000	1.4277
  @@ -1,5 +1,25 @@
   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.
  +        * layout-tests/fast/replaced/applet-vspace.html: Added.
  +        * layout-tests/fast/replaced/resources/applet.class: Added.
  +        * layout-tests/fast/replaced/resources/applet.java: Added.
  +
  +        - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3246>
  +          HSPACE and VSPACE attributes are ignored in APPLET element
  +
  +        * khtml/html/html_objectimpl.cpp:
  +        (DOM::HTMLAppletElementImpl::mapToEntry): Add cases for ATTR_VSPACE and ATTR_HSPACE.
  +        (DOM::HTMLAppletElementImpl::parseMappedAttribute): Ditto.
  +
  +2005-06-18  Darin Adler  <darin at apple.com>
  +
           - removed some unused code from one of the KWQ headers
   
           * kwq/KWQKHTMLPartBrowserExtension.h:
  
  
  
  1.65      +12 -2     WebCore/khtml/html/html_objectimpl.cpp
  
  Index: html_objectimpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/html/html_objectimpl.cpp,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- html_objectimpl.cpp	31 May 2005 00:15:52 -0000	1.64
  +++ html_objectimpl.cpp	19 Jun 2005 02:27:35 -0000	1.65
  @@ -78,6 +78,8 @@
       switch (attr) {
           case ATTR_WIDTH:
           case ATTR_HEIGHT:
  +        case ATTR_VSPACE:
  +        case ATTR_HSPACE:
               result = eUniversal;
               return false;
           case ATTR_ALIGN:
  @@ -107,9 +109,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;
  +        addHTMLAlignment(attr);
  +        break;
       default:
           HTMLElementImpl::parseMappedAttribute(attr);
       }
  
  
  
  1.1                  WebCore/layout-tests/fast/replaced/applet-hspace.html
  
  Index: applet-hspace.html
  ===================================================================
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >

<html>
<body>

<h1>Applet 1</h1>
<p><APPLET CODE="applet.class" CODEBASE="resources" HEIGHT="60" WIDTH="300" hspace="100">
    <PARAM NAME="message" VALUE="Scrolling banner text !!!">
    <param name="bgcolor" value="0000FF">
</APPLET></p>
<p>Applet 1 is using HSPACE of 100 pixels. As a result, there show be extra whitespace on the left and right side of this applet.

<h1>Applet 2</h1>
<APPLET CODE="applet.class" CODEBASE="resources" HEIGHT="60" WIDTH="300">
    <PARAM NAME="message" VALUE="Scrolling banner text !!!">
    <param name="bgcolor" value="0000FF">
</APPLET></p>
<p>As a comparison, this Applet 2 has NO hspace attribute specified. It should have no extra whitespace on the left or right side of the applet.

</body>
</html>
  
  
  1.1                  WebCore/layout-tests/fast/replaced/applet-vspace.html
  
  Index: applet-vspace.html
  ===================================================================
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >

<html>
<body>

<h1>Applet 1</h1>
<p><APPLET CODE="applet.class" CODEBASE="resources" HEIGHT="60" WIDTH="300" vspace="90"></APPLET></p>
<p>Applet 1 is using VSPACE of 100 pixels. As a result, there show be extra whitespace above and below this applet.
Even if there's no applet loaded, you can tell if this succeeds or fails by comparing with the other case below.</p>

<H1>Applet 2</h1>
<p><APPLET CODE="applet.class" CODEBASE="resources" HEIGHT="60" WIDTH="300">
    <PARAM NAME="message"   VALUE="Scrolling banner text !!!">
    <param name="bgcolor" value="0000FF">
</APPLET></p>
<p>As a comparison, this Applet 2 has NO vspace attribute specified. It should have no extra whitespace above or below it.</p>

</body>
</html>
  
  
  1.1                  WebCore/layout-tests/fast/replaced/resources/applet.class
  
  	<<Binary file>>
  
  
  1.1                  WebCore/layout-tests/fast/replaced/resources/applet.java
  
  Index: applet.java
  ===================================================================
  import java.awt.*;
  import java.applet.*;
  public class applet extends Applet
  {
      public void paint(Graphics g) {
          g.fillRect(0, 0, 10000, 10000);
      }
  }
  
  
  



More information about the webkit-changes mailing list