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

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

Issue 2710943002: Get rid of unused functions VisibleSelection::setBase and setExtent taking Position (Closed)
Patch Set: 2017-02-22T22:07:34 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
« no previous file with comments | « third_party/WebKit/Source/core/editing/VisibleSelection.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 builder.setBaseAndExtent(m_base, m_extent); 131 builder.setBaseAndExtent(m_base, m_extent);
132 return builder.setAffinity(m_affinity) 132 return builder.setAffinity(m_affinity)
133 .setGranularity(m_granularity) 133 .setGranularity(m_granularity)
134 .setIsDirectional(m_isDirectional) 134 .setIsDirectional(m_isDirectional)
135 .setHasTrailingWhitespace(m_hasTrailingWhitespace) 135 .setHasTrailingWhitespace(m_hasTrailingWhitespace)
136 .build(); 136 .build();
137 } 137 }
138 138
139 template <typename Strategy> 139 template <typename Strategy>
140 void VisibleSelectionTemplate<Strategy>::setBase( 140 void VisibleSelectionTemplate<Strategy>::setBase(
141 const PositionTemplate<Strategy>& position) {
142 DCHECK(!needsLayoutTreeUpdate(position));
143 m_base = position;
144 validate();
145 }
146
147 template <typename Strategy>
148 void VisibleSelectionTemplate<Strategy>::setBase(
149 const VisiblePositionTemplate<Strategy>& visiblePosition) { 141 const VisiblePositionTemplate<Strategy>& visiblePosition) {
150 DCHECK(visiblePosition.isValid()); 142 DCHECK(visiblePosition.isValid());
151 m_base = visiblePosition.deepEquivalent(); 143 m_base = visiblePosition.deepEquivalent();
152 validate(); 144 validate();
153 } 145 }
154 146
155 template <typename Strategy> 147 template <typename Strategy>
156 void VisibleSelectionTemplate<Strategy>::setExtent( 148 void VisibleSelectionTemplate<Strategy>::setExtent(
157 const PositionTemplate<Strategy>& position) {
158 DCHECK(!needsLayoutTreeUpdate(position));
159 m_extent = position;
160 validate();
161 }
162
163 template <typename Strategy>
164 void VisibleSelectionTemplate<Strategy>::setExtent(
165 const VisiblePositionTemplate<Strategy>& visiblePosition) { 149 const VisiblePositionTemplate<Strategy>& visiblePosition) {
166 DCHECK(visiblePosition.isValid()); 150 DCHECK(visiblePosition.isValid());
167 m_extent = visiblePosition.deepEquivalent(); 151 m_extent = visiblePosition.deepEquivalent();
168 validate(); 152 validate();
169 } 153 }
170 154
171 EphemeralRange firstEphemeralRangeOf(const VisibleSelection& selection) { 155 EphemeralRange firstEphemeralRangeOf(const VisibleSelection& selection) {
172 if (selection.isNone()) 156 if (selection.isNone())
173 return EphemeralRange(); 157 return EphemeralRange();
174 Position start = selection.start().parentAnchoredEquivalent(); 158 Position start = selection.start().parentAnchoredEquivalent();
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 837
854 void showTree(const blink::VisibleSelectionInFlatTree& sel) { 838 void showTree(const blink::VisibleSelectionInFlatTree& sel) {
855 sel.showTreeForThis(); 839 sel.showTreeForThis();
856 } 840 }
857 841
858 void showTree(const blink::VisibleSelectionInFlatTree* sel) { 842 void showTree(const blink::VisibleSelectionInFlatTree* sel) {
859 if (sel) 843 if (sel)
860 sel->showTreeForThis(); 844 sel->showTreeForThis();
861 } 845 }
862 #endif 846 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/VisibleSelection.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698