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 4302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4313 if (containsV1ShadowTree()) | 4313 if (containsV1ShadowTree()) |
4314 n.checkSlotChangeBeforeRemoved(); | 4314 n.checkSlotChangeBeforeRemoved(); |
4315 | 4315 |
4316 if (n.inActiveDocument() && n.isElementNode()) | 4316 if (n.inActiveDocument() && n.isElementNode()) |
4317 styleEngine().elementWillBeRemoved(toElement(n)); | 4317 styleEngine().elementWillBeRemoved(toElement(n)); |
4318 } | 4318 } |
4319 | 4319 |
4320 void Document::didInsertText(Node* text, unsigned offset, unsigned length) { | 4320 void Document::didInsertText(Node* text, unsigned offset, unsigned length) { |
4321 for (Range* range : m_ranges) | 4321 for (Range* range : m_ranges) |
4322 range->didInsertText(text, offset, length); | 4322 range->didInsertText(text, offset, length); |
4323 | |
4324 m_markers->shiftMarkers(text, offset, length); | |
4325 } | 4323 } |
4326 | 4324 |
4327 void Document::didRemoveText(Node* text, unsigned offset, unsigned length) { | 4325 void Document::didRemoveText(Node* text, unsigned offset, unsigned length) { |
4328 for (Range* range : m_ranges) | 4326 for (Range* range : m_ranges) |
4329 range->didRemoveText(text, offset, length); | 4327 range->didRemoveText(text, offset, length); |
4330 | |
4331 m_markers->removeMarkers(text, offset, length); | |
4332 m_markers->shiftMarkers(text, offset + length, 0 - length); | |
4333 } | 4328 } |
4334 | 4329 |
4335 void Document::didMergeTextNodes(const Text& mergedNode, | 4330 void Document::didMergeTextNodes(const Text& mergedNode, |
4336 const Text& nodeToBeRemoved, | 4331 const Text& nodeToBeRemoved, |
4337 unsigned oldLength) { | 4332 unsigned oldLength) { |
4338 NodeWithIndex nodeToBeRemovedWithIndex(const_cast<Text&>(nodeToBeRemoved)); | 4333 NodeWithIndex nodeToBeRemovedWithIndex(const_cast<Text&>(nodeToBeRemoved)); |
4339 if (!m_ranges.isEmpty()) { | 4334 if (!m_ranges.isEmpty()) { |
4340 for (Range* range : m_ranges) | 4335 for (Range* range : m_ranges) |
4341 range->didMergeTextNodes(nodeToBeRemovedWithIndex, oldLength); | 4336 range->didMergeTextNodes(nodeToBeRemovedWithIndex, oldLength); |
4342 } | 4337 } |
(...skipping 2314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6657 } | 6652 } |
6658 | 6653 |
6659 void showLiveDocumentInstances() { | 6654 void showLiveDocumentInstances() { |
6660 WeakDocumentSet& set = liveDocumentSet(); | 6655 WeakDocumentSet& set = liveDocumentSet(); |
6661 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6656 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6662 for (blink::Document* document : set) | 6657 for (blink::Document* document : set) |
6663 fprintf(stderr, "- Document %p URL: %s\n", document, | 6658 fprintf(stderr, "- Document %p URL: %s\n", document, |
6664 document->url().getString().utf8().data()); | 6659 document->url().getString().utf8().data()); |
6665 } | 6660 } |
6666 #endif | 6661 #endif |
OLD | NEW |