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

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

Issue 2271883002: Fix paint invalidation and painting for composited-scrolling input elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: none Created 4 years, 3 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, 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 17 matching lines...) Expand all
28 28
29 #include "core/CoreExport.h" 29 #include "core/CoreExport.h"
30 #include "core/editing/VisiblePosition.h" 30 #include "core/editing/VisiblePosition.h"
31 #include "platform/geometry/IntRect.h" 31 #include "platform/geometry/IntRect.h"
32 #include "platform/geometry/LayoutRect.h" 32 #include "platform/geometry/LayoutRect.h"
33 #include "wtf/Noncopyable.h" 33 #include "wtf/Noncopyable.h"
34 34
35 namespace blink { 35 namespace blink {
36 36
37 class CullRect; 37 class CullRect;
38 class DisplayItemClient;
38 class LocalFrame; 39 class LocalFrame;
39 class GraphicsContext; 40 class GraphicsContext;
40 class LayoutBlock; 41 class LayoutBlock;
41 class LayoutViewItem; 42 class LayoutViewItem;
42 43
43 enum class CaretVisibility { Visible, Hidden }; 44 enum class CaretVisibility { Visible, Hidden };
44 45
45 class CORE_EXPORT CaretBase : public GarbageCollectedFinalized<CaretBase> { 46 class CORE_EXPORT CaretBase : public GarbageCollectedFinalized<CaretBase> {
46 WTF_MAKE_NONCOPYABLE(CaretBase); 47 WTF_MAKE_NONCOPYABLE(CaretBase);
47 public: 48 public:
(...skipping 17 matching lines...) Expand all
65 virtual void setCaretVisibility(CaretVisibility); 66 virtual void setCaretVisibility(CaretVisibility);
66 bool caretIsVisible() const { return m_caretVisibility == CaretVisibility::V isible; } 67 bool caretIsVisible() const { return m_caretVisibility == CaretVisibility::V isible; }
67 CaretVisibility getCaretVisibility() const { return m_caretVisibility; } 68 CaretVisibility getCaretVisibility() const { return m_caretVisibility; }
68 69
69 static LayoutBlock* caretLayoutObject(Node*); 70 static LayoutBlock* caretLayoutObject(Node*);
70 static void invalidateLocalCaretRect(Node*, const LayoutRect&); 71 static void invalidateLocalCaretRect(Node*, const LayoutRect&);
71 72
72 DECLARE_VIRTUAL_TRACE(); 73 DECLARE_VIRTUAL_TRACE();
73 74
74 private: 75 private:
76 static DisplayItemClient* displayItemClientForCaret(Node*);
77
75 LayoutRect m_caretLocalRect; // caret rect in coords local to the layoutObje ct responsible for painting the caret 78 LayoutRect m_caretLocalRect; // caret rect in coords local to the layoutObje ct responsible for painting the caret
76 CaretVisibility m_caretVisibility; 79 CaretVisibility m_caretVisibility;
77 }; 80 };
78 81
79 } // namespace blink 82 } // namespace blink
80 83
81 #endif // CaretBase_h 84 #endif // CaretBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698