-
robert@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=93735 Reviewed by Darin Adler. Source/WebCore: Replaced elements that aren't RenderReplaced aren't |isReplaced| and don't have an intrinsic height or width. This causes them to go down the wrong height and width computation path in RenderBox when they are absolute positioned. The notion of |isReplaced| is entwined with the notion of being |isInline| so it isn't really possible to make them isReplaced without re-wiring a lot of code. So instead use an ad-hoc definition of isReplacedElement in RenderBox to bring all replaced elements into the height and width calculation. To make sure we get the right height and width in there, give non-RenderReplaced replaced renderers the helpers for returning their approximation of intrinsic height and width. Test: fast/replaced/width-and-height-of-positioned-replaced-elements.html * rendering/RenderBox.cpp: (WebCore::isReplacedElement): (WebCore::RenderBox::computePositionedLogicalWidth): (WebCore::RenderBox::computePositionedLogicalHeight): * rendering/RenderBox.h: (WebCore::RenderBox::intrinsicSize): * rendering/RenderButton.h: * rendering/RenderListBox.cpp: (WebCore::RenderListBox::RenderListBox): (WebCore::RenderListBox::computeLogicalHeight): * rendering/RenderListBox.h: * rendering/RenderMenuList.h: * rendering/RenderReplaced.h: * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::RenderTextControl): (WebCore::RenderTextControl::computeLogicalHeight): * rendering/RenderTextControl.h: LayoutTests: * fast/forms/onselect-textfield-expected.txt: * fast/replaced/width-and-height-of-positioned-replaced-elements-expected.png: Added. * fast/replaced/width-and-height-of-positioned-replaced-elements-expected.txt: Added. * fast/replaced/width-and-height-of-positioned-replaced-elements.html: Added. * platform/mac-wk2/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.txt: Added. * platform/mac/fast/forms/button-positioned-expected.txt: * platform/mac/fast/forms/input-appearance-preventDefault-expected.txt: * platform/mac/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.txt: Added. * platform/qt/fast/forms/button-positioned-expected.txt: * platform/qt/fast/forms/input-appearance-preventDefault-expected.txt: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151451 268f45cc-cd09-0410-ab3c-d52691b4dbfc
d30055a8