Remove more cruft now that HTMLIsIndexElement is gone
authoreric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Feb 2012 05:06:36 +0000 (05:06 +0000)
committereric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Feb 2012 05:06:36 +0000 (05:06 +0000)
https://bugs.webkit.org/show_bug.cgi?id=77887

Reviewed by Darin Adler.

Just removing dead code, thus no tests.
There is likely more to remove after this.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLInputElement.cpp:
* html/HTMLInputElement.h:
(HTMLInputElement):
* html/InputType.cpp:
(WebCore::createInputTypeFactoryMap):
* html/InputType.h:
(InputTypeNames):
* html/IsIndexInputType.cpp: Removed.
* html/IsIndexInputType.h: Removed.
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::isContentEditable):

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

16 files changed:
LayoutTests/fast/forms/input-type-change3-expected.txt
LayoutTests/fast/forms/script-tests/input-type-change3.js
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Target.pri
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLInputElement.h
Source/WebCore/html/InputType.cpp
Source/WebCore/html/InputType.h
Source/WebCore/html/IsIndexInputType.cpp [deleted file]
Source/WebCore/html/IsIndexInputType.h [deleted file]
Source/WebCore/rendering/HitTestResult.cpp

index e355037..2321453 100644 (file)
@@ -18,7 +18,6 @@ PASS input.type for "file" is correctly "email".
 PASS input.type for "hidden" is correctly "hidden".
 PASS input.type for "image" is correctly "image".
 PASS input.type for "isindex" is correctly "text".
-PASS input.type for "khtml_isindex" is correctly "".
 PASS input.type for "number" is correctly "number".
 PASS input.type for "password" is correctly "password".
 PASS input.type for "passwd" is correctly "text".
index 2bf014c..3af6469 100644 (file)
@@ -32,7 +32,6 @@ check("file", "email"); // We can't change a concrete type to file for a securit
 check("hidden", "hidden");
 check("image", "image");
 check("isindex", "text");
-check("khtml_isindex", "");
 check("number", "number");
 check("password", "password");
 check("passwd", "text");
index 110f87b..8f1099e 100644 (file)
@@ -808,7 +808,6 @@ SET(WebCore_SOURCES
     html/ImageDocument.cpp
     html/ImageInputType.cpp
     html/InputType.cpp
-    html/IsIndexInputType.cpp
     html/LabelsNodeList.cpp
     html/LinkRelAttribute.cpp
     html/MediaController.cpp
index 6ec5a25..51c5a79 100644 (file)
@@ -1,3 +1,31 @@
+2012-02-08  Eric Seidel  <eric@webkit.org>
+
+        Remove more cruft now that HTMLIsIndexElement is gone
+        https://bugs.webkit.org/show_bug.cgi?id=77887
+
+        Reviewed by Darin Adler.
+
+        Just removing dead code, thus no tests.
+        There is likely more to remove after this.
+
+        * CMakeLists.txt:
+        * GNUmakefile.list.am:
+        * Target.pri:
+        * WebCore.gypi:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * html/HTMLInputElement.cpp:
+        * html/HTMLInputElement.h:
+        (HTMLInputElement):
+        * html/InputType.cpp:
+        (WebCore::createInputTypeFactoryMap):
+        * html/InputType.h:
+        (InputTypeNames):
+        * html/IsIndexInputType.cpp: Removed.
+        * html/IsIndexInputType.h: Removed.
+        * rendering/HitTestResult.cpp:
+        (WebCore::HitTestResult::isContentEditable):
+
 2012-02-08  Andreas Kling  <awesomekling@apple.com>
 
         Increased style sharing for elements with presentation attributes.
index ad9e2f6..c08cb25 100644 (file)
@@ -2168,8 +2168,6 @@ webcore_sources += \
        Source/WebCore/html/ImageInputType.h \
        Source/WebCore/html/InputType.cpp \
        Source/WebCore/html/InputType.h \
-       Source/WebCore/html/IsIndexInputType.cpp \
-       Source/WebCore/html/IsIndexInputType.h \
        Source/WebCore/html/LabelsNodeList.cpp \
        Source/WebCore/html/LabelsNodeList.h \
        Source/WebCore/html/LinkRelAttribute.cpp \
index af1eb58..758dd4b 100644 (file)
@@ -791,7 +791,6 @@ SOURCES += \
     html/ImageDocument.cpp \
     html/ImageInputType.cpp \
     html/InputType.cpp \
-    html/IsIndexInputType.cpp \
     html/LabelsNodeList.cpp \
     html/LinkRelAttribute.cpp \
     html/MediaDocument.cpp \
index 3ab9331..e4a5227 100644 (file)
             'html/ImageInputType.cpp',
             'html/ImageInputType.h',
             'html/InputType.cpp',
-            'html/IsIndexInputType.cpp',
-            'html/IsIndexInputType.h',
             'html/LabelsNodeList.cpp',
             'html/LabelsNodeList.h',
             'html/LinkRelAttribute.cpp',
index fc4a218..59c667e 100755 (executable)
                                >
                        </File>
                        <File
-                               RelativePath="..\html\IsIndexInputType.cpp"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\html\IsIndexInputType.h"
-                               >
-                       </File>
-                       <File
                                RelativePath="..\html\LabelsNodeList.cpp"
                                >
                        </File>
index 96544e5..0d1c494 100644 (file)
                F55B3DC01251F12D003EF269 /* HiddenInputType.h in Headers */ = {isa = PBXBuildFile; fileRef = F55B3D8C1251F12D003EF269 /* HiddenInputType.h */; };
                F55B3DC11251F12D003EF269 /* ImageInputType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55B3D8D1251F12D003EF269 /* ImageInputType.cpp */; };
                F55B3DC21251F12D003EF269 /* ImageInputType.h in Headers */ = {isa = PBXBuildFile; fileRef = F55B3D8E1251F12D003EF269 /* ImageInputType.h */; };
-               F55B3DC31251F12D003EF269 /* IsIndexInputType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55B3D8F1251F12D003EF269 /* IsIndexInputType.cpp */; };
-               F55B3DC41251F12D003EF269 /* IsIndexInputType.h in Headers */ = {isa = PBXBuildFile; fileRef = F55B3D901251F12D003EF269 /* IsIndexInputType.h */; };
                F55B3DC51251F12D003EF269 /* MonthInputType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55B3D911251F12D003EF269 /* MonthInputType.cpp */; };
                F55B3DC61251F12D003EF269 /* MonthInputType.h in Headers */ = {isa = PBXBuildFile; fileRef = F55B3D921251F12D003EF269 /* MonthInputType.h */; };
                F55B3DC71251F12D003EF269 /* NumberInputType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55B3D931251F12D003EF269 /* NumberInputType.cpp */; };
                F55B3D8C1251F12D003EF269 /* HiddenInputType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HiddenInputType.h; sourceTree = "<group>"; };
                F55B3D8D1251F12D003EF269 /* ImageInputType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageInputType.cpp; sourceTree = "<group>"; };
                F55B3D8E1251F12D003EF269 /* ImageInputType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageInputType.h; sourceTree = "<group>"; };
-               F55B3D8F1251F12D003EF269 /* IsIndexInputType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IsIndexInputType.cpp; sourceTree = "<group>"; };
-               F55B3D901251F12D003EF269 /* IsIndexInputType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IsIndexInputType.h; sourceTree = "<group>"; };
                F55B3D911251F12D003EF269 /* MonthInputType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MonthInputType.cpp; sourceTree = "<group>"; };
                F55B3D921251F12D003EF269 /* MonthInputType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MonthInputType.h; sourceTree = "<group>"; };
                F55B3D931251F12D003EF269 /* NumberInputType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NumberInputType.cpp; sourceTree = "<group>"; };
                                F55B3D8E1251F12D003EF269 /* ImageInputType.h */,
                                37E3524A12450C5200BAF5D9 /* InputType.cpp */,
                                37E3524C12450C6600BAF5D9 /* InputType.h */,
-                               F55B3D8F1251F12D003EF269 /* IsIndexInputType.cpp */,
-                               F55B3D901251F12D003EF269 /* IsIndexInputType.h */,
                                A456FA2411AD4A830020B420 /* LabelsNodeList.cpp */,
                                A456FA2511AD4A830020B420 /* LabelsNodeList.h */,
                                985BB96B13A94058007A0B69 /* LinkRelAttribute.cpp */,
                                E134F5AB12EE343F004EC58D /* IntRectHash.h in Headers */,
                                B27535750B053814002CE64F /* IntSize.h in Headers */,
                                B27535760B053814002CE64F /* IntSizeHash.h in Headers */,
-                               F55B3DC41251F12D003EF269 /* IsIndexInputType.h in Headers */,
                                598D77DF132541FA00761B22 /* JavaArrayJSC.h in Headers */,
                                59E560A71105336600AA1258 /* JavaClassJSC.h in Headers */,
                                598D77E31325420E00761B22 /* JavaFieldJSC.h in Headers */,
                                B275357D0B053814002CE64F /* IntRectMac.mm in Sources */,
                                B27535620B053814002CE64F /* IntSizeCG.cpp in Sources */,
                                B275357E0B053814002CE64F /* IntSizeMac.mm in Sources */,
-                               F55B3DC31251F12D003EF269 /* IsIndexInputType.cpp in Sources */,
                                598D77DD132541EE00761B22 /* JavaArrayJSC.cpp in Sources */,
                                59E560A91105336F00AA1258 /* JavaClassJSC.cpp in Sources */,
                                598D77E11325420400761B22 /* JavaFieldJSC.cpp in Sources */,
index fceaa33..960040f 100644 (file)
@@ -1243,13 +1243,6 @@ void HTMLInputElement::setDefaultValue(const String &value)
     setAttribute(valueAttr, value);
 }
 
-void HTMLInputElement::setInitialName(const AtomicString& name)
-{
-    ASSERT(hasTagName(isindexTag));
-    ASSERT(m_name.isNull());
-    m_name = name;
-}
-
 static inline bool isRFC2616TokenCharacter(UChar ch)
 {
     return isASCII(ch) && ch > ' ' && ch != '"' && ch != '(' && ch != ')' && ch != ',' && ch != '/' && (ch < ':' || ch > '@') && (ch < '[' || ch > ']') && ch != '{' && ch != '}' && ch != 0x7f;
index da2af44..b6fa0f6 100644 (file)
@@ -241,7 +241,6 @@ public:
 protected:
     HTMLInputElement(const QualifiedName&, Document*, HTMLFormElement*, bool createdByParser);
     void createShadowSubtree();
-    void setInitialName(const AtomicString&);
     virtual void defaultEventHandler(Event*);
 
 private:
index 979fbf8..f34e6eb 100644 (file)
@@ -43,7 +43,6 @@
 #include "HTMLInputElement.h"
 #include "HiddenInputType.h"
 #include "ImageInputType.h"
-#include "IsIndexInputType.h"
 #include "KeyboardEvent.h"
 #include "LocalizedStrings.h"
 #include "MonthInputType.h"
@@ -96,7 +95,6 @@ static PassOwnPtr<InputTypeFactoryMap> createInputTypeFactoryMap()
     map->add(InputTypeNames::file(), FileInputType::create);
     map->add(InputTypeNames::hidden(), HiddenInputType::create);
     map->add(InputTypeNames::image(), ImageInputType::create);
-    map->add(InputTypeNames::isindex(), IsIndexInputType::create);
 #if ENABLE(INPUT_TYPE_MONTH)
     map->add(InputTypeNames::month(), MonthInputType::create);
 #endif
@@ -803,12 +801,6 @@ const AtomicString& image()
     return name;
 }
 
-const AtomicString& isindex()
-{
-    DEFINE_STATIC_LOCAL(AtomicString, name, ("khtml_isindex"));
-    return name;
-}
-
 const AtomicString& month()
 {
     DEFINE_STATIC_LOCAL(AtomicString, name, ("month"));
index f603027..c76aacc 100644 (file)
@@ -292,7 +292,6 @@ const AtomicString& email();
 const AtomicString& file();
 const AtomicString& hidden();
 const AtomicString& image();
-const AtomicString& isindex();
 const AtomicString& month();
 const AtomicString& number();
 const AtomicString& password();
diff --git a/Source/WebCore/html/IsIndexInputType.cpp b/Source/WebCore/html/IsIndexInputType.cpp
deleted file mode 100644 (file)
index a275f28..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "IsIndexInputType.h"
-
-#include "Document.h"
-#include "HTMLFormElement.h"
-#include "HTMLInputElement.h"
-#include <wtf/PassOwnPtr.h>
-
-namespace WebCore {
-
-PassOwnPtr<InputType> IsIndexInputType::create(HTMLInputElement* element)
-{
-    return adoptPtr(new IsIndexInputType(element));
-}
-
-const AtomicString& IsIndexInputType::formControlType() const
-{
-    return emptyAtom;
-}
-
-bool IsIndexInputType::supportsRequired() const
-{
-    return false;
-}
-
-PassRefPtr<HTMLFormElement> IsIndexInputType::formForSubmission() const
-{
-    RefPtr<HTMLFormElement> form = InputType::formForSubmission();
-    if (form)
-        return form.release();
-    // If there is no form, then create a temporary form just to be used for submission.
-    Document* document = element()->document();
-    form = HTMLFormElement::create(document);
-    form->registerFormElement(element());
-    form->setMethod("GET");
-    if (!document->baseURL().isEmpty()) {
-        // We treat the href property of the <base> element as the form action, as per section 7.5
-        // "Queries and Indexes" of the HTML 2.0 spec. <http://www.w3.org/MarkUp/html-spec/html-spec_7.html#SEC7.5>.
-        form->setAction(document->baseURL().string());
-    }
-    return form.release();
-}
-
-bool IsIndexInputType::shouldRespectListAttribute()
-{
-    return false;
-}
-
-} // namespace WebCore
diff --git a/Source/WebCore/html/IsIndexInputType.h b/Source/WebCore/html/IsIndexInputType.h
deleted file mode 100644 (file)
index 2cf702f..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef IsIndexInputType_h
-#define IsIndexInputType_h
-
-#include "TextFieldInputType.h"
-#include <wtf/text/AtomicString.h>
-
-namespace WebCore {
-
-class IsIndexInputType : public TextFieldInputType {
-public:
-    static PassOwnPtr<InputType> create(HTMLInputElement*);
-
-private:
-    IsIndexInputType(HTMLInputElement* element) : TextFieldInputType(element) { };
-    virtual const AtomicString& formControlType() const OVERRIDE;
-    virtual bool supportsRequired() const OVERRIDE;
-    virtual PassRefPtr<HTMLFormElement> formForSubmission() const OVERRIDE;
-    virtual bool shouldRespectListAttribute() OVERRIDE;
-};
-
-} // namespace WebCore
-
-#endif // IsIndexInputType_h
index 2292a88..dc987c8 100644 (file)
@@ -552,7 +552,7 @@ bool HitTestResult::isContentEditable() const
     if (!m_innerNonSharedNode)
         return false;
 
-    if (m_innerNonSharedNode->hasTagName(textareaTag) || m_innerNonSharedNode->hasTagName(isindexTag))
+    if (m_innerNonSharedNode->hasTagName(textareaTag))
         return true;
 
     if (m_innerNonSharedNode->hasTagName(inputTag))