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

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

Issue 1994883002: [Editing][CodeHealth] Extract new FrameCaret class from FrameSelection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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 25 matching lines...) Expand all
36 #include "core/paint/PaintInfo.h" 36 #include "core/paint/PaintInfo.h"
37 #include "platform/graphics/GraphicsContext.h" 37 #include "platform/graphics/GraphicsContext.h"
38 38
39 namespace blink { 39 namespace blink {
40 40
41 CaretBase::CaretBase(CaretVisibility visibility) 41 CaretBase::CaretBase(CaretVisibility visibility)
42 : m_caretVisibility(visibility) 42 : m_caretVisibility(visibility)
43 { 43 {
44 } 44 }
45 45
46 CaretBase::~CaretBase() = default;
47
48 DEFINE_TRACE(CaretBase)
49 {
50 }
51
46 void CaretBase::clearCaretRect() 52 void CaretBase::clearCaretRect()
47 { 53 {
48 m_caretLocalRect = LayoutRect(); 54 m_caretLocalRect = LayoutRect();
49 } 55 }
50 56
51 static inline bool caretRendersInsideNode(Node* node) 57 static inline bool caretRendersInsideNode(Node* node)
52 { 58 {
53 return node && !isDisplayInsideTable(node) && !editingIgnoresContent(node); 59 return node && !isDisplayInsideTable(node) && !editingIgnoresContent(node);
54 } 60 }
55 61
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 else 200 else
195 element = node->parentElement(); 201 element = node->parentElement();
196 202
197 if (element && element->layoutObject()) 203 if (element && element->layoutObject())
198 caretColor = element->layoutObject()->resolveColor(CSSPropertyColor); 204 caretColor = element->layoutObject()->resolveColor(CSSPropertyColor);
199 205
200 context.fillRect(FloatRect(drawingRect), caretColor); 206 context.fillRect(FloatRect(drawingRect), caretColor);
201 } 207 }
202 208
203 } // namespace blink 209 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/CaretBase.h ('k') | third_party/WebKit/Source/core/editing/DragCaretController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698