summaryrefslogtreecommitdiffstats
path: root/WebKit/haiku/WebCoreSupport
diff options
context:
space:
mode:
authorLeon Clarke <leonclarke@google.com>2010-06-03 14:33:32 +0100
committerLeon Clarke <leonclarke@google.com>2010-06-08 12:24:51 +0100
commit5af96e2c7b73ebc627c6894727826a7576d31758 (patch)
treef9d5e6f6175ccd7e3d14de9b290f08937a0d17ba /WebKit/haiku/WebCoreSupport
parent8cc4fcf4f6adcbc0e0aebfc24fbad9a4cddf2cfb (diff)
downloadexternal_webkit-5af96e2c7b73ebc627c6894727826a7576d31758.zip
external_webkit-5af96e2c7b73ebc627c6894727826a7576d31758.tar.gz
external_webkit-5af96e2c7b73ebc627c6894727826a7576d31758.tar.bz2
Merge webkit.org at r60469 : Initial merge by git.
Change-Id: I66a0047aa2af802f66bb0c7f2a8b02247a596234
Diffstat (limited to 'WebKit/haiku/WebCoreSupport')
-rw-r--r--WebKit/haiku/WebCoreSupport/EditorClientHaiku.cpp57
1 files changed, 29 insertions, 28 deletions
diff --git a/WebKit/haiku/WebCoreSupport/EditorClientHaiku.cpp b/WebKit/haiku/WebCoreSupport/EditorClientHaiku.cpp
index 48957a0..2e23af7 100644
--- a/WebKit/haiku/WebCoreSupport/EditorClientHaiku.cpp
+++ b/WebKit/haiku/WebCoreSupport/EditorClientHaiku.cpp
@@ -37,12 +37,11 @@
#include "FocusController.h"
#include "Frame.h"
#include "KeyboardEvent.h"
+#include "NotImplemented.h"
#include "Page.h"
#include "PlatformKeyboardEvent.h"
#include "WindowsKeyboardCodes.h"
-#include "NotImplemented.h"
-
namespace WebCore {
@@ -252,45 +251,45 @@ void EditorClientHaiku::handleKeyboardEvent(KeyboardEvent* event)
return;
if (start->isContentEditable()) {
- switch(kevent->windowsVirtualKeyCode()) {
+ switch (kevent->windowsVirtualKeyCode()) {
case VK_BACK:
- frame->editor()->deleteWithDirection(SelectionController::BACKWARD,
+ frame->editor()->deleteWithDirection(SelectionController::DirectionBackward,
kevent->ctrlKey() ? WordGranularity : CharacterGranularity,
false, true);
break;
case VK_DELETE:
- frame->editor()->deleteWithDirection(SelectionController::FORWARD,
+ frame->editor()->deleteWithDirection(SelectionController::DirectionForward,
kevent->ctrlKey() ? WordGranularity : CharacterGranularity,
false, true);
break;
case VK_LEFT:
- frame->selection()->modify(kevent->shiftKey() ? SelectionController::EXTEND : SelectionController::MOVE,
- SelectionController::LEFT,
+ frame->selection()->modify(kevent->shiftKey() ? SelectionController::AlterationExtend : SelectionController::AlterationMove,
+ SelectionController::DirectionLeft,
kevent->ctrlKey() ? WordGranularity : CharacterGranularity,
true);
break;
case VK_RIGHT:
- frame->selection()->modify(kevent->shiftKey() ? SelectionController::EXTEND : SelectionController::MOVE,
- SelectionController::RIGHT,
+ frame->selection()->modify(kevent->shiftKey() ? SelectionController::AlterationExtend : SelectionController::AlterationMove,
+ SelectionController::DirectionRight,
kevent->ctrlKey() ? WordGranularity : CharacterGranularity,
true);
break;
case VK_UP:
- frame->selection()->modify(kevent->shiftKey() ? SelectionController::EXTEND : SelectionController::MOVE,
- SelectionController::BACKWARD,
+ frame->selection()->modify(kevent->shiftKey() ? SelectionController::AlterationExtend : SelectionController::AlterationMove,
+ SelectionController::DirectionBackward,
kevent->ctrlKey() ? ParagraphGranularity : LineGranularity,
true);
break;
case VK_DOWN:
- frame->selection()->modify(kevent->shiftKey() ? SelectionController::EXTEND : SelectionController::MOVE,
- SelectionController::FORWARD,
+ frame->selection()->modify(kevent->shiftKey() ? SelectionController::AlterationExtend : SelectionController::AlterationMove,
+ SelectionController::DirectionForward,
kevent->ctrlKey() ? ParagraphGranularity : LineGranularity,
true);
break;
- case VK_PRIOR: // PageUp
+ case VK_PRIOR: // PageUp
frame->editor()->command("MoveUpByPageAndModifyCaret");
break;
- case VK_NEXT: // PageDown
+ case VK_NEXT: // PageDown
frame->editor()->command("MoveDownByPageAndModifyCaret");
break;
case VK_RETURN:
@@ -336,7 +335,8 @@ void EditorClientHaiku::handleKeyboardEvent(KeyboardEvent* event)
default:
return;
}
- } else return;
+ } else
+ return;
}
} else {
switch (kevent->windowsVirtualKeyCode()) {
@@ -346,10 +346,10 @@ void EditorClientHaiku::handleKeyboardEvent(KeyboardEvent* event)
case VK_DOWN:
frame->editor()->command("MoveDown");
break;
- case VK_PRIOR: // PageUp
+ case VK_PRIOR: // PageUp
frame->editor()->command("MoveUpByPageAndModifyCaret");
break;
- case VK_NEXT: // PageDown
+ case VK_NEXT: // PageDown
frame->editor()->command("MoveDownByPageAndModifyCaret");
break;
case VK_HOME:
@@ -362,17 +362,18 @@ void EditorClientHaiku::handleKeyboardEvent(KeyboardEvent* event)
break;
default:
if (kevent->ctrlKey()) {
- switch(kevent->windowsVirtualKeyCode()) {
- case VK_A:
- frame->editor()->command("SelectAll");
- break;
- case VK_C: case VK_X:
- frame->editor()->command("Copy");
- break;
- default:
- return;
+ switch (kevent->windowsVirtualKeyCode()) {
+ case VK_A:
+ frame->editor()->command("SelectAll");
+ break;
+ case VK_C: case VK_X:
+ frame->editor()->command("Copy");
+ break;
+ default:
+ return;
}
- } else return;
+ } else
+ return;
}
}
event->setDefaultHandled();