Chromium Code Reviews| 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 15 matching lines...) Expand all Loading... | |
| 26 #include "core/dom/Position.h" | 26 #include "core/dom/Position.h" |
| 27 #include "core/frame/FrameView.h" | 27 #include "core/frame/FrameView.h" |
| 28 #include "core/layout/HitTestCache.h" | 28 #include "core/layout/HitTestCache.h" |
| 29 #include "core/layout/HitTestResult.h" | 29 #include "core/layout/HitTestResult.h" |
| 30 #include "core/layout/LayoutBlockFlow.h" | 30 #include "core/layout/LayoutBlockFlow.h" |
| 31 #include "core/layout/LayoutState.h" | 31 #include "core/layout/LayoutState.h" |
| 32 #include "core/layout/PaintInvalidationState.h" | 32 #include "core/layout/PaintInvalidationState.h" |
| 33 #include "core/layout/PendingSelection.h" | 33 #include "core/layout/PendingSelection.h" |
| 34 #include "platform/PODFreeListArena.h" | 34 #include "platform/PODFreeListArena.h" |
| 35 #include "platform/RuntimeEnabledFeatures.h" | 35 #include "platform/RuntimeEnabledFeatures.h" |
| 36 #include "platform/graphics/paint/DisplayItemTransformTree.h" | |
| 36 #include "platform/heap/Handle.h" | 37 #include "platform/heap/Handle.h" |
| 37 #include "platform/scroll/ScrollableArea.h" | 38 #include "platform/scroll/ScrollableArea.h" |
| 38 #include "wtf/OwnPtr.h" | 39 #include "wtf/OwnPtr.h" |
| 39 | 40 |
| 40 namespace blink { | 41 namespace blink { |
| 41 | 42 |
| 42 class DeprecatedPaintLayerCompositor; | 43 class DeprecatedPaintLayerCompositor; |
| 43 class LayoutQuote; | 44 class LayoutQuote; |
| 44 | 45 |
| 45 // The root of the layout tree, corresponding to the CSS initial containing bloc k. | 46 // The root of the layout tree, corresponding to the CSS initial containing bloc k. |
| (...skipping 135 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 setTransformTree(PassOwnPtr<const DisplayItemTransformTree> transformTr ee) { m_transformTree = transformTree; } | |
|
chrishtr
2015/08/14 00:17:19
Lets move this to WebViewImpl.
| |
| 193 const DisplayItemTransformTree* transformTree() const { return m_transformTr ee.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 // to RenderSurfaceLayerList in a followup patch. | |
| 243 OwnPtrWillBePersistent<const DisplayItemTransformTree> m_transformTree; | |
| 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 |