summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Iacovitti <aiacovitti@libero.it>2011-09-17 09:13:29 (GMT)
committerAndrea Iacovitti <aiacovitti@libero.it>2011-09-17 09:13:29 (GMT)
commit4b41e546a12ae4ccf7930f78ed09fe7a6ea745d0 (patch)
tree2dfb9f404603243ce7a1911a6a4e04aae3f9ba65
parent07d20a558da67fb9f849e2b20c52cf275ea01794 (diff)
Fix baseline position for checkboxes and radio buttons.
BUG: 281405 FIXED-IN: 4.7.2
-rw-r--r--khtml/rendering/render_form.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/khtml/rendering/render_form.cpp b/khtml/rendering/render_form.cpp
index 3302920..24bcbe1 100644
--- a/khtml/rendering/render_form.cpp
+++ b/khtml/rendering/render_form.cpp
@@ -331,7 +331,10 @@ RenderButton::RenderButton(HTMLGenericFormElementImpl *element)
short RenderButton::baselinePosition( bool f ) const
{
- return RenderWidget::baselinePosition( f ) - 2;
+ int ret = (height()-RenderWidget::paddingTop()-RenderWidget::paddingBottom()+1)/2;
+ ret += marginTop() + RenderWidget::paddingTop();
+ ret += ((fontMetrics( f ).ascent())/2)-1;
+ return ret;
}
void RenderButton::layout()