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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 bool WebPluginContainerImpl::getPrintPresetOptionsFromDocument(WebPrintPresetOpt
ions* presetOptions) const | 332 bool WebPluginContainerImpl::getPrintPresetOptionsFromDocument(WebPrintPresetOpt
ions* presetOptions) const |
333 { | 333 { |
334 return m_webPlugin->getPrintPresetOptionsFromDocument(presetOptions); | 334 return m_webPlugin->getPrintPresetOptionsFromDocument(presetOptions); |
335 } | 335 } |
336 | 336 |
337 int WebPluginContainerImpl::printBegin(const WebPrintParams& printParams) const | 337 int WebPluginContainerImpl::printBegin(const WebPrintParams& printParams) const |
338 { | 338 { |
339 return m_webPlugin->printBegin(printParams); | 339 return m_webPlugin->printBegin(printParams); |
340 } | 340 } |
341 | 341 |
342 void WebPluginContainerImpl::printPage(int pageNumber, GraphicsContext* gc, cons
t IntRect& printRect) | 342 void WebPluginContainerImpl::printPage(int pageNumber, GraphicsContext& gc, cons
t IntRect& printRect) |
343 { | 343 { |
344 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*gc, *m_element-
>layoutObject(), DisplayItem::Type::WebPlugin, LayoutPoint())) | 344 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(gc, *m_element->
layoutObject(), DisplayItem::Type::WebPlugin, LayoutPoint())) |
345 return; | 345 return; |
346 | 346 |
347 LayoutObjectDrawingRecorder drawingRecorder(*gc, *m_element->layoutObject(),
DisplayItem::Type::WebPlugin, printRect, LayoutPoint()); | 347 LayoutObjectDrawingRecorder drawingRecorder(gc, *m_element->layoutObject(),
DisplayItem::Type::WebPlugin, printRect, LayoutPoint()); |
348 gc->save(); | 348 gc.save(); |
349 WebCanvas* canvas = gc->canvas(); | 349 WebCanvas* canvas = gc.canvas(); |
350 m_webPlugin->printPage(pageNumber, canvas); | 350 m_webPlugin->printPage(pageNumber, canvas); |
351 gc->restore(); | 351 gc.restore(); |
352 } | 352 } |
353 | 353 |
354 void WebPluginContainerImpl::printEnd() | 354 void WebPluginContainerImpl::printEnd() |
355 { | 355 { |
356 m_webPlugin->printEnd(); | 356 m_webPlugin->printEnd(); |
357 } | 357 } |
358 | 358 |
359 void WebPluginContainerImpl::copy() | 359 void WebPluginContainerImpl::copy() |
360 { | 360 { |
361 if (!m_webPlugin->hasSelection()) | 361 if (!m_webPlugin->hasSelection()) |
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
974 // frame view. | 974 // frame view. |
975 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRec
t); | 975 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRec
t); |
976 } | 976 } |
977 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); | 977 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); |
978 // Convert to the plugin position. | 978 // Convert to the plugin position. |
979 for (size_t i = 0; i < cutOutRects.size(); i++) | 979 for (size_t i = 0; i < cutOutRects.size(); i++) |
980 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); | 980 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); |
981 } | 981 } |
982 | 982 |
983 } // namespace blinkf | 983 } // namespace blinkf |
OLD | NEW |