WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
25500
Remove Range::compareBoundaryPoints(Position, Position) per Darin's suggestion in
bug 25056
https://bugs.webkit.org/show_bug.cgi?id=25500
Summary
Remove Range::compareBoundaryPoints(Position, Position) per Darin's suggestio...
Eric Seidel (no email)
Reported
2009-04-30 16:58:42 PDT
Remove Range::compareBoundaryPoints(Position, Position) per Darin's suggestion in
bug 25056
Darin indicated the Range should deal only with primitive DOM node/offset pairs, and that Position (which is a more robust editing construct) should have its own comparison functions and that Range.h should not mention Position at all. Turns out that Position already has a comparePositions() function (which knows how to additionally handled positions in shadow trees). So I've just changed all callers of compareBoundaryPoints(Position, Position) to use the existing comparePositions() function. I've also added a comparePositions which takes VisiblePositions for convenience.
Attachments
Remove Range::compareBoundaryPoints(Position, Position) per Darin's suggestion in bug 25056
(16.90 KB, patch)
2009-04-30 17:01 PDT
,
Eric Seidel (no email)
mjs
: review+
Details
Formatted Diff
Diff
Add a compareBoundaryPoints which takes RangeBoundaryPoints
(4.45 KB, patch)
2009-04-30 17:14 PDT
,
Eric Seidel (no email)
mjs
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Eric Seidel (no email)
Comment 1
2009-04-30 17:01:20 PDT
Created
attachment 29930
[details]
Remove Range::compareBoundaryPoints(Position, Position) per Darin's suggestion in
bug 25056
11 files changed, 77 insertions(+), 34 deletions(-)
Eric Seidel (no email)
Comment 2
2009-04-30 17:14:14 PDT
Created
attachment 29931
[details]
Add a compareBoundaryPoints which takes RangeBoundaryPoints 3 files changed, 32 insertions(+), 11 deletions(-)
Maciej Stachowiak
Comment 3
2009-05-21 20:26:09 PDT
Comment on
attachment 29930
[details]
Remove Range::compareBoundaryPoints(Position, Position) per Darin's suggestion in
bug 25056
Is the VisiblePosition version of comparePositions ever used? I couldn't tell from the diff. If not, I suggest removing it.
Maciej Stachowiak
Comment 4
2009-05-22 01:06:54 PDT
Comment on
attachment 29931
[details]
Add a compareBoundaryPoints which takes RangeBoundaryPoints r=me
Maciej Stachowiak
Comment 5
2009-05-22 01:09:49 PDT
Comment on
attachment 29930
[details]
Remove Range::compareBoundaryPoints(Position, Position) per Darin's suggestion in
bug 25056
Mostly looks ok. But please remove this function if it's not actually used. Would rather not add dead code. +int comparePositions(const VisiblePosition& a, const VisiblePosition& b) +{ + return comparePositions(a.deepEquivalent(), b.deepEquivalent()); +} +
Eric Seidel (no email)
Comment 6
2009-06-02 14:31:27 PDT
Committing to
http://svn.webkit.org/repository/webkit/trunk
... M WebCore/ChangeLog M WebCore/dom/Range.cpp M WebCore/dom/Range.h M WebCore/editing/ApplyStyleCommand.cpp M WebCore/editing/CompositeEditCommand.cpp M WebCore/editing/DeleteSelectionCommand.cpp M WebCore/editing/SelectionController.cpp M WebCore/editing/VisibleSelection.cpp M WebCore/editing/htmlediting.cpp M WebCore/editing/htmlediting.h M WebCore/page/EventHandler.cpp Committed
r44367
M WebCore/ChangeLog M WebCore/dom/Range.cpp M WebCore/dom/Range.h Committed
r44368
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