Bug 138913

Summary: FrameSelection::selectionBounds rarely matches the painted selection highlight rect
Product: WebKit Reporter: Tim Horton <thorton>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: bdakin, enrica, hyatt, sam, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=178232
Bug Depends on: 178032    
Bug Blocks:    

Tim Horton
Reported 2014-11-20 00:11:05 PST
There are a number of places between selection painting and the rect returned by FrameSelection::selectionBounds where rounding is applied inconsistently, resulting in a rect that doesn't precisely match the painted pixels. For example, RenderView::subtreeSelectionBounds does a 'enclosingBoundingBox', and InlineTextBox::localSelectionRect does a 'enclosingIntRect' instead of 'snapRectToDevicePixelsWithWritingDirection' (which is what happens in the painting code). This means that FrameSnapshotting::snapshotSelection often returns a snapshot that doesn't precisely match the blue highlight. This also breaks TextIndicator's BounceAndCrossfade animation, which depends on that being true.
Attachments
Radar WebKit Bug Importer
Comment 1 2014-11-20 00:37:50 PST
Note You need to log in before you can comment on or make changes to this bug.