Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Issue 2267503002: Import polymer in a single place and remove d3 hacks (Closed)

Created:
4 years, 4 months ago by nduca
Modified:
4 years, 4 months ago
CC:
catapult-reviews_chromium.org, tracing-review_chromium.org
Base URL:
https://chromium.googlesource.com/external/github.com/catapult-project/catapult.git@master
Target Ref:
refs/heads/master
Project:
catapult
Visibility:
Public.

Description

Import polymer in a single place and remove d3 hacks All key bootstraps just import tracing/ui/base/polymer.html which then initializes Polymer to shadow mode before importing. As part of this, I removed our dependence on webcomponents (sometimes lite, sometimes not!) because we're Chrome only. But, you will notice these ugly polymer preload and postload scripts. This is a temporary workaround for #2698, in which PyVulcanize causes us to reorder scripts relative to imports. Another thing "fixed" in this CL is the early- and incorrect import of D3 added during the Polymer conversion. D3 didn't work because its "generic" module loader that is in d3-min.js gets confused by being inlined (I'm a little confused why). The "better hack" I replaced the early loading with is to trick the d3 module loader into thinking that there's an AMD module loader present, via a preload and postload script. In a world where #2698 was fixed, we could have these be inline in the d3.html bootstrap. BUG=catapult:#2580 Committed: https://chromium.googlesource.com/external/github.com/catapult-project/catapult/+/9be0433d2f769c91b70c4851f1deb8f3f8682412

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -82 lines) Patch
M tracing/trace_viewer.gypi View 2 chunks +2 lines, -1 line 0 comments Download
M tracing/tracing/base/base.html View 2 chunks +7 lines, -9 lines 0 comments Download
M tracing/tracing/tests.html View 1 chunk +1 line, -9 lines 0 comments Download
M tracing/tracing/trace2html.html View 1 chunk +1 line, -0 lines 0 comments Download
M tracing/tracing/ui/base/base.html View 1 chunk +4 lines, -17 lines 0 comments Download
M tracing/tracing/ui/base/d3.html View 1 chunk +2 lines, -0 lines 0 comments Download
A + tracing/tracing/ui/base/d3_postload.js View 1 chunk +5 lines, -5 lines 0 comments Download
A tracing/tracing/ui/base/d3_preload.js View 1 chunk +11 lines, -0 lines 2 comments Download
M tracing/tracing/ui/base/dom_helpers_test.html View 1 chunk +1 line, -1 line 0 comments Download
M tracing/tracing/ui/base/grouping_table_groupby_picker.html View 1 chunk +1 line, -1 line 0 comments Download
A + tracing/tracing/ui/base/polymer_postload.html View 1 chunk +7 lines, -1 line 0 comments Download
A tracing/tracing/ui/base/polymer_preload.html View 1 chunk +15 lines, -0 lines 0 comments Download
M tracing/tracing/ui/base/table_test.html View 1 chunk +1 line, -1 line 0 comments Download
M tracing/tracing/ui/base/utils.html View 1 chunk +1 line, -0 lines 0 comments Download
M tracing/tracing/ui/base/utils_test.html View 1 chunk +1 line, -1 line 0 comments Download
D tracing/tracing/ui/base/webcomponents.html View 1 chunk +0 lines, -7 lines 0 comments Download
M tracing/tracing/value/ui/scalar_span_test.html View 1 chunk +1 line, -1 line 0 comments Download
M tracing/tracing_build/trace2html.py View 1 chunk +1 line, -5 lines 0 comments Download
M tracing/tracing_examples/chrome_inspect_test_shell.html View 1 chunk +1 line, -3 lines 0 comments Download
M tracing/tracing_examples/deep_reports.html View 1 chunk +4 lines, -7 lines 0 comments Download
M tracing/tracing_examples/skia_debugger.html View 1 chunk +1 line, -3 lines 0 comments Download
M tracing/tracing_examples/trace_viewer.html View 1 chunk +0 lines, -10 lines 0 comments Download

Messages

Total messages: 10 (5 generated)
nduca
I think this fixes our polymer importing issues. PTAL.
4 years, 4 months ago (2016-08-20 02:01:54 UTC) #2
aiolos (Not reviewing)
lgtm with a question https://codereview.chromium.org/2267503002/diff/1/tracing/tracing/ui/base/d3_preload.js File tracing/tracing/ui/base/d3_preload.js (right): https://codereview.chromium.org/2267503002/diff/1/tracing/tracing/ui/base/d3_preload.js#newcode7 tracing/tracing/ui/base/d3_preload.js:7: window.define = function(x) { Do ...
4 years, 4 months ago (2016-08-22 23:19:27 UTC) #4
eakuefner
lgtm -- i'd like to land this (even though nat is on vacation) because results2 ...
4 years, 4 months ago (2016-08-23 22:41:39 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2267503002/1
4 years, 4 months ago (2016-08-23 22:42:11 UTC) #8
commit-bot: I haz the power
4 years, 4 months ago (2016-08-23 23:54:54 UTC) #10
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/external/github.com/catapult-project/catapu...

Powered by Google App Engine
This is Rietveld 408576698