Changeset 38338 in webkit
- Timestamp:
- Nov 12, 2008 12:22:28 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 8 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r38337 r38338 1 2008-11-12 Simon Fraser <simon.fraser@apple.com> 2 3 Reviewed by Dave Hyatt 4 5 https://bugs.webkit.org/show_bug.cgi?id=17840 6 7 Tests for repainting when the transform of a positioned element changes. 8 9 * fast/repaint/transform-absolute-in-positioned-container.html: Added. 10 * fast/repaint/transform-relative-position.html: Added. 11 * platform/mac/fast/repaint/transform-absolute-in-positioned-container-expected.checksum: Added. 12 * platform/mac/fast/repaint/transform-absolute-in-positioned-container-expected.png: Added. 13 * platform/mac/fast/repaint/transform-absolute-in-positioned-container-expected.txt: Added. 14 * platform/mac/fast/repaint/transform-relative-position-expected.checksum: Added. 15 * platform/mac/fast/repaint/transform-relative-position-expected.png: Added. 16 * platform/mac/fast/repaint/transform-relative-position-expected.txt: Added. 17 1 18 2008-11-12 Justin Garcia <justin.garcia@apple.com> 2 19 -
trunk/WebCore/ChangeLog
r38337 r38338 1 2008-11-12 Simon Fraser <simon.fraser@apple.com> 2 3 Reviewed by Dave Hyatt 4 5 https://bugs.webkit.org/show_bug.cgi?id=17840 6 7 Fix repainting when the transform on a positioned element changes. 8 In computeAbsoluteRepaintRect(), add the offsets due to relative positioning, 9 and being in a positioned container after applying the transform to the local 10 rect. 11 12 Tests: fast/repaint/transform-absolute-in-positioned-container.html 13 fast/repaint/transform-relative-position.html 14 15 * rendering/RenderBox.cpp: 16 (WebCore::RenderBox::computeAbsoluteRepaintRect): 17 1 18 2008-11-12 Justin Garcia <justin.garcia@apple.com> 2 19 -
trunk/WebCore/rendering/RenderBox.cpp
r38186 r38338 1184 1184 topLeft.move(m_x, m_y); 1185 1185 1186 // Apply the relative position offset when invalidating a rectangle. The layer1187 // is translated, but the render box isn't, so we need to do this to get the1188 // right dirty rect. Since this is called from RenderObject::setStyle, the relative position1189 // flag on the RenderObject has been cleared, so use the one on the style().1190 if (style()->position() == RelativePosition && m_layer)1191 topLeft += m_layer->relativePositionOffset();1192 1193 1186 if (style()->position() == FixedPosition) 1194 1187 fixed = true; … … 1206 1199 } 1207 1200 1208 if (style()->position() == AbsolutePosition)1209 topLeft += offsetForPositionedInContainer(o);1210 1211 1201 // We are now in our parent container's coordinate space. Apply our transform to obtain a bounding box 1212 1202 // in the parent's coordinate space that encloses us. … … 1217 1207 topLeft.move(m_x, m_y); 1218 1208 } 1209 1210 if (style()->position() == AbsolutePosition) 1211 topLeft += offsetForPositionedInContainer(o); 1212 1213 // Apply the relative position offset when invalidating a rectangle. The layer 1214 // is translated, but the render box isn't, so we need to do this to get the 1215 // right dirty rect. Since this is called from RenderObject::setStyle, the relative position 1216 // flag on the RenderObject has been cleared, so use the one on the style(). 1217 if (style()->position() == RelativePosition && m_layer) 1218 topLeft += m_layer->relativePositionOffset(); 1219 1219 1220 1220 // FIXME: We ignore the lightweight clipping rect that controls use, since if |o| is in mid-layout,
Note: See TracChangeset
for help on using the changeset viewer.