WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 25057
24045
Split out positionAvoidingIgnoredContent from rangeCompliantEquivalent
https://bugs.webkit.org/show_bug.cgi?id=24045
Summary
Split out positionAvoidingIgnoredContent from rangeCompliantEquivalent
Eric Seidel (no email)
Reported
2009-02-19 16:35:19 PST
Split out positionAvoidingIgnoredContent from rangeCompliantEquivalent rangeCompliantEquivilent turns (table, 0) into (table->parentNode(), table->childIndex()) and the same with nodes which are "ignored" for editing (like <input>, <textarea>, and replaced elements). This logic should *not* be tied into rangeCompliantEquivilent (whose sole responsibility should be to convert from our internal (img, 1) positions to ones which are in terms of the parent, and thus work with Range, like (img->parentNode(), img->childIndex() + 1). Thus I'm proposing splitting out a new positionAvoidingIgnoredContent function which can be used in addition to rangeCompliantEquivilent in the few places where it's actually needed.
Attachments
split out positionAvoidingIgnoredContent from toRangeCompliantEquivalent and make Position members private
(46.17 KB, patch)
2009-02-25 11:15 PST
,
Eric Seidel (no email)
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Justin Garcia
Comment 1
2009-02-19 17:22:35 PST
This is a good idea.
Eric Seidel (no email)
Comment 2
2009-02-25 11:14:49 PST
Ok, so I've done this, but it makes half of the editing tests fail... but I've not yet seen it actually cause a problem. It's because I'm less aggressively avoiding ignored content as part of this patch. :( I think I might have to change all the cases to avoid ignored editing content so I don't change the Layout Test results.
Eric Seidel (no email)
Comment 3
2009-02-25 11:15:18 PST
Created
attachment 27973
[details]
split out positionAvoidingIgnoredContent from toRangeCompliantEquivalent and make Position members private WebCore/WebCore.base.exp | 2 +- WebCore/dom/Position.cpp | 54 ++++++++++++++-- WebCore/dom/Position.h | 52 ++++++++++------ WebCore/dom/Range.cpp | 8 ++- WebCore/dom/RangeBoundaryPoint.h | 48 +++++++------- WebCore/editing/ApplyStyleCommand.cpp | 4 +- WebCore/editing/CompositeEditCommand.cpp | 14 ++--- WebCore/editing/DeleteSelectionCommand.cpp | 32 +++++----- WebCore/editing/Editor.cpp | 4 +- WebCore/editing/InsertLineBreakCommand.cpp | 2 +- .../editing/InsertParagraphSeparatorCommand.cpp | 18 ++--- WebCore/editing/ReplaceSelectionCommand.cpp | 2 +- WebCore/editing/VisiblePosition.cpp | 57 ++++++++--------- WebCore/editing/VisiblePosition.h | 4 +- WebCore/editing/VisibleSelection.cpp | 29 ++++----- WebCore/editing/htmlediting.cpp | 61 ++++++----------- WebCore/editing/htmlediting.h | 3 +- WebCore/editing/visible_units.cpp | 68 +++++++++----------- WebCore/page/DOMSelection.cpp | 20 ++---- WebKit/mac/WebView/WebFrame.mm | 8 +-- 20 files changed, 250 insertions(+), 240 deletions(-)
Eric Seidel (no email)
Comment 4
2009-04-06 02:26:23 PDT
Going to do this a different way now, see
bug 25057
. *** This bug has been marked as a duplicate of
25057
***
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