Changeset 71388 in webkit
- Timestamp:
- Nov 4, 2010 9:31:22 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r71387 r71388 1 2010-10-20 Chang Shu <chang.shu@nokia.com>, Antonio Gomes <tonikitoo@webkit.org> 2 3 Reviewed by Simon Fraser. 4 5 [Qt] Makes <input type=text> and <textarea> functional with 6 Spatial Navigation enabled. Before this patch, the focus cannot 7 move away from input box once it is in. This patch allows focus 8 move to neighbor nodes when the caret reaches the edge of the texts. 9 This patch does not support yet cases where the focused <input> 10 has a JS handler for the arrow keys. 11 https://bugs.webkit.org/show_bug.cgi?id=37153 12 13 * fast/events/spatial-navigation/snav-input-expected.txt: Added. 14 * fast/events/spatial-navigation/snav-input.html: Added. 15 * fast/events/spatial-navigation/snav-textarea-expected.txt: Added. 16 * fast/events/spatial-navigation/snav-textarea.html: Added. 17 1 18 2010-11-04 Martin Robinson <mrobinson@igalia.com> 2 19 -
trunk/LayoutTests/platform/gtk/Skipped
r71387 r71388 4967 4967 fast/loader/crash-copying-backforwardlist.html 4968 4968 4969 # Spatial Navigation 4969 4970 # https://bugs.webkit.org/show_bug.cgi?id=47587 4970 4971 fast/events/spatial-navigation/snav-iframe-flattening-simple.html 4972 # https://bugs.webkit.org/show_bug.cgi?id=49056 4973 fast/events/spatial-navigation/snav-input.html 4974 fast/events/spatial-navigation/snav-textarea.html 4971 4975 4972 4976 # Implement LayoutTestController::callShouldCloseOnWebView() -
trunk/WebCore/ChangeLog
r71386 r71388 1 2010-10-20 Chang Shu <chang.shu@nokia.com>, Antonio Gomes <tonikitoo@webkit.org> 2 3 Reviewed by Simon Fraser. 4 5 [Qt] Makes <input type=text> and <textarea> functional with 6 Spatial Navigation enabled. Before this patch, the focus cannot 7 move away from input box once it is in. This patch allows focus 8 move to neighbor nodes when the caret reaches the edge of the texts. 9 This patch does not support yet cases where the focused <input> 10 has a JS handler for the arrow keys. 11 https://bugs.webkit.org/show_bug.cgi?id=37153 12 13 Tests: fast/events/spatial-navigation/snav-input.html 14 fast/events/spatial-navigation/snav-textarea.html 15 16 * editing/EditorCommand.cpp: 17 (WebCore::executeMoveDown): 18 (WebCore::executeMoveLeft): 19 (WebCore::executeMoveRight): 20 (WebCore::executeMoveUp): 21 * editing/SelectionController.cpp: 22 (WebCore::SelectionController::modify): 23 1 24 2010-11-04 Dan Bernstein <mitz@apple.com> 2 25 -
trunk/WebCore/editing/EditorCommand.cpp
r71385 r71388 619 619 static bool executeMoveDown(Frame* frame, Event*, EditorCommandSource, const String&) 620 620 { 621 frame->selection()->modify(SelectionController::AlterationMove, SelectionController::DirectionForward, LineGranularity, true); 622 return true; 621 return frame->selection()->modify(SelectionController::AlterationMove, SelectionController::DirectionForward, LineGranularity, true); 623 622 } 624 623 … … 643 642 static bool executeMoveLeft(Frame* frame, Event*, EditorCommandSource, const String&) 644 643 { 645 frame->selection()->modify(SelectionController::AlterationMove, SelectionController::DirectionLeft, CharacterGranularity, true); 646 return true; 644 return frame->selection()->modify(SelectionController::AlterationMove, SelectionController::DirectionLeft, CharacterGranularity, true); 647 645 } 648 646 … … 687 685 static bool executeMoveRight(Frame* frame, Event*, EditorCommandSource, const String&) 688 686 { 689 frame->selection()->modify(SelectionController::AlterationMove, SelectionController::DirectionRight, CharacterGranularity, true); 690 return true; 687 return frame->selection()->modify(SelectionController::AlterationMove, SelectionController::DirectionRight, CharacterGranularity, true); 691 688 } 692 689 … … 807 804 static bool executeMoveUp(Frame* frame, Event*, EditorCommandSource, const String&) 808 805 { 809 frame->selection()->modify(SelectionController::AlterationMove, SelectionController::DirectionBackward, LineGranularity, true); 810 return true; 806 return frame->selection()->modify(SelectionController::AlterationMove, SelectionController::DirectionBackward, LineGranularity, true); 811 807 } 812 808 -
trunk/WebCore/editing/SelectionController.cpp
r70143 r71388 643 643 willBeModified(alter, direction); 644 644 645 bool wasRange = m_selection.isRange(); 646 Position originalStartPosition = m_selection.start(); 645 647 VisiblePosition position; 646 648 switch (direction) { … … 673 675 if (position.isNull()) 674 676 return false; 677 678 if (m_frame && m_frame->settings() && m_frame->settings()->isSpatialNavigationEnabled()) 679 if (!wasRange && alter == AlterationMove && position == originalStartPosition) 680 return false; 675 681 676 682 // Some of the above operations set an xPosForVerticalArrowNavigation. -
trunk/WebKit/qt/ChangeLog
r71352 r71388 1 2010-10-20 Chang Shu <chang.shu@nokia.com>, Antonio Gomes <tonikitoo@webkit.org> 2 3 Reviewed by Simon Fraser. 4 5 [Qt] Makes <input type=text> and <textarea> functional with 6 Spatial Navigation enabled. Before this patch, the focus cannot 7 move away from input box once it is in. This patch allows focus 8 move to neighbor nodes when the caret reaches the edge of the texts. 9 This patch does not support yet cases where the focused <input> 10 has a JS handler for the arrow keys. 11 https://bugs.webkit.org/show_bug.cgi?id=37153 12 13 * WebCoreSupport/EditorClientQt.cpp: 14 (WebCore::EditorClientQt::handleKeyboardEvent): 15 1 16 2010-11-04 Kenneth Rohde Christiansen <kenneth@webkit.org> 2 17 -
trunk/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
r69582 r71388 47 47 #include "QWebPageClient.h" 48 48 #include "Range.h" 49 #include "Settings.h" 49 50 #include "WindowsKeyboardCodes.h" 50 51 #include "qwebpage.h" … … 361 362 // FIXME: refactor all of this to use Actions or something like them 362 363 if (start->isContentEditable()) { 364 bool doSpatialNavigation = false; 365 if (frame->settings() && frame->settings()->isSpatialNavigationEnabled()) { 366 if (!kevent->modifiers()) { 367 switch (kevent->windowsVirtualKeyCode()) { 368 case VK_LEFT: 369 case VK_RIGHT: 370 case VK_UP: 371 case VK_DOWN: 372 doSpatialNavigation = true; 373 } 374 } 375 } 363 376 #ifndef QT_NO_SHORTCUT 364 377 QWebPage::WebAction action = QWebPagePrivate::editorActionForKeyEvent(kevent->qtEvent()); 365 if (action != QWebPage::NoWebAction ) {378 if (action != QWebPage::NoWebAction && !doSpatialNavigation) { 366 379 const char* cmd = QWebPagePrivate::editorCommandForWebActions(action); 367 380 // WebKit doesn't have enough information about mode to decide how commands that just insert text if executed via Editor should be treated, … … 387 400 if (kevent->shiftKey()) 388 401 frame->editor()->command("MoveLeftAndModifySelection").execute(); 389 else 390 frame->editor()->command("MoveLeft").execute();402 else if (!frame->editor()->command("MoveLeft").execute()) 403 return; 391 404 break; 392 405 case VK_RIGHT: 393 406 if (kevent->shiftKey()) 394 407 frame->editor()->command("MoveRightAndModifySelection").execute(); 395 else 396 frame->editor()->command("MoveRight").execute();408 else if (!frame->editor()->command("MoveRight").execute()) 409 return; 397 410 break; 398 411 case VK_UP: 399 412 if (kevent->shiftKey()) 400 413 frame->editor()->command("MoveUpAndModifySelection").execute(); 401 else 402 frame->editor()->command("MoveUp").execute();414 else if (!frame->editor()->command("MoveUp").execute()) 415 return; 403 416 break; 404 417 case VK_DOWN: 405 418 if (kevent->shiftKey()) 406 419 frame->editor()->command("MoveDownAndModifySelection").execute(); 407 else 408 frame->editor()->command("MoveDown").execute();420 else if (!frame->editor()->command("MoveDown").execute()) 421 return; 409 422 break; 410 423 case VK_PRIOR: // PageUp
Note: See TracChangeset
for help on using the changeset viewer.