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

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

Issue 1958093002: CONTINUED Make FrameSelection to hold non-canonicalized positions Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2017-01-16T20:04:35 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
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 if (!anchorNode) 97 if (!anchorNode)
98 return; 98 return;
99 if (!node.isShadowIncludingInclusiveAncestorOf(anchorNode)) 99 if (!node.isShadowIncludingInclusiveAncestorOf(anchorNode))
100 return; 100 return;
101 m_position.document()->layoutViewItem().clearSelection(); 101 m_position.document()->layoutViewItem().clearSelection();
102 clear(); 102 clear();
103 } 103 }
104 104
105 DEFINE_TRACE(DragCaretController) { 105 DEFINE_TRACE(DragCaretController) {
106 visitor->trace(m_position); 106 visitor->trace(m_position);
107 visitor->trace(m_caretBase);
108 SynchronousMutationObserver::trace(visitor); 107 SynchronousMutationObserver::trace(visitor);
109 } 108 }
110 109
111 void DragCaretController::paintDragCaret(LocalFrame* frame, 110 void DragCaretController::paintDragCaret(LocalFrame* frame,
112 GraphicsContext& context, 111 GraphicsContext& context,
113 const LayoutPoint& paintOffset) const { 112 const LayoutPoint& paintOffset) const {
114 if (m_position.anchorNode()->document().frame() == frame) { 113 if (m_position.anchorNode()->document().frame() == frame) {
115 CaretBase::paintCaret(m_position.anchorNode(), context, *m_caretBase, 114 m_caretBase->paintCaret(m_position.anchorNode(), context, m_caretLocalRect,
116 m_caretLocalRect, paintOffset, 115 paintOffset, DisplayItem::kDragCaret);
117 DisplayItem::kDragCaret);
118 } 116 }
119 } 117 }
120 118
121 } // namespace blink 119 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/DragCaretController.h ('k') | third_party/WebKit/Source/core/editing/FrameCaret.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698