Sometime recently-ish, an element without a transform started returning 'none' as a computed style. This breaks existing code that simply pushes the computed style into the WebKitCSSMatrix constructor, since it does not accept the 'none' string. Update the constructor to accept 'none'. <rdar://problem/8844355>
Created attachment 78577 [details] Patch
Comment on attachment 78577 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=78577&action=review > LayoutTests/transforms/cssmatrix-2d-interface.xhtml:19 > +function testConstructor(desc, parameter) { > + var m = null; > + m = new WebKitCSSMatrix(parameter); > + if (m) > + testPassed(desc); > + else > + testFailed(desc); > +} No need for this, since you can do 1-line tests: shouldBeNull('"new WebKitCSSMatrix(foopy)"') or similar (with some quoting magic). > LayoutTests/transforms/cssmatrix-2d-interface.xhtml:31 > +var m = new WebKitCSSMatrix(); > if (m) > testPassed("default constructor"); > else > testFailed("default constructor"); These should be 1-liners using shouldBeNull() etc. > Source/WebCore/css/WebKitCSSMatrix.cpp:61 > - PassRefPtr<CSSValue> val = styleDeclaration->getPropertyCSSValue(CSSPropertyWebkitTransform); > + CSSValue* value = styleDeclaration->getPropertyCSSValue(CSSPropertyWebkitTransform).get(); This should be a RefPtr<CSSValue>
Created attachment 78586 [details] Patch
Landed in http://trac.webkit.org/changeset/75542