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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 void Editor::writeSelectionToPasteboard(Pasteboard* pasteboard, Range* selectedR
ange, const String& plainText) | 412 void Editor::writeSelectionToPasteboard(Pasteboard* pasteboard, Range* selectedR
ange, const String& plainText) |
413 { | 413 { |
414 String html = createMarkup(selectedRange, AnnotateForInterchange, false, Res
olveNonLocalURLs); | 414 String html = createMarkup(selectedRange, AnnotateForInterchange, false, Res
olveNonLocalURLs); |
415 KURL url = selectedRange->startContainer()->document().url(); | 415 KURL url = selectedRange->startContainer()->document().url(); |
416 pasteboard->writeHTML(html, url, plainText, canSmartCopyOrDelete()); | 416 pasteboard->writeHTML(html, url, plainText, canSmartCopyOrDelete()); |
417 } | 417 } |
418 | 418 |
419 static PassRefPtr<Image> imageFromNode(const Node& node) | 419 static PassRefPtr<Image> imageFromNode(const Node& node) |
420 { | 420 { |
421 node.document().updateLayoutIgnorePendingStylesheets(); | 421 node.document().updateLayoutIgnorePendingStylesheets(); |
422 RenderObject* renderer = node.renderer(); | 422 LayoutObject* renderer = node.renderer(); |
423 if (!renderer) | 423 if (!renderer) |
424 return nullptr; | 424 return nullptr; |
425 | 425 |
426 if (renderer->isCanvas()) | 426 if (renderer->isCanvas()) |
427 return toHTMLCanvasElement(node).copiedImage(FrontBuffer); | 427 return toHTMLCanvasElement(node).copiedImage(FrontBuffer); |
428 | 428 |
429 if (renderer->isImage()) { | 429 if (renderer->isImage()) { |
430 RenderImage* renderImage = toRenderImage(renderer); | 430 RenderImage* renderImage = toRenderImage(renderer); |
431 if (!renderImage) | 431 if (!renderImage) |
432 return nullptr; | 432 return nullptr; |
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1274 } | 1274 } |
1275 | 1275 |
1276 void Editor::trace(Visitor* visitor) | 1276 void Editor::trace(Visitor* visitor) |
1277 { | 1277 { |
1278 visitor->trace(m_frame); | 1278 visitor->trace(m_frame); |
1279 visitor->trace(m_lastEditCommand); | 1279 visitor->trace(m_lastEditCommand); |
1280 visitor->trace(m_mark); | 1280 visitor->trace(m_mark); |
1281 } | 1281 } |
1282 | 1282 |
1283 } // namespace blink | 1283 } // namespace blink |
OLD | NEW |