[webkit-reviews] review requested: [Bug 27183] REGRESSION: document.documentElement.getScreenCTM() returns incorrect matrix. : [Attachment 52178] Initial patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Mar 31 09:11:28 PDT 2010
Nikolas Zimmermann <zimmermann at kde.org> has asked for review:
Bug 27183: REGRESSION: document.documentElement.getScreenCTM() returns
incorrect matrix.
https://bugs.webkit.org/show_bug.cgi?id=27183
Attachment 52178: Initial patch
https://bugs.webkit.org/attachment.cgi?id=52178&action=review
------- Additional Comments from Nikolas Zimmermann <zimmermann at kde.org>
Phew, this was more tricky than I thought. This is only a regression, because
of pure luck. The getScreenCTM() implementation was just plain wrong.
When we added support to handle non-SVG parent elements (mixed content
documents, ie. a <div> containing a <svg>) the implementation of getScreenCTM()
got worse. It has never been correct so far, and finally is after this patch.
Checked all testcases against Opera / Firefox, which both have bugs.
Firefox mixes up getCTM/getScreenCTM: when using absolute positioned <div>
object containing a <svg> it lists the left/top CSS translation as translation
values in the getCTM matrix, instead of just in the getScreenCTM matrix. Opera
gets all of this right. Opera has another bug leading to null matrices in
getCTM() when using viewBox on a <svg> fragment in a XHTML document.
I double-checked all testcases, by hand (fun to multiply this by hand and
verify ;-) and I'm happy with it now.
More information about the webkit-reviews
mailing list