[Webkit-unassigned] [Bug 23758] WCSS input extension is not supported

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 25 20:49:03 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=23758





------- Comment #11 from yichao.yin at torchmobile.com.cn  2009-05-25 20:49 PDT -------
(In reply to comment #10)
> (From update of attachment 30443 [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 at kde.org)
> >   *           (C) 2000 Dirk Mueller (mueller at 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.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list