Bug 266260 - Inline SVGTextLayoutAttributes::emptyValue
Summary: Inline SVGTextLayoutAttributes::emptyValue
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ahmad Saleem
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-12-11 16:35 PST by Ahmad Saleem
Modified: 2024-09-15 10:57 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2023-12-11 16:35:41 PST
Hi Team,

While looking into Blink's commit, I came across another potential merge:

Blink Commit: https://src.chromium.org/viewvc/blink?view=revision&revision=195555

"This function just returns a simple float - inlining it allows the
compiler to generate more efficient code (and smaller - ~.5k) code
since the relatively high overhead call can be eliminated.
Take the opportunity to change the "empty value" into NaN (instead of
"max() - 1"), with corresponding semantic changes required by that."

Just wanted to raise to get input, if it is worthwhile change to merge.

Thanks!
Comment 1 Radar WebKit Bug Importer 2023-12-18 16:36:16 PST
<rdar://problem/119839011>
Comment 2 Ahmad Saleem 2023-12-19 09:51:18 PST
NOTE - It leads to regress following test case:

https://web.archive.org/web/20150712020900/http://output.jsbin.com/imajow/1/quiet

^ It start showing nothing. Tested on local build.

It is via following changes only:

Source/WebCore/rendering/svg/SVGTextLayoutAttributes.cpp <-
Source/WebCore/rendering/svg/SVGTextLayoutAttributes.h <-

PR Attempt: https://github.com/WebKit/WebKit/pull/22031
Comment 3 Ahmad Saleem 2023-12-31 22:03:19 PST
It needs some tinkering here in rotation code:

https://searchfox.org/wubkat/rev/af9971e796398c1d012ef5df9a09ed580d19bd17/Source/WebCore/rendering/svg/SVGTextLayoutAttributesBuilder.cpp#195

To make the below failing test fixed.

NOTE - I closed my PR because again my Git setup screwed-up rebase.
Comment 4 Ahmad Saleem 2024-08-18 06:17:05 PDT
SVN link is gone, so this is link - https://github.com/chromium/chromium/commit/d501a4d0cecb30041be93e549c909f8b3517a3fc
Comment 5 Ahmad Saleem 2024-09-15 06:31:14 PDT
Pull request: https://github.com/WebKit/WebKit/pull/33674
Comment 6 EWS 2024-09-15 10:56:58 PDT
Committed 283684@main (5f8c05ccb28f): <https://commits.webkit.org/283684@main>

Reviewed commits have been landed. Closing PR #33674 and removing active labels.