| 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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 return m_webPlugin->printBegin(printParams); | 352 return m_webPlugin->printBegin(printParams); |
| 353 } | 353 } |
| 354 | 354 |
| 355 void WebPluginContainerImpl::printPage(int pageNumber, GraphicsContext* gc, cons
t IntRect& printRect) | 355 void WebPluginContainerImpl::printPage(int pageNumber, GraphicsContext* gc, cons
t IntRect& printRect) |
| 356 { | 356 { |
| 357 LayoutObjectDrawingRecorder drawingRecorder(*gc, *m_element->layoutObject(),
DisplayItem::Type::WebPlugin, printRect); | 357 LayoutObjectDrawingRecorder drawingRecorder(*gc, *m_element->layoutObject(),
DisplayItem::Type::WebPlugin, printRect); |
| 358 if (drawingRecorder.canUseCachedDrawing()) | 358 if (drawingRecorder.canUseCachedDrawing()) |
| 359 return; | 359 return; |
| 360 gc->save(); | 360 gc->save(); |
| 361 WebCanvas* canvas = gc->canvas(); | 361 WebCanvas* canvas = gc->canvas(); |
| 362 // TODO: Remove third parameter when both blink and chromium changes land fo
r bug496765 | |
| 363 m_webPlugin->printPage(pageNumber, canvas, false); | |
| 364 m_webPlugin->printPage(pageNumber, canvas); | 362 m_webPlugin->printPage(pageNumber, canvas); |
| 365 gc->restore(); | 363 gc->restore(); |
| 366 } | 364 } |
| 367 | 365 |
| 368 void WebPluginContainerImpl::printEnd() | 366 void WebPluginContainerImpl::printEnd() |
| 369 { | 367 { |
| 370 m_webPlugin->printEnd(); | 368 m_webPlugin->printEnd(); |
| 371 } | 369 } |
| 372 | 370 |
| 373 void WebPluginContainerImpl::copy() | 371 void WebPluginContainerImpl::copy() |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 for (size_t i = 0; i < cutOutRects.size(); i++) | 972 for (size_t i = 0; i < cutOutRects.size(); i++) |
| 975 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); | 973 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); |
| 976 } | 974 } |
| 977 | 975 |
| 978 bool WebPluginContainerImpl::pluginShouldPersist() const | 976 bool WebPluginContainerImpl::pluginShouldPersist() const |
| 979 { | 977 { |
| 980 return m_webPlugin->shouldPersist(); | 978 return m_webPlugin->shouldPersist(); |
| 981 } | 979 } |
| 982 | 980 |
| 983 } // namespace blink | 981 } // namespace blink |
| OLD | NEW |