| 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 #include "config.h" | 5 #include "config.h" |
| 6 #include "core/paint/BackgroundImageGeometry.h" | 6 #include "core/paint/BackgroundImageGeometry.h" |
| 7 | 7 |
| 8 namespace blink { | 8 namespace blink { |
| 9 | 9 |
| 10 void BackgroundImageGeometry::setNoRepeatX(int xOffset) | 10 void BackgroundImageGeometry::setNoRepeatX(int xOffset) |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 { | 24 { |
| 25 IntPoint alignedPoint = attachmentPoint; | 25 IntPoint alignedPoint = attachmentPoint; |
| 26 m_phase.move(std::max(alignedPoint.x() - m_destRect.x(), 0), std::max(aligne
dPoint.y() - m_destRect.y(), 0)); | 26 m_phase.move(std::max(alignedPoint.x() - m_destRect.x(), 0), std::max(aligne
dPoint.y() - m_destRect.y(), 0)); |
| 27 } | 27 } |
| 28 | 28 |
| 29 void BackgroundImageGeometry::clip(const IntRect& clipRect) | 29 void BackgroundImageGeometry::clip(const IntRect& clipRect) |
| 30 { | 30 { |
| 31 m_destRect.intersect(clipRect); | 31 m_destRect.intersect(clipRect); |
| 32 } | 32 } |
| 33 | 33 |
| 34 IntPoint BackgroundImageGeometry::relativePhase() const | |
| 35 { | |
| 36 IntPoint phase = m_phase; | |
| 37 phase += m_destRect.location() - m_destOrigin; | |
| 38 return phase; | |
| 39 } | |
| 40 | |
| 41 } // namespace blink | 34 } // namespace blink |
| OLD | NEW |