New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getStartPositionOfChar(n) on an element with 'n' characters of text doesn't throw IndexSizeError #12802
getStartPositionOfChar(n) on an element with 'n' characters of text doesn't throw IndexSizeError #12802
Conversation
EWS run on previous version of this PR (hash fde751b) |
fde751b
to
8aa5e0b
Compare
EWS run on previous version of this PR (hash 8aa5e0b) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should not svgtextcontentelement-euqality-methods-parameters.html be added as a wpt test?
I think adding full test from Chromium repository to WPT would be beneficial for all browsers. Let me raise an issue on WPT and if needed, I am happy to move Chromium test to WPT. :-) |
8aa5e0b
to
f5a11eb
Compare
EWS run on current version of this PR (hash f5a11eb) |
β¦oesn't throw IndexSizeError https://bugs.webkit.org/show_bug.cgi?id=255500 rdar://problem/108115821 Reviewed by Said Abou-Hallawa. This patch aligns WebKit to Blink / Chromium, Gecko / Firefox and Web-Spec. Cherry-Pick: https://src.chromium.org/viewvc/blink?view=revision&revision=201411 According to the spec [1], IndexSizeError should be thrown if: "...the charnum is negative or if charnum is greater than or equal to the number of characters at this node." [1] http://www.w3.org/TR/SVG11/text.html#__svg__SVGTextContentElement__getStartPositionOfChar The current SVG2 draft has a different formulation: SVG2 - https://svgwg.org/svg2-draft/text.html#__svg__SVGTextContentElement__getStartPositionOfChar "If cluster is null, then then throw a DOMException with code INDEX_SIZE_ERR." but will have the same result. * Source/WebCore/svg/SVGTextContentElement.cpp: (SVGTextContentElement::getStartPositionOfChar): (SVGTextContentElement::getEndPositionOfChar): (SVGTextContentElement::getExtentOfChar): (SVGTextContentElement::getRotationOfChar): * LayoutTests/svg/text/svgtextcontentelement-equality-methods-parameters.html: Add Test * LayoutTests/svg/text/svgtextcontentelement-equality-methods-parameters-expected.txt: Add Test Expectation Canonical link: https://commits.webkit.org/263049@main
f5a11eb
to
25e8d82
Compare
Committed 263049@main (25e8d82): https://commits.webkit.org/263049@main Reviewed commits have been landed. Closing PR #12802 and removing active labels. |
function assert_equals_to_SVGPoint(actualPoint, expectedPoint) | ||
{ | ||
assert_equals(actualPoint.x, expectedPoint.x); | ||
assert_equals(actualPoint.y, expectedPoint.y); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is not used. Please remove.
function assert_equals_to_SVGRect(actualRect, expectedRect) | ||
{ | ||
assert_equals(actualRect.x, expectedRect.x); | ||
assert_equals(actualRect.y, expectedRect.y); | ||
assert_equals(actualRect.width, expectedRect.width); | ||
assert_equals(actualRect.height, expectedRect.height); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is not used. Please remove.
25e8d82
f5a11eb
π wincairoπ§ͺ ios-wk2π§ͺ api-macπ§ͺ ios-wk2-wptπ§ͺ gtk-wk2π§ͺ api-gtkπ§ͺ mac-AS-debug-wk2