WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
152088
TextPainter: Rename start and end position to selectionStart and selectionEnd.
https://bugs.webkit.org/show_bug.cgi?id=152088
Summary
TextPainter: Rename start and end position to selectionStart and selectionEnd.
zalan
Reported
2015-12-09 12:17:35 PST
that's what they are.
Attachments
Patch
(7.63 KB, patch)
2015-12-09 12:21 PST
,
zalan
mmaxfield
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
zalan
Comment 1
2015-12-09 12:21:40 PST
Created
attachment 267035
[details]
Patch
WebKit Commit Bot
Comment 2
2015-12-09 12:23:05 PST
Attachment 267035
[details]
did not pass style-queue: ERROR: Source/WebCore/rendering/TextPainter.cpp:94: Wrong number of spaces before statement. (expected: 8) [whitespace/indent] [4] ERROR: Source/WebCore/rendering/TextPainter.cpp:95: Wrong number of spaces before statement. (expected: 8) [whitespace/indent] [4] Total errors found: 2 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Simon Fraser (smfr)
Comment 3
2015-12-09 12:25:39 PST
Comment on
attachment 267035
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=267035&action=review
> Source/WebCore/rendering/TextPainter.h:49 > + int selectionStart, int selectionEnd, int length, const AtomicString& emphasisMark, RenderCombineText*, > + TextRun&, FloatRect& boxRect, FloatPoint& textOrigin, int emphasisMarkOffset, const ShadowData* textShadow, const ShadowData* selectionShadow,
I think 'selection' here is confusing. Is it really "selected" text, or just the start/end bits to paint?
zalan
Comment 4
2015-12-09 12:34:37 PST
(In reply to
comment #3
)
> Comment on
attachment 267035
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=267035&action=review
> > > Source/WebCore/rendering/TextPainter.h:49 > > + int selectionStart, int selectionEnd, int length, const AtomicString& emphasisMark, RenderCombineText*, > > + TextRun&, FloatRect& boxRect, FloatPoint& textOrigin, int emphasisMarkOffset, const ShadowData* textShadow, const ShadowData* selectionShadow, > > I think 'selection' here is confusing. Is it really "selected" text, or just > the start/end bits to paint?
It is really the start and the end of the selected text. TextPainter::paintText() could be called with (!paintSelectedTextOnly and paintSelectedTextSeparately) which means we end up painting the non-selected text from 0-selectionStart and selectionEnd-length and then the selection run from selectionStart-selectionEnd.
zalan
Comment 5
2015-12-09 12:44:43 PST
(In reply to
comment #3
)
> Comment on
attachment 267035
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=267035&action=review
> > > Source/WebCore/rendering/TextPainter.h:49 > > + int selectionStart, int selectionEnd, int length, const AtomicString& emphasisMark, RenderCombineText*, > > + TextRun&, FloatRect& boxRect, FloatPoint& textOrigin, int emphasisMarkOffset, const ShadowData* textShadow, const ShadowData* selectionShadow, > > I think 'selection' here is confusing. Is it really "selected" text, or just > the start/end bits to paint?
Also, 0/0 values are passed in when selection is not present(and we end up painting the run from 0-length)
zalan
Comment 6
2015-12-09 13:22:25 PST
Committed
r193857
: <
http://trac.webkit.org/changeset/193857
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug