2009-09-17 Simon Fraser <simon.fraser@apple.com>

        Reviewed by Dave Hyatt.

        Hardware-accelerated opacity transition on inline asserts
        https://bugs.webkit.org/show_bug.cgi?id=29342

        Remove an erroneous toRenderBox() that could be called on a RenderInline; we can just
        pass an empty size, because the box size is only required for transform animations.

        Test: compositing/transitions/opacity-on-inline.html

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::startTransition):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 97b5bb0d
2009-09-17 Simon Fraser <simon.fraser@apple.com>
Reviewed by Dave Hyatt.
Hardware-accelerated opacity transition on inline asserts
https://bugs.webkit.org/show_bug.cgi?id=29342
Test that runs a hardware-accelerated opacity transition on an inline element.
* compositing/transitions/opacity-on-inline-expected.txt: Added.
* compositing/transitions/opacity-on-inline.html: Added.
2009-09-17 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
Rubber-stamped by Brady Eidson.
......
This should not assert in debug builds
Opacity fade on inline
<!DOCTYPE>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Opacity on inline</title>
<style type="text/css" media="screen">
#fader {
-webkit-transition: opacity 1s;
border: 1px solid black;
}
.faded {
opacity: 0.5;
}
</style>
<script type="text/javascript" charset="utf-8">
if (window.layoutTestController)
layoutTestController.dumpAsText();
window.addEventListener('load', function() {
var testSpan = document.getElementById('fader');
testSpan.className = 'faded';
}, false);
</script>
</head>
<body>
<p>This should not assert in debug builds</p>
<span id="fader">Opacity fade on inline</span>
<div style="-webkit-transform: translateZ(0)"> <!-- throw the page into compositing mode -->
</div>
</body>
</html>
2009-09-17 Simon Fraser <simon.fraser@apple.com>
Reviewed by Dave Hyatt.
Hardware-accelerated opacity transition on inline asserts
https://bugs.webkit.org/show_bug.cgi?id=29342
Remove an erroneous toRenderBox() that could be called on a RenderInline; we can just
pass an empty size, because the box size is only required for transform animations.
Test: compositing/transitions/opacity-on-inline.html
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::startTransition):
2009-09-17 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
......@@ -1059,7 +1059,8 @@ bool RenderLayerBacking::startTransition(double beginTime, int property, const R
KeyframeValueList opacityVector(AnimatedPropertyOpacity);
opacityVector.insert(new FloatAnimationValue(0, compositingOpacity(fromStyle->opacity())));
opacityVector.insert(new FloatAnimationValue(1, compositingOpacity(toStyle->opacity())));
if (m_graphicsLayer->addAnimation(opacityVector, toRenderBox(renderer())->borderBoxRect().size(), opacityAnim, String(), beginTime))
// The boxSize param is only used for transform animations (which can only run on RenderBoxes), so we pass an empty size here.
if (m_graphicsLayer->addAnimation(opacityVector, IntSize(), opacityAnim, String(), beginTime))
didAnimate = true;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment