- orientation.setRespectImageOrientation(renderer->shouldRespectImageOrientation());
- orientation.setImageOrientationEnum(renderer->style().imageOrientation());
+ auto& renderElement = downcast<RenderElement>(*renderer);
+ orientation.setRespectImageOrientation(renderElement.shouldRespectImageOrientation());
+ orientation.setImageOrientationEnum(renderElement.style().imageOrientation());