Bug 280445 - left/right padding not applied to input text
Summary: left/right padding not applied to input text
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml forms (show other bugs)
Version: 4.7.3
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-19 21:09 UTC by Andrea Iacovitti
Modified: 2012-05-09 10:25 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.8.3


Attachments
testcase (162 bytes, text/html)
2011-08-19 21:09 UTC, Andrea Iacovitti
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea Iacovitti 2011-08-19 21:09:03 UTC
Created attachment 62987 [details]
testcase

Version:           4.7.0
OS:                Linux

khtml doesn't render input text with specified left/right padding

Reproducible: Always

Steps to Reproduce:
Load the testcase


Expected Results:  
:)

It seems KHTMLProxyStyle is broken here (patch):

+++ render_form.cpp
@@ -101,7 +101,7 @@
                 SubElement element, const QStyleOption *option, const QWidget *widget
             ) const
         {
-            QRect r = proxy()->subElementRect(element, option, widget);
+            QRect r = style()->subElementRect(element, option, widget);
             switch (element) {
               case QStyle::SE_PushButtonContents:
               case QStyle::SE_LineEditContents:
Comment 1 Andrea Iacovitti 2012-04-20 06:20:36 UTC
Git commit dee2801c0a86fec1c642da9710b17b0a7bec3ecd by Andrea Iacovitti.
Committed on 20/04/2012 at 08:18.
Pushed by aiacovitti into branch 'KDE/4.8'.

Fix rendering of text input elements having padding by removing the use
of cached parent's proxy style, that end up to return a wrong content rect
size, and using ad-hoc style() function instead. Actually only KLineEdit
inherits KdeUiProxyStyle (since kde 4.5) so the behavior of our internal
proxy is unchanged for the other form elements (i.e m_proxy was always 0 for them).

Also the crash reported in #197270 is no longer reproducible after this change,
likely it has been fixed elsewhere...
Related: bug 280226
FIXED-IN: 4.8.3

M  +7    -11   khtml/rendering/render_form.cpp

http://commits.kde.org/kdelibs/dee2801c0a86fec1c642da9710b17b0a7bec3ecd
Comment 2 Ivan Čukić 2012-05-09 10:25:32 UTC
Git commit 658759cb7c436af133b770bc50c99219dff10814 by Ivan Čukić, on behalf of Andrea Iacovitti.
Committed on 20/04/2012 at 08:18.
Pushed by ivan into branch 'ivan/plasma-active-patches'.

Fix rendering of text input elements having padding by removing the use
of cached parent's proxy style, that end up to return a wrong content rect
size, and using ad-hoc style() function instead. Actually only KLineEdit
inherits KdeUiProxyStyle (since kde 4.5) so the behavior of our internal
proxy is unchanged for the other form elements (i.e m_proxy was always 0 for them).

Also the crash reported in #197270 is no longer reproducible after this change,
likely it has been fixed elsewhere...
Related: bug 280226
FIXED-IN: 4.8.3

M  +7    -11   khtml/rendering/render_form.cpp

http://commits.kde.org/kdelibs/658759cb7c436af133b770bc50c99219dff10814