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

Side by Side Diff: third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp

Issue 2789373003: Rename DocumentMarker::activeMatch() to IsActiveMatch() (Closed)
Patch Set: Remove dependency Created 3 years, 8 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, 2010 Apple Inc. All rights 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
7 * reserved. 7 * 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) Research In Motion Limited 2010. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 for (unsigned markerIndex = 0; list.get() && markerIndex < list->size(); 853 for (unsigned markerIndex = 0; list.get() && markerIndex < list->size();
854 ++markerIndex) { 854 ++markerIndex) {
855 DocumentMarker* marker = list->at(markerIndex).get(); 855 DocumentMarker* marker = list->at(markerIndex).get();
856 builder.append(" "); 856 builder.append(" ");
857 builder.appendNumber(marker->type()); 857 builder.appendNumber(marker->type());
858 builder.append(":["); 858 builder.append(":[");
859 builder.appendNumber(marker->startOffset()); 859 builder.appendNumber(marker->startOffset());
860 builder.append(":"); 860 builder.append(":");
861 builder.appendNumber(marker->endOffset()); 861 builder.appendNumber(marker->endOffset());
862 builder.append("]("); 862 builder.append("](");
863 builder.appendNumber(marker->activeMatch()); 863 builder.appendNumber(marker->IsActiveMatch());
864 builder.append(")"); 864 builder.append(")");
865 } 865 }
866 } 866 }
867 builder.append("\n"); 867 builder.append("\n");
868 } 868 }
869 LOG(INFO) << m_markers.size() << " nodes have markers:\n" 869 LOG(INFO) << m_markers.size() << " nodes have markers:\n"
870 << builder.toString().utf8().data(); 870 << builder.toString().utf8().data();
871 } 871 }
872 #endif 872 #endif
873 873
874 // SynchronousMutationObserver 874 // SynchronousMutationObserver
875 void DocumentMarkerController::didUpdateCharacterData(CharacterData* node, 875 void DocumentMarkerController::didUpdateCharacterData(CharacterData* node,
876 unsigned offset, 876 unsigned offset,
877 unsigned oldLength, 877 unsigned oldLength,
878 unsigned newLength) { 878 unsigned newLength) {
879 // Shift markers as if we first remove the old text, then insert the new text 879 // Shift markers as if we first remove the old text, then insert the new text
880 removeMarkers(node, offset, oldLength); 880 removeMarkers(node, offset, oldLength);
881 shiftMarkers(node, offset + oldLength, 0 - oldLength); 881 shiftMarkers(node, offset + oldLength, 0 - oldLength);
882 shiftMarkers(node, offset, newLength); 882 shiftMarkers(node, offset, newLength);
883 } 883 }
884 884
885 } // namespace blink 885 } // namespace blink
886 886
887 #ifndef NDEBUG 887 #ifndef NDEBUG
888 void showDocumentMarkers(const blink::DocumentMarkerController* controller) { 888 void showDocumentMarkers(const blink::DocumentMarkerController* controller) {
889 if (controller) 889 if (controller)
890 controller->showMarkers(); 890 controller->showMarkers();
891 } 891 }
892 #endif 892 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698