| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 FloatSize shapeToRendererSize(FloatSize) const; | 94 FloatSize shapeToRendererSize(FloatSize) const; |
| 95 const Shape& computedShape() const; | 95 const Shape& computedShape() const; |
| 96 | 96 |
| 97 protected: | 97 protected: |
| 98 ShapeOutsideInfo(const RenderBox& renderer) | 98 ShapeOutsideInfo(const RenderBox& renderer) |
| 99 : m_renderer(renderer) | 99 : m_renderer(renderer) |
| 100 , m_lineOverlapsShape(false) | 100 , m_lineOverlapsShape(false) |
| 101 { } | 101 { } |
| 102 | 102 |
| 103 private: | 103 private: |
| 104 PassOwnPtr<Shape> createShapeForImage(StyleImage*, float shapeImageThreshold
, WritingMode, float margin) const; |
| 105 |
| 104 LayoutUnit logicalTopOffset() const; | 106 LayoutUnit logicalTopOffset() const; |
| 105 LayoutUnit logicalLeftOffset() const; | 107 LayoutUnit logicalLeftOffset() const; |
| 106 | 108 |
| 107 typedef HashMap<const RenderBox*, OwnPtr<ShapeOutsideInfo> > InfoMap; | 109 typedef HashMap<const RenderBox*, OwnPtr<ShapeOutsideInfo> > InfoMap; |
| 108 static InfoMap& infoMap() | 110 static InfoMap& infoMap() |
| 109 { | 111 { |
| 110 DEFINE_STATIC_LOCAL(InfoMap, staticInfoMap, ()); | 112 DEFINE_STATIC_LOCAL(InfoMap, staticInfoMap, ()); |
| 111 return staticInfoMap; | 113 return staticInfoMap; |
| 112 } | 114 } |
| 113 | 115 |
| 114 LayoutUnit m_referenceBoxLineTop; | 116 LayoutUnit m_referenceBoxLineTop; |
| 115 LayoutUnit m_lineHeight; | 117 LayoutUnit m_lineHeight; |
| 116 | 118 |
| 117 const RenderBox& m_renderer; | 119 const RenderBox& m_renderer; |
| 118 mutable OwnPtr<Shape> m_shape; | 120 mutable OwnPtr<Shape> m_shape; |
| 119 LayoutSize m_referenceBoxLogicalSize; | 121 LayoutSize m_referenceBoxLogicalSize; |
| 120 LayoutUnit m_leftMarginBoxDelta; | 122 LayoutUnit m_leftMarginBoxDelta; |
| 121 LayoutUnit m_rightMarginBoxDelta; | 123 LayoutUnit m_rightMarginBoxDelta; |
| 122 LayoutUnit m_borderBoxLineTop; | 124 LayoutUnit m_borderBoxLineTop; |
| 123 bool m_lineOverlapsShape; | 125 bool m_lineOverlapsShape; |
| 124 }; | 126 }; |
| 125 | 127 |
| 126 } | 128 } |
| 127 #endif | 129 #endif |
| OLD | NEW |