Bug 38337 - CSSMatrix.multiply() method works backwards relative to SVGMatrix
: CSSMatrix.multiply() method works backwards relative to SVGMatrix
Status: RESOLVED FIXED
Product: WebKit
Classification: Unclassified
Component: CSS
: 528+ (Nightly build)
: All OS X 10.5
: P2 Normal
Assigned To: Chris Marrin
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-29 11:37 PDT by Chris Marrin
Modified: 2010-05-12 14:36 PDT (History)
5 users (show)

See Also:


Attachments
Testcase showing the problem (6.66 KB, application/xhtml+xml)
2010-04-29 11:38 PDT, Chris Marrin
no flags Details
Better testcase which doesn't need extra JS files (911 bytes, text/html)
2010-04-29 11:56 PDT, Chris Marrin
no flags Details
CSS vs. SVG testcase (4.78 KB, application/xhtml+xml)
2010-04-29 14:41 PDT, Simon Fraser (smfr)
no flags Details
Patch with testcases (22.49 KB, patch)
2010-04-29 16:14 PDT, Chris Marrin
no flags Details | Formatted Diff | Diff
replacement patch with test cases (94.35 KB, patch)
2010-04-29 16:39 PDT, Chris Marrin
no flags Details | Formatted Diff | Diff
Fixed new test case so pixel results don't cutoff some of the image (80.71 KB, patch)
2010-04-30 09:18 PDT, Chris Marrin
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Marrin 2010-04-29 11:37:58 PDT
Attached test case shows this behavior. It fails in TOT, but the equivalent multiply works correctly for SVGMatrix in TOT. In particular, this code:

m = new WebKitCSSMatrix("matrix(1, 2, 3, 4, 5, 6)");
m2 = new WebKitCSSMatrix("matrix(7, 8, 9, 10, 11, 12)");
var m3 = m.multiply(m2);
shouldBe('parseFloat(m3.a)', '31');
shouldBe('parseFloat(m3.b)', '46');
shouldBe('parseFloat(m3.c)', '39');
shouldBe('parseFloat(m3.d)', '58');
shouldBe('parseFloat(m3.e)', '52');
shouldBe('parseFloat(m3.f)', '76');

Fails the shouldBe tests showing that we are multiplying on the right rather than the left like SVG
Comment 1 Chris Marrin 2010-04-29 11:38:26 PDT
Created attachment 54724 [details]
Testcase showing the problem
Comment 2 Simon Fraser (smfr) 2010-04-29 11:40:36 PDT
See http://lists.w3.org/Archives/Public/public-fx/2010AprJun/0022.html
Comment 3 Chris Marrin 2010-04-29 11:56:57 PDT
Created attachment 54725 [details]
Better testcase which doesn't need extra JS files
Comment 4 Simon Fraser (smfr) 2010-04-29 14:41:47 PDT
Created attachment 54735 [details]
CSS vs. SVG testcase
Comment 5 Chris Marrin 2010-04-29 16:14:49 PDT
Created attachment 54752 [details]
Patch with testcases
Comment 6 Chris Marrin 2010-04-29 16:39:00 PDT
Created attachment 54754 [details]
replacement patch with test cases
Comment 7 WebKit Review Bot 2010-04-29 16:40:51 PDT
Attachment 54754 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1
LayoutTests/ChangeLog:30:  Line contains tab character.  [whitespace/tab] [5]
LayoutTests/ChangeLog:31:  Line contains tab character.  [whitespace/tab] [5]
LayoutTests/ChangeLog:33:  Line contains tab character.  [whitespace/tab] [5]
LayoutTests/ChangeLog:35:  Line contains tab character.  [whitespace/tab] [5]
Total errors found: 4 in 13 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 Chris Marrin 2010-04-30 09:18:15 PDT
Created attachment 54808 [details]
Fixed new test case so pixel results don't cutoff some of the image
Comment 9 Chris Marrin 2010-04-30 10:37:13 PDT
Landed in http://trac.webkit.org/changeset/58584
Comment 10 WebKit Review Bot 2010-04-30 10:47:32 PDT
http://trac.webkit.org/changeset/58584 might have broken GTK Linux 32-bit Release
Comment 11 Simon Fraser (smfr) 2010-05-12 14:36:40 PDT
See bug 38953.