RESOLVED FIXED 46485
Generalize from RenderBox to RenderBoxModelObject for getTransformFromContainer
https://bugs.webkit.org/show_bug.cgi?id=46485
Summary Generalize from RenderBox to RenderBoxModelObject for getTransformFromContainer
Abhishek Arya
Reported 2010-09-24 10:52:18 PDT
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.
Attachments
Patch (1.70 KB, patch)
2010-09-24 11:14 PDT, Abhishek Arya
simon.fraser: review+
Abhishek Arya
Comment 1 2010-09-24 10:52:49 PDT
This fix is so as to comply with the spec, although the current code does not work on things other than RenderBox.
Abhishek Arya
Comment 2 2010-09-24 11:14:39 PDT
Abhishek Arya
Comment 3 2010-09-24 11:22:21 PDT
Note You need to log in before you can comment on or make changes to this bug.