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

Side by Side Diff: Source/core/editing/FrameSelection.h

Issue 17005008: Don't show caret when containing element doesn't have focus (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2013-06-28T14:12:48 Created 7 years, 5 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, 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 // Return the renderer that is responsible for painting the caret (in the se lection start node) 185 // Return the renderer that is responsible for painting the caret (in the se lection start node)
186 RenderObject* caretRenderer() const; 186 RenderObject* caretRenderer() const;
187 187
188 // Caret rect local to the caret's renderer 188 // Caret rect local to the caret's renderer
189 LayoutRect localCaretRect(); 189 LayoutRect localCaretRect();
190 190
191 // Bounds of (possibly transformed) caret in absolute coords 191 // Bounds of (possibly transformed) caret in absolute coords
192 IntRect absoluteCaretBounds(); 192 IntRect absoluteCaretBounds();
193 void setCaretRectNeedsUpdate() { CaretBase::setCaretRectNeedsUpdate(); } 193 void setCaretRectNeedsUpdate() { CaretBase::setCaretRectNeedsUpdate(); }
194 194
195 void didFocusChanged();
tkent 2013/06/28 06:46:56 nit: The name should be didChangeFocus or focusWas
yosin_UTC9 2013/06/28 08:22:46 Done.
195 void willBeModified(EAlteration, SelectionDirection); 196 void willBeModified(EAlteration, SelectionDirection);
196 197
197 bool isNone() const { return m_selection.isNone(); } 198 bool isNone() const { return m_selection.isNone(); }
198 bool isCaret() const { return m_selection.isCaret(); } 199 bool isCaret() const { return m_selection.isCaret(); }
199 bool isRange() const { return m_selection.isRange(); } 200 bool isRange() const { return m_selection.isRange(); }
200 bool isCaretOrRange() const { return m_selection.isCaretOrRange(); } 201 bool isCaretOrRange() const { return m_selection.isCaretOrRange(); }
201 bool isInPasswordField() const; 202 bool isInPasswordField() const;
202 bool isAll(EditingBoundaryCrossingRule rule = CannotCrossEditingBoundary) co nst { return m_selection.isAll(rule); } 203 bool isAll(EditingBoundaryCrossingRule rule = CannotCrossEditingBoundary) co nst { return m_selection.isAll(rule); }
203 204
204 PassRefPtr<Range> toNormalizedRange() const { return m_selection.toNormalize dRange(); } 205 PassRefPtr<Range> toNormalizedRange() const { return m_selection.toNormalize dRange(); }
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 285
285 void notifyAccessibilityForSelectionChange(); 286 void notifyAccessibilityForSelectionChange();
286 287
287 void focusedOrActiveStateChanged(); 288 void focusedOrActiveStateChanged();
288 289
289 void caretBlinkTimerFired(Timer<FrameSelection>*); 290 void caretBlinkTimerFired(Timer<FrameSelection>*);
290 291
291 void setUseSecureKeyboardEntry(bool); 292 void setUseSecureKeyboardEntry(bool);
292 293
293 void setCaretVisibility(CaretVisibility); 294 void setCaretVisibility(CaretVisibility);
295 bool shouldBlinkCaret() const;
294 296
295 bool dispatchSelectStart(); 297 bool dispatchSelectStart();
296 298
297 bool visualWordMovementEnabled() const; 299 bool visualWordMovementEnabled() const;
298 300
299 Frame* m_frame; 301 Frame* m_frame;
300 302
301 LayoutUnit m_xPosForVerticalArrowNavigation; 303 LayoutUnit m_xPosForVerticalArrowNavigation;
302 304
303 VisibleSelection m_selection; 305 VisibleSelection m_selection;
(...skipping 30 matching lines...) Expand all
334 } 336 }
335 } // namespace WebCore 337 } // namespace WebCore
336 338
337 #ifndef NDEBUG 339 #ifndef NDEBUG
338 // Outside the WebCore namespace for ease of invocation from gdb. 340 // Outside the WebCore namespace for ease of invocation from gdb.
339 void showTree(const WebCore::FrameSelection&); 341 void showTree(const WebCore::FrameSelection&);
340 void showTree(const WebCore::FrameSelection*); 342 void showTree(const WebCore::FrameSelection*);
341 #endif 343 #endif
342 344
343 #endif // FrameSelection_h 345 #endif // FrameSelection_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698