Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2650113004: [WIP] Add support for Android SuggestionSpans when editing text (Closed)
Patch Set: Remove logging statements, fix copyright years in new files Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 4236 matching lines...) Expand 10 before | Expand all | Expand 10 after
4247 4247
4248 void Document::dataWillChange(const CharacterData& characterData) { 4248 void Document::dataWillChange(const CharacterData& characterData) {
4249 if (LocalFrame* frame = this->frame()) 4249 if (LocalFrame* frame = this->frame())
4250 frame->selection().dataWillChange(characterData); 4250 frame->selection().dataWillChange(characterData);
4251 } 4251 }
4252 4252
4253 void Document::didInsertText(Node* text, unsigned offset, unsigned length) { 4253 void Document::didInsertText(Node* text, unsigned offset, unsigned length) {
4254 for (Range* range : m_ranges) 4254 for (Range* range : m_ranges)
4255 range->didInsertText(text, offset, length); 4255 range->didInsertText(text, offset, length);
4256 4256
4257 m_markers->shiftMarkers(text, offset, length); 4257 m_markers->shiftMarkers(text, offset, 0, length);
4258 } 4258 }
4259 4259
4260 void Document::didRemoveText(Node* text, unsigned offset, unsigned length) { 4260 void Document::didRemoveText(Node* text, unsigned offset, unsigned length) {
4261 for (Range* range : m_ranges) 4261 for (Range* range : m_ranges)
4262 range->didRemoveText(text, offset, length); 4262 range->didRemoveText(text, offset, length);
4263 4263
4264 m_markers->removeMarkers(text, offset, length); 4264 m_markers->removeMarkers(text, offset, length);
4265 m_markers->shiftMarkers(text, offset + length, 0 - length); 4265 m_markers->shiftMarkers(text, offset, length, 0);
4266 } 4266 }
4267 4267
4268 void Document::didMergeTextNodes(const Text& mergedNode, 4268 void Document::didMergeTextNodes(const Text& mergedNode,
4269 const Text& nodeToBeRemoved, 4269 const Text& nodeToBeRemoved,
4270 unsigned oldLength) { 4270 unsigned oldLength) {
4271 NodeWithIndex nodeToBeRemovedWithIndex(const_cast<Text&>(nodeToBeRemoved)); 4271 NodeWithIndex nodeToBeRemovedWithIndex(const_cast<Text&>(nodeToBeRemoved));
4272 if (!m_ranges.isEmpty()) { 4272 if (!m_ranges.isEmpty()) {
4273 for (Range* range : m_ranges) 4273 for (Range* range : m_ranges)
4274 range->didMergeTextNodes(nodeToBeRemovedWithIndex, oldLength); 4274 range->didMergeTextNodes(nodeToBeRemovedWithIndex, oldLength);
4275 } 4275 }
(...skipping 2294 matching lines...) Expand 10 before | Expand all | Expand 10 after
6570 } 6570 }
6571 6571
6572 void showLiveDocumentInstances() { 6572 void showLiveDocumentInstances() {
6573 WeakDocumentSet& set = liveDocumentSet(); 6573 WeakDocumentSet& set = liveDocumentSet();
6574 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6574 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6575 for (Document* document : set) 6575 for (Document* document : set)
6576 fprintf(stderr, "- Document %p URL: %s\n", document, 6576 fprintf(stderr, "- Document %p URL: %s\n", document,
6577 document->url().getString().utf8().data()); 6577 document->url().getString().utf8().data());
6578 } 6578 }
6579 #endif 6579 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698