| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 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 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 if (!target && m_frame->document()) | 692 if (!target && m_frame->document()) |
| 693 target = m_frame->document()->body(); | 693 target = m_frame->document()->body(); |
| 694 if (!target) | 694 if (!target) |
| 695 return true; | 695 return true; |
| 696 target = target->shadowAncestorNode(); | 696 target = target->shadowAncestorNode(); |
| 697 | 697 |
| 698 RefPtr<Clipboard> clipboard = newGeneralClipboard(policy); | 698 RefPtr<Clipboard> clipboard = newGeneralClipboard(policy); |
| 699 | 699 |
| 700 ExceptionCode ec = 0; | 700 ExceptionCode ec = 0; |
| 701 RefPtr<Event> evt = ClipboardEvent::create(eventType, true, true, clipboard)
; | 701 RefPtr<Event> evt = ClipboardEvent::create(eventType, true, true, clipboard)
; |
| 702 target->dispatchEvent(evt, ec); | 702 EventTargetNodeCast(target)->dispatchEvent(evt, ec); |
| 703 bool noDefaultProcessing = evt->defaultPrevented(); | 703 bool noDefaultProcessing = evt->defaultPrevented(); |
| 704 | 704 |
| 705 // invalidate clipboard here for security | 705 // invalidate clipboard here for security |
| 706 clipboard->setAccessPolicy(ClipboardNumb); | 706 clipboard->setAccessPolicy(ClipboardNumb); |
| 707 | 707 |
| 708 return !noDefaultProcessing; | 708 return !noDefaultProcessing; |
| 709 } | 709 } |
| 710 | 710 |
| 711 void Editor::applyStyle(CSSStyleDeclaration* style, EditAction editingAction) | 711 void Editor::applyStyle(CSSStyleDeclaration* style, EditAction editingAction) |
| 712 { | 712 { |
| (...skipping 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2187 return firstVisibleRange(target, caseFlag); | 2187 return firstVisibleRange(target, caseFlag); |
| 2188 | 2188 |
| 2189 return lastVisibleRange(target, caseFlag); | 2189 return lastVisibleRange(target, caseFlag); |
| 2190 } | 2190 } |
| 2191 | 2191 |
| 2192 } // namespace WebCore | 2192 } // namespace WebCore |
| 2193 | 2193 |
| 2194 | 2194 |
| 2195 | 2195 |
| 2196 | 2196 |
| OLD | NEW |