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

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

Issue 2637953002: Move CaretBase::shouldRepaintCaret() to FrameCaret.cpp (Closed)
Patch Set: 2017-01-17T12:43:36 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 | « no previous file | third_party/WebKit/Source/core/editing/CaretBase.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 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 CaretBase(); 45 CaretBase();
46 virtual ~CaretBase(); 46 virtual ~CaretBase();
47 47
48 void invalidateCaretRect(Node*, const LayoutRect&); 48 void invalidateCaretRect(Node*, const LayoutRect&);
49 // Creating VisiblePosition causes synchronous layout so we should use the 49 // Creating VisiblePosition causes synchronous layout so we should use the
50 // PositionWithAffinity version if possible. 50 // PositionWithAffinity version if possible.
51 // A position in HTMLTextFromControlElement is a typical example. 51 // A position in HTMLTextFromControlElement is a typical example.
52 static LayoutRect computeCaretRect(const PositionWithAffinity& caretPosition); 52 static LayoutRect computeCaretRect(const PositionWithAffinity& caretPosition);
53 static IntRect absoluteBoundsForLocalRect(Node*, const LayoutRect&); 53 static IntRect absoluteBoundsForLocalRect(Node*, const LayoutRect&);
54 54
55 // TODO(yosin): We should move |shouldRepaintCaret()| to "FrameCaret.cpp" as
56 // static file local function.
57 static bool shouldRepaintCaret(Node&);
58
59 void paintCaret(Node*, 55 void paintCaret(Node*,
60 GraphicsContext&, 56 GraphicsContext&,
61 const LayoutRect& caretLocalRect, 57 const LayoutRect& caretLocalRect,
62 const LayoutPoint&, 58 const LayoutPoint&,
63 DisplayItem::Type); 59 DisplayItem::Type);
64 60
65 static LayoutBlock* caretLayoutObject(Node*); 61 static LayoutBlock* caretLayoutObject(Node*);
66 void invalidateLocalCaretRect(Node*, const LayoutRect&); 62 void invalidateLocalCaretRect(Node*, const LayoutRect&);
67 63
68 // DisplayItemClient methods. 64 // DisplayItemClient methods.
69 LayoutRect visualRect() const final; 65 LayoutRect visualRect() const final;
70 String debugName() const final; 66 String debugName() const final;
71 67
72 private: 68 private:
73 LayoutRect m_visualRect; 69 LayoutRect m_visualRect;
74 }; 70 };
75 71
76 } // namespace blink 72 } // namespace blink
77 73
78 #endif // CaretBase_h 74 #endif // CaretBase_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/CaretBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698