Changeset 78532 in webkit
- Timestamp:
- Feb 15, 2011 12:21:50 AM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 34 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r78527 r78532 1 2011-02-07 Ryosuke Niwa <rniwa@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard 6 https://bugs.webkit.org/show_bug.cgi?id=52417 7 8 Added two callback functions, canCopyCut and canPaste to EditorClient. These functions 9 returns true iff the current frame should be able to copy/cut and paste respectively. 10 They take the default value determined by isDOMPasteAllowed and javaScriptCanAccessClipboard. 11 12 These callbacks allows embedders to decide whether or not copy/cut/paste should be enabled 13 per frame and thus per origin rather than per page. 14 15 No new tests are added since this is a WebKit/WebCore interface change. 16 17 * editing/EditorCommand.cpp: 18 (WebCore::supportedCopyCut): Calls canCopyCut. 19 (WebCore::supportedPaste): Calls canPaste. 20 * loader/EmptyClients.h: 21 (WebCore::EmptyEditorClient::canCopyCut): Added. 22 (WebCore::EmptyEditorClient::canPaste): Added. 23 * page/EditorClient.h: 24 1 25 2011-02-14 Jeremy Orlow <jorlow@chromium.org> 2 26 -
trunk/Source/WebCore/editing/EditorCommand.cpp
r77182 r78532 1122 1122 static bool supportedCopyCut(Frame* frame) 1123 1123 { 1124 Settings* settings = frame ? frame->settings() : 0; 1125 return settings && settings->javaScriptCanAccessClipboard(); 1124 if (!frame) 1125 return false; 1126 1127 Settings* settings = frame->settings(); 1128 bool defaultValue = settings && settings->javaScriptCanAccessClipboard(); 1129 1130 EditorClient* client = frame->editor()->client(); 1131 return client ? client->canCopyCut(defaultValue) : defaultValue; 1126 1132 } 1127 1133 1128 1134 static bool supportedPaste(Frame* frame) 1129 1135 { 1130 Settings* settings = frame ? frame->settings() : 0; 1131 return settings && (settings->javaScriptCanAccessClipboard() ? settings->isDOMPasteAllowed() : 0); 1136 if (!frame) 1137 return false; 1138 1139 Settings* settings = frame->settings(); 1140 bool defaultValue = settings && settings->javaScriptCanAccessClipboard() && settings->isDOMPasteAllowed(); 1141 1142 EditorClient* client = frame->editor()->client(); 1143 return client ? client->canPaste(defaultValue) : defaultValue; 1132 1144 } 1133 1145 -
trunk/Source/WebCore/loader/EmptyClients.h
r77963 r78532 442 442 virtual void clearUndoRedoOperations() { } 443 443 444 virtual bool canCopyCut(bool defaultValue) const { return defaultValue; } 445 virtual bool canPaste(bool defaultValue) const { return defaultValue; } 444 446 virtual bool canUndo() const { return false; } 445 447 virtual bool canRedo() const { return false; } -
trunk/Source/WebCore/page/EditorClient.h
r77651 r78532 133 133 virtual void clearUndoRedoOperations() = 0; 134 134 135 virtual bool canCopyCut(bool defaultValue) const = 0; 136 virtual bool canPaste(bool defaultValue) const = 0; 135 137 virtual bool canUndo() const = 0; 136 138 virtual bool canRedo() const = 0; -
trunk/Source/WebKit/chromium/ChangeLog
r78494 r78532 1 2011-02-07 Ryosuke Niwa <rniwa@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard 6 https://bugs.webkit.org/show_bug.cgi?id=52417 7 8 Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently 9 not implemented. 10 11 * src/EditorClientImpl.cpp: 12 (WebKit::EditorClientImpl::canCopyCut): Added. 13 (WebKit::EditorClientImpl::canPaste): Added. 14 * src/EditorClientImpl.h: 15 1 16 2011-02-14 Jay Soffian <jaysoffian@gmail.com> 2 17 -
trunk/Source/WebKit/chromium/src/EditorClientImpl.cpp
r78144 r78532 323 323 m_undoStack.clear(); 324 324 m_redoStack.clear(); 325 } 326 327 bool EditorClientImpl::canCopyCut(bool defaultValue) const 328 { 329 return defaultValue; 330 } 331 332 bool EditorClientImpl::canPaste(bool defaultValue) const 333 { 334 return defaultValue; 325 335 } 326 336 -
trunk/Source/WebKit/chromium/src/EditorClientImpl.h
r78144 r78532 80 80 virtual void registerCommandForRedo(PassRefPtr<WebCore::EditCommand>); 81 81 virtual void clearUndoRedoOperations(); 82 virtual bool canCopyCut(bool defaultValue) const; 83 virtual bool canPaste(bool defaultValue) const; 82 84 virtual bool canUndo() const; 83 85 virtual bool canRedo() const; -
trunk/Source/WebKit/efl/ChangeLog
r77963 r78532 1 2011-02-07 Ryosuke Niwa <rniwa@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard 6 https://bugs.webkit.org/show_bug.cgi?id=52417 7 8 Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently 9 not implemented. 10 11 * WebCoreSupport/EditorClientEfl.cpp: 12 (WebCore::EditorClientEfl::canCopyCut): Added. 13 (WebCore::EditorClientEfl::canPaste): Added. 14 * WebCoreSupport/EditorClientEfl.h: 15 1 16 2011-02-08 Adam Barth <abarth@webkit.org> 2 17 -
trunk/Source/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp
r74566 r78532 165 165 { 166 166 notImplemented(); 167 } 168 169 bool EditorClientEfl::canCopyCut(bool defaultValue) const 170 { 171 return defaultValue; 172 } 173 174 bool EditorClientEfl::canPaste(bool defaultValue) const 175 { 176 return defaultValue; 167 177 } 168 178 -
trunk/Source/WebKit/efl/WebCoreSupport/EditorClientEfl.h
r73886 r78532 84 84 virtual void clearUndoRedoOperations(); 85 85 86 virtual bool canCopyCut(bool defaultValue) const; 87 virtual bool canPaste(bool defaultValue) const; 86 88 virtual bool canUndo() const; 87 89 virtual bool canRedo() const; -
trunk/Source/WebKit/gtk/ChangeLog
r78519 r78532 1 2011-02-07 Ryosuke Niwa <rniwa@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard 6 https://bugs.webkit.org/show_bug.cgi?id=52417 7 8 Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently 9 not implemented. 10 11 * WebCoreSupport/EditorClientGtk.cpp: 12 (WebKit::EditorClient::canCopyCut): Added. 13 (WebKit::EditorClient::canPaste): Added. 14 * WebCoreSupport/EditorClientGtk.h: 15 1 16 2011-02-14 Alejandro G. Castro <alex@igalia.com> 2 17 -
trunk/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
r75009 r78532 507 507 } 508 508 509 bool EditorClient::canCopyCut(bool defaultValue) const 510 { 511 return defaultValue; 512 } 513 514 bool EditorClient::canPaste(bool defaultValue) const 515 { 516 return defaultValue; 517 } 518 509 519 bool EditorClient::canUndo() const 510 520 { -
trunk/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
r75009 r78532 104 104 virtual void clearUndoRedoOperations(); 105 105 106 virtual bool canCopyCut(bool defaultValue) const; 107 virtual bool canPaste(bool defaultValue) const; 106 108 virtual bool canUndo() const; 107 109 virtual bool canRedo() const; -
trunk/Source/WebKit/haiku/ChangeLog
r77963 r78532 1 2011-02-07 Ryosuke Niwa <rniwa@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard 6 https://bugs.webkit.org/show_bug.cgi?id=52417 7 8 Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently 9 not implemented. 10 11 * WebCoreSupport/EditorClientHaiku.cpp: 12 (WebCore::EditorClientHaiku::canCopyCut): Added. 13 (WebCore::EditorClientHaiku::canPaste): Added. 14 * WebCoreSupport/EditorClientHaiku.h: 15 1 16 2011-02-08 Adam Barth <abarth@webkit.org> 2 17 -
trunk/Source/WebKit/haiku/WebCoreSupport/EditorClientHaiku.cpp
r74566 r78532 211 211 } 212 212 213 bool EditorClientHaiku::canCopyCut(bool defaultValue) const 214 { 215 return defaultValue; 216 } 217 218 bool EditorClientHaiku::canPaste(bool defaultValue) const 219 { 220 return defaultValue; 221 } 222 213 223 bool EditorClientHaiku::canUndo() const 214 224 { -
trunk/Source/WebKit/haiku/WebCoreSupport/EditorClientHaiku.h
r73886 r78532 81 81 virtual void clearUndoRedoOperations(); 82 82 83 virtual bool canCopyCut(bool defaultValue) const; 84 virtual bool canPaste(bool defaultValue) const; 83 85 virtual bool canUndo() const; 84 86 virtual bool canRedo() const; -
trunk/Source/WebKit/mac/ChangeLog
r78382 r78532 1 2011-02-07 Ryosuke Niwa <rniwa@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard 6 https://bugs.webkit.org/show_bug.cgi?id=52417 7 8 Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently 9 not implemented. 10 11 * WebCoreSupport/WebEditorClient.h: 12 * WebCoreSupport/WebEditorClient.mm: 13 (WebEditorClient::canCopyCut): Added. 14 (WebEditorClient::canPaste): Added. 15 1 16 2011-02-11 Geoffrey Garen <ggaren@apple.com> 2 17 -
trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h
r75523 r78532 105 105 virtual void registerCommandForRedo(PassRefPtr<WebCore::EditCommand>); 106 106 virtual void clearUndoRedoOperations(); 107 107 108 virtual bool canCopyCut(bool defaultValue) const; 109 virtual bool canPaste(bool defaultValue) const; 108 110 virtual bool canUndo() const; 109 111 virtual bool canRedo() const; -
trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm
r75523 r78532 593 593 m_haveUndoRedoOperations = NO; 594 594 } 595 } 596 597 bool WebEditorClient::canCopyCut(bool defaultValue) const 598 { 599 return defaultValue; 600 } 601 602 bool WebEditorClient::canPaste(bool defaultValue) const 603 { 604 return defaultValue; 595 605 } 596 606 -
trunk/Source/WebKit/qt/ChangeLog
r78490 r78532 1 2011-02-07 Ryosuke Niwa <rniwa@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard 6 https://bugs.webkit.org/show_bug.cgi?id=52417 7 8 Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently 9 not implemented. 10 11 * WebCoreSupport/EditorClientQt.cpp: 12 (WebCore::EditorClientQt::canCopyCut): Added. 13 (WebCore::EditorClientQt::canPaste): Added. 14 * WebCoreSupport/EditorClientQt.h: 15 1 16 2011-02-14 Alexis Menard <alexis.menard@nokia.com> 2 17 -
trunk/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
r75812 r78532 265 265 } 266 266 267 bool EditorClientQt::canCopyCut(bool defaultValue) const 268 { 269 return defaultValue; 270 } 271 272 bool EditorClientQt::canPaste(bool defaultValue) const 273 { 274 return defaultValue; 275 } 276 267 277 bool EditorClientQt::canUndo() const 268 278 { -
trunk/Source/WebKit/qt/WebCoreSupport/EditorClientQt.h
r73886 r78532 80 80 virtual void clearUndoRedoOperations(); 81 81 82 virtual bool canCopyCut(bool defaultValue) const; 83 virtual bool canPaste(bool defaultValue) const; 82 84 virtual bool canUndo() const; 83 85 virtual bool canRedo() const; -
trunk/Source/WebKit/win/ChangeLog
r78498 r78532 1 2011-02-07 Ryosuke Niwa <rniwa@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard 6 https://bugs.webkit.org/show_bug.cgi?id=52417 7 8 Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently 9 not implemented. 10 11 * WebCoreSupport/WebEditorClient.cpp: 12 (WebEditorClient::canCopyCut): Added. 13 (WebEditorClient::canPaste): Added. 14 * WebCoreSupport/WebEditorClient.h: 15 1 16 2011-02-14 Brian Weinstein <bweinstein@apple.com> 2 17 -
trunk/Source/WebKit/win/WebCoreSupport/WebEditorClient.cpp
r73088 r78532 570 570 } 571 571 572 bool WebEditorClient::canCopyCut(bool defaultValue) const 573 { 574 return defaultValue; 575 } 576 577 bool WebEditorClient::canPaste(bool defaultValue) const 578 { 579 return defaultValue; 580 } 581 572 582 bool WebEditorClient::canUndo() const 573 583 { -
trunk/Source/WebKit/win/WebCoreSupport/WebEditorClient.h
r73886 r78532 82 82 void clearUndoRedoOperations(); 83 83 84 bool canCopyCut(bool defaultValue) const; 85 bool canPaste(bool defaultValue) const; 84 86 bool canUndo() const; 85 87 bool canRedo() const; -
trunk/Source/WebKit/wince/ChangeLog
r78342 r78532 1 2011-02-07 Ryosuke Niwa <rniwa@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard 6 https://bugs.webkit.org/show_bug.cgi?id=52417 7 8 Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently 9 not implemented. 10 11 * WebCoreSupport/EditorClientWinCE.cpp: 12 (WebKit::EditorClientWinCE::canCopyCut): Added. 13 (WebKit::EditorClientWinCE::canPaste): Added. 14 * WebCoreSupport/EditorClientWinCE.h: 15 1 16 2011-02-10 Nate Chapin <japhet@chromium.org> 2 17 -
trunk/Source/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp
r74566 r78532 164 164 { 165 165 notImplemented(); 166 } 167 168 bool EditorClientWinCE::canCopyCut(bool defaultValue) const 169 { 170 return defaultValue; 171 } 172 173 bool EditorClientWinCE::canPaste(bool defaultValue) const 174 { 175 return defaultValue; 166 176 } 167 177 -
trunk/Source/WebKit/wince/WebCoreSupport/EditorClientWinCE.h
r73886 r78532 71 71 virtual void clearUndoRedoOperations(); 72 72 73 virtual bool canCopyCut(bool defaultValue) const; 74 virtual bool canPaste(bool defaultValue) const; 73 75 virtual bool canUndo() const; 74 76 virtual bool canRedo() const; -
trunk/Source/WebKit/wx/ChangeLog
r78342 r78532 1 2011-02-07 Ryosuke Niwa <rniwa@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard 6 https://bugs.webkit.org/show_bug.cgi?id=52417 7 8 Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently 9 not implemented. 10 11 * WebKitSupport/EditorClientWx.cpp: 12 (WebCore::EditorClientWx::canCopyCut): Added. 13 (WebCore::EditorClientWx::canPaste): Added. 14 * WebKitSupport/EditorClientWx.h: 15 1 16 2011-02-10 Nate Chapin <japhet@chromium.org> 2 17 -
trunk/Source/WebKit/wx/WebKitSupport/EditorClientWx.cpp
r73088 r78532 326 326 } 327 327 328 bool EditorClientWx::canCopyCut(bool defaultValue) const 329 { 330 return defaultValue; 331 } 332 333 bool EditorClientWx::canPaste(bool defaultValue) const 334 { 335 return defaultValue; 336 } 337 328 338 bool EditorClientWx::canUndo() const 329 339 { -
trunk/Source/WebKit/wx/WebKitSupport/EditorClientWx.h
r73886 r78532 82 82 virtual void clearUndoRedoOperations(); 83 83 84 virtual bool canCopyCut(bool defaultValue) const; 85 virtual bool canPaste(bool defaultValue) const; 84 86 virtual bool canUndo() const; 85 87 virtual bool canRedo() const; -
trunk/Source/WebKit2/ChangeLog
r78526 r78532 1 2011-02-07 Ryosuke Niwa <rniwa@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard 6 https://bugs.webkit.org/show_bug.cgi?id=52417 7 8 Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently 9 not implemented. 10 11 * WebProcess/WebCoreSupport/WebEditorClient.cpp: 12 (WebKit::WebEditorClient::canCopyCut): Added. 13 (WebKit::WebEditorClient::canPaste): Added. 14 * WebProcess/WebCoreSupport/WebEditorClient.h: 15 1 16 2011-02-14 Anders Carlsson <andersca@apple.com> 2 17 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp
r76916 r78532 252 252 } 253 253 254 bool WebEditorClient::canCopyCut(bool defaultValue) const 255 { 256 return defaultValue; 257 } 258 259 bool WebEditorClient::canPaste(bool defaultValue) const 260 { 261 return defaultValue; 262 } 263 254 264 bool WebEditorClient::canUndo() const 255 265 { -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.h
r75523 r78532 75 75 virtual void clearUndoRedoOperations(); 76 76 77 virtual bool canCopyCut(bool defaultValue) const; 78 virtual bool canPaste(bool defaultValue) const; 77 79 virtual bool canUndo() const; 78 80 virtual bool canRedo() const;
Note: See TracChangeset
for help on using the changeset viewer.