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

Unified Diff: third_party/WebKit/Source/core/editing/CaretBase.h

Issue 2623053006: Get rid of CaretBase::m_caretLocalRect (Closed)
Patch Set: 2017-01-12T19:03:43 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/CaretBase.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/CaretBase.h
diff --git a/third_party/WebKit/Source/core/editing/CaretBase.h b/third_party/WebKit/Source/core/editing/CaretBase.h
index 15cbba2d208fec63addfce7fa6765fe5a02fe85e..264bc57b759250fb1efed304628229890ee7b6ff 100644
--- a/third_party/WebKit/Source/core/editing/CaretBase.h
+++ b/third_party/WebKit/Source/core/editing/CaretBase.h
@@ -48,23 +48,29 @@ class CORE_EXPORT CaretBase : public GarbageCollectedFinalized<CaretBase>,
CaretBase();
virtual ~CaretBase();
- void invalidateCaretRect(Node*);
- void clearCaretRect();
+ void invalidateCaretRect(Node*, const LayoutRect&);
// Creating VisiblePosition causes synchronous layout so we should use the
// PositionWithAffinity version if possible.
// A position in HTMLTextFromControlElement is a typical example.
- void updateCaretRect(const PositionWithAffinity& caretPosition);
- void updateCaretRect(const VisiblePosition& caretPosition);
+ static LayoutRect computeCaretRect(const PositionWithAffinity& caretPosition);
+
+ // TODO(yosin): We should move |computeCaretRect()| with |VisiblePosition| to
+ // "FrameCaret.cpp" as static file local function.
+ static LayoutRect computeCaretRect(const VisiblePosition& caretPosition);
+
+ // TODO(yosin): We should move |absoluteBoundsForLocalRect()| with
+ // |VisiblePosition| to "FrameCaret.cpp" as static file local function.
IntRect absoluteBoundsForLocalRect(Node*, const LayoutRect&) const;
- bool shouldRepaintCaret(Node&) const;
- void paintCaret(Node*,
- GraphicsContext&,
- const LayoutPoint&,
- DisplayItem::Type) const;
- const LayoutRect& localCaretRectWithoutUpdate() const {
- return m_caretLocalRect;
- }
+ // TODO(yosin): We should move |shouldRepaintCaret()| to "FrameCaret.cpp" as
+ // static file local function.
+ bool shouldRepaintCaret(Node&) const;
+ static void paintCaret(Node*,
+ GraphicsContext&,
+ const DisplayItemClient&,
+ const LayoutRect& caretLocalRect,
+ const LayoutPoint&,
+ DisplayItem::Type);
static LayoutBlock* caretLayoutObject(Node*);
void invalidateLocalCaretRect(Node*, const LayoutRect&);
@@ -76,9 +82,6 @@ class CORE_EXPORT CaretBase : public GarbageCollectedFinalized<CaretBase>,
DECLARE_VIRTUAL_TRACE();
private:
- // caret rect in coords local to the layoutObject responsible for painting the
- // caret
- LayoutRect m_caretLocalRect;
LayoutRect m_visualRect;
};
« 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