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 4243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4254 if (containsV1ShadowTree()) | 4254 if (containsV1ShadowTree()) |
4255 n.checkSlotChangeBeforeRemoved(); | 4255 n.checkSlotChangeBeforeRemoved(); |
4256 | 4256 |
4257 if (n.inActiveDocument() && n.isElementNode()) | 4257 if (n.inActiveDocument() && n.isElementNode()) |
4258 styleEngine().elementWillBeRemoved(toElement(n)); | 4258 styleEngine().elementWillBeRemoved(toElement(n)); |
4259 } | 4259 } |
4260 | 4260 |
4261 void Document::didInsertText(Node* text, unsigned offset, unsigned length) { | 4261 void Document::didInsertText(Node* text, unsigned offset, unsigned length) { |
4262 for (Range* range : m_ranges) | 4262 for (Range* range : m_ranges) |
4263 range->didInsertText(text, offset, length); | 4263 range->didInsertText(text, offset, length); |
4264 | |
4265 m_markers->shiftMarkers(text, offset, length); | |
4266 } | 4264 } |
4267 | 4265 |
4268 void Document::didRemoveText(Node* text, unsigned offset, unsigned length) { | 4266 void Document::didRemoveText(Node* text, unsigned offset, unsigned length) { |
4269 for (Range* range : m_ranges) | 4267 for (Range* range : m_ranges) |
4270 range->didRemoveText(text, offset, length); | 4268 range->didRemoveText(text, offset, length); |
4271 | |
4272 m_markers->removeMarkers(text, offset, length); | |
4273 m_markers->shiftMarkers(text, offset + length, 0 - length); | |
4274 } | 4269 } |
4275 | 4270 |
4276 void Document::didMergeTextNodes(const Text& mergedNode, | 4271 void Document::didMergeTextNodes(const Text& mergedNode, |
4277 const Text& nodeToBeRemoved, | 4272 const Text& nodeToBeRemoved, |
4278 unsigned oldLength) { | 4273 unsigned oldLength) { |
4279 NodeWithIndex nodeToBeRemovedWithIndex(const_cast<Text&>(nodeToBeRemoved)); | 4274 NodeWithIndex nodeToBeRemovedWithIndex(const_cast<Text&>(nodeToBeRemoved)); |
4280 if (!m_ranges.isEmpty()) { | 4275 if (!m_ranges.isEmpty()) { |
4281 for (Range* range : m_ranges) | 4276 for (Range* range : m_ranges) |
4282 range->didMergeTextNodes(nodeToBeRemovedWithIndex, oldLength); | 4277 range->didMergeTextNodes(nodeToBeRemovedWithIndex, oldLength); |
4283 } | 4278 } |
(...skipping 2311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6595 } | 6590 } |
6596 | 6591 |
6597 void showLiveDocumentInstances() { | 6592 void showLiveDocumentInstances() { |
6598 WeakDocumentSet& set = liveDocumentSet(); | 6593 WeakDocumentSet& set = liveDocumentSet(); |
6599 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6594 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6600 for (blink::Document* document : set) | 6595 for (blink::Document* document : set) |
6601 fprintf(stderr, "- Document %p URL: %s\n", document, | 6596 fprintf(stderr, "- Document %p URL: %s\n", document, |
6602 document->url().getString().utf8().data()); | 6597 document->url().getString().utf8().data()); |
6603 } | 6598 } |
6604 #endif | 6599 #endif |
OLD | NEW |