OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2013 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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 radiiSum = radii.topRight().height() + radii.bottomRight().height(); | 311 radiiSum = radii.topRight().height() + radii.bottomRight().height(); |
312 if (radiiSum > rect.height()) | 312 if (radiiSum > rect.height()) |
313 factor = std::min(rect.height() / radiiSum, factor); | 313 factor = std::min(rect.height() / radiiSum, factor); |
314 | 314 |
315 ASSERT(factor <= 1); | 315 ASSERT(factor <= 1); |
316 return factor; | 316 return factor; |
317 } | 317 } |
318 | 318 |
319 void FloatRoundedRect::constrainRadii() | 319 void FloatRoundedRect::constrainRadii() |
320 { | 320 { |
321 m_radii.scaleAndFloor(calcBorderRadiiConstraintScaleFor(rect(), radii())); | 321 m_radii.scaleAndFloor(calcBorderRadiiConstraintScaleFor(rect(), getRadii()))
; |
322 } | 322 } |
323 | 323 |
324 void FloatRoundedRect::includeLogicalEdges(const Radii& edges, bool isHorizontal
, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) | 324 void FloatRoundedRect::includeLogicalEdges(const Radii& edges, bool isHorizontal
, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) |
325 { | 325 { |
326 m_radii.includeLogicalEdges(edges, isHorizontal, includeLogicalLeftEdge, inc
ludeLogicalRightEdge); | 326 m_radii.includeLogicalEdges(edges, isHorizontal, includeLogicalLeftEdge, inc
ludeLogicalRightEdge); |
327 } | 327 } |
328 | 328 |
329 bool FloatRoundedRect::isRenderable() const | 329 bool FloatRoundedRect::isRenderable() const |
330 { | 330 { |
331 // FIXME: remove the 0.0001 slop once this class is converted to layout unit
s. | 331 // FIXME: remove the 0.0001 slop once this class is converted to layout unit
s. |
(...skipping 21 matching lines...) Expand all Loading... |
353 void FloatRoundedRect::show() const | 353 void FloatRoundedRect::show() const |
354 { | 354 { |
355 fprintf(stderr, "FloatRoundedRect:\n rect: "); | 355 fprintf(stderr, "FloatRoundedRect:\n rect: "); |
356 m_rect.show(); | 356 m_rect.show(); |
357 fprintf(stderr, " radii: "); | 357 fprintf(stderr, " radii: "); |
358 m_radii.show(); | 358 m_radii.show(); |
359 } | 359 } |
360 #endif | 360 #endif |
361 | 361 |
362 } // namespace blink | 362 } // namespace blink |
OLD | NEW |