Changeset 74229 in webkit
- Timestamp:
- Dec 16, 2010, 7:36:48 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r74225 r74229 1 2010-12-05 Antonio Gomes <agomes@rim.com> 2 3 Reviewed by Ariya Hidayat. 4 5 [Qt] Fix caret browsing navigation mode 6 https://bugs.webkit.org/show_bug.cgi?id=50536 7 8 /platform/gtk/editing/selection/caret-mode-paragraph-keys-navigation.html 9 is one of the few tests actually tests the caret browsing feature. 10 Patch makes the test not Gtk+ specific, and Qt now passes on it. 11 12 * editing/selection/caret-mode-paragraph-keys-navigation-expected.txt: Renamed from LayoutTests/platform/gtk/editing/selection/caret-mode-paragraph-keys-navigation-expected.txt. 13 * editing/selection/caret-mode-paragraph-keys-navigation.html: Renamed from LayoutTests/platform/gtk/editing/selection/caret-mode-paragraph-keys-navigation.html. 14 * fast/events/multiline-link-arrow-navigation.html: 15 1 16 2010-12-16 Yong Li <yoli@rim.com> 2 17 -
trunk/LayoutTests/editing/selection/caret-mode-paragraph-keys-navigation-expected.txt
r74228 r74229 1 This tests that keys navigation through a paragraph work as expected when in caretmode, also with shift and ctrl modifiers.1 This tests that arrow keys navigate through a paragraph as expected when in caret browsing 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 015 PASS getSelection().baseOffset is 21 16 16 PASS getSelection().baseOffset is 16 17 17 PASS getSelection().baseOffset is 16 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 18 PASS getSelection().extentOffset is 26 19 PASS getSelection().baseOffset is 22 26 20 PASS successfullyParsed is true 27 21 -
trunk/LayoutTests/editing/selection/caret-mode-paragraph-keys-navigation.html
r74228 r74229 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 keys navigation through a paragraph work as expected when in caretmode, also with shift and ctrl modifiers.</p>11 <p id="target">This tests that arrow keys navigate through a paragraph as expected when in caret browsing 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 0");44 shouldBe("getSelection().baseOffset", "21"); 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", " 31");52 shouldBe("getSelection().extentOffset", "26"); 53 53 eventSender.keyDown("leftArrow", ["ctrlKey"]); 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"); 54 shouldBe("getSelection().baseOffset", "22"); 66 55 } 67 56 68 57 successfullyParsed = true; 69 58 </script> 70 <script src="../../ ../../fast/js/resources/js-test-post.js"></script>59 <script src="../../fast/js/resources/js-test-post.js"></script> 71 60 </body> 72 61 </html> -
trunk/LayoutTests/platform/mac/Skipped
r73454 r74229 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 / off 282 LayoutTests/editing/selection/caret-mode-paragraph-keys-navigation.html -
trunk/LayoutTests/platform/win/Skipped
r73987 r74229 1103 1103 fast/loader/user-stylesheet-fast-path.html 1104 1104 1105 # DRT does not support toggling caret browsing on / off 1106 LayoutTests/editing/selection/caret-mode-paragraph-keys-navigation.html -
trunk/WebKit/qt/ChangeLog
r74220 r74229 1 2010-12-05 Antonio Gomes <agomes@rim.com> 2 3 Reviewed by Ariya Hidayat. 4 5 [Qt] Fix caret browsing navigation mode 6 https://bugs.webkit.org/show_bug.cgi?id=50536 7 8 Caret browsing can consume editing commands even when the start 9 of current selection is not a editable content. r69582 missed this 10 case because caret browsing feature testing is very poor today. 11 12 This commit reintroduces part of the removed code in r69582 but 13 guarded by a isCaretBrowsingEnabled() check. No regression found. 14 15 * WebCoreSupport/EditorClientQt.cpp: 16 (WebCore::EditorClientQt::handleKeyboardEvent): 17 1 18 2010-12-16 Ariya Hidayat <ariya@sencha.com> 2 19 -
trunk/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
r73867 r74229 350 350 { 351 351 Frame* frame = m_page->d->page->focusController()->focusedOrMainFrame(); 352 if (!frame || !frame->document()->focusedNode())352 if (!frame) 353 353 return; 354 354 … … 375 375 } 376 376 } 377 377 378 #ifndef QT_NO_SHORTCUT 378 379 QWebPage::WebAction action = QWebPagePrivate::editorActionForKeyEvent(kevent->qtEvent()); … … 467 468 } 468 469 } 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 else 480 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 else 490 frame->editor()->command("MoveRight").execute(); 491 break; 492 case VK_UP: 493 if (kevent->shiftKey()) 494 frame->editor()->command("MoveUpAndModifySelection").execute(); 495 else 496 frame->editor()->command("MoveUp").execute(); 497 break; 498 case VK_DOWN: 499 if (kevent->shiftKey()) 500 frame->editor()->command("MoveDownAndModifySelection").execute(); 501 else 502 frame->editor()->command("MoveDown").execute(); 503 break; 504 case VK_PRIOR: // PageUp 505 frame->editor()->command("MovePageUp").execute(); 506 break; 507 case VK_NEXT: // PageDown 508 frame->editor()->command("MovePageDown").execute(); 509 break; 510 case VK_HOME: 511 if (kevent->shiftKey()) 512 frame->editor()->command("MoveToBeginningOfLineAndModifySelection").execute(); 513 else 514 frame->editor()->command("MoveToBeginningOfLine").execute(); 515 break; 516 case VK_END: 517 if (kevent->shiftKey()) 518 frame->editor()->command("MoveToEndOfLineAndModifySelection").execute(); 519 else 520 frame->editor()->command("MoveToEndOfLine").execute(); 521 break; 522 default: 523 break; 524 } 525 } 469 526 #ifndef QT_NO_SHORTCUT 470 527 if (kevent->qtEvent() == QKeySequence::Copy)
Note:
See TracChangeset
for help on using the changeset viewer.