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

Side by Side Diff: Source/core/editing/Caret.h

Issue 806223002: Remove unused/unneeded code from core/editing. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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 | Source/core/editing/Caret.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 reserved. 2 * Copyright (C) 2004, 2005, 2006, 2007, 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // PositionWithAffinity version if possible. 52 // PositionWithAffinity version if possible.
53 // A position in HTMLTextFromControlElement is a typical example. 53 // A position in HTMLTextFromControlElement is a typical example.
54 bool updateCaretRect(Document*, const PositionWithAffinity& caretPosition); 54 bool updateCaretRect(Document*, const PositionWithAffinity& caretPosition);
55 bool updateCaretRect(Document*, const VisiblePosition& caretPosition); 55 bool updateCaretRect(Document*, const VisiblePosition& caretPosition);
56 IntRect absoluteBoundsForLocalRect(Node*, const LayoutRect&) const; 56 IntRect absoluteBoundsForLocalRect(Node*, const LayoutRect&) const;
57 bool shouldRepaintCaret(const RenderView*, bool isContentEditable) const; 57 bool shouldRepaintCaret(const RenderView*, bool isContentEditable) const;
58 void paintCaret(Node*, GraphicsContext*, const LayoutPoint&, const LayoutRec t& clipRect) const; 58 void paintCaret(Node*, GraphicsContext*, const LayoutPoint&, const LayoutRec t& clipRect) const;
59 59
60 const LayoutRect& localCaretRectWithoutUpdate() const { return m_caretLocalR ect; } 60 const LayoutRect& localCaretRectWithoutUpdate() const { return m_caretLocalR ect; }
61 61
62 bool shouldUpdateCaretRect() const { return m_caretRectNeedsUpdate; }
63 void setCaretRectNeedsUpdate() { m_caretRectNeedsUpdate = true; }
64
65 void setCaretVisibility(CaretVisibility visibility) { m_caretVisibility = vi sibility; } 62 void setCaretVisibility(CaretVisibility visibility) { m_caretVisibility = vi sibility; }
66 bool caretIsVisible() const { return m_caretVisibility == Visible; } 63 bool caretIsVisible() const { return m_caretVisibility == Visible; }
67 CaretVisibility caretVisibility() const { return m_caretVisibility; } 64 CaretVisibility caretVisibility() const { return m_caretVisibility; }
68 65
69 protected: 66 protected:
70 static RenderBlock* caretRenderer(Node*); 67 static RenderBlock* caretRenderer(Node*);
71 static void invalidateLocalCaretRect(Node*, const LayoutRect&); 68 static void invalidateLocalCaretRect(Node*, const LayoutRect&);
72 69
73 private: 70 private:
74 LayoutRect m_caretLocalRect; // caret rect in coords local to the renderer r esponsible for painting the caret 71 LayoutRect m_caretLocalRect; // caret rect in coords local to the renderer r esponsible for painting the caret
75 bool m_caretRectNeedsUpdate; // true if m_caretRect (and m_absCaretBounds in FrameSelection) need to be calculated
76 CaretVisibility m_caretVisibility; 72 CaretVisibility m_caretVisibility;
77 }; 73 };
78 74
79 class DragCaretController final : public NoBaseWillBeGarbageCollected<DragCaretC ontroller>, private CaretBase { 75 class DragCaretController final : public NoBaseWillBeGarbageCollected<DragCaretC ontroller>, private CaretBase {
80 WTF_MAKE_NONCOPYABLE(DragCaretController); 76 WTF_MAKE_NONCOPYABLE(DragCaretController);
81 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; 77 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
82 public: 78 public:
83 static PassOwnPtrWillBeRawPtr<DragCaretController> create(); 79 static PassOwnPtrWillBeRawPtr<DragCaretController> create();
84 80
85 RenderBlock* caretRenderer() const; 81 RenderBlock* caretRenderer() const;
(...skipping 14 matching lines...) Expand all
100 private: 96 private:
101 DragCaretController(); 97 DragCaretController();
102 98
103 VisiblePosition m_position; 99 VisiblePosition m_position;
104 }; 100 };
105 101
106 } // namespace blink 102 } // namespace blink
107 103
108 104
109 #endif // Caret_h 105 #endif // Caret_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/editing/Caret.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698