[webkit-changes] [WebKit/WebKit] 393d4a: Adjust text input scrollWidth and scrollHeight to ...

Ahmad Saleem noreply at github.com
Fri Mar 3 00:56:48 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 393d4a1bb437c9ee4312816fe53087e53d5fd5ab
      https://github.com/WebKit/WebKit/commit/393d4a1bb437c9ee4312816fe53087e53d5fd5ab
  Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
  Date:   2023-03-03 (Fri, 03 Mar 2023)

  Changed paths:
    A LayoutTests/fast/scrolling/scroll-max-value-expected.txt
    A LayoutTests/fast/scrolling/scroll-max-value.html
    M Source/WebCore/rendering/RenderTextControlSingleLine.cpp

  Log Message:
  -----------
  Adjust text input scrollWidth and scrollHeight to include padding and any whitespace added by decorations

https://bugs.webkit.org/show_bug.cgi?id=250383
rdar://problem/104332108

Reviewed by Alan Baradlay.

This patch is to align WebKit with Blink / Chromium and Gecko / Firefox.

Merge - https://src.chromium.org/viewvc/blink?view=revision&revision=186123

This patch modifies "ScrollWidth" and "ScrollHeight" functions to ensure that
scrollLeft (and similarly scrollTop) is always within range [0, scrollWidth - clientWidth]
and padding and whitespaces added by decorations are accounted.

* Source/WebCore/rendering/RenderTextControlSingleLine.cpp:
(RenderTextConrolSingleLine::scrollWidth):
(RenderTextConrolSingleLine::scrollHeight):
* LayoutTests/fast/scrolling/scroll-max-value.html: Add Test Case
* LayoutTests/fast/scrolling/scroll-max-value-expected.txt: Add Test Case Expectation

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




More information about the webkit-changes mailing list