Bug 29465

Summary: Incorrect animation with scale(0) transform (singular matrix)
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: Layout and RenderingAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarrin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
URL: http://dinolatoga.com/demo/webkit-image-hover-effects/
Attachments:
Description Flags
Patch, changelog, testcase mitz: review+

Simon Fraser (smfr)
Reported 2009-09-18 08:23:54 PDT
If you load the page in the URL, the last image on the page shows a bug when you hover over it, if accelerated compositing is enabled; the black div does not scale in correctly. This is an issue with singular matrices. It works fine in software.
Attachments
Patch, changelog, testcase (8.27 KB, patch)
2009-09-18 18:12 PDT, Simon Fraser (smfr)
mitz: review+
Simon Fraser (smfr)
Comment 1 2009-09-18 13:51:07 PDT
See also 26575. Bug 26544 was supposed to fix this.
Simon Fraser (smfr)
Comment 2 2009-09-18 15:04:40 PDT
Possible fix: diff --git a/WebCore/platform/graphics/mac/GraphicsLayerCA.mm b/WebCore/platform/graphics/mac/GraphicsLayerCA.mm index f7368eb..7ad6e35 100644 --- a/WebCore/platform/graphics/mac/GraphicsLayerCA.mm +++ b/WebCore/platform/graphics/mac/GraphicsLayerCA.mm @@ -160,13 +160,25 @@ static NSValue* getTransformFunctionValue(const TransformOperation* transformOp, case TransformOperation::TRANSLATE_Z: return [NSNumber numberWithDouble:transformOp ? static_cast<const TranslateTransformOperation*>(transformOp)->z(size) : 0]; case TransformOperation::SCALE: + case TransformOperation::SCALE_3D: + return [NSArray arrayWithObjects: + [NSNumber numberWithDouble:transformOp ? static_cast<const ScaleTransformOperation*>(transformOp)->x() : 0], + [NSNumber numberWithDouble:transformOp ? static_cast<const ScaleTransformOperation*>(transformOp)->y() : 0], + [NSNumber numberWithDouble:transformOp ? static_cast<const ScaleTransformOperation*>(transformOp)->z() : 0], + nil]; + case TransformOperation::TRANSLATE: + case TransformOperation::TRANSLATE_3D: + return [NSArray arrayWithObjects: + [NSNumber numberWithDouble:transformOp ? static_cast<const TranslateTransformOperation*>(transformOp)->x(size) : 0], + [NSNumber numberWithDouble:transformOp ? static_cast<const TranslateTransformOperation*>(transformOp)->y(size) : 0], + [NSNumber numberWithDouble:transformOp ? static_cast<const TranslateTransformOperation*>(transformOp)->z(size) : 0], + nil]; + case TransformOperation::SKEW_X: case TransformOperation::SKEW_Y: case TransformOperation::SKEW: case TransformOperation::MATRIX: - case TransformOperation::SCALE_3D: - case TransformOperation::TRANSLATE_3D: case TransformOperation::ROTATE_3D: case TransformOperation::MATRIX_3D: case TransformOperation::PERSPECTIVE: @@ -207,6 +219,12 @@ static NSString* getValueFunctionNameForTransformOperation(TransformOperation::O return @"translateY"; // kCAValueFunctionTranslateY; case TransformOperation::TRANSLATE_Z: return @"translateZ"; // kCAValueFunctionTranslateZ; + case TransformOperation::SCALE: + case TransformOperation::SCALE_3D: + return @"scale"; // kCAValueFunctionScale; + case TransformOperation::TRANSLATE: + case TransformOperation::TRANSLATE_3D: + return @"translate"; // kCAValueFunctionTranslate; default: return nil; }
Simon Fraser (smfr)
Comment 3 2009-09-18 18:12:28 PDT
Created attachment 39808 [details] Patch, changelog, testcase
Simon Fraser (smfr)
Comment 4 2009-09-19 11:47:12 PDT
Note You need to log in before you can comment on or make changes to this bug.