diff options
author | hbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-18 06:18:58 +0000 |
---|---|---|
committer | hbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-18 06:18:58 +0000 |
commit | e738ea51ac8011f8c16c10666fba1bb7b930fbb3 (patch) | |
tree | 65cdae9bce903f5a7717d1242e8d640d70ab51d0 /webkit/glue | |
parent | 779aae5fa525671293b0db3ddad27cc3811a362a (diff) | |
download | chromium_src-e738ea51ac8011f8c16c10666fba1bb7b930fbb3.zip chromium_src-e738ea51ac8011f8c16c10666fba1bb7b930fbb3.tar.gz chromium_src-e738ea51ac8011f8c16c10666fba1bb7b930fbb3.tar.bz2 |
Reverting 11953.
Review URL: http://codereview.chromium.org/48121
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11954 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/webtextdirection.h | 22 | ||||
-rw-r--r-- | webkit/glue/webview_impl.cc | 31 | ||||
-rw-r--r-- | webkit/glue/webview_impl.h | 1 | ||||
-rw-r--r-- | webkit/glue/webwidget.h | 4 | ||||
-rw-r--r-- | webkit/glue/webwidget_impl.cc | 3 | ||||
-rw-r--r-- | webkit/glue/webwidget_impl.h | 1 |
6 files changed, 0 insertions, 62 deletions
diff --git a/webkit/glue/webtextdirection.h b/webkit/glue/webtextdirection.h deleted file mode 100644 index 822eb34..0000000 --- a/webkit/glue/webtextdirection.h +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef WEBKIT_GLUE_WEBTEXTDIRECTION_H_ -#define WEBKIT_GLUE_WEBTEXTDIRECTION_H_ - -// Represents text directions (or writing directions) of a DOM node. -// This type is used as the input parameter of WebWidget::SetTextDirection(). -// This function converts these values to WebCore::WritingDirection values and -// call the Editor::setBaseWritingDirection() function. -// TODO(hbono): Add WEB_TEXT_DIRECTION_ORIGINAL that represents "revert the -// previous changes and set back to the original one" and implement it. -// TODO(hbono): Add WEB_TEXT_DIRECTION_TOGGLE that represents "toggle the text -// direction" and implement it. -enum WebTextDirection { - WEB_TEXT_DIRECTION_DEFAULT, // WebCore::NaturalWritingDirection - WEB_TEXT_DIRECTION_LTR, // WebCore::LeftToRightWritingDirection - WEB_TEXT_DIRECTION_RTL, // WebCore::RightToLeftWritingDirection -}; - -#endif // WEBKIT_GLUE_WEBTEXTDIRECTION_H_ diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc index 27e1842..69ca561 100644 --- a/webkit/glue/webview_impl.cc +++ b/webkit/glue/webview_impl.cc @@ -1192,37 +1192,6 @@ bool WebViewImpl::ImeUpdateStatus(bool* enable_ime, return true; } -void WebViewImpl::SetTextDirection(WebTextDirection direction) { - // The Editor::setBaseWritingDirection() function checks if we can change - // the text direction of the selected node and updates its DOM "dir" - // attribute and its CSS "direction" property. - // So, we just call the function as Safari does. - const Frame* focused = GetFocusedWebCoreFrame(); - if (!focused) - return; - Editor* editor = focused->editor(); - if (!editor || !editor->canEdit()) - return; - - switch (direction) { - case WEB_TEXT_DIRECTION_DEFAULT: - editor->setBaseWritingDirection(WebCore::NaturalWritingDirection); - break; - - case WEB_TEXT_DIRECTION_LTR: - editor->setBaseWritingDirection(WebCore::LeftToRightWritingDirection); - break; - - case WEB_TEXT_DIRECTION_RTL: - editor->setBaseWritingDirection(WebCore::RightToLeftWritingDirection); - break; - - default: - NOTIMPLEMENTED(); - break; - } -} - void WebViewImpl::RestoreFocus() { if (last_focused_frame_.get()) { if (last_focused_frame_->page()) { diff --git a/webkit/glue/webview_impl.h b/webkit/glue/webview_impl.h index 80839a4..78e0a63 100644 --- a/webkit/glue/webview_impl.h +++ b/webkit/glue/webview_impl.h @@ -75,7 +75,6 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> { const std::wstring& ime_string); virtual bool ImeUpdateStatus(bool* enable_ime, gfx::Rect* caret_rect); - virtual void SetTextDirection(WebTextDirection direction); virtual void StopLoading(); virtual void SetBackForwardListSize(int size); virtual void RestoreFocus(); diff --git a/webkit/glue/webwidget.h b/webkit/glue/webwidget.h index b1b011d..23046e8 100644 --- a/webkit/glue/webwidget.h +++ b/webkit/glue/webwidget.h @@ -6,7 +6,6 @@ #define WEBKIT_GLUE_WEBWIDGET_H__ #include "skia/ext/platform_canvas.h" -#include "webkit/glue/webtextdirection.h" namespace gfx { class Rect; @@ -65,9 +64,6 @@ class WebWidget { // Retrieve the status of this widget required by IME APIs. virtual bool ImeUpdateStatus(bool* enable_ime, gfx::Rect* caret_rect) = 0; - // Changes the text direction of the selected input node. - virtual void SetTextDirection(WebTextDirection direction) = 0; - protected: virtual ~WebWidget() {} diff --git a/webkit/glue/webwidget_impl.cc b/webkit/glue/webwidget_impl.cc index 2a8383f..b745a66 100644 --- a/webkit/glue/webwidget_impl.cc +++ b/webkit/glue/webwidget_impl.cc @@ -202,9 +202,6 @@ bool WebWidgetImpl::ImeUpdateStatus(bool* enable_ime, return false; } -void WebWidgetImpl::SetTextDirection(WebTextDirection direction) { -} - //----------------------------------------------------------------------------- // WebCore::HostWindow diff --git a/webkit/glue/webwidget_impl.h b/webkit/glue/webwidget_impl.h index e10d666..efb1b65 100644 --- a/webkit/glue/webwidget_impl.h +++ b/webkit/glue/webwidget_impl.h @@ -50,7 +50,6 @@ class WebWidgetImpl : public WebWidget, const std::wstring& ime_string); virtual bool ImeUpdateStatus(bool* enable_ime, gfx::Rect* caret_rect); - virtual void SetTextDirection(WebTextDirection direction); // WebWidgetImpl void Init(WebCore::FramelessScrollView* widget, const gfx::Rect& bounds); |