[Webkit-unassigned] [Bug 110654] Empty <button>s should collapse; empty <input type="button"> should not collapse

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 22 18:27:54 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=110654





--- Comment #12 from Ojan Vafai <ojan at chromium.org>  2013-02-22 18:30:18 PST ---
(From update of attachment 189883)
View in context: https://bugs.webkit.org/attachment.cgi?id=189883&action=review

Looks good. We should probably make RenderButton::hasLineIfEmpty so that we match other browsers, but that should probably be a separate patch.

> Source/WebCore/rendering/RenderFlexibleBox.cpp:734
> +        setHeight(height() + lineHeight(true, style()->isHorizontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes));

Also, I know the deprecated flexbox code did this but there a few things I'd change:
-Just call isHorizontalWritingMode(). It caches the style value.
-s/setHeight/setLogicalHeight/
-s/height()/borderAndPaddingLogicalHeight()/ I'm not 100% sure about this, but I think that's what the old code was trying to achieve and it's more explicit this way.

> Source/WebCore/rendering/RenderFlexibleBox.cpp:735
> +    if (!haveLine && hasLineIfEmpty()) {
> +        setHeight(height() + lineHeight(true, style()->isHorizontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes));
> +    }

One line if shouldn't have braces.

-- 
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