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 26 matching lines...) Expand all Loading... |
37 | 37 |
38 LineSegmentRange::LineSegmentRange(const InlineIterator& start, const InlineIter
ator& end) | 38 LineSegmentRange::LineSegmentRange(const InlineIterator& start, const InlineIter
ator& end) |
39 : start(start.root(), start.object(), start.offset()) | 39 : start(start.root(), start.object(), start.offset()) |
40 , end(end.root(), end.object(), end.offset()) | 40 , end(end.root(), end.object(), end.offset()) |
41 { | 41 { |
42 } | 42 } |
43 | 43 |
44 bool ExclusionShapeInsideInfo::isEnabledFor(const RenderBlock* renderer) | 44 bool ExclusionShapeInsideInfo::isEnabledFor(const RenderBlock* renderer) |
45 { | 45 { |
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 LayoutUnit newLineTop; | 56 LayoutUnit newLineTop; |
57 if (shape->firstIncludedIntervalLogicalTop(m_shapeLineTop, LayoutSize(minSeg
mentWidth, m_lineHeight), newLineTop)) { | 57 if (shape->firstIncludedIntervalLogicalTop(m_shapeLineTop, LayoutSize(minSeg
mentWidth, m_lineHeight), newLineTop)) { |
58 if (newLineTop > m_shapeLineTop) { | 58 if (newLineTop > m_shapeLineTop) { |
59 m_shapeLineTop = newLineTop; | 59 m_shapeLineTop = newLineTop; |
60 return true; | 60 return true; |
61 } | 61 } |
62 } | 62 } |
63 | 63 |
64 return false; | 64 return false; |
65 } | 65 } |
66 | 66 |
67 } | 67 } |
OLD | NEW |