Commit 784dbf3b authored by yosin@chromium.org's avatar yosin@chromium.org

Get rid of unused member function toNormalizedRange() from FrameSelection and...

Get rid of unused member function toNormalizedRange() from FrameSelection and VisibleSelection classes

This patch gets rid of unused member function |toNormalizedRange()| from
|FrameSelection| and |VisibleSelection| classes with re-formatting an associated
comment for improving code health.

BUG=n/a
TEST=n/a; no behavior changes

Review URL: https://codereview.chromium.org/1315513005

git-svn-id: svn://svn.chromium.org/blink/trunk@201206 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent e4c842a4
......@@ -169,8 +169,6 @@ public:
// the return value from underlying VisibleSelection's firstRange() is returned.
PassRefPtrWillBeRawPtr<Range> firstRange() const;
PassRefPtrWillBeRawPtr<Range> toNormalizedRange() const { return m_selection.toNormalizedRange(); }
void nodeWillBeRemoved(Node&);
void didUpdateCharacterData(CharacterData*, unsigned offset, unsigned oldLength, unsigned newLength);
void didMergeTextNodes(const Text& oldNode, unsigned offset);
......
......@@ -240,11 +240,6 @@ bool VisibleSelection::intersectsNode(Node* node) const
return Range::intersectsNode(node, start, end, exceptionState) && !exceptionState.hadException();
}
PassRefPtrWillBeRawPtr<Range> VisibleSelection::toNormalizedRange() const
{
return createRange(toNormalizedEphemeralRange());
}
template <typename Strategy>
static EphemeralRangeTemplate<Strategy> normalizeRangeAlgorithm(const EphemeralRangeTemplate<Strategy>& range)
{
......
......@@ -155,11 +155,10 @@ public:
bool intersectsNode(Node*) const;
// FIXME: Most callers probably don't want these functions, but
// are using them for historical reasons. toNormalizedRange and
// toNormalizedEphemeralRange contracts the range around text, and
// moves the caret upstream before returning the range/positions.
PassRefPtrWillBeRawPtr<Range> toNormalizedRange() const;
// TODO(yosin) Most callers probably don't want these functions, but
// are using them for historical reasons. |toNormalizedEphemeralRange()|
// contracts the range around text, and moves the caret most backward
// visually equivalent position before returning the range/positions.
EphemeralRange toNormalizedEphemeralRange() const;
static EphemeralRange normalizeRange(const EphemeralRange&);
static EphemeralRangeInComposedTree normalizeRange(const EphemeralRangeInComposedTree&);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment