| 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 BackgroundImageGeometry_h | 5 #ifndef BackgroundImageGeometry_h |
| 6 #define BackgroundImageGeometry_h | 6 #define BackgroundImageGeometry_h |
| 7 | 7 |
| 8 #include "core/paint/PaintPhase.h" | 8 #include "core/paint/PaintPhase.h" |
| 9 #include "platform/geometry/LayoutPoint.h" | 9 #include "platform/geometry/LayoutPoint.h" |
| 10 #include "platform/geometry/LayoutRect.h" | 10 #include "platform/geometry/LayoutRect.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 // Has background-attachment: fixed. Implies that we can't always cheaply co
mpute destRect. | 37 // Has background-attachment: fixed. Implies that we can't always cheaply co
mpute destRect. |
| 38 bool hasNonLocalGeometry() const { return m_hasNonLocalGeometry; } | 38 bool hasNonLocalGeometry() const { return m_hasNonLocalGeometry; } |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 void setDestRect(const LayoutRect& destRect) { m_destRect = destRect; } | 41 void setDestRect(const LayoutRect& destRect) { m_destRect = destRect; } |
| 42 void setPhase(const LayoutPoint& phase) { m_phase = phase; } | 42 void setPhase(const LayoutPoint& phase) { m_phase = phase; } |
| 43 void setTileSize(const LayoutSize& tileSize) { m_tileSize = tileSize; } | 43 void setTileSize(const LayoutSize& tileSize) { m_tileSize = tileSize; } |
| 44 void setSpaceSize(const LayoutSize& repeatSpacing) { m_repeatSpacing = repea
tSpacing; } | 44 void setSpaceSize(const LayoutSize& repeatSpacing) { m_repeatSpacing = repea
tSpacing; } |
| 45 void setPhaseX(LayoutUnit x) { m_phase.setX(x); } | 45 void setPhaseX(LayoutUnit x) { m_phase.setX(x); } |
| 46 void setPhaseY(LayoutUnit y) { m_phase.setY(y); } | 46 void setPhaseY(LayoutUnit y) { m_phase.setY(y); } |
| 47 void setNoRepeatX(LayoutUnit xOffset); | 47 void setNoRepeatX(const LayoutUnit& xOffset); |
| 48 void setNoRepeatY(LayoutUnit yOffset); | 48 void setNoRepeatY(const LayoutUnit& yOffset); |
| 49 void setRepeatX(const FillLayer&, const LayoutSize&, const LayoutUnit&, cons
t LayoutUnit&, const LayoutUnit&); |
| 50 void setRepeatY(const FillLayer&, const LayoutSize&, const LayoutUnit&, cons
t LayoutUnit&, const LayoutUnit&); |
| 51 void setSpaceX(const LayoutUnit&, const LayoutUnit&, const LayoutUnit&); |
| 52 void setSpaceY(const LayoutUnit&, const LayoutUnit&, const LayoutUnit&); |
| 49 | 53 |
| 50 void useFixedAttachment(const LayoutPoint& attachmentPoint); | 54 void useFixedAttachment(const LayoutPoint& attachmentPoint); |
| 51 void setHasNonLocalGeometry() { m_hasNonLocalGeometry = true; } | 55 void setHasNonLocalGeometry() { m_hasNonLocalGeometry = true; } |
| 52 | 56 |
| 53 LayoutRect m_destRect; | 57 LayoutRect m_destRect; |
| 54 LayoutPoint m_phase; | 58 LayoutPoint m_phase; |
| 55 LayoutSize m_tileSize; | 59 LayoutSize m_tileSize; |
| 56 LayoutSize m_repeatSpacing; | 60 LayoutSize m_repeatSpacing; |
| 57 bool m_hasNonLocalGeometry; | 61 bool m_hasNonLocalGeometry; |
| 58 }; | 62 }; |
| 59 | 63 |
| 60 } // namespace blink | 64 } // namespace blink |
| 61 | 65 |
| 62 #endif // BackgroundImageGeometry_h | 66 #endif // BackgroundImageGeometry_h |
| OLD | NEW |