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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 void WebPluginContainerImpl::printPage(int pageNumber, | 339 void WebPluginContainerImpl::printPage(int pageNumber, |
340 GraphicsContext& gc, | 340 GraphicsContext& gc, |
341 const IntRect& printRect) { | 341 const IntRect& printRect) { |
342 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible( | 342 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible( |
343 gc, *m_element->layoutObject(), DisplayItem::Type::kWebPlugin)) | 343 gc, *m_element->layoutObject(), DisplayItem::Type::kWebPlugin)) |
344 return; | 344 return; |
345 | 345 |
346 LayoutObjectDrawingRecorder drawingRecorder( | 346 LayoutObjectDrawingRecorder drawingRecorder( |
347 gc, *m_element->layoutObject(), DisplayItem::Type::kWebPlugin, printRect); | 347 gc, *m_element->layoutObject(), DisplayItem::Type::kWebPlugin, printRect); |
348 gc.save(); | 348 gc.save(); |
| 349 |
349 WebCanvas* canvas = gc.canvas(); | 350 WebCanvas* canvas = gc.canvas(); |
350 m_webPlugin->printPage(pageNumber, canvas); | 351 m_webPlugin->printPage(pageNumber, canvas); |
351 gc.restore(); | 352 gc.restore(); |
352 } | 353 } |
353 | 354 |
354 void WebPluginContainerImpl::printEnd() { | 355 void WebPluginContainerImpl::printEnd() { |
355 m_webPlugin->printEnd(); | 356 m_webPlugin->printEnd(); |
356 } | 357 } |
357 | 358 |
358 void WebPluginContainerImpl::copy() { | 359 void WebPluginContainerImpl::copy() { |
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
973 // frame view. | 974 // frame view. |
974 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRect); | 975 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRect); |
975 } | 976 } |
976 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); | 977 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); |
977 // Convert to the plugin position. | 978 // Convert to the plugin position. |
978 for (size_t i = 0; i < cutOutRects.size(); i++) | 979 for (size_t i = 0; i < cutOutRects.size(); i++) |
979 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); | 980 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); |
980 } | 981 } |
981 | 982 |
982 } // namespace blink | 983 } // namespace blink |
OLD | NEW |