| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 } | 69 } |
| 70 return paddingBounds; | 70 return paddingBounds; |
| 71 } | 71 } |
| 72 | 72 |
| 73 void BoxShape::getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHei
ght, SegmentList& result) const | 73 void BoxShape::getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHei
ght, SegmentList& result) const |
| 74 { | 74 { |
| 75 const FloatRoundedRect& marginBounds = shapeMarginBounds(); | 75 const FloatRoundedRect& marginBounds = shapeMarginBounds(); |
| 76 if (marginBounds.isEmpty() || !lineOverlapsShapeMarginBounds(logicalTop, log
icalHeight)) | 76 if (marginBounds.isEmpty() || !lineOverlapsShapeMarginBounds(logicalTop, log
icalHeight)) |
| 77 return; | 77 return; |
| 78 | 78 |
| 79 float y1 = logicalTop; | 79 float y1 = logicalTop.toFloat(); |
| 80 float y2 = logicalTop + logicalHeight; | 80 float y2 = (logicalTop + logicalHeight).toFloat(); |
| 81 const FloatRect& rect = marginBounds.rect(); | 81 const FloatRect& rect = marginBounds.rect(); |
| 82 | 82 |
| 83 if (!marginBounds.isRounded()) { | 83 if (!marginBounds.isRounded()) { |
| 84 result.append(LineSegment(marginBounds.rect().x(), marginBounds.rect().m
axX())); | 84 result.append(LineSegment(marginBounds.rect().x(), marginBounds.rect().m
axX())); |
| 85 return; | 85 return; |
| 86 } | 86 } |
| 87 | 87 |
| 88 float topCornerMaxY = std::max<float>(marginBounds.topLeftCorner().maxY(), m
arginBounds.topRightCorner().maxY()); | 88 float topCornerMaxY = std::max<float>(marginBounds.topLeftCorner().maxY(), m
arginBounds.topRightCorner().maxY()); |
| 89 float bottomCornerMinY = std::min<float>(marginBounds.bottomLeftCorner().y()
, marginBounds.bottomRightCorner().y()); | 89 float bottomCornerMinY = std::min<float>(marginBounds.bottomLeftCorner().y()
, marginBounds.bottomRightCorner().y()); |
| 90 | 90 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 111 ASSERT(x2 >= x1); | 111 ASSERT(x2 >= x1); |
| 112 result.append(LineSegment(x1, x2)); | 112 result.append(LineSegment(x1, x2)); |
| 113 } | 113 } |
| 114 | 114 |
| 115 void BoxShape::getIncludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHei
ght, SegmentList& result) const | 115 void BoxShape::getIncludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHei
ght, SegmentList& result) const |
| 116 { | 116 { |
| 117 const FloatRoundedRect& paddingBounds = shapePaddingBounds(); | 117 const FloatRoundedRect& paddingBounds = shapePaddingBounds(); |
| 118 if (paddingBounds.isEmpty()) | 118 if (paddingBounds.isEmpty()) |
| 119 return; | 119 return; |
| 120 | 120 |
| 121 float y1 = logicalTop; | 121 float y1 = logicalTop.toFloat(); |
| 122 float y2 = logicalTop + logicalHeight; | 122 float y2 = (logicalTop + logicalHeight).toFloat(); |
| 123 const FloatRect& rect = paddingBounds.rect(); | 123 const FloatRect& rect = paddingBounds.rect(); |
| 124 | 124 |
| 125 if (y1 < rect.y() || y2 > rect.maxY()) | 125 if (y1 < rect.y() || y2 > rect.maxY()) |
| 126 return; | 126 return; |
| 127 | 127 |
| 128 if (!paddingBounds.isRounded()) { | 128 if (!paddingBounds.isRounded()) { |
| 129 result.append(LineSegment(rect.x(), rect.maxX())); | 129 result.append(LineSegment(rect.x(), rect.maxX())); |
| 130 return; | 130 return; |
| 131 } | 131 } |
| 132 | 132 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 150 | 150 |
| 151 bool BoxShape::firstIncludedIntervalLogicalTop(LayoutUnit minLogicalIntervalTop,
const FloatSize&, LayoutUnit& result) const | 151 bool BoxShape::firstIncludedIntervalLogicalTop(LayoutUnit minLogicalIntervalTop,
const FloatSize&, LayoutUnit& result) const |
| 152 { | 152 { |
| 153 // FIXME: this method is only a stub, https://bugs.webkit.org/show_bug.cgi?i
d=124606. | 153 // FIXME: this method is only a stub, https://bugs.webkit.org/show_bug.cgi?i
d=124606. |
| 154 | 154 |
| 155 result = minLogicalIntervalTop; | 155 result = minLogicalIntervalTop; |
| 156 return true; | 156 return true; |
| 157 } | 157 } |
| 158 | 158 |
| 159 } // namespace WebCore | 159 } // namespace WebCore |
| OLD | NEW |