Bug 23758 - WCSS input extension is not supported
Summary: WCSS input extension is not supported
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nikolas Zimmermann
URL:
Keywords:
Depends on: 23452
Blocks:
  Show dependency treegraph
 
Reported: 2009-02-05 04:53 PST by yichao.yin
Modified: 2011-04-29 15:52 PDT (History)
9 users (show)

See Also:


Attachments
inital patch for WCSS input support (45.40 KB, patch)
2009-02-06 06:00 PST, yichao.yin
no flags Details | Formatted Diff | Diff
updated patch for changed code (36.47 KB, patch)
2009-02-13 03:49 PST, yichao.yin
no flags Details | Formatted Diff | Diff
updated patch for layout test (10.95 KB, patch)
2009-02-13 03:50 PST, yichao.yin
no flags Details | Formatted Diff | Diff
Updated patch for adding tests (11.21 KB, patch)
2009-05-14 00:06 PDT, yichao.yin
no flags Details | Formatted Diff | Diff
Updated patch about code changes (37.00 KB, patch)
2009-05-14 00:08 PDT, yichao.yin
no flags Details | Formatted Diff | Diff
Latest Updated patch for code change (39.79 KB, patch)
2009-05-18 01:58 PDT, yichao.yin
sam: review-
Details | Formatted Diff | Diff
re-submit the patch after porting to ToT and addressing the reviews comments (28.62 KB, patch)
2009-09-02 22:45 PDT, Charles Wei
eric: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description yichao.yin 2009-02-05 04:53:35 PST
WCSS input extension is one of the WAP specific extenstions to CSS2.
It is consisted of two WCSS properties: -wap-input-format and -wap-input-required
Comment 1 yichao.yin 2009-02-06 06:00:26 PST
Created attachment 27391 [details]
inital patch for WCSS input support
Comment 2 yichao.yin 2009-02-13 03:49:35 PST
Created attachment 27653 [details]
updated patch for changed code


split the initial patch into two parts: this one contains the changed code, the upcoming one is for layout test
Comment 3 yichao.yin 2009-02-13 03:50:42 PST
Created attachment 27654 [details]
updated patch for layout test
Comment 4 yichao.yin 2009-05-14 00:06:21 PDT
Created attachment 30315 [details]
Updated patch for adding tests

The latest tests for WCSS input extension
Comment 5 yichao.yin 2009-05-14 00:08:22 PDT
Created attachment 30316 [details]
Updated patch about code changes

Latest code changes for WCSS input extension support
Comment 6 yichao.yin 2009-05-18 01:58:38 PDT
Created attachment 30443 [details]
Latest Updated patch for code change

add copyright messages for code change
Comment 7 George Staikos 2009-05-19 20:36:02 PDT
Comment on attachment 30315 [details]
Updated patch for adding tests

will need to be added to skipped for Mac OS also, but patch is fine.
Comment 8 yichao.yin 2009-05-19 20:48:04 PDT
(In reply to comment #7)
> (From update of attachment 30315 [details] [review])
> will need to be added to skipped for Mac OS also, but patch is fine.

Mac OS? I have changed platform/mac/Skipped. Do you mean other mac-xxx platforms?
Comment 9 George Staikos 2009-05-19 21:05:02 PDT
Sorry, I meant Qt.
Comment 10 Sam Weinig 2009-05-22 22:16:37 PDT
Comment on attachment 30443 [details]
Latest Updated patch for code change

> +        This change depends on https://bugs.webkit.org/show_bug.cgi?id=23452

This doesn't make sense to have in a changelog.  Either the change works or it doesn't.

> +
> +        Tests: fast/wcss/inputelement-inputformat.xhtml
> +               fast/wcss/inputelement-inputrequired.xhtml
> +               fast/wcss/textarea-inputformat.xhtml
> +               fast/wcss/textarea-inputrequired.xhtml

These tests don't seem to be included.

> +    bool ok = true;
> +    UChar mask = inputFormatMask[maskIndex];
> +    // Match the inputed character with input mask
> +    switch (mask) {
> +    case 'A':
> +        ok = !WTF::isASCIIDigit(inChar) && !WTF::isASCIILower(inChar) && WTF::isASCIIPrintable(inChar);
> +        break;
> +    case 'a':
> +        ok = !WTF::isASCIIDigit(inChar) && !WTF::isASCIIUpper(inChar) && WTF::isASCIIPrintable(inChar);
> +        break;
> +    case 'N':
> +        ok = WTF::isASCIIDigit(inChar);
> +        break;
> +    case 'n':
> +        ok = !WTF::isASCIIAlpha(inChar) && WTF::isASCIIPrintable(inChar);
> +        break;
> +    case 'X':
> +        ok = !WTF::isASCIILower(inChar) && WTF::isASCIIPrintable(inChar);
> +        break;
> +    case 'x':
> +        ok = !WTF::isASCIIUpper(inChar) && WTF::isASCIIPrintable(inChar);
> +        break;
> +    case 'M':
> +        ok = WTF::isASCIIPrintable(inChar);
> +        break;
> +    case 'm':
> +        ok = WTF::isASCIIPrintable(inChar);

The WTF should not be needed for these (or at the very least, you should add using namespace WTF at the top of file).  The cases for 'M' and 'm' can be combined.
> Index: WebCore/html/HTMLTextAreaElement.h
> ===================================================================
> --- WebCore/html/HTMLTextAreaElement.h	(revision 43681)
> +++ WebCore/html/HTMLTextAreaElement.h	(working copy)
> @@ -3,6 +3,7 @@
>   *           (C) 1999 Antti Koivisto (koivisto@kde.org)
>   *           (C) 2000 Dirk Mueller (mueller@kde.org)
>   * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
> + * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
>   *
>   * This library is free software; you can redistribute it and/or
>   * modify it under the terms of the GNU Library General Public
> @@ -26,11 +27,19 @@
>  
>  #include "HTMLFormControlElement.h"
>  
> +#if ENABLE(WCSS)
> +#include "InputElement.h"
> +#endif
> +
>  namespace WebCore {
>  
>  class VisibleSelection;
>  
> +#if ENABLE(WCSS)
> +class HTMLTextAreaElement : public HTMLFormControlElementWithState, public InputElement {
> +#else
>  class HTMLTextAreaElement : public HTMLFormControlElementWithState {
> +#endif

This seems wrong to me.  An HTMLTextAreaElement is not an InputElement and therefore should never inherit from InputElement.  The changes made to this class seem too invasive and I think a cleaner approach is necessary.  

r-
Comment 11 yichao.yin 2009-05-25 20:49:03 PDT
(In reply to comment #10)
> (From update of attachment 30443 [details] [review])
> > +        This change depends on https://bugs.webkit.org/show_bug.cgi?id=23452
> This doesn't make sense to have in a changelog.  Either the change works or it
> doesn't.
> > +
> > +        Tests: fast/wcss/inputelement-inputformat.xhtml
> > +               fast/wcss/inputelement-inputrequired.xhtml
> > +               fast/wcss/textarea-inputformat.xhtml
> > +               fast/wcss/textarea-inputrequired.xhtml
> These tests don't seem to be included.

will remove it.

> > +    bool ok = true;
> > +    UChar mask = inputFormatMask[maskIndex];
> > +    // Match the inputed character with input mask
> > +    switch (mask) {
> > +    case 'A':
> > +        ok = !WTF::isASCIIDigit(inChar) && !WTF::isASCIILower(inChar) && WTF::isASCIIPrintable(inChar);
> > +        break;
> > +    case 'a':
> > +        ok = !WTF::isASCIIDigit(inChar) && !WTF::isASCIIUpper(inChar) && WTF::isASCIIPrintable(inChar);
> > +        break;
> > +    case 'N':
> > +        ok = WTF::isASCIIDigit(inChar);
> > +        break;
> > +    case 'n':
> > +        ok = !WTF::isASCIIAlpha(inChar) && WTF::isASCIIPrintable(inChar);
> > +        break;
> > +    case 'X':
> > +        ok = !WTF::isASCIILower(inChar) && WTF::isASCIIPrintable(inChar);
> > +        break;
> > +    case 'x':
> > +        ok = !WTF::isASCIIUpper(inChar) && WTF::isASCIIPrintable(inChar);
> > +        break;
> > +    case 'M':
> > +        ok = WTF::isASCIIPrintable(inChar);
> > +        break;
> > +    case 'm':
> > +        ok = WTF::isASCIIPrintable(inChar);
> The WTF should not be needed for these (or at the very least, you should add
> using namespace WTF at the top of file).  The cases for 'M' and 'm' can be
> combined.

Thanks, will combine them.

> > Index: WebCore/html/HTMLTextAreaElement.h
> > ===================================================================
> > --- WebCore/html/HTMLTextAreaElement.h	(revision 43681)
> > +++ WebCore/html/HTMLTextAreaElement.h	(working copy)
> > @@ -3,6 +3,7 @@
> >   *           (C) 1999 Antti Koivisto (koivisto@kde.org)
> >   *           (C) 2000 Dirk Mueller (mueller@kde.org)
> >   * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
> > + * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
> >   *
> >   * This library is free software; you can redistribute it and/or
> >   * modify it under the terms of the GNU Library General Public
> > @@ -26,11 +27,19 @@
> >  
> >  #include "HTMLFormControlElement.h"
> >  
> > +#if ENABLE(WCSS)
> > +#include "InputElement.h"
> > +#endif
> > +
> >  namespace WebCore {
> >  
> >  class VisibleSelection;
> >  
> > +#if ENABLE(WCSS)
> > +class HTMLTextAreaElement : public HTMLFormControlElementWithState, public InputElement {
> > +#else
> >  class HTMLTextAreaElement : public HTMLFormControlElementWithState {
> > +#endif
> This seems wrong to me.  An HTMLTextAreaElement is not an InputElement and
> therefore should never inherit from InputElement.  The changes made to this
> class seem too invasive and I think a cleaner approach is necessary.  
> r-

In my opinion, HTMLTextAreaElement can be treated as an InputElement since it also receives user input.
Does any specifications define InputElement explicitly and say HTMLTextAreaElement is not an InputElment? 
I am not sure for that.
Comment 12 Adam Barth 2009-06-02 00:36:47 PDT
I'm confused.  Is there something to be landed here?  If not, can we remove from the commit queue?
Comment 13 George Staikos 2009-06-02 17:06:30 PDT
well, the tests seem fine.  I guess they could be landed (disabled)
Comment 14 Mark Rowe (bdash) 2009-06-19 00:05:01 PDT
Landing tests without the supporting functionality isn't hugely useful, and would require a different patch than the one that is attached.
Comment 15 Mark Rowe (bdash) 2009-06-19 00:05:31 PDT
Comment on attachment 30315 [details]
Updated patch for adding tests

Clearing the review flag to get this out of the review queue for now.
Comment 16 Charles Wei 2009-09-02 22:45:22 PDT
Created attachment 38967 [details]
re-submit the patch after porting to ToT and addressing the reviews comments 

patch that addresses the reviewer's comments. 

This patch is to add WCSS input extension to CSS2,  which includes the following CSS properties:

-wap-input-format
-wap-input-required

with -wap-input-format,  the author can define the value space of an input element.
-wap-input-required says the input element can't be empty
Comment 17 Eric Seidel (no email) 2009-11-10 14:36:38 PST
Given that we have failed to find a reviewer to support this in over 2 months, and that I am no longer in support of adding this feature to WebKit, I think we should close out this bug/patch due to lack of reviewer support.
Comment 18 Eric Seidel (no email) 2009-11-25 22:36:34 PST
Comment on attachment 38967 [details]
re-submit the patch after porting to ToT and addressing the reviews comments 

r- due to lack of reviewer support based on my above comment and that no one has commented on this bug in the 2 weeks since I made it.
Comment 19 Eric Seidel (no email) 2010-01-19 14:41:43 PST
Comment on attachment 38967 [details]
re-submit the patch after porting to ToT and addressing the reviews comments 

6 weeks later, same story.  WebKit's apathy towards this patch suggests we should close this bug as WONTFIX.  Marking r- to remove this abandoned bug/patch from the review queue.
Comment 20 Alexey Proskuryakov 2011-04-29 15:52:29 PDT
Bug 23477 was resolved with a general lack of desire to implement any WCSS extensions, so closing this one, too. Please e-mail webkit-dev mailing list if you are interested in WCSS support.