| 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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 if (!target) | 457 if (!target) |
| 458 return true; | 458 return true; |
| 459 | 459 |
| 460 RefPtrWillBeRawPtr<Clipboard> clipboard = Clipboard::create( | 460 RefPtrWillBeRawPtr<Clipboard> clipboard = Clipboard::create( |
| 461 Clipboard::CopyAndPaste, | 461 Clipboard::CopyAndPaste, |
| 462 policy, | 462 policy, |
| 463 policy == ClipboardWritable | 463 policy == ClipboardWritable |
| 464 ? DataObject::create() | 464 ? DataObject::create() |
| 465 : DataObject::createFromPasteboard(pasteMode)); | 465 : DataObject::createFromPasteboard(pasteMode)); |
| 466 | 466 |
| 467 RefPtr<Event> evt = ClipboardEvent::create(eventType, true, true, clipboard)
; | 467 RefPtrWillBeRawPtr<Event> evt = ClipboardEvent::create(eventType, true, true
, clipboard); |
| 468 target->dispatchEvent(evt, IGNORE_EXCEPTION); | 468 target->dispatchEvent(evt, IGNORE_EXCEPTION); |
| 469 bool noDefaultProcessing = evt->defaultPrevented(); | 469 bool noDefaultProcessing = evt->defaultPrevented(); |
| 470 if (noDefaultProcessing && policy == ClipboardWritable) { | 470 if (noDefaultProcessing && policy == ClipboardWritable) { |
| 471 RefPtrWillBeRawPtr<DataObject> dataObject = clipboard->dataObject(); | 471 RefPtrWillBeRawPtr<DataObject> dataObject = clipboard->dataObject(); |
| 472 Pasteboard::generalPasteboard()->writeDataObject(dataObject.release()); | 472 Pasteboard::generalPasteboard()->writeDataObject(dataObject.release()); |
| 473 } | 473 } |
| 474 | 474 |
| 475 // invalidate clipboard here for security | 475 // invalidate clipboard here for security |
| 476 clipboard->setAccessPolicy(ClipboardNumb); | 476 clipboard->setAccessPolicy(ClipboardNumb); |
| 477 | 477 |
| (...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 return m_frame.spellChecker(); | 1229 return m_frame.spellChecker(); |
| 1230 } | 1230 } |
| 1231 | 1231 |
| 1232 void Editor::toggleOverwriteModeEnabled() | 1232 void Editor::toggleOverwriteModeEnabled() |
| 1233 { | 1233 { |
| 1234 m_overwriteModeEnabled = !m_overwriteModeEnabled; | 1234 m_overwriteModeEnabled = !m_overwriteModeEnabled; |
| 1235 frame().selection().setShouldShowBlockCursor(m_overwriteModeEnabled); | 1235 frame().selection().setShouldShowBlockCursor(m_overwriteModeEnabled); |
| 1236 } | 1236 } |
| 1237 | 1237 |
| 1238 } // namespace WebCore | 1238 } // namespace WebCore |
| OLD | NEW |