OLD | NEW |
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 Loading... |
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 |
OLD | NEW |