Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 283 return frame->pageZoomFactor(); | 283 return frame->pageZoomFactor(); |
| 284 } | 284 } |
| 285 | 285 |
| 286 void WebPluginContainerImpl::setWebLayer(WebLayer* layer) | 286 void WebPluginContainerImpl::setWebLayer(WebLayer* layer) |
| 287 { | 287 { |
| 288 if (m_webLayer == layer) | 288 if (m_webLayer == layer) |
| 289 return; | 289 return; |
| 290 | 290 |
| 291 // If anyone of the layers is null we need to switch between hardware | 291 // If anyone of the layers is null we need to switch between hardware |
| 292 // and software compositing. | 292 // and software compositing. |
| 293 if (!m_webLayer || !layer) | 293 if (!m_webLayer || !layer) { |
| 294 m_element->scheduleSVGFilterLayerUpdateHack(); | 294 m_element->setNeedsCompositingUpdate(); |
| 295 m_element->setNeedsStyleRecalc(LocalStyleChange); | |
|
esprehn
2014/06/10 02:19:09
Can you add a comment why you need to trigger this
| |
| 296 } | |
| 295 if (m_webLayer) | 297 if (m_webLayer) |
| 296 GraphicsLayer::unregisterContentsLayer(m_webLayer); | 298 GraphicsLayer::unregisterContentsLayer(m_webLayer); |
| 297 if (layer) | 299 if (layer) |
| 298 GraphicsLayer::registerContentsLayer(layer); | 300 GraphicsLayer::registerContentsLayer(layer); |
| 299 m_webLayer = layer; | 301 m_webLayer = layer; |
| 300 } | 302 } |
| 301 | 303 |
| 302 bool WebPluginContainerImpl::supportsPaginatedPrint() const | 304 bool WebPluginContainerImpl::supportsPaginatedPrint() const |
| 303 { | 305 { |
| 304 return m_webPlugin->supportsPaginatedPrint(); | 306 return m_webPlugin->supportsPaginatedPrint(); |
| (...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 895 | 897 |
| 896 return clipRect; | 898 return clipRect; |
| 897 } | 899 } |
| 898 | 900 |
| 899 bool WebPluginContainerImpl::pluginShouldPersist() const | 901 bool WebPluginContainerImpl::pluginShouldPersist() const |
| 900 { | 902 { |
| 901 return m_webPlugin->shouldPersist(); | 903 return m_webPlugin->shouldPersist(); |
| 902 } | 904 } |
| 903 | 905 |
| 904 } // namespace blink | 906 } // namespace blink |
| OLD | NEW |