| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 ExclusionShapeValue* shapeValue = renderer->style()->resolvedShapeInside(); | 46 ExclusionShapeValue* shapeValue = renderer->style()->resolvedShapeInside(); |
| 47 return (shapeValue && shapeValue->type() == ExclusionShapeValue::SHAPE) ? sh
apeValue->shape() : 0; | 47 return (shapeValue && shapeValue->type() == ExclusionShapeValue::SHAPE) ? sh
apeValue->shape() : 0; |
| 48 } | 48 } |
| 49 | 49 |
| 50 bool ExclusionShapeInsideInfo::adjustLogicalLineTop(float minSegmentWidth) | 50 bool ExclusionShapeInsideInfo::adjustLogicalLineTop(float minSegmentWidth) |
| 51 { | 51 { |
| 52 const ExclusionShape* shape = computedShape(); | 52 const ExclusionShape* shape = computedShape(); |
| 53 if (!shape || m_lineHeight <= 0 || logicalLineTop() > shapeLogicalBottom()) | 53 if (!shape || m_lineHeight <= 0 || logicalLineTop() > shapeLogicalBottom()) |
| 54 return false; | 54 return false; |
| 55 | 55 |
| 56 float floatNewLineTop; | 56 LayoutUnit newLineTop; |
| 57 if (shape->firstIncludedIntervalLogicalTop(m_shapeLineTop, FloatSize(minSegm
entWidth, m_lineHeight), floatNewLineTop)) { | 57 if (shape->firstIncludedIntervalLogicalTop(m_shapeLineTop, LayoutSize(minSeg
mentWidth, m_lineHeight), newLineTop)) { |
| 58 LayoutUnit newLineTop = floatLogicalTopToLayoutUnit(floatNewLineTop); | |
| 59 if (newLineTop > m_shapeLineTop) { | 58 if (newLineTop > m_shapeLineTop) { |
| 60 m_shapeLineTop = newLineTop; | 59 m_shapeLineTop = newLineTop; |
| 61 return true; | 60 return true; |
| 62 } | 61 } |
| 63 } | 62 } |
| 64 | 63 |
| 65 return false; | 64 return false; |
| 66 } | 65 } |
| 67 | 66 |
| 68 } | 67 } |
| OLD | NEW |