RESOLVED FIXED 24467
[chromium] default border for IMG is drawn outset instead of inset
https://bugs.webkit.org/show_bug.cgi?id=24467
Summary [chromium] default border for IMG is drawn outset instead of inset
Darin Fisher (:fishd, Google)
Reported 2009-03-09 13:22:42 PDT
[chromium] default border for IMG is drawn outset instead of inset GraphicsContext::drawRect is passed the right rectangle, but instead of drawing a rect within those coordinates, we draw it outside of those coordinates. this causes some layout tests to fail, and it also causes some rendering glitches related to selection. if a selection runs up to the edge of an IMG, then the selection obscures part of the IMG border, and when the selection is removed, the border is not redrawn properly (presumably because webcore didn't think the IMG was part of the selection). this layout test is impacted: LayoutTests/fast/block/float/nested-clearance.html
Attachments
patch v1 (5.32 KB, patch)
2009-03-13 13:50 PDT, Peter Kasting
no flags
patch v1.1 (5.73 KB, patch)
2009-03-13 14:07 PDT, Peter Kasting
eric: review+
Peter Kasting
Comment 1 2009-03-13 12:16:43 PDT
The CG drawRect() forcefully draws an inset border using four rects instead of actually using the stroke. Hyatt hates this but suggests that for now we change to match and put a FIXME in the cross-platform header warning other implementers until this can be fixed.
Eric Seidel (no email)
Comment 2 2009-03-13 12:35:01 PDT
We could also change the name of drawRect() to be self-documenting. :)
Peter Kasting
Comment 3 2009-03-13 13:50:00 PDT
Created attachment 28595 [details] patch v1 This makes drawRect() ignore the stroke width (like CG does), and adds a warning comment about that to the appropriate header. It also eliminates some hacky code in Skia's stroke preparation, which seems inappropriate because (a) it didn't match CG's behavior and (b) it would do something obviously wrong when other transforms (e.g. global zoom) were applied.
Peter Kasting
Comment 4 2009-03-13 14:07:50 PDT
Created attachment 28598 [details] patch v1.1 Updated ChangeLog to add more comments per eseidel.
Eric Seidel (no email)
Comment 5 2009-03-13 14:22:11 PDT
Comment on attachment 28598 [details] patch v1.1 Looks fine. Please update the changelog to talk a bit more about the "hacky" code you removed when landing. :)
Peter Kasting
Comment 6 2009-03-13 14:26:34 PDT
Fixed in r41683.
Note You need to log in before you can comment on or make changes to this bug.