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