| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 RenderLayer* LinkHighlight::computeEnclosingCompositingLayer() | 105 RenderLayer* LinkHighlight::computeEnclosingCompositingLayer() |
| 106 { | 106 { |
| 107 if (!m_node || !m_node->renderer()) | 107 if (!m_node || !m_node->renderer()) |
| 108 return 0; | 108 return 0; |
| 109 | 109 |
| 110 // Find the nearest enclosing composited layer and attach to it. We may need
to cross frame boundaries | 110 // Find the nearest enclosing composited layer and attach to it. We may need
to cross frame boundaries |
| 111 // to find a suitable layer. | 111 // to find a suitable layer. |
| 112 RenderObject* renderer = m_node->renderer(); | 112 RenderObject* renderer = m_node->renderer(); |
| 113 RenderLayer* renderLayer = renderer->enclosingLayer()->enclosingLayerForPain
tInvalidation(); | 113 RenderLayer* renderLayer = renderer->enclosingLayer()->enclosingLayerForPain
tInvalidation(); |
| 114 | 114 |
| 115 ASSERT(renderLayer->compositingState() != NotComposited); | |
| 116 | |
| 117 GraphicsLayer* newGraphicsLayer = renderLayer->graphicsLayerBacking(); | 115 GraphicsLayer* newGraphicsLayer = renderLayer->graphicsLayerBacking(); |
| 118 | 116 |
| 119 m_clipLayer->setTransform(SkMatrix44(SkMatrix44::kIdentity_Constructor)); | 117 m_clipLayer->setTransform(SkMatrix44(SkMatrix44::kIdentity_Constructor)); |
| 120 | 118 |
| 121 if (m_currentGraphicsLayer != newGraphicsLayer) { | 119 if (m_currentGraphicsLayer != newGraphicsLayer) { |
| 122 if (m_currentGraphicsLayer) | 120 if (m_currentGraphicsLayer) |
| 123 clearGraphicsLayerLinkHighlightPointer(); | 121 clearGraphicsLayerLinkHighlightPointer(); |
| 124 | 122 |
| 125 m_currentGraphicsLayer = newGraphicsLayer; | 123 m_currentGraphicsLayer = newGraphicsLayer; |
| 126 m_currentGraphicsLayer->addLinkHighlight(this); | 124 m_currentGraphicsLayer->addLinkHighlight(this); |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 // Make sure we update geometry on the next callback from WebViewImpl::layou
t(). | 331 // Make sure we update geometry on the next callback from WebViewImpl::layou
t(). |
| 334 m_geometryNeedsUpdate = true; | 332 m_geometryNeedsUpdate = true; |
| 335 } | 333 } |
| 336 | 334 |
| 337 WebLayer* LinkHighlight::layer() | 335 WebLayer* LinkHighlight::layer() |
| 338 { | 336 { |
| 339 return clipLayer(); | 337 return clipLayer(); |
| 340 } | 338 } |
| 341 | 339 |
| 342 } // namespace blink | 340 } // namespace blink |
| OLD | NEW |