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

Side by Side Diff: third_party/WebKit/Source/platform/geometry/LayoutPoint.h

Issue 2394913003: Fixed pos objects are offset from the top of the page in paged media (Closed)
Patch Set: bug 652449 Created 4 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
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012, Google Inc. All rights reserved. 2 * Copyright (c) 2012, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 ALWAYS_INLINE LayoutPoint& operator+=(LayoutPoint& a, const LayoutPoint& b) { 103 ALWAYS_INLINE LayoutPoint& operator+=(LayoutPoint& a, const LayoutPoint& b) {
104 a.move(b.x(), b.y()); 104 a.move(b.x(), b.y());
105 return a; 105 return a;
106 } 106 }
107 107
108 inline LayoutPoint& operator+=(LayoutPoint& a, const IntSize& b) { 108 inline LayoutPoint& operator+=(LayoutPoint& a, const IntSize& b) {
109 a.move(b.width(), b.height()); 109 a.move(b.width(), b.height());
110 return a; 110 return a;
111 } 111 }
112 112
113 ALWAYS_INLINE LayoutPoint& operator-=(LayoutPoint& a, const LayoutPoint& b) {
114 a.move(-b.x(), -b.y());
115 return a;
116 }
117
113 ALWAYS_INLINE LayoutPoint& operator-=(LayoutPoint& a, const LayoutSize& b) { 118 ALWAYS_INLINE LayoutPoint& operator-=(LayoutPoint& a, const LayoutSize& b) {
114 a.move(-b.width(), -b.height()); 119 a.move(-b.width(), -b.height());
115 return a; 120 return a;
116 } 121 }
117 122
118 inline LayoutPoint& operator-=(LayoutPoint& a, const IntSize& b) { 123 inline LayoutPoint& operator-=(LayoutPoint& a, const IntSize& b) {
119 a.move(-b.width(), -b.height()); 124 a.move(-b.width(), -b.height());
120 return a; 125 return a;
121 } 126 }
122 127
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 return flooredLayoutPoint(FloatPoint(s)); 221 return flooredLayoutPoint(FloatPoint(s));
217 } 222 }
218 223
219 // Redeclared here to avoid ODR issues. 224 // Redeclared here to avoid ODR issues.
220 // See platform/testing/GeometryPrinters.h. 225 // See platform/testing/GeometryPrinters.h.
221 void PrintTo(const LayoutPoint&, std::ostream*); 226 void PrintTo(const LayoutPoint&, std::ostream*);
222 227
223 } // namespace blink 228 } // namespace blink
224 229
225 #endif // LayoutPoint_h 230 #endif // LayoutPoint_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698