| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 #include "core/layout/ClipRect.h" | 29 #include "core/layout/ClipRect.h" |
| 30 #include "wtf/Allocator.h" | 30 #include "wtf/Allocator.h" |
| 31 #include "wtf/Vector.h" | 31 #include "wtf/Vector.h" |
| 32 | 32 |
| 33 namespace blink { | 33 namespace blink { |
| 34 | 34 |
| 35 struct DeprecatedPaintLayerFragment { | 35 struct DeprecatedPaintLayerFragment { |
| 36 ALLOW_ONLY_INLINE_ALLOCATION(); | 36 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 37 public: | 37 public: |
| 38 void setRects(const LayoutRect& bounds, const ClipRect& background, const Cl
ipRect& foreground, const ClipRect& outline) | 38 void setRects(const LayoutRect& bounds, const ClipRect& background, const Cl
ipRect& foreground) |
| 39 { | 39 { |
| 40 layerBounds = bounds; | 40 layerBounds = bounds; |
| 41 backgroundRect = background; | 41 backgroundRect = background; |
| 42 foregroundRect = foreground; | 42 foregroundRect = foreground; |
| 43 outlineRect = outline; | |
| 44 } | 43 } |
| 45 | 44 |
| 46 void moveBy(const LayoutPoint& offset) | 45 void moveBy(const LayoutPoint& offset) |
| 47 { | 46 { |
| 48 layerBounds.moveBy(offset); | 47 layerBounds.moveBy(offset); |
| 49 backgroundRect.moveBy(offset); | 48 backgroundRect.moveBy(offset); |
| 50 foregroundRect.moveBy(offset); | 49 foregroundRect.moveBy(offset); |
| 51 outlineRect.moveBy(offset); | |
| 52 paginationClip.moveBy(offset); | 50 paginationClip.moveBy(offset); |
| 53 } | 51 } |
| 54 | 52 |
| 55 void intersect(const LayoutRect& rect) | 53 void intersect(const LayoutRect& rect) |
| 56 { | 54 { |
| 57 backgroundRect.intersect(rect); | 55 backgroundRect.intersect(rect); |
| 58 foregroundRect.intersect(rect); | 56 foregroundRect.intersect(rect); |
| 59 outlineRect.intersect(rect); | |
| 60 } | 57 } |
| 61 | 58 |
| 62 LayoutRect layerBounds; | 59 LayoutRect layerBounds; |
| 63 ClipRect backgroundRect; | 60 ClipRect backgroundRect; |
| 64 ClipRect foregroundRect; | 61 ClipRect foregroundRect; |
| 65 ClipRect outlineRect; | |
| 66 | 62 |
| 67 // Unique to paginated fragments. The physical translation to apply to shift
the layer when painting/hit-testing. | 63 // Unique to paginated fragments. The physical translation to apply to shift
the layer when painting/hit-testing. |
| 68 LayoutPoint paginationOffset; | 64 LayoutPoint paginationOffset; |
| 69 | 65 |
| 70 // Also unique to paginated fragments. An additional clip that applies to th
e layer. It is in layer-local | 66 // Also unique to paginated fragments. An additional clip that applies to th
e layer. It is in layer-local |
| 71 // (physical) coordinates. | 67 // (physical) coordinates. |
| 72 LayoutRect paginationClip; | 68 LayoutRect paginationClip; |
| 73 }; | 69 }; |
| 74 | 70 |
| 75 typedef Vector<DeprecatedPaintLayerFragment, 1> DeprecatedPaintLayerFragments; | 71 typedef Vector<DeprecatedPaintLayerFragment, 1> DeprecatedPaintLayerFragments; |
| 76 | 72 |
| 77 } // namespace blink | 73 } // namespace blink |
| 78 | 74 |
| 79 #endif // DeprecatedPaintLayerFragment_h | 75 #endif // DeprecatedPaintLayerFragment_h |
| OLD | NEW |