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, |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 * Library General Public License for more details. | 13 * Library General Public License for more details. |
14 * | 14 * |
15 * You should have received a copy of the GNU Library General Public License | 15 * You should have received a copy of the GNU Library General Public License |
16 * along with this library; see the file COPYING.LIB. If not, write to | 16 * along with this library; see the file COPYING.LIB. If not, write to |
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 * Boston, MA 02110-1301, USA. | 18 * Boston, MA 02110-1301, USA. |
19 * | 19 * |
20 */ | 20 */ |
21 | 21 |
22 #ifndef RenderView_h | 22 #ifndef RenderView_h |
23 #define RenderView_h | 23 #define RenderView_h |
24 | 24 |
25 #include "core/frame/FrameView.h" | 25 #include "core/frame/FrameView.h" |
| 26 #include "core/paint/ViewDisplayList.h" |
26 #include "core/rendering/LayoutState.h" | 27 #include "core/rendering/LayoutState.h" |
27 #include "core/rendering/PaintInvalidationState.h" | 28 #include "core/rendering/PaintInvalidationState.h" |
28 #include "core/rendering/RenderBlockFlow.h" | 29 #include "core/rendering/RenderBlockFlow.h" |
29 #include "platform/PODFreeListArena.h" | 30 #include "platform/PODFreeListArena.h" |
30 #include "platform/RuntimeEnabledFeatures.h" | 31 #include "platform/RuntimeEnabledFeatures.h" |
31 #include "platform/scroll/ScrollableArea.h" | 32 #include "platform/scroll/ScrollableArea.h" |
32 #include "wtf/OwnPtr.h" | 33 #include "wtf/OwnPtr.h" |
33 | 34 |
34 namespace blink { | 35 namespace blink { |
35 | 36 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 | 158 |
158 virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect)
const override; | 159 virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect)
const override; |
159 | 160 |
160 double layoutViewportWidth() const; | 161 double layoutViewportWidth() const; |
161 double layoutViewportHeight() const; | 162 double layoutViewportHeight() const; |
162 | 163 |
163 void pushLayoutState(LayoutState&); | 164 void pushLayoutState(LayoutState&); |
164 void popLayoutState(); | 165 void popLayoutState(); |
165 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&) override
final; | 166 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&) override
final; |
166 | 167 |
| 168 ViewDisplayList& viewDisplayList() |
| 169 { |
| 170 ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled()); |
| 171 if (!m_viewDisplayList) |
| 172 m_viewDisplayList = adoptPtr(new ViewDisplayList()); |
| 173 return *m_viewDisplayList; |
| 174 } |
| 175 |
167 private: | 176 private: |
168 virtual void mapLocalToContainer(const RenderLayerModelObject* paintInvalida
tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool*
wasFixed = 0, const PaintInvalidationState* = 0) const override; | 177 virtual void mapLocalToContainer(const RenderLayerModelObject* paintInvalida
tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool*
wasFixed = 0, const PaintInvalidationState* = 0) const override; |
169 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj
ect* ancestorToStopAt, RenderGeometryMap&) const override; | 178 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj
ect* ancestorToStopAt, RenderGeometryMap&) const override; |
170 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c
onst override; | 179 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c
onst override; |
171 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const override; | 180 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const override; |
172 | 181 |
173 void layoutContent(); | 182 void layoutContent(); |
174 #if ENABLE(ASSERT) | 183 #if ENABLE(ASSERT) |
175 void checkLayoutState(); | 184 void checkLayoutState(); |
176 #endif | 185 #endif |
(...skipping 16 matching lines...) Expand all Loading... |
193 bool m_pageLogicalHeightChanged; | 202 bool m_pageLogicalHeightChanged; |
194 LayoutState* m_layoutState; | 203 LayoutState* m_layoutState; |
195 OwnPtr<RenderLayerCompositor> m_compositor; | 204 OwnPtr<RenderLayerCompositor> m_compositor; |
196 OwnPtr<FlowThreadController> m_flowThreadController; | 205 OwnPtr<FlowThreadController> m_flowThreadController; |
197 RefPtr<IntervalArena> m_intervalArena; | 206 RefPtr<IntervalArena> m_intervalArena; |
198 | 207 |
199 RawPtrWillBeMember<RenderQuote> m_renderQuoteHead; | 208 RawPtrWillBeMember<RenderQuote> m_renderQuoteHead; |
200 unsigned m_renderCounterCount; | 209 unsigned m_renderCounterCount; |
201 | 210 |
202 unsigned m_hitTestCount; | 211 unsigned m_hitTestCount; |
| 212 OwnPtr<ViewDisplayList> m_viewDisplayList; |
203 }; | 213 }; |
204 | 214 |
205 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderView, isRenderView()); | 215 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderView, isRenderView()); |
206 | 216 |
207 // Suspends the LayoutState cached offset and clipRect optimization. Used under
transforms | 217 // Suspends the LayoutState cached offset and clipRect optimization. Used under
transforms |
208 // that cannot be represented by LayoutState (common in SVG) and when manipulati
ng the render | 218 // that cannot be represented by LayoutState (common in SVG) and when manipulati
ng the render |
209 // tree during layout in ways that can trigger paint invalidation of a non-child
(e.g. when a list item | 219 // tree during layout in ways that can trigger paint invalidation of a non-child
(e.g. when a list item |
210 // moves its list marker around). Note that even when disabled, LayoutState is s
till used to | 220 // moves its list marker around). Note that even when disabled, LayoutState is s
till used to |
211 // store layoutDelta. | 221 // store layoutDelta. |
212 class ForceHorriblySlowRectMapping { | 222 class ForceHorriblySlowRectMapping { |
(...skipping 13 matching lines...) Expand all Loading... |
226 m_paintInvalidationState->m_cachedOffsetsEnabled = true; | 236 m_paintInvalidationState->m_cachedOffsetsEnabled = true; |
227 } | 237 } |
228 private: | 238 private: |
229 const PaintInvalidationState* m_paintInvalidationState; | 239 const PaintInvalidationState* m_paintInvalidationState; |
230 bool m_didDisable; | 240 bool m_didDisable; |
231 }; | 241 }; |
232 | 242 |
233 } // namespace blink | 243 } // namespace blink |
234 | 244 |
235 #endif // RenderView_h | 245 #endif // RenderView_h |
OLD | NEW |