| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 | 270 |
| 271 bool shouldShowBlockCursor() const; | 271 bool shouldShowBlockCursor() const; |
| 272 void setShouldShowBlockCursor(bool); | 272 void setShouldShowBlockCursor(bool); |
| 273 | 273 |
| 274 // TODO(yosin): We should check DOM tree version and style version in | 274 // TODO(yosin): We should check DOM tree version and style version in |
| 275 // |FrameSelection::selection()| to make sure we use updated selection, | 275 // |FrameSelection::selection()| to make sure we use updated selection, |
| 276 // rather than having |updateIfNeeded()|. Once, we update all layout tests | 276 // rather than having |updateIfNeeded()|. Once, we update all layout tests |
| 277 // to use updated selection, we should make |updateIfNeeded()| private. | 277 // to use updated selection, we should make |updateIfNeeded()| private. |
| 278 void updateIfNeeded(); | 278 void updateIfNeeded(); |
| 279 | 279 |
| 280 bool inUpdateSelectionIfNeeded() const { return m_inUpdateSelectionIfNeeded; } |
| 281 |
| 280 DECLARE_TRACE(); | 282 DECLARE_TRACE(); |
| 281 | 283 |
| 282 private: | 284 private: |
| 283 friend class FrameSelectionTest; | 285 friend class FrameSelectionTest; |
| 284 friend class PaintControllerPaintTestForSlimmingPaintV1AndV2; | 286 friend class PaintControllerPaintTestForSlimmingPaintV1AndV2; |
| 285 friend class SelectionControllerTest; | 287 friend class SelectionControllerTest; |
| 286 FRIEND_TEST_ALL_PREFIXES(PaintControllerPaintTestForSlimmingPaintV1AndV2, | 288 FRIEND_TEST_ALL_PREFIXES(PaintControllerPaintTestForSlimmingPaintV1AndV2, |
| 287 FullDocumentPaintingWithCaret); | 289 FullDocumentPaintingWithCaret); |
| 288 | 290 |
| 289 explicit FrameSelection(LocalFrame&); | 291 explicit FrameSelection(LocalFrame&); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 Member<EditingStyle> m_typingStyle; | 336 Member<EditingStyle> m_typingStyle; |
| 335 | 337 |
| 336 bool m_focused : 1; | 338 bool m_focused : 1; |
| 337 | 339 |
| 338 // Controls text granularity used to adjust the selection's extent in | 340 // Controls text granularity used to adjust the selection's extent in |
| 339 // moveRangeSelectionExtent. | 341 // moveRangeSelectionExtent. |
| 340 std::unique_ptr<GranularityStrategy> m_granularityStrategy; | 342 std::unique_ptr<GranularityStrategy> m_granularityStrategy; |
| 341 | 343 |
| 342 const Member<FrameCaret> m_frameCaret; | 344 const Member<FrameCaret> m_frameCaret; |
| 343 bool m_useSecureKeyboardEntryWhenActive = false; | 345 bool m_useSecureKeyboardEntryWhenActive = false; |
| 346 |
| 347 bool m_inUpdateSelectionIfNeeded = false; |
| 344 }; | 348 }; |
| 345 | 349 |
| 346 inline EditingStyle* FrameSelection::typingStyle() const { | 350 inline EditingStyle* FrameSelection::typingStyle() const { |
| 347 return m_typingStyle.get(); | 351 return m_typingStyle.get(); |
| 348 } | 352 } |
| 349 | 353 |
| 350 inline void FrameSelection::clearTypingStyle() { | 354 inline void FrameSelection::clearTypingStyle() { |
| 351 m_typingStyle.clear(); | 355 m_typingStyle.clear(); |
| 352 } | 356 } |
| 353 | 357 |
| 354 inline void FrameSelection::setTypingStyle(EditingStyle* style) { | 358 inline void FrameSelection::setTypingStyle(EditingStyle* style) { |
| 355 m_typingStyle = style; | 359 m_typingStyle = style; |
| 356 } | 360 } |
| 357 } // namespace blink | 361 } // namespace blink |
| 358 | 362 |
| 359 #ifndef NDEBUG | 363 #ifndef NDEBUG |
| 360 // Outside the WebCore namespace for ease of invocation from gdb. | 364 // Outside the WebCore namespace for ease of invocation from gdb. |
| 361 void showTree(const blink::FrameSelection&); | 365 void showTree(const blink::FrameSelection&); |
| 362 void showTree(const blink::FrameSelection*); | 366 void showTree(const blink::FrameSelection*); |
| 363 #endif | 367 #endif |
| 364 | 368 |
| 365 #endif // FrameSelection_h | 369 #endif // FrameSelection_h |
| OLD | NEW |