Bug 262488
Summary: | Simplify range mapping computation in SVGTextQuery/SVGInlineTextBox | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
Component: | SVG | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | karlcow, sabouhallawa, webkit-bug-importer, zimmermann |
Priority: | P2 | Keywords: | BrowserCompat, InRadar |
Version: | Safari Technology Preview | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=261651 |
Ahmad Saleem
Simplify range mapping computation in SVGTextQuery/SVGInlineTextBox
Blink Merge: https://src.chromium.org/viewvc/blink?view=revision&revision=193017
_________
bool SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates(const SVGTextFragment& fragment, unsigned& startPosition, unsigned& endPosition) const
{
unsigned fragmentOffsetInBox = fragment.characterOffset - start();
// Compute positions relative to the fragment.
startPosition -= fragmentOffsetInBox;
endPosition -= fragmentOffsetInBox;
// Intersect with the fragment range.
startPosition = std::max<unsigned>(startPosition, 0);
endPosition = std::min<unsigned>(endPosition, fragment.length);
return startPosition < endPosition;
}
________
Just wanted to raise.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Ahmad Saleem
This simplification require pre-requisite to make SVG Text code to respect RTL etc.
By doing 1-1 merge as below PR, it will leads to two failures:
https://github.com/WebKit/WebKit/pull/18514
Failing tests:
imported/mozilla/svg/text/textpath-selection.svg
imported/w3c/web-platform-tests/css/css-pseudo/textpath-selection-011.html
^ Both are genuine failures.
I am letting my PR run through EWS fully to document failures (if any else) but I will look into further future merges and see what else I can do.
Radar WebKit Bug Importer
<rdar://problem/116683897>
EWS
Committed 269425@main (8e69bb72e0ee): <https://commits.webkit.org/269425@main>
Reviewed commits have been landed. Closing PR #18514 and removing active labels.