Skip to content

Commit

Permalink
Bug 1648858 - Move d3.js from devtools/ to third_party/js/. r=mossop
Browse files Browse the repository at this point in the history
  • Loading branch information
mnoorenberghe committed Jul 2, 2020
1 parent becd201 commit ac93ec6
Show file tree
Hide file tree
Showing 14 changed files with 85 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand Down
1 change: 0 additions & 1 deletion devtools/client/jar.mn
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion devtools/client/memory/index.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<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">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<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">
Expand Down
2 changes: 1 addition & 1 deletion devtools/client/memory/test/chrome/test_TreeMap_01.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<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>
Expand Down
2 changes: 1 addition & 1 deletion moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ DIRS += [
'config',
'python',
'testing/mozbase',
'third_party/python',
'third_party',
]

if not CONFIG['JS_STANDALONE']:
Expand Down
26 changes: 26 additions & 0 deletions third_party/js/d3/LICENSE
Original file line number Diff line number Diff line change
@@ -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.
File renamed without changes.
38 changes: 38 additions & 0 deletions third_party/js/d3/moz.yaml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions third_party/js/jar.mn
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

toolkit.jar:
content/global/third_party/d3/d3.js (d3/d3.js)
6 changes: 6 additions & 0 deletions third_party/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,9 @@ with Files('sqlite3/**'):

with Files('rlbox/**'):
BUG_COMPONENT = ('Firefox Build System', 'General')

JAR_MANIFESTS += ['js/jar.mn']

DIRS += [
'python',
]
2 changes: 1 addition & 1 deletion toolkit/content/license.html
Original file line number Diff line number Diff line change
Expand Up @@ -3224,7 +3224,7 @@ <h1><a id="cubic-bezier"></a>cubic-bezier License</h1>
<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
Expand Down

0 comments on commit ac93ec6

Please sign in to comment.