Changeset 239222 in webkit
- Timestamp:
- Dec 14, 2018 11:05:43 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r239217 r239222 1 2018-12-14 Simon Fraser <simon.fraser@apple.com> 2 3 REGRESSION (r233268): contents of an animated element inside overflow:hidden disappear 4 https://bugs.webkit.org/show_bug.cgi?id=188655 5 rdar://problem/43382687 6 7 Reviewed by Antoine Quint. 8 9 * compositing/backing/backing-store-attachment-empty-keyframe-expected.txt: Added. 10 * compositing/backing/backing-store-attachment-empty-keyframe.html: Added. 11 * legacy-animation-engine/compositing/backing/backing-store-attachment-empty-keyframe-expected.txt: Added. 12 * legacy-animation-engine/compositing/backing/backing-store-attachment-empty-keyframe.html: Added. 13 1 14 2018-12-14 Zalan Bujtas <zalan@apple.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r239219 r239222 1 2018-12-14 Simon Fraser <simon.fraser@apple.com> 2 3 REGRESSION (r233268): contents of an animated element inside overflow:hidden disappear 4 https://bugs.webkit.org/show_bug.cgi?id=188655 5 rdar://problem/43382687 6 7 Reviewed by Antoine Quint. 8 9 The logic that computes animation extent, used by backing store attachment code, failed 10 to account for the behavior where a keyframe animation with a missing 0% keyframe uses 11 the transform from the unanimated style. This resulted in the computed extent being wrong, 12 which caused us to remove the layer's backing store in some scenarios. 13 14 Fix both animation code paths to use the renderer style if the first keyframe doesn't 15 contain a transform. 16 17 Tests: compositing/backing/backing-store-attachment-empty-keyframe.html 18 legacy-animation-engine/compositing/backing/backing-store-attachment-empty-keyframe.html 19 20 * animation/KeyframeEffect.cpp: 21 (WebCore::KeyframeEffect::computeExtentOfTransformAnimation const): 22 * page/animation/KeyframeAnimation.cpp: 23 (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation const): 24 1 25 2018-12-14 Chris Dumez <cdumez@apple.com> 2 26 -
trunk/Source/WebCore/animation/KeyframeEffect.cpp
r237855 r239222 1409 1409 return true; // Non-boxes don't get transformed; 1410 1410 1411 RenderBox& box = downcast<RenderBox>(*renderer());1412 FloatRectrendererBox = snapRectToDevicePixels(box.borderBoxRect(), box.document().deviceScaleFactor());1413 1414 FloatRectcumulativeBounds = bounds;1411 auto& box = downcast<RenderBox>(*renderer()); 1412 auto rendererBox = snapRectToDevicePixels(box.borderBoxRect(), box.document().deviceScaleFactor()); 1413 1414 auto cumulativeBounds = bounds; 1415 1415 1416 1416 for (const auto& keyframe : m_blendingKeyframes.keyframes()) { 1417 const auto* keyframeStyle = keyframe.style(); 1418 1417 1419 // FIXME: maybe for declarative animations we always say it's true for the first and last keyframe. 1418 if (!keyframe.containsProperty(CSSPropertyTransform)) 1419 continue; 1420 1421 LayoutRect keyframeBounds = bounds; 1420 if (!keyframe.containsProperty(CSSPropertyTransform)) { 1421 // If the first keyframe is missing transform style, use the current style. 1422 if (!keyframe.key()) 1423 keyframeStyle = &box.style(); 1424 else 1425 continue; 1426 } 1427 1428 auto keyframeBounds = bounds; 1422 1429 1423 1430 bool canCompute; 1424 1431 if (transformFunctionListsMatch()) 1425 canCompute = computeTransformedExtentViaTransformList(rendererBox, *keyframe .style(), keyframeBounds);1432 canCompute = computeTransformedExtentViaTransformList(rendererBox, *keyframeStyle, keyframeBounds); 1426 1433 else 1427 canCompute = computeTransformedExtentViaMatrix(rendererBox, *keyframe .style(), keyframeBounds);1434 canCompute = computeTransformedExtentViaMatrix(rendererBox, *keyframeStyle, keyframeBounds); 1428 1435 1429 1436 if (!canCompute) … … 1433 1440 } 1434 1441 1435 bounds = LayoutRect(cumulativeBounds);1442 bounds = cumulativeBounds; 1436 1443 return true; 1437 1444 } -
trunk/Source/WebCore/page/animation/KeyframeAnimation.cpp
r234073 r239222 246 246 return true; // Non-boxes don't get transformed; 247 247 248 RenderBox& box = downcast<RenderBox>(*renderer());249 FloatRectrendererBox = snapRectToDevicePixels(box.borderBoxRect(), box.document().deviceScaleFactor());250 251 FloatRectcumulativeBounds = bounds;248 auto& box = downcast<RenderBox>(*renderer()); 249 auto rendererBox = snapRectToDevicePixels(box.borderBoxRect(), box.document().deviceScaleFactor()); 250 251 auto cumulativeBounds = bounds; 252 252 253 253 for (auto& keyframe : m_keyframes.keyframes()) { 254 if (!keyframe.containsProperty(CSSPropertyTransform)) 255 continue; 256 257 LayoutRect keyframeBounds = bounds; 254 const RenderStyle* keyframeStyle = keyframe.style(); 255 256 if (!keyframe.containsProperty(CSSPropertyTransform)) { 257 // If the first keyframe is missing transform style, use the current style. 258 if (!keyframe.key()) 259 keyframeStyle = &box.style(); 260 else 261 continue; 262 } 263 264 auto keyframeBounds = bounds; 258 265 259 266 bool canCompute; 260 267 if (transformFunctionListsMatch()) 261 canCompute = computeTransformedExtentViaTransformList(rendererBox, *keyframe .style(), keyframeBounds);268 canCompute = computeTransformedExtentViaTransformList(rendererBox, *keyframeStyle, keyframeBounds); 262 269 else 263 canCompute = computeTransformedExtentViaMatrix(rendererBox, *keyframe .style(), keyframeBounds);270 canCompute = computeTransformedExtentViaMatrix(rendererBox, *keyframeStyle, keyframeBounds); 264 271 265 272 if (!canCompute) … … 269 276 } 270 277 271 bounds = LayoutRect(cumulativeBounds);278 bounds = cumulativeBounds; 272 279 return true; 273 280 }
Note: See TracChangeset
for help on using the changeset viewer.