Changeset 89050 in webkit
- Timestamp:
- Jun 16, 2011 11:23:36 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r89049 r89050 1 2011-06-16 Chang Shu <cshu@webkit.org> 2 3 Reviewed by Sam Weinig. 4 5 [Qt] [WK2] Qt WebKit2 needs undo/redo support 6 https://bugs.webkit.org/show_bug.cgi?id=62637 7 8 Unskip passed tests. 9 10 * platform/qt-wk2/Skipped: 11 1 12 2011-06-16 Vsevolod Vlasov <vsevik@chromium.org> 2 13 -
trunk/LayoutTests/platform/qt-wk2/Skipped
r89022 r89050 200 200 editing/selection/word-granularity.html 201 201 editing/spelling/context-menu-suggestions.html 202 editing/undo/undo-deleteWord.html203 editing/undo/undo-smart-delete-reversed-selection.html204 editing/undo/undo-smart-delete-word.html205 202 fast/blockflow/horizontal-bt-replaced-selection.html 206 203 fast/blockflow/japanese-lr-selection.html … … 1298 1295 editing/style/typing-style-003.html 1299 1296 editing/text-iterator/thai-cursor-movement.html 1300 editing/undo/replace-by-span-then-remove.html1301 1297 editing/deleting/5168598.html 1302 1298 editing/deleting/delete-line-011.html … … 1749 1745 fast/dom/Window/window-resize-and-move-arguments.html 1750 1746 fast/dom/Window/window-resize.html 1751 1752 # WebKit2 needs undo/redo support1753 editing/undo/remove-css-property-and-remove-style.html1754 editing/deleting/delete-and-undo.html1755 editing/execCommand/convert-style-elements-to-spans.html1756 editing/inserting/redo.html1757 editing/undo/4063751.html1758 editing/undo/5378473.html1759 editing/undo/redo-split-text-node.html1760 editing/undo/redo-split-text-with-removal.html1761 editing/undo/redo-style.html1762 editing/undo/redo-typing-001.html1763 editing/undo/undo-combined-delete-boundary.html1764 editing/undo/undo-combined-delete.html1765 editing/undo/undo-delete-boundary.html1766 editing/undo/undo-delete.html1767 editing/undo/undo-forward-delete-boundary.html1768 editing/undo/undo-forward-delete.html1769 editing/undo/undo-iframe-location-change.html1770 editing/undo/undo-indent.html1771 editing/undo/undo-misspellings.html1772 editing/undo/undo-typing-001.html1773 1747 1774 1748 # WebKit2 needs to define a default charset (Settings::defaultTextEncodingName) … … 2969 2943 tables/mozilla_expected_failures/dom/insertTbodyExpand1.html 2970 2944 tables/mozilla_expected_failures/dom/insertTbodyRebuild1.html 2945 editing/deleting/delete-and-undo.html 2971 2946 2972 2947 # [Qt][WK2]http/tests/loading/preload-append-scan.php fails … … 3018 2993 # fail after http://trac.webkit.org/changeset/87067 3019 2994 fast/forms/textfield-overflow.html 3020 3021 # new test inroduced in r87204, but fail3022 editing/undo/undo-after-setting-value.html3023 2995 3024 2996 # unskipped by r88152, but fail on Qt-WK2 platform -
trunk/Source/WebKit2/ChangeLog
r89045 r89050 1 2011-06-16 Chang Shu <cshu@webkit.org> 2 3 Reviewed by Sam Weinig. 4 5 [Qt] [WK2] Qt WebKit2 needs undo/redo support 6 https://bugs.webkit.org/show_bug.cgi?id=62637 7 8 Implement undo/redo support for document.execCommand(). 9 10 * UIProcess/API/qt/qwkpage.cpp: 11 (QWKPagePrivate::QWKPagePrivate): 12 (QWKPagePrivate::~QWKPagePrivate): 13 (QWKPagePrivate::registerEditCommand): 14 (QWKPagePrivate::clearAllEditCommands): 15 (QWKPagePrivate::canUndoRedo): 16 (QWKPagePrivate::executeUndoRedo): 17 * UIProcess/API/qt/qwkpage_p.h: 18 * UIProcess/qt/WebUndoCommandQt.cpp: Added. 19 (WebUndoCommandQt::WebUndoCommandQt): 20 (WebUndoCommandQt::~WebUndoCommandQt): 21 (WebUndoCommandQt::redo): 22 (WebUndoCommandQt::undo): 23 * UIProcess/qt/WebUndoCommandQt.h: Added. 24 (WebUndoCommandQt::inUndoRedo): 25 * WebKit2.pro: 26 1 27 2011-06-16 Anders Carlsson <andersca@apple.com> 2 28 -
trunk/Source/WebKit2/UIProcess/API/qt/qwkpage.cpp
r88880 r89050 42 42 #include "WebContext.h" 43 43 #include "WebContextMenuProxyQt.h" 44 #include "WebEditCommandProxy.h" 44 45 #include "WebEventFactoryQt.h" 45 46 #include "WebPopupMenuProxyQt.h" 47 #include "WebUndoCommandQt.h" 46 48 #include "WKStringQt.h" 47 49 #include "WKURLQt.h" … … 52 54 #include <QStyle> 53 55 #include <QTouchEvent> 56 #include <QUndoStack> 54 57 #include <QtDebug> 55 58 #include <WebCore/Cursor.h> … … 97 100 , backingStoreType(QGraphicsWKView::Simple) 98 101 , isConnectedToEngine(true) 102 #ifndef QT_NO_UNDOSTACK 103 , undoStack(adoptPtr(new QUndoStack(qq))) 104 #endif 99 105 { 100 106 memset(actions, 0, sizeof(actions)); … … 207 213 } 208 214 209 void QWKPagePrivate::registerEditCommand(PassRefPtr<WebEditCommandProxy>, WebPageProxy::UndoOrRedo) 210 { 215 void QWKPagePrivate::registerEditCommand(PassRefPtr<WebEditCommandProxy> command, WebPageProxy::UndoOrRedo undoOrRedo) 216 { 217 #ifndef QT_NO_UNDOSTACK 218 if (undoOrRedo == WebPageProxy::Undo) { 219 const WebUndoCommandQt* webUndoCommand = static_cast<const WebUndoCommandQt*>(undoStack->command(undoStack->index())); 220 if (webUndoCommand && webUndoCommand->inUndoRedo()) 221 return; 222 undoStack->push(new WebUndoCommandQt(command)); 223 } 224 #endif 211 225 } 212 226 213 227 void QWKPagePrivate::clearAllEditCommands() 214 228 { 215 } 216 217 bool QWKPagePrivate::canUndoRedo(WebPageProxy::UndoOrRedo) 218 { 229 #ifndef QT_NO_UNDOSTACK 230 undoStack->clear(); 231 #endif 232 } 233 234 bool QWKPagePrivate::canUndoRedo(WebPageProxy::UndoOrRedo undoOrRedo) 235 { 236 #ifdef QT_NO_UNDOSTACK 219 237 return false; 220 } 221 222 void QWKPagePrivate::executeUndoRedo(WebPageProxy::UndoOrRedo) 223 { 238 #else 239 if (undoOrRedo == WebPageProxy::Undo) 240 return undoStack->canUndo(); 241 return undoStack->canRedo(); 242 #endif 243 } 244 245 void QWKPagePrivate::executeUndoRedo(WebPageProxy::UndoOrRedo undoOrRedo) 246 { 247 #ifndef QT_NO_UNDOSTACK 248 if (undoOrRedo == WebPageProxy::Undo) 249 undoStack->undo(); 250 else 251 undoStack->redo(); 252 #endif 224 253 } 225 254 -
trunk/Source/WebKit2/UIProcess/API/qt/qwkpage_p.h
r88880 r89050 35 35 36 36 class QGraphicsWKView; 37 class QUndoStack; 37 38 class QWKPreferences; 38 39 … … 139 140 140 141 bool isConnectedToEngine; 142 143 #ifndef QT_NO_UNDOSTACK 144 OwnPtr<QUndoStack> undoStack; 145 #endif 141 146 }; 142 147 -
trunk/Source/WebKit2/WebKit2.pro
r88960 r89050 233 233 UIProcess/WebResourceLoadClient.h \ 234 234 UIProcess/WebUIClient.h \ 235 UIProcess/qt/WebUndoCommandQt.h \ 235 236 UIProcess/qt/WebContextMenuProxyQt.h \ 236 237 UIProcess/qt/WebPopupMenuProxyQt.h \ … … 392 393 UIProcess/DrawingAreaProxy.cpp \ 393 394 UIProcess/DrawingAreaProxyImpl.cpp \ 395 UIProcess/qt/WebUndoCommandQt.cpp \ 394 396 UIProcess/FindIndicator.cpp \ 395 397 UIProcess/GeolocationPermissionRequestManagerProxy.cpp \
Note: See TracChangeset
for help on using the changeset viewer.