diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-05-30 12:48:17 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-05-30 12:48:17 +0200 |
commit | 881da28418d380042aa95a97f0cbd42560a64f7c (patch) | |
tree | a794dff3274695e99c651902dde93d934ea7a5af /Source/WebKit2/UIProcess/WebGrammarDetail.cpp | |
parent | 7e104c57a70fdf551bb3d22a5d637cdcbc69dbea (diff) | |
parent | 0fcedcd17cc00d3dd44c718b3cb36c1033319671 (diff) | |
download | qtwebkit-881da28418d380042aa95a97f0cbd42560a64f7c.tar.gz |
Merge 'wip/next' into dev
Change-Id: Iff9ee5e23bb326c4371ec8ed81d56f2f05d680e9
Diffstat (limited to 'Source/WebKit2/UIProcess/WebGrammarDetail.cpp')
-rw-r--r-- | Source/WebKit2/UIProcess/WebGrammarDetail.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/WebKit2/UIProcess/WebGrammarDetail.cpp b/Source/WebKit2/UIProcess/WebGrammarDetail.cpp index 8df528cd9..0fe1bfb31 100644 --- a/Source/WebKit2/UIProcess/WebGrammarDetail.cpp +++ b/Source/WebKit2/UIProcess/WebGrammarDetail.cpp @@ -26,13 +26,13 @@ #include "config.h" #include "WebGrammarDetail.h" -#include "ImmutableArray.h" +#include "APIArray.h" +#include "APIString.h" #include "WKGrammarDetail.h" -#include "WebString.h" namespace WebKit { -PassRefPtr<WebGrammarDetail> WebGrammarDetail::create(int location, int length, ImmutableArray* guesses, const String& userDescription) +PassRefPtr<WebGrammarDetail> WebGrammarDetail::create(int location, int length, API::Array* guesses, const String& userDescription) { return adoptRef(new WebGrammarDetail(location, length, guesses, userDescription)); } @@ -42,7 +42,7 @@ PassRefPtr<WebGrammarDetail> WebGrammarDetail::create(const WebCore::GrammarDeta return adoptRef(new WebGrammarDetail(grammarDetail)); } -WebGrammarDetail::WebGrammarDetail(int location, int length, ImmutableArray* guesses, const String& userDescription) +WebGrammarDetail::WebGrammarDetail(int location, int length, API::Array* guesses, const String& userDescription) { m_grammarDetail.location = location; m_grammarDetail.length = length; @@ -50,18 +50,18 @@ WebGrammarDetail::WebGrammarDetail(int location, int length, ImmutableArray* gue size_t numGuesses = guesses->size(); m_grammarDetail.guesses.reserveCapacity(numGuesses); for (size_t i = 0; i < numGuesses; ++i) - m_grammarDetail.guesses.uncheckedAppend(guesses->at<WebString>(i)->string()); + m_grammarDetail.guesses.uncheckedAppend(guesses->at<API::String>(i)->string()); m_grammarDetail.userDescription = userDescription; } -PassRefPtr<ImmutableArray> WebGrammarDetail::guesses() const +Ref<API::Array> WebGrammarDetail::guesses() const { size_t numGuesses = m_grammarDetail.guesses.size(); - Vector<RefPtr<APIObject> > wkGuesses(numGuesses); + Vector<RefPtr<API::Object> > wkGuesses(numGuesses); for (unsigned i = 0; i < numGuesses; ++i) - wkGuesses[i] = WebString::create(m_grammarDetail.guesses[i]); - return ImmutableArray::adopt(wkGuesses); + wkGuesses[i] = API::String::create(m_grammarDetail.guesses[i]); + return API::Array::create(WTFMove(wkGuesses)); } WebGrammarDetail::WebGrammarDetail(const WebCore::GrammarDetail& grammarDetail) |