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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 WTF_MAKE_NONCOPYABLE(ExclusionPolygon); | 84 WTF_MAKE_NONCOPYABLE(ExclusionPolygon); |
85 public: | 85 public: |
86 ExclusionPolygon(PassOwnPtr<Vector<FloatPoint> > vertices, WindRule fillRule
) | 86 ExclusionPolygon(PassOwnPtr<Vector<FloatPoint> > vertices, WindRule fillRule
) |
87 : ExclusionShape() | 87 : ExclusionShape() |
88 , m_polygon(vertices, fillRule) | 88 , m_polygon(vertices, fillRule) |
89 , m_marginBounds(nullptr) | 89 , m_marginBounds(nullptr) |
90 , m_paddingBounds(nullptr) | 90 , m_paddingBounds(nullptr) |
91 { | 91 { |
92 } | 92 } |
93 | 93 |
94 virtual FloatRect shapeMarginLogicalBoundingBox() const OVERRIDE { return sh
apeMarginBounds().boundingBox(); } | 94 virtual LayoutRect shapeMarginLogicalBoundingBox() const OVERRIDE { return s
tatic_cast<LayoutRect>(shapeMarginBounds().boundingBox()); } |
95 virtual FloatRect shapePaddingLogicalBoundingBox() const OVERRIDE { return s
hapePaddingBounds().boundingBox(); } | 95 virtual LayoutRect shapePaddingLogicalBoundingBox() const OVERRIDE { return
static_cast<LayoutRect>(shapePaddingBounds().boundingBox()); } |
96 virtual bool isEmpty() const OVERRIDE { return m_polygon.isEmpty(); } | 96 virtual bool isEmpty() const OVERRIDE { return m_polygon.isEmpty(); } |
97 virtual void getExcludedIntervals(float logicalTop, float logicalHeight, Seg
mentList&) const OVERRIDE; | 97 virtual void getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalH
eight, SegmentList&) const OVERRIDE; |
98 virtual void getIncludedIntervals(float logicalTop, float logicalHeight, Seg
mentList&) const OVERRIDE; | 98 virtual void getIncludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalH
eight, SegmentList&) const OVERRIDE; |
99 virtual bool firstIncludedIntervalLogicalTop(float minLogicalIntervalTop, co
nst FloatSize& minLogicalIntervalSize, float&) const OVERRIDE; | 99 virtual bool firstIncludedIntervalLogicalTop(LayoutUnit minLogicalIntervalTo
p, const LayoutSize& minLogicalIntervalSize, LayoutUnit&) const OVERRIDE; |
100 | 100 |
| 101 private: |
101 const FloatPolygon& shapeMarginBounds() const; | 102 const FloatPolygon& shapeMarginBounds() const; |
102 const FloatPolygon& shapePaddingBounds() const; | 103 const FloatPolygon& shapePaddingBounds() const; |
103 | 104 |
104 private: | |
105 FloatPolygon m_polygon; | 105 FloatPolygon m_polygon; |
106 mutable OwnPtr<FloatPolygon> m_marginBounds; | 106 mutable OwnPtr<FloatPolygon> m_marginBounds; |
107 mutable OwnPtr<FloatPolygon> m_paddingBounds; | 107 mutable OwnPtr<FloatPolygon> m_paddingBounds; |
108 }; | 108 }; |
109 | 109 |
110 } // namespace WebCore | 110 } // namespace WebCore |
111 | 111 |
112 #endif // ExclusionPolygon_h | 112 #endif // ExclusionPolygon_h |
OLD | NEW |