SVG foreignObject wrong container
https://bugs.webkit.org/show_bug.cgi?id=64780

Patch by Ken Buchanan <kenrb@chromium.org> on 2011-11-09
Reviewed by Simon Fraser.

Source/WebCore:

Resubmitting a patch originally by scottmg@chromium.org.
In determining where to add to m_positionedObjects during a repaint,
containingBlock is used, which adds the absolute positioned object to
the containing foreignObject. But, when the contained object is
dirtied, container() was used to dirty up the tree, which skipped over
the foreignObject causing the wrong parent to needsLayout(). This fix
makes container() and containingBlock() handle svg foreignObject's in
the same way.

This patch will cause svg/overflow/overflow-on-foreignObject.svg to
require rebaselined results on qt and gtk ports.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::container):

LayoutTests:

Added layout test for 64780 fix, rebaselined a test that it broke.
This will cause gtk and qt ports to also need rebaseline.

* platform/mac/svg/overflow/overflow-on-foreignObject-expected.png: Rebaseline
* platform/mac/svg/overflow/overflow-on-foreignObject-expected.txt: Rebaseline
* svg/foreignObject/absolute-position-foreign-object-child-crash.html: Added
* svg/foreignObject/absolute-position-foreign-object-child-crash-expected.txt: Added

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
7 files changed