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

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

Issue 1226833007: Add CaretBase::m_caretPainter, and compute caretBrowsing lazily. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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
« no previous file with comments | « Source/core/editing/Caret.cpp ('k') | Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 void setBase(const VisiblePosition&, EUserTriggered = NotUserTriggered); 141 void setBase(const VisiblePosition&, EUserTriggered = NotUserTriggered);
142 void setExtent(const VisiblePosition&, EUserTriggered = NotUserTriggered); 142 void setExtent(const VisiblePosition&, EUserTriggered = NotUserTriggered);
143 143
144 Position base() const { return m_selection.base(); } 144 Position base() const { return m_selection.base(); }
145 Position extent() const { return m_selection.extent(); } 145 Position extent() const { return m_selection.extent(); }
146 Position start() const { return m_selection.start(); } 146 Position start() const { return m_selection.start(); }
147 Position end() const { return m_selection.end(); } 147 Position end() const { return m_selection.end(); }
148 148
149 // Return the layoutObject that is responsible for painting the caret (in th e selection start node) 149 // Return the layoutObject that is responsible for painting the caret (in th e selection start node)
150 LayoutBlock* caretLayoutObject() const; 150 LayoutBlock* caretLayoutObject() const { return CaretBase::caretPainter(); }
151 151
152 // Bounds of (possibly transformed) caret in absolute coords 152 // Bounds of (possibly transformed) caret in absolute coords
153 IntRect absoluteCaretBounds(); 153 IntRect absoluteCaretBounds();
154 154
155 void didChangeFocus(); 155 void didChangeFocus();
156 void willBeModified(EAlteration, SelectionDirection); 156 void willBeModified(EAlteration, SelectionDirection);
157 157
158 bool isNone() const { return m_selection.isNone(); } 158 bool isNone() const { return m_selection.isNone(); }
159 bool isCaret() const { return m_selection.isCaret(); } 159 bool isCaret() const { return m_selection.isCaret(); }
160 bool isRange() const { return m_selection.isRange(); } 160 bool isRange() const { return m_selection.isRange(); }
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 } 334 }
335 } // namespace blink 335 } // namespace blink
336 336
337 #ifndef NDEBUG 337 #ifndef NDEBUG
338 // Outside the WebCore namespace for ease of invocation from gdb. 338 // Outside the WebCore namespace for ease of invocation from gdb.
339 void showTree(const blink::FrameSelection&); 339 void showTree(const blink::FrameSelection&);
340 void showTree(const blink::FrameSelection*); 340 void showTree(const blink::FrameSelection*);
341 #endif 341 #endif
342 342
343 #endif // FrameSelection_h 343 #endif // FrameSelection_h
OLDNEW
« no previous file with comments | « Source/core/editing/Caret.cpp ('k') | Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698