diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-02 18:39:51 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-02 18:39:51 +0000 |
commit | 1c6c6c3eef1ae5d60966faf4452524085aec0592 (patch) | |
tree | af951bddbc0ea58a2a1c5c61e03a1493efc24815 /webkit | |
parent | a780c7b2a8273c1814ca4257c3e85c0f56d29ed6 (diff) | |
download | chromium_src-1c6c6c3eef1ae5d60966faf4452524085aec0592.zip chromium_src-1c6c6c3eef1ae5d60966faf4452524085aec0592.tar.gz chromium_src-1c6c6c3eef1ae5d60966faf4452524085aec0592.tar.bz2 |
Remove hyphenation code from Chromium.
The feature is being removed because it is incomplete
and no one is working on it right now.
TBR for third_party.
BUG=107111
TBR=darin
Review URL: https://chromiumcodereview.appspot.com/20860003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215327 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/mocks/mock_webhyphenator.cc | 36 | ||||
-rw-r--r-- | webkit/mocks/mock_webhyphenator.h | 44 | ||||
-rw-r--r-- | webkit/support/test_webkit_platform_support.cc | 16 | ||||
-rw-r--r-- | webkit/support/test_webkit_platform_support.h | 3 | ||||
-rw-r--r-- | webkit/support/webkit_support.gypi | 3 |
5 files changed, 0 insertions, 102 deletions
diff --git a/webkit/mocks/mock_webhyphenator.cc b/webkit/mocks/mock_webhyphenator.cc deleted file mode 100644 index a148560..0000000 --- a/webkit/mocks/mock_webhyphenator.cc +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2013 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. - -#include "webkit/mocks/mock_webhyphenator.h" - -#include "base/logging.h" -#include "base/memory/scoped_handle.h" -#include "base/memory/scoped_ptr.h" -#include "base/strings/string_util.h" -#include "third_party/hyphen/hyphen.h" - -namespace webkit_glue { - -MockWebHyphenator::MockWebHyphenator() - : hyphen_dictionary_(NULL) { -} - -MockWebHyphenator::~MockWebHyphenator() { -} - -void MockWebHyphenator::LoadDictionary(base::PlatformFile dict_file) { -} - -bool MockWebHyphenator::canHyphenate(const WebKit::WebString& locale) { - return false; -} - -size_t MockWebHyphenator::computeLastHyphenLocation( - const WebKit::WebString& characters, - size_t before_index, - const WebKit::WebString& locale) { - return 0; -} - -} // namespace webkit_glue diff --git a/webkit/mocks/mock_webhyphenator.h b/webkit/mocks/mock_webhyphenator.h deleted file mode 100644 index dbc3ed4..0000000 --- a/webkit/mocks/mock_webhyphenator.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2013 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_MOCKS_MOCK_WEBHYPHENATOR_H_ -#define WEBKIT_MOCKS_MOCK_WEBHYPHENATOR_H_ - -#include "base/basictypes.h" -#include "base/compiler_specific.h" -#include "base/platform_file.h" -#include "third_party/WebKit/public/platform/WebHyphenator.h" - -typedef struct _HyphenDict HyphenDict; - -namespace webkit_glue { - -// Implements a simple WebHyphenator that only supports en-US. It is used for -// layout tests that expect that hyphenator to be available synchronously. -// Therefore, this class supports synchronous loading of the dictionary as well. -class MockWebHyphenator : public WebKit::WebHyphenator { - public: - MockWebHyphenator(); - virtual ~MockWebHyphenator(); - - // Loads the hyphenation dictionary. |dict_file| should be an open fd to - // third_party/hyphen/hyph_en_US.dic. - void LoadDictionary(base::PlatformFile dict_file); - - // WebHyphenator implementation. - virtual bool canHyphenate(const WebKit::WebString& locale); - virtual size_t computeLastHyphenLocation( - const WebKit::WebString& word, - size_t before_index, - const WebKit::WebString& locale); - - private: - HyphenDict* hyphen_dictionary_; - - DISALLOW_COPY_AND_ASSIGN(MockWebHyphenator); -}; - -} // namespace webkit_glue - -#endif // WEBKIT_MOCKS_MOCK_WEBHYPHENATOR_H_ diff --git a/webkit/support/test_webkit_platform_support.cc b/webkit/support/test_webkit_platform_support.cc index 9e34aae..e54718d 100644 --- a/webkit/support/test_webkit_platform_support.cc +++ b/webkit/support/test_webkit_platform_support.cc @@ -114,18 +114,6 @@ TestWebKitPlatformSupport::TestWebKitPlatformSupport() { DCHECK(file_system_root_.path().empty()); } - { - // Initialize the hyphen library with a sample dictionary. - base::FilePath path; - PathService::Get(base::DIR_SOURCE_ROOT, &path); - path = path.Append(FILE_PATH_LITERAL("third_party/hyphen/hyph_en_US.dic")); - base::PlatformFile dict_file = base::CreatePlatformFile( - path, - base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ, - NULL, NULL); - hyphenator_.LoadDictionary(dict_file); - } - #if defined(OS_WIN) // Ensure we pick up the default theme engine. SetThemeEngine(NULL); @@ -164,10 +152,6 @@ WebKit::WebBlobRegistry* TestWebKitPlatformSupport::blobRegistry() { return blob_registry_.get(); } -WebKit::WebHyphenator* TestWebKitPlatformSupport::hyphenator() { - return &hyphenator_; -} - WebKit::WebIDBFactory* TestWebKitPlatformSupport::idbFactory() { NOTREACHED() << "IndexedDB cannot be tested with in-process harnesses."; diff --git a/webkit/support/test_webkit_platform_support.h b/webkit/support/test_webkit_platform_support.h index 099a229..2ee3c02 100644 --- a/webkit/support/test_webkit_platform_support.h +++ b/webkit/support/test_webkit_platform_support.h @@ -13,7 +13,6 @@ #include "webkit/child/webkitplatformsupport_child_impl.h" #include "webkit/glue/simple_webmimeregistry_impl.h" #include "webkit/glue/webfileutilities_impl.h" -#include "webkit/mocks/mock_webhyphenator.h" #include "webkit/renderer/compositor_bindings/web_compositor_support_impl.h" #include "webkit/support/mock_webclipboard_impl.h" #include "webkit/support/weburl_loader_mock_factory.h" @@ -43,7 +42,6 @@ class TestWebKitPlatformSupport : virtual WebKit::WebFileUtilities* fileUtilities(); virtual WebKit::WebSandboxSupport* sandboxSupport(); virtual WebKit::WebBlobRegistry* blobRegistry(); - virtual WebKit::WebHyphenator* hyphenator(); virtual WebKit::WebIDBFactory* idbFactory(); virtual bool sandboxEnabled(); @@ -148,7 +146,6 @@ class TestWebKitPlatformSupport : base::ScopedTempDir appcache_dir_; scoped_refptr<TestShellWebBlobRegistryImpl> blob_registry_; base::ScopedTempDir file_system_root_; - webkit_glue::MockWebHyphenator hyphenator_; WebURLLoaderMockFactory url_loader_factory_; WebKit::WebGamepads gamepad_data_; webkit::WebCompositorSupportImpl compositor_support_; diff --git a/webkit/support/webkit_support.gypi b/webkit/support/webkit_support.gypi index 8e6e27a..682fe0d 100644 --- a/webkit/support/webkit_support.gypi +++ b/webkit/support/webkit_support.gypi @@ -105,7 +105,6 @@ '<(DEPTH)/crypto/crypto.gyp:crypto', '<(DEPTH)/net/net.gyp:net', '<(DEPTH)/skia/skia.gyp:skia', - '<(DEPTH)/third_party/hyphen/hyphen.gyp:hyphen', '<(DEPTH)/third_party/zlib/zlib.gyp:zlib', '<(DEPTH)/ui/ui.gyp:ui', '<(DEPTH)/webkit/common/user_agent/webkit_user_agent.gyp:user_agent', @@ -129,8 +128,6 @@ '<(DEPTH)/webkit/support/mock_webclipboard_impl.h', '<(DEPTH)/webkit/support/test_shell_webblobregistry_impl.cc', '<(DEPTH)/webkit/support/test_shell_webblobregistry_impl.h', - '<(DEPTH)/webkit/mocks/mock_webhyphenator.cc', - '<(DEPTH)/webkit/mocks/mock_webhyphenator.h', ], # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 'msvs_disabled_warnings': [ 4267, ], |