equal
deleted
inserted
replaced
43 class IntRect; |
43 class IntRect; |
44 class Node; |
44 class Node; |
45 class PlatformMouseEvent; |
45 class PlatformMouseEvent; |
46 class RenderLayer; |
46 class RenderLayer; |
47 class RenderObject; |
47 class RenderObject; |
48 class RenderPartObject; |
48 class RenderEmbeddedObject; |
49 class ScheduledEvent; |
49 class ScheduledEvent; |
50 class String; |
50 class String; |
51 |
51 |
52 template <typename T> class Timer; |
52 template <typename T> class Timer; |
53 |
53 |
70 int marginWidth() const { return m_margins.width(); } // -1 means default |
70 int marginWidth() const { return m_margins.width(); } // -1 means default |
71 int marginHeight() const { return m_margins.height(); } // -1 means default |
71 int marginHeight() const { return m_margins.height(); } // -1 means default |
72 void setMarginWidth(int); |
72 void setMarginWidth(int); |
73 void setMarginHeight(int); |
73 void setMarginHeight(int); |
74 |
74 |
|
75 virtual void setCanHaveScrollbars(bool); |
|
76 void updateCanHaveScrollbars(); |
|
77 |
75 virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation); |
78 virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation); |
|
79 |
|
80 virtual bool avoidScrollbarCreation(); |
76 |
81 |
77 virtual void setContentsSize(const IntSize&); |
82 virtual void setContentsSize(const IntSize&); |
78 |
83 |
79 void layout(bool allowSubtree = true); |
84 void layout(bool allowSubtree = true); |
80 bool didFirstLayout() const; |
85 bool didFirstLayout() const; |
85 bool layoutPending() const; |
90 bool layoutPending() const; |
86 |
91 |
87 RenderObject* layoutRoot(bool onlyDuringLayout = false) const; |
92 RenderObject* layoutRoot(bool onlyDuringLayout = false) const; |
88 int layoutCount() const { return m_layoutCount; } |
93 int layoutCount() const { return m_layoutCount; } |
89 |
94 |
90 // These two helper functions just pass through to the RenderView. |
|
91 bool needsLayout() const; |
95 bool needsLayout() const; |
92 void setNeedsLayout(); |
96 void setNeedsLayout(); |
93 |
97 |
94 bool needsFullRepaint() const { return m_doFullRepaint; } |
98 bool needsFullRepaint() const { return m_doFullRepaint; } |
95 |
99 |
102 #endif |
106 #endif |
103 // Only used with accelerated compositing, but outside the #ifdef to make linkage easier. |
107 // Only used with accelerated compositing, but outside the #ifdef to make linkage easier. |
104 // Returns true if the sync was completed. |
108 // Returns true if the sync was completed. |
105 bool syncCompositingStateRecursive(); |
109 bool syncCompositingStateRecursive(); |
106 |
110 |
|
111 // Returns true when a paint with the PaintBehaviorFlattenCompositingLayers flag set gives |
|
112 // a faithful representation of the content. |
|
113 bool isSoftwareRenderable() const; |
|
114 |
107 void didMoveOnscreen(); |
115 void didMoveOnscreen(); |
108 void willMoveOffscreen(); |
116 void willMoveOffscreen(); |
109 |
117 |
110 void resetScrollbars(); |
118 void resetScrollbars(); |
111 void detachCustomScrollbars(); |
119 void detachCustomScrollbars(); |
129 |
137 |
130 virtual IntRect windowResizerRect() const; |
138 virtual IntRect windowResizerRect() const; |
131 |
139 |
132 virtual void scrollRectIntoViewRecursively(const IntRect&); |
140 virtual void scrollRectIntoViewRecursively(const IntRect&); |
133 virtual void setScrollPosition(const IntPoint&); |
141 virtual void setScrollPosition(const IntPoint&); |
134 void scrollPositionChanged(); |
142 virtual void scrollPositionChanged(); |
135 |
143 |
136 String mediaType() const; |
144 String mediaType() const; |
137 void setMediaType(const String&); |
145 void setMediaType(const String&); |
|
146 void adjustMediaTypeForPrinting(bool printing); |
138 |
147 |
139 void setUseSlowRepaints(); |
148 void setUseSlowRepaints(); |
140 void setIsOverlapped(bool); |
149 void setIsOverlapped(bool); |
141 void setContentIsOpaque(bool); |
150 void setContentIsOpaque(bool); |
142 |
151 |
164 void postLayoutTimerFired(Timer<FrameView>*); |
173 void postLayoutTimerFired(Timer<FrameView>*); |
165 |
174 |
166 bool wasScrolledByUser() const; |
175 bool wasScrolledByUser() const; |
167 void setWasScrolledByUser(bool); |
176 void setWasScrolledByUser(bool); |
168 |
177 |
169 void addWidgetToUpdate(RenderPartObject*); |
178 void addWidgetToUpdate(RenderEmbeddedObject*); |
170 void removeWidgetToUpdate(RenderPartObject*); |
179 void removeWidgetToUpdate(RenderEmbeddedObject*); |
171 |
180 |
172 virtual void paintContents(GraphicsContext*, const IntRect& damageRect); |
181 virtual void paintContents(GraphicsContext*, const IntRect& damageRect); |
173 void setPaintRestriction(PaintRestriction); |
182 void setPaintBehavior(PaintBehavior); |
|
183 PaintBehavior paintBehavior() const; |
174 bool isPainting() const; |
184 bool isPainting() const; |
175 void setNodeToDraw(Node*); |
185 void setNodeToDraw(Node*); |
176 |
186 |
177 static double currentPaintTimeStamp() { return sCurrentPaintTimeStamp; } // returns 0 if not painting |
187 static double currentPaintTimeStamp() { return sCurrentPaintTimeStamp; } // returns 0 if not painting |
178 |
188 |
198 |
208 |
199 bool isFrameViewScrollCorner(RenderScrollbarPart* scrollCorner) const { return m_scrollCorner == scrollCorner; } |
209 bool isFrameViewScrollCorner(RenderScrollbarPart* scrollCorner) const { return m_scrollCorner == scrollCorner; } |
200 void invalidateScrollCorner(); |
210 void invalidateScrollCorner(); |
201 |
211 |
202 protected: |
212 protected: |
203 virtual void scrollContentsFastPath(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect); |
213 virtual bool scrollContentsFastPath(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect); |
204 |
214 |
205 private: |
215 private: |
206 FrameView(Frame*); |
216 FrameView(Frame*); |
207 |
217 |
208 void reset(); |
218 void reset(); |
257 |
267 |
258 static double sCurrentPaintTimeStamp; // used for detecting decoded resource thrash in the cache |
268 static double sCurrentPaintTimeStamp; // used for detecting decoded resource thrash in the cache |
259 |
269 |
260 IntSize m_size; |
270 IntSize m_size; |
261 IntSize m_margins; |
271 IntSize m_margins; |
262 OwnPtr<HashSet<RenderPartObject*> > m_widgetUpdateSet; |
272 |
|
273 typedef HashSet<RenderEmbeddedObject*> RenderEmbeddedObjectSet; |
|
274 OwnPtr<RenderEmbeddedObjectSet> m_widgetUpdateSet; |
263 RefPtr<Frame> m_frame; |
275 RefPtr<Frame> m_frame; |
264 |
276 |
265 bool m_doFullRepaint; |
277 bool m_doFullRepaint; |
266 |
278 |
|
279 bool m_canHaveScrollbars; |
267 bool m_useSlowRepaints; |
280 bool m_useSlowRepaints; |
268 bool m_isOverlapped; |
281 bool m_isOverlapped; |
269 bool m_contentIsOpaque; |
282 bool m_contentIsOpaque; |
270 unsigned m_slowRepaintObjectCount; |
283 unsigned m_slowRepaintObjectCount; |
271 unsigned m_fixedObjectCount; |
284 unsigned m_fixedObjectCount; |
288 Color m_baseBackgroundColor; |
301 Color m_baseBackgroundColor; |
289 IntSize m_lastLayoutSize; |
302 IntSize m_lastLayoutSize; |
290 float m_lastZoomFactor; |
303 float m_lastZoomFactor; |
291 |
304 |
292 String m_mediaType; |
305 String m_mediaType; |
293 |
306 String m_mediaTypeWhenNotPrinting; |
|
307 |
294 unsigned m_enqueueEvents; |
308 unsigned m_enqueueEvents; |
295 Vector<ScheduledEvent*> m_scheduledEvents; |
309 Vector<ScheduledEvent*> m_scheduledEvents; |
296 |
310 |
297 bool m_overflowStatusDirty; |
311 bool m_overflowStatusDirty; |
298 bool m_horizontalOverflow; |
312 bool m_horizontalOverflow; |
313 |
327 |
314 unsigned m_deferSetNeedsLayouts; |
328 unsigned m_deferSetNeedsLayouts; |
315 bool m_setNeedsLayoutWasDeferred; |
329 bool m_setNeedsLayoutWasDeferred; |
316 |
330 |
317 RefPtr<Node> m_nodeToDraw; |
331 RefPtr<Node> m_nodeToDraw; |
318 PaintRestriction m_paintRestriction; |
332 PaintBehavior m_paintBehavior; |
319 bool m_isPainting; |
333 bool m_isPainting; |
320 |
334 |
321 bool m_isVisuallyNonEmpty; |
335 bool m_isVisuallyNonEmpty; |
322 bool m_firstVisuallyNonEmptyLayoutCallbackPending; |
336 bool m_firstVisuallyNonEmptyLayoutCallbackPending; |
323 |
337 |