зеркало из https://github.com/electron/electron.git
fix: handle gzipped chrome WebUI resources (#18531)
Fixes: #18503 Refs: https://chromium-review.googlesource.com/c/chromium/src/+/1576232 For whatever reason Chromium made this change and then made the default //content behavior to return false for all IsDataResourceGzipped requests. This PR updates our ContentClient impl to return the correct values. Notes: Fixed issues where some `chrome://*` URLs would not render correctly
This commit is contained in:
Родитель
81366b5bfb
Коммит
26155c8a00
|
@ -268,4 +268,8 @@ void AtomContentClient::AddContentDecryptionModules(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool AtomContentClient::IsDataResourceGzipped(int resource_id) const {
|
||||||
|
return ui::ResourceBundle::GetSharedInstance().IsGzipped(resource_id);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace atom
|
} // namespace atom
|
||||||
|
|
|
@ -31,6 +31,7 @@ class AtomContentClient : public content::ContentClient {
|
||||||
void AddContentDecryptionModules(
|
void AddContentDecryptionModules(
|
||||||
std::vector<content::CdmInfo>* cdms,
|
std::vector<content::CdmInfo>* cdms,
|
||||||
std::vector<media::CdmHostFilePath>* cdm_host_file_paths) override;
|
std::vector<media::CdmHostFilePath>* cdm_host_file_paths) override;
|
||||||
|
bool IsDataResourceGzipped(int resource_id) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DISALLOW_COPY_AND_ASSIGN(AtomContentClient);
|
DISALLOW_COPY_AND_ASSIGN(AtomContentClient);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче