Skip to content

Commit

Permalink
Merge remote-tracking branch 'c574bba735eba081e5dfb28a34b26b450cb7ba8…
Browse files Browse the repository at this point in the history
…c' into embedlite_upgrade
  • Loading branch information
tmeshkova committed Jan 28, 2014
2 parents f6d0799 + c574bba commit 1456827
Show file tree
Hide file tree
Showing 640 changed files with 14,340 additions and 14,654 deletions.
2 changes: 1 addition & 1 deletion CLOBBER
Expand Up @@ -22,4 +22,4 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more.

Bug 948583, first part, apparently requires a clobber. (Ideas for fixing this involve removing jsopcode.tbl, which is a bit too big to do while holding up this patch.)
bug 960811 - clobber to rebuild preprocessed files when enabling synthetic APKs
8 changes: 1 addition & 7 deletions accessible/src/generic/Accessible.cpp
Expand Up @@ -2648,7 +2648,7 @@ Accessible::RemoveChild(Accessible* aChild)
}

Accessible*
Accessible::GetChildAt(uint32_t aIndex)
Accessible::GetChildAt(uint32_t aIndex) const
{
Accessible* child = mChildren.SafeElementAt(aIndex, nullptr);
if (!child)
Expand All @@ -2669,12 +2669,6 @@ Accessible::ChildCount() const
return mChildren.Length();
}

int32_t
Accessible::GetIndexOf(Accessible* aChild)
{
return (aChild->mParent != this) ? -1 : aChild->IndexInParent();
}

int32_t
Accessible::IndexInParent() const
{
Expand Down
5 changes: 3 additions & 2 deletions accessible/src/generic/Accessible.h
Expand Up @@ -389,7 +389,7 @@ class Accessible : public nsIAccessible,
/**
* Return child accessible at the given index.
*/
virtual Accessible* GetChildAt(uint32_t aIndex);
virtual Accessible* GetChildAt(uint32_t aIndex) const;

/**
* Return child accessible count.
Expand All @@ -399,7 +399,8 @@ class Accessible : public nsIAccessible,
/**
* Return index of the given child accessible.
*/
virtual int32_t GetIndexOf(Accessible* aChild);
int32_t GetIndexOf(const Accessible* aChild) const
{ return (aChild->mParent != this) ? -1 : aChild->IndexInParent(); }

/**
* Return index in parent accessible.
Expand Down
4 changes: 2 additions & 2 deletions accessible/src/generic/HyperTextAccessible.cpp
Expand Up @@ -1669,7 +1669,7 @@ HyperTextAccessible::RenderedToContentOffset(nsIFrame* aFrame, uint32_t aRendere

int32_t
HyperTextAccessible::GetChildOffset(uint32_t aChildIndex,
bool aInvalidateAfter)
bool aInvalidateAfter) const
{
if (aChildIndex == 0) {
if (aInvalidateAfter)
Expand Down Expand Up @@ -1699,7 +1699,7 @@ HyperTextAccessible::GetChildOffset(uint32_t aChildIndex,
}

int32_t
HyperTextAccessible::GetChildIndexAtOffset(uint32_t aOffset)
HyperTextAccessible::GetChildIndexAtOffset(uint32_t aOffset) const
{
uint32_t lastOffset = 0;
uint32_t offsetCount = mOffsets.Length();
Expand Down
16 changes: 7 additions & 9 deletions accessible/src/generic/HyperTextAccessible.h
Expand Up @@ -160,10 +160,8 @@ class HyperTextAccessible : public AccessibleWrap,
/**
* Return character count within the hypertext accessible.
*/
uint32_t CharacterCount()
{
return GetChildOffset(ChildCount());
}
uint32_t CharacterCount() const
{ return GetChildOffset(ChildCount()); }

/**
* Get a character at the given offset (don't support magic offsets).
Expand Down Expand Up @@ -247,7 +245,7 @@ class HyperTextAccessible : public AccessibleWrap,
* cached offsets for next siblings of the child
*/
int32_t GetChildOffset(Accessible* aChild,
bool aInvalidateAfter = false)
bool aInvalidateAfter = false) const
{
int32_t index = GetIndexOf(aChild);
return index == -1 ? -1 : GetChildOffset(index, aInvalidateAfter);
Expand All @@ -257,21 +255,21 @@ class HyperTextAccessible : public AccessibleWrap,
* Return text offset for the child accessible index.
*/
int32_t GetChildOffset(uint32_t aChildIndex,
bool aInvalidateAfter = false);
bool aInvalidateAfter = false) const;

/**
* Return child accessible at the given text offset.
*
* @param aOffset [in] the given text offset
*/
int32_t GetChildIndexAtOffset(uint32_t aOffset);
int32_t GetChildIndexAtOffset(uint32_t aOffset) const;

/**
* Return child accessible at the given text offset.
*
* @param aOffset [in] the given text offset
*/
Accessible* GetChildAtOffset(uint32_t aOffset)
Accessible* GetChildAtOffset(uint32_t aOffset) const
{
return GetChildAt(GetChildIndexAtOffset(aOffset));
}
Expand Down Expand Up @@ -518,7 +516,7 @@ class HyperTextAccessible : public AccessibleWrap,
/**
* End text offsets array.
*/
nsTArray<uint32_t> mOffsets;
mutable nsTArray<uint32_t> mOffsets;
};


Expand Down
9 changes: 5 additions & 4 deletions accessible/src/xul/XULTreeAccessible.cpp
Expand Up @@ -414,7 +414,7 @@ XULTreeAccessible::SelectAll()
// XULTreeAccessible: Accessible implementation

Accessible*
XULTreeAccessible::GetChildAt(uint32_t aIndex)
XULTreeAccessible::GetChildAt(uint32_t aIndex) const
{
uint32_t childCount = Accessible::ChildCount();
if (aIndex < childCount)
Expand Down Expand Up @@ -522,7 +522,7 @@ XULTreeAccessible::ContainerWidget() const
// XULTreeAccessible: public implementation

Accessible*
XULTreeAccessible::GetTreeItemAccessible(int32_t aRow)
XULTreeAccessible::GetTreeItemAccessible(int32_t aRow) const
{
if (aRow < 0 || IsDefunct() || !mTreeView)
return nullptr;
Expand Down Expand Up @@ -679,10 +679,11 @@ XULTreeAccessible::TreeViewChanged(nsITreeView* aView)
// XULTreeAccessible: protected implementation

already_AddRefed<Accessible>
XULTreeAccessible::CreateTreeItemAccessible(int32_t aRow)
XULTreeAccessible::CreateTreeItemAccessible(int32_t aRow) const
{
nsRefPtr<Accessible> accessible =
new XULTreeItemAccessible(mContent, mDoc, this, mTree, mTreeView, aRow);
new XULTreeItemAccessible(mContent, mDoc, const_cast<XULTreeAccessible*>(this),
mTree, mTreeView, aRow);

return accessible.forget();
}
Expand Down
13 changes: 7 additions & 6 deletions accessible/src/xul/XULTreeAccessible.h
Expand Up @@ -46,8 +46,8 @@ class XULTreeAccessible : public AccessibleWrap
virtual Accessible* ChildAtPoint(int32_t aX, int32_t aY,
EWhichChildAtPoint aWhichChild);

virtual Accessible* GetChildAt(uint32_t aIndex);
virtual uint32_t ChildCount() const;
virtual Accessible* GetChildAt(uint32_t aIndex) const MOZ_OVERRIDE;
virtual uint32_t ChildCount() const MOZ_OVERRIDE;
virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE;

// SelectAccessible
Expand Down Expand Up @@ -77,7 +77,7 @@ class XULTreeAccessible : public AccessibleWrap
*
* @param aRow [in] the given row index
*/
Accessible* GetTreeItemAccessible(int32_t aRow);
Accessible* GetTreeItemAccessible(int32_t aRow) const;

/**
* Invalidates the number of cached treeitem accessibles.
Expand Down Expand Up @@ -110,11 +110,12 @@ class XULTreeAccessible : public AccessibleWrap
/**
* Creates tree item accessible for the given row index.
*/
virtual already_AddRefed<Accessible> CreateTreeItemAccessible(int32_t aRow);
virtual already_AddRefed<Accessible>
CreateTreeItemAccessible(int32_t aRow) const;

nsCOMPtr<nsITreeBoxObject> mTree;
nsITreeView* mTreeView;
AccessibleHashtable mAccessibleCache;
mutable AccessibleHashtable mAccessibleCache;
};

/**
Expand Down Expand Up @@ -180,7 +181,7 @@ class XULTreeItemAccessibleBase : public AccessibleWrap
* Return cell accessible for the given column. If XUL tree accessible is not
* accessible table then return null.
*/
virtual Accessible* GetCellAccessible(nsITreeColumn* aColumn)
virtual Accessible* GetCellAccessible(nsITreeColumn* aColumn) const
{ return nullptr; }

/**
Expand Down
15 changes: 9 additions & 6 deletions accessible/src/xul/XULTreeGridAccessible.cpp
Expand Up @@ -237,10 +237,12 @@ XULTreeGridAccessible::NativeRole()
// XULTreeGridAccessible: XULTreeAccessible implementation

already_AddRefed<Accessible>
XULTreeGridAccessible::CreateTreeItemAccessible(int32_t aRow)
XULTreeGridAccessible::CreateTreeItemAccessible(int32_t aRow) const
{
nsRefPtr<Accessible> accessible =
new XULTreeGridRowAccessible(mContent, mDoc, this, mTree, mTreeView, aRow);
new XULTreeGridRowAccessible(mContent, mDoc,
const_cast<XULTreeGridAccessible*>(this),
mTree, mTreeView, aRow);

return accessible.forget();
}
Expand Down Expand Up @@ -345,7 +347,7 @@ XULTreeGridRowAccessible::ChildAtPoint(int32_t aX, int32_t aY,
}

Accessible*
XULTreeGridRowAccessible::GetChildAt(uint32_t aIndex)
XULTreeGridRowAccessible::GetChildAt(uint32_t aIndex) const
{
if (IsDefunct())
return nullptr;
Expand All @@ -368,7 +370,7 @@ XULTreeGridRowAccessible::ChildCount() const
// XULTreeGridRowAccessible: XULTreeItemAccessibleBase implementation

Accessible*
XULTreeGridRowAccessible::GetCellAccessible(nsITreeColumn* aColumn)
XULTreeGridRowAccessible::GetCellAccessible(nsITreeColumn* aColumn) const
{
NS_PRECONDITION(aColumn, "No tree column!");

Expand All @@ -378,8 +380,9 @@ XULTreeGridRowAccessible::GetCellAccessible(nsITreeColumn* aColumn)
return cachedCell;

nsRefPtr<Accessible> cell =
new XULTreeGridCellAccessibleWrap(mContent, mDoc, this, mTree,
mTreeView, mRow, aColumn);
new XULTreeGridCellAccessibleWrap(mContent, mDoc,
const_cast<XULTreeGridRowAccessible*>(this),
mTree, mTreeView, mRow, aColumn);
mAccessibleCache.Put(key, cell);
Document()->BindToDocument(cell, nullptr);
return cell;
Expand Down
11 changes: 6 additions & 5 deletions accessible/src/xul/XULTreeGridAccessible.h
Expand Up @@ -62,7 +62,8 @@ class XULTreeGridAccessible : public XULTreeAccessible,
protected:

// XULTreeAccessible
virtual already_AddRefed<Accessible> CreateTreeItemAccessible(int32_t aRow);
virtual already_AddRefed<Accessible>
CreateTreeItemAccessible(int32_t aRow) const MOZ_OVERRIDE;
};


Expand Down Expand Up @@ -91,11 +92,11 @@ class XULTreeGridRowAccessible : public XULTreeItemAccessibleBase
virtual Accessible* ChildAtPoint(int32_t aX, int32_t aY,
EWhichChildAtPoint aWhichChild);

virtual Accessible* GetChildAt(uint32_t aIndex);
virtual uint32_t ChildCount() const;
virtual Accessible* GetChildAt(uint32_t aIndex) const MOZ_OVERRIDE;
virtual uint32_t ChildCount() const MOZ_OVERRIDE;

// XULTreeItemAccessibleBase
virtual Accessible* GetCellAccessible(nsITreeColumn* aColumn);
virtual Accessible* GetCellAccessible(nsITreeColumn* aColumn) const MOZ_OVERRIDE;
virtual void RowInvalidated(int32_t aStartColIdx, int32_t aEndColIdx);

protected:
Expand All @@ -104,7 +105,7 @@ class XULTreeGridRowAccessible : public XULTreeItemAccessibleBase
virtual void CacheChildren();

// XULTreeItemAccessibleBase
AccessibleHashtable mAccessibleCache;
mutable AccessibleHashtable mAccessibleCache;
};


Expand Down
9 changes: 5 additions & 4 deletions addon-sdk/source/README
Expand Up @@ -6,7 +6,8 @@ Before proceeding, please make sure you've installed Python 2.5,

http://python.org/download/

Note that Python 3.0 and 3.1 are not supported in this release.
Note that Python 3 is not supported on any platform, and Python 2.7.6
is not supported on Windows.

For Windows users, MozillaBuild (https://wiki.mozilla.org/MozillaBuild)
will install the correct version of Python and the MSYS package, which
Expand All @@ -22,12 +23,12 @@ Windows users using cmd.exe should instead run:

bin\activate.bat

Then go to https://addons.mozilla.org/developers/docs/sdk/latest/dev-guide to
browse the SDK documentation.
Then go to https://developer.mozilla.org/en-US/Add-ons/SDK/
to browse the SDK documentation.

If you get an error when running cfx or have any other problems getting
started, see the "Troubleshooting" guide at:
https://addons.mozilla.org/en-US/developers/docs/sdk/latest/dev-guide/tutorials/troubleshooting.html
https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials/Troubleshooting

Bugs
-------
Expand Down
2 changes: 2 additions & 0 deletions addon-sdk/source/app-extension/bootstrap.js
Expand Up @@ -221,6 +221,8 @@ function startup(data, reasonCode) {
resultFile: options.resultFile,
// Arguments passed as --static-args
staticArgs: options.staticArgs,
// Add-on preferences branch name
preferencesBranch: options.preferencesBranch,

// Arguments related to test runner.
modules: {
Expand Down
2 changes: 1 addition & 1 deletion addon-sdk/source/lib/diffpatcher/diff.js
@@ -1,6 +1,6 @@
"use strict";

var method = require("method/core")
var method = require("../method/core")

// Method is designed to work with data structures representing application
// state. Calling it with a state should return object representing `delta`
Expand Down
2 changes: 1 addition & 1 deletion addon-sdk/source/lib/diffpatcher/patch.js
@@ -1,6 +1,6 @@
"use strict";

var method = require("method/core")
var method = require("../method/core")
var rebase = require("./rebase")

// Method is designed to work with data structures representing application
Expand Down
2 changes: 1 addition & 1 deletion addon-sdk/source/lib/sdk/content/mod.js
Expand Up @@ -8,7 +8,7 @@ module.metadata = {
};

const { Ci } = require("chrome");
const method = require("method/core");
const method = require("../../method/core");
const { add, remove, iterator } = require("../lang/weak-set");

let getTargetWindow = method("getTargetWindow");
Expand Down
2 changes: 1 addition & 1 deletion addon-sdk/source/lib/sdk/content/utils.js
Expand Up @@ -10,7 +10,7 @@ module.metadata = {
let { merge } = require('../util/object');
let assetsURI = require('../self').data.url();
let isArray = Array.isArray;
let method = require('method/core');
let method = require('../../method/core');

function isAddonContent({ contentURL }) {
return typeof(contentURL) === 'string' && contentURL.indexOf(assetsURI) === 0;
Expand Down
8 changes: 4 additions & 4 deletions addon-sdk/source/lib/sdk/self.js
Expand Up @@ -9,7 +9,7 @@ module.metadata = {

const { CC } = require('chrome');
const { id, name, prefixURI, rootURI, metadata,
version, loadReason } = require('@loader/options');
version, loadReason, preferencesBranch } = require('@loader/options');

const { readURISync } = require('./net/url');

Expand All @@ -24,16 +24,16 @@ const uri = (path="") =>
// associated unique URI string that can be used for that.
exports.uri = 'addon:' + id;
exports.id = id;
exports.preferencesBranch = preferencesBranch || id;
exports.name = name;
exports.loadReason = loadReason;
exports.version = version;
// If `rootURI` is jar:file://...!/ than add-on is packed.
exports.packed = rootURI.indexOf('jar:') === 0
exports.packed = (rootURI || '').indexOf('jar:') === 0;
exports.data = Object.freeze({
url: uri,
load: function read(path) {
return readURISync(uri(path));
}
});
exports.isPrivateBrowsingSupported = ((metadata.permissions || {})['private-browsing'] === true) ?
true : false;
exports.isPrivateBrowsingSupported = ((metadata || {}).permissions || {})['private-browsing'] === true;
4 changes: 2 additions & 2 deletions addon-sdk/source/lib/sdk/simple-prefs.js
Expand Up @@ -9,10 +9,10 @@ module.metadata = {

const { emit, off } = require("./event/core");
const { PrefsTarget } = require("./preferences/event-target");
const { id } = require("./self");
const { preferencesBranch, id } = require("./self");
const { on } = require("./system/events");

const ADDON_BRANCH = "extensions." + id + ".";
const ADDON_BRANCH = "extensions." + preferencesBranch + ".";
const BUTTON_PRESSED = id + "-cmdPressed";

const target = PrefsTarget({ branchName: ADDON_BRANCH });
Expand Down
1 change: 1 addition & 0 deletions addon-sdk/source/lib/sdk/ui/button/view.js
Expand Up @@ -142,6 +142,7 @@ function create(options) {
node.setAttribute('label', label);
node.setAttribute('tooltiptext', label);
node.setAttribute('image', image);
node.setAttribute('sdk-button', 'true');

views.set(id, {
area: this.currentArea,
Expand Down

0 comments on commit 1456827

Please sign in to comment.