Fixing as per Simon's comments: Comment #5 From Simon Fraser (smfr) 2010-09-24 10:38:50 PST (-) [reply] I think a better fix would be: diff --git a/WebCore/rendering/RenderObject.cpp b/WebCore/rendering/RenderObject.cpp index 39ee309..346cd8b 100644 --- a/WebCore/rendering/RenderObject.cpp +++ b/WebCore/rendering/RenderObject.cpp @@ -1988,10 +1988,10 @@ void RenderObject::getTransformFromContainer(const RenderObject* containerObject transform.multLeft(layer->currentTransform()); #if ENABLE(3D_RENDERING) - if (containerObject && containerObject->isBox() && containerObject->hasLayer() && containerObject->style()->hasPerspective()) { + if (containerObject && containerObject->hasLayer() && containerObject->style()->hasPerspective()) { // Perpsective on the container affects us, so we have to factor it in here. ASSERT(containerObject->hasLayer()); - FloatPoint perspectiveOrigin = toRenderBox(containerObject)->layer()->perspectiveOrigin(); + FloatPoint perspectiveOrigin = toRenderBoxModelObject(containerObject)->layer()->perspectiveOrigin(); TransformationMatrix perspectiveMatrix; perspectiveMatrix.applyPerspective(containerObject->style()->perspective()); Nowhere do we state that something has to be a box to have perspective.
This fix is so as to comply with the spec, although the current code does not work on things other than RenderBox.
Created attachment 68716 [details] Patch
Committed r68278: <http://trac.webkit.org/changeset/68278>