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 25 matching lines...) Expand all Loading... |
36 namespace WebCore { | 36 namespace WebCore { |
37 | 37 |
38 class RenderBlockFlow; | 38 class RenderBlockFlow; |
39 class RenderBox; | 39 class RenderBox; |
40 class FloatingObject; | 40 class FloatingObject; |
41 | 41 |
42 class ShapeOutsideInfo FINAL : public ShapeInfo<RenderBox>, public MappedInfo<Re
nderBox, ShapeOutsideInfo> { | 42 class ShapeOutsideInfo FINAL : public ShapeInfo<RenderBox>, public MappedInfo<Re
nderBox, ShapeOutsideInfo> { |
43 public: | 43 public: |
44 LayoutUnit leftMarginBoxDelta() const { return m_leftMarginBoxDelta; } | 44 LayoutUnit leftMarginBoxDelta() const { return m_leftMarginBoxDelta; } |
45 LayoutUnit rightMarginBoxDelta() const { return m_rightMarginBoxDelta; } | 45 LayoutUnit rightMarginBoxDelta() const { return m_rightMarginBoxDelta; } |
| 46 bool lineOverlapsShape() const { return m_lineOverlapsShape; } |
46 | 47 |
47 void updateDeltasForContainingBlockLine(const RenderBlockFlow*, const Floati
ngObject*, LayoutUnit lineTop, LayoutUnit lineHeight); | 48 void updateDeltasForContainingBlockLine(const RenderBlockFlow*, const Floati
ngObject*, LayoutUnit lineTop, LayoutUnit lineHeight); |
48 | 49 |
49 static PassOwnPtr<ShapeOutsideInfo> createInfo(const RenderBox* renderer) {
return adoptPtr(new ShapeOutsideInfo(renderer)); } | 50 static PassOwnPtr<ShapeOutsideInfo> createInfo(const RenderBox* renderer) {
return adoptPtr(new ShapeOutsideInfo(renderer)); } |
50 static bool isEnabledFor(const RenderBox*); | 51 static bool isEnabledFor(const RenderBox*); |
51 | 52 |
52 virtual bool lineOverlapsShapeBounds() const OVERRIDE | 53 virtual bool lineOverlapsShapeBounds() const OVERRIDE |
53 { | 54 { |
54 return computedShape()->lineOverlapsShapeMarginBounds(m_shapeLineTop, m_
lineHeight); | 55 return computedShape()->lineOverlapsShapeMarginBounds(m_shapeLineTop, m_
lineHeight); |
55 } | 56 } |
56 | 57 |
57 protected: | 58 protected: |
58 virtual LayoutBox resolvedLayoutBox() const OVERRIDE | 59 virtual LayoutBox resolvedLayoutBox() const OVERRIDE |
59 { | 60 { |
60 if (shapeValue()->layoutBox() == BoxMissing) | 61 if (shapeValue()->layoutBox() == BoxMissing) |
61 return MarginBox; | 62 return MarginBox; |
62 return shapeValue()->layoutBox(); | 63 return shapeValue()->layoutBox(); |
63 } | 64 } |
64 virtual LayoutRect computedShapeLogicalBoundingBox() const OVERRIDE { return
computedShape()->shapeMarginLogicalBoundingBox(); } | 65 virtual LayoutRect computedShapeLogicalBoundingBox() const OVERRIDE { return
computedShape()->shapeMarginLogicalBoundingBox(); } |
65 virtual ShapeValue* shapeValue() const OVERRIDE; | 66 virtual ShapeValue* shapeValue() const OVERRIDE; |
66 virtual void getIntervals(LayoutUnit lineTop, LayoutUnit lineHeight, Segment
List& segments) const OVERRIDE | 67 virtual void getIntervals(LayoutUnit lineTop, LayoutUnit lineHeight, Segment
List& segments) const OVERRIDE |
67 { | 68 { |
68 return computedShape()->getExcludedIntervals(lineTop, lineHeight, segmen
ts); | 69 return computedShape()->getExcludedIntervals(lineTop, lineHeight, segmen
ts); |
69 } | 70 } |
70 | 71 |
71 private: | 72 private: |
72 ShapeOutsideInfo(const RenderBox* renderer) : ShapeInfo<RenderBox>(renderer)
{ } | 73 ShapeOutsideInfo(const RenderBox* renderer) |
| 74 : ShapeInfo<RenderBox>(renderer) |
| 75 , m_lineOverlapsShape(false) |
| 76 { } |
73 | 77 |
74 LayoutUnit m_leftMarginBoxDelta; | 78 LayoutUnit m_leftMarginBoxDelta; |
75 LayoutUnit m_rightMarginBoxDelta; | 79 LayoutUnit m_rightMarginBoxDelta; |
76 LayoutUnit m_lineTop; | 80 LayoutUnit m_lineTop; |
| 81 bool m_lineOverlapsShape; |
77 }; | 82 }; |
78 | 83 |
79 } | 84 } |
80 #endif | 85 #endif |
OLD | NEW |