Changeset 74235 in webkit
- Timestamp:
- Dec 17, 2010 12:23:56 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r74234 r74235 1 2010-12-17 Eric Seidel <eric@webkit.org> 2 3 Unreviewed, rolling out r74229. 4 http://trac.webkit.org/changeset/74229 5 https://bugs.webkit.org/show_bug.cgi?id=50536 6 7 Broken on Snow Leopard and possibly other platforms 8 9 * platform/gtk/editing/selection/caret-mode-paragraph-keys-navigation-expected.txt: Renamed from LayoutTests/editing/selection/caret-mode-paragraph-keys-navigation-expected.txt. 10 * platform/gtk/editing/selection/caret-mode-paragraph-keys-navigation.html: Renamed from LayoutTests/editing/selection/caret-mode-paragraph-keys-navigation.html. 11 * platform/mac/Skipped: 12 * platform/win/Skipped: 13 1 14 2010-12-15 Andrey Kosyakov <caseq@chromium.org> 2 15 -
trunk/LayoutTests/platform/gtk/editing/selection/caret-mode-paragraph-keys-navigation-expected.txt
r74234 r74235 1 This tests that arrow keys navigate through a paragraph as expected when in caret browsingmode, also with shift and ctrl modifiers.1 This tests that keys navigation through a paragraph work as expected when in caret mode, also with shift and ctrl modifiers. 2 2 3 3 This tests that keys navigation through a paragraph work as expected when in caret mode, also with shift and ctrl modifiers. … … 13 13 PASS getSelection().baseOffset is 15 14 14 PASS getSelection().extentOffset is 17 15 PASS getSelection().baseOffset is 2 115 PASS getSelection().baseOffset is 20 16 16 PASS getSelection().baseOffset is 16 17 17 PASS getSelection().baseOffset is 16 18 PASS getSelection().extentOffset is 26 19 PASS getSelection().baseOffset is 22 18 PASS getSelection().extentOffset is 31 19 PASS getSelection().baseOffset is 21 20 PASS getSelection().baseOffset is 0 21 PASS getSelection().extentOffset is 0 22 PASS getSelection().baseOffset is 124 23 PASS getSelection().extentOffset is 124 24 PASS getSelection().baseOffset is 124 25 PASS getSelection().extentOffset is 0 20 26 PASS successfullyParsed is true 21 27 -
trunk/LayoutTests/platform/gtk/editing/selection/caret-mode-paragraph-keys-navigation.html
r74234 r74235 6 6 var successfullyParsed = false; 7 7 </script> 8 <script src="../../ fast/js/resources/js-test-pre.js"></script>8 <script src="../../../../fast/js/resources/js-test-pre.js"></script> 9 9 </head> 10 10 <body> 11 <p id="target">This tests that arrow keys navigate through a paragraph as expected when in caret browsingmode, also with shift and ctrl modifiers.</p>11 <p id="target">This tests that keys navigation through a paragraph work as expected when in caret mode, also with shift and ctrl modifiers.</p> 12 12 <p id="description"></p> 13 13 <div id="console"></div> … … 42 42 // check left/right arrows + Ctrl 43 43 eventSender.keyDown("rightArrow", ["ctrlKey"]); 44 shouldBe("getSelection().baseOffset", "2 1");44 shouldBe("getSelection().baseOffset", "20"); 45 45 eventSender.keyDown("leftArrow", ["ctrlKey"]); 46 46 shouldBe("getSelection().baseOffset", "16"); … … 50 50 eventSender.keyDown("rightArrow", ["ctrlKey", "shiftKey"]); 51 51 shouldBe("getSelection().baseOffset", "16"); 52 shouldBe("getSelection().extentOffset", " 26");52 shouldBe("getSelection().extentOffset", "31"); 53 53 eventSender.keyDown("leftArrow", ["ctrlKey"]); 54 shouldBe("getSelection().baseOffset", "22"); 54 shouldBe("getSelection().baseOffset", "21"); 55 56 // check home/end keys both for caret and range selections 57 eventSender.keyDown("home"); 58 shouldBe("getSelection().baseOffset", "0"); 59 shouldBe("getSelection().extentOffset", "0"); 60 eventSender.keyDown("end"); 61 shouldBe("getSelection().baseOffset", "124"); 62 shouldBe("getSelection().extentOffset", "124"); 63 eventSender.keyDown("home", ["shiftKey"]); 64 shouldBe("getSelection().baseOffset", "124"); 65 shouldBe("getSelection().extentOffset", "0"); 55 66 } 56 67 57 68 successfullyParsed = true; 58 69 </script> 59 <script src="../../ fast/js/resources/js-test-post.js"></script>70 <script src="../../../../fast/js/resources/js-test-post.js"></script> 60 71 </body> 61 72 </html> -
trunk/LayoutTests/platform/mac/Skipped
r74229 r74235 278 278 # Very flaky: https://bugs.webkit.org/show_bug.cgi?id=49182 279 279 animations/stop-animation-on-suspend.html 280 281 # DRT does not support toggling caret browsing on / off282 LayoutTests/editing/selection/caret-mode-paragraph-keys-navigation.html -
trunk/LayoutTests/platform/win/Skipped
r74229 r74235 1103 1103 fast/loader/user-stylesheet-fast-path.html 1104 1104 1105 # DRT does not support toggling caret browsing on / off1106 LayoutTests/editing/selection/caret-mode-paragraph-keys-navigation.html -
trunk/WebKit/qt/ChangeLog
r74229 r74235 1 2010-12-17 Eric Seidel <eric@webkit.org> 2 3 Unreviewed, rolling out r74229. 4 http://trac.webkit.org/changeset/74229 5 https://bugs.webkit.org/show_bug.cgi?id=50536 6 7 Broken on Snow Leopard and possibly other platforms 8 9 * WebCoreSupport/EditorClientQt.cpp: 10 (WebCore::EditorClientQt::handleKeyboardEvent): 11 1 12 2010-12-05 Antonio Gomes <agomes@rim.com> 2 13 -
trunk/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
r74229 r74235 350 350 { 351 351 Frame* frame = m_page->d->page->focusController()->focusedOrMainFrame(); 352 if (!frame )352 if (!frame || !frame->document()->focusedNode()) 353 353 return; 354 354 … … 375 375 } 376 376 } 377 378 377 #ifndef QT_NO_SHORTCUT 379 378 QWebPage::WebAction action = QWebPagePrivate::editorActionForKeyEvent(kevent->qtEvent()); … … 468 467 } 469 468 } else { 470 if (m_page->handle()->page->settings()->caretBrowsingEnabled()) {471 switch (kevent->windowsVirtualKeyCode()) {472 case VK_LEFT:473 if (kevent->shiftKey() && kevent->ctrlKey())474 frame->editor()->command("MoveWordBackwardAndModifySelection").execute();475 else if (kevent->shiftKey())476 frame->editor()->command("MoveLeftAndModifySelection").execute();477 else if (kevent->ctrlKey())478 frame->editor()->command("MoveWordBackward").execute();479 else480 frame->editor()->command("MoveLeft").execute();481 break;482 case VK_RIGHT:483 if (kevent->shiftKey() && kevent->ctrlKey())484 frame->editor()->command("MoveWordForwardAndModifySelection").execute();485 else if (kevent->shiftKey())486 frame->editor()->command("MoveRightAndModifySelection").execute();487 else if (kevent->ctrlKey())488 frame->editor()->command("MoveWordForward").execute();489 else490 frame->editor()->command("MoveRight").execute();491 break;492 case VK_UP:493 if (kevent->shiftKey())494 frame->editor()->command("MoveUpAndModifySelection").execute();495 else496 frame->editor()->command("MoveUp").execute();497 break;498 case VK_DOWN:499 if (kevent->shiftKey())500 frame->editor()->command("MoveDownAndModifySelection").execute();501 else502 frame->editor()->command("MoveDown").execute();503 break;504 case VK_PRIOR: // PageUp505 frame->editor()->command("MovePageUp").execute();506 break;507 case VK_NEXT: // PageDown508 frame->editor()->command("MovePageDown").execute();509 break;510 case VK_HOME:511 if (kevent->shiftKey())512 frame->editor()->command("MoveToBeginningOfLineAndModifySelection").execute();513 else514 frame->editor()->command("MoveToBeginningOfLine").execute();515 break;516 case VK_END:517 if (kevent->shiftKey())518 frame->editor()->command("MoveToEndOfLineAndModifySelection").execute();519 else520 frame->editor()->command("MoveToEndOfLine").execute();521 break;522 default:523 break;524 }525 }526 469 #ifndef QT_NO_SHORTCUT 527 470 if (kevent->qtEvent() == QKeySequence::Copy)
Note: See TracChangeset
for help on using the changeset viewer.