| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. | 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 void WebPluginContainerImpl::printPage(int pageNumber, | 340 void WebPluginContainerImpl::printPage(int pageNumber, |
| 341 GraphicsContext& gc, | 341 GraphicsContext& gc, |
| 342 const IntRect& printRect) { | 342 const IntRect& printRect) { |
| 343 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible( | 343 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible( |
| 344 gc, *m_element->layoutObject(), DisplayItem::Type::kWebPlugin)) | 344 gc, *m_element->layoutObject(), DisplayItem::Type::kWebPlugin)) |
| 345 return; | 345 return; |
| 346 | 346 |
| 347 LayoutObjectDrawingRecorder drawingRecorder( | 347 LayoutObjectDrawingRecorder drawingRecorder( |
| 348 gc, *m_element->layoutObject(), DisplayItem::Type::kWebPlugin, printRect); | 348 gc, *m_element->layoutObject(), DisplayItem::Type::kWebPlugin, printRect); |
| 349 gc.save(); | 349 gc.save(); |
| 350 |
| 350 WebCanvas* canvas = gc.canvas(); | 351 WebCanvas* canvas = gc.canvas(); |
| 351 m_webPlugin->printPage(pageNumber, canvas); | 352 m_webPlugin->printPage(pageNumber, canvas); |
| 352 gc.restore(); | 353 gc.restore(); |
| 353 } | 354 } |
| 354 | 355 |
| 355 void WebPluginContainerImpl::printEnd() { | 356 void WebPluginContainerImpl::printEnd() { |
| 356 m_webPlugin->printEnd(); | 357 m_webPlugin->printEnd(); |
| 357 } | 358 } |
| 358 | 359 |
| 359 void WebPluginContainerImpl::copy() { | 360 void WebPluginContainerImpl::copy() { |
| (...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 972 // frame view. | 973 // frame view. |
| 973 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRect); | 974 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRect); |
| 974 } | 975 } |
| 975 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); | 976 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); |
| 976 // Convert to the plugin position. | 977 // Convert to the plugin position. |
| 977 for (size_t i = 0; i < cutOutRects.size(); i++) | 978 for (size_t i = 0; i < cutOutRects.size(); i++) |
| 978 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); | 979 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); |
| 979 } | 980 } |
| 980 | 981 |
| 981 } // namespace blink | 982 } // namespace blink |
| OLD | NEW |