[webkit-changes] [WebKit/WebKit] 006900: Simplify SVGTextQuery::modifyStartEndPositionsResp...

Ahmad Saleem noreply at github.com
Mon Oct 2 15:04:19 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 006900da2e50db3ee2c2cc1b490de3b0a2ab6721
      https://github.com/WebKit/WebKit/commit/006900da2e50db3ee2c2cc1b490de3b0a2ab6721
  Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
  Date:   2023-10-02 (Mon, 02 Oct 2023)

  Changed paths:
    M Source/WebCore/rendering/svg/SVGTextQuery.cpp
    M Source/WebCore/rendering/svg/SVGTextQuery.h

  Log Message:
  -----------
  Simplify SVGTextQuery::modifyStartEndPositionsRespectingLigatures

https://bugs.webkit.org/show_bug.cgi?id=262458

Reviewed by Chris Dumez.

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

Simplify this method by passing it the fragment in question, and then use
SVGTextFragment::metricsListOffset to get a reasonable starting point.
Rewrite the big loop into two simpler loops - one for each end-point.
This shaves another ~15% off the TC in the bug (on top of 268656 at main).

* Source/WebCore/rendering/svg/SVGTextQuery.cpp:
(SVGTextQuery::mapStartEndPositionsIntoFragmentCoordinates):
(SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
* Source/WebCore/rendering/svg/SVGTextQuery.h:

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




More information about the webkit-changes mailing list