[webkit-changes] [WebKit/WebKit] 62339d: Avoid constructing InputType in HTMLInputElement::...

Ryosuke Niwa noreply at github.com
Mon Sep 12 08:51:11 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 62339dafa6fc921bb8831a2a1edaaa437c4831cd
      https://github.com/WebKit/WebKit/commit/62339dafa6fc921bb8831a2a1edaaa437c4831cd
  Author: Ryosuke Niwa <rniwa at webkit.org>
  Date:   2022-09-12 (Mon, 12 Sep 2022)

  Changed paths:
    M Source/WebCore/html/HTMLInputElement.cpp
    M Source/WebCore/html/InputType.cpp
    M Source/WebCore/html/InputType.h

  Log Message:
  -----------
  Avoid constructing InputType in HTMLInputElement::updateType whenever possible
https://bugs.webkit.org/show_bug.cgi?id=245042

Reviewed by Cameron McCormack and Chris Dumez.

Avoid constructing a new InputType just to check whether the type has changed or not.

* Source/WebCore/html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateType):
(WebCore::HTMLInputElement::initializeInputType):
* Source/WebCore/html/InputType.cpp:
(WebCore::createInputTypeFactoryMap):
(WebCore::findFactory):
(WebCore::InputType::createIfDifferent): Renamed from create. Optionally takes the current InputType.
* Source/WebCore/html/InputType.h:

Canonical link: https://commits.webkit.org/254383@main




More information about the webkit-changes mailing list