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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 | 93 |
94 if (marginBounds.xInterceptsAtY(y2, minXIntercept, maxXIntercept)) { | 94 if (marginBounds.xInterceptsAtY(y2, minXIntercept, maxXIntercept)) { |
95 x1 = std::min<float>(x1, minXIntercept); | 95 x1 = std::min<float>(x1, minXIntercept); |
96 x2 = std::max<float>(x2, maxXIntercept); | 96 x2 = std::max<float>(x2, maxXIntercept); |
97 } | 97 } |
98 | 98 |
99 ASSERT(x2 >= x1); | 99 ASSERT(x2 >= x1); |
100 result.append(LineSegment(x1, x2)); | 100 result.append(LineSegment(x1, x2)); |
101 } | 101 } |
102 | 102 |
| 103 void BoxShape::buildDisplayPaths(DisplayPaths& paths) const |
| 104 { |
| 105 paths.shape.addRoundedRect(m_bounds.rect(), m_bounds.radii().topLeft(), m_bo
unds.radii().topRight(), m_bounds.radii().bottomLeft(), m_bounds.radii().bottomR
ight()); |
| 106 if (shapeMargin()) |
| 107 paths.marginShape.addRoundedRect(shapeMarginBounds().rect(), shapeMargin
Bounds().radii().topLeft(), shapeMarginBounds().radii().topRight(), shapeMarginB
ounds().radii().bottomLeft(), shapeMarginBounds().radii().bottomRight()); |
| 108 } |
| 109 |
103 } // namespace WebCore | 110 } // namespace WebCore |
OLD | NEW |