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

Side by Side Diff: third_party/WebKit/WebCore/editing/SelectionController.h

Issue 21184: WebKit merge 40722:40785 (part 1) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 10 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2004 Apple Computer, 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 void setSelection(const Selection&, bool closeTyping = true, bool clearTypin gStyle = true, bool userTriggered = false); 60 void setSelection(const Selection&, bool closeTyping = true, bool clearTypin gStyle = true, bool userTriggered = false);
61 bool setSelectedRange(Range*, EAffinity, bool closeTyping); 61 bool setSelectedRange(Range*, EAffinity, bool closeTyping);
62 void selectAll(); 62 void selectAll();
63 void clear(); 63 void clear();
64 64
65 // Call this after doing user-triggered selections to make it easy to delete the frame you entirely selected. 65 // Call this after doing user-triggered selections to make it easy to delete the frame you entirely selected.
66 void selectFrameElementInParentIfFullySelected(); 66 void selectFrameElementInParentIfFullySelected();
67 67
68 bool contains(const IntPoint&); 68 bool contains(const IntPoint&);
69 69
70 Selection::EState state() const { return m_sel.state(); } 70 Selection::SelectionType selectionType() const { return m_sel.selectionType( ); }
71 71
72 EAffinity affinity() const { return m_sel.affinity(); } 72 EAffinity affinity() const { return m_sel.affinity(); }
73 73
74 bool modify(EAlteration, EDirection, TextGranularity, bool userTriggered = f alse); 74 bool modify(EAlteration, EDirection, TextGranularity, bool userTriggered = f alse);
75 bool modify(EAlteration, int verticalDistance, bool userTriggered = false); 75 bool modify(EAlteration, int verticalDistance, bool userTriggered = false);
76 bool expandUsingGranularity(TextGranularity); 76 bool expandUsingGranularity(TextGranularity);
77 77
78 void setBase(const VisiblePosition&, bool userTriggered = false); 78 void setBase(const VisiblePosition&, bool userTriggered = false);
79 void setBase(const Position&, EAffinity, bool userTriggered = false); 79 void setBase(const Position&, EAffinity, bool userTriggered = false);
80 void setExtent(const VisiblePosition&, bool userTriggered = false); 80 void setExtent(const VisiblePosition&, bool userTriggered = false);
(...skipping 15 matching lines...) Expand all
96 96
97 void setLastChangeWasHorizontalExtension(bool b) { m_lastChangeWasHorizontal Extension = b; } 97 void setLastChangeWasHorizontalExtension(bool b) { m_lastChangeWasHorizontal Extension = b; }
98 void willBeModified(EAlteration, EDirection); 98 void willBeModified(EAlteration, EDirection);
99 99
100 bool isNone() const { return m_sel.isNone(); } 100 bool isNone() const { return m_sel.isNone(); }
101 bool isCaret() const { return m_sel.isCaret(); } 101 bool isCaret() const { return m_sel.isCaret(); }
102 bool isRange() const { return m_sel.isRange(); } 102 bool isRange() const { return m_sel.isRange(); }
103 bool isCaretOrRange() const { return m_sel.isCaretOrRange(); } 103 bool isCaretOrRange() const { return m_sel.isCaretOrRange(); }
104 bool isInPasswordField() const; 104 bool isInPasswordField() const;
105 105
106 PassRefPtr<Range> toRange() const { return m_sel.toRange(); } 106 PassRefPtr<Range> toNormalizedRange() const { return m_sel.toNormalizedRange (); }
107 107
108 void debugRenderer(RenderObject*, bool selected) const; 108 void debugRenderer(RenderObject*, bool selected) const;
109 109
110 void nodeWillBeRemoved(Node*); 110 void nodeWillBeRemoved(Node*);
111 111
112 bool recomputeCaretRect(); // returns true if caret rect moved 112 bool recomputeCaretRect(); // returns true if caret rect moved
113 void invalidateCaretRect(); 113 void invalidateCaretRect();
114 void paintCaret(GraphicsContext*, int tx, int ty, const IntRect& clipRect); 114 void paintCaret(GraphicsContext*, int tx, int ty, const IntRect& clipRect);
115 115
116 // Used to suspend caret blinking while the mouse is down. 116 // Used to suspend caret blinking while the mouse is down.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 } // namespace WebCore 181 } // namespace WebCore
182 182
183 #ifndef NDEBUG 183 #ifndef NDEBUG
184 // Outside the WebCore namespace for ease of invocation from gdb. 184 // Outside the WebCore namespace for ease of invocation from gdb.
185 void showTree(const WebCore::SelectionController&); 185 void showTree(const WebCore::SelectionController&);
186 void showTree(const WebCore::SelectionController*); 186 void showTree(const WebCore::SelectionController*);
187 #endif 187 #endif
188 188
189 #endif // SelectionController_h 189 #endif // SelectionController_h
190 190
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/editing/Selection.cpp ('k') | third_party/WebKit/WebCore/editing/TypingCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698