OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2013 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 bool getIntervalX1Values(int minY, int maxY, int minIntervalWidth, Vector<in
t>& result) const; | 85 bool getIntervalX1Values(int minY, int maxY, int minIntervalWidth, Vector<in
t>& result) const; |
86 void uniteMarginInterval(int y, const IntShapeInterval&); | 86 void uniteMarginInterval(int y, const IntShapeInterval&); |
87 IntRect m_bounds; | 87 IntRect m_bounds; |
88 Vector<IntShapeIntervals> m_intervalLists; | 88 Vector<IntShapeIntervals> m_intervalLists; |
89 int m_offset; | 89 int m_offset; |
90 }; | 90 }; |
91 | 91 |
92 class RasterShape FINAL : public Shape { | 92 class RasterShape FINAL : public Shape { |
93 WTF_MAKE_NONCOPYABLE(RasterShape); | 93 WTF_MAKE_NONCOPYABLE(RasterShape); |
94 public: | 94 public: |
95 RasterShape(PassOwnPtr<RasterShapeIntervals> intervals, const IntSize& image
Size) | 95 RasterShape(PassOwnPtr<RasterShapeIntervals> intervals, const IntSize& margi
nRectSize) |
96 : m_intervals(intervals) | 96 : m_intervals(intervals) |
97 , m_imageSize(imageSize) | 97 , m_marginRectSize(marginRectSize) |
98 { | 98 { |
99 } | 99 } |
100 | 100 |
101 virtual LayoutRect shapeMarginLogicalBoundingBox() const OVERRIDE { return s
tatic_cast<LayoutRect>(marginIntervals().bounds()); } | 101 virtual LayoutRect shapeMarginLogicalBoundingBox() const OVERRIDE { return s
tatic_cast<LayoutRect>(marginIntervals().bounds()); } |
102 virtual LayoutRect shapePaddingLogicalBoundingBox() const OVERRIDE { return
static_cast<LayoutRect>(paddingIntervals().bounds()); } | 102 virtual LayoutRect shapePaddingLogicalBoundingBox() const OVERRIDE { return
static_cast<LayoutRect>(paddingIntervals().bounds()); } |
103 virtual bool isEmpty() const OVERRIDE { return m_intervals->isEmpty(); } | 103 virtual bool isEmpty() const OVERRIDE { return m_intervals->isEmpty(); } |
104 virtual void getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalH
eight, SegmentList&) const OVERRIDE; | 104 virtual void getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalH
eight, SegmentList&) const OVERRIDE; |
105 virtual void getIncludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalH
eight, SegmentList&) const OVERRIDE; | 105 virtual void getIncludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalH
eight, SegmentList&) const OVERRIDE; |
106 virtual bool firstIncludedIntervalLogicalTop(LayoutUnit minLogicalIntervalTo
p, const FloatSize& minLogicalIntervalSize, LayoutUnit&) const OVERRIDE; | 106 virtual bool firstIncludedIntervalLogicalTop(LayoutUnit minLogicalIntervalTo
p, const FloatSize& minLogicalIntervalSize, LayoutUnit&) const OVERRIDE; |
107 | 107 |
108 private: | 108 private: |
109 const RasterShapeIntervals& marginIntervals() const; | 109 const RasterShapeIntervals& marginIntervals() const; |
110 const RasterShapeIntervals& paddingIntervals() const; | 110 const RasterShapeIntervals& paddingIntervals() const; |
111 | 111 |
112 OwnPtr<RasterShapeIntervals> m_intervals; | 112 OwnPtr<RasterShapeIntervals> m_intervals; |
113 mutable OwnPtr<RasterShapeIntervals> m_marginIntervals; | 113 mutable OwnPtr<RasterShapeIntervals> m_marginIntervals; |
114 IntSize m_imageSize; | 114 IntSize m_marginRectSize; |
115 }; | 115 }; |
116 | 116 |
117 } // namespace WebCore | 117 } // namespace WebCore |
118 | 118 |
119 #endif // RasterShape_h | 119 #endif // RasterShape_h |
OLD | NEW |