OLD | NEW |
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 981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
992 return frame.eventHandler().bubblingScroll(ScrollBlockDirectionBackward, Scr
ollByPage); | 992 return frame.eventHandler().bubblingScroll(ScrollBlockDirectionBackward, Scr
ollByPage); |
993 } | 993 } |
994 | 994 |
995 static bool executeScrollPageForward(LocalFrame& frame, Event*, EditorCommandSou
rce, const String&) | 995 static bool executeScrollPageForward(LocalFrame& frame, Event*, EditorCommandSou
rce, const String&) |
996 { | 996 { |
997 return frame.eventHandler().bubblingScroll(ScrollBlockDirectionForward, Scro
llByPage); | 997 return frame.eventHandler().bubblingScroll(ScrollBlockDirectionForward, Scro
llByPage); |
998 } | 998 } |
999 | 999 |
1000 static bool executeScrollLineUp(LocalFrame& frame, Event*, EditorCommandSource,
const String&) | 1000 static bool executeScrollLineUp(LocalFrame& frame, Event*, EditorCommandSource,
const String&) |
1001 { | 1001 { |
1002 return frame.eventHandler().bubblingScroll(ScrollUp, ScrollByLine); | 1002 return frame.eventHandler().bubblingScroll(ScrollUpIgnoringWritingMode, Scro
llByLine); |
1003 } | 1003 } |
1004 | 1004 |
1005 static bool executeScrollLineDown(LocalFrame& frame, Event*, EditorCommandSource
, const String&) | 1005 static bool executeScrollLineDown(LocalFrame& frame, Event*, EditorCommandSource
, const String&) |
1006 { | 1006 { |
1007 return frame.eventHandler().bubblingScroll(ScrollDown, ScrollByLine); | 1007 return frame.eventHandler().bubblingScroll(ScrollDownIgnoringWritingMode, Sc
rollByLine); |
1008 } | 1008 } |
1009 | 1009 |
1010 static bool executeScrollToBeginningOfDocument(LocalFrame& frame, Event*, Editor
CommandSource, const String&) | 1010 static bool executeScrollToBeginningOfDocument(LocalFrame& frame, Event*, Editor
CommandSource, const String&) |
1011 { | 1011 { |
1012 return frame.eventHandler().bubblingScroll(ScrollBlockDirectionBackward, Scr
ollByDocument); | 1012 return frame.eventHandler().bubblingScroll(ScrollBlockDirectionBackward, Scr
ollByDocument); |
1013 } | 1013 } |
1014 | 1014 |
1015 static bool executeScrollToEndOfDocument(LocalFrame& frame, Event*, EditorComman
dSource, const String&) | 1015 static bool executeScrollToEndOfDocument(LocalFrame& frame, Event*, EditorComman
dSource, const String&) |
1016 { | 1016 { |
1017 return frame.eventHandler().bubblingScroll(ScrollBlockDirectionForward, Scro
llByDocument); | 1017 return frame.eventHandler().bubblingScroll(ScrollBlockDirectionForward, Scro
llByDocument); |
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1692 spellChecker().showSpellingGuessPanel(); | 1692 spellChecker().showSpellingGuessPanel(); |
1693 return true; | 1693 return true; |
1694 } | 1694 } |
1695 return command(commandName).execute(); | 1695 return command(commandName).execute(); |
1696 } | 1696 } |
1697 | 1697 |
1698 bool Editor::executeCommand(const String& commandName, const String& value) | 1698 bool Editor::executeCommand(const String& commandName, const String& value) |
1699 { | 1699 { |
1700 // moveToBeginningOfDocument and moveToEndfDocument are only handled by WebK
it for editable nodes. | 1700 // moveToBeginningOfDocument and moveToEndfDocument are only handled by WebK
it for editable nodes. |
1701 if (!canEdit() && commandName == "moveToBeginningOfDocument") | 1701 if (!canEdit() && commandName == "moveToBeginningOfDocument") |
1702 return frame().eventHandler().bubblingScroll(ScrollUp, ScrollByDocument)
; | 1702 return frame().eventHandler().bubblingScroll(ScrollUpIgnoringWritingMode
, ScrollByDocument); |
1703 | 1703 |
1704 if (!canEdit() && commandName == "moveToEndOfDocument") | 1704 if (!canEdit() && commandName == "moveToEndOfDocument") |
1705 return frame().eventHandler().bubblingScroll(ScrollDown, ScrollByDocumen
t); | 1705 return frame().eventHandler().bubblingScroll(ScrollDownIgnoringWritingMo
de, ScrollByDocument); |
1706 | 1706 |
1707 if (commandName == "showGuessPanel") { | 1707 if (commandName == "showGuessPanel") { |
1708 spellChecker().showSpellingGuessPanel(); | 1708 spellChecker().showSpellingGuessPanel(); |
1709 return true; | 1709 return true; |
1710 } | 1710 } |
1711 | 1711 |
1712 return command(commandName).execute(value); | 1712 return command(commandName).execute(value); |
1713 } | 1713 } |
1714 | 1714 |
1715 Editor::Command::Command() | 1715 Editor::Command::Command() |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1787 { | 1787 { |
1788 return m_command && m_command->isTextInsertion; | 1788 return m_command && m_command->isTextInsertion; |
1789 } | 1789 } |
1790 | 1790 |
1791 int Editor::Command::idForHistogram() const | 1791 int Editor::Command::idForHistogram() const |
1792 { | 1792 { |
1793 return isSupported() ? m_command->idForUserMetrics : 0; | 1793 return isSupported() ? m_command->idForUserMetrics : 0; |
1794 } | 1794 } |
1795 | 1795 |
1796 } // namespace blink | 1796 } // namespace blink |
OLD | NEW |