Eliminate RenderImageButton.
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Aug 2006 23:52:36 +0000 (23:52 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Aug 2006 23:52:36 +0000 (23:52 +0000)
        Reviewed by darin

        * WebCore.xcodeproj/project.pbxproj:
        * bridge/mac/WebCoreAXObject.mm:
        (-[WebCoreAXObject isImageButton]):
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::createRenderer):
        * rendering/RenderImage.h:
        (WebCore::RenderImage::isImage):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15839 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bridge/mac/WebCoreAXObject.mm
WebCore/html/HTMLInputElement.cpp
WebCore/rendering/RenderImage.h

index 47ff700af2e27c55f6c58ad8306f1b98f9e005f9..5a16172e384d25b701beb92579924de273b2dbaf 100644 (file)
@@ -1,3 +1,17 @@
+2006-08-11  David Hyatt  <hyatt@apple.com>
+
+        Eliminate RenderImageButton.
+
+        Reviewed by darin
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * bridge/mac/WebCoreAXObject.mm:
+        (-[WebCoreAXObject isImageButton]):
+        * html/HTMLInputElement.cpp:
+        (WebCore::HTMLInputElement::createRenderer):
+        * rendering/RenderImage.h:
+        (WebCore::RenderImage::isImage):
+
 2006-08-11  Adele Peterson  <adele@apple.com>
 
         Reviewed by Brady.
index 5aed34c6fba1fa033bc3ef9af38aec8342c260b4..17201c7a5d281c7ab42f98ab87c87a01ae56a798 100644 (file)
                A8EA73C90A1900E300A8EF5F /* RenderFormElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A8EA73B50A1900E300A8EF5F /* RenderFormElement.h */; };
                A8EA73CA0A1900E300A8EF5F /* RenderLegend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8EA73B60A1900E300A8EF5F /* RenderLegend.cpp */; };
                A8EA73CB0A1900E300A8EF5F /* RenderLabel.h in Headers */ = {isa = PBXBuildFile; fileRef = A8EA73B70A1900E300A8EF5F /* RenderLabel.h */; };
-               A8EA73CD0A1900E300A8EF5F /* RenderImageButton.h in Headers */ = {isa = PBXBuildFile; fileRef = A8EA73B90A1900E300A8EF5F /* RenderImageButton.h */; };
                A8EA73CE0A1900E300A8EF5F /* RenderTextArea.h in Headers */ = {isa = PBXBuildFile; fileRef = A8EA73BA0A1900E300A8EF5F /* RenderTextArea.h */; };
-               A8EA73CF0A1900E300A8EF5F /* RenderImageButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8EA73BB0A1900E300A8EF5F /* RenderImageButton.cpp */; };
                A8EA73D10A1900E300A8EF5F /* RenderLegend.h in Headers */ = {isa = PBXBuildFile; fileRef = A8EA73BD0A1900E300A8EF5F /* RenderLegend.h */; };
                A8EA73D20A1900E300A8EF5F /* RenderLineEdit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8EA73BE0A1900E300A8EF5F /* RenderLineEdit.cpp */; };
                A8EA73D30A1900E300A8EF5F /* RenderFormElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8EA73BF0A1900E300A8EF5F /* RenderFormElement.cpp */; };
                A8EA73B50A1900E300A8EF5F /* RenderFormElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RenderFormElement.h; sourceTree = "<group>"; };
                A8EA73B60A1900E300A8EF5F /* RenderLegend.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RenderLegend.cpp; sourceTree = "<group>"; };
                A8EA73B70A1900E300A8EF5F /* RenderLabel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RenderLabel.h; sourceTree = "<group>"; };
-               A8EA73B90A1900E300A8EF5F /* RenderImageButton.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RenderImageButton.h; sourceTree = "<group>"; };
                A8EA73BA0A1900E300A8EF5F /* RenderTextArea.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RenderTextArea.h; sourceTree = "<group>"; };
-               A8EA73BB0A1900E300A8EF5F /* RenderImageButton.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RenderImageButton.cpp; sourceTree = "<group>"; };
                A8EA73BD0A1900E300A8EF5F /* RenderLegend.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RenderLegend.h; sourceTree = "<group>"; };
                A8EA73BE0A1900E300A8EF5F /* RenderLineEdit.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RenderLineEdit.cpp; sourceTree = "<group>"; };
                A8EA73BF0A1900E300A8EF5F /* RenderFormElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RenderFormElement.cpp; sourceTree = "<group>"; };
                                BCEA482B097D93020094C9E4 /* RenderHTMLCanvas.h */,
                                BCEA4836097D93020094C9E4 /* RenderImage.cpp */,
                                BCEA4837097D93020094C9E4 /* RenderImage.h */,
-                               A8EA73BB0A1900E300A8EF5F /* RenderImageButton.cpp */,
-                               A8EA73B90A1900E300A8EF5F /* RenderImageButton.h */,
                                BCEA4838097D93020094C9E4 /* RenderInline.cpp */,
                                BCEA4839097D93020094C9E4 /* RenderInline.h */,
                                A8EA73C00A1900E300A8EF5F /* RenderLabel.cpp */,
                                A8EA73C70A1900E300A8EF5F /* RenderFileButton.h in Headers */,
                                A8EA73C90A1900E300A8EF5F /* RenderFormElement.h in Headers */,
                                A8EA73CB0A1900E300A8EF5F /* RenderLabel.h in Headers */,
-                               A8EA73CD0A1900E300A8EF5F /* RenderImageButton.h in Headers */,
                                A8EA73CE0A1900E300A8EF5F /* RenderTextArea.h in Headers */,
                                A8EA73D10A1900E300A8EF5F /* RenderLegend.h in Headers */,
                                A8EA79F10A1916DF00A8EF5F /* HTMLOListElement.h in Headers */,
                                A8EA73C60A1900E300A8EF5F /* RenderFileButton.cpp in Sources */,
                                A8EA73C80A1900E300A8EF5F /* RenderTextArea.cpp in Sources */,
                                A8EA73CA0A1900E300A8EF5F /* RenderLegend.cpp in Sources */,
-                               A8EA73CF0A1900E300A8EF5F /* RenderImageButton.cpp in Sources */,
                                A8EA73D20A1900E300A8EF5F /* RenderLineEdit.cpp in Sources */,
                                A8EA73D30A1900E300A8EF5F /* RenderFormElement.cpp in Sources */,
                                A8EA73D40A1900E300A8EF5F /* RenderLabel.cpp in Sources */,
index 87e7ec28849425ff9c72ea9afa8280d7df7dfeaf..9b72b76225f3a93cbb12b547c2cbe774d9c6feb3 100644 (file)
@@ -150,7 +150,7 @@ using namespace HTMLNames;
 
 -(BOOL)isImageButton
 {
-    return m_renderer->isImage() && static_cast<RenderImage*>(m_renderer)->isImageButton();
+    return m_renderer->isImage() && m_renderer->element() && m_renderer->element()->hasTagName(inputTag);
 }
 
 -(Element *)mouseButtonListener
index 967fb08bad6339994464be24063cbd6f132578dd..2263e4a31ddc2c9340f661df7b113e4cb7602a79 100644 (file)
@@ -43,7 +43,7 @@
 #include "MouseEvent.h"
 #include "RenderButton.h"
 #include "RenderFileButton.h"
-#include "RenderImageButton.h"
+#include "RenderImage.h"
 #include "RenderLineEdit.h"
 #include "RenderText.h"
 #include "RenderTextControl.h"
@@ -834,7 +834,7 @@ RenderObject *HTMLInputElement::createRenderer(RenderArena *arena, RenderStyle *
         case HIDDEN:
             break;
         case IMAGE:
-            return new (arena) RenderImageButton(this);
+            return new (arena) RenderImage(this);
         case ISINDEX:
         case PASSWORD:
         case SEARCH:
index c9abb9139a0f7aed7f3cb9e71cc5d5b7296a688a..29285dfdea858bd60331818dc047916eea26e2c8 100644 (file)
@@ -45,7 +45,6 @@ public:
     virtual const char* renderName() const { return "RenderImage"; }
 
     virtual bool isImage() const { return true; }
-    virtual bool isImageButton() const { return false; }
     
     virtual void paint(PaintInfo&, int tx, int ty);