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 r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
(...skipping 3661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3672 frame->selection().nodeWillBeRemoved(n); | 3672 frame->selection().nodeWillBeRemoved(n); |
3673 frame->page()->dragCaretController().nodeWillBeRemoved(n); | 3673 frame->page()->dragCaretController().nodeWillBeRemoved(n); |
3674 } | 3674 } |
3675 } | 3675 } |
3676 | 3676 |
3677 void Document::didInsertText(Node* text, unsigned offset, unsigned length) | 3677 void Document::didInsertText(Node* text, unsigned offset, unsigned length) |
3678 { | 3678 { |
3679 for (Range* range : m_ranges) | 3679 for (Range* range : m_ranges) |
3680 range->didInsertText(text, offset, length); | 3680 range->didInsertText(text, offset, length); |
3681 | 3681 |
3682 // Update the markers for spelling and grammar checking. | |
3683 m_markers->shiftMarkers(text, offset, length); | 3682 m_markers->shiftMarkers(text, offset, length); |
3684 } | 3683 } |
3685 | 3684 |
3686 void Document::didRemoveText(Node* text, unsigned offset, unsigned length) | 3685 void Document::didRemoveText(Node* text, unsigned offset, unsigned length) |
3687 { | 3686 { |
3688 for (Range* range : m_ranges) | 3687 for (Range* range : m_ranges) |
3689 range->didRemoveText(text, offset, length); | 3688 range->didRemoveText(text, offset, length); |
3690 | 3689 |
3691 // Update the markers for spelling and grammar checking. | |
3692 m_markers->removeMarkers(text, offset, length); | 3690 m_markers->removeMarkers(text, offset, length); |
3693 m_markers->shiftMarkers(text, offset + length, 0 - length); | 3691 m_markers->shiftMarkers(text, offset + length, 0 - length); |
3694 } | 3692 } |
3695 | 3693 |
3696 void Document::didMergeTextNodes(Text& oldNode, unsigned offset) | 3694 void Document::didMergeTextNodes(Text& oldNode, unsigned offset) |
3697 { | 3695 { |
3698 if (!m_ranges.isEmpty()) { | 3696 if (!m_ranges.isEmpty()) { |
3699 NodeWithIndex oldNodeWithIndex(oldNode); | 3697 NodeWithIndex oldNodeWithIndex(oldNode); |
3700 for (Range* range : m_ranges) | 3698 for (Range* range : m_ranges) |
3701 range->didMergeTextNodes(oldNodeWithIndex, offset); | 3699 range->didMergeTextNodes(oldNodeWithIndex, offset); |
(...skipping 2062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5764 #ifndef NDEBUG | 5762 #ifndef NDEBUG |
5765 using namespace blink; | 5763 using namespace blink; |
5766 void showLiveDocumentInstances() | 5764 void showLiveDocumentInstances() |
5767 { | 5765 { |
5768 WeakDocumentSet& set = liveDocumentSet(); | 5766 WeakDocumentSet& set = liveDocumentSet(); |
5769 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5767 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5770 for (Document* document : set) | 5768 for (Document* document : set) |
5771 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5769 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
5772 } | 5770 } |
5773 #endif | 5771 #endif |
OLD | NEW |