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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 } | 42 } |
43 | 43 |
44 bool ShapeInsideInfo::isEnabledFor(const RenderBlock& renderer) | 44 bool ShapeInsideInfo::isEnabledFor(const RenderBlock& renderer) |
45 { | 45 { |
46 ShapeValue* shapeValue = renderer.style()->resolvedShapeInside(); | 46 ShapeValue* shapeValue = renderer.style()->resolvedShapeInside(); |
47 if (!shapeValue) | 47 if (!shapeValue) |
48 return false; | 48 return false; |
49 | 49 |
50 switch (shapeValue->type()) { | 50 switch (shapeValue->type()) { |
51 case ShapeValue::Shape: | 51 case ShapeValue::Shape: |
52 return shapeValue->shape() && shapeValue->shape()->type() != BasicShape:
:BasicShapeInsetRectangleType && shapeValue->shape()->type() != BasicShape::Basi
cShapeInsetType; | 52 return shapeValue->shape() && shapeValue->shape()->type() != BasicShape:
:BasicShapeInsetType; |
53 case ShapeValue::Image: | 53 case ShapeValue::Image: |
54 return shapeValue->isImageValid() && checkShapeImageOrigin(renderer.docu
ment(), *(shapeValue->image()->cachedImage())); | 54 return shapeValue->isImageValid() && checkShapeImageOrigin(renderer.docu
ment(), *(shapeValue->image()->cachedImage())); |
55 case ShapeValue::Box: | 55 case ShapeValue::Box: |
56 return true; | 56 return true; |
57 case ShapeValue::Outside: | 57 case ShapeValue::Outside: |
58 return false; | 58 return false; |
59 } | 59 } |
60 | 60 |
61 return false; | 61 return false; |
62 } | 62 } |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 return 0; | 118 return 0; |
119 | 119 |
120 LayoutUnit firstFitPosition = 0; | 120 LayoutUnit firstFitPosition = 0; |
121 if (computedShape().firstIncludedIntervalLogicalTop(m_referenceBoxLineTop, f
loatSize, firstFitPosition) && (m_referenceBoxLineTop <= firstFitPosition)) | 121 if (computedShape().firstIncludedIntervalLogicalTop(m_referenceBoxLineTop, f
loatSize, firstFitPosition) && (m_referenceBoxLineTop <= firstFitPosition)) |
122 return firstFitPosition; | 122 return firstFitPosition; |
123 | 123 |
124 return 0; | 124 return 0; |
125 } | 125 } |
126 | 126 |
127 } | 127 } |
OLD | NEW |