Bug 152104 - TextPainter: Make before and after selection painting more explicit.
Summary: TextPainter: Make before and after selection painting more explicit.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-09 19:40 PST by zalan
Modified: 2015-12-09 21:00 PST (History)
6 users (show)

See Also:


Attachments
Patch (6.96 KB, patch)
2015-12-09 19:54 PST, zalan
mmaxfield: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2015-12-09 19:40:46 PST
Instead of swapping start and end positions, we should call 0-startPosition and endPosition-length drawText calls.
Comment 1 zalan 2015-12-09 19:54:38 PST
Created attachment 267068 [details]
Patch
Comment 2 Myles C. Maxfield 2015-12-09 20:48:36 PST
Comment on attachment 267068 [details]
Patch

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

> Source/WebCore/rendering/TextPainter.cpp:172
>          // For stroked painting, we have to change the text drawing mode. It's probably dangerous to leave that mutated as a side

Comment should probably go above the GraphicsContextStateSaver.

> Source/WebCore/rendering/TextPainter.cpp:184
>      // paint only the text that is selected

Period makes it a sentence.
Comment 3 zalan 2015-12-09 21:00:18 PST
Committed r193891: <http://trac.webkit.org/changeset/193891>