Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(295)

Side by Side Diff: Source/core/paint/BackgroundImageGeometry.cpp

Issue 660523003: Simplify BackgroundImageGeometry by removing meaningless distinctions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/paint/BackgroundImageGeometry.h ('k') | Source/core/paint/BoxPainter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « Source/core/paint/BackgroundImageGeometry.h ('k') | Source/core/paint/BoxPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698