Unreviewed, rolling out r99816.
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Nov 2011 08:17:27 +0000 (08:17 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Nov 2011 08:17:27 +0000 (08:17 +0000)
http://trac.webkit.org/changeset/99816
https://bugs.webkit.org/show_bug.cgi?id=72003

compilation failed on mac (Requested by loislo on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-11-10

Source/WebCore:

* html/HTMLAttributeNames.in:
* html/HTMLInputElement.idl:
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::appendFormData):
* html/HTMLTextAreaElement.idl:
* html/HTMLTextFormControlElement.cpp:
* html/HTMLTextFormControlElement.h:
* html/TextFieldInputType.cpp:
* html/TextFieldInputType.h:

LayoutTests:

* fast/forms/form-dirname-attribute-expected.txt: Removed.
* fast/forms/form-dirname-attribute.html: Removed.
* fast/forms/submit-form-with-dirname-attribute-expected.txt: Removed.
* fast/forms/submit-form-with-dirname-attribute-with-ancestor-dir-attribute-expected.txt: Removed.
* fast/forms/submit-form-with-dirname-attribute-with-ancestor-dir-attribute.html: Removed.
* fast/forms/submit-form-with-dirname-attribute-with-nonhtml-ancestor-expected.txt: Removed.
* fast/forms/submit-form-with-dirname-attribute-with-nonhtml-ancestor.html: Removed.
* fast/forms/submit-form-with-dirname-attribute.html: Removed.

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

18 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/forms/form-dirname-attribute-expected.txt [deleted file]
LayoutTests/fast/forms/form-dirname-attribute.html [deleted file]
LayoutTests/fast/forms/submit-form-with-dirname-attribute-expected.txt [deleted file]
LayoutTests/fast/forms/submit-form-with-dirname-attribute-with-ancestor-dir-attribute-expected.txt [deleted file]
LayoutTests/fast/forms/submit-form-with-dirname-attribute-with-ancestor-dir-attribute.html [deleted file]
LayoutTests/fast/forms/submit-form-with-dirname-attribute-with-nonhtml-ancestor-expected.txt [deleted file]
LayoutTests/fast/forms/submit-form-with-dirname-attribute-with-nonhtml-ancestor.html [deleted file]
LayoutTests/fast/forms/submit-form-with-dirname-attribute.html [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLAttributeNames.in
Source/WebCore/html/HTMLInputElement.idl
Source/WebCore/html/HTMLTextAreaElement.cpp
Source/WebCore/html/HTMLTextAreaElement.idl
Source/WebCore/html/HTMLTextFormControlElement.cpp
Source/WebCore/html/HTMLTextFormControlElement.h
Source/WebCore/html/TextFieldInputType.cpp
Source/WebCore/html/TextFieldInputType.h

index 7547a0257b58ef505d09c86065096141d39a2338..91ef4beafa371a90320ba2dda93bfa8f07a1c5c8 100644 (file)
@@ -1,3 +1,20 @@
+2011-11-10  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r99816.
+        http://trac.webkit.org/changeset/99816
+        https://bugs.webkit.org/show_bug.cgi?id=72003
+
+        compilation failed on mac (Requested by loislo on #webkit).
+
+        * fast/forms/form-dirname-attribute-expected.txt: Removed.
+        * fast/forms/form-dirname-attribute.html: Removed.
+        * fast/forms/submit-form-with-dirname-attribute-expected.txt: Removed.
+        * fast/forms/submit-form-with-dirname-attribute-with-ancestor-dir-attribute-expected.txt: Removed.
+        * fast/forms/submit-form-with-dirname-attribute-with-ancestor-dir-attribute.html: Removed.
+        * fast/forms/submit-form-with-dirname-attribute-with-nonhtml-ancestor-expected.txt: Removed.
+        * fast/forms/submit-form-with-dirname-attribute-with-nonhtml-ancestor.html: Removed.
+        * fast/forms/submit-form-with-dirname-attribute.html: Removed.
+
 2011-11-10  Yuta Kitamura  <yutak@chromium.org>
 
         [Chromium] Unreviewed, rebaseline SVG test results changed after r99539. (part 1)
diff --git a/LayoutTests/fast/forms/form-dirname-attribute-expected.txt b/LayoutTests/fast/forms/form-dirname-attribute-expected.txt
deleted file mode 100644 (file)
index 061f01d..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-"dirname" attribute
-
-PASS input.dirName is "Hello"
-PASS textArea.dirName is "Hello"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/forms/form-dirname-attribute.html b/LayoutTests/fast/forms/form-dirname-attribute.html
deleted file mode 100644 (file)
index 6fafc3b..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<link rel="stylesheet" href="../js/resources/js-test-style.css">
-<script src="../js/resources/js-test-pre.js"> </script>
-</head>
-<body>
-<p>"dirname" attribute</p>
-<pre id="console"></pre>
-<script>
-var input = document.createElement('input');
-input.setAttribute('dirName', "Hello");
-shouldBeEqualToString('input.dirName', "Hello");
-
-var textArea = document.createElement('textarea');
-textArea.setAttribute('dirName', "Hello");
-shouldBeEqualToString('textArea.dirName', "Hello");
-successfullyParsed = true;
-</script>
-<script src="../js/resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/submit-form-with-dirname-attribute-expected.txt b/LayoutTests/fast/forms/submit-form-with-dirname-attribute-expected.txt
deleted file mode 100644 (file)
index 9f9eee9..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-Test that when dirname attribute is specified then it is added in submission body.
-
-Comment: 
-
-WithRTLDir: 
-
-WithLTRDir: 
-
-WithInvalidDir: 
-
-WithRTLValue: 
-
-Post Comment
-
-PASS document.location.search.indexOf("comment.dir=ltr") != -1 is true
-PASS document.location.search.indexOf("txtareaRTL.dir=rtl") != -1 is true
-PASS document.location.search.indexOf("txtareaLTR.dir=ltr") != -1 is true
-PASS document.location.search.indexOf("txtareaInvalid.dir=ltr") != -1 is true
-PASS document.location.search.indexOf("inputRTLvalue.dir=ltr") != -1 is true
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/forms/submit-form-with-dirname-attribute-with-ancestor-dir-attribute-expected.txt b/LayoutTests/fast/forms/submit-form-with-dirname-attribute-with-ancestor-dir-attribute-expected.txt
deleted file mode 100644 (file)
index 21042a1..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Test that when dirname attribute is specified then it is added in submission body.
-
-
-
-Post Comment
-
-Hello
-PASS document.location.search.indexOf("rtlAncestor.dir=rtl") != -1 is true
-PASS document.location.search.indexOf("autoAncestor.dir=ltr") != -1 is true
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/forms/submit-form-with-dirname-attribute-with-ancestor-dir-attribute.html b/LayoutTests/fast/forms/submit-form-with-dirname-attribute-with-ancestor-dir-attribute.html
deleted file mode 100644 (file)
index ccf3f96..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<html>
-<head>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8">
-</head>
-<script src="../js/resources/js-test-pre.js"> </script>
-<script>
-window.jsTestIsAsync = true;
-
-function test() {
-    document.forms.f.submit();
-}
-</script>
-<body onload="test()">
-<p>Test that when dirname attribute is specified then it is added in submission body.</p>
-
-<div dir="auto">
-    <form action="#action" method="GET" name="f">
-        <div dir="rtl"> 
-            <input type=text name="comment" dirname="rtlAncestor.dir" required>
-        </div>
-        <input type=text name="autoAncestor" dirname="autoAncestor.dir" value="שלום">
-        <p><button name="mode" type=submit value="add">Post Comment</button></p>
-    </form>
-Hello
-</div>
-
-<div id="console"></div>
-<div id="action">
-<script>
-if (document.location.href.match('\\?')) {
-    shouldBeTrue('document.location.search.indexOf("rtlAncestor.dir=rtl") != -1');
-    shouldBeTrue('document.location.search.indexOf("autoAncestor.dir=ltr") != -1');
-    finishJSTest();
-}
-
-successfullyParsed = true;
-</script>
-</div>
-<script src="../js/resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/submit-form-with-dirname-attribute-with-nonhtml-ancestor-expected.txt b/LayoutTests/fast/forms/submit-form-with-dirname-attribute-with-nonhtml-ancestor-expected.txt
deleted file mode 100644 (file)
index ad1d417..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-Test that when dir attribute is specified for non html element, it is not considered for dirname attribute value in submission body.
-
-
-Post Comment
-
-PASS document.location.search.indexOf("nonHtmlAncestor.dir=ltr") != -1 is true
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/forms/submit-form-with-dirname-attribute-with-nonhtml-ancestor.html b/LayoutTests/fast/forms/submit-form-with-dirname-attribute-with-nonhtml-ancestor.html
deleted file mode 100644 (file)
index 90a8048..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<html>
-<head>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8">
-</head>
-<script src="../js/resources/js-test-pre.js"> </script>
-<script>
-window.jsTestIsAsync = true;
-
-function test() {
-    document.forms.f.submit();
-}
-</script>
-<body onload="test()">
-<p>Test that when dir attribute is specified for non html element, it is not considered for dirname attribute value in submission body.</p>
-<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 400 400" dir="rtl">
-    <div>
-    <form action="#action" method="GET" name="f">
-        <input type=text name="nonHtmlAncestor" dirname="nonHtmlAncestor.dir"> 
-        <p><button name="mode" type=submit value="add">Post Comment</button></p>
-    </form>
-    </div>
-</svg>
-<div id="console"></div>
-<div id="action">
-<script>
-if (document.location.href.match('\\?')) {
-    shouldBeTrue('document.location.search.indexOf("nonHtmlAncestor.dir=ltr") != -1');
-    finishJSTest();
-}
-
-successfullyParsed = true;
-</script>
-</div>
-<script src="../js/resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/submit-form-with-dirname-attribute.html b/LayoutTests/fast/forms/submit-form-with-dirname-attribute.html
deleted file mode 100644 (file)
index 472fda1..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<html>
-<head>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8">
-</head>
-<script src="../js/resources/js-test-pre.js"> </script>
-<script>
-window.jsTestIsAsync = true;
-
-function test() {
-    document.forms.f.submit();
-}
-</script>
-<body onload="test()">
-<p>Test that when dirname attribute is specified then it is added in submission body.</p>
-
-<form action="#action" name="f">
-    <p><label>Comment: <input type=text name="comment" dirname="comment.dir" required></label></p>
-    <p><label>WithRTLDir: <textarea name="txtarea" dir="rtl" dirname="txtareaRTL.dir"></textarea></label></p>
-    <p><label>WithLTRDir: <textarea name="txtarea1" dir="ltr" dirname="txtareaLTR.dir"></textarea></label></p>
-    <p><label>WithInvalidDir: <textarea name="txtarea2" dir="invalid" dirname="txtareaInvalid.dir"></textarea></label></p>
-    <p><label>WithRTLValue: <input name="input" dirname="inputRTLvalue.dir" value="مرحبًا"></label></p>
-    <p><button name="mode" type=submit value="add">Post Comment</button></p>
-</form>
-
-<div id="console"></div>
-<div id="action">
-<script>
-if (document.location.href.match('\\?')) {
-    shouldBeTrue('document.location.search.indexOf("comment.dir=ltr") != -1');
-    shouldBeTrue('document.location.search.indexOf("txtareaRTL.dir=rtl") != -1');
-    shouldBeTrue('document.location.search.indexOf("txtareaLTR.dir=ltr") != -1');
-    shouldBeTrue('document.location.search.indexOf("txtareaInvalid.dir=ltr") != -1');
-    shouldBeTrue('document.location.search.indexOf("inputRTLvalue.dir=ltr") != -1');
-    finishJSTest();
-}
-
-successfullyParsed = true;
-</script>
-</div>
-<script src="../js/resources/js-test-post.js"></script>
-</body>
-</html>
index 85811991ff59dd20727e7bd8cfb087ac5d104e90..ee52a56f0b5cbc85bfe2532279143d0cb79f0805 100755 (executable)
@@ -1,3 +1,21 @@
+2011-11-10  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r99816.
+        http://trac.webkit.org/changeset/99816
+        https://bugs.webkit.org/show_bug.cgi?id=72003
+
+        compilation failed on mac (Requested by loislo on #webkit).
+
+        * html/HTMLAttributeNames.in:
+        * html/HTMLInputElement.idl:
+        * html/HTMLTextAreaElement.cpp:
+        (WebCore::HTMLTextAreaElement::appendFormData):
+        * html/HTMLTextAreaElement.idl:
+        * html/HTMLTextFormControlElement.cpp:
+        * html/HTMLTextFormControlElement.h:
+        * html/TextFieldInputType.cpp:
+        * html/TextFieldInputType.h:
+
 2011-11-09  Pavel Feldman  <pfeldman@google.com>
 
         Web Inspector: console does not work after switching panel while editing.
index 3c1fbb3cbde95d8a9afdf10b92fe6db1bb9101d6..f1e354b631f49ba3ac101e5513d275ac5d2d0982 100644 (file)
@@ -90,7 +90,6 @@ default
 defer
 dir
 direction
-dirname
 disabled
 download
 draggable
index c222d4c67074f42c6808be746e09dd9d639f9f39..d3a1ed7bf7ae6dc20a60e343abdd16a99451d0f6 100644 (file)
@@ -23,7 +23,6 @@ module html {
     interface HTMLInputElement : HTMLElement {
         attribute [ConvertNullToNullString] DOMString defaultValue;
         attribute [Reflect=checked] boolean defaultChecked;
-        attribute [Reflect] DOMString dirName;
         readonly attribute HTMLFormElement form;
         attribute [Reflect, URL] DOMString formAction;
         attribute [ConvertNullToNullString] DOMString formEnctype;
index cab0ec3d93d2e9494af5e552eb8a8d2963d64783..e312330180498c601c1e433b39e04ab9c2a57e3b 100644 (file)
@@ -173,11 +173,7 @@ bool HTMLTextAreaElement::appendFormData(FormDataList& encoding, bool)
 
     const String& text = (m_wrap == HardWrap) ? valueWithHardLineBreaks() : value();
     encoding.appendData(name(), text);
-
-    const AtomicString& dirnameAttrValue = fastGetAttribute(dirnameAttr);
-    if (!dirnameAttrValue.isNull())
-        encoding.appendData(dirnameAttrValue, directionForFormData());
-    return true;    
+    return true;
 }
 
 void HTMLTextAreaElement::reset()
index 28a1beb02c50b90422eced7172b05c88329d51c9..8031d24baffcc508e0488834a085c9b7df060f2e 100644 (file)
@@ -27,7 +27,6 @@ module html {
         readonly attribute ValidityState validity;
         attribute [Reflect] DOMString accessKey;
         attribute long cols;
-        attribute [Reflect] DOMString dirName;
         attribute [Reflect] boolean disabled;
         attribute [Reflect] boolean autofocus;
         attribute long maxLength setter raises(DOMException);
index 200b185b5ef4bc0102f89a22d5fcf18724393a6f..bf443caa55d2176e8ad75901e6ecbf437bebc48d 100644 (file)
@@ -570,34 +570,4 @@ HTMLTextFormControlElement* enclosingTextFormControl(const Position& position)
     return ancestor != container ? toTextFormControl(ancestor) : 0;
 }
 
-const Element* parentHTMLElement(const Element* element)
-{
-    while (element) {
-        element = element->parentElement();
-        if (element && element->isHTMLElement())
-            return element;
-    }
-    return 0;
-}
-
-String HTMLTextFormControlElement::directionForFormData() const
-{
-    for (const Element* element = this; element; element = parentHTMLElement(element)) {
-        const AtomicString& dirAttributeValue = element->fastGetAttribute(dirAttr);
-        if (dirAttributeValue.isNull())
-            continue;
-
-        if (equalIgnoringCase(dirAttributeValue, "rtl") || equalIgnoringCase(dirAttributeValue, "ltr"))
-            return dirAttributeValue;
-
-        if (equalIgnoringCase(dirAttributeValue, "auto")) {
-            bool isAuto;
-            TextDirection textDirection = static_cast<const HTMLElement*>(element)->directionalityIfhasDirAutoAttribute(isAuto);
-            return textDirection == RTL ? "rtl" : "ltr";
-        }
-    }
-
-    return "ltr";
-}
-
 } // namespace Webcore
index ca21232d600c3a8adc99ce1bd6a471ed4e1b30b6..30794d0c987c943fc5711997465c4a4310226d6a 100644 (file)
@@ -79,8 +79,6 @@ public:
     void setInnerTextValue(const String&);
     String innerTextValue() const;
 
-    String directionForFormData() const;
-
 protected:
     HTMLTextFormControlElement(const QualifiedName&, Document*, HTMLFormElement*);
     virtual void updatePlaceholderText() = 0;
index 7daffd34e8813d35e8010567bdb63d6a1c0b1a15..c43eabcd1d84bd26bf38a15ff2066124023fc777 100644 (file)
 #include "TextFieldInputType.h"
 
 #include "BeforeTextInsertedEvent.h"
-#include "FormDataList.h"
 #include "Frame.h"
 #include "HTMLInputElement.h"
-#include "HTMLNames.h"
 #include "KeyboardEvent.h"
 #include "Page.h"
 #include "RenderLayer.h"
@@ -51,8 +49,6 @@
 
 namespace WebCore {
 
-using namespace HTMLNames;
-
 TextFieldInputType::TextFieldInputType(HTMLInputElement* element)
     : InputType(element)
 {
@@ -368,13 +364,4 @@ void TextFieldInputType::updatePlaceholderText()
     ASSERT(!ec);
 }
 
-bool TextFieldInputType::appendFormData(FormDataList& list, bool multipart) const
-{
-    InputType::appendFormData(list, multipart);
-    const AtomicString& dirnameAttrValue = element()->fastGetAttribute(dirnameAttr);
-    if (!dirnameAttrValue.isNull())
-        list.appendData(dirnameAttrValue, element()->directionForFormData());
-    return true;
-}
-
 } // namespace WebCore
index d753831696d6dc6fac5d84be5fb3a13f430dcc10..456673a88489527508e233bc53583e85c4f09f32 100644 (file)
@@ -35,7 +35,6 @@
 
 namespace WebCore {
 
-class FormDataList; 
 class SpinButtonElement;
 
 // The class represents types of which UI contain text fields.
@@ -78,7 +77,6 @@ private:
     virtual bool shouldRespectListAttribute();
     virtual HTMLElement* placeholderElement() const;
     virtual void updatePlaceholderText();
-    virtual bool appendFormData(FormDataList&, bool multipart) const;
 
     RefPtr<HTMLElement> m_container;
     RefPtr<HTMLElement> m_innerBlock;