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

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

Issue 1292303005: Make core/editing/ files to match Blink coding style (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-18T10:48:50 Created 5 years, 4 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/EditorCommand.cpp ('k') | 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(FrameSelection); 61 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(FrameSelection);
62 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(FrameSelection); 62 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(FrameSelection);
63 public: 63 public:
64 static PassOwnPtrWillBeRawPtr<FrameSelection> create(LocalFrame* frame = nul lptr) 64 static PassOwnPtrWillBeRawPtr<FrameSelection> create(LocalFrame* frame = nul lptr)
65 { 65 {
66 return adoptPtrWillBeNoop(new FrameSelection(frame)); 66 return adoptPtrWillBeNoop(new FrameSelection(frame));
67 } 67 }
68 virtual ~FrameSelection(); 68 virtual ~FrameSelection();
69 69
70 enum EAlteration { AlterationMove, AlterationExtend }; 70 enum EAlteration { AlterationMove, AlterationExtend };
71 enum CursorAlignOnScroll { AlignCursorOnScrollIfNeeded, 71 enum CursorAlignOnScroll { AlignCursorOnScrollIfNeeded, AlignCursorOnScrollA lways };
72 AlignCursorOnScrollAlways };
73 enum SetSelectionOption { 72 enum SetSelectionOption {
74 // 1 << 0 is reserved for EUserTriggered 73 // 1 << 0 is reserved for EUserTriggered
75 CloseTyping = 1 << 1, 74 CloseTyping = 1 << 1,
76 ClearTypingStyle = 1 << 2, 75 ClearTypingStyle = 1 << 2,
77 SpellCorrectionTriggered = 1 << 3, 76 SpellCorrectionTriggered = 1 << 3,
78 DoNotSetFocus = 1 << 4, 77 DoNotSetFocus = 1 << 4,
79 DoNotUpdateAppearance = 1 << 5, 78 DoNotUpdateAppearance = 1 << 5,
80 DoNotClearStrategy = 1 << 6, 79 DoNotClearStrategy = 1 << 6,
81 }; 80 };
82 typedef unsigned SetSelectionOptions; // Union of values in SetSelectionOpti on and EUserTriggered 81 typedef unsigned SetSelectionOptions; // Union of values in SetSelectionOpti on and EUserTriggered
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 void setShouldShowBlockCursor(bool); 231 void setShouldShowBlockCursor(bool);
233 232
234 // VisibleSelection::ChangeObserver interface. 233 // VisibleSelection::ChangeObserver interface.
235 void didChangeVisibleSelection() override; 234 void didChangeVisibleSelection() override;
236 235
237 DECLARE_VIRTUAL_TRACE(); 236 DECLARE_VIRTUAL_TRACE();
238 237
239 private: 238 private:
240 explicit FrameSelection(LocalFrame*); 239 explicit FrameSelection(LocalFrame*);
241 240
242 enum EPositionType { START, END, BASE, EXTENT }; 241 // TODO(yosin) We should use capitalized name for |EPositionType|.
242 enum EPositionType { START, END, BASE, EXTENT }; // NOLINT
243 243
244 template <typename Strategy> 244 template <typename Strategy>
245 bool containsAlgorithm(const LayoutPoint&); 245 bool containsAlgorithm(const LayoutPoint&);
246 246
247 template <typename Strategy> 247 template <typename Strategy>
248 void setNonDirectionalSelectionIfNeededAlgorithm(const VisibleSelection&, Te xtGranularity, EndPointsAdjustmentMode); 248 void setNonDirectionalSelectionIfNeededAlgorithm(const VisibleSelection&, Te xtGranularity, EndPointsAdjustmentMode);
249 249
250 void respondToNodeModification(Node&, bool baseRemoved, bool extentRemoved, bool startRemoved, bool endRemoved); 250 void respondToNodeModification(Node&, bool baseRemoved, bool extentRemoved, bool startRemoved, bool endRemoved);
251 TextDirection directionOfEnclosingBlock(); 251 TextDirection directionOfEnclosingBlock();
252 TextDirection directionOfSelection(); 252 TextDirection directionOfSelection();
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 } 339 }
340 } // namespace blink 340 } // namespace blink
341 341
342 #ifndef NDEBUG 342 #ifndef NDEBUG
343 // Outside the WebCore namespace for ease of invocation from gdb. 343 // Outside the WebCore namespace for ease of invocation from gdb.
344 void showTree(const blink::FrameSelection&); 344 void showTree(const blink::FrameSelection&);
345 void showTree(const blink::FrameSelection*); 345 void showTree(const blink::FrameSelection*);
346 #endif 346 #endif
347 347
348 #endif // FrameSelection_h 348 #endif // FrameSelection_h
OLDNEW
« no previous file with comments | « Source/core/editing/EditorCommand.cpp ('k') | Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698