| 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 bool Editor::canDHTMLCut() | 195 bool Editor::canDHTMLCut() |
| 196 { | 196 { |
| 197 return !frame().selection().isInPasswordField() && !dispatchCPPEvent(EventTy
peNames::beforecut, DataTransferNumb); | 197 return !frame().selection().isInPasswordField() && !dispatchCPPEvent(EventTy
peNames::beforecut, DataTransferNumb); |
| 198 } | 198 } |
| 199 | 199 |
| 200 bool Editor::canDHTMLCopy() | 200 bool Editor::canDHTMLCopy() |
| 201 { | 201 { |
| 202 return !frame().selection().isInPasswordField() && !dispatchCPPEvent(EventTy
peNames::beforecopy, DataTransferNumb); | 202 return !frame().selection().isInPasswordField() && !dispatchCPPEvent(EventTy
peNames::beforecopy, DataTransferNumb); |
| 203 } | 203 } |
| 204 | 204 |
| 205 bool Editor::canDHTMLPaste() | |
| 206 { | |
| 207 return !dispatchCPPEvent(EventTypeNames::beforepaste, DataTransferNumb); | |
| 208 } | |
| 209 | |
| 210 bool Editor::canCut() const | 205 bool Editor::canCut() const |
| 211 { | 206 { |
| 212 return canCopy() && canDelete(); | 207 return canCopy() && canDelete(); |
| 213 } | 208 } |
| 214 | 209 |
| 215 static HTMLImageElement* imageElementFromImageDocument(Document* document) | 210 static HTMLImageElement* imageElementFromImageDocument(Document* document) |
| 216 { | 211 { |
| 217 if (!document) | 212 if (!document) |
| 218 return 0; | 213 return 0; |
| 219 if (!document->isImageDocument()) | 214 if (!document->isImageDocument()) |
| (...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1279 } | 1274 } |
| 1280 | 1275 |
| 1281 void Editor::trace(Visitor* visitor) | 1276 void Editor::trace(Visitor* visitor) |
| 1282 { | 1277 { |
| 1283 visitor->trace(m_frame); | 1278 visitor->trace(m_frame); |
| 1284 visitor->trace(m_lastEditCommand); | 1279 visitor->trace(m_lastEditCommand); |
| 1285 visitor->trace(m_mark); | 1280 visitor->trace(m_mark); |
| 1286 } | 1281 } |
| 1287 | 1282 |
| 1288 } // namespace blink | 1283 } // namespace blink |
| OLD | NEW |