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

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

Issue 1315513005: Get rid of unused member function toNormalizedRange() from FrameSelection and VisibleSelection class (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-26T11:07:51 Created 5 years, 3 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 | « 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 bool VisibleSelection::intersectsNode(Node* node) const 233 bool VisibleSelection::intersectsNode(Node* node) const
234 { 234 {
235 if (isNone()) 235 if (isNone())
236 return false; 236 return false;
237 Position start = m_start.parentAnchoredEquivalent(); 237 Position start = m_start.parentAnchoredEquivalent();
238 Position end = m_end.parentAnchoredEquivalent(); 238 Position end = m_end.parentAnchoredEquivalent();
239 TrackExceptionState exceptionState; 239 TrackExceptionState exceptionState;
240 return Range::intersectsNode(node, start, end, exceptionState) && !exception State.hadException(); 240 return Range::intersectsNode(node, start, end, exceptionState) && !exception State.hadException();
241 } 241 }
242 242
243 PassRefPtrWillBeRawPtr<Range> VisibleSelection::toNormalizedRange() const
244 {
245 return createRange(toNormalizedEphemeralRange());
246 }
247
248 template <typename Strategy> 243 template <typename Strategy>
249 static EphemeralRangeTemplate<Strategy> normalizeRangeAlgorithm(const EphemeralR angeTemplate<Strategy>& range) 244 static EphemeralRangeTemplate<Strategy> normalizeRangeAlgorithm(const EphemeralR angeTemplate<Strategy>& range)
250 { 245 {
251 ASSERT(range.isNotNull()); 246 ASSERT(range.isNotNull());
252 range.document().updateLayoutIgnorePendingStylesheets(); 247 range.document().updateLayoutIgnorePendingStylesheets();
253 248
254 // TODO(yosin) We should not call |parentAnchoredEquivalent()|, it is 249 // TODO(yosin) We should not call |parentAnchoredEquivalent()|, it is
255 // redundant. 250 // redundant.
256 const PositionAlgorithm<Strategy> normalizedStart = mostForwardCaretPosition (range.startPosition()).parentAnchoredEquivalent(); 251 const PositionAlgorithm<Strategy> normalizedStart = mostForwardCaretPosition (range.startPosition()).parentAnchoredEquivalent();
257 const PositionAlgorithm<Strategy> normalizedEnd = mostBackwardCaretPosition( range.endPosition()).parentAnchoredEquivalent(); 252 const PositionAlgorithm<Strategy> normalizedEnd = mostBackwardCaretPosition( range.endPosition()).parentAnchoredEquivalent();
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after
1249 sel.showTreeForThis(); 1244 sel.showTreeForThis();
1250 } 1245 }
1251 1246
1252 void showTree(const blink::VisibleSelection* sel) 1247 void showTree(const blink::VisibleSelection* sel)
1253 { 1248 {
1254 if (sel) 1249 if (sel)
1255 sel->showTreeForThis(); 1250 sel->showTreeForThis();
1256 } 1251 }
1257 1252
1258 #endif 1253 #endif
OLDNEW
« no previous file with comments | « Source/core/editing/VisibleSelection.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698