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