Bug 84191

Summary: GraphicsContextCG's roundToDevicePixels should round even when there's no transform
Product: WebKit Reporter: Levi Weintraub <leviw>
Component: Layout and RenderingAssignee: Levi Weintraub <leviw>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, eae, eric, jchaffraix, mitz, simon.fraser, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 60318    
Attachments:
Description Flags
Patch
none
Patch none

Description Levi Weintraub 2012-04-17 13:54:10 PDT
Currently, if there's no transform on the graphics context, the CG implementation of GraphicsContext::roundToDevicePixels returns the rect passed in instead of rounding. This breaks text underlines when sub-pixel layout is enabled.
Comment 1 Levi Weintraub 2012-04-17 14:20:30 PDT
Created attachment 137601 [details]
Patch
Comment 2 Eric Seidel (no email) 2012-04-17 17:04:33 PDT
Comment on attachment 137601 [details]
Patch

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

Wouldn't rect.round() do the same thing?  Or do we call it roundedIntRect(rect)?  In either case, I would be surprised if the float -> int -> float conversion would matter, and would save adding a couple lines of code.

> Source/WebCore/ChangeLog:11
> +        end up being more than on3e pixel wide. This adds a static inline rounding method and uses it for

on3e
Comment 3 Levi Weintraub 2012-04-18 11:15:28 PDT
Created attachment 137728 [details]
Patch
Comment 4 Eric Seidel (no email) 2012-04-18 11:54:33 PDT
Comment on attachment 137728 [details]
Patch

LGTM.
Comment 5 Levi Weintraub 2012-04-18 11:55:53 PDT
Comment on attachment 137728 [details]
Patch

Thanks Eric :)
Comment 6 WebKit Review Bot 2012-04-18 13:05:27 PDT
Comment on attachment 137728 [details]
Patch

Clearing flags on attachment: 137728

Committed r114548: <http://trac.webkit.org/changeset/114548>
Comment 7 WebKit Review Bot 2012-04-18 13:05:32 PDT
All reviewed patches have been landed.  Closing bug.