[Webkit-unassigned] [Bug 23588] Add inputmode attribute support, as per XHTML Basic 1.1
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jun 11 00:29:34 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=23588
Kent Tamura <tkent at chromium.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #58440|review? |review-
Flag| |
--- Comment #14 from Kent Tamura <tkent at chromium.org> 2010-06-11 00:29:33 PST ---
(From update of attachment 58440)
> Index: WebCore/ChangeLog
> ===================================================================
> --- WebCore/ChangeLog (revision 60986)
> +++ WebCore/ChangeLog (working copy)
> @@ -1,3 +1,22 @@
> +2010-06-10 Charles Wei <charles.wei at torchmobile.com.cn>
> +
> + Reviewed by NOBODY (OOPS!).
> +
> + Add XHTML Basic 1.1 support for "inputmode" attribute for "input" and "textarea" element
> + https://bugs.webkit.org/show_bug.cgi?id=23588
> +
> + Tests: fast/xhtmlbasic/inputmode.xhtml
> + fast/xhtmlbasic/xhtmlbasic11.xhtml
> +
> + * WebCore.pri:
> + * html/HTMLAttributeNames.in:
> + * html/HTMLFormControlElement.cpp:
> + (WebCore::HTMLTextFormControlElement::inputmode):
> + (WebCore::HTMLTextFormControlElement::setInputmode):
> + * html/HTMLFormControlElement.h:
> + * html/HTMLInputElement.idl:
> + * html/HTMLTextAreaElement.idl:
> +
> 2010-06-10 Tony Chang <tony at chromium.org>
>
> Reviewed by Kent Tamura.
> Index: WebCore/WebCore.pri
> ===================================================================
> --- WebCore/WebCore.pri (revision 60986)
> +++ WebCore/WebCore.pri (working copy)
> @@ -159,6 +159,7 @@ contains(DEFINES, ENABLE_FILTERS=1): FEA
> contains(DEFINES, ENABLE_WCSS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_WCSS=1
> contains(DEFINES, ENABLE_WML=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_WML=1
> contains(DEFINES, ENABLE_XHTMLMP=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_XHTMLMP=1
> +contains(DEFINES, ENABLE_XHTMLBASIC=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_XHTMLBASIC=1
> contains(DEFINES, ENABLE_SVG=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_SVG=1
> contains(DEFINES, ENABLE_JAVASCRIPT_DEBUGGER=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_JAVASCRIPT_DEBUGGER=1
> contains(DEFINES, ENABLE_OFFLINE_WEB_APPLICATIONS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_OFFLINE_WEB_APPLICATIONS=1
> Index: WebCore/html/HTMLAttributeNames.in
> ===================================================================
> --- WebCore/html/HTMLAttributeNames.in (revision 60986)
> +++ WebCore/html/HTMLAttributeNames.in (working copy)
> @@ -107,6 +107,7 @@ http_equiv
> id
> incremental
> indeterminate
> +inputmode
> ismap
> keytype
> label
> Index: WebCore/html/HTMLFormControlElement.cpp
> ===================================================================
> --- WebCore/html/HTMLFormControlElement.cpp (revision 60986)
> +++ WebCore/html/HTMLFormControlElement.cpp (working copy)
> @@ -637,4 +637,16 @@ void HTMLTextFormControlElement::parseMa
> HTMLFormControlElementWithState::parseMappedAttribute(attr);
> }
>
> +#if ENABLE(XHTMLBASIC)
> +String HTMLTextFormControlElement::inputmode() const
> +{
> + return getAttribute(inputmodeAttr).string();
> +}
> +
> +void HTMLTextFormControlElement::setInputmode(const String& value)
> +{
> + setAttribute(inputmodeAttr, value);
> +}
> +#endif
> +
> } // namespace Webcore
> Index: WebCore/html/HTMLFormControlElement.h
> ===================================================================
> --- WebCore/html/HTMLFormControlElement.h (revision 60986)
> +++ WebCore/html/HTMLFormControlElement.h (working copy)
> @@ -189,6 +189,13 @@ public:
> void setSelectionRange(int start, int end);
> VisibleSelection selection() const;
>
> +#if ENABLE(XHTMLBASIC)
> + virtual String value() const = 0;
> + String inputmode() const;
> + void setInputmode(const String&);
> +#endif
> +
> +
> protected:
> HTMLTextFormControlElement(const QualifiedName&, Document*, HTMLFormElement*);
>
> Index: WebCore/html/HTMLInputElement.idl
> ===================================================================
> --- WebCore/html/HTMLInputElement.idl (revision 60986)
> +++ WebCore/html/HTMLInputElement.idl (working copy)
> @@ -98,6 +98,11 @@ module html {
>
> readonly attribute FileList files;
> readonly attribute NodeList labels;
> +
> +#if defined(ENABLE_XHTMLBASIC) && ENABLE_XHTMLBASIC
> + attribute [ConvertNullToNullString] DOMString inputmode;
> +#endif
> +
> };
>
> }
> Index: WebCore/html/HTMLTextAreaElement.idl
> ===================================================================
> --- WebCore/html/HTMLTextAreaElement.idl (revision 60986)
> +++ WebCore/html/HTMLTextAreaElement.idl (working copy)
> @@ -51,6 +51,10 @@ module html {
> attribute long selectionEnd;
> void setSelectionRange(in long start, in long end);
> readonly attribute NodeList labels;
> +
> +#if defined(ENABLE_XHTMLBASIC) && ENABLE_XHTMLBASIC
> + attribute [ConvertNullToNullString] DOMString inputmode;
> +#endif
> };
>
> }
> Index: WebKitTools/ChangeLog
> ===================================================================
> --- WebKitTools/ChangeLog (revision 60986)
> +++ WebKitTools/ChangeLog (working copy)
> @@ -1,3 +1,14 @@
> +2010-06-10 Charles Wei <charles.wei at torchmobile.com.cn>
> +
> + Reviewed by NOBODY (OOPS!).
> +
> + Add feature "XHTML Basic 1.1 support with ENABLE_XHTMLBASIC
> + https://bugs.webkit.org/show_bug.cgi?id=23588
> +
> + * Scripts/build-webkit:
> + * Scripts/old-run-webkit-tests:
> + * Scripts/webkitperl/features.pm:
> +
> 2010-06-10 Ojan Vafai <ojan at chromium.org>
>
> Reviewed by Alexey Proskuryakov.
> Index: WebKitTools/Scripts/build-webkit
> ===================================================================
> --- WebKitTools/Scripts/build-webkit (revision 60986)
> +++ WebKitTools/Scripts/build-webkit (working copy)
> @@ -59,7 +59,7 @@ my ($threeDCanvasSupport, $threeDRenderi
> $domStorageSupport, $eventsourceSupport, $filtersSupport, $geolocationSupport, $iconDatabaseSupport, $imageResizerSupport, $indexedDatabaseSupport,
> $javaScriptDebuggerSupport, $mathmlSupport, $offlineWebApplicationSupport, $rubySupport, $systemMallocSupport, $sandboxSupport, $sharedWorkersSupport,
> $svgSupport, $svgAnimationSupport, $svgAsImageSupport, $svgDOMObjCBindingsSupport, $svgFontsSupport,
> - $svgForeignObjectSupport, $svgUseSupport, $videoSupport, $webSocketsSupport, $wmlSupport, $wcssSupport, $xhtmlmpSupport, $workersSupport,
> + $svgForeignObjectSupport, $svgUseSupport, $videoSupport, $webSocketsSupport, $wmlSupport, $wcssSupport, $xhtmlmpSupport, $xhtmlbasicSupport, $workersSupport,
> $xpathSupport, $xsltSupport, $coverageSupport, $notificationsSupport, $blobSliceSupport, $tiledBackingStoreSupport,
> $fileReaderSupport, $fileWriterSupport);
>
> @@ -172,6 +172,9 @@ my @features = (
> { option => "xhtmlmp", desc => "Toggle XHTML-MP support",
> define => "ENABLE_XHTMLMP", default => 0, value => \$xhtmlmpSupport },
>
> + { option => "xhtmlbasic", desc => "Toggle XHTML Basic 1.1 support",
> + define => "ENABLE_XHTMLBASIC", default => 0, value => \$xhtmlbasicSupport },
> +
> { option => "wcss", desc => "Toggle WCSS support",
> define => "ENABLE_WCSS", default => 0, value => \$wcssSupport },
>
> Index: WebKitTools/Scripts/old-run-webkit-tests
> ===================================================================
> --- WebKitTools/Scripts/old-run-webkit-tests (revision 60986)
> +++ WebKitTools/Scripts/old-run-webkit-tests (working copy)
> @@ -518,6 +518,10 @@ if (!checkWebCoreFeatureSupport("WCSS",
> $ignoredDirectories{'fast/wcss'} = 1;
> }
>
> +if (!checkWebCoreFeatureSupport("XHTMLBASIC", 0)) {
> + $ignoredDirectories{'fast/xhtmlbasic'} = 1;
> +}
> +
> if (!checkWebCoreFeatureSupport("XHTMLMP", 0)) {
> $ignoredDirectories{'fast/xhtmlmp'} = 1;
> }
> Index: WebKitTools/Scripts/webkitperl/features.pm
> ===================================================================
> --- WebKitTools/Scripts/webkitperl/features.pm (revision 60986)
> +++ WebKitTools/Scripts/webkitperl/features.pm (working copy)
> @@ -74,6 +74,7 @@ sub hasFeature($$)
> "WML" => "WMLElement",
> "WCSS" => "parseWCSSInputProperty",
> "XHTMLMP" => "isXHTMLMPDocument",
> + "XHTMLBASIC" => "setInputmode",
> );
> my $symbolName = $symbolForFeature{$featureName};
> die "Unknown feature: $featureName" unless $symbolName;
> Index: LayoutTests/ChangeLog
> ===================================================================
> --- LayoutTests/ChangeLog (revision 60986)
> +++ LayoutTests/ChangeLog (working copy)
> @@ -1,3 +1,16 @@
> +2010-06-10 Charles Wei <charles.wei at torchmobile.com.cn>
> +
> + Reviewed by NOBODY (OOPS!).
> +
> + Add test cases for XHTML Basic 1.1
> + https://bugs.webkit.org/show_bug.cgi?id=23588
> +
> + * fast/xhtmlbasic: Added.
> + * fast/xhtmlbasic/inputmode-expected.txt: Added.
> + * fast/xhtmlbasic/inputmode.xhtml: Added.
> + * fast/xhtmlbasic/xhtmlbasic11-expected.txt: Added.
> + * fast/xhtmlbasic/xhtmlbasic11.xhtml: Added.
> +
> 2010-06-10 Tony Chang <tony at chromium.org>
>
> Reviewed by Kent Tamura.
> Index: LayoutTests/fast/xhtmlbasic/inputmode-expected.txt
> ===================================================================
> --- LayoutTests/fast/xhtmlbasic/inputmode-expected.txt (revision 0)
> +++ LayoutTests/fast/xhtmlbasic/inputmode-expected.txt (revision 0)
> @@ -0,0 +1,13 @@
> +
> +Verifies initial inputmode for input is 'digit' :
> +PASS document.getElementById("input").inputmode is "digit"
> +
> +Verifies inputmode for input is changed to 'latin' :
> +PASS document.getElementById("input").inputmode is "latin"
> +
> +Verifies initial inputmode for textarea is 'upperCase' :
> +PASS document.getElementById("textarea").inputmode is "upperCase"
> +
> +Verifies inputmode for textarea is changed to 'lowerCase' :
> +PASS document.getElementById("textarea").inputmode is "lowerCase"
> +
> Index: LayoutTests/fast/xhtmlbasic/inputmode.xhtml
> ===================================================================
> --- LayoutTests/fast/xhtmlbasic/inputmode.xhtml (revision 0)
> +++ LayoutTests/fast/xhtmlbasic/inputmode.xhtml (revision 0)
> @@ -0,0 +1,42 @@
> +<?xml version="1.0"?>
> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">
> +<html xmlns="http://www.w3.org/1999/xhtml">
> +<head>
> +<script src="../js/resources/js-test-pre.js"></script>
> +</head>
> +
> +<body>
> +<input type="text" id="input" inputmode="digit" />
> +<textarea id="textarea" inputmode="upperCase" />
> +
> +<p id="console"> </p>
> +
> +<script language="JavaScript" type="text/javascript">
> +
> +function log(message) {
> + document.getElementById("console").innerHTML += message ;
> +}
> + if (window.layoutTestController)
> + layoutTestController.dumpAsText();
> +
> + debug("Verifies initial inputmode for input is 'digit' : " );
> + shouldBe('document.getElementById("input").inputmode' , '"digit"');
> + debug("");
> +
> + document.getElementById("input").inputmode = "latin";
> + debug("Verifies inputmode for input is changed to 'latin' : " );
> + shouldBe('document.getElementById("input").inputmode', '"latin"' );
> + debug("");
> +
> + debug("Verifies initial inputmode for textarea is 'upperCase' : ");
> + shouldBe('document.getElementById("textarea").inputmode', '"upperCase"');
> + debug("");
> +
> + document.getElementById("textarea").inputmode = "lowerCase";
> + debug("Verifies inputmode for textarea is changed to 'lowerCase' : ");
> + shouldBe('document.getElementById("textarea").inputmode', '"lowerCase"');
> +
> +</script>
> +
> +</body>
> +</html>
> Index: LayoutTests/fast/xhtmlbasic/xhtmlbasic11-expected.txt
> ===================================================================
> --- LayoutTests/fast/xhtmlbasic/xhtmlbasic11-expected.txt (revision 0)
> +++ LayoutTests/fast/xhtmlbasic/xhtmlbasic11-expected.txt (revision 0)
> @@ -0,0 +1,3 @@
> +This test case verifies XHTML Basic 1.1 DOCTYPE is correctly parsed and rendered.
> +
> +PASS
> Index: LayoutTests/fast/xhtmlbasic/xhtmlbasic11.xhtml
> ===================================================================
> --- LayoutTests/fast/xhtmlbasic/xhtmlbasic11.xhtml (revision 0)
> +++ LayoutTests/fast/xhtmlbasic/xhtmlbasic11.xhtml (revision 0)
> @@ -0,0 +1,19 @@
> +<?xml version="1.0"?>
> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">
> +
> +<html xmlns="http://www.w3.org/1999/xhtml">
> +<head>
> +<title>Test document conformance of XHTML Basic 1.1 </title>
> +</head>
> +<body>
> +<p> This test case verifies XHTML Basic 1.1 DOCTYPE is correctly parsed and rendered. </p>
> +<p id="console"> </p>
> +<script type="text/javascript">
> + if (window.layoutTestController){
> + layoutTestController.dumpAsText();
> + }
> + document.getElementById("console").innerHTML = "PASS";
> +
> +</script>
> +</body>
> +</html>
WebCore/html/HTMLFormControlElement.h:195
+ void setInputmode(const String&);
Are inputmode() and setInputmode() really needed? We can omit them by adding [Reflect] in IDL files, and platform-dependent code can access them by getAttribute() and setAttribute().
LayoutTests/ChangeLog:12
+ * fast/xhtmlbasic/xhtmlbasic11.xhtml: Added.
We should add these tests to Skipped files of unsupported platforms.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list