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

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

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 21 matching lines...) Expand all
32 #include "core/editing/EphemeralRange.h" 32 #include "core/editing/EphemeralRange.h"
33 #include "core/editing/VisiblePosition.h" 33 #include "core/editing/VisiblePosition.h"
34 #include "core/editing/VisibleSelection.h" 34 #include "core/editing/VisibleSelection.h"
35 #include "core/editing/iterators/TextIteratorFlags.h" 35 #include "core/editing/iterators/TextIteratorFlags.h"
36 #include "core/layout/ScrollAlignment.h" 36 #include "core/layout/ScrollAlignment.h"
37 #include "platform/Timer.h" 37 #include "platform/Timer.h"
38 #include "platform/geometry/IntRect.h" 38 #include "platform/geometry/IntRect.h"
39 #include "platform/geometry/LayoutRect.h" 39 #include "platform/geometry/LayoutRect.h"
40 #include "platform/heap/Handle.h" 40 #include "platform/heap/Handle.h"
41 #include "wtf/Noncopyable.h" 41 #include "wtf/Noncopyable.h"
42 #include <memory>
43 42
44 namespace blink { 43 namespace blink {
45 44
46 class CaretBase; 45 class CaretBase;
47 class CharacterData; 46 class CharacterData;
48 class CullRect; 47 class CullRect;
49 class LayoutBlock; 48 class LayoutBlock;
50 class LocalFrame; 49 class LocalFrame;
51 class FrameCaret; 50 class FrameCaret;
52 class GranularityStrategy; 51 class GranularityStrategy;
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 VisiblePosition m_originalBase; 294 VisiblePosition m_originalBase;
296 VisiblePositionInFlatTree m_originalBaseInFlatTree; 295 VisiblePositionInFlatTree m_originalBaseInFlatTree;
297 TextGranularity m_granularity; 296 TextGranularity m_granularity;
298 LayoutUnit m_xPosForVerticalArrowNavigation; 297 LayoutUnit m_xPosForVerticalArrowNavigation;
299 298
300 Member<EditingStyle> m_typingStyle; 299 Member<EditingStyle> m_typingStyle;
301 300
302 bool m_focused : 1; 301 bool m_focused : 1;
303 302
304 // Controls text granularity used to adjust the selection's extent in moveRa ngeSelectionExtent. 303 // Controls text granularity used to adjust the selection's extent in moveRa ngeSelectionExtent.
305 std::unique_ptr<GranularityStrategy> m_granularityStrategy; 304 OwnPtr<GranularityStrategy> m_granularityStrategy;
306 305
307 const Member<FrameCaret> m_frameCaret; 306 const Member<FrameCaret> m_frameCaret;
308 }; 307 };
309 308
310 inline EditingStyle* FrameSelection::typingStyle() const 309 inline EditingStyle* FrameSelection::typingStyle() const
311 { 310 {
312 return m_typingStyle.get(); 311 return m_typingStyle.get();
313 } 312 }
314 313
315 inline void FrameSelection::clearTypingStyle() 314 inline void FrameSelection::clearTypingStyle()
316 { 315 {
317 m_typingStyle.clear(); 316 m_typingStyle.clear();
318 } 317 }
319 318
320 inline void FrameSelection::setTypingStyle(EditingStyle* style) 319 inline void FrameSelection::setTypingStyle(EditingStyle* style)
321 { 320 {
322 m_typingStyle = style; 321 m_typingStyle = style;
323 } 322 }
324 } // namespace blink 323 } // namespace blink
325 324
326 #ifndef NDEBUG 325 #ifndef NDEBUG
327 // Outside the WebCore namespace for ease of invocation from gdb. 326 // Outside the WebCore namespace for ease of invocation from gdb.
328 void showTree(const blink::FrameSelection&); 327 void showTree(const blink::FrameSelection&);
329 void showTree(const blink::FrameSelection*); 328 void showTree(const blink::FrameSelection*);
330 #endif 329 #endif
331 330
332 #endif // FrameSelection_h 331 #endif // FrameSelection_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/Editor.cpp ('k') | third_party/WebKit/Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698