[Webkit-unassigned] [Bug 107380] Specifying the width/height of an input element modifies its margin
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Jan 20 21:00:43 PST 2013
https://bugs.webkit.org/show_bug.cgi?id=107380
--- Comment #2 from Takashi Sakamoto <tasak at google.com> 2013-01-20 21:02:33 PST ---
I think, this is caused by StyleResolver:
static void addIntrinsicMargins(RenderStyle* style)
{
....
if (style->height().isAuto()) {
if (style->marginTop().quirk())
style->setMarginTop(Length(intrinsicMargin, Fixed));
if (style->marginBottom().quirk())
style->setMarginBottom(Length(intrinsicMargin, Fixed));
}
}
and StyleResolver::adjustRenderStyle():
if (e && e->isFormControlElement() && style->fontSize() >= 11) {
if (!e->hasTagName(inputTag) || !static_cast<HTMLInputElement*>(e)->isI\
mageButton())
addIntrinsicMargins(style);
}
Since input's default height is auto and margin is 0__qem, its margin top will be "2px" (intrinsicMargin = 2). After setting input's height, e.g. 16px, the height is not auto and no addIntrinsicMargins is invoked. The marginTop is "0px".
Best regards,
Takashi Sakamoto
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list