| 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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 | 359 |
| 360 bool hasLayoutObject = m_node && m_node->layoutObject(); | 360 bool hasLayoutObject = m_node && m_node->layoutObject(); |
| 361 if (hasLayoutObject) { | 361 if (hasLayoutObject) { |
| 362 const LayoutBoxModelObject& paintInvalidationContainer = m_node->layoutO
bject()->containerForPaintInvalidation(); | 362 const LayoutBoxModelObject& paintInvalidationContainer = m_node->layoutO
bject()->containerForPaintInvalidation(); |
| 363 attachLinkHighlightToCompositingLayer(paintInvalidationContainer); | 363 attachLinkHighlightToCompositingLayer(paintInvalidationContainer); |
| 364 if (computeHighlightLayerPathAndPosition(paintInvalidationContainer)) { | 364 if (computeHighlightLayerPathAndPosition(paintInvalidationContainer)) { |
| 365 // We only need to invalidate the layer if the highlight size has ch
anged, otherwise | 365 // We only need to invalidate the layer if the highlight size has ch
anged, otherwise |
| 366 // we can just re-position the layer without needing to repaint. | 366 // we can just re-position the layer without needing to repaint. |
| 367 m_contentLayer->layer()->invalidate(); | 367 m_contentLayer->layer()->invalidate(); |
| 368 | 368 |
| 369 if (m_currentGraphicsLayer && m_currentGraphicsLayer->isTrackingOrCh
eckingPaintInvalidations()) | 369 if (m_currentGraphicsLayer) |
| 370 m_currentGraphicsLayer->trackPaintInvalidation(LinkHighlightDisp
layItemClientForTracking(), enclosingIntRect(FloatRect(layer()->position().x, la
yer()->position().y, layer()->bounds().width, layer()->bounds().height)), PaintI
nvalidationFull); | 370 m_currentGraphicsLayer->trackPaintInvalidation(LinkHighlightDisp
layItemClientForTracking(), enclosingIntRect(FloatRect(layer()->position().x, la
yer()->position().y, layer()->bounds().width, layer()->bounds().height)), PaintI
nvalidationFull); |
| 371 } | 371 } |
| 372 } else { | 372 } else { |
| 373 clearGraphicsLayerLinkHighlightPointer(); | 373 clearGraphicsLayerLinkHighlightPointer(); |
| 374 releaseResources(); | 374 releaseResources(); |
| 375 } | 375 } |
| 376 } | 376 } |
| 377 | 377 |
| 378 void LinkHighlightImpl::clearCurrentGraphicsLayer() | 378 void LinkHighlightImpl::clearCurrentGraphicsLayer() |
| 379 { | 379 { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 391 { | 391 { |
| 392 return clipLayer(); | 392 return clipLayer(); |
| 393 } | 393 } |
| 394 | 394 |
| 395 CompositorAnimationPlayer* LinkHighlightImpl::compositorPlayer() const | 395 CompositorAnimationPlayer* LinkHighlightImpl::compositorPlayer() const |
| 396 { | 396 { |
| 397 return m_compositorPlayer.get(); | 397 return m_compositorPlayer.get(); |
| 398 } | 398 } |
| 399 | 399 |
| 400 } // namespace blink | 400 } // namespace blink |
| OLD | NEW |