[webkit-changes] [WebKit/WebKit] 5c97e0: [IFC][Subpixel] Do not mix float and LayoutUnit ty...

Alan Baradlay noreply at github.com
Wed Mar 6 08:36:15 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5c97e0d70826cf9cb8fb388b96ad2da02b9ba6c3
      https://github.com/WebKit/WebKit/commit/5c97e0d70826cf9cb8fb388b96ad2da02b9ba6c3
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2024-03-06 (Wed, 06 Mar 2024)

  Changed paths:
    M Source/WebCore/rendering/RenderText.cpp

  Log Message:
  -----------
  [IFC][Subpixel] Do not mix float and LayoutUnit types in RenderText::positionForPoint
https://bugs.webkit.org/show_bug.cgi?id=270556

Reviewed by Antti Koivisto.

This is in preparation for removing integral vertical snapping.

Comparing the incoming LayoutUnit { pointBlockDirection } against the float { line bottom } provides the expected line range
as long as these values are both snapped to integral pixel values (as the result of integral based (vertical) line layout),
but once the snapping is removed, this incoming (and implicitly floored float when converted to LayoutUnit) value may not fall into the expected (non-snapped) line range.
Let's use the same type (with the same rounding strategy) to find "position for point".

* Source/WebCore/rendering/RenderText.cpp:
(WebCore::RenderText::positionForPoint):

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



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


More information about the webkit-changes mailing list