| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 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 | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 } | 473 } |
| 474 | 474 |
| 475 void Editor::writeSelectionToPasteboard() | 475 void Editor::writeSelectionToPasteboard() |
| 476 { | 476 { |
| 477 KURL url = frame().document()->url(); | 477 KURL url = frame().document()->url(); |
| 478 String html = frame().selection().selectedHTMLForClipboard(); | 478 String html = frame().selection().selectedHTMLForClipboard(); |
| 479 String plainText = frame().selectedTextForClipboard(); | 479 String plainText = frame().selectedTextForClipboard(); |
| 480 Pasteboard::generalPasteboard()->writeHTML(html, url, plainText, canSmartCop
yOrDelete()); | 480 Pasteboard::generalPasteboard()->writeHTML(html, url, plainText, canSmartCop
yOrDelete()); |
| 481 } | 481 } |
| 482 | 482 |
| 483 static PassRefPtr<Image> imageFromNode(const Node& node) | 483 static Image* imageFromNode(const Node& node) |
| 484 { | 484 { |
| 485 node.document().updateStyleAndLayoutIgnorePendingStylesheets(); | 485 node.document().updateStyleAndLayoutIgnorePendingStylesheets(); |
| 486 LayoutObject* layoutObject = node.layoutObject(); | 486 LayoutObject* layoutObject = node.layoutObject(); |
| 487 if (!layoutObject) | 487 if (!layoutObject) |
| 488 return nullptr; | 488 return nullptr; |
| 489 | 489 |
| 490 if (layoutObject->isCanvas()) | 490 if (layoutObject->isCanvas()) |
| 491 return toHTMLCanvasElement(node).copiedImage(FrontBuffer, PreferNoAccele
ration); | 491 return toHTMLCanvasElement(node).copiedImage(FrontBuffer, PreferNoAccele
ration); |
| 492 | 492 |
| 493 if (layoutObject->isImage()) { | 493 if (layoutObject->isImage()) { |
| (...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1437 } | 1437 } |
| 1438 | 1438 |
| 1439 DEFINE_TRACE(Editor) | 1439 DEFINE_TRACE(Editor) |
| 1440 { | 1440 { |
| 1441 visitor->trace(m_frame); | 1441 visitor->trace(m_frame); |
| 1442 visitor->trace(m_lastEditCommand); | 1442 visitor->trace(m_lastEditCommand); |
| 1443 visitor->trace(m_mark); | 1443 visitor->trace(m_mark); |
| 1444 } | 1444 } |
| 1445 | 1445 |
| 1446 } // namespace blink | 1446 } // namespace blink |
| OLD | NEW |