New issue
Advanced search Search tips

Issue 811392 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug

Blocking:
issue 773928



Sign in to add a comment

[Print Preview componetization]: Optimize page with polymer-bundler.

Project Member Reported by dpa...@chromium.org, Feb 12 2018

Issue description

Similar to other WebUI pages, the new Print Preview should respect the optimize_webui GN flag, and use optimize_webui.gni [1] rules to produce a JS/HTML bundle, which would drastically improve startup time. Example usage from the Downlodas case can be seen at [2]

[1] https://cs.chromium.org/chromium/src/chrome/browser/resources/optimize_webui.gni?l=28
[2] https://cs.chromium.org/chromium/src/chrome/browser/resources/md_downloads/BUILD.gn?l=3

 

Comment 1 by dpa...@chromium.org, Feb 12 2018

Blocking: 773928
Owner: dpa...@chromium.org
Status: Assigned (was: Available)
FYI, started a CL for this at https://chromium-review.googlesource.com/c/chromium/src/+/956620.

It currently fails to build with the following error,
Exception: Failed to open ../../out/gchrome/gen/chrome/browser/resources/print_preview/images/cloud.png while trying to flatten ../../out/gchrome/gen/chrome/browser/resources/print_preview/vulcanized.html. (No such file or directory)

Will keep investigating why the path to the PNG file is wrong, causing the failure.
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 10 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8ef69516832fb879a565558a4d30c7af464682e7

commit 8ef69516832fb879a565558a4d30c7af464682e7
Author: Demetrios Papadopoulos <dpapad@chromium.org>
Date: Tue Apr 10 17:46:12 2018

Print preview componetization: Respect optimize_webui GN flag.

Add optimize_webui() BUILD rules to generate HTML and JS bundles for
new print preview.

Bug:  811392 
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I8cc07893279dd97ef70e9cca6d6e33d4b433d411
Reviewed-on: https://chromium-review.googlesource.com/956620
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Rebekah Potter <rbpotter@chromium.org>
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549580}
[modify] https://crrev.com/8ef69516832fb879a565558a4d30c7af464682e7/chrome/browser/resources/BUILD.gn
[add] https://crrev.com/8ef69516832fb879a565558a4d30c7af464682e7/chrome/browser/resources/print_preview/BUILD.gn
[modify] https://crrev.com/8ef69516832fb879a565558a4d30c7af464682e7/chrome/browser/resources/print_preview/metrics.html
[modify] https://crrev.com/8ef69516832fb879a565558a4d30c7af464682e7/chrome/browser/resources/print_preview/new/model.js
[modify] https://crrev.com/8ef69516832fb879a565558a4d30c7af464682e7/chrome/browser/resources/print_preview/new/preview_area.js
[modify] https://crrev.com/8ef69516832fb879a565558a4d30c7af464682e7/chrome/browser/resources/print_preview/print_preview_resources.grd
[add] https://crrev.com/8ef69516832fb879a565558a4d30c7af464682e7/chrome/browser/resources/print_preview/print_preview_resources_vulcanized.grd
[modify] https://crrev.com/8ef69516832fb879a565558a4d30c7af464682e7/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
[modify] https://crrev.com/8ef69516832fb879a565558a4d30c7af464682e7/chrome/test/data/webui/print_preview/model_test.js
[modify] https://crrev.com/8ef69516832fb879a565558a4d30c7af464682e7/tools/gritsettings/resource_ids

Comment 4 by dpa...@chromium.org, Apr 10 2018

Status: Fixed (was: Assigned)

Sign in to add a comment