RESOLVED FIXED 120451
Make SVGTextContentElement methods behave consistently with Firefox and IE
https://bugs.webkit.org/show_bug.cgi?id=120451
Summary Make SVGTextContentElement methods behave consistently with Firefox and IE
Ryosuke Niwa
Reported 2013-08-28 20:07:59 PDT
Consider merging https://chromium.googlesource.com/chromium/blink/+/f28cb3ba700c3faf578046a6b7fa7f9cf17d04c7 Make SVGTextContentElement methods behave consistently with Firefox 23 and IE10: - We should not throw when negative values are passed in arguments as long as they wrap to a valid positive index. - Arguments should be mandatory Also fixed a bug in SVGTextContentElement.getSubStringLength() where the wrong result would be returned if the nchars argument was too large due to an overflow. To avoid this issue, we clamp the nchars value to (numberOfChars - charnum) similarly to what is done in SVGTextContentElement.selectSubString(), and as per the specification: http://www.w3.org/TR/SVG2/text.html#__svg__SVGTextContentElement__getSubStringLength
Attachments
GitHub patch modifying '.idl' file (compiles) (1.08 MB, image/png)
2023-04-12 15:51 PDT, Ahmad Saleem
no flags
Ahmad Saleem
Comment 1 2022-10-22 03:27:08 PDT
Ahmad Saleem
Comment 2 2023-04-12 15:50:22 PDT
I looked into commit in Comment 0: Rather than merging, we should just align IDL with spec: https://svgwg.org/svg2-draft/text.html#InterfaceSVGTextContentElement I think cpp change is already taken care of here - https://searchfox.org/wubkat/source/Source/WebCore/svg/SVGTextContentElement.cpp#75 ______ I just local change and it progresses some WPT tests as well. Adding WPTImpact tag. Will attach screenshot of my patch as well.
Ahmad Saleem
Comment 3 2023-04-12 15:51:01 PDT
Created attachment 465875 [details] GitHub patch modifying '.idl' file (compiles)
EWS
Comment 4 2023-04-14 07:37:27 PDT
Committed 262964@main (7a9711ddf39e): <https://commits.webkit.org/262964@main> Reviewed commits have been landed. Closing PR #12675 and removing active labels.
Radar WebKit Bug Importer
Comment 5 2023-04-14 07:38:19 PDT
Note You need to log in before you can comment on or make changes to this bug.