OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 20 matching lines...) Expand all Loading... |
31 #ifndef RenderedPosition_h | 31 #ifndef RenderedPosition_h |
32 #define RenderedPosition_h | 32 #define RenderedPosition_h |
33 | 33 |
34 #include "core/CoreExport.h" | 34 #include "core/CoreExport.h" |
35 #include "core/editing/VisiblePosition.h" | 35 #include "core/editing/VisiblePosition.h" |
36 #include "core/layout/line/InlineBox.h" | 36 #include "core/layout/line/InlineBox.h" |
37 #include "wtf/Allocator.h" | 37 #include "wtf/Allocator.h" |
38 | 38 |
39 namespace blink { | 39 namespace blink { |
40 | 40 |
| 41 class GraphicsLayer; |
| 42 class LayoutPoint; |
41 class LayoutUnit; | 43 class LayoutUnit; |
42 class LayoutObject; | 44 class LayoutObject; |
43 struct CompositedSelectionBound; | 45 struct CompositedSelectionBound; |
44 | 46 |
45 class RenderedPosition { | 47 class RenderedPosition { |
46 STACK_ALLOCATED(); | 48 STACK_ALLOCATED(); |
47 | 49 |
48 public: | 50 public: |
49 RenderedPosition(); | 51 RenderedPosition(); |
50 explicit RenderedPosition(const VisiblePosition&); | 52 explicit RenderedPosition(const VisiblePosition&); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 return m_inlineBox && m_offset == m_inlineBox->caretLeftmostOffset(); | 97 return m_inlineBox && m_offset == m_inlineBox->caretLeftmostOffset(); |
96 } | 98 } |
97 bool atRightmostOffsetInBox() const { | 99 bool atRightmostOffsetInBox() const { |
98 return m_inlineBox && m_offset == m_inlineBox->caretRightmostOffset(); | 100 return m_inlineBox && m_offset == m_inlineBox->caretRightmostOffset(); |
99 } | 101 } |
100 bool atLeftBoundaryOfBidiRun(ShouldMatchBidiLevel, | 102 bool atLeftBoundaryOfBidiRun(ShouldMatchBidiLevel, |
101 unsigned char bidiLevelOfRun) const; | 103 unsigned char bidiLevelOfRun) const; |
102 bool atRightBoundaryOfBidiRun(ShouldMatchBidiLevel, | 104 bool atRightBoundaryOfBidiRun(ShouldMatchBidiLevel, |
103 unsigned char bidiLevelOfRun) const; | 105 unsigned char bidiLevelOfRun) const; |
104 | 106 |
| 107 FloatPoint localToInvalidationBackingPoint( |
| 108 const LayoutPoint& localPoint, |
| 109 GraphicsLayer** graphicsLayerBacking) const; |
| 110 |
105 LayoutObject* m_layoutObject; | 111 LayoutObject* m_layoutObject; |
106 InlineBox* m_inlineBox; | 112 InlineBox* m_inlineBox; |
107 int m_offset; | 113 int m_offset; |
108 | 114 |
109 static InlineBox* uncachedInlineBox() { | 115 static InlineBox* uncachedInlineBox() { |
110 return reinterpret_cast<InlineBox*>(1); | 116 return reinterpret_cast<InlineBox*>(1); |
111 } | 117 } |
112 // Needs to be different form 0 so pick 1 because it's also on the null page. | 118 // Needs to be different form 0 so pick 1 because it's also on the null page. |
113 | 119 |
114 mutable InlineBox* m_prevLeafChild; | 120 mutable InlineBox* m_prevLeafChild; |
(...skipping 14 matching lines...) Expand all Loading... |
129 m_inlineBox(box), | 135 m_inlineBox(box), |
130 m_offset(offset), | 136 m_offset(offset), |
131 m_prevLeafChild(uncachedInlineBox()), | 137 m_prevLeafChild(uncachedInlineBox()), |
132 m_nextLeafChild(uncachedInlineBox()) {} | 138 m_nextLeafChild(uncachedInlineBox()) {} |
133 | 139 |
134 CORE_EXPORT bool layoutObjectContainsPosition(LayoutObject*, const Position&); | 140 CORE_EXPORT bool layoutObjectContainsPosition(LayoutObject*, const Position&); |
135 | 141 |
136 } // namespace blink | 142 } // namespace blink |
137 | 143 |
138 #endif // RenderedPosition_h | 144 #endif // RenderedPosition_h |
OLD | NEW |