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

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

Issue 1377963004: Use FrameSelection::selectedText where possible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check whether selection is range. Created 5 years, 2 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 15 matching lines...) Expand all
26 #ifndef FrameSelection_h 26 #ifndef FrameSelection_h
27 #define FrameSelection_h 27 #define FrameSelection_h
28 28
29 #include "core/CoreExport.h" 29 #include "core/CoreExport.h"
30 #include "core/dom/Range.h" 30 #include "core/dom/Range.h"
31 #include "core/editing/CaretBase.h" 31 #include "core/editing/CaretBase.h"
32 #include "core/editing/EditingStyle.h" 32 #include "core/editing/EditingStyle.h"
33 #include "core/editing/EphemeralRange.h" 33 #include "core/editing/EphemeralRange.h"
34 #include "core/editing/VisiblePosition.h" 34 #include "core/editing/VisiblePosition.h"
35 #include "core/editing/VisibleSelection.h" 35 #include "core/editing/VisibleSelection.h"
36 #include "core/editing/iterators/TextIteratorFlags.h"
36 #include "core/layout/ScrollAlignment.h" 37 #include "core/layout/ScrollAlignment.h"
37 #include "platform/Timer.h" 38 #include "platform/Timer.h"
38 #include "platform/geometry/IntRect.h" 39 #include "platform/geometry/IntRect.h"
39 #include "platform/geometry/LayoutRect.h" 40 #include "platform/geometry/LayoutRect.h"
40 #include "platform/heap/Handle.h" 41 #include "platform/heap/Handle.h"
41 #include "wtf/Noncopyable.h" 42 #include "wtf/Noncopyable.h"
42 43
43 namespace blink { 44 namespace blink {
44 45
45 class CharacterData; 46 class CharacterData;
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 enum EndPointsAdjustmentMode { AdjustEndpointsAtBidiBoundary, DoNotAdjsutEnd points }; 212 enum EndPointsAdjustmentMode { AdjustEndpointsAtBidiBoundary, DoNotAdjsutEnd points };
212 void setNonDirectionalSelectionIfNeeded(const VisibleSelection&, TextGranula rity, EndPointsAdjustmentMode = DoNotAdjsutEndpoints); 213 void setNonDirectionalSelectionIfNeeded(const VisibleSelection&, TextGranula rity, EndPointsAdjustmentMode = DoNotAdjsutEndpoints);
213 void setFocusedNodeIfNeeded(); 214 void setFocusedNodeIfNeeded();
214 void notifyLayoutObjectOfSelectionChange(EUserTriggered); 215 void notifyLayoutObjectOfSelectionChange(EUserTriggered);
215 216
216 EditingStyle* typingStyle() const; 217 EditingStyle* typingStyle() const;
217 void setTypingStyle(PassRefPtrWillBeRawPtr<EditingStyle>); 218 void setTypingStyle(PassRefPtrWillBeRawPtr<EditingStyle>);
218 void clearTypingStyle(); 219 void clearTypingStyle();
219 220
220 String selectedHTMLForClipboard() const; 221 String selectedHTMLForClipboard() const;
221 String selectedText() const; 222 String selectedText(TextIteratorBehavior = TextIteratorDefaultBehavior) cons t;
222 String selectedTextForClipboard() const; 223 String selectedTextForClipboard() const;
223 224
224 // The bounds are clipped to the viewport as this is what callers expect. 225 // The bounds are clipped to the viewport as this is what callers expect.
225 LayoutRect bounds() const; 226 LayoutRect bounds() const;
226 LayoutRect unclippedBounds() const; 227 LayoutRect unclippedBounds() const;
227 228
228 HTMLFormElement* currentForm() const; 229 HTMLFormElement* currentForm() const;
229 230
230 void revealSelection(const ScrollAlignment& = ScrollAlignment::alignCenterIf Needed, RevealExtentOption = DoNotRevealExtent); 231 void revealSelection(const ScrollAlignment& = ScrollAlignment::alignCenterIf Needed, RevealExtentOption = DoNotRevealExtent);
231 void setSelectionFromNone(); 232 void setSelectionFromNone();
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 } 312 }
312 } // namespace blink 313 } // namespace blink
313 314
314 #ifndef NDEBUG 315 #ifndef NDEBUG
315 // Outside the WebCore namespace for ease of invocation from gdb. 316 // Outside the WebCore namespace for ease of invocation from gdb.
316 void showTree(const blink::FrameSelection&); 317 void showTree(const blink::FrameSelection&);
317 void showTree(const blink::FrameSelection*); 318 void showTree(const blink::FrameSelection*);
318 #endif 319 #endif
319 320
320 #endif // FrameSelection_h 321 #endif // FrameSelection_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698