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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 | 78 |
79 FrameView* frameView() const { return m_frameView; } | 79 FrameView* frameView() const { return m_frameView; } |
80 | 80 |
81 virtual void computeRectForRepaint(const RenderLayerModelObject* repaintCont
ainer, LayoutRect&, bool fixed = false) const OVERRIDE; | 81 virtual void computeRectForRepaint(const RenderLayerModelObject* repaintCont
ainer, LayoutRect&, bool fixed = false) const OVERRIDE; |
82 void repaintViewRectangle(const LayoutRect&) const; | 82 void repaintViewRectangle(const LayoutRect&) const; |
83 // Repaint the view, and all composited layers that intersect the given abso
lute rectangle. | 83 // Repaint the view, and all composited layers that intersect the given abso
lute rectangle. |
84 // FIXME: ideally we'd never have to do this, if all repaints are container-
relative. | 84 // FIXME: ideally we'd never have to do this, if all repaints are container-
relative. |
85 void repaintRectangleInViewAndCompositedLayers(const LayoutRect&); | 85 void repaintRectangleInViewAndCompositedLayers(const LayoutRect&); |
86 void repaintViewAndCompositedLayers(); | 86 void repaintViewAndCompositedLayers(); |
87 | 87 |
88 virtual void paint(PaintInfo&, const LayoutPoint&); | 88 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE; |
89 virtual void paintBoxDecorations(PaintInfo&, const LayoutPoint&) OVERRIDE; | 89 virtual void paintBoxDecorations(PaintInfo&, const LayoutPoint&) OVERRIDE; |
90 | 90 |
91 enum SelectionRepaintMode { RepaintNewXOROld, RepaintNewMinusOld, RepaintNot
hing }; | 91 enum SelectionRepaintMode { RepaintNewXOROld, RepaintNewMinusOld, RepaintNot
hing }; |
92 void setSelection(RenderObject* start, int startPos, RenderObject* end, int
endPos, SelectionRepaintMode = RepaintNewXOROld); | 92 void setSelection(RenderObject* start, int startPos, RenderObject* end, int
endPos, SelectionRepaintMode = RepaintNewXOROld); |
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 repaintSelection() const; | 99 void repaintSelection() const; |
100 | 100 |
101 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO
ffset) const; | 101 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO
ffset) const OVERRIDE; |
102 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const; | 102 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const OVERRID
E; |
103 | 103 |
104 void setMaximalOutlineSize(int o); | 104 void setMaximalOutlineSize(int o); |
105 int maximalOutlineSize() const { return m_maximalOutlineSize; } | 105 int maximalOutlineSize() const { return m_maximalOutlineSize; } |
106 | 106 |
107 void setOldMaximalOutlineSize(int o) { m_oldMaximalOutlineSize = o; } | 107 void setOldMaximalOutlineSize(int o) { m_oldMaximalOutlineSize = o; } |
108 int oldMaximalOutlineSize() const { return m_oldMaximalOutlineSize; } | 108 int oldMaximalOutlineSize() const { return m_oldMaximalOutlineSize; } |
109 | 109 |
110 virtual LayoutRect viewRect() const OVERRIDE; | 110 virtual LayoutRect viewRect() const OVERRIDE; |
111 | 111 |
112 void updateWidgetPositions(); | 112 void updateWidgetPositions(); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 // Subtree push/pop | 145 // Subtree push/pop |
146 void pushLayoutState(RenderObject*); | 146 void pushLayoutState(RenderObject*); |
147 void popLayoutState(RenderObject*) { return popLayoutState(); } // Just doin
g this to keep popLayoutState() private and to make the subtree calls symmetrica
l. | 147 void popLayoutState(RenderObject*) { return popLayoutState(); } // Just doin
g this to keep popLayoutState() private and to make the subtree calls symmetrica
l. |
148 | 148 |
149 bool shouldDisableLayoutStateForSubtree(RenderObject*) const; | 149 bool shouldDisableLayoutStateForSubtree(RenderObject*) const; |
150 | 150 |
151 // Returns true if layoutState should be used for its cached offset and clip
. | 151 // Returns true if layoutState should be used for its cached offset and clip
. |
152 bool layoutStateEnabled() const { return m_layoutStateDisableCount == 0 && m
_layoutState; } | 152 bool layoutStateEnabled() const { return m_layoutStateDisableCount == 0 && m
_layoutState; } |
153 LayoutState* layoutState() const { return m_layoutState; } | 153 LayoutState* layoutState() const { return m_layoutState; } |
154 | 154 |
155 virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&); | 155 virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&) OVERRID
E; |
156 | 156 |
157 LayoutUnit pageLogicalHeight() const { return m_pageLogicalHeight; } | 157 LayoutUnit pageLogicalHeight() const { return m_pageLogicalHeight; } |
158 void setPageLogicalHeight(LayoutUnit height) | 158 void setPageLogicalHeight(LayoutUnit height) |
159 { | 159 { |
160 if (m_pageLogicalHeight != height) { | 160 if (m_pageLogicalHeight != height) { |
161 m_pageLogicalHeight = height; | 161 m_pageLogicalHeight = height; |
162 m_pageLogicalHeightChanged = true; | 162 m_pageLogicalHeightChanged = true; |
163 } | 163 } |
164 } | 164 } |
165 | 165 |
(...skipping 25 matching lines...) Expand all Loading... |
191 // FIXME: This is a work around because the current implementation of counte
rs | 191 // FIXME: This is a work around because the current implementation of counte
rs |
192 // requires walking the entire tree repeatedly and most pages don't actually
use either | 192 // requires walking the entire tree repeatedly and most pages don't actually
use either |
193 // feature so we shouldn't take the performance hit when not needed. Long te
rm we should | 193 // feature so we shouldn't take the performance hit when not needed. Long te
rm we should |
194 // rewrite the counter and quotes code. | 194 // rewrite the counter and quotes code. |
195 void addRenderCounter() { m_renderCounterCount++; } | 195 void addRenderCounter() { m_renderCounterCount++; } |
196 void removeRenderCounter() { ASSERT(m_renderCounterCount > 0); m_renderCount
erCount--; } | 196 void removeRenderCounter() { ASSERT(m_renderCounterCount > 0); m_renderCount
erCount--; } |
197 bool hasRenderCounters() { return m_renderCounterCount; } | 197 bool hasRenderCounters() { return m_renderCounterCount; } |
198 | 198 |
199 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0)
OVERRIDE; | 199 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0)
OVERRIDE; |
200 | 200 |
201 virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect)
const OVERRIDE FINAL; | 201 virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect)
const OVERRIDE; |
202 | 202 |
203 double layoutViewportWidth() const; | 203 double layoutViewportWidth() const; |
204 double layoutViewportHeight() const; | 204 double layoutViewportHeight() const; |
205 | 205 |
206 void viewResized(); | 206 void viewResized(); |
207 | 207 |
208 private: | 208 private: |
209 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContai
ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed =
0) const OVERRIDE; | 209 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContai
ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed =
0) const OVERRIDE; |
210 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj
ect* ancestorToStopAt, RenderGeometryMap&) const OVERRIDE; | 210 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj
ect* ancestorToStopAt, RenderGeometryMap&) const OVERRIDE; |
211 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c
onst; | 211 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c
onst OVERRIDE; |
212 virtual bool requiresColumns(int desiredColumnCount) const OVERRIDE; | 212 virtual bool requiresColumns(int desiredColumnCount) const OVERRIDE; |
213 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const OVERRIDE; | 213 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const OVERRIDE; |
214 | 214 |
215 bool initializeLayoutState(LayoutState&); | 215 bool initializeLayoutState(LayoutState&); |
216 | 216 |
217 virtual void calcColumnWidth() OVERRIDE; | 217 virtual void calcColumnWidth() OVERRIDE; |
218 virtual ColumnInfo::PaginationUnit paginationUnit() const OVERRIDE; | 218 virtual ColumnInfo::PaginationUnit paginationUnit() const OVERRIDE; |
219 | 219 |
220 bool shouldRepaint(const LayoutRect&) const; | 220 bool shouldRepaint(const LayoutRect&) const; |
221 | 221 |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 if (m_view) | 380 if (m_view) |
381 m_view->enableLayoutState(); | 381 m_view->enableLayoutState(); |
382 } | 382 } |
383 private: | 383 private: |
384 RenderView* m_view; | 384 RenderView* m_view; |
385 }; | 385 }; |
386 | 386 |
387 } // namespace WebCore | 387 } // namespace WebCore |
388 | 388 |
389 #endif // RenderView_h | 389 #endif // RenderView_h |
OLD | NEW |