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 LayoutView_h | 22 #ifndef LayoutView_h |
23 #define LayoutView_h | 23 #define LayoutView_h |
24 | 24 |
25 #include "core/CoreExport.h" | 25 #include "core/CoreExport.h" |
| 26 #include "core/compositing/DisplayListCompositingBuilder.h" |
26 #include "core/editing/Position.h" | 27 #include "core/editing/Position.h" |
27 #include "core/frame/FrameView.h" | 28 #include "core/frame/FrameView.h" |
28 #include "core/layout/HitTestCache.h" | 29 #include "core/layout/HitTestCache.h" |
29 #include "core/layout/HitTestResult.h" | 30 #include "core/layout/HitTestResult.h" |
30 #include "core/layout/LayoutBlockFlow.h" | 31 #include "core/layout/LayoutBlockFlow.h" |
31 #include "core/layout/LayoutState.h" | 32 #include "core/layout/LayoutState.h" |
32 #include "core/layout/PaintInvalidationState.h" | 33 #include "core/layout/PaintInvalidationState.h" |
33 #include "core/layout/PendingSelection.h" | 34 #include "core/layout/PendingSelection.h" |
34 #include "platform/PODFreeListArena.h" | 35 #include "platform/PODFreeListArena.h" |
35 #include "platform/RuntimeEnabledFeatures.h" | 36 #include "platform/RuntimeEnabledFeatures.h" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 void pushLayoutState(LayoutState& layoutState) { m_layoutState = &layoutStat
e; } | 182 void pushLayoutState(LayoutState& layoutState) { m_layoutState = &layoutStat
e; } |
182 void popLayoutState() { ASSERT(m_layoutState); m_layoutState = m_layoutState
->next(); } | 183 void popLayoutState() { ASSERT(m_layoutState); m_layoutState = m_layoutState
->next(); } |
183 void invalidateTreeIfNeeded(PaintInvalidationState&) final; | 184 void invalidateTreeIfNeeded(PaintInvalidationState&) final; |
184 | 185 |
185 LayoutRect visualOverflowRect() const override; | 186 LayoutRect visualOverflowRect() const override; |
186 | 187 |
187 // Invalidates paint for the entire view, including composited descendants,
but not including child frames. | 188 // Invalidates paint for the entire view, including composited descendants,
but not including child frames. |
188 // It is very likely you do not want to call this method. | 189 // It is very likely you do not want to call this method. |
189 void setShouldDoFullPaintInvalidationForViewAndAllDescendants(); | 190 void setShouldDoFullPaintInvalidationForViewAndAllDescendants(); |
190 | 191 |
| 192 void setCompositedDisplayList(PassOwnPtr<const CompositedDisplayList> compos
itedDisplayList) { m_compositedDisplayList = compositedDisplayList; } |
| 193 const CompositedDisplayList* compositedDisplayList() const { return m_compos
itedDisplayList.get(); } |
| 194 |
191 private: | 195 private: |
192 void mapLocalToContainer(const LayoutBoxModelObject* paintInvalidationContai
ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed =
nullptr, const PaintInvalidationState* = nullptr) const override; | 196 void mapLocalToContainer(const LayoutBoxModelObject* paintInvalidationContai
ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed =
nullptr, const PaintInvalidationState* = nullptr) const override; |
193 | 197 |
194 template <typename Strategy> | 198 template <typename Strategy> |
195 void commitPendingSelectionAlgorithm(); | 199 void commitPendingSelectionAlgorithm(); |
196 | 200 |
197 const LayoutObject* pushMappingToContainer(const LayoutBoxModelObject* ances
torToStopAt, LayoutGeometryMap&) const override; | 201 const LayoutObject* pushMappingToContainer(const LayoutBoxModelObject* ances
torToStopAt, LayoutGeometryMap&) const override; |
198 void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) const ove
rride; | 202 void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) const ove
rride; |
199 void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOf
fset) const override; | 203 void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOf
fset) const override; |
200 | 204 |
(...skipping 25 matching lines...) Expand all Loading... |
226 RefPtr<IntervalArena> m_intervalArena; | 230 RefPtr<IntervalArena> m_intervalArena; |
227 | 231 |
228 LayoutQuote* m_layoutQuoteHead; | 232 LayoutQuote* m_layoutQuoteHead; |
229 unsigned m_layoutCounterCount; | 233 unsigned m_layoutCounterCount; |
230 | 234 |
231 unsigned m_hitTestCount; | 235 unsigned m_hitTestCount; |
232 unsigned m_hitTestCacheHits; | 236 unsigned m_hitTestCacheHits; |
233 OwnPtrWillBePersistent<HitTestCache> m_hitTestCache; | 237 OwnPtrWillBePersistent<HitTestCache> m_hitTestCache; |
234 | 238 |
235 OwnPtrWillBePersistent<PendingSelection> m_pendingSelection; | 239 OwnPtrWillBePersistent<PendingSelection> m_pendingSelection; |
| 240 |
| 241 // TODO(pdr): This is only temporarily here and will be moving |
| 242 // when the API to cc is specified. |
| 243 OwnPtr<const CompositedDisplayList> m_compositedDisplayList; |
236 }; | 244 }; |
237 | 245 |
238 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView()); | 246 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView()); |
239 | 247 |
240 // Suspends the LayoutState cached offset and clipRect optimization. Used under
transforms | 248 // Suspends the LayoutState cached offset and clipRect optimization. Used under
transforms |
241 // that cannot be represented by LayoutState (common in SVG) and when manipulati
ng the layout | 249 // that cannot be represented by LayoutState (common in SVG) and when manipulati
ng the layout |
242 // tree during layout in ways that can trigger paint invalidation of a non-child
(e.g. when a list item | 250 // tree during layout in ways that can trigger paint invalidation of a non-child
(e.g. when a list item |
243 // moves its list marker around). Note that even when disabled, LayoutState is s
till used to | 251 // moves its list marker around). Note that even when disabled, LayoutState is s
till used to |
244 // store layoutDelta. | 252 // store layoutDelta. |
245 class ForceHorriblySlowRectMapping { | 253 class ForceHorriblySlowRectMapping { |
(...skipping 13 matching lines...) Expand all Loading... |
259 m_paintInvalidationState->m_cachedOffsetsEnabled = true; | 267 m_paintInvalidationState->m_cachedOffsetsEnabled = true; |
260 } | 268 } |
261 private: | 269 private: |
262 const PaintInvalidationState* m_paintInvalidationState; | 270 const PaintInvalidationState* m_paintInvalidationState; |
263 bool m_didDisable; | 271 bool m_didDisable; |
264 }; | 272 }; |
265 | 273 |
266 } // namespace blink | 274 } // namespace blink |
267 | 275 |
268 #endif // LayoutView_h | 276 #endif // LayoutView_h |
OLD | NEW |