Bug 220758 - Accelerate HTMLInputElement creation
Summary: Accelerate HTMLInputElement creation
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks: 220785
  Show dependency treegraph
 
Reported: 2021-01-19 18:21 PST by Yusuke Suzuki
Modified: 2021-01-20 19:45 PST (History)
10 users (show)

See Also:


Attachments
Patch (56.28 KB, patch)
2021-01-19 18:27 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (56.07 KB, patch)
2021-01-19 18:29 PST, Yusuke Suzuki
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (56.52 KB, patch)
2021-01-19 18:43 PST, Yusuke Suzuki
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2021-01-19 18:21:04 PST
Accelerate HTMLInputElement creation
Comment 1 Yusuke Suzuki 2021-01-19 18:27:40 PST
Created attachment 417934 [details]
Patch
Comment 2 Yusuke Suzuki 2021-01-19 18:29:50 PST
Created attachment 417935 [details]
Patch
Comment 3 Yusuke Suzuki 2021-01-19 18:43:06 PST
Created attachment 417937 [details]
Patch
Comment 4 Simon Fraser (smfr) 2021-01-20 11:59:07 PST
Comment on attachment 417937 [details]
Patch

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

> Source/WebCore/html/InputType.h:337
> +    explicit InputType(HTMLInputElement& element, Type type)

I'd prefer to see Type be the first argument to this constructor and all the derived class constructors.

> Source/WebCore/html/InputType.h:350
> +    Type m_type;

This can be const.
Comment 5 Yusuke Suzuki 2021-01-20 12:21:24 PST
Comment on attachment 417937 [details]
Patch

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

>> Source/WebCore/html/InputType.h:337
>> +    explicit InputType(HTMLInputElement& element, Type type)
> 
> I'd prefer to see Type be the first argument to this constructor and all the derived class constructors.

Sounds good. I'll change them.

>> Source/WebCore/html/InputType.h:350
>> +    Type m_type;
> 
> This can be const.

Nice. Fixed.
Comment 6 Yusuke Suzuki 2021-01-20 13:54:44 PST
Committed r271672: <https://trac.webkit.org/changeset/271672>
Comment 7 Radar WebKit Bug Importer 2021-01-20 13:55:15 PST
<rdar://problem/73419065>
Comment 8 Ryosuke Niwa 2021-01-20 15:50:24 PST
Nice! Blink did a similar optimization here.
Comment 9 Yusuke Suzuki 2021-01-20 18:55:02 PST
(In reply to Ryosuke Niwa from comment #8)
> Nice! Blink did a similar optimization here.

Oh! Nice :)