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

Side by Side Diff: Source/core/editing/FrameSelection.h

Issue 1177173007: Templatize FrameSelection::setNonDirectionalSelectionIfNeede function (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-06-18T14:23:09 Created 5 years, 6 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 | « no previous file | Source/core/editing/FrameSelection.cpp » ('j') | 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, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 // VisibleSelection::ChangeObserver interface. 230 // VisibleSelection::ChangeObserver interface.
231 virtual void didChangeVisibleSelection() override; 231 virtual void didChangeVisibleSelection() override;
232 232
233 DECLARE_VIRTUAL_TRACE(); 233 DECLARE_VIRTUAL_TRACE();
234 234
235 private: 235 private:
236 explicit FrameSelection(LocalFrame*); 236 explicit FrameSelection(LocalFrame*);
237 237
238 enum EPositionType { START, END, BASE, EXTENT }; 238 enum EPositionType { START, END, BASE, EXTENT };
239 239
240 template <typename Strategy>
241 void setNonDirectionalSelectionIfNeededAlgorithm(const VisibleSelection&, Te xtGranularity, EndPointsAdjustmentMode);
242
240 void respondToNodeModification(Node&, bool baseRemoved, bool extentRemoved, bool startRemoved, bool endRemoved); 243 void respondToNodeModification(Node&, bool baseRemoved, bool extentRemoved, bool startRemoved, bool endRemoved);
241 TextDirection directionOfEnclosingBlock(); 244 TextDirection directionOfEnclosingBlock();
242 TextDirection directionOfSelection(); 245 TextDirection directionOfSelection();
243 246
244 VisiblePosition positionForPlatform(bool isGetStart) const; 247 VisiblePosition positionForPlatform(bool isGetStart) const;
245 VisiblePosition startForPlatform() const; 248 VisiblePosition startForPlatform() const;
246 VisiblePosition endForPlatform() const; 249 VisiblePosition endForPlatform() const;
247 VisiblePosition nextWordPositionForPlatform(const VisiblePosition&); 250 VisiblePosition nextWordPositionForPlatform(const VisiblePosition&);
248 251
249 VisiblePosition modifyExtendingRight(TextGranularity); 252 VisiblePosition modifyExtendingRight(TextGranularity);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 } 330 }
328 } // namespace blink 331 } // namespace blink
329 332
330 #ifndef NDEBUG 333 #ifndef NDEBUG
331 // Outside the WebCore namespace for ease of invocation from gdb. 334 // Outside the WebCore namespace for ease of invocation from gdb.
332 void showTree(const blink::FrameSelection&); 335 void showTree(const blink::FrameSelection&);
333 void showTree(const blink::FrameSelection*); 336 void showTree(const blink::FrameSelection*);
334 #endif 337 #endif
335 338
336 #endif // FrameSelection_h 339 #endif // FrameSelection_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698