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

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

Issue 1182253004: Templatize FrameSelection::contains function (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-06-18T19:15:03 Rebase 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
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> 240 template <typename Strategy>
241 bool containsAlgorithm(const LayoutPoint&);
242
243 template <typename Strategy>
241 void setNonDirectionalSelectionIfNeededAlgorithm(const VisibleSelection&, Te xtGranularity, EndPointsAdjustmentMode); 244 void setNonDirectionalSelectionIfNeededAlgorithm(const VisibleSelection&, Te xtGranularity, EndPointsAdjustmentMode);
242 245
243 void respondToNodeModification(Node&, bool baseRemoved, bool extentRemoved, bool startRemoved, bool endRemoved); 246 void respondToNodeModification(Node&, bool baseRemoved, bool extentRemoved, bool startRemoved, bool endRemoved);
244 TextDirection directionOfEnclosingBlock(); 247 TextDirection directionOfEnclosingBlock();
245 TextDirection directionOfSelection(); 248 TextDirection directionOfSelection();
246 249
247 VisiblePosition positionForPlatform(bool isGetStart) const; 250 VisiblePosition positionForPlatform(bool isGetStart) const;
248 VisiblePosition startForPlatform() const; 251 VisiblePosition startForPlatform() const;
249 VisiblePosition endForPlatform() const; 252 VisiblePosition endForPlatform() const;
250 VisiblePosition nextWordPositionForPlatform(const VisiblePosition&); 253 VisiblePosition nextWordPositionForPlatform(const VisiblePosition&);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 } 333 }
331 } // namespace blink 334 } // namespace blink
332 335
333 #ifndef NDEBUG 336 #ifndef NDEBUG
334 // Outside the WebCore namespace for ease of invocation from gdb. 337 // Outside the WebCore namespace for ease of invocation from gdb.
335 void showTree(const blink::FrameSelection&); 338 void showTree(const blink::FrameSelection&);
336 void showTree(const blink::FrameSelection*); 339 void showTree(const blink::FrameSelection*);
337 #endif 340 #endif
338 341
339 #endif // FrameSelection_h 342 #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