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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 return m_clipLayer.get(); | 100 return m_clipLayer.get(); |
101 } | 101 } |
102 | 102 |
103 void LinkHighlight::releaseResources() | 103 void LinkHighlight::releaseResources() |
104 { | 104 { |
105 m_node.clear(); | 105 m_node.clear(); |
106 } | 106 } |
107 | 107 |
108 void LinkHighlight::attachLinkHighlightToCompositingLayer(const RenderLayerModel
Object* paintInvalidationContainer) | 108 void LinkHighlight::attachLinkHighlightToCompositingLayer(const RenderLayerModel
Object* paintInvalidationContainer) |
109 { | 109 { |
110 // FIXME: there should always be a GraphicsLayer. See https://code.google.co
m/p/chromium/issues/detail?id=359877. | |
111 GraphicsLayer* newGraphicsLayer = paintInvalidationContainer->layer()->graph
icsLayerBacking(); | 110 GraphicsLayer* newGraphicsLayer = paintInvalidationContainer->layer()->graph
icsLayerBacking(); |
112 if (newGraphicsLayer && !newGraphicsLayer->drawsContent()) | 111 if (!newGraphicsLayer->drawsContent()) |
113 newGraphicsLayer = paintInvalidationContainer->layer()->graphicsLayerBac
kingForScrolling(); | 112 newGraphicsLayer = paintInvalidationContainer->layer()->graphicsLayerBac
kingForScrolling(); |
114 if (!newGraphicsLayer) | 113 if (!newGraphicsLayer) |
115 return; | 114 return; |
116 | 115 |
117 m_clipLayer->setTransform(SkMatrix44(SkMatrix44::kIdentity_Constructor)); | 116 m_clipLayer->setTransform(SkMatrix44(SkMatrix44::kIdentity_Constructor)); |
118 | 117 |
119 if (m_currentGraphicsLayer != newGraphicsLayer) { | 118 if (m_currentGraphicsLayer != newGraphicsLayer) { |
120 if (m_currentGraphicsLayer) | 119 if (m_currentGraphicsLayer) |
121 clearGraphicsLayerLinkHighlightPointer(); | 120 clearGraphicsLayerLinkHighlightPointer(); |
122 | 121 |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 // Make sure we update geometry on the next callback from WebViewImpl::layou
t(). | 339 // Make sure we update geometry on the next callback from WebViewImpl::layou
t(). |
341 m_geometryNeedsUpdate = true; | 340 m_geometryNeedsUpdate = true; |
342 } | 341 } |
343 | 342 |
344 WebLayer* LinkHighlight::layer() | 343 WebLayer* LinkHighlight::layer() |
345 { | 344 { |
346 return clipLayer(); | 345 return clipLayer(); |
347 } | 346 } |
348 | 347 |
349 } // namespace blink | 348 } // namespace blink |
OLD | NEW |