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 #include "platform/geometry/FloatRect.h" | 36 #include "platform/geometry/FloatRect.h" |
37 #include "platform/geometry/LayoutSize.h" | 37 #include "platform/geometry/LayoutSize.h" |
38 #include "wtf/OwnPtr.h" | 38 #include "wtf/OwnPtr.h" |
39 | 39 |
40 namespace blink { | 40 namespace blink { |
41 | 41 |
42 class RenderBlockFlow; | 42 class RenderBlockFlow; |
43 class RenderBox; | 43 class RenderBox; |
44 class FloatingObject; | 44 class FloatingObject; |
45 | 45 |
46 class ShapeOutsideDeltas FINAL { | 46 class ShapeOutsideDeltas final { |
47 public: | 47 public: |
48 ShapeOutsideDeltas() | 48 ShapeOutsideDeltas() |
49 : m_lineOverlapsShape(false) | 49 : m_lineOverlapsShape(false) |
50 , m_isValid(false) | 50 , m_isValid(false) |
51 { | 51 { |
52 } | 52 } |
53 | 53 |
54 ShapeOutsideDeltas(LayoutUnit leftMarginBoxDelta, LayoutUnit rightMarginBoxD
elta, bool lineOverlapsShape, LayoutUnit borderBoxLineTop, LayoutUnit lineHeight
) | 54 ShapeOutsideDeltas(LayoutUnit leftMarginBoxDelta, LayoutUnit rightMarginBoxD
elta, bool lineOverlapsShape, LayoutUnit borderBoxLineTop, LayoutUnit lineHeight
) |
55 : m_leftMarginBoxDelta(leftMarginBoxDelta) | 55 : m_leftMarginBoxDelta(leftMarginBoxDelta) |
56 , m_rightMarginBoxDelta(rightMarginBoxDelta) | 56 , m_rightMarginBoxDelta(rightMarginBoxDelta) |
(...skipping 16 matching lines...) Expand all Loading... |
73 | 73 |
74 private: | 74 private: |
75 LayoutUnit m_leftMarginBoxDelta; | 75 LayoutUnit m_leftMarginBoxDelta; |
76 LayoutUnit m_rightMarginBoxDelta; | 76 LayoutUnit m_rightMarginBoxDelta; |
77 LayoutUnit m_borderBoxLineTop; | 77 LayoutUnit m_borderBoxLineTop; |
78 LayoutUnit m_lineHeight; | 78 LayoutUnit m_lineHeight; |
79 bool m_lineOverlapsShape : 1; | 79 bool m_lineOverlapsShape : 1; |
80 bool m_isValid : 1; | 80 bool m_isValid : 1; |
81 }; | 81 }; |
82 | 82 |
83 class ShapeOutsideInfo FINAL { | 83 class ShapeOutsideInfo final { |
84 WTF_MAKE_FAST_ALLOCATED; | 84 WTF_MAKE_FAST_ALLOCATED; |
85 public: | 85 public: |
86 void setReferenceBoxLogicalSize(LayoutSize); | 86 void setReferenceBoxLogicalSize(LayoutSize); |
87 | 87 |
88 LayoutUnit shapeLogicalTop() const { return computedShape().shapeMarginLogic
alBoundingBox().y() + logicalTopOffset(); } | 88 LayoutUnit shapeLogicalTop() const { return computedShape().shapeMarginLogic
alBoundingBox().y() + logicalTopOffset(); } |
89 LayoutUnit shapeLogicalBottom() const { return computedShape().shapeMarginLo
gicalBoundingBox().maxY() + logicalTopOffset(); } | 89 LayoutUnit shapeLogicalBottom() const { return computedShape().shapeMarginLo
gicalBoundingBox().maxY() + logicalTopOffset(); } |
90 LayoutUnit shapeLogicalLeft() const { return computedShape().shapeMarginLogi
calBoundingBox().x() + logicalLeftOffset(); } | 90 LayoutUnit shapeLogicalLeft() const { return computedShape().shapeMarginLogi
calBoundingBox().x() + logicalLeftOffset(); } |
91 LayoutUnit shapeLogicalRight() const { return computedShape().shapeMarginLog
icalBoundingBox().maxX() + logicalLeftOffset(); } | 91 LayoutUnit shapeLogicalRight() const { return computedShape().shapeMarginLog
icalBoundingBox().maxX() + logicalLeftOffset(); } |
92 LayoutUnit shapeLogicalWidth() const { return computedShape().shapeMarginLog
icalBoundingBox().width(); } | 92 LayoutUnit shapeLogicalWidth() const { return computedShape().shapeMarginLog
icalBoundingBox().width(); } |
93 LayoutUnit shapeLogicalHeight() const { return computedShape().shapeMarginLo
gicalBoundingBox().height(); } | 93 LayoutUnit shapeLogicalHeight() const { return computedShape().shapeMarginLo
gicalBoundingBox().height(); } |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 } | 136 } |
137 | 137 |
138 const RenderBox& m_renderer; | 138 const RenderBox& m_renderer; |
139 mutable OwnPtr<Shape> m_shape; | 139 mutable OwnPtr<Shape> m_shape; |
140 LayoutSize m_referenceBoxLogicalSize; | 140 LayoutSize m_referenceBoxLogicalSize; |
141 ShapeOutsideDeltas m_shapeOutsideDeltas; | 141 ShapeOutsideDeltas m_shapeOutsideDeltas; |
142 }; | 142 }; |
143 | 143 |
144 } | 144 } |
145 #endif | 145 #endif |
OLD | NEW |