Bug 60262 - Eliminate WebCore/dom/InputElement.{cpp,h}
Summary: Eliminate WebCore/dom/InputElement.{cpp,h}
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Minor
Assignee: Kent Tamura
URL:
Keywords:
Depends on: 59678
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-05 04:36 PDT by Kent Tamura
Modified: 2011-05-06 21:24 PDT (History)
9 users (show)

See Also:


Attachments
Try (88.55 KB, patch)
2011-05-05 04:40 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff
Try 2 (92.01 KB, patch)
2011-05-05 06:58 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff
Patch (97.45 KB, patch)
2011-05-05 13:55 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff
Patch 2 (97.27 KB, patch)
2011-05-05 14:54 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff
Patch 3 (97.68 KB, patch)
2011-05-05 21:47 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff
Patch for landing (97.92 KB, patch)
2011-05-06 19:27 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Tamura 2011-05-05 04:36:07 PDT
InputElement is not needed anymore because WML was removed.
Comment 1 Kent Tamura 2011-05-05 04:40:04 PDT
Created attachment 92403 [details]
Try
Comment 2 WebKit Review Bot 2011-05-05 04:42:15 PDT
Attachment 92403 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/CMakeLists.txt', u'Source/W..." exit_code: 1

Source/WebCore/html/HTMLInputElement.cpp:1021:  Should have only a single space after a punctuation in a comment.  [whitespace/comments] [5]
Total errors found: 1 in 17 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Early Warning System Bot 2011-05-05 05:00:33 PDT
Attachment 92403 [details] did not build on qt:
Build output: http://queues.webkit.org/results/8551863
Comment 4 Build Bot 2011-05-05 05:12:01 PDT
Attachment 92403 [details] did not build on win:
Build output: http://queues.webkit.org/results/8554884
Comment 5 Kent Tamura 2011-05-05 06:58:31 PDT
Created attachment 92412 [details]
Try 2
Comment 6 Dimitri Glazkov (Google) 2011-05-05 08:10:09 PDT
This looks awesome! Yay! Can't wait to see the patch that's ready for review.
Comment 7 Collabora GTK+ EWS bot 2011-05-05 10:52:10 PDT
Attachment 92412 [details] did not build on gtk:
Build output: http://queues.webkit.org/results/8571466
Comment 8 Alexey Proskuryakov 2011-05-05 11:09:15 PDT
Awesome!
Comment 9 Kent Tamura 2011-05-05 13:55:13 PDT
Created attachment 92460 [details]
Patch
Comment 10 Kent Tamura 2011-05-05 14:54:13 PDT
Created attachment 92476 [details]
Patch 2

Rebase
Comment 11 Kent Tamura 2011-05-05 21:47:28 PDT
Created attachment 92538 [details]
Patch 3

GTK build fix
Comment 12 Ryosuke Niwa 2011-05-06 12:39:59 PDT
Comment on attachment 92538 [details]
Patch 3

View in context: https://bugs.webkit.org/attachment.cgi?id=92538&action=review

> Source/WebCore/html/HTMLInputElement.cpp:518
> +        m_value =  sanitizeValue(fastGetAttribute(valueAttr));

Nit: Two spaces after =.

> Source/WebCore/html/HTMLInputElement.cpp:649
> +        int maxLength = attr->isNull() ? maximumLength : attr->value().toInt();
> +        if (maxLength <= 0 || maxLength > maximumLength)
> +            maxLength = maximumLength;
> +        int oldMaxLength = m_maxLength;
> +        m_maxLength = maxLength;
> +        if (oldMaxLength != maxLength)
> +            updateValueIfNeeded();

I would have preferred to keep this in a helper function.

> Source/WebCore/html/HTMLInputElement.cpp:655
> +        if (renderer())
> +            renderer()->setNeedsLayoutAndPrefWidthsRecalc();

Maybe we need to call setNeedsStyleRecalc here as well because we could have a style rule that matches size attribute such as input[size=5]. Of course, that would be a separate patch.

> Source/WebCore/html/HTMLInputElement.cpp:1519
> +static inline const AtomicString& formatCodes()
> +{
> +    DEFINE_STATIC_LOCAL(AtomicString, codes, ("AaNnXxMm"));
> +    return codes;
> +}

This entire section needs to be cleaned up at some point :(
Comment 13 Kent Tamura 2011-05-06 19:25:52 PDT
Comment on attachment 92538 [details]
Patch 3

View in context: https://bugs.webkit.org/attachment.cgi?id=92538&action=review

>> Source/WebCore/html/HTMLInputElement.cpp:518
>> +        m_value =  sanitizeValue(fastGetAttribute(valueAttr));
> 
> Nit: Two spaces after =.

Fixed.

>> Source/WebCore/html/HTMLInputElement.cpp:649
>> +            updateValueIfNeeded();
> 
> I would have preferred to keep this in a helper function.

ok, I revived parseMaxLengthAttribute().
Comment 14 Kent Tamura 2011-05-06 19:27:20 PDT
Created attachment 92678 [details]
Patch for landing
Comment 15 WebKit Commit Bot 2011-05-06 21:24:26 PDT
Comment on attachment 92678 [details]
Patch for landing

Clearing flags on attachment: 92678

Committed r85998: <http://trac.webkit.org/changeset/85998>
Comment 16 WebKit Commit Bot 2011-05-06 21:24:34 PDT
All reviewed patches have been landed.  Closing bug.