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

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

Issue 2627423002: Make FrameCaret contains CaretBase instead of deriving from it (Closed)
Patch Set: 2017-01-16T16:55:39 Created 3 years, 11 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
« no previous file with comments | « third_party/WebKit/Source/core/editing/FrameCaret.cpp ('k') | no next file » | 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 m_granularity(CharacterGranularity), 99 m_granularity(CharacterGranularity),
100 m_xPosForVerticalArrowNavigation(NoXPosForVerticalArrowNavigation()), 100 m_xPosForVerticalArrowNavigation(NoXPosForVerticalArrowNavigation()),
101 m_focused(frame.page() && 101 m_focused(frame.page() &&
102 frame.page()->focusController().focusedFrame() == frame), 102 frame.page()->focusController().focusedFrame() == frame),
103 m_frameCaret(new FrameCaret(frame, *m_selectionEditor)) {} 103 m_frameCaret(new FrameCaret(frame, *m_selectionEditor)) {}
104 104
105 FrameSelection::~FrameSelection() {} 105 FrameSelection::~FrameSelection() {}
106 106
107 const DisplayItemClient& FrameSelection::caretDisplayItemClientForTesting() 107 const DisplayItemClient& FrameSelection::caretDisplayItemClientForTesting()
108 const { 108 const {
109 return *m_frameCaret; 109 return m_frameCaret->displayItemClient();
110 } 110 }
111 111
112 const Document& FrameSelection::document() const { 112 const Document& FrameSelection::document() const {
113 DCHECK(m_document); 113 DCHECK(m_document);
114 return *m_document; 114 return *m_document;
115 } 115 }
116 116
117 Document& FrameSelection::document() { 117 Document& FrameSelection::document() {
118 DCHECK(m_document); 118 DCHECK(m_document);
119 return *m_document; 119 return *m_document;
(...skipping 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after
1410 } 1410 }
1411 1411
1412 void showTree(const blink::FrameSelection* sel) { 1412 void showTree(const blink::FrameSelection* sel) {
1413 if (sel) 1413 if (sel)
1414 sel->showTreeForThis(); 1414 sel->showTreeForThis();
1415 else 1415 else
1416 LOG(INFO) << "Cannot showTree for <null> FrameSelection."; 1416 LOG(INFO) << "Cannot showTree for <null> FrameSelection.";
1417 } 1417 }
1418 1418
1419 #endif 1419 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/FrameCaret.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698