Title: [96096] trunk
Revision
96096
Author
[email protected]
Date
2011-09-27 04:20:34 -0700 (Tue, 27 Sep 2011)

Log Message

wrap attribute of textarea element cannot be accessed by _javascript_.
https://bugs.webkit.org/show_bug.cgi?id=68592

Patch by Vineet Chaudhary <[email protected]> on 2011-09-27
Reviewed by Kent Tamura.

Source/WebCore:

Added JS interface for wrap attribute to HTMLTextAreaElement.idl.

Test: fast/forms/textarea-wrap-attribute.html

* html/HTMLTextAreaElement.idl:

LayoutTests:

Added test cases to check accessibility to wrap attribute by JS.

* fast/forms/textarea-wrap-attribute-expected.txt: Added.
* fast/forms/textarea-wrap-attribute.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (96095 => 96096)


--- trunk/LayoutTests/ChangeLog	2011-09-27 10:43:19 UTC (rev 96095)
+++ trunk/LayoutTests/ChangeLog	2011-09-27 11:20:34 UTC (rev 96096)
@@ -1,3 +1,15 @@
+2011-09-27  Vineet Chaudhary  <[email protected]>
+
+        wrap attribute of textarea element cannot be accessed by _javascript_.
+        https://bugs.webkit.org/show_bug.cgi?id=68592
+
+        Reviewed by Kent Tamura.
+
+        Added test cases to check accessibility to wrap attribute by JS.
+
+        * fast/forms/textarea-wrap-attribute-expected.txt: Added.
+        * fast/forms/textarea-wrap-attribute.html: Added.
+
 2011-09-27  Shinichiro Hamaji  <[email protected]>
 
         [Chromium] Layout Test fast compositing/geometry/limit-layer-bounds-transformed-overflow.html is failing

Added: trunk/LayoutTests/fast/forms/textarea-wrap-attribute-expected.txt (0 => 96096)


--- trunk/LayoutTests/fast/forms/textarea-wrap-attribute-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/textarea-wrap-attribute-expected.txt	2011-09-27 11:20:34 UTC (rev 96096)
@@ -0,0 +1,25 @@
+HTMLTextAreaElement.wrap reflects the wrap="" attribute.
+It is not "limited to only known values", and it is a DOMString attribute which means it just returns the content attributes's value directly.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+If wrap attribute is not specified it sould be empty String.
+PASS textArea.wrap is ''
+
+Check if it sets warpAttr value hard, should return hard.
+PASS textArea.wrap is 'hard'
+
+Check if it sets warpAttr value as soft, should return soft.
+PASS textArea.wrap is 'soft'
+
+Check if warpAttr present but no keyVal specified, should return empty String.
+PASS textArea.wrap is ''
+
+Check if it sets warpAttr invaild value, should return foo.
+PASS textArea.wrap is 'foo'
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/forms/textarea-wrap-attribute.html (0 => 96096)


--- trunk/LayoutTests/fast/forms/textarea-wrap-attribute.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/textarea-wrap-attribute.html	2011-09-27 11:20:34 UTC (rev 96096)
@@ -0,0 +1,49 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<link rel="stylesheet" href=""
+<script src=""
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+description('HTMLTextAreaElement.wrap reflects the wrap="" attribute.<br>It is not "limited to only known values", and it is a DOMString attribute which means it just returns the content attributes\'s value directly.');
+
+
+var textArea = document.createElement('textarea');
+document.body.appendChild(textArea);
+
+debug('If wrap attribute is not specified it sould be empty String.');
+shouldBe('textArea.wrap', "''");
+
+debug('');
+debug('Check if it sets warpAttr value hard, should return hard.');
+textArea.wrap = "hard";
+shouldBe('textArea.wrap', "'hard'");
+
+debug('');
+debug('Check if it sets warpAttr value as soft, should return soft.');
+textArea.wrap = "soft";
+shouldBe('textArea.wrap', "'soft'");
+
+debug('');
+debug('Check if warpAttr present but no keyVal specified, should return empty String.');
+textArea.wrap = "";
+shouldBe('textArea.wrap', "''");
+
+debug('');
+debug('Check if it sets warpAttr invaild value, should return foo.');
+textArea.wrap = "foo";
+shouldBe('textArea.wrap', "'foo'");
+
+debug('');
+var successfullyParsed = true;
+</script>
+<script src=""
+</body>
+</html>
+
+
+
+

Modified: trunk/Source/WebCore/ChangeLog (96095 => 96096)


--- trunk/Source/WebCore/ChangeLog	2011-09-27 10:43:19 UTC (rev 96095)
+++ trunk/Source/WebCore/ChangeLog	2011-09-27 11:20:34 UTC (rev 96096)
@@ -1,3 +1,16 @@
+2011-09-27  Vineet Chaudhary  <[email protected]>
+
+        wrap attribute of textarea element cannot be accessed by _javascript_.
+        https://bugs.webkit.org/show_bug.cgi?id=68592
+
+        Reviewed by Kent Tamura.
+
+        Added JS interface for wrap attribute to HTMLTextAreaElement.idl.
+
+        Test: fast/forms/textarea-wrap-attribute.html
+
+        * html/HTMLTextAreaElement.idl:
+
 2011-09-27  Xan Lopez  <[email protected]>
 
         [GTK] Add compatibility methods for DOM bindings

Modified: trunk/Source/WebCore/html/HTMLTextAreaElement.idl (96095 => 96096)


--- trunk/Source/WebCore/html/HTMLTextAreaElement.idl	2011-09-27 10:43:19 UTC (rev 96095)
+++ trunk/Source/WebCore/html/HTMLTextAreaElement.idl	2011-09-27 11:20:34 UTC (rev 96096)
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
  * Copyright (C) 2006 Samuel Weinig <[email protected]>
+ * Copyright (C) 2011 Motorola Mobility, Inc. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -34,6 +35,7 @@
         attribute [Reflect] boolean readOnly;
         attribute [Reflect] boolean required;
         attribute long rows;
+        attribute [Reflect] DOMString wrap;
         readonly attribute DOMString type;
         attribute [ConvertNullToNullString] DOMString value;
         readonly attribute unsigned long textLength;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to