Chromium Code Reviews| 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 3659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3670 frame->selection().nodeWillBeRemoved(n); | 3670 frame->selection().nodeWillBeRemoved(n); |
| 3671 frame->page()->dragCaretController().nodeWillBeRemoved(n); | 3671 frame->page()->dragCaretController().nodeWillBeRemoved(n); |
| 3672 } | 3672 } |
| 3673 } | 3673 } |
| 3674 | 3674 |
| 3675 void Document::didInsertText(Node* text, unsigned offset, unsigned length) | 3675 void Document::didInsertText(Node* text, unsigned offset, unsigned length) |
| 3676 { | 3676 { |
| 3677 for (Range* range : m_ranges) | 3677 for (Range* range : m_ranges) |
| 3678 range->didInsertText(text, offset, length); | 3678 range->didInsertText(text, offset, length); |
| 3679 | 3679 |
| 3680 // Update the markers for spelling and grammar checking. | |
|
Xianzhu
2015/04/17 18:25:03
This is removed because it's incorrect and not mea
| |
| 3681 m_markers->shiftMarkers(text, offset, length); | 3680 m_markers->shiftMarkers(text, offset, length); |
| 3682 } | 3681 } |
| 3683 | 3682 |
| 3684 void Document::didRemoveText(Node* text, unsigned offset, unsigned length) | 3683 void Document::didRemoveText(Node* text, unsigned offset, unsigned length) |
| 3685 { | 3684 { |
| 3686 for (Range* range : m_ranges) | 3685 for (Range* range : m_ranges) |
| 3687 range->didRemoveText(text, offset, length); | 3686 range->didRemoveText(text, offset, length); |
| 3688 | 3687 |
| 3689 // Update the markers for spelling and grammar checking. | |
| 3690 m_markers->removeMarkers(text, offset, length); | 3688 m_markers->removeMarkers(text, offset, length); |
| 3691 m_markers->shiftMarkers(text, offset + length, 0 - length); | 3689 m_markers->shiftMarkers(text, offset + length, 0 - length); |
| 3692 } | 3690 } |
| 3693 | 3691 |
| 3694 void Document::didMergeTextNodes(Text& oldNode, unsigned offset) | 3692 void Document::didMergeTextNodes(Text& oldNode, unsigned offset) |
| 3695 { | 3693 { |
| 3696 if (!m_ranges.isEmpty()) { | 3694 if (!m_ranges.isEmpty()) { |
| 3697 NodeWithIndex oldNodeWithIndex(oldNode); | 3695 NodeWithIndex oldNodeWithIndex(oldNode); |
| 3698 for (Range* range : m_ranges) | 3696 for (Range* range : m_ranges) |
| 3699 range->didMergeTextNodes(oldNodeWithIndex, offset); | 3697 range->didMergeTextNodes(oldNodeWithIndex, offset); |
| (...skipping 2009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5709 #ifndef NDEBUG | 5707 #ifndef NDEBUG |
| 5710 using namespace blink; | 5708 using namespace blink; |
| 5711 void showLiveDocumentInstances() | 5709 void showLiveDocumentInstances() |
| 5712 { | 5710 { |
| 5713 WeakDocumentSet& set = liveDocumentSet(); | 5711 WeakDocumentSet& set = liveDocumentSet(); |
| 5714 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5712 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 5715 for (Document* document : set) | 5713 for (Document* document : set) |
| 5716 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); | 5714 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); |
| 5717 } | 5715 } |
| 5718 #endif | 5716 #endif |
| OLD | NEW |