From 401b2b0dddab03949c2d9cc967ad1fba5ca1e16a Mon Sep 17 00:00:00 2001 From: "commit-queue@webkit.org" Date: Tue, 27 Sep 2011 11:20:34 +0000 Subject: [PATCH] wrap attribute of textarea element cannot be accessed by JavaScript. https://bugs.webkit.org/show_bug.cgi?id=68592 Patch by Vineet Chaudhary 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. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96096 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- LayoutTests/ChangeLog | 12 ++++++ .../forms/textarea-wrap-attribute-expected.txt | 25 +++++++++++ .../fast/forms/textarea-wrap-attribute.html | 49 ++++++++++++++++++++++ Source/WebCore/ChangeLog | 13 ++++++ Source/WebCore/html/HTMLTextAreaElement.idl | 2 + 5 files changed, 101 insertions(+) create mode 100644 LayoutTests/fast/forms/textarea-wrap-attribute-expected.txt create mode 100644 LayoutTests/fast/forms/textarea-wrap-attribute.html diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index ba49c2b..4a81657 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,15 @@ +2011-09-27 Vineet Chaudhary + + 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 [Chromium] Layout Test fast compositing/geometry/limit-layer-bounds-transformed-overflow.html is failing diff --git a/LayoutTests/fast/forms/textarea-wrap-attribute-expected.txt b/LayoutTests/fast/forms/textarea-wrap-attribute-expected.txt new file mode 100644 index 0000000..d690015 --- /dev/null +++ b/LayoutTests/fast/forms/textarea-wrap-attribute-expected.txt @@ -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 + diff --git a/LayoutTests/fast/forms/textarea-wrap-attribute.html b/LayoutTests/fast/forms/textarea-wrap-attribute.html new file mode 100644 index 0000000..def8864 --- /dev/null +++ b/LayoutTests/fast/forms/textarea-wrap-attribute.html @@ -0,0 +1,49 @@ + + + + + + + +

+
+ + + + + + + + diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 80ce808..16e86ef 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,16 @@ +2011-09-27 Vineet Chaudhary + + 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 [GTK] Add compatibility methods for DOM bindings diff --git a/Source/WebCore/html/HTMLTextAreaElement.idl b/Source/WebCore/html/HTMLTextAreaElement.idl index ebc2a85..8031d24 100644 --- a/Source/WebCore/html/HTMLTextAreaElement.idl +++ b/Source/WebCore/html/HTMLTextAreaElement.idl @@ -1,6 +1,7 @@ /* * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. * Copyright (C) 2006 Samuel Weinig + * 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 @@ module html { 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; -- 2.7.4