Bug 19591 - [Qt] Dotted and solid borders are not drawn at the same position
Summary: [Qt] Dotted and solid borders are not drawn at the same position
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Minor
Assignee: Nobody
Keywords: Qt
Depends on:
Reported: 2008-06-16 11:41 PDT by Pierre-Luc Beaudoin
Modified: 2009-12-01 08:43 PST (History)
2 users (show)

See Also:

Test case (476 bytes, text/html)
2008-06-16 11:43 PDT, Pierre-Luc Beaudoin
no flags Details
Different testcase (563 bytes, text/html)
2008-06-26 08:45 PDT, Pierre-Luc Beaudoin
no flags Details
Possible fix (1.50 KB, patch)
2008-06-26 08:50 PDT, Pierre-Luc Beaudoin
hausmann: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre-Luc Beaudoin 2008-06-16 11:41:24 PDT
Dotted borders are not replaced by a solid border on the 4 sides (bottom and right are off by 1px) in test case (coming up).
Comment 1 Pierre-Luc Beaudoin 2008-06-16 11:43:24 PDT
Created attachment 21739 [details]
Test case

Actually, all 4 sides seems off by (-1px, -1px) if (0,0) if the upper left corner.

To see this bug, hover the links with your mouse: the solid border is off.
Comment 2 Pierre-Luc Beaudoin 2008-06-26 08:45:30 PDT
Created attachment 21948 [details]
Different testcase

This one has more line sizes
Comment 3 Pierre-Luc Beaudoin 2008-06-26 08:50:04 PDT
Created attachment 21949 [details]
Possible fix

This fixes the issue by forcing anti-aliasing. My guess is that after calling adjustLineToPixelBoundaries(), the added 0.5 is floored when AA is off.
Comment 4 Simon Hausmann 2008-07-26 06:42:40 PDT
Comment on attachment 21949 [details]
Possible fix

Sorry, I don't see anti-aliasing making any difference here. 

But the real problem is that right now we can't afford to enable anti-aliasing for dotted lines, it's too slow.
Comment 5 Jocelyn Turcotte 2009-12-01 08:43:02 PST
I am not able to reproduce this problem in 4.5.3 or 4.6.0

This is an old bug and I will resolve it guessing that it was fixed.
Please re-open if i'm wrong.