WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
228635
Align implementation of PositionIterator::isCandidate() on Position::isCandidate()
https://bugs.webkit.org/show_bug.cgi?id=228635
Summary
Align implementation of PositionIterator::isCandidate() on Position::isCandid...
Frédéric Wang (:fredw)
Reported
2021-07-30 05:47:50 PDT
Follow-up of
https://trac.webkit.org/changeset/280381/webkit
This can cause subtle bug, so we should avoid that they go out of sync.
Attachments
Patch
(5.43 KB, patch)
2021-07-30 06:02 PDT
,
Frédéric Wang (:fredw)
darin
: review+
Details
Formatted Diff
Diff
Patch for landing
(5.44 KB, patch)
2021-08-02 23:07 PDT
,
Frédéric Wang (:fredw)
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Frédéric Wang (:fredw)
Comment 1
2021-07-30 06:02:49 PDT
Created
attachment 434616
[details]
Patch
Frédéric Wang (:fredw)
Comment 2
2021-07-30 06:03:32 PDT
Comment on
attachment 434616
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=434616&action=review
> Source/WebCore/dom/Position.cpp:970 > +// This function should be keep in sync with PositionIterator::isCandidate().
kept*
> Source/WebCore/dom/PositionIterator.cpp:148 > +// This function should be keep in sync with Position::isCandidate().
kept*
Darin Adler
Comment 3
2021-08-02 10:05:28 PDT
Comment on
attachment 434616
[details]
Patch Seems like a good idea, and having no effect on any test is a mixed bag (is it really an improvement if it’s not detectable?). Can we do a further improvement and make most of this be shared code, too?
Frédéric Wang (:fredw)
Comment 4
2021-08-02 23:07:00 PDT
Created
attachment 434819
[details]
Patch for landing
Frédéric Wang (:fredw)
Comment 5
2021-08-02 23:14:00 PDT
(In reply to Darin Adler from
comment #3
)
> Seems like a good idea, and having no effect on any test is a mixed bag (is > it really an improvement if it’s not detectable?).
Yeah, I considered writing tests but I'm not sure how difficult it is. For example in
r280381
there was some subtle things happening and the crash test did not work without using a <button>. It seems more urgent to make the two functions in sync than having to spend time on testing that can be covered by fuzzing instead.
> Can we do a further improvement and make most of this be shared code, too?
OK, I opened
bug 228729
for that. But again there are some subtle diffs when m_anchorType is used, so I preferred not to touch that for now.
EWS
Comment 6
2021-08-02 23:54:12 PDT
Committed
r280585
(
240207@main
): <
https://commits.webkit.org/240207@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 434819
[details]
.
Radar WebKit Bug Importer
Comment 7
2021-08-02 23:55:17 PDT
<
rdar://problem/81447460
>
Darin Adler
Comment 8
2021-08-03 13:23:05 PDT
(In reply to Frédéric Wang (:fredw) from
comment #5
)
> (In reply to Darin Adler from
comment #3
) > > Seems like a good idea, and having no effect on any test is a mixed bag (is > > it really an improvement if it’s not detectable?). > > Yeah, I considered writing tests but I'm not sure how difficult it is. For > example in
r280381
there was some subtle things happening and the crash test > did not work without using a <button>. It seems more urgent to make the two > functions in sync than having to spend time on testing that can be covered > by fuzzing instead.
Not sure that I agree. Where is the evidence that this is covered by fuzzing? I think the tests may be *more* valuable than code changes that by making things more consistent *might* make things better.
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