OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2008, 2010 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 : Clipboard(policy, clipboardType) | 58 : Clipboard(policy, clipboardType) |
59 , m_pasteboardName(pasteboardName) | 59 , m_pasteboardName(pasteboardName) |
60 , m_clipboardContents(clipboardContents) | 60 , m_clipboardContents(clipboardContents) |
61 , m_frame(frame) | 61 , m_frame(frame) |
62 { | 62 { |
63 m_changeCount = platformStrategies()->pasteboardStrategy()->changeCount(m_pa
steboardName); | 63 m_changeCount = platformStrategies()->pasteboardStrategy()->changeCount(m_pa
steboardName); |
64 } | 64 } |
65 | 65 |
66 ClipboardMac::~ClipboardMac() | 66 ClipboardMac::~ClipboardMac() |
67 { | 67 { |
| 68 if (m_dragImage) |
| 69 m_dragImage->removeClient(this); |
68 } | 70 } |
69 | 71 |
70 bool ClipboardMac::hasData() | 72 bool ClipboardMac::hasData() |
71 { | 73 { |
72 Vector<String> types; | 74 Vector<String> types; |
73 platformStrategies()->pasteboardStrategy()->getTypes(types, m_pasteboardName
); | 75 platformStrategies()->pasteboardStrategy()->getTypes(types, m_pasteboardName
); |
74 return !types.isEmpty(); | 76 return !types.isEmpty(); |
75 } | 77 } |
76 | 78 |
77 static String cocoaTypeFromHTMLClipboardType(const String& type) | 79 static String cocoaTypeFromHTMLClipboardType(const String& type) |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 } else if (m_dragImage) { | 431 } else if (m_dragImage) { |
430 result = m_dragImage->image()->getNSImage(); | 432 result = m_dragImage->image()->getNSImage(); |
431 | 433 |
432 loc = m_dragLoc; | 434 loc = m_dragLoc; |
433 loc.y = [result size].height - loc.y; | 435 loc.y = [result size].height - loc.y; |
434 } | 436 } |
435 return result; | 437 return result; |
436 } | 438 } |
437 | 439 |
438 } | 440 } |
OLD | NEW |