| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google 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 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 OwnPtr<WebFloatAnimationCurve> curve = adoptPtr(compositorSupport->createFlo
atAnimationCurve()); | 264 OwnPtr<WebFloatAnimationCurve> curve = adoptPtr(compositorSupport->createFlo
atAnimationCurve()); |
| 265 | 265 |
| 266 curve->add(WebFloatKeyframe(0, startOpacity)); | 266 curve->add(WebFloatKeyframe(0, startOpacity)); |
| 267 // Make sure we have displayed for at least minPreFadeDuration before starti
ng to fade out. | 267 // Make sure we have displayed for at least minPreFadeDuration before starti
ng to fade out. |
| 268 float extraDurationRequired = std::max(0.f, minPreFadeDuration - static_cast
<float>(monotonicallyIncreasingTime() - m_startTime)); | 268 float extraDurationRequired = std::max(0.f, minPreFadeDuration - static_cast
<float>(monotonicallyIncreasingTime() - m_startTime)); |
| 269 if (extraDurationRequired) | 269 if (extraDurationRequired) |
| 270 curve->add(WebFloatKeyframe(extraDurationRequired, startOpacity)); | 270 curve->add(WebFloatKeyframe(extraDurationRequired, startOpacity)); |
| 271 // For layout tests we don't fade out. | 271 // For layout tests we don't fade out. |
| 272 curve->add(WebFloatKeyframe(fadeDuration + extraDurationRequired, WebKit::la
youtTestMode() ? startOpacity : 0)); | 272 curve->add(WebFloatKeyframe(fadeDuration + extraDurationRequired, WebKit::la
youtTestMode() ? startOpacity : 0)); |
| 273 | 273 |
| 274 m_animation = adoptPtr(compositorSupport->createAnimation(*curve, WebAnimati
on::TargetPropertyOpacity)); | 274 OwnPtr<WebAnimation> animation = adoptPtr(compositorSupport->createAnimation
(*curve, WebAnimation::TargetPropertyOpacity)); |
| 275 | 275 |
| 276 m_contentLayer->layer()->setDrawsContent(true); | 276 m_contentLayer->layer()->setDrawsContent(true); |
| 277 m_contentLayer->layer()->addAnimation(m_animation.get()); | 277 #if defined(ANIMATION_OWNERSHIP_NOT_TRANSFER) |
| 278 m_contentLayer->layer()->addAnimation(animation.get()); |
| 279 #else |
| 280 m_contentLayer->layer()->addAnimation(animation.leakPtr()); |
| 281 #endif |
| 278 | 282 |
| 279 invalidate(); | 283 invalidate(); |
| 280 m_owningWebViewImpl->scheduleAnimation(); | 284 m_owningWebViewImpl->scheduleAnimation(); |
| 281 } | 285 } |
| 282 | 286 |
| 283 void LinkHighlight::clearGraphicsLayerLinkHighlightPointer() | 287 void LinkHighlight::clearGraphicsLayerLinkHighlightPointer() |
| 284 { | 288 { |
| 285 if (m_currentGraphicsLayer) { | 289 if (m_currentGraphicsLayer) { |
| 286 m_currentGraphicsLayer->removeLinkHighlight(this); | 290 m_currentGraphicsLayer->removeLinkHighlight(this); |
| 287 m_currentGraphicsLayer = 0; | 291 m_currentGraphicsLayer = 0; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 // Make sure we update geometry on the next callback from WebViewImpl::layou
t(). | 338 // Make sure we update geometry on the next callback from WebViewImpl::layou
t(). |
| 335 m_geometryNeedsUpdate = true; | 339 m_geometryNeedsUpdate = true; |
| 336 } | 340 } |
| 337 | 341 |
| 338 WebLayer* LinkHighlight::layer() | 342 WebLayer* LinkHighlight::layer() |
| 339 { | 343 { |
| 340 return clipLayer(); | 344 return clipLayer(); |
| 341 } | 345 } |
| 342 | 346 |
| 343 } // namespace WeKit | 347 } // namespace WeKit |
| OLD | NEW |