-
mitz@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=82684 Reviewed by Simon Fraser. Source/WebCore: Tests: fast/writing-mode/flipped-blocks-inline-map-local-to-container-expected.html fast/writing-mode/flipped-blocks-inline-map-local-to-container.html In flipped blocks writing modes, flipping was being applied twice to box descendants of inline children of the flipped block, once during RenderBox::mapLocalToContainer, and then again by RenderInline::mapLocalToContainer. The fix is to make the latter only apply the flip to local coordinates originating in the inline or a descendant inline. This is done by adding a parameter of type ApplyContainerFlipOrNot, which defaults to ApplyContainerFlip but is reset to DoNotApplyContainerFlip in recursive calls into mapLocalToContainer(). * rendering/RenderBox.cpp: (WebCore::RenderBox::mapLocalToContainer): Added ApplyContainerFlipOrNot parameter, passing DoNotApplyContainerFlip when recursing into the container. * rendering/RenderBox.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::mapLocalToContainer): Added ApplyContainerFlipOrNot paramerer, and made the flipping conditional on its value. * rendering/RenderInline.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::mapLocalToContainer): Added ApplyContainerFlipOrNot parameter, passing DoNotApplyContainerFlip when recursing into the container. (WebCore::RenderObject::localToContainerQuad): Pass ApplyContainerFlip. (WebCore::RenderObject::localToContainerPoint): Ditto. * rendering/RenderObject.h: * rendering/RenderView.cpp: (WebCore::RenderView::mapLocalToContainer): Added ApplyContainerFlipOrNot parameter. * rendering/RenderView.h: * rendering/svg/RenderSVGForeignObject.cpp: (WebCore::RenderSVGForeignObject::mapLocalToContainer): Ditto. * rendering/svg/RenderSVGForeignObject.h: * rendering/svg/RenderSVGInline.cpp: (WebCore::RenderSVGInline::mapLocalToContainer): Ditto. * rendering/svg/RenderSVGInline.h: * rendering/svg/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::mapLocalToContainer): Ditto. * rendering/svg/RenderSVGModelObject.h: * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::mapLocalToContainer): Ditto. * rendering/svg/RenderSVGRoot.h: * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::mapLocalToContainer): Ditto. * rendering/svg/RenderSVGText.h: * rendering/svg/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::mapLocalToContainer): Pass DoNotApplyContainerFlip when recursing into the parent. LayoutTests: * fast/writing-mode/flipped-blocks-inline-map-local-to-container-expected.html: Added. * fast/writing-mode/flipped-blocks-inline-map-local-to-container.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
e2feae9e