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

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

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/FrameSelection.h ('k') | Source/core/paint/BlockPainter.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, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 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 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1241 const bool selectionHasDirection = true; 1241 const bool selectionHasDirection = true;
1242 setSelection(VisibleSelection(pos.deepEquivalent(), m_selection.extent(), po s.affinity(), selectionHasDirection), CloseTyping | ClearTypingStyle | userTrigg ered); 1242 setSelection(VisibleSelection(pos.deepEquivalent(), m_selection.extent(), po s.affinity(), selectionHasDirection), CloseTyping | ClearTypingStyle | userTrigg ered);
1243 } 1243 }
1244 1244
1245 void FrameSelection::setExtent(const VisiblePosition &pos, EUserTriggered userTr iggered) 1245 void FrameSelection::setExtent(const VisiblePosition &pos, EUserTriggered userTr iggered)
1246 { 1246 {
1247 const bool selectionHasDirection = true; 1247 const bool selectionHasDirection = true;
1248 setSelection(VisibleSelection(m_selection.base(), pos.deepEquivalent(), pos. affinity(), selectionHasDirection), CloseTyping | ClearTypingStyle | userTrigger ed); 1248 setSelection(VisibleSelection(m_selection.base(), pos.deepEquivalent(), pos. affinity(), selectionHasDirection), CloseTyping | ClearTypingStyle | userTrigger ed);
1249 } 1249 }
1250 1250
1251 LayoutBlock* FrameSelection::caretLayoutObject() const
1252 {
1253 return CaretBase::caretLayoutObject(m_selection.start().deprecatedNode());
1254 }
1255
1256 static bool isNonOrphanedCaret(const VisibleSelection& selection) 1251 static bool isNonOrphanedCaret(const VisibleSelection& selection)
1257 { 1252 {
1258 return selection.isCaret() && !selection.start().isOrphan() && !selection.en d().isOrphan(); 1253 return selection.isCaret() && !selection.start().isOrphan() && !selection.en d().isOrphan();
1259 } 1254 }
1260 1255
1261 static bool isTextFormControl(const VisibleSelection& selection) 1256 static bool isTextFormControl(const VisibleSelection& selection)
1262 { 1257 {
1263 return enclosingTextFormControl(selection.start()); 1258 return enclosingTextFormControl(selection.start());
1264 } 1259 }
1265 1260
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
2040 2035
2041 void showTree(const blink::FrameSelection* sel) 2036 void showTree(const blink::FrameSelection* sel)
2042 { 2037 {
2043 if (sel) 2038 if (sel)
2044 sel->showTreeForThis(); 2039 sel->showTreeForThis();
2045 else 2040 else
2046 fprintf(stderr, "Cannot showTree for (nil) FrameSelection.\n"); 2041 fprintf(stderr, "Cannot showTree for (nil) FrameSelection.\n");
2047 } 2042 }
2048 2043
2049 #endif 2044 #endif
OLDNEW
« no previous file with comments | « Source/core/editing/FrameSelection.h ('k') | Source/core/paint/BlockPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698