OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
7 * rights reserved. | 7 * rights reserved. |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
(...skipping 4298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4309 if (containsV1ShadowTree()) | 4309 if (containsV1ShadowTree()) |
4310 n.checkSlotChangeBeforeRemoved(); | 4310 n.checkSlotChangeBeforeRemoved(); |
4311 | 4311 |
4312 if (n.inActiveDocument() && n.isElementNode()) | 4312 if (n.inActiveDocument() && n.isElementNode()) |
4313 styleEngine().elementWillBeRemoved(toElement(n)); | 4313 styleEngine().elementWillBeRemoved(toElement(n)); |
4314 } | 4314 } |
4315 | 4315 |
4316 void Document::didInsertText(Node* text, unsigned offset, unsigned length) { | 4316 void Document::didInsertText(Node* text, unsigned offset, unsigned length) { |
4317 for (Range* range : m_ranges) | 4317 for (Range* range : m_ranges) |
4318 range->didInsertText(text, offset, length); | 4318 range->didInsertText(text, offset, length); |
4319 | |
4320 m_markers->shiftMarkers(text, offset, length); | |
4321 } | 4319 } |
4322 | 4320 |
4323 void Document::didRemoveText(Node* text, unsigned offset, unsigned length) { | 4321 void Document::didRemoveText(Node* text, unsigned offset, unsigned length) { |
4324 for (Range* range : m_ranges) | 4322 for (Range* range : m_ranges) |
4325 range->didRemoveText(text, offset, length); | 4323 range->didRemoveText(text, offset, length); |
4326 | |
4327 m_markers->removeMarkers(text, offset, length); | |
4328 m_markers->shiftMarkers(text, offset + length, 0 - length); | |
4329 } | 4324 } |
4330 | 4325 |
4331 void Document::didMergeTextNodes(const Text& mergedNode, | 4326 void Document::didMergeTextNodes(const Text& mergedNode, |
4332 const Text& nodeToBeRemoved, | 4327 const Text& nodeToBeRemoved, |
4333 unsigned oldLength) { | 4328 unsigned oldLength) { |
4334 NodeWithIndex nodeToBeRemovedWithIndex(const_cast<Text&>(nodeToBeRemoved)); | 4329 NodeWithIndex nodeToBeRemovedWithIndex(const_cast<Text&>(nodeToBeRemoved)); |
4335 if (!m_ranges.isEmpty()) { | 4330 if (!m_ranges.isEmpty()) { |
4336 for (Range* range : m_ranges) | 4331 for (Range* range : m_ranges) |
4337 range->didMergeTextNodes(nodeToBeRemovedWithIndex, oldLength); | 4332 range->didMergeTextNodes(nodeToBeRemovedWithIndex, oldLength); |
4338 } | 4333 } |
(...skipping 2313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6652 } | 6647 } |
6653 | 6648 |
6654 void showLiveDocumentInstances() { | 6649 void showLiveDocumentInstances() { |
6655 WeakDocumentSet& set = liveDocumentSet(); | 6650 WeakDocumentSet& set = liveDocumentSet(); |
6656 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6651 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6657 for (blink::Document* document : set) | 6652 for (blink::Document* document : set) |
6658 fprintf(stderr, "- Document %p URL: %s\n", document, | 6653 fprintf(stderr, "- Document %p URL: %s\n", document, |
6659 document->url().getString().utf8().data()); | 6654 document->url().getString().utf8().data()); |
6660 } | 6655 } |
6661 #endif | 6656 #endif |
OLD | NEW |