Skip to content
This repository was archived by the owner on Feb 26, 2022. It is now read-only.

Commit 9f596b5

Browse files
committed
Merge pull request #569 from Gozala/bug/layout-change@787346
fix Bug 787346 - Implement layout changes r=@ochameau
2 parents b124e66 + 3a407e3 commit 9f596b5

File tree

432 files changed

+1683
-1571
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

432 files changed

+1683
-1571
lines changed

.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ doc/index.html
88
doc/packages/
99
doc/status.md5
1010
packages/*
11-
!packages/addon-kit/
12-
!packages/api-utils/
13-
!packages/test-harness/
1411

1512
# Python
1613
*.pyc
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

doc/dev-guide-source/cfx-tool.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ they contain.
298298

299299
See the
300300
[tutorial on unit testing](dev-guide/tutorials/unit-testing.html) and the
301-
[reference documentation for the `assert` module](packages/api-utils/test/assert.html)
301+
[reference documentation for the `assert` module](modules/sdk/test/assert.html)
302302
for details.
303303

304304
#### Supported Options #####
@@ -806,7 +806,7 @@ one run of `cfx` will not, by default, be available in the next run.
806806

807807
This includes, for example, any extra add-ons you installed, or your
808808
history, or any data stored using the
809-
[simple-storage](packages/addon-kit/simple-storage.html) API.
809+
[simple-storage](modules/sdk/simple-storage.html) API.
810810

811811
To make `cfx` use a specific profile, pass the `--profiledir` option,
812812
specifying the path to the profile you wish to use.

doc/dev-guide-source/guides/commonjs.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -109,27 +109,27 @@ Modules in the `api-utils` package implement low-level APIs. These
109109
modules fall roughly into three categories:
110110

111111
* fundamental utilities such as
112-
[collection](packages/api-utils/collection.html) and
113-
[url](packages/api-utils/url.html). Many add-ons are likely to
112+
[collection](modules/sdk/platform/xpcom.html) and
113+
[url](modules/sdk/url.html). Many add-ons are likely to
114114
want to use modules from this category.
115115

116116
* building blocks for higher level modules, such as
117-
[event/core](packages/api-utils/event/core.html),
118-
[event/target](packages/api-utils/event/target.html),
119-
[heritage](packages/api-utils/heritage.html), and
120-
[namespace](packages/api-utils/namespace.html). You're more
117+
[event/core](modules/sdk/event/core.html),
118+
[event/target](modules/sdk/event/target.html),
119+
[heritage](modules/sdk/core/heritage.html), and
120+
[namespace](modules/sdk/core/namespace.html). You're more
121121
likely to use these if you are building your own modules that
122122
implement new APIs, thus extending the SDK itself.
123123

124124
* privileged modules that expose powerful low-level capabilities
125-
such as [xhr](packages/api-utils/xhr.html) and
126-
[xpcom](packages/api-utils/xpcom.html). You can use these
125+
such as [xhr](modules/sdk/net/xhr.html) and
126+
[xpcom](modules/sdk/platform/xpcom.html). You can use these
127127
modules in your add-on if you need to, but should be aware that
128128
the cost of privileged access is the need to take more elaborate
129129
security precautions. In many cases these modules have simpler,
130130
more restricted analogs in the high-level addon-kit package (for
131-
example, [tabs](packages/addon-kit/tabs.html) or
132-
[request](packages/addon-kit/request.html)).
131+
example, [tabs](modules/sdk/tabs.html) or
132+
[request](modules/sdk/request.html)).
133133

134134
<div class="warning">
135135
<p>These modules are still in active development,

doc/dev-guide-source/guides/content-scripts/communicating-with-other-scripts.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Suppose we have a page called "listen.html" hosted at "my-domain.org", and we wa
7272
from the add-on to a script embedded in that page.
7373

7474
In the main add-on code, we have a
75-
[`page-mod`](packages/addon-kit/page-mod.html) that attaches the content script
75+
[`page-mod`](modules/sdk/page-mod.html) that attaches the content script
7676
"talk.js" to the right page:
7777

7878
var data = require("self").data;
@@ -114,7 +114,7 @@ messages from the content script:
114114
Sending messages from the page script to the content script is just
115115
the same, but in reverse.
116116

117-
Here "main.js" creates a [`page-mod`](packages/addon-kit/page-mod.html)
117+
Here "main.js" creates a [`page-mod`](modules/sdk/page-mod.html)
118118
that attaches "listen.js" to the web page:
119119

120120
var data = require("self").data;
@@ -164,7 +164,7 @@ to communicate between page scripts and content scripts.
164164
Here's an example showing how to use custom DOM events to send a message
165165
from a content script to a page script.
166166

167-
First, "main.js" will create a [`page-mod`](packages/addon-kit/page-mod.html)
167+
First, "main.js" will create a [`page-mod`](modules/sdk/page-mod.html)
168168
that will attach "talk.js" to the target web page:
169169

170170
var data = require("self").data;
@@ -206,7 +206,7 @@ Finally "listen.html" listens for the new event and examines its
206206
Sending messages using custom DOM events from the page script
207207
to the content script is just the same, but in reverse.
208208

209-
Again, "main.js" creates a [`page-mod`](packages/addon-kit/page-mod.html)
209+
Again, "main.js" creates a [`page-mod`](modules/sdk/page-mod.html)
210210
to target the page we are interested in:
211211

212212
var data = require("self").data;

doc/dev-guide-source/guides/content-scripts/index.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ content of web pages or be notified when the user clicks a link.
1010

1111
The SDK provides several core modules to support this:
1212

13-
**[panel](packages/addon-kit/panel.html)**<br>
13+
**[panel](modules/sdk/panel.html)**<br>
1414
Create a dialog that can host web content.
1515

16-
**[page-worker](packages/addon-kit/page-worker.html)**<br>
16+
**[page-worker](modules/sdk/page-worker.html)**<br>
1717
Retrieve a page and access its content, without displaying it to the user.
1818

19-
**[page-mod](packages/addon-kit/page-mod.html)**<br>
19+
**[page-mod](modules/sdk/page-mod.html)**<br>
2020
Execute scripts in the context of selected web pages.
2121

22-
**[widget](packages/addon-kit/widget.html)**<br>
22+
**[widget](modules/sdk/widget.html)**<br>
2323
Host an add-on's user interface, including web content.
2424

25-
**[context-menu](packages/addon-kit/context-menu.html)**<br>
25+
**[context-menu](modules/sdk/context-menu.html)**<br>
2626
Add items to the browser's context menu.
2727

2828
Firefox is moving towards a model in which it uses separate
@@ -57,7 +57,7 @@ relationships. The gray fill represents code written by the add-on developer.
5757
alt="Content script events">
5858

5959
This might sound complicated but it doesn't need to be. The following add-on
60-
uses the [page-mod](packages/addon-kit/page-mod.html) module to replace the
60+
uses the [page-mod](modules/sdk/page-mod.html) module to replace the
6161
content of any web page in the `.co.uk` domain by executing a content script
6262
in the context of that page:
6363

doc/dev-guide-source/guides/content-scripts/reddit-example.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ link clicks.
4242

4343
Finally, it registers a listener to the user-defined `click` event which in
4444
turn passes the URL into the `open` function of the
45-
[tabs](packages/addon-kit/tabs.html) module.
45+
[tabs](modules/sdk/tabs.html) module.
4646

4747
This is the `panel.js` content script that intercepts link clicks:
4848

doc/dev-guide-source/guides/content-scripts/using-port.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ the recipient but just emits the event and continues processing.
5151
## Accessing `port` in the Content Script ##
5252

5353
<span class="aside">Note that the global `self` object is completely
54-
different from the [`self` module](packages/addon-kit/self.html), which
54+
different from the [`self` module](modules/sdk/self.html), which
5555
provides an API for an add-on to access its data files and ID.</span>
5656

5757
In the content script the `port` object is available as a property of the
@@ -67,7 +67,7 @@ To receive an event from the add-on code:
6767

6868
Compare this to the technique used to receive _built-in_ events in the
6969
content script. For example, to receive the `context` event in a content script
70-
associated with a [context menu](packages/addon-kit/context-menu.html)
70+
associated with a [context menu](modules/sdk/context-menu.html)
7171
object, you would call the `on` function attached to the global `self` object:
7272

7373
self.on("context", function() {

doc/dev-guide-source/guides/events.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Working with Events #
66

77
The Add-on SDK supports event-driven programming through its
8-
[`EventEmitter`](packages/api-utils/events.html) framework.
8+
[`EventEmitter`](modules/sdk/deprecated/events.html) framework.
99

1010
Objects emit events on state changes that might be of interest to add-on code,
1111
such as browser windows opening, pages loading, network requests completing,
@@ -52,7 +52,7 @@ whenever the event occurs. The arguments that will be passed to the listener
5252
are specific to an event type and are documented with the event emitter.
5353

5454
For example, the following add-on registers two listeners with the
55-
[`private-browsing`](packages/addon-kit/private-browsing.html) module to
55+
[`private-browsing`](modules/sdk/private-browsing.html) module to
5656
listen for the `start` and `stop` events, and logs a string to the console
5757
reporting the change:
5858

@@ -83,7 +83,7 @@ with "on": for example, "onOpen", "onReady" and so on. Then in the constructor
8383
you can assign a listener function to this property as an alternative to
8484
calling the object's `on()` method.
8585

86-
For example: the [`widget`](packages/addon-kit/widget.html) object emits
86+
For example: the [`widget`](modules/sdk/widget.html) object emits
8787
an event when the widget is clicked.
8888

8989
The following add-on creates a widget and assigns a listener to the

doc/dev-guide-source/guides/firefox-compatibility.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Firefox Compatibility #
66

77
One of the promises the SDK makes is to maintain compatibility for its
8-
["supported" or "high-level" APIs](packages/addon-kit/index.html):
8+
["supported" or "high-level" APIs]FIXME:
99
meaning that code written against them will not need to change as new
1010
versions of Firefox are released.
1111

doc/dev-guide-source/guides/library-detector.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ access to the un-proxied DOM window, so they can see the objects added by
7272
libraries, so we’ll need to use the experimental [unsafeWindow](dev-guide/guides/content-scripts/accessing-the-dom.html#unsafeWindow)
7373

7474
The main add-on script, `main.js`, will use a
75-
[`page-mod`](packages/addon-kit/page-mod.html)
75+
[`page-mod`](modules/sdk/page-mod.html)
7676
to inject the content script into every new page.
7777

7878
The content script, which we'll call `library-detector.js`, will keep most of
@@ -101,7 +101,7 @@ the array of library names, and post it back to `main.js`:
101101

102102
`main.js` responds to that message by fetching the tab
103103
corresponding to that worker using
104-
[`worker.tab`](packages/api-utils/content/worker.html#tab), and adding
104+
[`worker.tab`](modules/sdk/content/worker.html#tab), and adding
105105
the array of library names to that tab's `libraries` property:
106106

107107
pageMod.PageMod({
@@ -134,11 +134,11 @@ a page contains more than one iframe, and those iframes use the same library.
134134

135135
#### Showing the Library Array ####
136136

137-
The [`widget`](packages/addon-kit/widget.html) module is a natural fit
137+
The [`widget`](modules/sdk/widget.html) module is a natural fit
138138
for displaying the library list. We'll specify its content using HTML, so we
139139
can display an array of icons. The widget must be able to display different
140140
content for different windows, so we'll use the
141-
[`WidgetView`](packages/addon-kit/widget.html) object.
141+
[`WidgetView`](modules/sdk/widget.html) object.
142142

143143
`main.js` will create an array of icons corresponding to the array of library
144144
names, and use that to build the widget's HTML content dynamically:
@@ -163,7 +163,7 @@ names, and use that to build the widget's HTML content dynamically:
163163
}
164164

165165
`main.js` will
166-
use the [`tabs`](packages/addon-kit/tabs.html) module to update the
166+
use the [`tabs`](modules/sdk/tabs.html) module to update the
167167
widget's content when necessary (for example, when the user switches between
168168
tabs):
169169

doc/dev-guide-source/guides/module-search.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The module-search logic needs to provide features like:
2121
* support for "packages": groups of related modules that are bundled together
2222
for easy distribution
2323
* easy and concise use of "stdlib" modules like `panel` and `page-mod` in
24-
`packages/addon-kit/lib`, perhaps searching multiple packages for a module
24+
`FIXMElib`, perhaps searching multiple packages for a module
2525
with the right name
2626
* "absolute" imports: minimize searching (and ambiguity) by specifying
2727
exactly which package contains the module of interest

doc/dev-guide-source/guides/program-id.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ add-on for distribution using `cfx xpi`, it will become the
1111
The ID is used for a variety
1212
of purposes. For example: [addons.mozilla.org](http://addons.mozilla.org) uses
1313
it to distinguish between new add-ons and updates to existing add-ons, and the
14-
[`simple-storage`](packages/addon-kit/simple-storage.html) module uses it
14+
[`simple-storage`](modules/sdk/simple-storage.html) module uses it
1515
to figure out which stored data belongs to which add-on.
1616

1717
It is read from the `id` key in your add-on's [`package.json`](dev-guide/package-spec.html) file.

doc/dev-guide-source/guides/xul-migration.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ registers a listener function for messages from the content script
8181
* the content script (3) extracts the data from the page and (4) sends
8282
it to the main add-on code in a message
8383
* the main add-on code (5) receives the message and (6) sends the request,
84-
using the SDK's [`request`](packages/addon-kit/request.html) API
84+
using the SDK's [`request`](modules/sdk/request.html) API
8585

8686
<img class="image-center" src="static-files/media/xul-migration-cs.png"
8787
alt="Content script organization">
@@ -101,7 +101,7 @@ There's much more information on content scripts in the
101101
The SDK provides a set of high level APIs providing some basic user
102102
interface components and functionality commonly required by add-ons.
103103
These are collected together in the
104-
[`addon-kit`](packages/addon-kit/index.html)
104+
[`addon-kit`]FIXME
105105
package. Because we expect to keep these APIs compatible as new versions
106106
of Firefox are released, we call them the "supported" APIs.
107107

@@ -111,8 +111,8 @@ If the supported APIs do what you need, they're the best option: you get the
111111
benefits of compatibility across Firefox releases and of the SDK's security
112112
model.
113113

114-
APIs like [`widget`](packages/addon-kit/widget.html) and
115-
[`panel`](packages/addon-kit/panel.html) are very generic and with the
114+
APIs like [`widget`](modules/sdk/widget.html) and
115+
[`panel`](modules/sdk/panel.html) are very generic and with the
116116
right content can be used to replace many specific XUL elements. But there are
117117
some notable limitations in the SDK APIs and even a fairly simple UI may need
118118
some degree of redesign to work with them.
@@ -166,8 +166,8 @@ continue to work as new versions of Firefox are released.
166166

167167
In addition to the High-Level APIs, the SDK includes a number of
168168
Low-Level APIs some of which, such
169-
as [`tab-browser`](packages/api-utils/tab-browser.html), [`xhr`](packages/api-utils/xhr.html), and
170-
[`window-utils`](packages/api-utils/window-utils.html), expose powerful
169+
as [`tab-browser`](modules/sdk/deprecated/tab-browser.html), [`xhr`](modules/sdk/net/xhr.html), and
170+
[`window-utils`](modules/sdk/deprecated/window-utils.html), expose powerful
171171
browser capabilities.
172172

173173
In this section we'll use low-level modules how to:
@@ -178,7 +178,7 @@ object
178178

179179
### <a name="browser-chrome">Modifying the Browser Chrome</a> ###
180180

181-
The [`window-utils`](packages/api-utils/window-utils.html) module gives
181+
The [`window-utils`](modules/sdk/deprecated/window-utils.html) module gives
182182
you direct access to chrome windows, including the browser's chrome window.
183183
Here's a really simple example add-on that modifies the browser chrome using
184184
`window-utils`:
@@ -206,7 +206,7 @@ collection of [third party modules](https://wiki.mozilla.org/Jetpack/Modules).
206206
### <a name="accessing-tabbrowser">Accessing <a href="https://developer.mozilla.org/en/XUL/tabbrowser">tabbrowser</a> ###
207207

208208

209-
The [`tab-browser`](packages/api-utils/tab-browser.html) module gives
209+
The [`tab-browser`](modules/sdk/deprecated/tab-browser.html) module gives
210210
you direct access to the
211211
[tabbrowser](https://developer.mozilla.org/en/XUL/tabbrowser) object. This
212212
simple example modifies the selected tab's CSS to enable the user to highlight
@@ -241,9 +241,9 @@ APIs it explicitly imports via `require()`. This is useful, because it means
241241
that if a malicious web page is able to inject code into your add-on's
242242
context, it is only able to use the APIs you have imported. For example, if
243243
you have only imported the
244-
[`notifications`](packages/addon-kit/notifications.html) module, then
244+
[`notifications`](modules/sdk/notifications.html) module, then
245245
even if a malicious web page manages to inject code into your add-on, it
246-
can't use the SDK's [`file`](packages/api-utils/file.html) module to
246+
can't use the SDK's [`file`](modules/sdk/io/file.html) module to
247247
access the user's data.
248248

249249
But this means that the more powerful modules you `require()`, the greater

doc/dev-guide-source/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ Learn about common development techniques, such as
131131
<td>
132132
<h4>API reference</h4>
133133
Reference documentation for the high-level SDK APIs found in the
134-
<a href="packages/addon-kit/index.html">addon-kit</a>
134+
FIXME
135135
package, and the low-level APIs found in the
136-
<a href="packages/api-utils/index.html">api-utils</a> package.
136+
FIXME.
137137
</td>
138138

139139
<td>

doc/dev-guide-source/low-level-apis.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,27 @@ Modules in this section implement low-level APIs. These
88
modules fall roughly into three categories:
99

1010
* fundamental utilities such as
11-
[collection](packages/api-utils/collection.html) and
12-
[url](packages/api-utils/url.html). Many add-ons are likely to
11+
[collection](modules/sdk/platform/xpcom.html) and
12+
[url](modules/sdk/url.html). Many add-ons are likely to
1313
want to use modules from this category.
1414

1515
* building blocks for higher level modules, such as
16-
[events](packages/api-utils/events.html),
17-
[worker](packages/api-utils/content/worker.html), and
18-
[api-utils](packages/api-utils/api-utils.html). You're more
16+
[events](modules/sdk/deprecated/events.html),
17+
[worker](modules/sdk/content/worker.html), and
18+
[api-utils](modules/sdk/deprecated/api-utils.html). You're more
1919
likely to use these if you are building your own modules that
2020
implement new APIs, thus extending the SDK itself.
2121

2222
* privileged modules that expose powerful low-level capabilities
23-
such as [tab-browser](packages/api-utils/tab-browser.html),
24-
[xhr](packages/api-utils/xhr.html), and
25-
[xpcom](packages/api-utils/xpcom.html). You can use these
23+
such as [tab-browser](modules/sdk/deprecated/tab-browser.html),
24+
[xhr](modules/sdk/net/xhr.html), and
25+
[xpcom](modules/sdk/platform/xpcom.html). You can use these
2626
modules in your add-on if you need to, but should be aware that
2727
the cost of privileged access is the need to take more elaborate
2828
security precautions. In many cases these modules have simpler,
2929
more restricted analogs among the "High-Level APIs" (for
30-
example, [tabs](packages/addon-kit/tabs.html) or
31-
[request](packages/addon-kit/request.html)).
30+
example, [tabs](modules/sdk/tabs.html) or
31+
[request](modules/sdk/request.html)).
3232

3333
These modules are still in active development, and we expect to
34-
make incompatible changes to them in future releases.
34+
make incompatible changes to them in future releases.

doc/dev-guide-source/package-spec.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ called `package.json`. This file is also referred to as the
5656
An array of JSON objects that use the following keys `name`, `type`, `value`,
5757
`title`, and `description`. These JSON objects will be used to automatically
5858
create a preferences interface for the addon in the Add-ons Manager.
59-
For more information see the documentation of [simple-prefs](packages/addon-kit/simple-prefs.html).
59+
For more information see the documentation of [simple-prefs](modules/sdk/simple-prefs.html).
6060

6161
* `license` - the name of the license as a String, with an optional
6262
URL in parentheses.
@@ -113,7 +113,7 @@ API documentation.
113113
Packages may optionally contain a directory called `data` into which
114114
arbitrary files may be placed, such as images or text files. The
115115
URL for these resources may be reached using the
116-
[self](packages/addon-kit/self.html) module.
116+
[self](modules/sdk/self.html) module.
117117

118118
[Markdown]: http://daringfireball.net/projects/markdown/
119119
[non-bootstrapped XUL extension]: #guide/xul-extensions

0 commit comments

Comments
 (0)