Bug 135686

Summary: Subpixel rendering: Border thickness and length flooring can result empty borders due to losing precision during multiple float <-> LayoutUnit conversions.
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Severity: Normal CC: commit-queue, ddkilzer, esprehn+autocc, glenn, kondapallykalyan, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 135898    
Description Flags
Patch none

Description zalan 2014-08-06 20:18:48 PDT
in RenderObject::drawLineForBoxSide() we check whether the border thickness and length are > 0. Flooring is used to avoid painting empty lines.
In certain cases, when we lose precession while converting float <-> LayoutUnit back and forth, flooring a border width value of 0.5px (before conversions and 0.49999 after conversions) becomes 0 and we early return from painting.
Comment 1 zalan 2014-08-06 20:33:47 PDT
Created attachment 236169 [details]
Comment 2 Simon Fraser (smfr) 2014-08-07 13:52:12 PDT
Comment on attachment 236169 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=236169&action=review

> Source/WebCore/ChangeLog:10
> +        empty border rect drawing can lead to false positives.

false positives of what?
Comment 3 zalan 2014-08-07 20:13:01 PDT
Created attachment 236256 [details]
Comment 4 WebKit Commit Bot 2014-08-07 20:52:00 PDT
Comment on attachment 236256 [details]

Clearing flags on attachment: 236256

Committed r172326: <http://trac.webkit.org/changeset/172326>
Comment 5 WebKit Commit Bot 2014-08-07 20:52:03 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 David Kilzer (:ddkilzer) 2015-01-05 20:41:57 PST
(In reply to comment #4)
> Comment on attachment 236256 [details]
> Patch
> Clearing flags on attachment: 236256
> Committed r172326: <http://trac.webkit.org/changeset/172326>

Note that this change caused:

Bug 135898: Dashed/dotted borders do not paint.