Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 76096780b78a39bb7618cfae3741aecff0062216
      
https://github.com/WebKit/WebKit/commit/76096780b78a39bb7618cfae3741aecff0062216
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-10-13 (Tue, 13 Oct 2026)

  Changed paths:
    M LayoutTests/fast/forms/number/number-stepup-stepdown-from-renderer.html
    M Source/WebCore/html/InputType.cpp
    M Source/WebCore/html/InputType.h
    M Source/WebCore/html/TextFieldInputType.cpp

  Log Message:
  -----------
  Rename InputType::stepUpFromRenderer() to stepUpOrDown() and take a 
StepDirection
https://bugs.webkit.org/show_bug.cgi?id=324299
rdar://187531041

Reviewed by Ryosuke Niwa.

The "FromRenderer" suffix was misleading: it implied the step is
triggered with a RenderObject on the call stack, where dispatching a
DOM event would be unsafe. In practice the function is invoked from the
spin-button step handlers in the input element's shadow DOM (a DOM
event), so dispatching beforeinput/input from it is fine. Rename it to
stepUpOrDown() to describe what it does.

The function is only ever called with 1 or -1, so replace the int
argument with enum class StepDirection : bool { Up, Down }, and remove
the now-unreachable multi-step handling (n == 0 early return and the
n > 1 / n < -1 applyStep() follow-ups).

No change in behavior.

* LayoutTests/fast/forms/number/number-stepup-stepdown-from-renderer.html:
* Source/WebCore/html/InputType.cpp:
(WebCore::InputType::stepUpOrDown):
(WebCore::InputType::stepUpFromRenderer): Deleted.
* Source/WebCore/html/InputType.h:
* Source/WebCore/html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::spinButtonStepDown):
(WebCore::TextFieldInputType::spinButtonStepUp):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to