Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Side by Side Diff: Source/core/editing/EditorCommand.cpp

Issue 17828002: Add Ctrl+(+Shift)+Up/Down key bindings for Windows (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2013-06-27T14:50:09 Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/WebKit/chromium/src/EditorClientImpl.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2009 Igalia S.L. 4 * Copyright (C) 2009 Igalia S.L.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 frame->selection()->modify(FrameSelection::AlterationMove, DirectionForward, ParagraphBoundary, UserTriggered); 792 frame->selection()->modify(FrameSelection::AlterationMove, DirectionForward, ParagraphBoundary, UserTriggered);
793 return true; 793 return true;
794 } 794 }
795 795
796 static bool executeMoveToEndOfParagraphAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&) 796 static bool executeMoveToEndOfParagraphAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&)
797 { 797 {
798 frame->selection()->modify(FrameSelection::AlterationExtend, DirectionForwar d, ParagraphBoundary, UserTriggered); 798 frame->selection()->modify(FrameSelection::AlterationExtend, DirectionForwar d, ParagraphBoundary, UserTriggered);
799 return true; 799 return true;
800 } 800 }
801 801
802 static bool executeMoveParagraphBackward(Frame* frame, Event*, EditorCommandSour ce, const String&)
803 {
804 frame->selection()->modify(FrameSelection::AlterationMove, DirectionBackward , ParagraphGranularity, UserTriggered);
805 return true;
806 }
807
802 static bool executeMoveParagraphBackwardAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&) 808 static bool executeMoveParagraphBackwardAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&)
803 { 809 {
804 frame->selection()->modify(FrameSelection::AlterationExtend, DirectionBackwa rd, ParagraphGranularity, UserTriggered); 810 frame->selection()->modify(FrameSelection::AlterationExtend, DirectionBackwa rd, ParagraphGranularity, UserTriggered);
805 return true; 811 return true;
806 } 812 }
807 813
814 static bool executeMoveParagraphForward(Frame* frame, Event*, EditorCommandSourc e, const String&)
815 {
816 frame->selection()->modify(FrameSelection::AlterationMove, DirectionForward, ParagraphGranularity, UserTriggered);
817 return true;
818 }
819
808 static bool executeMoveParagraphForwardAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&) 820 static bool executeMoveParagraphForwardAndModifySelection(Frame* frame, Event*, EditorCommandSource, const String&)
809 { 821 {
810 frame->selection()->modify(FrameSelection::AlterationExtend, DirectionForwar d, ParagraphGranularity, UserTriggered); 822 frame->selection()->modify(FrameSelection::AlterationExtend, DirectionForwar d, ParagraphGranularity, UserTriggered);
811 return true; 823 return true;
812 } 824 }
813 825
814 static bool executeMoveUp(Frame* frame, Event*, EditorCommandSource, const Strin g&) 826 static bool executeMoveUp(Frame* frame, Event*, EditorCommandSource, const Strin g&)
815 { 827 {
816 return frame->selection()->modify(FrameSelection::AlterationMove, DirectionB ackward, LineGranularity, UserTriggered); 828 return frame->selection()->modify(FrameSelection::AlterationMove, DirectionB ackward, LineGranularity, UserTriggered);
817 } 829 }
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
1498 { "MoveDown", { executeMoveDown, supportedFromMenuOrKeyBinding, enabledI nEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllow ExecutionWhenDisabled } }, 1510 { "MoveDown", { executeMoveDown, supportedFromMenuOrKeyBinding, enabledI nEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllow ExecutionWhenDisabled } },
1499 { "MoveDownAndModifySelection", { executeMoveDownAndModifySelection, sup portedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, v alueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 1511 { "MoveDownAndModifySelection", { executeMoveDownAndModifySelection, sup portedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, v alueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
1500 { "MoveForward", { executeMoveForward, supportedFromMenuOrKeyBinding, en abledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNo tAllowExecutionWhenDisabled } }, 1512 { "MoveForward", { executeMoveForward, supportedFromMenuOrKeyBinding, en abledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNo tAllowExecutionWhenDisabled } },
1501 { "MoveForwardAndModifySelection", { executeMoveForwardAndModifySelectio n, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateN one, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 1513 { "MoveForwardAndModifySelection", { executeMoveForwardAndModifySelectio n, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateN one, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
1502 { "MoveLeft", { executeMoveLeft, supportedFromMenuOrKeyBinding, enabledI nEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllow ExecutionWhenDisabled } }, 1514 { "MoveLeft", { executeMoveLeft, supportedFromMenuOrKeyBinding, enabledI nEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllow ExecutionWhenDisabled } },
1503 { "MoveLeftAndModifySelection", { executeMoveLeftAndModifySelection, sup portedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, v alueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 1515 { "MoveLeftAndModifySelection", { executeMoveLeftAndModifySelection, sup portedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, v alueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
1504 { "MovePageDown", { executeMovePageDown, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecuti onWhenDisabled } }, 1516 { "MovePageDown", { executeMovePageDown, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecuti onWhenDisabled } },
1505 { "MovePageDownAndModifySelection", { executeMovePageDownAndModifySelect ion, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNul l, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 1517 { "MovePageDownAndModifySelection", { executeMovePageDownAndModifySelect ion, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNul l, notTextInsertion, doNotAllowExecutionWhenDisabled } },
1506 { "MovePageUp", { executeMovePageUp, supportedFromMenuOrKeyBinding, enab ledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWh enDisabled } }, 1518 { "MovePageUp", { executeMovePageUp, supportedFromMenuOrKeyBinding, enab ledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWh enDisabled } },
1507 { "MovePageUpAndModifySelection", { executeMovePageUpAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNull, n otTextInsertion, doNotAllowExecutionWhenDisabled } }, 1519 { "MovePageUpAndModifySelection", { executeMovePageUpAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNull, n otTextInsertion, doNotAllowExecutionWhenDisabled } },
1520 { "MoveParagraphBackward", { executeMoveParagraphBackward, supportedFrom MenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, no tTextInsertion, doNotAllowExecutionWhenDisabled } },
1508 { "MoveParagraphBackwardAndModifySelection", { executeMoveParagraphBackw ardAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrC aretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDis abled } }, 1521 { "MoveParagraphBackwardAndModifySelection", { executeMoveParagraphBackw ardAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrC aretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDis abled } },
1522 { "MoveParagraphForward", { executeMoveParagraphForward, supportedFromMe nuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notT extInsertion, doNotAllowExecutionWhenDisabled } },
1509 { "MoveParagraphForwardAndModifySelection", { executeMoveParagraphForwar dAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCar etBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisab led } }, 1523 { "MoveParagraphForwardAndModifySelection", { executeMoveParagraphForwar dAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCar etBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisab led } },
1510 { "MoveRight", { executeMoveRight, supportedFromMenuOrKeyBinding, enable dInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAll owExecutionWhenDisabled } }, 1524 { "MoveRight", { executeMoveRight, supportedFromMenuOrKeyBinding, enable dInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAll owExecutionWhenDisabled } },
1511 { "MoveRightAndModifySelection", { executeMoveRightAndModifySelection, s upportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 1525 { "MoveRightAndModifySelection", { executeMoveRightAndModifySelection, s upportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
1512 { "MoveToBeginningOfDocument", { executeMoveToBeginningOfDocument, suppo rtedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, value Null, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 1526 { "MoveToBeginningOfDocument", { executeMoveToBeginningOfDocument, suppo rtedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, value Null, notTextInsertion, doNotAllowExecutionWhenDisabled } },
1513 { "MoveToBeginningOfDocumentAndModifySelection", { executeMoveToBeginnin gOfDocumentAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSele ctionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutio nWhenDisabled } }, 1527 { "MoveToBeginningOfDocumentAndModifySelection", { executeMoveToBeginnin gOfDocumentAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSele ctionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutio nWhenDisabled } },
1514 { "MoveToBeginningOfLine", { executeMoveToBeginningOfLine, supportedFrom MenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, no tTextInsertion, doNotAllowExecutionWhenDisabled } }, 1528 { "MoveToBeginningOfLine", { executeMoveToBeginningOfLine, supportedFrom MenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, no tTextInsertion, doNotAllowExecutionWhenDisabled } },
1515 { "MoveToBeginningOfLineAndModifySelection", { executeMoveToBeginningOfL ineAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrC aretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDis abled } }, 1529 { "MoveToBeginningOfLineAndModifySelection", { executeMoveToBeginningOfL ineAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrC aretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDis abled } },
1516 { "MoveToBeginningOfParagraph", { executeMoveToBeginningOfParagraph, sup portedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, val ueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 1530 { "MoveToBeginningOfParagraph", { executeMoveToBeginningOfParagraph, sup portedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, val ueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
1517 { "MoveToBeginningOfParagraphAndModifySelection", { executeMoveToBeginni ngOfParagraphAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSe lectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecut ionWhenDisabled } }, 1531 { "MoveToBeginningOfParagraphAndModifySelection", { executeMoveToBeginni ngOfParagraphAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSe lectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecut ionWhenDisabled } },
1518 { "MoveToBeginningOfSentence", { executeMoveToBeginningOfSentence, suppo rtedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, value Null, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 1532 { "MoveToBeginningOfSentence", { executeMoveToBeginningOfSentence, suppo rtedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, value Null, notTextInsertion, doNotAllowExecutionWhenDisabled } },
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1727 return m_command->state(m_frame.get(), triggeringEvent) == TrueTriState ? "true" : "false"; 1741 return m_command->state(m_frame.get(), triggeringEvent) == TrueTriState ? "true" : "false";
1728 return m_command->value(m_frame.get(), triggeringEvent); 1742 return m_command->value(m_frame.get(), triggeringEvent);
1729 } 1743 }
1730 1744
1731 bool Editor::Command::isTextInsertion() const 1745 bool Editor::Command::isTextInsertion() const
1732 { 1746 {
1733 return m_command && m_command->isTextInsertion; 1747 return m_command && m_command->isTextInsertion;
1734 } 1748 }
1735 1749
1736 } // namespace WebCore 1750 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/src/EditorClientImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698