| 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 |
| 47 void setNoRepeatX(LayoutUnit xOffset); | 48 void setNoRepeatX(LayoutUnit xOffset); |
| 48 void setNoRepeatY(LayoutUnit yOffset); | 49 void setNoRepeatY(LayoutUnit yOffset); |
| 49 void setRepeatX(const FillLayer&, LayoutUnit, LayoutUnit, LayoutUnit, Layout
Unit); | 50 void setRepeatX(const FillLayer&, LayoutUnit, LayoutUnit, LayoutUnit, Layout
Unit); |
| 50 void setRepeatY(const FillLayer&, LayoutUnit, LayoutUnit, LayoutUnit, Layout
Unit); | 51 void setRepeatY(const FillLayer&, LayoutUnit, LayoutUnit, LayoutUnit, Layout
Unit); |
| 51 void setSpaceX(LayoutUnit, LayoutUnit, LayoutUnit); | 52 void setSpaceX(LayoutUnit, LayoutUnit, LayoutUnit); |
| 52 void setSpaceY(LayoutUnit, LayoutUnit, LayoutUnit); | 53 void setSpaceY(LayoutUnit, LayoutUnit, LayoutUnit); |
| 53 | 54 |
| 54 void useFixedAttachment(const LayoutPoint& attachmentPoint); | 55 void useFixedAttachment(const LayoutPoint& attachmentPoint); |
| 55 void setHasNonLocalGeometry() { m_hasNonLocalGeometry = true; } | 56 void setHasNonLocalGeometry() { m_hasNonLocalGeometry = true; } |
| 56 | 57 |
| 58 // TODO(schenney): Convert these to IntPoints for values that we snap |
| 57 LayoutRect m_destRect; | 59 LayoutRect m_destRect; |
| 58 LayoutPoint m_phase; | 60 LayoutPoint m_phase; |
| 59 LayoutSize m_tileSize; | 61 LayoutSize m_tileSize; |
| 60 LayoutSize m_repeatSpacing; | 62 LayoutSize m_repeatSpacing; |
| 61 bool m_hasNonLocalGeometry; | 63 bool m_hasNonLocalGeometry; |
| 62 }; | 64 }; |
| 63 | 65 |
| 64 } // namespace blink | 66 } // namespace blink |
| 65 | 67 |
| 66 #endif // BackgroundImageGeometry_h | 68 #endif // BackgroundImageGeometry_h |
| OLD | NEW |