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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 103 float zoomFactor() const; | 103 float zoomFactor() const; |
| 104 | 104 |
| 105 FrameView* frameView() const { return m_frameView; } | 105 FrameView* frameView() const { return m_frameView; } |
| 106 | 106 |
| 107 enum ViewportConstrainedPosition { | 107 enum ViewportConstrainedPosition { |
| 108 IsNotFixedPosition, | 108 IsNotFixedPosition, |
| 109 IsFixedPosition, | 109 IsFixedPosition, |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 static ViewportConstrainedPosition toViewportConstrainedPosition(EPosition p osition) { return position == FixedPosition ? IsFixedPosition : IsNotFixedPositi on; } | 112 static ViewportConstrainedPosition toViewportConstrainedPosition(EPosition p osition) { return position == FixedPosition ? IsFixedPosition : IsNotFixedPositi on; } |
| 113 void mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, L ayoutRect&, ViewportConstrainedPosition, const PaintInvalidationState*) const; | 113 void mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, L ayoutRect&, ViewportConstrainedPosition) const; |
| 114 void mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, L ayoutRect&, const PaintInvalidationState*) const override; | 114 void mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, L ayoutRect&) const override; |
| 115 void adjustViewportConstrainedOffset(LayoutRect&, ViewportConstrainedPositio n) const; | 115 void adjustViewportConstrainedOffset(LayoutRect&, ViewportConstrainedPositio n) const; |
| 116 | 116 |
| 117 void invalidatePaintForViewAndCompositedLayers(); | 117 void invalidatePaintForViewAndCompositedLayers(); |
| 118 | 118 |
| 119 void paint(const PaintInfo&, const LayoutPoint&) const override; | 119 void paint(const PaintInfo&, const LayoutPoint&) const override; |
| 120 void paintBoxDecorationBackground(const PaintInfo&, const LayoutPoint&) cons t override; | 120 void paintBoxDecorationBackground(const PaintInfo&, const LayoutPoint&) cons t override; |
| 121 | 121 |
| 122 enum SelectionPaintInvalidationMode { PaintInvalidationNewXOROld, PaintInval idationNewMinusOld }; | 122 enum SelectionPaintInvalidationMode { PaintInvalidationNewXOROld, PaintInval idationNewMinusOld }; |
| 123 void setSelection(LayoutObject* start, int startPos, LayoutObject*, int endP os, SelectionPaintInvalidationMode = PaintInvalidationNewXOROld); | 123 void setSelection(LayoutObject* start, int startPos, LayoutObject*, int endP os, SelectionPaintInvalidationMode = PaintInvalidationNewXOROld); |
| 124 void clearSelection(); | 124 void clearSelection(); |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 207 void registerMediaForPositionChangeNotification(LayoutMedia&); | 207 void registerMediaForPositionChangeNotification(LayoutMedia&); |
| 208 void unregisterMediaForPositionChangeNotification(LayoutMedia&); | 208 void unregisterMediaForPositionChangeNotification(LayoutMedia&); |
| 209 // Notify all registered LayoutMedias that their position on-screen might | 209 // Notify all registered LayoutMedias that their position on-screen might |
| 210 // have changed. visibleRect is the clipping boundary. | 210 // have changed. visibleRect is the clipping boundary. |
| 211 void sendMediaPositionChangeNotifications(const IntRect& visibleRect); | 211 void sendMediaPositionChangeNotifications(const IntRect& visibleRect); |
| 212 | 212 |
| 213 // The rootLayerScrolls setting will ultimately determine whether FrameView | 213 // The rootLayerScrolls setting will ultimately determine whether FrameView |
| 214 // or PaintLayerScrollableArea handle the scroll. | 214 // or PaintLayerScrollableArea handle the scroll. |
| 215 ScrollResult scroll(ScrollGranularity, const FloatSize&) override; | 215 ScrollResult scroll(ScrollGranularity, const FloatSize&) override; |
| 216 | 216 |
| 217 // Disable view clipping and scroll offset adjustment for paint invalidation of FrameView scrollbars. | |
| 218 // TODO(wangxianzhu): Remove this when root-layer-scrolls launches. | |
| 219 static void setViewClippingAndScrollOffsetDisabled(bool b) { s_viewClippingA ndScrollOffsetDisabled = b; } | |
|
chrishtr
2016/03/24 01:05:42
This is pretty weird. Is it really not worth an ex
| |
| 220 | |
| 217 private: | 221 private: |
| 218 void mapLocalToAncestor(const LayoutBoxModelObject* ancestor, TransformState &, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = nullptr, const Pai ntInvalidationState* = nullptr) const override; | 222 void mapLocalToAncestor(const LayoutBoxModelObject* ancestor, TransformState &, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = nullptr) const ove rride; |
| 219 | 223 |
| 220 const LayoutObject* pushMappingToContainer(const LayoutBoxModelObject* ances torToStopAt, LayoutGeometryMap&) const override; | 224 const LayoutObject* pushMappingToContainer(const LayoutBoxModelObject* ances torToStopAt, LayoutGeometryMap&) const override; |
| 221 void mapAncestorToLocal(const LayoutBoxModelObject*, TransformState&, MapCoo rdinatesFlags) const override; | 225 void mapAncestorToLocal(const LayoutBoxModelObject*, TransformState&, MapCoo rdinatesFlags) const override; |
| 222 void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOf fset) const override; | 226 void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOf fset) const override; |
| 223 | 227 |
| 224 void layoutContent(); | 228 void layoutContent(); |
| 225 #if ENABLE(ASSERT) | 229 #if ENABLE(ASSERT) |
| 226 void checkLayoutState(); | 230 void checkLayoutState(); |
| 227 #endif | 231 #endif |
| 228 | 232 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 274 RefPtr<IntervalArena> m_intervalArena; | 278 RefPtr<IntervalArena> m_intervalArena; |
| 275 | 279 |
| 276 LayoutQuote* m_layoutQuoteHead; | 280 LayoutQuote* m_layoutQuoteHead; |
| 277 unsigned m_layoutCounterCount; | 281 unsigned m_layoutCounterCount; |
| 278 | 282 |
| 279 unsigned m_hitTestCount; | 283 unsigned m_hitTestCount; |
| 280 unsigned m_hitTestCacheHits; | 284 unsigned m_hitTestCacheHits; |
| 281 OwnPtrWillBePersistent<HitTestCache> m_hitTestCache; | 285 OwnPtrWillBePersistent<HitTestCache> m_hitTestCache; |
| 282 | 286 |
| 283 Vector<LayoutMedia*> m_mediaForPositionNotification; | 287 Vector<LayoutMedia*> m_mediaForPositionNotification; |
| 288 | |
| 289 static bool s_viewClippingAndScrollOffsetDisabled; | |
| 284 }; | 290 }; |
| 285 | 291 |
| 286 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView()); | 292 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView()); |
| 287 | 293 |
| 288 } // namespace blink | 294 } // namespace blink |
| 289 | 295 |
| 290 #endif // LayoutView_h | 296 #endif // LayoutView_h |
| OLD | NEW |