[webkit-changes] [WebKit/WebKit] 8cf3b6: Make RenderText::absoluteQuadsForRange to consider...

Ahmad Saleem noreply at github.com
Sat Dec 10 17:09:59 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8cf3b62f57cc63daf35783bd81cf13ca3cc42e0c
      https://github.com/WebKit/WebKit/commit/8cf3b62f57cc63daf35783bd81cf13ca3cc42e0c
  Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
  Date:   2022-12-10 (Sat, 10 Dec 2022)

  Changed paths:
    A LayoutTests/fast/dom/Range/getClientRects-leading-trailing-whitespaces-expected.txt
    A LayoutTests/fast/dom/Range/getClientRects-leading-trailing-whitespaces.html
    M Source/WebCore/rendering/RenderText.cpp

  Log Message:
  -----------
  Make RenderText::absoluteQuadsForRange to consider leading/trailing whitespaces

Make RenderText::absoluteQuadsForRange to consider leading/trailing whitespaces
https://bugs.webkit.org/show_bug.cgi?id=249048

Reviewed by Ryosuke Niwa.

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

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

This patch makes |RenderText::absoluteQuadsForRange| to consider leading and
trailing whitespaces by adjusting specified offsets by rendered portion of characters.

Before this patch, the function returned empty rectangle
for character offsets not in |InlineTextBox| objects.

* Source/WebCore/rendering/RenderText.cpp:
(RenderText::absoluteQuadsForRange): Add logic to account for whitepsaces
* LayoutTests/fast/dom/Range/getClientRects-leading-trailing-whitespaces.html: Add Test Case
* LayoutTests/fast/dom/Range/getClientRects-leading-trailing-whitespaces-expected.txt: Add Test Case Expectation

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




More information about the webkit-changes mailing list