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

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: Add comments. 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 void setNonDirectionalSelectionIfNeeded(const VisibleSelection&, TextGranula rity, EndPointsAdjustmentMode = DoNotAdjsutEndpoints); 217 void setNonDirectionalSelectionIfNeeded(const VisibleSelection&, TextGranula rity, EndPointsAdjustmentMode = DoNotAdjsutEndpoints);
217 void setNonDirectionalSelectionIfNeeded(const VisibleSelectionInComposedTree &, TextGranularity, EndPointsAdjustmentMode = DoNotAdjsutEndpoints); 218 void setNonDirectionalSelectionIfNeeded(const VisibleSelectionInComposedTree &, TextGranularity, EndPointsAdjustmentMode = DoNotAdjsutEndpoints);
218 void setFocusedNodeIfNeeded(); 219 void setFocusedNodeIfNeeded();
219 void notifyLayoutObjectOfSelectionChange(EUserTriggered); 220 void notifyLayoutObjectOfSelectionChange(EUserTriggered);
220 221
221 EditingStyle* typingStyle() const; 222 EditingStyle* typingStyle() const;
222 void setTypingStyle(PassRefPtrWillBeRawPtr<EditingStyle>); 223 void setTypingStyle(PassRefPtrWillBeRawPtr<EditingStyle>);
223 void clearTypingStyle(); 224 void clearTypingStyle();
224 225
225 String selectedHTMLForClipboard() const; 226 String selectedHTMLForClipboard() const;
226 String selectedText() const; 227 String selectedText(TextIteratorBehavior = TextIteratorDefaultBehavior) cons t;
227 String selectedTextForClipboard() const; 228 String selectedTextForClipboard() const;
228 229
229 // The bounds are clipped to the viewport as this is what callers expect. 230 // The bounds are clipped to the viewport as this is what callers expect.
230 LayoutRect bounds() const; 231 LayoutRect bounds() const;
231 LayoutRect unclippedBounds() const; 232 LayoutRect unclippedBounds() const;
232 233
233 HTMLFormElement* currentForm() const; 234 HTMLFormElement* currentForm() const;
234 235
235 void revealSelection(const ScrollAlignment& = ScrollAlignment::alignCenterIf Needed, RevealExtentOption = DoNotRevealExtent); 236 void revealSelection(const ScrollAlignment& = ScrollAlignment::alignCenterIf Needed, RevealExtentOption = DoNotRevealExtent);
236 void setSelectionFromNone(); 237 void setSelectionFromNone();
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 } 329 }
329 } // namespace blink 330 } // namespace blink
330 331
331 #ifndef NDEBUG 332 #ifndef NDEBUG
332 // Outside the WebCore namespace for ease of invocation from gdb. 333 // Outside the WebCore namespace for ease of invocation from gdb.
333 void showTree(const blink::FrameSelection&); 334 void showTree(const blink::FrameSelection&);
334 void showTree(const blink::FrameSelection*); 335 void showTree(const blink::FrameSelection*);
335 #endif 336 #endif
336 337
337 #endif // FrameSelection_h 338 #endif // FrameSelection_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/clipboard/DataTransfer.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