[GeometryInferface] add Constructor(DOMString transformList).
1. if transformList is the empty string,
set in to the string "matrix(1, 0, 0, 1, 0, 0)".
2. Parse transformList by following the syntax description[1].
if parsing failed, throw SyntaxError.
3. Set is2D to false if the <transform-list> consists of any 3D
Transform functions. Otherwise set is2D to true.
4. Transform all <transform-function>s to 4x4 matrices.
5. Post-multiply all matrices from left to right.
6. Return the result of invoking create a matrix of type
DOMMatrixReadOnly or DOMMatrix as appropriate.
spec list:
https://drafts.fxtf.org/geometry/#dom-dommatrix-dommatrix-transformlist
[1] = https://drafts.csswg.org/css-transforms-1/#svg-syntax
BUG=388780, 660819
Committed: https://crrev.com/59c27f138a1ef700d4adb552e8a9c0452d7a8d4e
Cr-Commit-Position: refs/heads/master@{#438107}
Description was changed from
==========
[WIP][GeometryInferface] add Constructor(DOMString transformList).
1. if transformList is the empty string,
set in to the string "matrix(1, 0, 0, 1, 0, 0)".
2. Parse transformList by following the syntax description[1].
if parsing failed, throw SyntaxError.
3. Set is2D to false if the <transform-list> consists of any 3D
Transform functions. Otherwise set is2D to true.
4. Transform all <transform-function>s to 4x4 matrices.
5. Post-multiply all matrices from left to right.
6. Return the result of invoking create a matrix of type
DOMMatrixReadOnly or DOMMatrix as appropriate.
spec list:
https://drafts.fxtf.org/geometry/#dom-dommatrix-dommatrix-transformlist
BUG=388780, 660819
==========
to
==========
[GeometryInferface] add Constructor(DOMString transformList).
1. if transformList is the empty string,
set in to the string "matrix(1, 0, 0, 1, 0, 0)".
2. Parse transformList by following the syntax description[1].
if parsing failed, throw SyntaxError.
3. Set is2D to false if the <transform-list> consists of any 3D
Transform functions. Otherwise set is2D to true.
4. Transform all <transform-function>s to 4x4 matrices.
5. Post-multiply all matrices from left to right.
6. Return the result of invoking create a matrix of type
DOMMatrixReadOnly or DOMMatrix as appropriate.
spec list:
https://drafts.fxtf.org/geometry/#dom-dommatrix-dommatrix-transformlist
[1] = https://drafts.csswg.org/css-transforms-1/#svg-syntax
BUG=388780, 660819
==========
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
https://codereview.chromium.org/2516973002/diff/60001/third_party/WebKit/Source/core/dom/DOMMatrix.cpp File third_party/WebKit/Source/core/dom/DOMMatrix.cpp (right): https://codereview.chromium.org/2516973002/diff/60001/third_party/WebKit/Source/core/dom/DOMMatrix.cpp#newcode257 third_party/WebKit/Source/core/dom/DOMMatrix.cpp:257: return static_cast<DOMMatrix*>( This casting isn't a right way. I ...
@zino i fixed it. https://codereview.chromium.org/2516973002/diff/100001/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp File third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp (right): https://codereview.chromium.org/2516973002/diff/100001/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp#newcode101 third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp:101: return new DOMMatrixReadOnly(transformList, exceptionState); On ...
i fixed something which you comment. could you review again? https://codereview.chromium.org/2516973002/diff/140001/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly.html File third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly.html (right): https://codereview.chromium.org/2516973002/diff/140001/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly.html#newcode111 ...
i fixed something which you comment.
could you review again?
https://codereview.chromium.org/2516973002/diff/140001/third_party/WebKit/Lay...
File
third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly.html
(right):
https://codereview.chromium.org/2516973002/diff/140001/third_party/WebKit/Lay...
third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly.html:111:
assert_throws(new SyntaxError(), () => { new DOMMatrixReadOnly(1, 2, 3, 4, 5,
6); },
On 2016/12/05 08:03:45, dominicc wrote:
> Could we have tests for the relative lengths and box-size dependent cases?
Done.
https://codereview.chromium.org/2516973002/diff/140001/third_party/WebKit/Sou...
File third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp (right):
https://codereview.chromium.org/2516973002/diff/140001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp:375: "Relative lengths
not supported.");
On 2016/12/05 08:03:45, dominicc wrote:
> Maybe something which mentions "must" and "absolute lengths"? That's how the
> spec is written. "not supported" leaves some doubt in my mind whether it's
just
> a Chrome limitation or something, but this is a spec requirement.
>
> Same below for box size.
i modified strings. is it fine?
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
https://codereview.chromium.org/2516973002/diff/160001/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly.html File third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly.html (right): https://codereview.chromium.org/2516973002/diff/160001/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly.html#newcode120 third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly.html:120: "Must have an absolute unit."); Let's make these descriptive ...
https://codereview.chromium.org/2516973002/diff/160001/third_party/WebKit/Lay...
File
third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly.html
(right):
https://codereview.chromium.org/2516973002/diff/160001/third_party/WebKit/Lay...
third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly.html:120:
"Must have an absolute unit.");
Let's make these descriptive about what's being tested. For example something
like "using relative units should throw a SyntaxError".
This description makes it sound like it's OK to have relative units as long as
you have *one* absolute unit, which isn't right.
In general test assertion descriptions which use 'should' tend to be easy to
understand.
Be consistent. Above you started with a lower initial c for can't but here you
you caps Must.
I think if you look at test harness errors you shouldn't end with a period--I
think it adds one where it echoes the test failure message--but double check to
be sure.
https://codereview.chromium.org/2516973002/diff/160001/third_party/WebKit/Sou...
File third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp (right):
https://codereview.chromium.org/2516973002/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp:376: "Must have an
absolute lengths. It contains a relative lenghts");
Spelling--lengths
Grammar--"a relative" is signular but "lengths" is plural.
I'm not sure about not ending with a period when you're writing two sentences
this way. What about:
"Lengths must be absolute"
or
"Lengths must be absolute, not relative"
https://codereview.chromium.org/2516973002/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp:387: "Must have an
absolute lengths. The "
Maybe "Lengths must be absolute, not depend on the box size"
Hwanseung Lee
https://codereview.chromium.org/2516973002/diff/160001/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly.html File third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly.html (right): https://codereview.chromium.org/2516973002/diff/160001/third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly.html#newcode120 third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly.html:120: "Must have an absolute unit."); On 2016/12/06 08:44:24, dominicc ...
https://codereview.chromium.org/2516973002/diff/160001/third_party/WebKit/Lay...
File
third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly.html
(right):
https://codereview.chromium.org/2516973002/diff/160001/third_party/WebKit/Lay...
third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-readonly.html:120:
"Must have an absolute unit.");
On 2016/12/06 08:44:24, dominicc wrote:
> Let's make these descriptive about what's being tested. For example something
> like "using relative units should throw a SyntaxError".
>
> This description makes it sound like it's OK to have relative units as long as
> you have *one* absolute unit, which isn't right.
>
> In general test assertion descriptions which use 'should' tend to be easy to
> understand.
>
> Be consistent. Above you started with a lower initial c for can't but here you
> you caps Must.
>
> I think if you look at test harness errors you shouldn't end with a period--I
> think it adds one where it echoes the test failure message--but double check
to
> be sure.
i checked test harness errors message. your thought is right.
so i removed period at end of test description.
https://codereview.chromium.org/2516973002/diff/160001/third_party/WebKit/Sou...
File third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp (right):
https://codereview.chromium.org/2516973002/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp:376: "Must have an
absolute lengths. It contains a relative lenghts");
On 2016/12/06 08:44:24, dominicc wrote:
> Spelling--lengths
>
> Grammar--"a relative" is signular but "lengths" is plural.
>
> I'm not sure about not ending with a period when you're writing two sentences
> this way. What about:
>
> "Lengths must be absolute"
>
> or
>
> "Lengths must be absolute, not relative"
Done.
https://codereview.chromium.org/2516973002/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp:387: "Must have an
absolute lengths. The "
On 2016/12/06 08:44:24, dominicc wrote:
> Maybe "Lengths must be absolute, not depend on the box size"
Done.
Description was changed from
==========
[GeometryInferface] add Constructor(DOMString transformList).
1. if transformList is the empty string,
set in to the string "matrix(1, 0, 0, 1, 0, 0)".
2. Parse transformList by following the syntax description[1].
if parsing failed, throw SyntaxError.
3. Set is2D to false if the <transform-list> consists of any 3D
Transform functions. Otherwise set is2D to true.
4. Transform all <transform-function>s to 4x4 matrices.
5. Post-multiply all matrices from left to right.
6. Return the result of invoking create a matrix of type
DOMMatrixReadOnly or DOMMatrix as appropriate.
spec list:
https://drafts.fxtf.org/geometry/#dom-dommatrix-dommatrix-transformlist
[1] = https://drafts.csswg.org/css-transforms-1/#svg-syntax
BUG=388780, 660819
==========
to
==========
[GeometryInferface] add Constructor(DOMString transformList).
1. if transformList is the empty string,
set in to the string "matrix(1, 0, 0, 1, 0, 0)".
2. Parse transformList by following the syntax description[1].
if parsing failed, throw SyntaxError.
3. Set is2D to false if the <transform-list> consists of any 3D
Transform functions. Otherwise set is2D to true.
4. Transform all <transform-function>s to 4x4 matrices.
5. Post-multiply all matrices from left to right.
6. Return the result of invoking create a matrix of type
DOMMatrixReadOnly or DOMMatrix as appropriate.
spec list:
https://drafts.fxtf.org/geometry/#dom-dommatrix-dommatrix-transformlist
[1] = https://drafts.csswg.org/css-transforms-1/#svg-syntax
BUG=388780, 660819
Review-Url: https://codereview.chromium.org/2516973002
==========
Description was changed from
==========
[GeometryInferface] add Constructor(DOMString transformList).
1. if transformList is the empty string,
set in to the string "matrix(1, 0, 0, 1, 0, 0)".
2. Parse transformList by following the syntax description[1].
if parsing failed, throw SyntaxError.
3. Set is2D to false if the <transform-list> consists of any 3D
Transform functions. Otherwise set is2D to true.
4. Transform all <transform-function>s to 4x4 matrices.
5. Post-multiply all matrices from left to right.
6. Return the result of invoking create a matrix of type
DOMMatrixReadOnly or DOMMatrix as appropriate.
spec list:
https://drafts.fxtf.org/geometry/#dom-dommatrix-dommatrix-transformlist
[1] = https://drafts.csswg.org/css-transforms-1/#svg-syntax
BUG=388780, 660819
Review-Url: https://codereview.chromium.org/2516973002
==========
to
==========
[GeometryInferface] add Constructor(DOMString transformList).
1. if transformList is the empty string,
set in to the string "matrix(1, 0, 0, 1, 0, 0)".
2. Parse transformList by following the syntax description[1].
if parsing failed, throw SyntaxError.
3. Set is2D to false if the <transform-list> consists of any 3D
Transform functions. Otherwise set is2D to true.
4. Transform all <transform-function>s to 4x4 matrices.
5. Post-multiply all matrices from left to right.
6. Return the result of invoking create a matrix of type
DOMMatrixReadOnly or DOMMatrix as appropriate.
spec list:
https://drafts.fxtf.org/geometry/#dom-dommatrix-dommatrix-transformlist
[1] = https://drafts.csswg.org/css-transforms-1/#svg-syntax
BUG=388780, 660819
Committed: https://crrev.com/59c27f138a1ef700d4adb552e8a9c0452d7a8d4e
Cr-Commit-Position: refs/heads/master@{#438107}
==========
commit-bot: I haz the power
Patchset 10 (id:??) landed as https://crrev.com/59c27f138a1ef700d4adb552e8a9c0452d7a8d4e Cr-Commit-Position: refs/heads/master@{#438107}
Issue 2516973002: [GeometryInferface] add Constructor(DOMString transformList).
(Closed)
Created 4 years, 1 month ago by Hwanseung Lee
Modified 4 years ago
Reviewers: dominicc (has gone to gerrit), zino
Base URL:
Comments: 20