| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef PaintLayerPainter_h | 5 #ifndef PaintLayerPainter_h |
| 6 #define PaintLayerPainter_h | 6 #define PaintLayerPainter_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/paint/PaintLayerFragment.h" | 9 #include "core/paint/PaintLayerFragment.h" |
| 10 #include "core/paint/PaintLayerPaintingInfo.h" | 10 #include "core/paint/PaintLayerPaintingInfo.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 PaintLayerFlags, | 49 PaintLayerFlags, |
| 50 FragmentPolicy = AllowMultipleFragments); | 50 FragmentPolicy = AllowMultipleFragments); |
| 51 | 51 |
| 52 void paintOverlayScrollbars(GraphicsContext&, | 52 void paintOverlayScrollbars(GraphicsContext&, |
| 53 const LayoutRect& damageRect, | 53 const LayoutRect& damageRect, |
| 54 const GlobalPaintFlags); | 54 const GlobalPaintFlags); |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 enum ClipState { HasNotClipped, HasClipped }; | 57 enum ClipState { HasNotClipped, HasClipped }; |
| 58 | 58 |
| 59 bool collectPaintFragmentsForPaginatedFixedPosition( | 59 inline bool isFixedPositionObjectInPagedMedia(); |
| 60 |
| 61 // "For paged media, boxes with fixed positions are repeated on every page." |
| 62 // https://www.w3.org/TR/2011/REC-CSS2-20110607/visuren.html#fixed-positioning |
| 63 // Repeats singleFragmentIgnoredPagination of the fixed-position object in |
| 64 // each page, with paginationOffset and layerBounds adjusted for each page. |
| 65 // TODO(wangxianzhu): Fold this into PaintLayer::collectFragments(). |
| 66 void repeatFixedPositionObjectInPages( |
| 67 const PaintLayerFragment& singleFragmentIgnoredPagination, |
| 60 const PaintLayerPaintingInfo&, | 68 const PaintLayerPaintingInfo&, |
| 61 PaintLayerFragments&); | 69 PaintLayerFragments&); |
| 62 | 70 |
| 63 PaintResult paintLayerContentsCompositingAllPhases( | 71 PaintResult paintLayerContentsCompositingAllPhases( |
| 64 GraphicsContext&, | 72 GraphicsContext&, |
| 65 const PaintLayerPaintingInfo&, | 73 const PaintLayerPaintingInfo&, |
| 66 PaintLayerFlags, | 74 PaintLayerFlags, |
| 67 FragmentPolicy = AllowMultipleFragments); | 75 FragmentPolicy = AllowMultipleFragments); |
| 68 PaintResult paintLayerWithTransform(GraphicsContext&, | 76 PaintResult paintLayerWithTransform(GraphicsContext&, |
| 69 const PaintLayerPaintingInfo&, | 77 const PaintLayerPaintingInfo&, |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 FRIEND_TEST_ALL_PREFIXES(PaintLayerPainterTest, | 150 FRIEND_TEST_ALL_PREFIXES(PaintLayerPainterTest, |
| 143 DontPaintWithTinyOpacityAndBackdropFilter); | 151 DontPaintWithTinyOpacityAndBackdropFilter); |
| 144 FRIEND_TEST_ALL_PREFIXES(PaintLayerPainterTest, | 152 FRIEND_TEST_ALL_PREFIXES(PaintLayerPainterTest, |
| 145 DoPaintWithCompositedTinyOpacity); | 153 DoPaintWithCompositedTinyOpacity); |
| 146 FRIEND_TEST_ALL_PREFIXES(PaintLayerPainterTest, DoPaintWithNonTinyOpacity); | 154 FRIEND_TEST_ALL_PREFIXES(PaintLayerPainterTest, DoPaintWithNonTinyOpacity); |
| 147 }; | 155 }; |
| 148 | 156 |
| 149 } // namespace blink | 157 } // namespace blink |
| 150 | 158 |
| 151 #endif // PaintLayerPainter_h | 159 #endif // PaintLayerPainter_h |
| OLD | NEW |