Skip to content

[geometry] Tighten up DOMMatrix's stringifier; throw for NaN/Infinity#148

Merged
zcorpan merged 1 commit intomasterfrom
zcorpan/dommatrix-tostring
May 16, 2017
Merged

[geometry] Tighten up DOMMatrix's stringifier; throw for NaN/Infinity#148
zcorpan merged 1 commit intomasterfrom
zcorpan/dommatrix-tostring

Conversation

@zcorpan
Copy link
Copy Markdown
Contributor

@zcorpan zcorpan commented May 10, 2017

@zcorpan zcorpan force-pushed the zcorpan/dommatrix-tostring branch from 67fbb5f to 081bbe7 Compare May 12, 2017 09:07
@zcorpan
Copy link
Copy Markdown
Contributor Author

zcorpan commented May 12, 2017

@domenic can you r?

hubot pushed a commit to WebKit/WebKit-http that referenced this pull request May 15, 2017
https://bugs.webkit.org/show_bug.cgi?id=172114

Reviewed by Simon Fraser.

Source/WebCore:

Align WebKitCSSMatrix stringifier with spec for DOMMatrix after:
- w3c/fxtf-drafts#148

The following changes were made:
- Use EcmaScript's ToString() to convert floating point values to string
- Throw an invalid state error if the matrix contains non-finite values
- Made WebKitCSSMatrix.toString enumerable as per [1].

[1] https://heycam.github.io/webidl/#es-stringifier

Test: fast/css/matrix-stringifier.html

* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::toString):
* css/WebKitCSSMatrix.h:
* css/WebKitCSSMatrix.idl:
* platform/graphics/transforms/TransformationMatrix.cpp:
(WebCore::TransformationMatrix::containsOnlyFiniteValues):
* platform/graphics/transforms/TransformationMatrix.h:

LayoutTests:

* fast/css/matrix-stringifier-expected.txt: Added.
* fast/css/matrix-stringifier.html: Added.
Add layout test coverage.

* fast/dom/Window/custom-constructors-expected.txt:
* fast/dom/Window/custom-constructors.html:
Rebaseline existing test to reflect behavior change.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@216881 268f45cc-cd09-0410-ab3c-d52691b4dbfc
@zcorpan zcorpan merged commit 840c3b9 into master May 16, 2017
@tabatkins tabatkins removed the ready label May 16, 2017
@zcorpan zcorpan deleted the zcorpan/dommatrix-tostring branch May 16, 2017 10:00
zcorpan added a commit to web-platform-tests/wpt that referenced this pull request May 16, 2017
ryanhaddad pushed a commit to WebKit/WebKit that referenced this pull request Dec 22, 2020
https://bugs.webkit.org/show_bug.cgi?id=172114

Reviewed by Simon Fraser.

Source/WebCore:

Align WebKitCSSMatrix stringifier with spec for DOMMatrix after:
- w3c/fxtf-drafts#148

The following changes were made:
- Use EcmaScript's ToString() to convert floating point values to string
- Throw an invalid state error if the matrix contains non-finite values
- Made WebKitCSSMatrix.toString enumerable as per [1].

[1] https://heycam.github.io/webidl/#es-stringifier

Test: fast/css/matrix-stringifier.html

* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::toString):
* css/WebKitCSSMatrix.h:
* css/WebKitCSSMatrix.idl:
* platform/graphics/transforms/TransformationMatrix.cpp:
(WebCore::TransformationMatrix::containsOnlyFiniteValues):
* platform/graphics/transforms/TransformationMatrix.h:

LayoutTests:

* fast/css/matrix-stringifier-expected.txt: Added.
* fast/css/matrix-stringifier.html: Added.
Add layout test coverage.

* fast/dom/Window/custom-constructors-expected.txt:
* fast/dom/Window/custom-constructors.html:
Rebaseline existing test to reflect behavior change.

Canonical link: https://commits.webkit.org/189058@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216881 268f45cc-cd09-0410-ab3c-d52691b4dbfc
@w3c w3c deleted a comment from pixlephonexl Dec 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants