Bug 28113

Summary: [Qt] QtWebKit (using the Arora browser) displays the border radii (radius) of a button very ugly
Product: WebKit Reporter: Shlomi Fish <shlomif>
Component: Layout and RenderingAssignee: Allan Sandfeld Jensen <allan.jensen>
Status: RESOLVED FIXED    
Severity: Normal CC: allan.jensen, andri, chalkerx, fabrizio.machado, gwright, jturcotte, laszlo.gombos, tonikitoo
Priority: P2 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
URL: http://perl-begin.org/tutorials/perl-for-newbies/part1/
Bug Depends on:    
Bug Blocks: 88186, 110211    
Attachments:
Description Flags
The button as it looks in Arora.
none
The button as it looks in Arora on Windows.
none
screenshot of still present defect when using border-radius
none
Patch
none
Patch none

Description Shlomi Fish 2009-08-08 13:39:14 PDT
I'm using Arora, which is a browser based on QtWebKit on Mandriva Linux Cooker, and am trying to use it to render:

http://perl-begin.org/tutorials/perl-for-newbies/part1/

Now it has a button called "Show Navigation Controls", which has the following CSS:

<<<<<<<<<<<
.toggle_nav_control, .toggle_nav_control:hover
{
    padding: 1em;
    -moz-border-radius: 10px;
    -webkit-border-radius: 10px;
    border-radius: 10px;
    border: 2pt solid black;
}
>>>>>>>>>>>

Now Firefox and git://xn--55d.com/kickass.git (a WebKit and Perl/Gtk based browser) displays the button all crisp and beautiful, but it looks horrible on Arora. It has rounded corners, but they are positively ugly.

I'll attach a screenshot shortly.

Regards,

-- Shlomi Fish
Comment 1 Shlomi Fish 2009-08-08 13:46:30 PDT
Created attachment 34397 [details]
The button as it looks in Arora.

This is the button as it looks in Arora. One can see that it looks pixelated, and that the horizontal and vertical radii are uneven.
Comment 2 George Wright 2009-08-14 09:08:54 PDT
This appears to be a problem with the Qt rendering backend; it renders correctly when using the raster rendering backend.
Comment 3 Jocelyn Turcotte 2010-03-08 06:28:01 PST
Reproduced on Linux.
Renders correctly on Windows.
Comment 4 Jocelyn Turcotte 2010-03-10 06:19:40 PST
Created attachment 50400 [details]
The button as it looks in Arora on Windows.
Comment 5 Jocelyn Turcotte 2010-03-10 06:24:18 PST
This bug might be related to bug #31644.
Comment 6 Jesus Sanchez-Palencia 2010-05-13 15:06:27 PDT
Works on Snow Leopard with Qt 4.7 trunk (HEAD 03f8f1df0d88f5ffe0b3120cffce614cbeefdb70) and WebKit trunk (r59155), tested on QtLauncher.

Also works on Linux, tested with '-graphicssystem raster'.
Comment 7 Jocelyn Turcotte 2010-05-18 03:19:41 PDT
*** Bug 31644 has been marked as a duplicate of this bug. ***
Comment 8 Fabrizio 2011-02-25 05:25:54 PST
Created attachment 83797 [details]
screenshot of still present defect when using border-radius
Comment 9 Fabrizio 2011-02-25 05:29:56 PST
This bug is still present, with or without "-graphicssystem raster".  

There is a visible difference when using using the raster backend, but the imperfections are still apparent and rounded corners are pixelated.  Screenshot shows comparison with Chrome, where borders are smooth and not jagged.

This bug should be re-opened.
Comment 10 Сковорода Никита 2013-08-17 02:30:29 PDT
Testcases:

http://oserv.org/bugs/qtwebkit-border-radius/test1.html — bad (but seems to depend on the version and enviroment)
http://oserv.org/bugs/qtwebkit-border-radius/test1a.html — good
http://oserv.org/bugs/qtwebkit-border-radius/test2.html — bad (even in Qt 5.1)
http://oserv.org/bugs/qtwebkit-border-radius/test2a.html —- good

Can someone reopen this, please?
Comment 11 Сковорода Никита 2013-08-17 02:30:51 PDT
Related: https://bugreports.qt-project.org/browse/QTWEBKIT-355
Comment 12 Allan Sandfeld Jensen 2013-08-17 03:03:54 PDT
Reopen since we still have cases without antialiasing.
Comment 13 Allan Sandfeld Jensen 2013-08-19 01:57:38 PDT
Created attachment 209067 [details]
Patch
Comment 14 Allan Sandfeld Jensen 2013-08-19 01:59:19 PDT
StylePainterQStyle would call StylePainter::init() twice, the second time that would overwrite m_previousAntialiasing so that when the StylePainter is closed we would disable antialiasing.
Comment 15 Allan Sandfeld Jensen 2013-08-19 02:41:54 PDT
Created attachment 209069 [details]
Patch
Comment 16 Allan Sandfeld Jensen 2013-08-19 03:18:08 PDT
Comment on attachment 209069 [details]
Patch

Clearing flags on attachment: 209069

Committed r154270: <http://trac.webkit.org/changeset/154270>
Comment 17 Allan Sandfeld Jensen 2013-08-19 03:18:14 PDT
All reviewed patches have been landed.  Closing bug.
Comment 18 Сковорода Никита 2013-08-20 12:32:57 PDT
Thank you, I will test my original source (from which the above testcases were extracted) when the new version will be released and packaged for my distribution.
If there will be any rendering glitches, I will make another testcase and post it here.