Bug 1648858 - Move d3.js from devtools/ to third_party/js/. r=mossop

Differential Revision: https://phabricator.services.mozilla.com/D81437
This commit is contained in:
Matthew Noorenberghe 2020-07-03 08:25:51 +00:00
parent 9ac7db5374
commit 72c4e83fb7
13 changed files with 78 additions and 7 deletions

View File

@ -178,6 +178,8 @@ var whitelist = [
},
// Bug 1356031 (only used by devtools)
{ file: "chrome://global/skin/icons/error-16.png" },
// Bug 1641777 (only used by devtools)
{ file: "chrome://global/content/third_party/d3/d3.js" },
// Bug 1344267
{ file: "chrome://marionette/content/test.xhtml" },
{ file: "chrome://marionette/content/test_dialog.properties" },

View File

@ -4,7 +4,6 @@
devtools.jar:
% content devtools %content/
content/shared/vendor/d3.js (shared/vendor/d3.js)
content/shared/vendor/dagre-d3.js (shared/vendor/dagre-d3.js)
content/shared/widgets/widgets.css (shared/widgets/widgets.css)
content/webconsole/index.html (webconsole/index.html)

View File

@ -23,7 +23,7 @@
defer="true">
</script>
<script src="chrome://devtools/content/shared/vendor/d3.js"
<script src="chrome://global/content/third_party/d3/d3.js"
defer="true">
</script>

View File

@ -9,7 +9,7 @@
const CanvasUtils = require("devtools/client/memory/components/tree-map/canvas-utils");
const D3_SCRIPT =
'<script type="application/javascript" ' +
'src="chrome://devtools/content/shared/vendor/d3.js>';
'src="chrome://global/content/third_party/d3/d3.js">';
const TEST_URL = `data:text/html,<html><body>${D3_SCRIPT}</body></html>`;
this.test = makeMemoryTest(TEST_URL, async function({ tab, panel }) {

View File

@ -10,7 +10,7 @@ Test that the ShortestPaths component properly renders a graph of the merged sho
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
<script type="application/javascript"
src="chrome://devtools/content/shared/vendor/d3.js">
src="chrome://global/content/third_party/d3/d3.js">
</script>
<script type="application/javascript"
src="chrome://devtools/content/shared/vendor/dagre-d3.js">

View File

@ -10,7 +10,7 @@ Test that the ShortestPaths component renders a suggestion to select a node when
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
<script type="application/javascript"
src="chrome://devtools/content/shared/vendor/d3.js">
src="chrome://global/content/third_party/d3/d3.js">
</script>
<script type="application/javascript"
src="chrome://devtools/content/shared/vendor/dagre-d3.js">

View File

@ -10,7 +10,7 @@ Test that the Tree Map correctly renders onto 2 managed canvases.
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
<script type="application/javascript"
src="chrome://devtools/content/shared/vendor/d3.js">
src="chrome://global/content/third_party/d3/d3.js">
</script>
</head>
<body>

26
third_party/js/d3/LICENSE vendored Normal file
View File

@ -0,0 +1,26 @@
Copyright (c) 2014, Michael Bostock
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* The name Michael Bostock may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

38
third_party/js/d3/moz.yaml vendored Normal file
View File

@ -0,0 +1,38 @@
# Version of this schema
schema: 1
bugzilla:
# Bugzilla product and component for this directory and subdirectories
product: Toolkit
component: General
# Document the source of externally hosted code
origin:
# Short name of the package/library
name: D3.js
description: JavaScript library for visualizing data using web standards
# Full URL for the package's homepage/etc
# Usually different from repository url
url: https://d3js.org/
# Human-readable identifier for this version/release
# Generally "version NNN", "tag SSS", "bookmark SSS"
release: version 3.4.2
# Revision to pull in
# Must be a long or short commit SHA (long preferred)
revision: 04fa5dd3856de768b43b4aac9e34c112f1227a17
# The package's license, where possible using the mnemonic from
# https://spdx.org/licenses/
# Multiple licenses can be specified (as a YAML list)
# A "LICENSE" file must exist containing the full license text
license: BSD-3-Clause
# If the package's license is specified in a particular file,
# this is the name of the file.
# optional
license-file: LICENSE

View File

@ -1,3 +1,6 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
with Files('moz.build'):
BUG_COMPONENT = ('Firefox Build System', 'General')

View File

@ -105,3 +105,6 @@ toolkit.jar:
#endif
content/global/gmp-sources/openh264.json (gmp-sources/openh264.json)
content/global/gmp-sources/widevinecdm.json (gmp-sources/widevinecdm.json)
# Third party files
content/global/third_party/d3/d3.js (/third_party/js/d3/d3.js)

View File

@ -3224,7 +3224,7 @@ DEALINGS IN THE SOFTWARE.
<h1><a id="d3"></a>D3 License</h1>
<p>This license applies to the file
<code>devtools/client/shared/d3.js</code>.
<code>third_party/js/d3/d3.js</code>.
</p>
<pre>
Copyright (c) 2014, Michael Bostock