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 18 matching lines...) Expand all Loading... |
29 const GlobalPaintFlags, | 29 const GlobalPaintFlags, |
30 const FillLayer&, | 30 const FillLayer&, |
31 const LayoutRect& paintRect); | 31 const LayoutRect& paintRect); |
32 | 32 |
33 const LayoutRect& destRect() const { return m_destRect; } | 33 const LayoutRect& destRect() const { return m_destRect; } |
34 const LayoutSize& tileSize() const { return m_tileSize; } | 34 const LayoutSize& tileSize() const { return m_tileSize; } |
35 const LayoutPoint& phase() const { return m_phase; } | 35 const LayoutPoint& phase() const { return m_phase; } |
36 // Space-size represents extra width and height that may be added to | 36 // Space-size represents extra width and height that may be added to |
37 // the image if used as a pattern with background-repeat: space. | 37 // the image if used as a pattern with background-repeat: space. |
38 const LayoutSize& spaceSize() const { return m_repeatSpacing; } | 38 const LayoutSize& spaceSize() const { return m_repeatSpacing; } |
39 // Has background-attachment: fixed. Implies that we can't always cheaply comp
ute destRect. | 39 // Has background-attachment: fixed. Implies that we can't always cheaply |
| 40 // compute destRect. |
40 bool hasNonLocalGeometry() const { return m_hasNonLocalGeometry; } | 41 bool hasNonLocalGeometry() const { return m_hasNonLocalGeometry; } |
41 | 42 |
42 private: | 43 private: |
43 void setDestRect(const LayoutRect& destRect) { m_destRect = destRect; } | 44 void setDestRect(const LayoutRect& destRect) { m_destRect = destRect; } |
44 void setPhase(const LayoutPoint& phase) { m_phase = phase; } | 45 void setPhase(const LayoutPoint& phase) { m_phase = phase; } |
45 void setTileSize(const LayoutSize& tileSize) { m_tileSize = tileSize; } | 46 void setTileSize(const LayoutSize& tileSize) { m_tileSize = tileSize; } |
46 void setSpaceSize(const LayoutSize& repeatSpacing) { | 47 void setSpaceSize(const LayoutSize& repeatSpacing) { |
47 m_repeatSpacing = repeatSpacing; | 48 m_repeatSpacing = repeatSpacing; |
48 } | 49 } |
49 void setPhaseX(LayoutUnit x) { m_phase.setX(x); } | 50 void setPhaseX(LayoutUnit x) { m_phase.setX(x); } |
(...skipping 21 matching lines...) Expand all Loading... |
71 LayoutRect m_destRect; | 72 LayoutRect m_destRect; |
72 LayoutPoint m_phase; | 73 LayoutPoint m_phase; |
73 LayoutSize m_tileSize; | 74 LayoutSize m_tileSize; |
74 LayoutSize m_repeatSpacing; | 75 LayoutSize m_repeatSpacing; |
75 bool m_hasNonLocalGeometry; | 76 bool m_hasNonLocalGeometry; |
76 }; | 77 }; |
77 | 78 |
78 } // namespace blink | 79 } // namespace blink |
79 | 80 |
80 #endif // BackgroundImageGeometry_h | 81 #endif // BackgroundImageGeometry_h |
OLD | NEW |