chore: bump chromium to 91.0.4448.0 (master) (#28009)
* chore: bump chromium in DEPS to 91.0.4435.3 * build: add 'use_rts' definition Refs:2694187
* chore: update patches * chore: media_internal_resources becomes resources Refs:2699022
* chore: update patches * refactor: extensions::ViewType moved to mojom Refs:2710351
* chore: might_have_observers has been removed Refs:2667839
* refactor: CertVerifier is not in the network namespace anymore Refs:2689805
* refactor: ExtensionUserScriptManager is now UserScriptManager Refs:2657617
* refactor: content::SiteInstance::GetSiteForURL was removed Refs:2680274
* refactor: MenuItemType was moved to mojom Refs:2071443
* refactor: extensions::ViewType was moved to mojom Refs:2710351
* refacotr: grit::ResourceMap replaced with webui::ResourcePath Refs:2685601
* refactor: blink::MenuItem::Type was moved to mojom Refs:2071443
* refactor: CreateDataPipe deprecated form was removed Refs:2698090
* refactor: DesktopMediaList::Type replaces content::DesktopMediaType_* Refs:2700637
* chore: wire up activation_time in OSR Refs:2638372
* chore: remove deleted file from chromium_src list * chore: fix lint * update patches * chore: bump chromium in DEPS to 91.0.4438.0 * chore: bump chromium in DEPS to 91.0.4439.0 * chore: bump chromium in DEPS to 91.0.4440.0 * chore: bump chromium in DEPS to 91.0.4441.0 * chore: bump chromium in DEPS to 91.0.4442.0 * chore: bump chromium in DEPS to 91.0.4443.0 * chore: bump chromium in DEPS to 91.0.4445.0 * chore: bump chromium in DEPS to 91.0.4446.0 * chore: update patches * fixup gn check * Merge branch 'master' into roller/chromium/master * update to xcode 12.4.0 Needed because of8008deb41c
* 2752406: [LSC] Replace base::string16 with std::u16string in //ui2752406
* 2752406: [LSC] Replace base::string16 with std::u16string in //ui2752406
* 2752932: Associate each AwProxyingURLLoaderFactory with a frame tree node id.2752932
* 2651385: Moving Profile::shared_cors_origin_access_list_ into //content layer.2651385
* 2734095: Introduce StoragePartitionId type to wrap current string representation.2734095
* chore: bump chromium in DEPS to 91.0.4448.0 * Update patches * 2743594: Remove WebSize from blink.2743594
* 2725403: Add URLLoaderClient::OnReceiveEarlyHints()2725403
* 2651385: Moving Profile::shared_cors_origin_access_list_ into //content layer.2651385
* 2721718: Move HostID to extensions::mojom::HostID2721718
* 2733070: Rename observer to URLLoaderNetworkServiceObserver2733070
* Use nogncheck for content/browser/site_instance_impl.h This is needed because //content/browser:browser is not a visible target * 2648046: Introduce alert notification helper .app2648046
* 2752406: [LSC] Replace base::string16 with std::u16string in //ui2752406
* only include mac notifications on mac * add additional skipping of atk toolchain check * 2757472: Reland "Reland "[LSC] Remove base::string16 alias""2757472
* 2757472: Reland "Reland "[LSC] Remove base::string16 alias""2757472
* 2720306: [api] Remove deprecated [Shared]ArrayBuffer API2720306
* Fixup 2721718: Move HostID to extensions::mojom::HostID * fixup 2651385: Moving Profile::shared_cors_origin_access_list_ into //content layer * Fixup 2752406: [LSC] Replace base::string16 with std::u16string in //ui * Fixup 2725403: Add URLLoaderClient::OnReceiveEarlyHints() * update node headers * chore: bump chromium in DEPS to 91.0.4449.0 * Revert "chore: bump chromium in DEPS to 91.0.4449.0" This reverts commitbccafa0289
. * 2693008: Fix loading non-system cursors on Windows on browser_tests2693008
* 2757472: Reland "Reland "[LSC] Remove base::string16 alias""2757472
* undo changes to WebContentsPreferences::GetPreloadPath to fix mac build * fix StrCat issue * incantations for WebContentsPreferences::GetPreloadPath wide strings * bump nan * fix GetAsString maybe? * windows build fixes * more windows build fix * SetAppUserModelID -> wstring * upgrade nan dep in tests * lint * wstrings are cross-platform * linter * only bind setAppUserModelId on windows * fix a messed up merge * well that was an odyssey * backport fcdf35e from v8 to fix nan crash * disable typedarrays-test.js * don't defer in NSWindow creation2707696
* use PartitionAllocator for ArrayBuffers in the main process * fix patches * chore: omit some unnecessary conversions * refactor: make LoginItemSettings::path a wstring * refactor: make ShowTaskDialog take a wstr * Revert "refactor: make LoginItemSettings::path a wstring" This reverts commit9127cff58b
. Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: John Kleinschmidt <jkleinsc@github.com> Co-authored-by: Jeremy Rose <nornagon@nornagon.net> Co-authored-by: Jeremy Rose <jeremya@chromium.org> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
parent
6016e244fa
commit
a006cf681b
233 changed files with 1586 additions and 1469 deletions
|
@ -28,8 +28,8 @@ namespace api {
|
|||
|
||||
namespace {
|
||||
|
||||
bool HasWordCharacters(const base::string16& text, int index) {
|
||||
const base::char16* data = text.data();
|
||||
bool HasWordCharacters(const std::u16string& text, int index) {
|
||||
const char16_t* data = text.data();
|
||||
int length = text.length();
|
||||
while (index < length) {
|
||||
uint32_t code = 0;
|
||||
|
@ -43,8 +43,8 @@ bool HasWordCharacters(const base::string16& text, int index) {
|
|||
|
||||
struct Word {
|
||||
blink::WebTextCheckingResult result;
|
||||
base::string16 text;
|
||||
std::vector<base::string16> contraction_words;
|
||||
std::u16string text;
|
||||
std::vector<std::u16string> contraction_words;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
@ -52,19 +52,19 @@ struct Word {
|
|||
class SpellCheckClient::SpellcheckRequest {
|
||||
public:
|
||||
SpellcheckRequest(
|
||||
const base::string16& text,
|
||||
const std::u16string& text,
|
||||
std::unique_ptr<blink::WebTextCheckingCompletion> completion)
|
||||
: text_(text), completion_(std::move(completion)) {}
|
||||
SpellcheckRequest(const SpellcheckRequest&) = delete;
|
||||
SpellcheckRequest& operator=(const SpellcheckRequest&) = delete;
|
||||
~SpellcheckRequest() = default;
|
||||
|
||||
const base::string16& text() const { return text_; }
|
||||
const std::u16string& text() const { return text_; }
|
||||
blink::WebTextCheckingCompletion* completion() { return completion_.get(); }
|
||||
std::vector<Word>& wordlist() { return word_list_; }
|
||||
|
||||
private:
|
||||
base::string16 text_; // Text to be checked in this task.
|
||||
std::u16string text_; // Text to be checked in this task.
|
||||
std::vector<Word> word_list_; // List of Words found in text
|
||||
// The interface to send the misspelled ranges to WebKit.
|
||||
std::unique_ptr<blink::WebTextCheckingCompletion> completion_;
|
||||
|
@ -93,7 +93,7 @@ SpellCheckClient::~SpellCheckClient() {
|
|||
void SpellCheckClient::RequestCheckingOfText(
|
||||
const blink::WebString& textToCheck,
|
||||
std::unique_ptr<blink::WebTextCheckingCompletion> completionCallback) {
|
||||
base::string16 text(textToCheck.Utf16());
|
||||
std::u16string text(textToCheck.Utf16());
|
||||
// Ignore invalid requests.
|
||||
if (text.empty() || !HasWordCharacters(text, 0)) {
|
||||
completionCallback->DidCancelCheckingText();
|
||||
|
@ -151,10 +151,10 @@ void SpellCheckClient::SpellCheckText() {
|
|||
text_iterator_.SetText(text.c_str(), text.size());
|
||||
|
||||
SpellCheckScope scope(*this);
|
||||
base::string16 word;
|
||||
std::u16string word;
|
||||
size_t word_start;
|
||||
size_t word_length;
|
||||
std::set<base::string16> words;
|
||||
std::set<std::u16string> words;
|
||||
auto& word_list = pending_request_param_->wordlist();
|
||||
Word word_entry;
|
||||
for (;;) { // Run until end of text
|
||||
|
@ -186,9 +186,9 @@ void SpellCheckClient::SpellCheckText() {
|
|||
}
|
||||
|
||||
void SpellCheckClient::OnSpellCheckDone(
|
||||
const std::vector<base::string16>& misspelled_words) {
|
||||
const std::vector<std::u16string>& misspelled_words) {
|
||||
std::vector<blink::WebTextCheckingResult> results;
|
||||
std::unordered_set<base::string16> misspelled(misspelled_words.begin(),
|
||||
std::unordered_set<std::u16string> misspelled(misspelled_words.begin(),
|
||||
misspelled_words.end());
|
||||
|
||||
auto& word_list = pending_request_param_->wordlist();
|
||||
|
@ -216,7 +216,7 @@ void SpellCheckClient::OnSpellCheckDone(
|
|||
}
|
||||
|
||||
void SpellCheckClient::SpellCheckWords(const SpellCheckScope& scope,
|
||||
const std::set<base::string16>& words) {
|
||||
const std::set<std::u16string>& words) {
|
||||
DCHECK(!scope.spell_check_.IsEmpty());
|
||||
|
||||
v8::Local<v8::FunctionTemplate> templ = gin_helper::CreateFunctionTemplate(
|
||||
|
@ -238,13 +238,13 @@ void SpellCheckClient::SpellCheckWords(const SpellCheckScope& scope,
|
|||
// words in the contraction.
|
||||
bool SpellCheckClient::IsContraction(
|
||||
const SpellCheckScope& scope,
|
||||
const base::string16& contraction,
|
||||
std::vector<base::string16>* contraction_words) {
|
||||
const std::u16string& contraction,
|
||||
std::vector<std::u16string>* contraction_words) {
|
||||
DCHECK(contraction_iterator_.IsInitialized());
|
||||
|
||||
contraction_iterator_.SetText(contraction.c_str(), contraction.length());
|
||||
|
||||
base::string16 word;
|
||||
std::u16string word;
|
||||
size_t word_start;
|
||||
size_t word_length;
|
||||
for (auto status =
|
||||
|
|
|
@ -69,18 +69,18 @@ class SpellCheckClient : public blink::WebSpellCheckPanelHostClient,
|
|||
// The javascript function will callback OnSpellCheckDone
|
||||
// with the results of all the misspelled words.
|
||||
void SpellCheckWords(const SpellCheckScope& scope,
|
||||
const std::set<base::string16>& words);
|
||||
const std::set<std::u16string>& words);
|
||||
|
||||
// Returns whether or not the given word is a contraction of valid words
|
||||
// (e.g. "word:word").
|
||||
// Output variable contraction_words will contain individual
|
||||
// words in the contraction.
|
||||
bool IsContraction(const SpellCheckScope& scope,
|
||||
const base::string16& word,
|
||||
std::vector<base::string16>* contraction_words);
|
||||
const std::u16string& word,
|
||||
std::vector<std::u16string>* contraction_words);
|
||||
|
||||
// Callback for the JS API which returns the list of misspelled words.
|
||||
void OnSpellCheckDone(const std::vector<base::string16>& misspelled_words);
|
||||
void OnSpellCheckDone(const std::vector<std::u16string>& misspelled_words);
|
||||
|
||||
// Represents character attributes used for filtering out characters which
|
||||
// are not supported by this SpellCheck object.
|
||||
|
|
|
@ -114,7 +114,7 @@ content::RenderFrame* GetRenderFrame(v8::Local<v8::Value> value) {
|
|||
bool SpellCheckWord(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> window,
|
||||
const std::string& word,
|
||||
std::vector<base::string16>* optional_suggestions) {
|
||||
std::vector<std::u16string>* optional_suggestions) {
|
||||
size_t start;
|
||||
size_t length;
|
||||
|
||||
|
@ -123,7 +123,7 @@ bool SpellCheckWord(v8::Isolate* isolate,
|
|||
if (!render_frame)
|
||||
return true;
|
||||
|
||||
base::string16 w = base::UTF8ToUTF16(word);
|
||||
std::u16string w = base::UTF8ToUTF16(word);
|
||||
int id = render_frame->GetRoutingID();
|
||||
return client->GetSpellCheck()->SpellCheckWord(
|
||||
w.c_str(), 0, word.size(), id, &start, &length, optional_suggestions);
|
||||
|
@ -576,7 +576,7 @@ void InsertText(gin_helper::ErrorThrower thrower,
|
|||
}
|
||||
}
|
||||
|
||||
base::string16 InsertCSS(v8::Local<v8::Value> window,
|
||||
std::u16string InsertCSS(v8::Local<v8::Value> window,
|
||||
const std::string& css,
|
||||
gin_helper::Arguments* args) {
|
||||
blink::WebDocument::CSSOrigin css_origin =
|
||||
|
@ -591,7 +591,7 @@ base::string16 InsertCSS(v8::Local<v8::Value> window,
|
|||
args->ThrowError(
|
||||
"Render frame was torn down before webFrame.insertCSS could be "
|
||||
"executed");
|
||||
return base::string16();
|
||||
return std::u16string();
|
||||
}
|
||||
|
||||
blink::WebFrame* web_frame = render_frame->GetWebFrame();
|
||||
|
@ -601,12 +601,12 @@ base::string16 InsertCSS(v8::Local<v8::Value> window,
|
|||
.InsertStyleSheet(blink::WebString::FromUTF8(css), nullptr, css_origin)
|
||||
.Utf16();
|
||||
}
|
||||
return base::string16();
|
||||
return std::u16string();
|
||||
}
|
||||
|
||||
void RemoveInsertedCSS(gin_helper::ErrorThrower thrower,
|
||||
v8::Local<v8::Value> window,
|
||||
const base::string16& key) {
|
||||
const std::u16string& key) {
|
||||
auto* render_frame = GetRenderFrame(window);
|
||||
if (!render_frame) {
|
||||
thrower.ThrowError(
|
||||
|
@ -624,7 +624,7 @@ void RemoveInsertedCSS(gin_helper::ErrorThrower thrower,
|
|||
|
||||
v8::Local<v8::Promise> ExecuteJavaScript(gin_helper::Arguments* args,
|
||||
v8::Local<v8::Value> window,
|
||||
const base::string16& code) {
|
||||
const std::u16string& code) {
|
||||
v8::Isolate* isolate = args->isolate();
|
||||
gin_helper::Promise<v8::Local<v8::Value>> promise(isolate);
|
||||
v8::Local<v8::Promise> handle = promise.GetHandle();
|
||||
|
@ -685,8 +685,8 @@ v8::Local<v8::Promise> ExecuteJavaScriptInIsolatedWorld(
|
|||
std::vector<blink::WebScriptSource> sources;
|
||||
|
||||
for (const auto& script : scripts) {
|
||||
base::string16 code;
|
||||
base::string16 url;
|
||||
std::u16string code;
|
||||
std::u16string url;
|
||||
int start_line = 1;
|
||||
script.Get("url", &url);
|
||||
script.Get("startLine", &start_line);
|
||||
|
@ -766,10 +766,10 @@ bool IsWordMisspelled(v8::Isolate* isolate,
|
|||
return !SpellCheckWord(isolate, window, word, nullptr);
|
||||
}
|
||||
|
||||
std::vector<base::string16> GetWordSuggestions(v8::Isolate* isolate,
|
||||
std::vector<std::u16string> GetWordSuggestions(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> window,
|
||||
const std::string& word) {
|
||||
std::vector<base::string16> suggestions;
|
||||
std::vector<std::u16string> suggestions;
|
||||
SpellCheckWord(isolate, window, word, &suggestions);
|
||||
return suggestions;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue