Files
brave-core/ui/webui/resources
mkarolin 24bf5fd148 Fixes overriding WebUI default fonts.
Function in web_ui_util.cc is no longer used to get the
text_defaults_md.css resource for shared resources. Keep our override
for the function resouce because it's still used in several places.

Additionally, copy over our text_defaults_md.css via util.js so that
it's used when chromium GRD is auto generated.

Chromium change:

https://source.chromium.org/chromium/chromium/src/+/ba11d6dc4a110c2c456eb453b445832847230b5e

commit ba11d6dc4a110c2c456eb453b445832847230b5e
Author: dpapad <dpapad@chromium.org>
Date:   Wed Feb 24 18:26:57 2021 +0000

    WebUI: Replace SharedResourcesDataSource with a regular WebUIDataSource.

    SharedResourcesDataSource was a custom class directly subclassing
    URLDataSource (and used for serving chrome://resources URLs). By doing
    so it included a lot of duplicated functionality for code that is
    already available in regular WebUIDataSourceImpl subclasses, for
    example

     - Registering resources
     - Registering loadTimeData strings
     - Calculating mime types based on a path's extension
     - Locating and serving WebUI files from pak files
     - Overriding specific CSP policies

    By using a regular WebUIDataSourceImpl a lot of duplicated code is
    deleted. Moreover, WebUIDataSourceImpl is a more mature class, that is
    heavily used across WebUI. For example this CL helped discover a bug
    where $i18n{...} string placeholders where incorrectly used in
    cr_components/ (fixed at r854879) because of CHECK()s that did not
    exist in SharedResourcesDataSource.

    In order to support chrome://resources/css/text_defaults.css $i18n{...}
    replacements, web_ui_url_loader_factory.cc has been modified to perform
    $i18n{...} replacements in CSS files too (previously only done for HTML
    files, and conditionally for JS files).

    Bug: 1179207
2021-03-23 14:55:44 -04:00
..
2021-03-23 14:55:44 -04:00
2021-02-04 23:52:49 -05:00