OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2012 Adobe Systems Incorporated. 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
10 * disclaimer. | 10 * disclaimer. |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
206 bool minCornerDefinesX = fabs(centerY - minY) > fabs(centerY - maxY); | 206 bool minCornerDefinesX = fabs(centerY - minY) > fabs(centerY - maxY); |
207 bool intervalFitsWithinCorners = minIntervalWidth + 2 * bounds.rx() <= bound s.width(); | 207 bool intervalFitsWithinCorners = minIntervalWidth + 2 * bounds.rx() <= bound s.width(); |
208 FloatPoint cornerIntercept = bounds.cornerInterceptForWidth(minIntervalWidth ); | 208 FloatPoint cornerIntercept = bounds.cornerInterceptForWidth(minIntervalWidth ); |
209 | 209 |
210 if (intervalOverlapsMinCorner && (!intervalOverlapsMaxCorner || minCornerDef inesX)) { | 210 if (intervalOverlapsMinCorner && (!intervalOverlapsMaxCorner || minCornerDef inesX)) { |
211 if (intervalFitsWithinCorners || bounds.y() + cornerIntercept.y() < minY ) { | 211 if (intervalFitsWithinCorners || bounds.y() + cornerIntercept.y() < minY ) { |
212 result = minY; | 212 result = minY; |
213 return true; | 213 return true; |
214 } | 214 } |
215 if (minIntervalHeight < bounds.height() - (2 * cornerIntercept.y())) { | 215 if (minIntervalHeight < bounds.height() - (2 * cornerIntercept.y())) { |
216 result = LayoutUnit::fromFloatCeil(bounds.y() + cornerIntercept.y()) ; | 216 result = ceiledLayoutUnit(bounds.y() + cornerIntercept.y()); |
leviw_travelin_and_unemployed
2013/05/21 22:21:56
Avoid this churn since this makes no change. I'll
| |
217 return true; | 217 return true; |
218 } | 218 } |
219 } | 219 } |
220 | 220 |
221 if (intervalOverlapsMaxCorner && (!intervalOverlapsMinCorner || !minCornerDe finesX)) { | 221 if (intervalOverlapsMaxCorner && (!intervalOverlapsMinCorner || !minCornerDe finesX)) { |
222 if (intervalFitsWithinCorners || minY <= bounds.maxY() - cornerIntercep t.y() - minIntervalHeight) { | 222 if (intervalFitsWithinCorners || minY <= bounds.maxY() - cornerIntercep t.y() - minIntervalHeight) { |
223 result = minY; | 223 result = minY; |
224 return true; | 224 return true; |
225 } | 225 } |
226 } | 226 } |
227 | 227 |
228 return false; | 228 return false; |
229 } | 229 } |
230 | 230 |
231 } // namespace WebCore | 231 } // namespace WebCore |
OLD | NEW |