Bug 51791 - Eliminate HTMLInputElement::m_deprecatedTypeNumber, other input refactoring and renaming
Summary: Eliminate HTMLInputElement::m_deprecatedTypeNumber, other input refactoring a...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Darin Adler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-01 09:39 PST by Darin Adler
Modified: 2011-01-03 10:44 PST (History)
6 users (show)

See Also:


Attachments
Patch (136.00 KB, patch)
2011-01-01 10:21 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (136.02 KB, patch)
2011-01-01 23:09 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (140.18 KB, patch)
2011-01-02 20:20 PST, Darin Adler
tkent: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2011-01-01 09:39:29 PST
Eliminate HTMLInputElement::m_deprecatedTypeNumber, other input refactoring and renaming
Comment 1 Darin Adler 2011-01-01 10:21:58 PST
Created attachment 77745 [details]
Patch
Comment 2 Darin Adler 2011-01-01 23:09:53 PST
Created attachment 77770 [details]
Patch
Comment 3 WebKit Review Bot 2011-01-01 23:29:32 PST
Attachment 77770 [details] did not build on chromium:
Build output: http://queues.webkit.org/results/7233356
Comment 4 WebKit Review Bot 2011-01-01 23:45:07 PST
Attachment 77770 [details] did not build on chromium:
Build output: http://queues.webkit.org/results/7319282
Comment 5 Dimitri Glazkov (Google) 2011-01-02 08:33:56 PST
Comment on attachment 77770 [details]
Patch

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

This is awesome, long collective work of factoring this out finally coming to a close. Almost wish we landed this patch in 2010 :)

> WebCore/html/HTMLInputElement.cpp:604
> +        if (renderer() && renderer()->isRenderImage())

Seems like this could be a flag on the InputType?

> WebCore/html/HTMLInputElement.cpp:-1394
> -bool HTMLInputElement::defaultChecked() const
> -{
> -    return fastHasAttribute(checkedAttr);
> -}
> -

The EWS says that it's used it in WebKit/chromium/src/WebSearchableFormData.cpp. Can you change the code there to just query the attribute?

> WebCore/html/InputType.h:75
> +    // Type query functions (try not to use these; bad factoring)

Can you explain a bit more here, maybe indicate future intent of refactoring?
Comment 6 Darin Adler 2011-01-02 12:04:08 PST
(In reply to comment #5)
> > WebCore/html/HTMLInputElement.cpp:604
> > +        if (renderer() && renderer()->isRenderImage())
> 
> Seems like this could be a flag on the InputType?

I made an altAttributeChanged function. With that in place, HTMLInputElement doesn't even need to include RenderImage.h.

> > WebCore/html/HTMLInputElement.cpp:-1394
> > -bool HTMLInputElement::defaultChecked() const
> > -{
> > -    return fastHasAttribute(checkedAttr);
> > -}
> > -
> 
> The EWS says that it's used it in WebKit/chromium/src/WebSearchableFormData.cpp. Can you change the code there to just query the attribute?

Done.

> > WebCore/html/InputType.h:75
> > +    // Type query functions (try not to use these; bad factoring)
> 
> Can you explain a bit more here, maybe indicate future intent of refactoring?

Will write a better comment.
Comment 7 Darin Adler 2011-01-02 20:20:06 PST
Created attachment 77789 [details]
Patch
Comment 8 Kent Tamura 2011-01-02 20:45:11 PST
Comment on attachment 77789 [details]
Patch

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

Great!

> WebCore/html/BaseTextInputType.h:43
> +private:

nit: Should have a blank line before private:

> WebCore/html/ImageInputType.cpp:100
> +     image->updateAltText();

nit: wrong indentation.
Comment 9 Darin Adler 2011-01-03 09:03:42 PST
(In reply to comment #8)
> > WebCore/html/BaseTextInputType.h:43
> > +private:
> 
> nit: Should have a blank line before private:

Thanks. Fixed.

> > WebCore/html/ImageInputType.cpp:100
> > +     image->updateAltText();
> 
> nit: wrong indentation.

Fixed.
Comment 10 Darin Adler 2011-01-03 09:21:54 PST
Committed r74895: <http://trac.webkit.org/changeset/74895>
Comment 11 WebKit Review Bot 2011-01-03 09:28:29 PST
http://trac.webkit.org/changeset/74895 might have broken Qt Linux Release minimal
Comment 12 Daniel Bates 2011-01-03 10:21:20 PST
Landed in changeset 74899 <http://trac.webkit.org/changeset/74899> the portion of the patch for file WebKit/chromium/src/WebSearchableFormData.cpp. For some reason only the change log corresponding to this change was landed.
Comment 13 Daniel Bates 2011-01-03 10:24:17 PST
For historical preservation, Csaba Osztrogonac landed the Qt build fix in changeset 74900 <http://trac.webkit.org/changeset/74900>.

From briefly looking at the Qt build files, I'm unclear why the Qt Linux Release Minimal bot is the only bot that complains about the missing ExceptionCode.h.
Comment 14 Darin Adler 2011-01-03 10:44:02 PST
(In reply to comment #13)
> For historical preservation, Csaba Osztrogonac landed the Qt build fix in changeset 74900 <http://trac.webkit.org/changeset/74900>.
> 
> From briefly looking at the Qt build files, I'm unclear why the Qt Linux Release Minimal bot is the only bot that complains about the missing ExceptionCode.h.

I presume that in other configurations some other header is including ExceptionCode.h.
Comment 15 Darin Adler 2011-01-03 10:44:43 PST
(In reply to comment #12)
> Landed in changeset 74899 <http://trac.webkit.org/changeset/74899> the portion of the patch for file WebKit/chromium/src/WebSearchableFormData.cpp. For some reason only the change log corresponding to this change was landed.

Strange. I landed using "webkit-patch land" and I believe the change was in my tree at that time. It was the same computer where I earlier used "webkit-patch upload".