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 27 matching lines...) Expand all Loading... |
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 bool lineOverlapsShape() const { return m_lineOverlapsShape; } |
47 | 47 |
48 void updateDeltasForContainingBlockLine(const RenderBlockFlow*, const Floati
ngObject*, LayoutUnit lineTop, LayoutUnit lineHeight); | 48 static PassOwnPtr<ShapeOutsideInfo> createInfo(const RenderBox& renderer) {
return adoptPtr(new ShapeOutsideInfo(renderer)); } |
49 | 49 static bool isEnabledFor(const RenderBox&); |
50 static PassOwnPtr<ShapeOutsideInfo> createInfo(const RenderBox* renderer) {
return adoptPtr(new ShapeOutsideInfo(renderer)); } | 50 void updateDeltasForContainingBlockLine(const RenderBlockFlow&, const Floati
ngObject&, LayoutUnit lineTop, LayoutUnit lineHeight); |
51 static bool isEnabledFor(const RenderBox*); | |
52 | 51 |
53 virtual bool lineOverlapsShapeBounds() const OVERRIDE | 52 virtual bool lineOverlapsShapeBounds() const OVERRIDE |
54 { | 53 { |
55 return computedShape()->lineOverlapsShapeMarginBounds(m_referenceBoxLine
Top, m_lineHeight); | 54 return computedShape().lineOverlapsShapeMarginBounds(m_referenceBoxLineT
op, m_lineHeight); |
56 } | 55 } |
57 | 56 |
58 protected: | 57 protected: |
59 virtual LayoutBox referenceBox() const OVERRIDE | 58 virtual LayoutBox referenceBox() const OVERRIDE |
60 { | 59 { |
61 if (shapeValue()->layoutBox() == BoxMissing) | 60 if (shapeValue()->layoutBox() == BoxMissing) |
62 return MarginBox; | 61 return MarginBox; |
63 return shapeValue()->layoutBox(); | 62 return shapeValue()->layoutBox(); |
64 } | 63 } |
65 virtual LayoutRect computedShapeLogicalBoundingBox() const OVERRIDE { return
computedShape()->shapeMarginLogicalBoundingBox(); } | 64 virtual LayoutRect computedShapeLogicalBoundingBox() const OVERRIDE { return
computedShape().shapeMarginLogicalBoundingBox(); } |
66 virtual ShapeValue* shapeValue() const OVERRIDE; | 65 virtual ShapeValue* shapeValue() const OVERRIDE; |
67 virtual void getIntervals(LayoutUnit lineTop, LayoutUnit lineHeight, Segment
List& segments) const OVERRIDE | 66 virtual void getIntervals(LayoutUnit lineTop, LayoutUnit lineHeight, Segment
List& segments) const OVERRIDE |
68 { | 67 { |
69 return computedShape()->getExcludedIntervals(lineTop, lineHeight, segmen
ts); | 68 return computedShape().getExcludedIntervals(lineTop, lineHeight, segment
s); |
70 } | 69 } |
71 | 70 |
72 private: | 71 private: |
73 ShapeOutsideInfo(const RenderBox* renderer) | 72 ShapeOutsideInfo(const RenderBox& renderer) |
74 : ShapeInfo<RenderBox>(renderer) | 73 : ShapeInfo<RenderBox>(renderer) |
75 , m_lineOverlapsShape(false) | 74 , m_lineOverlapsShape(false) |
76 { } | 75 { } |
77 | 76 |
78 LayoutUnit m_leftMarginBoxDelta; | 77 LayoutUnit m_leftMarginBoxDelta; |
79 LayoutUnit m_rightMarginBoxDelta; | 78 LayoutUnit m_rightMarginBoxDelta; |
80 LayoutUnit m_borderBoxLineTop; | 79 LayoutUnit m_borderBoxLineTop; |
81 bool m_lineOverlapsShape; | 80 bool m_lineOverlapsShape; |
82 }; | 81 }; |
83 | 82 |
84 } | 83 } |
85 #endif | 84 #endif |
OLD | NEW |