OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2006 Apple Computer, Inc. | 3 * Copyright (C) 2006 Apple Computer, Inc. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 FrameView* frameView() const { return m_frameView; } | 81 FrameView* frameView() const { return m_frameView; } |
82 | 82 |
83 virtual void mapRectToPaintInvalidationBacking(const RenderLayerModelObject*
paintInvalidationContainer, LayoutRect&, bool fixed = false, const PaintInvalid
ationState* = 0) const OVERRIDE; | 83 virtual void mapRectToPaintInvalidationBacking(const RenderLayerModelObject*
paintInvalidationContainer, LayoutRect&, bool fixed = false, const PaintInvalid
ationState* = 0) const OVERRIDE; |
84 void invalidatePaintForRectangle(const LayoutRect&) const; | 84 void invalidatePaintForRectangle(const LayoutRect&) const; |
85 | 85 |
86 void invalidatePaintForViewAndCompositedLayers(); | 86 void invalidatePaintForViewAndCompositedLayers(); |
87 | 87 |
88 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE; | 88 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE; |
89 virtual void paintBoxDecorationBackground(PaintInfo&, const LayoutPoint&) OV
ERRIDE; | 89 virtual void paintBoxDecorationBackground(PaintInfo&, const LayoutPoint&) OV
ERRIDE; |
90 | 90 |
91 enum SelectionRepaintMode { RepaintNewXOROld, RepaintNewMinusOld, RepaintNot
hing }; | 91 enum SelectionPaintInvalidationMode { PaintInvalidationNewXOROld, PaintInval
idationNewMinusOld, PaintInvalidationNothing }; |
92 void setSelection(RenderObject* start, int startPos, RenderObject* end, int
endPos, SelectionRepaintMode = RepaintNewXOROld); | 92 void setSelection(RenderObject* start, int startPos, RenderObject*, int endP
os, SelectionPaintInvalidationMode = PaintInvalidationNewXOROld); |
93 void getSelection(RenderObject*& startRenderer, int& startOffset, RenderObje
ct*& endRenderer, int& endOffset) const; | 93 void getSelection(RenderObject*& startRenderer, int& startOffset, RenderObje
ct*& endRenderer, int& endOffset) const; |
94 void clearSelection(); | 94 void clearSelection(); |
95 RenderObject* selectionStart() const { return m_selectionStart; } | 95 RenderObject* selectionStart() const { return m_selectionStart; } |
96 RenderObject* selectionEnd() const { return m_selectionEnd; } | 96 RenderObject* selectionEnd() const { return m_selectionEnd; } |
97 IntRect selectionBounds(bool clipToVisibleContent = true) const; | 97 IntRect selectionBounds(bool clipToVisibleContent = true) const; |
98 void selectionStartEnd(int& startPos, int& endPos) const; | 98 void selectionStartEnd(int& startPos, int& endPos) const; |
99 void invalidatePaintForSelection() const; | 99 void invalidatePaintForSelection() const; |
100 | 100 |
101 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO
ffset) const OVERRIDE; | 101 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO
ffset) const OVERRIDE; |
102 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const OVERRID
E; | 102 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const OVERRID
E; |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 RawPtrWillBeMember<RenderQuote> m_renderQuoteHead; | 201 RawPtrWillBeMember<RenderQuote> m_renderQuoteHead; |
202 unsigned m_renderCounterCount; | 202 unsigned m_renderCounterCount; |
203 | 203 |
204 unsigned m_hitTestCount; | 204 unsigned m_hitTestCount; |
205 }; | 205 }; |
206 | 206 |
207 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderView, isRenderView()); | 207 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderView, isRenderView()); |
208 | 208 |
209 // Suspends the LayoutState cached offset and clipRect optimization. Used under
transforms | 209 // Suspends the LayoutState cached offset and clipRect optimization. Used under
transforms |
210 // that cannot be represented by LayoutState (common in SVG) and when manipulati
ng the render | 210 // that cannot be represented by LayoutState (common in SVG) and when manipulati
ng the render |
211 // tree during layout in ways that can trigger repaint of a non-child (e.g. when
a list item | 211 // tree during layout in ways that can trigger paint invalidation of a non-child
(e.g. when a list item |
212 // moves its list marker around). Note that even when disabled, LayoutState is s
till used to | 212 // moves its list marker around). Note that even when disabled, LayoutState is s
till used to |
213 // store layoutDelta. | 213 // store layoutDelta. |
214 class ForceHorriblySlowRectMapping { | 214 class ForceHorriblySlowRectMapping { |
215 WTF_MAKE_NONCOPYABLE(ForceHorriblySlowRectMapping); | 215 WTF_MAKE_NONCOPYABLE(ForceHorriblySlowRectMapping); |
216 public: | 216 public: |
217 ForceHorriblySlowRectMapping(const PaintInvalidationState* paintInvalidation
State) | 217 ForceHorriblySlowRectMapping(const PaintInvalidationState* paintInvalidation
State) |
218 : m_paintInvalidationState(paintInvalidationState) | 218 : m_paintInvalidationState(paintInvalidationState) |
219 , m_didDisable(m_paintInvalidationState && m_paintInvalidationState->cac
hedOffsetsEnabled()) | 219 , m_didDisable(m_paintInvalidationState && m_paintInvalidationState->cac
hedOffsetsEnabled()) |
220 { | 220 { |
221 if (m_paintInvalidationState) | 221 if (m_paintInvalidationState) |
222 m_paintInvalidationState->m_cachedOffsetsEnabled = false; | 222 m_paintInvalidationState->m_cachedOffsetsEnabled = false; |
223 } | 223 } |
224 | 224 |
225 ~ForceHorriblySlowRectMapping() | 225 ~ForceHorriblySlowRectMapping() |
226 { | 226 { |
227 if (m_didDisable) | 227 if (m_didDisable) |
228 m_paintInvalidationState->m_cachedOffsetsEnabled = true; | 228 m_paintInvalidationState->m_cachedOffsetsEnabled = true; |
229 } | 229 } |
230 private: | 230 private: |
231 const PaintInvalidationState* m_paintInvalidationState; | 231 const PaintInvalidationState* m_paintInvalidationState; |
232 bool m_didDisable; | 232 bool m_didDisable; |
233 }; | 233 }; |
234 | 234 |
235 } // namespace blink | 235 } // namespace blink |
236 | 236 |
237 #endif // RenderView_h | 237 #endif // RenderView_h |
OLD | NEW |