Commit d95fbbf9 authored by hausmann's avatar hausmann
Browse files

Implemented the webcore actions for changing the text direction.

Signed-off-by: Holger


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27645 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 0c88dfa8
......@@ -154,6 +154,9 @@ static QWebPage::WebAction webActionForContextMenuAction(WebCore::ContextMenuAct
case WebCore::ContextMenuItemTagReload: return QWebPage::Reload;
case WebCore::ContextMenuItemTagCut: return QWebPage::Cut;
case WebCore::ContextMenuItemTagPaste: return QWebPage::Paste;
case WebCore::ContextMenuItemTagDefaultDirection: return QWebPage::SetTextDirectionDefault;
case WebCore::ContextMenuItemTagLeftToRight: return QWebPage::SetTextDirectionLeftToRight;
case WebCore::ContextMenuItemTagRightToLeft: return QWebPage::SetTextDirectionRightToLeft;
default: break;
}
return QWebPage::NoWebAction;
......@@ -567,6 +570,16 @@ void QWebPage::triggerAction(WebAction action, bool checked)
command = "DeleteWordForward";
break;
case SetTextDirectionDefault:
editor->setBaseWritingDirection("inherit");
break;
case SetTextDirectionLeftToRight:
editor->setBaseWritingDirection("ltr");
break;
case SetTextDirectionRightToLeft:
editor->setBaseWritingDirection("rtl");
break;
default: break;
}
......@@ -682,6 +695,16 @@ QAction *QWebPage::action(WebAction action) const
case DeleteEndOfWord:
break; // ####
case SetTextDirectionDefault:
text = contextMenuItemTagDefaultDirection();
break;
case SetTextDirectionLeftToRight:
text = contextMenuItemTagLeftToRight();
break;
case SetTextDirectionRightToLeft:
text = contextMenuItemTagRightToLeft();
break;
case NoWebAction:
return 0;
}
......
......@@ -122,6 +122,10 @@ public:
DeleteStartOfWord,
DeleteEndOfWord,
SetTextDirectionDefault,
SetTextDirectionLeftToRight,
SetTextDirectionRightToLeft,
WebActionCount
};
......
2007-11-09 Simon Hausmann <hausmann@kde.org>
Reviewed by Holger.
Implemented the webcore actions for changing the text direction.
* Api/qwebpage.cpp:
(webActionForContextMenuAction):
(QWebPage::triggerAction):
(QWebPage::action):
* Api/qwebpage.h:
2007-11-09 Simon Hausmann <hausmann@kde.org>
Reviewed by Holger.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment