Templatize functions in htmlediting.cpp
Templatize functions in htmlediting.cpp

This patch templatizes functions in "htmlediting.cpp", which are called during
constructing |VisblePositon|, for a preparation of making |VisiblePosition|
class to work with position in composed tree:
 - lastEditablePositionBeforePositionInRoot()
 - nextCandidate()
 - previousCandidate()
 - previousVisuallyDistinctCandidate()

This patch is result of collaboration work with hajimehoshi@chromium.org
for selection of web components. After this patch, we are going to
implement another strategies for the composed tree. We've already
prepared that at http://crrev.com/1106433002.

BUG=275851
TEST=n/a; No behavior changes.

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

git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@197330 bbb929c8-8fbe-4397-9dbb-9b2b20218538

Pluto-tv/blink-crosswalk,Pluto-tv/blink-crosswalk,Pluto-tv/blink-crosswalk,Pluto-tv/blink-crosswalk,Pluto-tv/blink-crosswalk,Pluto-tv/blink-crosswalk,Pluto-tv/blink-crosswalk,Pluto-tv/blink-crosswalk,Pluto-tv/blink-crosswalk,Pluto-tv/blink-crosswalk