OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple Inc. 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 , m_mapPoint(false) | 66 , m_mapPoint(false) |
67 , m_mapQuad(true) | 67 , m_mapQuad(true) |
68 , m_direction(mappingDirection) | 68 , m_direction(mappingDirection) |
69 { | 69 { |
70 } | 70 } |
71 | 71 |
72 TransformState(const TransformState& other) { *this = other; } | 72 TransformState(const TransformState& other) { *this = other; } |
73 | 73 |
74 TransformState& operator=(const TransformState&); | 74 TransformState& operator=(const TransformState&); |
75 | 75 |
76 void setQuad(const FloatQuad& quad) { m_lastPlanarQuad = quad; } | 76 void setQuad(const FloatQuad& quad) |
| 77 { |
| 78 // FIXME: this assumes that the quad being added is in the coordinate sy
stem of the current state. |
| 79 // This breaks if we're simultaneously mapping a point. https://bugs.web
kit.org/show_bug.cgi?id=106680 |
| 80 ASSERT(!m_mapPoint); |
| 81 m_accumulatedOffset = LayoutSize(); |
| 82 m_lastPlanarQuad = quad; |
| 83 } |
77 | 84 |
78 void move(LayoutUnit x, LayoutUnit y, TransformAccumulation accumulate = Fla
ttenTransform) | 85 void move(LayoutUnit x, LayoutUnit y, TransformAccumulation accumulate = Fla
ttenTransform) |
79 { | 86 { |
80 move(LayoutSize(x, y), accumulate); | 87 move(LayoutSize(x, y), accumulate); |
81 } | 88 } |
82 | 89 |
83 void move(const LayoutSize&, TransformAccumulation = FlattenTransform); | 90 void move(const LayoutSize&, TransformAccumulation = FlattenTransform); |
84 void applyTransform(const AffineTransform& transformFromContainer, Transform
Accumulation = FlattenTransform, bool* wasClamped = 0); | 91 void applyTransform(const AffineTransform& transformFromContainer, Transform
Accumulation = FlattenTransform, bool* wasClamped = 0); |
85 void applyTransform(const TransformationMatrix& transformFromContainer, Tran
sformAccumulation = FlattenTransform, bool* wasClamped = 0); | 92 void applyTransform(const TransformationMatrix& transformFromContainer, Tran
sformAccumulation = FlattenTransform, bool* wasClamped = 0); |
86 void flatten(bool* wasClamped = 0); | 93 void flatten(bool* wasClamped = 0); |
(...skipping 19 matching lines...) Expand all Loading... |
106 OwnPtr<TransformationMatrix> m_accumulatedTransform; | 113 OwnPtr<TransformationMatrix> m_accumulatedTransform; |
107 LayoutSize m_accumulatedOffset; | 114 LayoutSize m_accumulatedOffset; |
108 bool m_accumulatingTransform; | 115 bool m_accumulatingTransform; |
109 bool m_mapPoint, m_mapQuad; | 116 bool m_mapPoint, m_mapQuad; |
110 TransformDirection m_direction; | 117 TransformDirection m_direction; |
111 }; | 118 }; |
112 | 119 |
113 } // namespace WebCore | 120 } // namespace WebCore |
114 | 121 |
115 #endif // TransformState_h | 122 #endif // TransformState_h |
OLD | NEW |