| Index: third_party/WebKit/Source/core/dom/Document.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
|
| index ed4d6b502cce34ed584c1032117a196c92425462..8e9a89ffebfe67538eb7b1c5958dab300ff0b6e1 100644
|
| --- a/third_party/WebKit/Source/core/dom/Document.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Document.cpp
|
| @@ -2488,7 +2488,6 @@ void Document::shutdown() {
|
| // Since |Document| class has multiple |LifecycleNotifier| as base class,
|
| // we need to have |static_cast<SynchronousMutationNotifier>| here.
|
| static_cast<SynchronousMutationNotifier*>(this)->notifyContextDestroyed();
|
| - m_frame->selection().documentDetached(*this);
|
|
|
| // If this Document is associated with a live DocumentLoader, the
|
| // DocumentLoader will take care of clearing the FetchContext. Deferring
|
| @@ -4217,8 +4216,6 @@ void Document::nodeChildrenWillBeRemoved(ContainerNode& container) {
|
| }
|
|
|
| notifyNodeChildrenWillBeRemoved(container);
|
| - if (LocalFrame* frame = this->frame())
|
| - frame->selection().nodeChildrenWillBeRemoved(container);
|
|
|
| if (containsV1ShadowTree()) {
|
| for (Node& n : NodeTraversal::childrenOf(container))
|
| @@ -4235,10 +4232,6 @@ void Document::nodeWillBeRemoved(Node& n) {
|
|
|
| notifyNodeWillBeRemoved(n);
|
|
|
| - if (LocalFrame* frame = this->frame()) {
|
| - frame->selection().nodeWillBeRemoved(n);
|
| - }
|
| -
|
| if (containsV1ShadowTree())
|
| n.checkSlotChangeBeforeRemoved();
|
|
|
| @@ -4246,11 +4239,6 @@ void Document::nodeWillBeRemoved(Node& n) {
|
| styleEngine().elementWillBeRemoved(toElement(n));
|
| }
|
|
|
| -void Document::dataWillChange(const CharacterData& characterData) {
|
| - if (LocalFrame* frame = this->frame())
|
| - frame->selection().dataWillChange(characterData);
|
| -}
|
| -
|
| void Document::didInsertText(Node* text, unsigned offset, unsigned length) {
|
| for (Range* range : m_ranges)
|
| range->didInsertText(text, offset, length);
|
| @@ -4266,16 +4254,16 @@ void Document::didRemoveText(Node* text, unsigned offset, unsigned length) {
|
| m_markers->shiftMarkers(text, offset + length, 0 - length);
|
| }
|
|
|
| -void Document::didMergeTextNodes(Text& oldNode, unsigned offset) {
|
| +void Document::didMergeTextNodes(const Text& mergedNode,
|
| + const Text& nodeToBeRemoved,
|
| + unsigned oldLength) {
|
| + NodeWithIndex nodeToBeRemovedWithIndex(const_cast<Text&>(nodeToBeRemoved));
|
| if (!m_ranges.isEmpty()) {
|
| - NodeWithIndex oldNodeWithIndex(oldNode);
|
| for (Range* range : m_ranges)
|
| - range->didMergeTextNodes(oldNodeWithIndex, offset);
|
| + range->didMergeTextNodes(nodeToBeRemovedWithIndex, oldLength);
|
| }
|
|
|
| - notifyMergeTextNodes(oldNode, offset);
|
| - if (m_frame)
|
| - m_frame->selection().didMergeTextNodes(oldNode, offset);
|
| + notifyMergeTextNodes(mergedNode, nodeToBeRemovedWithIndex, oldLength);
|
|
|
| // FIXME: This should update markers for spelling and grammar checking.
|
| }
|
| @@ -4285,8 +4273,6 @@ void Document::didSplitTextNode(const Text& oldNode) {
|
| range->didSplitTextNode(oldNode);
|
|
|
| notifySplitTextNode(oldNode);
|
| - if (m_frame)
|
| - m_frame->selection().didSplitTextNode(oldNode);
|
|
|
| // FIXME: This should update markers for spelling and grammar checking.
|
| }
|
|
|