[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:
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.
We could also change the name of drawRect() to be self-documenting. :)
Created attachment 28595 [details]
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.
Created attachment 28598 [details]
Updated ChangeLog to add more comments per eseidel.
Comment on attachment 28598 [details]
Looks fine. Please update the changelog to talk a bit more about the "hacky" code you removed when landing. :)
Fixed in r41683.