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 30 matching lines...) Expand all Loading... |
41 if (!box.isFloating() || !shapeValue) | 41 if (!box.isFloating() || !shapeValue) |
42 return false; | 42 return false; |
43 | 43 |
44 switch (shapeValue->type()) { | 44 switch (shapeValue->type()) { |
45 case ShapeValue::Shape: | 45 case ShapeValue::Shape: |
46 return shapeValue->shape(); | 46 return shapeValue->shape(); |
47 case ShapeValue::Image: | 47 case ShapeValue::Image: |
48 return shapeValue->isImageValid() && checkShapeImageOrigin(box.document(
), *(shapeValue->image()->cachedImage())); | 48 return shapeValue->isImageValid() && checkShapeImageOrigin(box.document(
), *(shapeValue->image()->cachedImage())); |
49 case ShapeValue::Box: | 49 case ShapeValue::Box: |
50 return true; | 50 return true; |
51 case ShapeValue::Outside: | |
52 return false; | |
53 } | 51 } |
54 | 52 |
55 return false; | 53 return false; |
56 } | 54 } |
57 | 55 |
58 void ShapeOutsideInfo::updateDeltasForContainingBlockLine(const RenderBlockFlow&
containingBlock, const FloatingObject& floatingObject, LayoutUnit lineTop, Layo
utUnit lineHeight) | 56 void ShapeOutsideInfo::updateDeltasForContainingBlockLine(const RenderBlockFlow&
containingBlock, const FloatingObject& floatingObject, LayoutUnit lineTop, Layo
utUnit lineHeight) |
59 { | 57 { |
60 LayoutUnit borderBoxTop = containingBlock.logicalTopForFloat(&floatingObject
) + containingBlock.marginBeforeForChild(&m_renderer); | 58 LayoutUnit borderBoxTop = containingBlock.logicalTopForFloat(&floatingObject
) + containingBlock.marginBeforeForChild(&m_renderer); |
61 LayoutUnit borderBoxLineTop = lineTop - borderBoxTop; | 59 LayoutUnit borderBoxLineTop = lineTop - borderBoxTop; |
62 | 60 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 return m_renderer.style()->shapeOutside(); | 94 return m_renderer.style()->shapeOutside(); |
97 } | 95 } |
98 | 96 |
99 const RenderStyle* ShapeOutsideInfo::styleForWritingMode() const | 97 const RenderStyle* ShapeOutsideInfo::styleForWritingMode() const |
100 { | 98 { |
101 ASSERT(m_renderer.containingBlock()); | 99 ASSERT(m_renderer.containingBlock()); |
102 return m_renderer.containingBlock()->style(); | 100 return m_renderer.containingBlock()->style(); |
103 } | 101 } |
104 | 102 |
105 } | 103 } |
OLD | NEW |