[Webkit-unassigned] [Bug 50521] [Qt] Improper rendering of <button> tag when it contains a <br>

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 16 08:15:06 PST 2011


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





--- Comment #6 from aravind.akella at nokia.com  2011-02-16 08:15:07 PST ---
Yes, by  linux machines I mean linux desktops running QtTestBrowser.

RenderThemeQt.cpp .. 
RenderThemeQt::adjustButtonStyle(..,Element *e) calls the setSizeMethod which in turn calls the computeSizeBasedOnStyle().

If we can count the number of <br>s in the <button> element, we can set the content size to a string with an equal number of newlines('\n').

For ..
<Button>
line1 <br>
line2 </Button>
We can set 
QSize contentSize = fm.size(Qt::TextShowMnemonic,QString::fromLatin1("X \n X")); 

But if the button element contains <b> or <i> tags the actual size may be a little bigger than the computedSize. Will a solution along these lines be acceptable ?

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