| 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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 bool hasLayoutObject = m_node && m_node->layoutObject(); | 367 bool hasLayoutObject = m_node && m_node->layoutObject(); |
| 368 if (hasLayoutObject) { | 368 if (hasLayoutObject) { |
| 369 const LayoutBoxModelObject& paintInvalidationContainer = m_node->layoutO
bject()->containerForPaintInvalidation(); | 369 const LayoutBoxModelObject& paintInvalidationContainer = m_node->layoutO
bject()->containerForPaintInvalidation(); |
| 370 attachLinkHighlightToCompositingLayer(paintInvalidationContainer); | 370 attachLinkHighlightToCompositingLayer(paintInvalidationContainer); |
| 371 if (computeHighlightLayerPathAndPosition(paintInvalidationContainer)) { | 371 if (computeHighlightLayerPathAndPosition(paintInvalidationContainer)) { |
| 372 // We only need to invalidate the layer if the highlight size has ch
anged, otherwise | 372 // We only need to invalidate the layer if the highlight size has ch
anged, otherwise |
| 373 // we can just re-position the layer without needing to repaint. | 373 // we can just re-position the layer without needing to repaint. |
| 374 m_contentLayer->layer()->invalidate(); | 374 m_contentLayer->layer()->invalidate(); |
| 375 | 375 |
| 376 if (m_currentGraphicsLayer) | 376 if (m_currentGraphicsLayer) |
| 377 m_currentGraphicsLayer->trackPaintInvalidation(LinkHighlightDisp
layItemClientForTracking(), enclosingIntRect(FloatRect(layer()->position().x, la
yer()->position().y, layer()->bounds().width, layer()->bounds().height)), PaintI
nvalidationFull); | 377 m_currentGraphicsLayer->trackRasterInvalidation(LinkHighlightDis
playItemClientForTracking(), enclosingIntRect(FloatRect(layer()->position().x, l
ayer()->position().y, layer()->bounds().width, layer()->bounds().height)), Paint
InvalidationFull); |
| 378 } | 378 } |
| 379 } else { | 379 } else { |
| 380 clearGraphicsLayerLinkHighlightPointer(); | 380 clearGraphicsLayerLinkHighlightPointer(); |
| 381 releaseResources(); | 381 releaseResources(); |
| 382 } | 382 } |
| 383 } | 383 } |
| 384 | 384 |
| 385 void LinkHighlightImpl::clearCurrentGraphicsLayer() | 385 void LinkHighlightImpl::clearCurrentGraphicsLayer() |
| 386 { | 386 { |
| 387 m_currentGraphicsLayer = 0; | 387 m_currentGraphicsLayer = 0; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 398 { | 398 { |
| 399 return clipLayer(); | 399 return clipLayer(); |
| 400 } | 400 } |
| 401 | 401 |
| 402 CompositorAnimationPlayer* LinkHighlightImpl::compositorPlayer() const | 402 CompositorAnimationPlayer* LinkHighlightImpl::compositorPlayer() const |
| 403 { | 403 { |
| 404 return m_compositorPlayer.get(); | 404 return m_compositorPlayer.get(); |
| 405 } | 405 } |
| 406 | 406 |
| 407 } // namespace blink | 407 } // namespace blink |
| OLD | NEW |