diff options
author | rouslan@chromium.org <rouslan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-12 17:34:15 +0000 |
---|---|---|
committer | rouslan@chromium.org <rouslan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-12 17:34:15 +0000 |
commit | 187a9128c9de75ddffaa8c2936a06a637cd4035e (patch) | |
tree | 075e5818da6b0b04b179c73ef8a8b9825322b5ac | |
parent | 9fd509ed3522ce50a8fc3dafef3fb253d3cfbb89 (diff) | |
download | chromium_src-187a9128c9de75ddffaa8c2936a06a637cd4035e.zip chromium_src-187a9128c9de75ddffaa8c2936a06a637cd4035e.tar.gz chromium_src-187a9128c9de75ddffaa8c2936a06a637cd4035e.tar.bz2 |
[spell] Stop using deprecated Blink API get/setDecoration()
This patch changes Chrome to use WebTextCheckingResult::decoration
directly instead of using the getDecoration() and setDecoration() methods.
This patch unblocks removing the temporary getDecoration() and
setDecoration() methods in Blink.
BUG=302807
Review URL: https://codereview.chromium.org/27054003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228364 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/renderer/spellchecker/spellcheck_provider.cc | 2 | ||||
-rw-r--r-- | chrome/renderer/spellchecker/spellcheck_unittest.cc | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/chrome/renderer/spellchecker/spellcheck_provider.cc b/chrome/renderer/spellchecker/spellcheck_provider.cc index 00445f3..05c31ad 100644 --- a/chrome/renderer/spellchecker/spellcheck_provider.cc +++ b/chrome/renderer/spellchecker/spellcheck_provider.cc @@ -346,7 +346,7 @@ bool SpellCheckProvider::SatisfyRequestFromCache( if (result_size > 0) { WebKit::WebVector<WebKit::WebTextCheckingResult> results(result_size); for (size_t i = 0; i < result_size; ++i) { - results[i].setDecoration(last_results_[i].getDecoration()); + results[i].decoration = last_results_[i].decoration; results[i].location = last_results_[i].location; results[i].length = last_results_[i].length; results[i].replacement = last_results_[i].replacement; diff --git a/chrome/renderer/spellchecker/spellcheck_unittest.cc b/chrome/renderer/spellchecker/spellcheck_unittest.cc index 56cdffd..8b9aeac 100644 --- a/chrome/renderer/spellchecker/spellcheck_unittest.cc +++ b/chrome/renderer/spellchecker/spellcheck_unittest.cc @@ -96,8 +96,7 @@ class SpellCheckTest : public testing::Test { EXPECT_EQ(results.size(), expected.size()); size_t size = std::min(results.size(), expected.size()); for (size_t j = 0; j < size; ++j) { - EXPECT_EQ(results[j].getDecoration(), - WebKit::WebTextDecorationTypeSpelling); + EXPECT_EQ(results[j].decoration, WebKit::WebTextDecorationTypeSpelling); EXPECT_EQ(results[j].location, expected[j].location); EXPECT_EQ(results[j].length, expected[j].length); } @@ -1132,7 +1131,7 @@ TEST_F(SpellCheckTest, CreateTextCheckingResults) { &textcheck_results); EXPECT_EQ(spellcheck_results.size(), textcheck_results.size()); EXPECT_EQ(WebKit::WebTextDecorationTypeSpelling, - textcheck_results[0].getDecoration()); + textcheck_results[0].decoration); EXPECT_EQ(spellcheck_results[0].location, textcheck_results[0].location); EXPECT_EQ(spellcheck_results[0].length, textcheck_results[0].length); } @@ -1152,7 +1151,7 @@ TEST_F(SpellCheckTest, CreateTextCheckingResults) { &textcheck_results); EXPECT_EQ(spellcheck_results.size(), textcheck_results.size()); EXPECT_EQ(WebKit::WebTextDecorationTypeGrammar, - textcheck_results[0].getDecoration()); + textcheck_results[0].decoration); EXPECT_EQ(spellcheck_results[0].location, textcheck_results[0].location); EXPECT_EQ(spellcheck_results[0].length, textcheck_results[0].length); } |