OLD | NEW |
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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 | 249 |
250 FloatRect bounds(bool clipToVisibleContent = true) const; | 250 FloatRect bounds(bool clipToVisibleContent = true) const; |
251 | 251 |
252 void getClippedVisibleTextRectangles(Vector<FloatRect>&) const; | 252 void getClippedVisibleTextRectangles(Vector<FloatRect>&) const; |
253 | 253 |
254 HTMLFormElement* currentForm() const; | 254 HTMLFormElement* currentForm() const; |
255 | 255 |
256 void revealSelection(const ScrollAlignment& = ScrollAlignment::alignCenterIf
Needed, RevealExtentOption = DoNotRevealExtent); | 256 void revealSelection(const ScrollAlignment& = ScrollAlignment::alignCenterIf
Needed, RevealExtentOption = DoNotRevealExtent); |
257 void setSelectionFromNone(); | 257 void setSelectionFromNone(); |
258 | 258 |
| 259 bool shouldShowBlockCursor() const { return m_shouldShowBlockCursor; } |
| 260 void setShouldShowBlockCursor(bool); |
| 261 |
259 private: | 262 private: |
260 enum EPositionType { START, END, BASE, EXTENT }; | 263 enum EPositionType { START, END, BASE, EXTENT }; |
261 | 264 |
262 void respondToNodeModification(Node*, bool baseRemoved, bool extentRemoved,
bool startRemoved, bool endRemoved); | 265 void respondToNodeModification(Node*, bool baseRemoved, bool extentRemoved,
bool startRemoved, bool endRemoved); |
263 TextDirection directionOfEnclosingBlock(); | 266 TextDirection directionOfEnclosingBlock(); |
264 TextDirection directionOfSelection(); | 267 TextDirection directionOfSelection(); |
265 | 268 |
266 VisiblePosition positionForPlatform(bool isGetStart) const; | 269 VisiblePosition positionForPlatform(bool isGetStart) const; |
267 VisiblePosition startForPlatform() const; | 270 VisiblePosition startForPlatform() const; |
268 VisiblePosition endForPlatform() const; | 271 VisiblePosition endForPlatform() const; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 | 308 |
306 RefPtr<EditingStyle> m_typingStyle; | 309 RefPtr<EditingStyle> m_typingStyle; |
307 | 310 |
308 Timer<FrameSelection> m_caretBlinkTimer; | 311 Timer<FrameSelection> m_caretBlinkTimer; |
309 // The painted bounds of the caret in absolute coordinates | 312 // The painted bounds of the caret in absolute coordinates |
310 IntRect m_absCaretBounds; | 313 IntRect m_absCaretBounds; |
311 bool m_absCaretBoundsDirty : 1; | 314 bool m_absCaretBoundsDirty : 1; |
312 bool m_caretPaint : 1; | 315 bool m_caretPaint : 1; |
313 bool m_isCaretBlinkingSuspended : 1; | 316 bool m_isCaretBlinkingSuspended : 1; |
314 bool m_focused : 1; | 317 bool m_focused : 1; |
| 318 bool m_shouldShowBlockCursor : 1; |
315 }; | 319 }; |
316 | 320 |
317 inline EditingStyle* FrameSelection::typingStyle() const | 321 inline EditingStyle* FrameSelection::typingStyle() const |
318 { | 322 { |
319 return m_typingStyle.get(); | 323 return m_typingStyle.get(); |
320 } | 324 } |
321 | 325 |
322 inline void FrameSelection::clearTypingStyle() | 326 inline void FrameSelection::clearTypingStyle() |
323 { | 327 { |
324 m_typingStyle.clear(); | 328 m_typingStyle.clear(); |
325 } | 329 } |
326 | 330 |
327 inline void FrameSelection::setTypingStyle(PassRefPtr<EditingStyle> style) | 331 inline void FrameSelection::setTypingStyle(PassRefPtr<EditingStyle> style) |
328 { | 332 { |
329 m_typingStyle = style; | 333 m_typingStyle = style; |
330 } | 334 } |
331 } // namespace WebCore | 335 } // namespace WebCore |
332 | 336 |
333 #ifndef NDEBUG | 337 #ifndef NDEBUG |
334 // Outside the WebCore namespace for ease of invocation from gdb. | 338 // Outside the WebCore namespace for ease of invocation from gdb. |
335 void showTree(const WebCore::FrameSelection&); | 339 void showTree(const WebCore::FrameSelection&); |
336 void showTree(const WebCore::FrameSelection*); | 340 void showTree(const WebCore::FrameSelection*); |
337 #endif | 341 #endif |
338 | 342 |
339 #endif // FrameSelection_h | 343 #endif // FrameSelection_h |
OLD | NEW |