• dpapad's avatar
    WebUI Polymer3: Specify |assetpath| attribute in polymer_modulizer. · 04df1bb9
    dpapad authored
    In Polymer3 relative CSS url()s inside style modules are resolved by default
    with respect to the main HTML document, which results in incorrect URLs.
    
    In Polymer2 these were resolved with respect to the location of the HTML file
    hosting the style module, but in Polymer3 styles are hosted in JS.
    
    Explicitly adding an |assetpath| attribute to auto-generated Polymer3
    style modules fixes the issue.
    
    Bug: 965770
    Test: Use css_icons_css.m.js from a Polymer3 WebUI page. Verify that icons are properly displayed.
    Change-Id: I12b3e9283bded368976469bdd7ab5e2ef0c79a3f
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1838554
    Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
    Auto-Submit: Demetrios Papadopoulos <dpapad@chromium.org>
    Reviewed-by: default avatarRebekah Potter <rbpotter@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#702719}
    04df1bb9
style_module_expected.js 438 Bytes