Update Position member variables in FrameSelection after Text::splitText()

This patch changes Document::textNodeSplit(), which is called by Text::splitText(), to call FrameSelection::textNodeSplit() for updating Position member variables in VisibleSelection hold by FrameSelection and to call Document::textNodeSplit() before RenderText::setTextWithOffset() to update renderer for split text node.

This patch also introduces FrameSelection::updateSelectionIfNeeded() to share code between updatePositionAfterAdoptingTextReplacement() and updatePostionAfterAdoptingTextNodeSplit().

This patch is a part of fixing issue 240594.

BUG=240594
TEST=LayoutTests/editing/selection/selection-after-split-text-node.html
R=tkent@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@157272 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix threading races on HRTFElevation::audioBusMap

According to the crash report (https://cluster-fuzz.appspot.com/testcase?key=6291334197411840),
there is a threading race in HRTFElevation::getConcatenatedImpulseResponsesForSubject.

static PassRefPtr<AudioBus> getConcatenatedImpulseResponsesForSubject(...) {
    typedef HashMap<String, RefPtr<AudioBus> > AudioBusMap;
    DEFINE_STATIC_LOCAL(AudioBusMap, audioBusMap, ());
    RefPtr<AudioBus> bus;
    AudioBusMap::iterator iterator = audioBusMap.find(subjectName); // (A)
    if (iterator == audioBusMap.end()) {
        ...;
        audioBusMap.set(subjectName, bus);  // (B)
    }
}

It's possible that:

(1) Thread 1 executes (A)
(2) Thread 2 executes (A)
(3) Thread 1 executes (B)
(4) Thread 2 executes (B) and crashes.

This CL protects accesses to the AudioBusMap with mutex.

BUG=270758
No tests because the crash depends on threading races and thus not reproducible.

Review URL: https://chromiumcodereview.appspot.com/23613007

git-svn-id: svn://svn.chromium.org/blink/trunk@157273 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove the support of DoNotCrossUpperBoundary mode from ComposedTreeWalker.

FocusController has been the only user of *DoNotCrossUpperBoundary* mode. I have updated FocusController so that it can traverse nodes based on a tree of trees without using ComposedTreeWalker recently.

Now we can remove DoNotCrossUpperBoundary mode from ComposedTreeWalker.

BUG=None

Review URL: https://chromiumcodereview.appspot.com/23865003

git-svn-id: svn://svn.chromium.org/blink/trunk@157274 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Let ScopedStyleResolver::treeScope() return a reference instead of a pointer.

This is a simple refactoring and is a follow-up of r157111.

BUG=none
R=hayato@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23471006

git-svn-id: svn://svn.chromium.org/blink/trunk@157275 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Scrollbar::create no longer needs to be called createNativeScrollbar

Hold-over abstraction from webkit.org

Review URL: https://chromiumcodereview.appspot.com/23530032

git-svn-id: svn://svn.chromium.org/blink/trunk@157276 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Replace WebCore::highestAncestor(), in htmledigint.cpp, by Node::highestAncestor()

This patch replaces WebCore::highestAncestor() by Node::highestAncesotr() to reduce code size since both implementations are identical.

BUG=n/a
TEST=n/a; No behavior changes.
R=tkent@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@157277 bbb929c8-8fbe-4397-9dbb-9b2b20218538