[webkit-changes] cvs commit: WebCore/layout-tests/fast/forms 001-expected.txt check-box-enter-key-expected.txt form-element-geometry-expected.txt input-value-expected.txt

David hyatt at opensource.apple.com
Tue Aug 2 13:28:42 PDT 2005


hyatt       05/08/02 13:28:42

  Modified:    .        ChangeLog
               WebCore.xcodeproj project.pbxproj
               khtml/css html4.css
               khtml/html html_formimpl.cpp html_formimpl.h
               khtml/rendering render_form.cpp render_form.h
               kwq      KWQButton.mm KWQSlot.mm
               layout-tests/fast/forms 001-expected.txt
                        check-box-enter-key-expected.txt
                        form-element-geometry-expected.txt
                        input-value-expected.txt
  Removed:     ForwardingHeaders qcheckbox.h
               kwq      KWQCheckBox.h KWQCheckBox.mm
  Log:
          - landed layout tests for fix to <rdar://problem/3572585>
          window.open fails if name param = the name of a window just
          closed in same function
  
          Fix reviewed by darin.
  
          Test cases added:
  
          * manual-tests/open-after-close.html: Added.
          * manual-tests/resources/open-after-close-popup.html: Added.
  
  Revision  Changes    Path
  1.4517    +68 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.4516
  retrieving revision 1.4517
  diff -u -r1.4516 -r1.4517
  --- ChangeLog	2 Aug 2005 17:26:26 -0000	1.4516
  +++ ChangeLog	2 Aug 2005 20:28:31 -0000	1.4517
  @@ -13,6 +13,74 @@
   
   2005-08-01  David Hyatt  <hyatt at apple.com>
   
  +	Reviewed by cblu, kocienda, darin
  +
  +	This patch removes the old KWQCheckbox from the tree and enables the new
  +	checkbox handled by the engine.
  +	
  +        * ForwardingHeaders/qcheckbox.h: Removed.
  +        Removed the old header for the Qt checkbox class.
  +	
  +	* WebCore.xcodeproj/project.pbxproj:
  +        Removed the references to KWQCheckBox from the project.
  +	
  +	* khtml/css/html4.css:
  +        Turn on the -khtml-appearance property for checkboxes so that they have
  +	the native OS X look by default.
  +	
  +	* khtml/html/html_formimpl.cpp:
  +        (DOM::HTMLInputElementImpl::setType):
  +        (DOM::HTMLInputElementImpl::setInputType):
  +        Change the setting of the type property in the DOM to simply update the
  +	corresponding attribute.  setType is the "public" API now and
  +	setInputType is the one called internally, e.g., when the attribute is
  +	changed.
  +	
  +	(DOM::HTMLInputElementImpl::click):
  +        Remove the hack for checkboxes now that the new ones are turned on.
  +	
  +	(DOM::HTMLInputElementImpl::parseMappedAttribute):
  +	Make the attribute parsing code call the internal setInputType now.
  +	
  +        (DOM::HTMLInputElementImpl::createRenderer):
  +        (DOM::HTMLInputElementImpl::attach):
  +        Remove the hack for making the old renderer and let only the new one
  +	get made now.
  +	
  +	(DOM::HTMLInputElementImpl::defaultEventHandler):
  +        Remove the hack for still doing the old event handling now that the
  +	new checkbox is on.
  +	
  +	* khtml/html/html_formimpl.h:
  +        Added the setInputType method (see above).
  +
  +	* khtml/rendering/render_form.cpp:
  +        * khtml/rendering/render_form.h:
  +	Removed RenderCheckBox from these files.
  +	
  +        * kwq/KWQButton.mm:
  +        Removed an include of qcheckbox.h.
  +	
  +	* kwq/KWQCheckBox.h: Removed.
  +        * kwq/KWQCheckBox.mm: Removed.
  +        Removed from the tree.
  +	
  +	* kwq/KWQSlot.mm:
  +        (KWQSlot::KWQSlot):
  +        (KWQSlot::call):
  +        Deleted the stateChanged signal/slot stuff, since it's no longer
  +	used by checkboxes.
  +	
  +	* layout-tests/fast/forms/001-expected.txt:
  +        * layout-tests/fast/forms/check-box-enter-key-expected.txt:
  +        * layout-tests/fast/forms/form-element-geometry-expected.txt:
  +        * layout-tests/fast/forms/input-value-expected.txt:
  +	Updated the layout tests to reflect the new checkboxes.  In the case
  +	of the last test, it has also had bugs corrected from making the type
  +	property actually set the attribute instead.
  +
  +2005-08-01  David Hyatt  <hyatt at apple.com>
  +
   	Fix bugzilla bug 4219, crash because we tried to do the fake paint
   	when layout was not updated yet.
   
  
  
  
  1.6       +0 -12     WebCore/WebCore.xcodeproj/project.pbxproj
  
  Index: project.pbxproj
  ===================================================================
  RCS file: /cvs/root/WebCore/WebCore.xcodeproj/project.pbxproj,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- project.pbxproj	31 Jul 2005 19:51:23 -0000	1.5
  +++ project.pbxproj	2 Aug 2005 20:28:38 -0000	1.6
  @@ -171,7 +171,6 @@
   		93F1992808245E59001E9ABC /* KWQButton.h in Headers */ = {isa = PBXBuildFile; fileRef = F587867D02DE3B8601EA4122 /* KWQButton.h */; };
   		93F1992908245E59001E9ABC /* KWQCString.h in Headers */ = {isa = PBXBuildFile; fileRef = F587868302DE3B8601EA4122 /* KWQCString.h */; };
   		93F1992A08245E59001E9ABC /* KWQCharsets.h in Headers */ = {isa = PBXBuildFile; fileRef = F58784CC02DE375901EA4122 /* KWQCharsets.h */; };
  -		93F1992B08245E59001E9ABC /* KWQCheckBox.h in Headers */ = {isa = PBXBuildFile; fileRef = F587867E02DE3B8601EA4122 /* KWQCheckBox.h */; };
   		93F1992C08245E59001E9ABC /* KWQCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = F587868002DE3B8601EA4122 /* KWQCollection.h */; };
   		93F1992D08245E59001E9ABC /* KWQColor.h in Headers */ = {isa = PBXBuildFile; fileRef = F587868102DE3B8601EA4122 /* KWQColor.h */; };
   		93F1992E08245E59001E9ABC /* KWQComboBox.h in Headers */ = {isa = PBXBuildFile; fileRef = F587868202DE3B8601EA4122 /* KWQComboBox.h */; };
  @@ -394,7 +393,6 @@
   		93F19A1008245E59001E9ABC /* KWQBuffer.mm in Sources */ = {isa = PBXBuildFile; fileRef = F58784C802DE375901EA4122 /* KWQBuffer.mm */; };
   		93F19A1108245E59001E9ABC /* KWQButton.mm in Sources */ = {isa = PBXBuildFile; fileRef = F58784C902DE375901EA4122 /* KWQButton.mm */; };
   		93F19A1308245E59001E9ABC /* KWQCharsets.mm in Sources */ = {isa = PBXBuildFile; fileRef = F58784CD02DE375901EA4122 /* KWQCharsets.mm */; };
  -		93F19A1408245E59001E9ABC /* KWQCheckBox.mm in Sources */ = {isa = PBXBuildFile; fileRef = F58784CE02DE375901EA4122 /* KWQCheckBox.mm */; };
   		93F19A1508245E59001E9ABC /* KWQCollection.mm in Sources */ = {isa = PBXBuildFile; fileRef = F58784CF02DE375901EA4122 /* KWQCollection.mm */; };
   		93F19A1608245E59001E9ABC /* KWQColor.mm in Sources */ = {isa = PBXBuildFile; fileRef = F58784D002DE375901EA4122 /* KWQColor.mm */; };
   		93F19A1708245E59001E9ABC /* KWQComboBox.mm in Sources */ = {isa = PBXBuildFile; fileRef = F58784D202DE375901EA4122 /* KWQComboBox.mm */; };
  @@ -722,7 +720,6 @@
   		A8212AF308794A2300677359 /* KWQButton.h in Headers */ = {isa = PBXBuildFile; fileRef = F587867D02DE3B8601EA4122 /* KWQButton.h */; };
   		A8212AF408794A2300677359 /* KWQCString.h in Headers */ = {isa = PBXBuildFile; fileRef = F587868302DE3B8601EA4122 /* KWQCString.h */; };
   		A8212AF508794A2300677359 /* KWQCharsets.h in Headers */ = {isa = PBXBuildFile; fileRef = F58784CC02DE375901EA4122 /* KWQCharsets.h */; };
  -		A8212AF608794A2300677359 /* KWQCheckBox.h in Headers */ = {isa = PBXBuildFile; fileRef = F587867E02DE3B8601EA4122 /* KWQCheckBox.h */; };
   		A8212AF708794A2300677359 /* KWQCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = F587868002DE3B8601EA4122 /* KWQCollection.h */; };
   		A8212AF808794A2300677359 /* KWQColor.h in Headers */ = {isa = PBXBuildFile; fileRef = F587868102DE3B8601EA4122 /* KWQColor.h */; };
   		A8212AF908794A2300677359 /* KWQComboBox.h in Headers */ = {isa = PBXBuildFile; fileRef = F587868202DE3B8601EA4122 /* KWQComboBox.h */; };
  @@ -979,7 +976,6 @@
   		A8212BF808794A2300677359 /* KWQBuffer.mm in Sources */ = {isa = PBXBuildFile; fileRef = F58784C802DE375901EA4122 /* KWQBuffer.mm */; };
   		A8212BF908794A2300677359 /* KWQButton.mm in Sources */ = {isa = PBXBuildFile; fileRef = F58784C902DE375901EA4122 /* KWQButton.mm */; };
   		A8212BFA08794A2300677359 /* KWQCharsets.mm in Sources */ = {isa = PBXBuildFile; fileRef = F58784CD02DE375901EA4122 /* KWQCharsets.mm */; };
  -		A8212BFB08794A2300677359 /* KWQCheckBox.mm in Sources */ = {isa = PBXBuildFile; fileRef = F58784CE02DE375901EA4122 /* KWQCheckBox.mm */; };
   		A8212BFC08794A2300677359 /* KWQCollection.mm in Sources */ = {isa = PBXBuildFile; fileRef = F58784CF02DE375901EA4122 /* KWQCollection.mm */; };
   		A8212BFD08794A2300677359 /* KWQColor.mm in Sources */ = {isa = PBXBuildFile; fileRef = F58784D002DE375901EA4122 /* KWQColor.mm */; };
   		A8212BFE08794A2300677359 /* KWQComboBox.mm in Sources */ = {isa = PBXBuildFile; fileRef = F58784D202DE375901EA4122 /* KWQComboBox.mm */; };
  @@ -3974,7 +3970,6 @@
   		F58784C902DE375901EA4122 /* KWQButton.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = KWQButton.mm; sourceTree = "<group>"; };
   		F58784CC02DE375901EA4122 /* KWQCharsets.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = KWQCharsets.h; sourceTree = "<group>"; };
   		F58784CD02DE375901EA4122 /* KWQCharsets.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = KWQCharsets.mm; sourceTree = "<group>"; };
  -		F58784CE02DE375901EA4122 /* KWQCheckBox.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = KWQCheckBox.mm; sourceTree = "<group>"; };
   		F58784CF02DE375901EA4122 /* KWQCollection.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = KWQCollection.mm; sourceTree = "<group>"; };
   		F58784D002DE375901EA4122 /* KWQColor.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = KWQColor.mm; sourceTree = "<group>"; };
   		F58784D202DE375901EA4122 /* KWQComboBox.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = KWQComboBox.mm; sourceTree = "<group>"; };
  @@ -4123,7 +4118,6 @@
   		F587867B02DE3B8601EA4122 /* KWQBrush.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = KWQBrush.h; sourceTree = "<group>"; };
   		F587867C02DE3B8601EA4122 /* KWQBuffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = KWQBuffer.h; sourceTree = "<group>"; };
   		F587867D02DE3B8601EA4122 /* KWQButton.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = KWQButton.h; sourceTree = "<group>"; };
  -		F587867E02DE3B8601EA4122 /* KWQCheckBox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = KWQCheckBox.h; sourceTree = "<group>"; };
   		F587868002DE3B8601EA4122 /* KWQCollection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = KWQCollection.h; sourceTree = "<group>"; };
   		F587868102DE3B8601EA4122 /* KWQColor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = KWQColor.h; sourceTree = "<group>"; };
   		F587868202DE3B8601EA4122 /* KWQComboBox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = KWQComboBox.h; sourceTree = "<group>"; };
  @@ -6454,8 +6448,6 @@
   				F58784C802DE375901EA4122 /* KWQBuffer.mm */,
   				F587867D02DE3B8601EA4122 /* KWQButton.h */,
   				F58784C902DE375901EA4122 /* KWQButton.mm */,
  -				F587867E02DE3B8601EA4122 /* KWQCheckBox.h */,
  -				F58784CE02DE375901EA4122 /* KWQCheckBox.mm */,
   				F587868002DE3B8601EA4122 /* KWQCollection.h */,
   				F58784CF02DE375901EA4122 /* KWQCollection.mm */,
   				F587868102DE3B8601EA4122 /* KWQColor.h */,
  @@ -6681,7 +6673,6 @@
   				93F1992808245E59001E9ABC /* KWQButton.h in Headers */,
   				93F1992908245E59001E9ABC /* KWQCString.h in Headers */,
   				93F1992A08245E59001E9ABC /* KWQCharsets.h in Headers */,
  -				93F1992B08245E59001E9ABC /* KWQCheckBox.h in Headers */,
   				93F1992C08245E59001E9ABC /* KWQCollection.h in Headers */,
   				93F1992D08245E59001E9ABC /* KWQColor.h in Headers */,
   				93F1992E08245E59001E9ABC /* KWQComboBox.h in Headers */,
  @@ -7030,7 +7021,6 @@
   				A8212AF308794A2300677359 /* KWQButton.h in Headers */,
   				A8212AF408794A2300677359 /* KWQCString.h in Headers */,
   				A8212AF508794A2300677359 /* KWQCharsets.h in Headers */,
  -				A8212AF608794A2300677359 /* KWQCheckBox.h in Headers */,
   				A8212AF708794A2300677359 /* KWQCollection.h in Headers */,
   				A8212AF808794A2300677359 /* KWQColor.h in Headers */,
   				A8212AF908794A2300677359 /* KWQComboBox.h in Headers */,
  @@ -8987,7 +8977,6 @@
   				93F19A1008245E59001E9ABC /* KWQBuffer.mm in Sources */,
   				93F19A1108245E59001E9ABC /* KWQButton.mm in Sources */,
   				93F19A1308245E59001E9ABC /* KWQCharsets.mm in Sources */,
  -				93F19A1408245E59001E9ABC /* KWQCheckBox.mm in Sources */,
   				93F19A1508245E59001E9ABC /* KWQCollection.mm in Sources */,
   				93F19A1608245E59001E9ABC /* KWQColor.mm in Sources */,
   				93F19A1708245E59001E9ABC /* KWQComboBox.mm in Sources */,
  @@ -9262,7 +9251,6 @@
   				A8212BF808794A2300677359 /* KWQBuffer.mm in Sources */,
   				A8212BF908794A2300677359 /* KWQButton.mm in Sources */,
   				A8212BFA08794A2300677359 /* KWQCharsets.mm in Sources */,
  -				A8212BFB08794A2300677359 /* KWQCheckBox.mm in Sources */,
   				A8212BFC08794A2300677359 /* KWQCollection.mm in Sources */,
   				A8212BFD08794A2300677359 /* KWQColor.mm in Sources */,
   				A8212BFE08794A2300677359 /* KWQComboBox.mm in Sources */,
  
  
  
  1.72      +0 -4      WebCore/khtml/css/html4.css
  
  Index: html4.css
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/css/html4.css,v
  retrieving revision 1.71
  retrieving revision 1.72
  diff -u -r1.71 -r1.72
  --- html4.css	29 Jul 2005 23:02:42 -0000	1.71
  +++ html4.css	2 Aug 2005 20:28:39 -0000	1.72
  @@ -319,14 +319,10 @@
       display: none
   }
   
  -/* Comment this section in to enable the new controls
  -
   input[type="checkbox"] {
       -khtml-appearance: checkbox
   }
   
  -*/
  -
   /* inline elements */      
         
   u, ins {
  
  
  
  1.182     +20 -19    WebCore/khtml/html/html_formimpl.cpp
  
  Index: html_formimpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/html/html_formimpl.cpp,v
  retrieving revision 1.181
  retrieving revision 1.182
  diff -u -r1.181 -r1.182
  --- html_formimpl.cpp	30 Jul 2005 02:33:17 -0000	1.181
  +++ html_formimpl.cpp	2 Aug 2005 20:28:39 -0000	1.182
  @@ -1359,6 +1359,16 @@
   
   void HTMLInputElementImpl::setType(const DOMString& t)
   {
  +    if (t.isEmpty()) {
  +        int exccode;
  +        removeAttribute(typeAttr, exccode);
  +    }
  +    else
  +        setAttribute(typeAttr, t);
  +}
  +
  +void HTMLInputElementImpl::setInputType(const DOMString& t)
  +{
       typeEnum newType;
       
       if ( strcasecmp( t, "password" ) == 0 )
  @@ -1417,6 +1427,11 @@
           }
       }
       m_haveType = true;
  +    
  +    if (m_type != IMAGE && m_imageLoader) {
  +        delete m_imageLoader;
  +        m_imageLoader = 0;
  +    }
   }
   
   DOMString HTMLInputElementImpl::type() const
  @@ -1610,13 +1625,6 @@
           case HIDDEN:
               // a no-op for this type
               break;
  -        case CHECKBOX:
  -            if (renderer() && renderer()->style()->hasAppearance()) {
  -                // Do the click.
  -                HTMLGenericFormElementImpl::click(sendMouseEvents);
  -                break;
  -            }
  -            // Fall through for now 
           case RADIO:
           case SUBMIT:
           case RESET:
  @@ -1642,6 +1650,7 @@
   #endif
               HTMLGenericFormElementImpl::click(sendMouseEvents);
               break;
  +        case CHECKBOX:
           case IMAGE:
           case ISINDEX:
           case PASSWORD:
  @@ -1712,11 +1721,7 @@
       if (attr->name() == autocompleteAttr) {
           m_autocomplete = strcasecmp( attr->value(), "off" );
       } else if (attr->name() ==  typeAttr) {
  -        setType(attr->value());
  -        if (m_type != IMAGE && m_imageLoader) {
  -            delete m_imageLoader;
  -            m_imageLoader = 0;
  -        }
  +        setInputType(attr->value());
       } else if (attr->name() == valueAttr) {
           // We only need to setChanged if the form is looking at the default value right now.
           if (m_value.isNull())
  @@ -1826,11 +1831,7 @@
       case SEARCH:
   #endif
       case ISINDEX:  return new (arena) RenderLineEdit(this);
  -    case CHECKBOX: {
  -        if (style->appearance() == CheckboxAppearance)
  -            return RenderObject::createObject(this, style);
  -        return new (arena) RenderCheckBox(this);
  -    }
  +    case CHECKBOX: return RenderObject::createObject(this, style);
       case RADIO:    return new (arena) RenderRadioButton(this);
       case SUBMIT:   return new (arena) RenderSubmitButton(this);
       case IMAGE:    return new (arena) RenderImageButton(this);
  @@ -1850,7 +1851,7 @@
   {
       if (!m_inited) {
           if (!m_haveType)
  -            setType(getAttribute(typeAttr));
  +            setInputType(getAttribute(typeAttr));
   
           // FIXME: This needs to be dynamic, doesn't it, since someone could set this
           // after attachment?
  @@ -2240,7 +2241,7 @@
                   m_activeSubmit = false;
               }
           } else if (m_type == CHECKBOX || m_type == RADIO) {
  -            if (renderer() && renderer()->style()->hasAppearance())
  +            if (m_type == CHECKBOX || (renderer() && renderer()->style()->hasAppearance()))
                   // FIXME: We key off appearance for now, but this is temporary.  When we cut over
                   // for real this will just always be used.
                   setChecked(!checked());
  
  
  
  1.83      +2 -0      WebCore/khtml/html/html_formimpl.h
  
  Index: html_formimpl.h
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/html/html_formimpl.h,v
  retrieving revision 1.82
  retrieving revision 1.83
  diff -u -r1.82 -r1.83
  --- html_formimpl.h	30 Jul 2005 02:33:17 -0000	1.82
  +++ html_formimpl.h	2 Aug 2005 20:28:39 -0000	1.83
  @@ -394,6 +394,8 @@
       virtual void setActivatedSubmit(bool flag);
   
       typeEnum inputType() const { return m_type; }
  +    void setInputType(const DOMString& value);
  +
       virtual void reset();
   
       // used in case input type=image was clicked.
  
  
  
  1.114     +0 -46     WebCore/khtml/rendering/render_form.cpp
  
  Index: render_form.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/render_form.cpp,v
  retrieving revision 1.113
  retrieving revision 1.114
  diff -u -r1.113 -r1.114
  --- render_form.cpp	1 Aug 2005 04:31:58 -0000	1.113
  +++ render_form.cpp	2 Aug 2005 20:28:40 -0000	1.114
  @@ -281,52 +281,6 @@
   
   // -------------------------------------------------------------------------------
   
  -RenderCheckBox::RenderCheckBox(HTMLInputElementImpl *element)
  -    : RenderButton(element)
  -{
  -    QCheckBox* b = new QCheckBox(view()->viewport());
  -    b->setAutoMask(true);
  -    b->setMouseTracking(true);
  -    setQWidget(b);
  -    connect(b,SIGNAL(stateChanged(int)),this,SLOT(slotStateChanged(int)));
  -    connect(b, SIGNAL(clicked()), this, SLOT(slotClicked()));
  -}
  -
  -void RenderCheckBox::calcMinMaxWidth()
  -{
  -    KHTMLAssert( !minMaxKnown() );
  -
  -#if APPLE_CHANGES
  -    // Let the widget tell us how big it wants to be.
  -    QSize s(widget()->sizeHint());
  -#else
  -    QCheckBox *cb = static_cast<QCheckBox *>( m_widget );
  -    QSize s( cb->style().pixelMetric( QStyle::PM_IndicatorWidth ),
  -             cb->style().pixelMetric( QStyle::PM_IndicatorHeight ) );
  -#endif
  -    setIntrinsicWidth( s.width() );
  -    setIntrinsicHeight( s.height() );
  -
  -    RenderButton::calcMinMaxWidth();
  -}
  -
  -void RenderCheckBox::updateFromElement()
  -{
  -    widget()->setChecked(element()->checked());
  -
  -    RenderButton::updateFromElement();
  -}
  -
  -// From the Qt documentation:
  -// state is 2 if the button is on, 1 if it is in the "no change" state or 0 if the button is off. 
  -void RenderCheckBox::slotStateChanged(int state)
  -{
  -    element()->setChecked(state == 2);
  -    element()->onChange();
  -}
  -
  -// -------------------------------------------------------------------------------
  -
   RenderRadioButton::RenderRadioButton(HTMLInputElementImpl *element)
       : RenderButton(element)
   {
  
  
  
  1.53      +0 -19     WebCore/khtml/rendering/render_form.h
  
  Index: render_form.h
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/render_form.h,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- render_form.h	24 Jun 2005 05:53:28 -0000	1.52
  +++ render_form.h	2 Aug 2005 20:28:40 -0000	1.53
  @@ -36,7 +36,6 @@
   
   #include <qtextedit.h>
   #include <klineedit.h>
  -#include <qcheckbox.h>
   #include <qradiobutton.h>
   #include <qpushbutton.h>
   #include <qhbox.h>
  @@ -145,24 +144,6 @@
   
   // -------------------------------------------------------------------------
   
  -class RenderCheckBox : public RenderButton
  -{
  -    Q_OBJECT
  -public:
  -    RenderCheckBox(DOM::HTMLInputElementImpl* node);
  -
  -    virtual const char *renderName() const { return "RenderCheckBox"; }
  -    virtual void updateFromElement();
  -    virtual void calcMinMaxWidth();
  -
  -    QCheckBox *widget() const { return static_cast<QCheckBox*>(m_widget); }
  -
  -public slots:
  -    virtual void slotStateChanged(int state);
  -};
  -
  -// -------------------------------------------------------------------------
  -
   class RenderRadioButton : public RenderButton
   {
       Q_OBJECT
  
  
  
  1.44      +0 -1      WebCore/kwq/KWQButton.mm
  
  Index: KWQButton.mm
  ===================================================================
  RCS file: /cvs/root/WebCore/kwq/KWQButton.mm,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- KWQButton.mm	29 Jul 2005 02:42:31 -0000	1.43
  +++ KWQButton.mm	2 Aug 2005 20:28:40 -0000	1.44
  @@ -26,7 +26,6 @@
   #import "KWQButton.h"
   
   #import "KWQAssertions.h"
  -#import "KWQCheckBox.h"
   #import "KWQExceptions.h"
   #import "KWQKHTMLPart.h"
   #import "KWQNSViewExtras.h"
  
  
  
  1.31      +0 -5      WebCore/kwq/KWQSlot.mm
  
  Index: KWQSlot.mm
  ===================================================================
  RCS file: /cvs/root/WebCore/kwq/KWQSlot.mm,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- KWQSlot.mm	14 Jul 2005 02:32:33 -0000	1.30
  +++ KWQSlot.mm	2 Aug 2005 20:28:41 -0000	1.31
  @@ -38,7 +38,6 @@
   using khtml::CachedObject;
   using khtml::DocLoader;
   using khtml::Loader;
  -using khtml::RenderCheckBox;
   using khtml::RenderFileButton;
   using khtml::RenderFormElement;
   using khtml::RenderLineEdit;
  @@ -106,7 +105,6 @@
       CASE(slotSelected, (int), RenderSelect)
       CASE(slotSelectionChanged, (), RenderFormElement)
       CASE(slotSliderValueChanged, (), RenderSlider)
  -    CASE(slotStateChanged, (int), RenderCheckBox)
       CASE(slotTextChanged, (), RenderTextArea)
       CASE(slotValueChanged, (int), RenderScrollMediator)
       CASE(slotWidgetDestructed, (), RenderWidget)
  @@ -212,9 +210,6 @@
       }
       
       switch (m_function) {
  -        case slotStateChanged:
  -            static_cast<RenderCheckBox *>(m_object.pointer())->slotStateChanged(i);
  -            return;
           case slotSelected:
               static_cast<RenderSelect *>(m_object.pointer())->slotSelected(i);
               return;
  
  
  
  1.9       +1 -1      WebCore/layout-tests/fast/forms/001-expected.txt
  
  Index: 001-expected.txt
  ===================================================================
  RCS file: /cvs/root/WebCore/layout-tests/fast/forms/001-expected.txt,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- 001-expected.txt	15 Apr 2005 21:45:54 -0000	1.8
  +++ 001-expected.txt	2 Aug 2005 20:28:41 -0000	1.9
  @@ -17,7 +17,7 @@
             RenderTableSection {TBODY} at (2,2) size 0x20
               RenderTableRow {TR} at (0,0) size 0x0
                 RenderTableCell {TD} at (0,0) size 20x20 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
  -                RenderCheckBox {INPUT} at (4,4) size 12x12
  +                RenderBlock {INPUT} at (4,4) size 12x12
                 RenderTableCell {TD} at (20,9) size 760x2 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
         RenderBlock {P} at (0,138) size 784x25
           RenderTable {TABLE} at (0,0) size 784x25 [border: (2px outset #808080)]
  
  
  
  1.2       +0 -1      WebCore/layout-tests/fast/forms/check-box-enter-key-expected.txt
  
  Index: check-box-enter-key-expected.txt
  ===================================================================
  RCS file: /cvs/root/WebCore/layout-tests/fast/forms/check-box-enter-key-expected.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- check-box-enter-key-expected.txt	31 May 2005 05:48:41 -0000	1.1
  +++ check-box-enter-key-expected.txt	2 Aug 2005 20:28:41 -0000	1.2
  @@ -2,7 +2,6 @@
   
   If the test passes, the text below should say both "tried to submit form" and "check box is not checked".
   
  -
   Tried to submit form.
   Check box is not checked.
   
  
  
  
  1.10      +6 -8      WebCore/layout-tests/fast/forms/form-element-geometry-expected.txt
  
  Index: form-element-geometry-expected.txt
  ===================================================================
  RCS file: /cvs/root/WebCore/layout-tests/fast/forms/form-element-geometry-expected.txt,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- form-element-geometry-expected.txt	15 Apr 2005 21:45:54 -0000	1.9
  +++ form-element-geometry-expected.txt	2 Aug 2005 20:28:41 -0000	1.10
  @@ -34,7 +34,7 @@
               RenderTableCell {TD} at (152,5) size 18x18 [r=0 c=3 rs=1 cs=1]
                 RenderBlock {DIV} at (1,1) size 16x16 [border: (2px solid #0000FF)]
                   RenderInline {FONT} at (0,0) size 12x12
  -                  RenderCheckBox {INPUT} at (2,2) size 12x12
  +                  RenderBlock {INPUT} at (2,2) size 12x12
                 RenderBlock (anonymous) at (1,17) size 16x0
                   RenderInline {FONT} at (0,0) size 0x0
         RenderTable {TABLE} at (0,170) size 172x28
  @@ -51,7 +51,7 @@
                   RenderRadioButton {INPUT} at (2,2) size 12x13
               RenderTableCell {TD} at (152,5) size 18x18 [r=0 c=3 rs=1 cs=1]
                 RenderBlock {DIV} at (1,1) size 16x16 [border: (2px solid #0000FF)]
  -                RenderCheckBox {INPUT} at (2,2) size 12x12
  +                RenderBlock {INPUT} at (2,2) size 12x12
         RenderTable {TABLE} at (0,198) size 172x28
           RenderTableSection {TBODY} at (0,0) size 0x28
             RenderTableRow {TR} at (0,0) size 0x0
  @@ -70,7 +70,7 @@
               RenderTableCell {TD} at (152,5) size 18x18 [r=0 c=3 rs=1 cs=1]
                 RenderBlock {DIV} at (1,1) size 16x16 [border: (2px solid #0000FF)]
                   RenderInline {FONT} at (0,0) size 12x12
  -                  RenderCheckBox {INPUT} at (2,2) size 12x12
  +                  RenderBlock {INPUT} at (2,2) size 12x12
         RenderTable {TABLE} at (0,226) size 551x68
           RenderTableSection {TBODY} at (0,0) size 0x68
             RenderTableRow {TR} at (0,0) size 0x0
  @@ -102,8 +102,7 @@
             RenderRadioButton {INPUT} at (180,11) size 12x13
             RenderText {TEXT} at (195,0) size 6x28
               text run at (195,0) width 6: " "
  -          RenderCheckBox {INPUT} at (204,12) size 12x12
  -          RenderText {TEXT} at (0,0) size 0x0
  +          RenderBlock {INPUT} at (204,12) size 12x12
         RenderBlock {DIV} at (0,389) size 784x22
           RenderText {TEXT} at (0,1) size 27x18
             text run at (0,1) width 27: "text "
  @@ -116,7 +115,7 @@
           RenderRadioButton {INPUT} at (160,4) size 12x13
           RenderText {TEXT} at (175,1) size 4x18
             text run at (175,1) width 4: " "
  -        RenderCheckBox {INPUT} at (182,5) size 12x12
  +        RenderBlock {INPUT} at (182,5) size 12x12
           RenderText {TEXT} at (0,0) size 0x0
         RenderBlock {DIV} at (0,411) size 784x22
           RenderInline {FONT} at (0,0) size 185x13
  @@ -131,8 +130,7 @@
             RenderRadioButton {INPUT} at (149,4) size 12x13
             RenderText {TEXT} at (164,5) size 3x13
               text run at (164,5) width 3: " "
  -          RenderCheckBox {INPUT} at (170,5) size 12x12
  -          RenderText {TEXT} at (0,0) size 0x0
  +          RenderBlock {INPUT} at (170,5) size 12x12
         RenderBlock {DIV} at (0,433) size 784x37
           RenderText {TEXT} at (0,16) size 27x18
             text run at (0,16) width 27: "text "
  
  
  
  1.4       +26 -26    WebCore/layout-tests/fast/forms/input-value-expected.txt
  
  Index: input-value-expected.txt
  ===================================================================
  RCS file: /cvs/root/WebCore/layout-tests/fast/forms/input-value-expected.txt,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- input-value-expected.txt	15 Apr 2005 21:45:54 -0000	1.3
  +++ input-value-expected.txt	2 Aug 2005 20:28:41 -0000	1.4
  @@ -11,8 +11,8 @@
           RenderText {TEXT} at (0,0) size 713x18
             text run at (0,0) width 713: "Results that match Gecko are like WinIE, but with \"before\" for the attribute in the first two rows and the last row."
         RenderBlock {HR} at (0,86) size 784x2 [border: (1px inset #000000)]
  -      RenderBlock {FORM} at (0,96) size 784x368
  -        RenderTable {TABLE} at (0,0) size 754x368
  +      RenderBlock {FORM} at (0,96) size 784x364
  +        RenderTable {TABLE} at (0,0) size 754x364
             RenderTableSection {THEAD} at (0,0) size 0x24
               RenderTableRow {TR} at (0,0) size 0x0
                 RenderTableCell {TH} at (2,2) size 385x20 [r=0 c=0 rs=1 cs=1]
  @@ -27,7 +27,7 @@
                 RenderTableCell {TH} at (691,2) size 61x20 [r=0 c=3 rs=1 cs=1]
                   RenderText {TEXT} at (1,1) size 59x18
                     text run at (1,1) width 59: "attribute"
  -          RenderTableSection {TBODY} at (0,24) size 0x344
  +          RenderTableSection {TBODY} at (0,24) size 0x340
               RenderTableRow {TR} at (0,0) size 0x0
                 RenderTableCell {TD} at (2,4) size 385x20 [r=0 c=0 rs=1 cs=1]
                   RenderText {TEXT} at (1,1) size 207x18
  @@ -57,7 +57,7 @@
                   RenderText {TEXT} at (1,1) size 249x18
                     text run at (1,1) width 249: "check box with value property changed"
                 RenderTableCell {TD} at (389,56) size 236x20 [r=2 c=1 rs=1 cs=1]
  -                RenderCheckBox {INPUT} at (4,4) size 12x12
  +                RenderBlock {INPUT} at (4,4) size 12x12
                 RenderTableCell {TD} at (627,56) size 62x20 [r=2 c=2 rs=1 cs=1]
                   RenderText {TEXT} at (1,1) size 28x18
                     text run at (1,1) width 28: "after"
  @@ -128,7 +128,7 @@
                   RenderText {TEXT} at (1,1) size 247x18
                     text run at (1,1) width 247: "check box with value attribute changed"
                 RenderTableCell {TD} at (389,198) size 236x20 [r=8 c=1 rs=1 cs=1]
  -                RenderCheckBox {INPUT} at (4,4) size 12x12
  +                RenderBlock {INPUT} at (4,4) size 12x12
                 RenderTableCell {TD} at (627,198) size 62x20 [r=8 c=2 rs=1 cs=1]
                   RenderText {TEXT} at (1,1) size 28x18
                     text run at (1,1) width 28: "after"
  @@ -139,8 +139,8 @@
                 RenderTableCell {TD} at (2,220) size 385x20 [r=9 c=0 rs=1 cs=1]
                   RenderText {TEXT} at (1,1) size 383x18
                     text run at (1,1) width 383: "text with value property changed, then turned into check box"
  -              RenderTableCell {TD} at (389,221) size 236x18 [r=9 c=1 rs=1 cs=1]
  -                RenderCheckBox {INPUT} at (3,3) size 12x12
  +              RenderTableCell {TD} at (389,220) size 236x20 [r=9 c=1 rs=1 cs=1]
  +                RenderBlock {INPUT} at (4,4) size 12x12
                 RenderTableCell {TD} at (627,220) size 62x20 [r=9 c=2 rs=1 cs=1]
                   RenderText {TEXT} at (1,1) size 28x18
                     text run at (1,1) width 28: "after"
  @@ -148,48 +148,48 @@
                   RenderText {TEXT} at (1,1) size 28x18
                     text run at (1,1) width 28: "after"
               RenderTableRow {TR} at (0,0) size 0x0
  -              RenderTableCell {TD} at (2,245) size 385x20 [r=10 c=0 rs=1 cs=1]
  +              RenderTableCell {TD} at (2,244) size 385x20 [r=10 c=0 rs=1 cs=1]
                   RenderText {TEXT} at (1,1) size 383x18
                     text run at (1,1) width 383: "check box with value property changed, then turned into text"
  -              RenderTableCell {TD} at (389,242) size 236x27 [r=10 c=1 rs=1 cs=1]
  -                RenderLineEdit {INPUT} at (4,4) size 148x19
  -              RenderTableCell {TD} at (627,245) size 62x20 [r=10 c=2 rs=1 cs=1]
  +              RenderTableCell {TD} at (389,242) size 236x25 [r=10 c=1 rs=1 cs=1]
  +                RenderLineEdit {INPUT} at (3,3) size 148x19
  +              RenderTableCell {TD} at (627,244) size 62x20 [r=10 c=2 rs=1 cs=1]
                   RenderText {TEXT} at (1,1) size 28x18
                     text run at (1,1) width 28: "after"
  -              RenderTableCell {TD} at (691,245) size 61x20 [r=10 c=3 rs=1 cs=1]
  +              RenderTableCell {TD} at (691,244) size 61x20 [r=10 c=3 rs=1 cs=1]
                   RenderText {TEXT} at (1,1) size 28x18
                     text run at (1,1) width 28: "after"
               RenderTableRow {TR} at (0,0) size 0x0
  -              RenderTableCell {TD} at (2,271) size 385x20 [r=11 c=0 rs=1 cs=1]
  +              RenderTableCell {TD} at (2,269) size 385x20 [r=11 c=0 rs=1 cs=1]
                   RenderText {TEXT} at (1,1) size 381x18
                     text run at (1,1) width 381: "text with value attribute changed, then turned into check box"
  -              RenderTableCell {TD} at (389,272) size 236x18 [r=11 c=1 rs=1 cs=1]
  -                RenderCheckBox {INPUT} at (3,3) size 12x12
  -              RenderTableCell {TD} at (627,271) size 62x20 [r=11 c=2 rs=1 cs=1]
  +              RenderTableCell {TD} at (389,269) size 236x20 [r=11 c=1 rs=1 cs=1]
  +                RenderBlock {INPUT} at (4,4) size 12x12
  +              RenderTableCell {TD} at (627,269) size 62x20 [r=11 c=2 rs=1 cs=1]
                   RenderText {TEXT} at (1,1) size 28x18
                     text run at (1,1) width 28: "after"
  -              RenderTableCell {TD} at (691,271) size 61x20 [r=11 c=3 rs=1 cs=1]
  +              RenderTableCell {TD} at (691,269) size 61x20 [r=11 c=3 rs=1 cs=1]
                   RenderText {TEXT} at (1,1) size 28x18
                     text run at (1,1) width 28: "after"
               RenderTableRow {TR} at (0,0) size 0x0
  -              RenderTableCell {TD} at (2,296) size 385x20 [r=12 c=0 rs=1 cs=1]
  +              RenderTableCell {TD} at (2,293) size 385x20 [r=12 c=0 rs=1 cs=1]
                   RenderText {TEXT} at (1,1) size 381x18
                     text run at (1,1) width 381: "check box with value attribute changed, then turned into text"
  -              RenderTableCell {TD} at (389,293) size 236x27 [r=12 c=1 rs=1 cs=1]
  -                RenderLineEdit {INPUT} at (4,4) size 148x19
  -              RenderTableCell {TD} at (627,296) size 62x20 [r=12 c=2 rs=1 cs=1]
  +              RenderTableCell {TD} at (389,291) size 236x25 [r=12 c=1 rs=1 cs=1]
  +                RenderLineEdit {INPUT} at (3,3) size 148x19
  +              RenderTableCell {TD} at (627,293) size 62x20 [r=12 c=2 rs=1 cs=1]
                   RenderText {TEXT} at (1,1) size 28x18
                     text run at (1,1) width 28: "after"
  -              RenderTableCell {TD} at (691,296) size 61x20 [r=12 c=3 rs=1 cs=1]
  +              RenderTableCell {TD} at (691,293) size 61x20 [r=12 c=3 rs=1 cs=1]
                   RenderText {TEXT} at (1,1) size 28x18
                     text run at (1,1) width 28: "after"
               RenderTableRow {TR} at (0,0) size 0x0
  -              RenderTableCell {TD} at (2,322) size 385x20 [r=13 c=0 rs=1 cs=1]
  +              RenderTableCell {TD} at (2,318) size 385x20 [r=13 c=0 rs=1 cs=1]
                   RenderText {TEXT} at (1,1) size 204x18
                     text run at (1,1) width 204: "file with value property changed"
  -              RenderTableCell {TD} at (389,322) size 236x20 [r=13 c=1 rs=1 cs=1]
  +              RenderTableCell {TD} at (389,318) size 236x20 [r=13 c=1 rs=1 cs=1]
                   RenderFileButton {INPUT} at (1,1) size 234x18
  -              RenderTableCell {TD} at (627,331) size 62x2 [r=13 c=2 rs=1 cs=1]
  -              RenderTableCell {TD} at (691,322) size 61x20 [r=13 c=3 rs=1 cs=1]
  +              RenderTableCell {TD} at (627,327) size 62x2 [r=13 c=2 rs=1 cs=1]
  +              RenderTableCell {TD} at (691,318) size 61x20 [r=13 c=3 rs=1 cs=1]
                   RenderText {TEXT} at (1,1) size 40x18
                     text run at (1,1) width 40: "before"
  
  
  



More information about the webkit-changes mailing list