| 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 void didMergeTextNodes(const Text& oldNode, unsigned offset); | 180 void didMergeTextNodes(const Text& oldNode, unsigned offset); |
| 181 void didSplitTextNode(const Text& oldNode); | 181 void didSplitTextNode(const Text& oldNode); |
| 182 | 182 |
| 183 bool isAppearanceDirty() const; | 183 bool isAppearanceDirty() const; |
| 184 void commitAppearanceIfNeeded(LayoutView&); | 184 void commitAppearanceIfNeeded(LayoutView&); |
| 185 void updateAppearance(); | 185 void updateAppearance(); |
| 186 void setCaretVisible(bool caretIsVisible); | 186 void setCaretVisible(bool caretIsVisible); |
| 187 bool isCaretBoundsDirty() const; | 187 bool isCaretBoundsDirty() const; |
| 188 void setCaretRectNeedsUpdate(); | 188 void setCaretRectNeedsUpdate(); |
| 189 void scheduleVisualUpdate() const; | 189 void scheduleVisualUpdate() const; |
| 190 void invalidateCaretRect(); | 190 void invalidateCaretRect(bool forceInvalidation = false); |
| 191 void paintCaret(GraphicsContext&, const LayoutPoint&); | 191 void paintCaret(GraphicsContext&, const LayoutPoint&); |
| 192 | 192 |
| 193 // Used to suspend caret blinking while the mouse is down. | 193 // Used to suspend caret blinking while the mouse is down. |
| 194 void setCaretBlinkingSuspended(bool); | 194 void setCaretBlinkingSuspended(bool); |
| 195 bool isCaretBlinkingSuspended() const; | 195 bool isCaretBlinkingSuspended() const; |
| 196 | 196 |
| 197 // Focus | 197 // Focus |
| 198 void setFocused(bool); | 198 void setFocused(bool); |
| 199 bool isFocused() const { return m_focused; } | 199 bool isFocused() const { return m_focused; } |
| 200 bool isFocusedAndActive() const; | 200 bool isFocusedAndActive() const; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 // TODO(yosin): We should check DOM tree version and style version in | 240 // TODO(yosin): We should check DOM tree version and style version in |
| 241 // |FrameSelection::selection()| to make sure we use updated selection, | 241 // |FrameSelection::selection()| to make sure we use updated selection, |
| 242 // rather than having |updateIfNeeded()|. Once, we update all layout tests | 242 // rather than having |updateIfNeeded()|. Once, we update all layout tests |
| 243 // to use updated selection, we should make |updateIfNeeded()| private. | 243 // to use updated selection, we should make |updateIfNeeded()| private. |
| 244 void updateIfNeeded(); | 244 void updateIfNeeded(); |
| 245 | 245 |
| 246 DECLARE_VIRTUAL_TRACE(); | 246 DECLARE_VIRTUAL_TRACE(); |
| 247 | 247 |
| 248 private: | 248 private: |
| 249 friend class FrameSelectionTest; | 249 friend class FrameSelectionTest; |
| 250 friend class PaintControllerPaintTestForSlimmingPaintV1AndV2; |
| 251 FRIEND_TEST_ALL_PREFIXES(PaintControllerPaintTestForSlimmingPaintV1AndV2, Fu
llDocumentPaintingWithCaret); |
| 250 | 252 |
| 251 explicit FrameSelection(LocalFrame*); | 253 explicit FrameSelection(LocalFrame*); |
| 252 | 254 |
| 253 // Note: We have |selectionInFlatTree()| for unit tests, we should | 255 // Note: We have |selectionInFlatTree()| for unit tests, we should |
| 254 // use |visibleSelection<EditingInFlatTreeStrategy>()|. | 256 // use |visibleSelection<EditingInFlatTreeStrategy>()|. |
| 255 const VisibleSelectionInFlatTree& selectionInFlatTree() const; | 257 const VisibleSelectionInFlatTree& selectionInFlatTree() const; |
| 256 | 258 |
| 257 template <typename Strategy> | 259 template <typename Strategy> |
| 258 VisiblePositionTemplate<Strategy> originalBase() const; | 260 VisiblePositionTemplate<Strategy> originalBase() const; |
| 259 void setOriginalBase(const VisiblePosition&); | 261 void setOriginalBase(const VisiblePosition&); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 } | 321 } |
| 320 } // namespace blink | 322 } // namespace blink |
| 321 | 323 |
| 322 #ifndef NDEBUG | 324 #ifndef NDEBUG |
| 323 // Outside the WebCore namespace for ease of invocation from gdb. | 325 // Outside the WebCore namespace for ease of invocation from gdb. |
| 324 void showTree(const blink::FrameSelection&); | 326 void showTree(const blink::FrameSelection&); |
| 325 void showTree(const blink::FrameSelection*); | 327 void showTree(const blink::FrameSelection*); |
| 326 #endif | 328 #endif |
| 327 | 329 |
| 328 #endif // FrameSelection_h | 330 #endif // FrameSelection_h |
| OLD | NEW |