| 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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 fragment = createFragmentFromText(range.get(), text); | 409 fragment = createFragmentFromText(range.get(), text); |
| 410 } | 410 } |
| 411 } | 411 } |
| 412 | 412 |
| 413 if (fragment) | 413 if (fragment) |
| 414 pasteAsFragment(fragment, canSmartReplaceWithPasteboard(pasteboard), cho
sePlainText); | 414 pasteAsFragment(fragment, canSmartReplaceWithPasteboard(pasteboard), cho
sePlainText); |
| 415 } | 415 } |
| 416 | 416 |
| 417 void Editor::writeSelectionToPasteboard(Pasteboard* pasteboard, Range* selectedR
ange, const String& plainText) | 417 void Editor::writeSelectionToPasteboard(Pasteboard* pasteboard, Range* selectedR
ange, const String& plainText) |
| 418 { | 418 { |
| 419 String html = createMarkup(selectedRange, 0, AnnotateForInterchange, false,
ResolveNonLocalURLs); | 419 String html = createMarkup(selectedRange, AnnotateForInterchange, false, Res
olveNonLocalURLs); |
| 420 KURL url = selectedRange->startContainer()->document().url(); | 420 KURL url = selectedRange->startContainer()->document().url(); |
| 421 pasteboard->writeHTML(html, url, plainText, canSmartCopyOrDelete()); | 421 pasteboard->writeHTML(html, url, plainText, canSmartCopyOrDelete()); |
| 422 } | 422 } |
| 423 | 423 |
| 424 static PassRefPtr<Image> imageFromNode(const Node& node) | 424 static PassRefPtr<Image> imageFromNode(const Node& node) |
| 425 { | 425 { |
| 426 node.document().updateLayoutIgnorePendingStylesheets(); | 426 node.document().updateLayoutIgnorePendingStylesheets(); |
| 427 RenderObject* renderer = node.renderer(); | 427 RenderObject* renderer = node.renderer(); |
| 428 if (!renderer) | 428 if (!renderer) |
| 429 return nullptr; | 429 return nullptr; |
| (...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1279 } | 1279 } |
| 1280 | 1280 |
| 1281 void Editor::trace(Visitor* visitor) | 1281 void Editor::trace(Visitor* visitor) |
| 1282 { | 1282 { |
| 1283 visitor->trace(m_frame); | 1283 visitor->trace(m_frame); |
| 1284 visitor->trace(m_lastEditCommand); | 1284 visitor->trace(m_lastEditCommand); |
| 1285 visitor->trace(m_mark); | 1285 visitor->trace(m_mark); |
| 1286 } | 1286 } |
| 1287 | 1287 |
| 1288 } // namespace blink | 1288 } // namespace blink |
| OLD | NEW |