Lines Matching defs:LayoutSize

45 class LayoutSize {
47 LayoutSize() { }
48 LayoutSize(const IntSize& size) : m_width(size.width()), m_height(size.height()) { }
49 LayoutSize(LayoutUnit width, LayoutUnit height) : m_width(width), m_height(height) { }
51 explicit LayoutSize(const FloatSize& size) : m_width(size.width()), m_height(size.height()) { }
88 LayoutSize expandedTo(const LayoutSize& other) const
90 return LayoutSize(m_width > other.m_width ? m_width : other.m_width,
94 LayoutSize shrunkTo(const LayoutSize& other) const
96 return LayoutSize(m_width < other.m_width ? m_width : other.m_width,
102 *this = expandedTo(LayoutSize());
105 void clampToMinimumSize(const LayoutSize& minimumSize)
113 LayoutSize transposedSize() const
115 return LayoutSize(m_height, m_width);
118 LayoutSize fitToAspectRatio(const LayoutSize& aspectRatio, AspectRatioFit fit) const
123 return LayoutSize(height() * aspectRatio.width() / aspectRatio.height(), height());
124 return LayoutSize(width(), width() * aspectRatio.height() / aspectRatio.width());
127 LayoutSize fraction() const
129 return LayoutSize(m_width.fraction(), m_height.fraction());
136 inline LayoutSize& operator+=(LayoutSize& a, const LayoutSize& b)
143 inline LayoutSize& operator-=(LayoutSize& a, const LayoutSize& b)
150 inline LayoutSize operator+(const LayoutSize& a, const LayoutSize& b)
152 return LayoutSize(a.width() + b.width(), a.height() + b.height());
155 inline LayoutSize operator-(const LayoutSize& a, const LayoutSize& b)
157 return LayoutSize(a.width() - b.width(), a.height() - b.height());
160 inline LayoutSize operator-(const LayoutSize& size)
162 return LayoutSize(-size.width(), -size.height());
165 inline bool operator==(const LayoutSize& a, const LayoutSize& b)
170 inline bool operator!=(const LayoutSize& a, const LayoutSize& b)
175 inline IntSize flooredIntSize(const LayoutSize& s)
180 inline IntSize roundedIntSize(const LayoutSize& s)
185 inline LayoutSize roundedLayoutSize(const FloatSize& s)
187 return LayoutSize(s);