mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-24 21:58:06 +00:00
Merge mozilla-central to tracemonkey.
This commit is contained in:
commit
da206523fd
@ -193,7 +193,6 @@ ifdef MOZ_CRASHREPORTER
|
||||
$(MAKE_SYM_STORE_PATH) > \
|
||||
$(DIST)/crashreporter-symbols/$(SYMBOL_INDEX_NAME)
|
||||
echo packing symbols
|
||||
mkdir -p $(topsrcdir)/../$(BUILDID)
|
||||
cd $(DIST)/crashreporter-symbols && \
|
||||
zip -r9D ../"$(SYMBOL_ARCHIVE_BASENAME).zip" .
|
||||
endif # MOZ_CRASHREPORTER
|
||||
|
@ -46,15 +46,12 @@ include $(DEPTH)/config/autoconf.mk
|
||||
MODULE = accessibility
|
||||
LIBRARY_NAME = accessibility
|
||||
EXPORT_LIBRARY = 1
|
||||
ifneq ($(OS_ARCH),WINNT)
|
||||
SHORT_LIBNAME = access
|
||||
endif
|
||||
IS_COMPONENT = 1
|
||||
MODULE_NAME = nsAccessibilityModule
|
||||
GRE_MODULE = 1
|
||||
LIBXUL_LIBRARY = 1
|
||||
|
||||
|
||||
CPPSRCS = nsAccessibilityFactory.cpp
|
||||
|
||||
LOCAL_INCLUDES = -I$(srcdir)/../src
|
||||
|
@ -203,9 +203,8 @@ public:
|
||||
|
||||
/**
|
||||
* Set accessible parent.
|
||||
* XXX: shouldn't be virtual, bug 496783
|
||||
*/
|
||||
virtual void SetParent(nsIAccessible *aParent);
|
||||
void SetParent(nsIAccessible *aParent);
|
||||
|
||||
/**
|
||||
* Set first accessible child.
|
||||
|
@ -232,9 +232,10 @@ nsresult
|
||||
nsHTMLLIAccessible::Shutdown()
|
||||
{
|
||||
if (mBulletAccessible) {
|
||||
// Ensure that weak pointer to this is nulled out
|
||||
// Ensure that pointer to this is nulled out.
|
||||
mBulletAccessible->Shutdown();
|
||||
}
|
||||
|
||||
nsresult rv = nsLinkableAccessible::Shutdown();
|
||||
mBulletAccessible = nsnull;
|
||||
return rv;
|
||||
@ -283,7 +284,7 @@ void nsHTMLLIAccessible::CacheChildren()
|
||||
|
||||
if (mBulletAccessible) {
|
||||
mBulletAccessible->SetNextSibling(mFirstChild);
|
||||
mBulletAccessible->SetParent(this); // Set weak parent;
|
||||
mBulletAccessible->SetParent(this);
|
||||
SetFirstChild(mBulletAccessible);
|
||||
++ mAccChildCount;
|
||||
}
|
||||
@ -294,8 +295,7 @@ void nsHTMLLIAccessible::CacheChildren()
|
||||
nsHTMLListBulletAccessible::
|
||||
nsHTMLListBulletAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell,
|
||||
const nsAString& aBulletText) :
|
||||
nsLeafAccessible(aDomNode, aShell), mWeakParent(nsnull),
|
||||
mBulletText(aBulletText)
|
||||
nsLeafAccessible(aDomNode, aShell), mBulletText(aBulletText)
|
||||
{
|
||||
mBulletText += ' '; // Otherwise bullets are jammed up against list text
|
||||
}
|
||||
@ -312,8 +312,6 @@ nsresult
|
||||
nsHTMLListBulletAccessible::Shutdown()
|
||||
{
|
||||
mBulletText.Truncate();
|
||||
mWeakParent = nsnull;
|
||||
|
||||
return nsLeafAccessible::Shutdown();
|
||||
}
|
||||
|
||||
@ -343,17 +341,12 @@ nsHTMLListBulletAccessible::GetStateInternal(PRUint32 *aState, PRUint32 *aExtraS
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
nsHTMLListBulletAccessible::SetParent(nsIAccessible *aParent)
|
||||
{
|
||||
mParent = nsnull;
|
||||
mWeakParent = aParent;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLListBulletAccessible::GetParent(nsIAccessible **aParentAccessible)
|
||||
nsHTMLListBulletAccessible::GetParent(nsIAccessible **aParent)
|
||||
{
|
||||
NS_IF_ADDREF(*aParentAccessible = mWeakParent);
|
||||
NS_ENSURE_ARG_POINTER(aParent);
|
||||
|
||||
NS_IF_ADDREF(*aParent = mParent);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -109,11 +109,7 @@ public:
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetName(nsAString& aName);
|
||||
|
||||
// Don't cache via unique ID -- bullet accessible shares the same dom node as
|
||||
// this LI accessible. Also, don't cache via mParent/SetParent(), prevent
|
||||
// circular reference since li holds onto us.
|
||||
NS_IMETHOD GetParent(nsIAccessible **aParentAccessible);
|
||||
NS_IMETHOD GetParent(nsIAccessible **aParent);
|
||||
|
||||
// nsAccessNode
|
||||
virtual nsresult Shutdown();
|
||||
@ -121,7 +117,6 @@ public:
|
||||
// nsAccessible
|
||||
virtual nsresult GetRoleInternal(PRUint32 *aRole);
|
||||
virtual nsresult GetStateInternal(PRUint32 *aState, PRUint32 *aExtraState);
|
||||
virtual void SetParent(nsIAccessible *aParent);
|
||||
virtual nsresult AppendTextTo(nsAString& aText, PRUint32 aStartOffset,
|
||||
PRUint32 aLength);
|
||||
|
||||
@ -132,7 +127,6 @@ protected:
|
||||
// nsIAnonymousFrame::GetText() ? However, in practice storing the bullet text
|
||||
// here should not be a problem if we invalidate the right parts of
|
||||
// the accessibility cache when mutation events occur.
|
||||
nsIAccessible *mWeakParent;
|
||||
nsString mBulletText;
|
||||
};
|
||||
|
||||
|
@ -1234,6 +1234,10 @@ nsXULTreeGridCellAccessible::GetAttributesInternal(nsIPersistentProperties *aAtt
|
||||
mParent->GetParent(getter_AddRefs(accessible));
|
||||
nsCOMPtr<nsIAccessibleTable> tableAccessible = do_QueryInterface(accessible);
|
||||
|
||||
// XXX - temp fix for crash bug 516047
|
||||
if (!tableAccessible)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
PRInt32 colIdx = GetColumnIndex();
|
||||
|
||||
PRInt32 cellIdx = -1;
|
||||
|
@ -68,7 +68,6 @@ _TEST_FILES =\
|
||||
states.js \
|
||||
table.js \
|
||||
value.js \
|
||||
test_accessnode_invalidation.html \
|
||||
test_actions.xul \
|
||||
test_actions_anchors.html \
|
||||
test_actions_aria.html \
|
||||
@ -103,6 +102,8 @@ _TEST_FILES =\
|
||||
test_events_valuechange.html \
|
||||
test_groupattrs.xul \
|
||||
test_groupattrs.html \
|
||||
test_invalidate_accessnode.html \
|
||||
test_invalidate_elmli.html \
|
||||
test_name.html \
|
||||
test_name.xul \
|
||||
test_name_button.html \
|
||||
|
@ -95,9 +95,9 @@ const WIN = (navigator.platform.indexOf("Win") != -1)? true : false;
|
||||
var gAccRetrieval = null;
|
||||
|
||||
/**
|
||||
* Invokes the given function when document is loaded. Preferable to mochitests
|
||||
* 'addLoadEvent' function -- additionally ensures state of the document
|
||||
* accessible is not busy.
|
||||
* Invokes the given function when document is loaded and focused. Preferable
|
||||
* to mochitests 'addLoadEvent' function -- additionally ensures state of the
|
||||
* document accessible is not busy.
|
||||
*
|
||||
* @param aFunc the function to invoke
|
||||
*/
|
||||
@ -120,7 +120,7 @@ function addA11yLoadEvent(aFunc)
|
||||
);
|
||||
}
|
||||
|
||||
addLoadEvent(waitForDocLoad);
|
||||
SimpleTest.waitForFocus(waitForDocLoad);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -34,17 +34,26 @@ function waitForEvent(aEventType, aTarget, aFunc, aContext, aArg1, aArg2)
|
||||
{
|
||||
var handler = {
|
||||
handleEvent: function handleEvent(aEvent) {
|
||||
if (!aTarget || aTarget == aEvent.DOMNode) {
|
||||
unregisterA11yEventListener(aEventType, this);
|
||||
|
||||
window.setTimeout(
|
||||
function ()
|
||||
{
|
||||
aFunc.call(aContext, aArg1, aArg2);
|
||||
},
|
||||
0
|
||||
);
|
||||
if (aTarget) {
|
||||
if (aTarget instanceof nsIAccessible &&
|
||||
aTarget != aEvent.accessible)
|
||||
return;
|
||||
|
||||
if (aTarget instanceof nsIDOMNode &&
|
||||
aTarget != aEvent.DOMNode)
|
||||
return;
|
||||
}
|
||||
|
||||
unregisterA11yEventListener(aEventType, this);
|
||||
|
||||
window.setTimeout(
|
||||
function ()
|
||||
{
|
||||
aFunc.call(aContext, aArg1, aArg2);
|
||||
},
|
||||
0
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@ -91,6 +100,12 @@ function unregisterA11yEventListener(aEventType, aEventHandler)
|
||||
*/
|
||||
const INVOKER_ACTION_FAILED = 1;
|
||||
|
||||
/**
|
||||
* Return value of eventQueue.onFinish. Indicates eventQueue should not finish
|
||||
* tests.
|
||||
*/
|
||||
const DO_NOT_FINISH_TEST = 1;
|
||||
|
||||
/**
|
||||
* Common invoker checker (see eventSeq of eventQueue).
|
||||
*/
|
||||
@ -145,8 +160,8 @@ function invokerChecker(aEventType, aTarget)
|
||||
* getID: function(){} // returns invoker ID
|
||||
* };
|
||||
*
|
||||
* @param aEventType [optional] the default event type (isn't used if
|
||||
* invoker defines eventSeq property).
|
||||
* @param aEventType [in, optional] the default event type (isn't used if
|
||||
* invoker defines eventSeq property).
|
||||
*/
|
||||
function eventQueue(aEventType)
|
||||
{
|
||||
@ -240,8 +255,10 @@ function eventQueue(aEventType)
|
||||
gA11yEventApplicantsCount--;
|
||||
listenA11yEvents(false);
|
||||
|
||||
this.onFinish();
|
||||
SimpleTest.finish();
|
||||
var res = this.onFinish();
|
||||
if (res != DO_NOT_FINISH_TEST)
|
||||
SimpleTest.finish();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -521,6 +538,54 @@ function eventQueue(aEventType)
|
||||
this.mEventSeqIdx = -1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deal with action sequence. Used when you need to execute couple of actions
|
||||
* each after other one.
|
||||
*/
|
||||
function sequence()
|
||||
{
|
||||
/**
|
||||
* Append new sequence item.
|
||||
*
|
||||
* @param aProcessor [in] object implementing interface
|
||||
* {
|
||||
* // execute item action
|
||||
* process: function() {},
|
||||
* // callback, is called when item was processed
|
||||
* onProcessed: function() {}
|
||||
* };
|
||||
* @param aEventType [in] event type of expected event on item action
|
||||
* @param aTarget [in] event target of expected event on item action
|
||||
* @param aItemID [in] identifier of item
|
||||
*/
|
||||
this.append = function sequence_append(aProcessor, aEventType, aTarget,
|
||||
aItemID)
|
||||
{
|
||||
var item = new sequenceItem(aProcessor, aEventType, aTarget, aItemID);
|
||||
this.items.push(item);
|
||||
}
|
||||
|
||||
/**
|
||||
* Process next sequence item.
|
||||
*/
|
||||
this.processNext = function sequence_processNext()
|
||||
{
|
||||
this.idx++;
|
||||
if (this.idx >= this.items.length) {
|
||||
ok(false, "End of sequence: nothing to process!");
|
||||
SimpleTest.finish();
|
||||
return;
|
||||
}
|
||||
|
||||
this.items[this.idx].startProcess();
|
||||
}
|
||||
|
||||
this.items = new Array();
|
||||
this.idx = -1;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Private implementation details.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -637,3 +702,42 @@ function dumpInfoToDOM(aInfo, aDumpNode)
|
||||
container.textContent = aInfo;
|
||||
dumpElm.appendChild(container);
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Sequence
|
||||
|
||||
/**
|
||||
* Base class of sequence item.
|
||||
*/
|
||||
function sequenceItem(aProcessor, aEventType, aTarget, aItemID)
|
||||
{
|
||||
// private
|
||||
|
||||
this.startProcess = function sequenceItem_startProcess()
|
||||
{
|
||||
this.queue.invoke();
|
||||
}
|
||||
|
||||
var item = this;
|
||||
|
||||
this.queue = new eventQueue();
|
||||
this.queue.onFinish = function()
|
||||
{
|
||||
aProcessor.onProcessed();
|
||||
return DO_NOT_FINISH_TEST;
|
||||
}
|
||||
|
||||
var invoker = {
|
||||
invoke: function invoker_invoke() {
|
||||
return aProcessor.process();
|
||||
},
|
||||
getID: function invoker_getID()
|
||||
{
|
||||
return aItemID;
|
||||
},
|
||||
eventSeq: [ new invokerChecker(aEventType, aTarget) ]
|
||||
};
|
||||
|
||||
this.queue.push(invoker);
|
||||
}
|
||||
|
@ -38,6 +38,7 @@ const ROLE_ROW = nsIAccessibleRole.ROLE_ROW;
|
||||
const ROLE_ROWHEADER = nsIAccessibleRole.ROLE_ROWHEADER;
|
||||
const ROLE_SECTION = nsIAccessibleRole.ROLE_SECTION;
|
||||
const ROLE_SLIDER = nsIAccessibleRole.ROLE_SLIDER;
|
||||
const ROLE_STATICTEXT = nsIAccessibleRole.ROLE_STATICTEXT;
|
||||
const ROLE_TABLE = nsIAccessibleRole.ROLE_TABLE;
|
||||
const ROLE_TEXT_CONTAINER = nsIAccessibleRole.ROLE_TEXT_CONTAINER;
|
||||
const ROLE_TEXT_LEAF = nsIAccessibleRole.ROLE_TEXT_LEAF;
|
||||
|
@ -67,7 +67,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
]]>
|
||||
</script>
|
||||
|
||||
|
@ -122,7 +122,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
@ -54,7 +54,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
@ -48,7 +48,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=429547
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -31,7 +31,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=429666
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -38,7 +38,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=428479
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -60,7 +60,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=469688
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -27,7 +27,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
]]>
|
||||
</script>
|
||||
|
||||
|
@ -171,7 +171,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=452388
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -79,7 +79,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=420863
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -46,7 +46,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=460932
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -39,7 +39,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
@ -37,7 +37,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=483573
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -45,7 +45,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
]]>
|
||||
</script>
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -167,9 +167,10 @@
|
||||
|
||||
function doTests()
|
||||
{
|
||||
todo(false, "enable commented tests Bug 510128 is fixed");
|
||||
// test no focused accessibles
|
||||
testCaretOffset("textbox", -1);
|
||||
testCaretOffset("textarea", -1);
|
||||
//testCaretOffset("textbox", -1);
|
||||
//testCaretOffset("textarea", -1);
|
||||
testCaretOffset("p", -1);
|
||||
|
||||
// test caret move events and caret offsets
|
||||
@ -201,7 +202,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTests);
|
||||
addA11yLoadEvent(doTests);
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
@ -49,7 +49,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTests);
|
||||
addA11yLoadEvent(doTests);
|
||||
</script>
|
||||
|
||||
<hbox flex="1" style="overflow: auto;">
|
||||
|
@ -60,7 +60,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -55,7 +55,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
]]>
|
||||
</script>
|
||||
|
||||
|
@ -67,7 +67,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=434464
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
168
accessible/tests/mochitest/test_invalidate_elmli.html
Normal file
168
accessible/tests/mochitest/test_invalidate_elmli.html
Normal file
@ -0,0 +1,168 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Test HTML li and listitem bullet accessible cache</title>
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
||||
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/a11y/accessible/common.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/a11y/accessible/role.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/a11y/accessible/events.js"></script>
|
||||
|
||||
<script type="application/javascript">
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Helpers
|
||||
|
||||
function testDefunctAccessible(aAcc, aNodeOrId)
|
||||
{
|
||||
if (aNodeOrId)
|
||||
ok(!isAccessible(aNodeOrId),
|
||||
"Accessible for " + aNodeOrId + " wasn't properly shut down!");
|
||||
|
||||
ok(!aAcc.firstChild, "There is first child for shut down accessible!");
|
||||
ok(!aAcc.lastChild, "There is last child for shut down accessible!");
|
||||
ok(!aAcc.children.length, "There are children for shut down accessible!");
|
||||
|
||||
// nextSibling
|
||||
var success = false;
|
||||
try {
|
||||
aAcc.nextSibling;
|
||||
} catch (e) {
|
||||
success = (e.result == Components.results.NS_ERROR_FAILURE);
|
||||
}
|
||||
|
||||
ok(success, "There is next sibling for shut down accessible!");
|
||||
|
||||
// previousSibling
|
||||
var success = false;
|
||||
try {
|
||||
aAcc.previousSibling;
|
||||
} catch (e) {
|
||||
success = (e.result == Components.results.NS_ERROR_FAILURE);
|
||||
}
|
||||
|
||||
ok(success, "There is previous sibling for shut down accessible!");
|
||||
|
||||
// parent
|
||||
var success = false;
|
||||
try {
|
||||
aAcc.parent;
|
||||
} catch (e) {
|
||||
success = (e.result == Components.results.NS_ERROR_FAILURE);
|
||||
}
|
||||
|
||||
ok(success, "There is parent for shut down accessible!");
|
||||
}
|
||||
|
||||
function testLiAccessibleTree()
|
||||
{
|
||||
// Test accessible tree.
|
||||
var accTree = {
|
||||
role: ROLE_LISTITEM,
|
||||
children: [
|
||||
{
|
||||
role: ROLE_STATICTEXT,
|
||||
children: []
|
||||
},
|
||||
{
|
||||
role: ROLE_TEXT_LEAF,
|
||||
children: []
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
testAccessibleTree("li", accTree);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Sequence item processors
|
||||
|
||||
function hideProcessor()
|
||||
{
|
||||
this.liNode = getNode("li");
|
||||
this.li = getAccessible(this.liNode);
|
||||
this.bullet = this.li.firstChild;
|
||||
|
||||
this.process = function hideProcessor_process()
|
||||
{
|
||||
this.liNode.style.display = "none";
|
||||
}
|
||||
|
||||
this.onProcessed = function hideProcessor_onProcessed()
|
||||
{
|
||||
window.setTimeout(
|
||||
function(aArg1, aArg2)
|
||||
{
|
||||
testDefunctAccessible(aArg1, aArg2);
|
||||
gSequence.processNext();
|
||||
},
|
||||
0, this.li, this.liNode
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
function showProcessor()
|
||||
{
|
||||
this.liNode = getNode("li");
|
||||
|
||||
this.process = function showProcessor_process()
|
||||
{
|
||||
this.liNode.style.display = "list-item";
|
||||
}
|
||||
|
||||
this.onProcessed = function showProcessor_onProcessed()
|
||||
{
|
||||
testLiAccessibleTree();
|
||||
SimpleTest.finish();
|
||||
}
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Test
|
||||
|
||||
var gSequence = null;
|
||||
|
||||
function doTest()
|
||||
{
|
||||
testLiAccessibleTree();
|
||||
|
||||
gSequence = new sequence();
|
||||
|
||||
gSequence.append(new hideProcessor(), EVENT_HIDE, getAccessible("li"),
|
||||
"hide HTML li");
|
||||
gSequence.append(new showProcessor(), EVENT_SHOW, getNode("li"),
|
||||
"show HTML li");
|
||||
|
||||
gSequence.processNext(); // SimpleTest.finish() will be called in the end
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a target="_blank"
|
||||
title="setParent shouldn't be virtual"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id=496783">Mozilla Bug 496783</a>
|
||||
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none"></div>
|
||||
<pre id="test">
|
||||
</pre>
|
||||
|
||||
<ul>
|
||||
<li id="li">item1</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
@ -173,7 +173,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
@ -176,7 +176,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
]]>
|
||||
</script>
|
||||
|
||||
|
@ -66,7 +66,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
@ -44,7 +44,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
@ -33,7 +33,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
@ -72,7 +72,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=441737
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -73,7 +73,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=452161
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -247,7 +247,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=418368
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body><a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=418368">Mozilla Bug 418368</a
|
||||
|
@ -71,7 +71,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
]]>
|
||||
</script>
|
||||
|
||||
|
@ -64,7 +64,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=428248
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -160,7 +160,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=429659
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -44,7 +44,7 @@
|
||||
SimpleTest.finish();
|
||||
}
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -55,7 +55,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Helpers
|
||||
|
@ -154,7 +154,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
@ -73,7 +73,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=441519
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -84,7 +84,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=391829
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -107,7 +107,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
@ -120,7 +120,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
]]>
|
||||
</script>
|
||||
|
||||
|
@ -50,7 +50,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=472326
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTests);
|
||||
addA11yLoadEvent(doTests);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -32,7 +32,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=474281
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTests);
|
||||
addA11yLoadEvent(doTests);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -73,7 +73,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
@ -56,7 +56,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=509696
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
@ -27,7 +27,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=454997
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
@ -45,7 +45,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
@ -68,7 +68,7 @@ function doTest()
|
||||
SimpleTest.finish();
|
||||
}
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body >
|
||||
|
@ -79,7 +79,7 @@ function doTest()
|
||||
SimpleTest.finish();
|
||||
}
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
@ -123,7 +123,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
@ -83,7 +83,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
@ -115,7 +115,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
]]>
|
||||
</script>
|
||||
|
||||
|
@ -134,7 +134,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=410052
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -31,7 +31,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
]]>
|
||||
</script>
|
||||
|
||||
|
@ -93,7 +93,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -57,7 +57,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -172,7 +172,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
]]>
|
||||
</script>
|
||||
|
||||
|
@ -73,7 +73,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -54,7 +54,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
@ -47,7 +47,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
]]>
|
||||
</script>
|
||||
|
||||
|
@ -155,7 +155,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=442648
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -185,7 +185,7 @@
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addA11yLoadEvent(doTest);
|
||||
]]>
|
||||
</script>
|
||||
|
||||
|
1
aclocal.m4
vendored
1
aclocal.m4
vendored
@ -12,6 +12,7 @@ builtin(include, build/autoconf/freetype2.m4)dnl
|
||||
builtin(include, build/autoconf/codeset.m4)dnl
|
||||
builtin(include, build/autoconf/altoptions.m4)dnl
|
||||
builtin(include, build/autoconf/mozprog.m4)dnl
|
||||
builtin(include, build/autoconf/acwinpaths.m4)dnl
|
||||
|
||||
MOZ_PROG_CHECKMSYS()
|
||||
|
||||
|
@ -86,13 +86,12 @@ include $(topsrcdir)/config/rules.mk
|
||||
else
|
||||
# Build a binary bootstrapping with XRE_main
|
||||
|
||||
ifeq ($(USE_SHORT_LIBNAME), 1)
|
||||
ifneq (,$(filter OS2 WINCE WINNT,$(OS_ARCH)))
|
||||
PROGRAM = $(MOZ_APP_NAME)$(BIN_SUFFIX)
|
||||
else
|
||||
PROGRAM = $(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
|
||||
endif
|
||||
|
||||
|
||||
CPPSRCS = nsBrowserApp.cpp
|
||||
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
|
||||
@ -105,14 +104,14 @@ STATIC_COMPONENTS_LINKER_PATH = -L$(DEPTH)/staticlib
|
||||
endif
|
||||
LIBS += $(DEPTH)/toolkit/xre/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX)
|
||||
else
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
LIBS += $(DIST)/bin/XUL
|
||||
else
|
||||
EXTRA_DSO_LIBS += xul
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
TK_LIBS := $(TK_LIBS)
|
||||
endif
|
||||
|
||||
@ -292,6 +291,12 @@ libs::
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef WINCE
|
||||
ifdef MOZ_FASTSTART
|
||||
libs::
|
||||
cp -f $(DIST)/bin/faststartstub.exe $(DIST)/bin/$(MOZ_APP_NAME)faststart.exe
|
||||
endif
|
||||
endif
|
||||
|
||||
libs::
|
||||
touch $(DIST)/bin/.autoreg
|
||||
@ -302,7 +307,7 @@ libs:: $(srcdir)/profile/prefs.js
|
||||
libs:: $(srcdir)/blocklist.xml
|
||||
$(INSTALL) $(IFLAGS1) $^ $(DIST)/bin
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
|
||||
APP_NAME = $(MOZ_APP_DISPLAYNAME)
|
||||
|
||||
|
@ -89,8 +89,16 @@ pref("extensions.blocklist.detailsURL", "https://www.mozilla.com/%LOCALE%/blockl
|
||||
// Dictionary download preference
|
||||
pref("browser.dictionaries.download.url", "https://%LOCALE%.add-ons.mozilla.com/%LOCALE%/firefox/%VERSION%/dictionaries/");
|
||||
|
||||
// Update Timer Manager preferences
|
||||
// Interval: When all registered timers should be checked (in milliseconds)
|
||||
// default=10 minutes
|
||||
pref("app.update.timer", 600000);
|
||||
|
||||
// App-specific update preferences
|
||||
|
||||
// The interval to check for updates (app.update.interval) is defined in
|
||||
// firefox-branding.js
|
||||
|
||||
// Whether or not app updates are enabled
|
||||
pref("app.update.enabled", true);
|
||||
|
||||
@ -127,9 +135,6 @@ pref("app.update.url", "https://aus2.mozilla.org/update/3/%PRODUCT%/%VERSION%/%B
|
||||
// latest download (in seconds) default=1 day
|
||||
pref("app.update.nagTimer.restart", 86400);
|
||||
|
||||
// Interval: When all registered timers should be checked (in milliseconds)
|
||||
// default=10 minutes
|
||||
pref("app.update.timer", 600000);
|
||||
// Give the user x seconds to react before showing the big UI. default=12 hours
|
||||
pref("app.update.promptWaitTime", 43200);
|
||||
// Show the Update Checking/Ready UI when the user was idle for x seconds
|
||||
@ -153,7 +158,6 @@ pref("app.update.incompatible.mode", 0);
|
||||
// e.g.
|
||||
// extensions.{GUID}.update.enabled
|
||||
// extensions.{GUID}.update.url
|
||||
// extensions.{GUID}.update.interval
|
||||
// .. etc ..
|
||||
//
|
||||
pref("extensions.update.enabled", true);
|
||||
@ -171,8 +175,8 @@ pref("extensions.dss.switchPending", false); // Non-dynamic switch pending af
|
||||
pref("extensions.{972ce4c6-7e08-4474-a285-3208198ce6fd}.name", "chrome://browser/locale/browser.properties");
|
||||
pref("extensions.{972ce4c6-7e08-4474-a285-3208198ce6fd}.description", "chrome://browser/locale/browser.properties");
|
||||
|
||||
pref("xpinstall.whitelist.add", "update.mozilla.org");
|
||||
pref("xpinstall.whitelist.add.103", "addons.mozilla.org");
|
||||
pref("xpinstall.whitelist.add", "addons.mozilla.org");
|
||||
pref("xpinstall.whitelist.add.36", "getpersonas.com");
|
||||
|
||||
pref("keyword.enabled", true);
|
||||
pref("keyword.URL", "chrome://browser-region/locale/region.properties");
|
||||
|
@ -68,7 +68,7 @@ DEFINES += \
|
||||
-DPRE_RELEASE_SUFFIX="$(PRE_RELEASE_SUFFIX)" \
|
||||
$(NULL)
|
||||
|
||||
ifneq (,$(filter windows gtk2 mac cocoa, $(MOZ_WIDGET_TOOLKIT)))
|
||||
ifneq (,$(filter windows gtk2 cocoa, $(MOZ_WIDGET_TOOLKIT)))
|
||||
DEFINES += -DHAVE_SHELL_SERVICE=1
|
||||
endif
|
||||
|
||||
@ -76,7 +76,7 @@ ifdef MOZ_UPDATER
|
||||
DEFINES += -DMOZ_UPDATER=1
|
||||
endif
|
||||
|
||||
ifneq (,$(filter windows mac cocoa gtk2, $(MOZ_WIDGET_TOOLKIT)))
|
||||
ifneq (,$(filter windows cocoa gtk2, $(MOZ_WIDGET_TOOLKIT)))
|
||||
ifneq ($(OS_ARCH),WINCE)
|
||||
DEFINES += -DCONTEXT_COPY_IMAGE_CONTENTS=1
|
||||
endif
|
||||
|
452
browser/base/content/aboutSupport.xhtml
Normal file
452
browser/base/content/aboutSupport.xhtml
Normal file
@ -0,0 +1,452 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is aboutSupport.xhtml.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Mozilla Corporation
|
||||
# Portions created by the Initial Developer are Copyright (C) 2009
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Curtis Bartley <cbartley@mozilla.com>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
<!DOCTYPE html [
|
||||
<!ENTITY % htmlDTD PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> %htmlDTD;
|
||||
<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd"> %globalDTD;
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd"> %brandDTD;
|
||||
<!ENTITY % aboutSupportDTD SYSTEM "chrome://browser/locale/aboutSupport.dtd"> %aboutSupportDTD;
|
||||
]>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>&aboutSupport.pageTitle;</title>
|
||||
|
||||
<style type="text/css"><![CDATA[
|
||||
|
||||
html {
|
||||
background-color: -moz-Field;
|
||||
color: -moz-FieldText;
|
||||
font: message-box;
|
||||
}
|
||||
|
||||
body {
|
||||
text-align: justify;
|
||||
width: 90%;
|
||||
margin-left: 5%;
|
||||
margin-right: 5%;
|
||||
}
|
||||
|
||||
.page-subtitle {
|
||||
margin-bottom: 3em;
|
||||
}
|
||||
|
||||
.major-section {
|
||||
margin-top: 2em;
|
||||
margin-bottom: 1em;
|
||||
font-size: large;
|
||||
text-align: start;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
table {
|
||||
background-color: -moz-Dialog;
|
||||
color: -moz-DialogText;
|
||||
font: message-box;
|
||||
text-align: start;
|
||||
width: 100%;
|
||||
border: 1px solid ThreeDShadow;
|
||||
border-spacing: 0px;
|
||||
}
|
||||
|
||||
th, td {
|
||||
border: 1px dotted ThreeDShadow;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
thead th {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: start;
|
||||
background-color: Highlight;
|
||||
color: HighlightText;
|
||||
}
|
||||
|
||||
th.column {
|
||||
white-space: nowrap;
|
||||
width: 0px;
|
||||
}
|
||||
|
||||
td {
|
||||
text-align: start;
|
||||
border-top: 1px dotted ThreeDShadow;
|
||||
}
|
||||
|
||||
.prefs-table {
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
.pref-name {
|
||||
width: 70%;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.pref-value {
|
||||
width: 30%;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
]]></style>
|
||||
|
||||
<script type="application/javascript;version=1.7"><![CDATA[
|
||||
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
|
||||
window.onload = function () {
|
||||
// Get the FUEL Application object.
|
||||
let Application = Cc["@mozilla.org/fuel/application;1"]
|
||||
.getService(Ci.fuelIApplication);
|
||||
|
||||
// Get the support URL.
|
||||
let urlFormatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"]
|
||||
.getService(Ci.nsIURLFormatter);
|
||||
let supportUrl = urlFormatter.formatURLPref("app.support.baseURL");
|
||||
|
||||
// Get the profile directory.
|
||||
let propertiesService = Cc["@mozilla.org/file/directory_service;1"]
|
||||
.getService(Ci.nsIProperties);
|
||||
let currProfD = propertiesService.get("ProfD", Ci.nsIFile);
|
||||
let profileDir = currProfD.path;
|
||||
|
||||
// Update the application basics section.
|
||||
document.getElementById("application-box").textContent = Application.name;
|
||||
document.getElementById("version-box").textContent = Application.version;
|
||||
document.getElementById("profile-box").textContent = profileDir;
|
||||
document.getElementById("supportLink").href = supportUrl;
|
||||
|
||||
// Update the other sections.
|
||||
populateExtensionsSection();
|
||||
populatePreferencesSection();
|
||||
}
|
||||
|
||||
function populateExtensionsSection() {
|
||||
let extensions = Application.extensions.all;
|
||||
let trExtensions = [];
|
||||
for (let i = 0; i < extensions.length; i++) {
|
||||
let extension = extensions[i];
|
||||
let tr = createParentElement("tr", [
|
||||
createElement("td", extension.name),
|
||||
createElement("td", extension.version),
|
||||
createElement("td", extension.enabled),
|
||||
createElement("td", extension.id),
|
||||
]);
|
||||
trExtensions.push(tr);
|
||||
}
|
||||
appendChildren(document.getElementById("extensions-tbody"), trExtensions);
|
||||
}
|
||||
|
||||
function populatePreferencesSection() {
|
||||
let modifiedPrefs = getModifiedPrefs();
|
||||
|
||||
function comparePrefs(pref1, pref2) {
|
||||
if (pref1.name < pref2.name)
|
||||
return -1;
|
||||
if (pref1.name > pref2.name)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
let sortedPrefs = modifiedPrefs.sort(comparePrefs);
|
||||
|
||||
let trPrefs = [];
|
||||
for each (let pref in sortedPrefs) {
|
||||
let tdName = createElement("td", pref.name, "pref-name");
|
||||
let tdValue = createElement("td", pref.value, "pref-value");
|
||||
let tr = createParentElement("tr", [tdName, tdValue]);
|
||||
trPrefs.push(tr);
|
||||
}
|
||||
|
||||
appendChildren(document.getElementById("prefs-tbody"), trPrefs);
|
||||
}
|
||||
|
||||
function getModifiedPrefs() {
|
||||
// We use the low-level prefs API to identify prefs that have been
|
||||
// modified, rather that Application.prefs.all since the latter is
|
||||
// much, much slower. Application.prefs.all also gets slower each
|
||||
// time it's called. See bug 517312.
|
||||
let prefService = Cc["@mozilla.org/preferences-service;1"]
|
||||
.getService(Ci.nsIPrefService);
|
||||
let prefRootBranch = prefService.getBranch("");
|
||||
let prefNames = prefRootBranch.getChildList("", { value: 0 });
|
||||
let prefs = [Application.prefs.get(prefName)
|
||||
for each (prefName in prefNames)
|
||||
if (prefRootBranch.prefHasUserValue(prefName))];
|
||||
return prefs;
|
||||
}
|
||||
|
||||
function createParentElement(tagName, childElems) {
|
||||
let elem = document.createElement(tagName);
|
||||
appendChildren(elem, childElems);
|
||||
return elem;
|
||||
}
|
||||
|
||||
function createElement(tagName, textContent, opt_class) {
|
||||
let elem = document.createElement(tagName);
|
||||
elem.textContent = textContent;
|
||||
elem.className = opt_class || "";
|
||||
return elem;
|
||||
}
|
||||
|
||||
function appendChildren(parentElem, childNodes) {
|
||||
for (let i = 0; i < childNodes.length; i++)
|
||||
parentElem.appendChild(childNodes[i]);
|
||||
}
|
||||
|
||||
function copyContentsToClipboard() {
|
||||
// Get the HTML and text representations for the important part of the page.
|
||||
let contentsDiv = document.getElementById("contents");
|
||||
let dataHtml = contentsDiv.innerHTML;
|
||||
let dataText = createTextForElement(contentsDiv);
|
||||
|
||||
// We can't use plain strings, we have to use nsSupportsString.
|
||||
let supportsStringClass = Cc["@mozilla.org/supports-string;1"];
|
||||
let ssHtml = supportsStringClass.createInstance(Ci.nsISupportsString);
|
||||
let ssText = supportsStringClass.createInstance(Ci.nsISupportsString);
|
||||
|
||||
let transferable = Cc["@mozilla.org/widget/transferable;1"]
|
||||
.createInstance(Ci.nsITransferable);
|
||||
|
||||
// Add the HTML flavor.
|
||||
transferable.addDataFlavor("text/html");
|
||||
ssHtml.data = dataHtml;
|
||||
transferable.setTransferData("text/html", ssHtml, dataHtml.length * 2);
|
||||
|
||||
// Add the plain text flavor.
|
||||
transferable.addDataFlavor("text/unicode");
|
||||
ssText.data = dataText;
|
||||
transferable.setTransferData("text/unicode", ssText, dataText.length * 2);
|
||||
|
||||
// Store the data into the clipboard.
|
||||
let clipboard = Cc["@mozilla.org/widget/clipboard;1"]
|
||||
.getService(Ci.nsIClipboard);
|
||||
clipboard.setData(transferable, null, clipboard.kGlobalClipboard);
|
||||
}
|
||||
|
||||
// Return the plain text representation of an element. Do a little bit
|
||||
// of pretty-printing to make it human-readable.
|
||||
function createTextForElement(elem) {
|
||||
// Generate the initial text.
|
||||
let textFragmentAccumulator = [];
|
||||
generateTextForElement(elem, "", textFragmentAccumulator);
|
||||
let text = textFragmentAccumulator.join("");
|
||||
|
||||
// Trim extraneous whitespace before newlines, then squash extraneous
|
||||
// blank lines.
|
||||
text = text.replace(/[ \t]+\n/g, "\n");
|
||||
text = text.replace(/\n\n\n*/g, "\n\n");
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
function generateTextForElement(elem, indent, textFragmentAccumulator) {
|
||||
// Add a little extra spacing around most elements.
|
||||
if (elem.tagName != "td")
|
||||
textFragmentAccumulator.push("\n");
|
||||
|
||||
// Generate the text representation for each child node.
|
||||
let node = elem.firstChild;
|
||||
while (node) {
|
||||
|
||||
if (node.nodeType == Node.TEXT_NODE) {
|
||||
// Text belonging to this element uses its indentation level.
|
||||
generateTextForTextNode(node, indent, textFragmentAccumulator);
|
||||
}
|
||||
else if (node.nodeType == Node.ELEMENT_NODE) {
|
||||
// Recurse on the child element with an extra level of indentation.
|
||||
generateTextForElement(node, indent + " ", textFragmentAccumulator);
|
||||
}
|
||||
|
||||
// Advance!
|
||||
node = node.nextSibling;
|
||||
}
|
||||
}
|
||||
|
||||
function generateTextForTextNode(node, indent, textFragmentAccumulator) {
|
||||
// If the text node is the first of a run of text nodes, then start
|
||||
// a new line and add the initial indentation.
|
||||
let prevNode = node.previousSibling;
|
||||
if (!prevNode || prevNode.nodeType == Node.TEXT_NODE)
|
||||
textFragmentAccumulator.push("\n" + indent);
|
||||
|
||||
// Trim the text node's text content and add proper indentation after
|
||||
// any internal line breaks.
|
||||
let text = node.textContent.trim().replace("\n[ \t]*", "\n" + indent);
|
||||
textFragmentAccumulator.push(text);
|
||||
}
|
||||
|
||||
]]></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body dir="&locale.dir;">
|
||||
|
||||
<h1>
|
||||
&aboutSupport.pageTitle;
|
||||
</h1>
|
||||
|
||||
<div class="page-subtitle">
|
||||
&aboutSupport.pageSubtitle;
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button onclick="copyContentsToClipboard()">
|
||||
&aboutSupport.copyToClipboard.label;
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div id="contents">
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - -->
|
||||
|
||||
<h2 class="major-section">
|
||||
&aboutSupport.appBasicsTitle;
|
||||
</h2>
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="column">
|
||||
&aboutSupport.appBasicsName;
|
||||
</th>
|
||||
|
||||
<td id="application-box">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th class="column">
|
||||
&aboutSupport.appBasicsVersion;
|
||||
</th>
|
||||
|
||||
<td id="version-box">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th class="column">
|
||||
&aboutSupport.appBasicsProfileDir;
|
||||
</th>
|
||||
|
||||
<td id="profile-box">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th class="column">
|
||||
&aboutSupport.appBasicsPlugins;
|
||||
</th>
|
||||
|
||||
<td>
|
||||
<a href="about:plugins">about:plugins</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th class="column">
|
||||
&aboutSupport.appBasicsBuildConfig;
|
||||
</th>
|
||||
|
||||
<td>
|
||||
<a href="about:buildconfig">about:buildconfig</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - -->
|
||||
|
||||
<h2 class="major-section">
|
||||
&aboutSupport.extensionsTitle;
|
||||
</h2>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
&aboutSupport.extensionName;
|
||||
</th>
|
||||
<th>
|
||||
&aboutSupport.extensionVersion;
|
||||
</th>
|
||||
<th>
|
||||
&aboutSupport.extensionEnabled;
|
||||
</th>
|
||||
<th>
|
||||
&aboutSupport.extensionId;
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="extensions-tbody">
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - -->
|
||||
|
||||
<h2 class="major-section">
|
||||
&aboutSupport.modifiedPrefsTitle;
|
||||
</h2>
|
||||
|
||||
<table class="prefs-table">
|
||||
<thead>
|
||||
<th class="name">
|
||||
&aboutSupport.modifiedPrefsName;
|
||||
</th>
|
||||
|
||||
<th class="value">
|
||||
&aboutSupport.modifiedPrefsValue;
|
||||
</th>
|
||||
</thead>
|
||||
|
||||
<tbody id="prefs-tbody">
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - -->
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
@ -91,6 +91,11 @@
|
||||
accesskey="&helpForIEUsers.accesskey;"
|
||||
oncommand="openHelpLink('ieusers');"/>
|
||||
#endif
|
||||
<menuitem id="troubleShooting"
|
||||
accesskey="&helpTroubleshooting.accesskey;"
|
||||
label="&helpTroubleshooting.label;"
|
||||
oncommand="openTroubleshootingPage()"
|
||||
onclick="checkForMiddleClick(this, event);"/>
|
||||
<menuitem id="releaseNotes"
|
||||
accesskey="&helpReleaseNotes.accesskey;"
|
||||
label="&helpReleaseNotes.label;"
|
||||
|
@ -450,7 +450,7 @@ var PlacesCommandHook = {
|
||||
* Adds a bookmark to the page loaded in the current tab.
|
||||
*/
|
||||
bookmarkCurrentPage: function PCH_bookmarkCurrentPage(aShowEditUI, aParent) {
|
||||
this.bookmarkPage(getBrowser().selectedBrowser, aParent, aShowEditUI);
|
||||
this.bookmarkPage(gBrowser.selectedBrowser, aParent, aShowEditUI);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -484,19 +484,18 @@ var PlacesCommandHook = {
|
||||
*/
|
||||
_getUniqueTabInfo: function BATC__getUniqueTabInfo() {
|
||||
var tabList = [];
|
||||
var seenURIs = [];
|
||||
var seenURIs = {};
|
||||
|
||||
var browsers = getBrowser().browsers;
|
||||
var browsers = gBrowser.browsers;
|
||||
for (var i = 0; i < browsers.length; ++i) {
|
||||
var webNav = browsers[i].webNavigation;
|
||||
var uri = webNav.currentURI;
|
||||
let uri = browsers[i].currentURI;
|
||||
|
||||
// skip redundant entries
|
||||
if (uri.spec in seenURIs)
|
||||
continue;
|
||||
|
||||
// add to the set of seen URIs
|
||||
seenURIs[uri.spec] = true;
|
||||
seenURIs[uri.spec] = null;
|
||||
tabList.push(uri);
|
||||
}
|
||||
return tabList;
|
||||
@ -1166,7 +1165,7 @@ var PlacesStarButton = {
|
||||
if (!starIcon)
|
||||
return;
|
||||
|
||||
var uri = getBrowser().currentURI;
|
||||
var uri = gBrowser.currentURI;
|
||||
this._starred = uri && (PlacesUtils.getMostRecentBookmarkForURI(uri) != -1 ||
|
||||
PlacesUtils.getMostRecentFolderForFeedURI(uri) != -1);
|
||||
if (this._starred) {
|
||||
|
@ -316,7 +316,9 @@ function findChildShell(aDocument, aDocShell, aSoughtURI) {
|
||||
|
||||
const gPopupBlockerObserver = {
|
||||
_reportButton: null,
|
||||
_kIPM: Components.interfaces.nsIPermissionManager,
|
||||
|
||||
get _pm ()
|
||||
Cc["@mozilla.org/permissionmanager;1"].getService(Ci.nsIPermissionManager),
|
||||
|
||||
onUpdatePageReport: function (aEvent)
|
||||
{
|
||||
@ -384,12 +386,10 @@ const gPopupBlockerObserver = {
|
||||
|
||||
toggleAllowPopupsForSite: function (aEvent)
|
||||
{
|
||||
var currentURI = gBrowser.selectedBrowser.webNavigation.currentURI;
|
||||
var pm = Components.classes["@mozilla.org/permissionmanager;1"]
|
||||
.getService(this._kIPM);
|
||||
var pm = this._pm;
|
||||
var shouldBlock = aEvent.target.getAttribute("block") == "true";
|
||||
var perm = shouldBlock ? this._kIPM.DENY_ACTION : this._kIPM.ALLOW_ACTION;
|
||||
pm.add(currentURI, "popup", perm);
|
||||
var perm = shouldBlock ? pm.DENY_ACTION : pm.ALLOW_ACTION;
|
||||
pm.add(gBrowser.currentURI, "popup", perm);
|
||||
|
||||
gBrowser.getNotificationBox().removeCurrentNotification();
|
||||
},
|
||||
@ -405,13 +405,13 @@ const gPopupBlockerObserver = {
|
||||
// also back out the fix for bug 343772 where
|
||||
// nsGlobalWindow::CheckOpenAllow() was changed to also
|
||||
// check if the top window's location is whitelisted.
|
||||
var uri = gBrowser.selectedBrowser.webNavigation.currentURI;
|
||||
var uri = gBrowser.currentURI;
|
||||
var blockedPopupAllowSite = document.getElementById("blockedPopupAllowSite");
|
||||
try {
|
||||
blockedPopupAllowSite.removeAttribute("hidden");
|
||||
|
||||
var pm = Cc["@mozilla.org/permissionmanager;1"].getService(this._kIPM);
|
||||
if (pm.testPermission(uri, "popup") == this._kIPM.ALLOW_ACTION) {
|
||||
var pm = this._pm;
|
||||
if (pm.testPermission(uri, "popup") == pm.ALLOW_ACTION) {
|
||||
// Offer an item to block popups for this site, if a whitelist entry exists
|
||||
// already for it.
|
||||
let blockString = gNavigatorBundle.getFormattedString("popupBlock", [uri.host]);
|
||||
@ -513,8 +513,7 @@ const gPopupBlockerObserver = {
|
||||
{
|
||||
var host = "";
|
||||
try {
|
||||
var uri = gBrowser.selectedBrowser.webNavigation.currentURI;
|
||||
host = uri.host;
|
||||
host = gBrowser.currentURI.host;
|
||||
}
|
||||
catch (e) { }
|
||||
|
||||
@ -942,9 +941,9 @@ function BrowserStartup() {
|
||||
// the original tab in the other window.
|
||||
|
||||
// Stop the about:blank load
|
||||
gBrowser.selectedBrowser.stop();
|
||||
gBrowser.stop();
|
||||
// make sure it has a docshell
|
||||
gBrowser.selectedBrowser.docShell;
|
||||
gBrowser.docShell;
|
||||
|
||||
gBrowser.swapBrowsersAndCloseOther(gBrowser.selectedTab, uriToLoad);
|
||||
}
|
||||
@ -1357,6 +1356,10 @@ function delayedStartup(isLoadingBlank, mustLoadSidebar) {
|
||||
|
||||
// initialize the private browsing UI
|
||||
gPrivateBrowsingUI.init();
|
||||
|
||||
gBrowser.mPanelContainer.addEventListener("InstallBrowserTheme", LightWeightThemeWebInstaller, false, true);
|
||||
gBrowser.mPanelContainer.addEventListener("PreviewBrowserTheme", LightWeightThemeWebInstaller, false, true);
|
||||
gBrowser.mPanelContainer.addEventListener("ResetBrowserThemePreview", LightWeightThemeWebInstaller, false, true);
|
||||
}
|
||||
|
||||
function BrowserShutdown()
|
||||
@ -1799,7 +1802,7 @@ function BrowserOpenTab()
|
||||
"chrome,all,dialog=no", "about:blank");
|
||||
return;
|
||||
}
|
||||
gBrowser.loadOneTab("about:blank", null, null, null, false, false);
|
||||
gBrowser.loadOneTab("about:blank", {inBackground: false});
|
||||
if (gURLBar)
|
||||
gURLBar.focus();
|
||||
}
|
||||
@ -1822,7 +1825,12 @@ function delayedOpenWindow(chrome, flags, href, postData)
|
||||
the URI kicked off before becoming the active content area. */
|
||||
function delayedOpenTab(aUrl, aReferrer, aCharset, aPostData, aAllowThirdPartyFixup)
|
||||
{
|
||||
gBrowser.loadOneTab(aUrl, aReferrer, aCharset, aPostData, false, aAllowThirdPartyFixup);
|
||||
gBrowser.loadOneTab(aUrl, {
|
||||
referrerURI: aReferrer,
|
||||
charset: aCharset,
|
||||
postData: aPostData,
|
||||
inBackground: false,
|
||||
allowThirdPartyFixup: aAllowThirdPartyFixup});
|
||||
}
|
||||
|
||||
var gLastOpenDirectory = {
|
||||
@ -2274,7 +2282,7 @@ function SetPageProxyState(aState)
|
||||
gLastValidURLStr = gURLBar.value;
|
||||
gURLBar.addEventListener("input", UpdatePageProxyState, false);
|
||||
|
||||
PageProxySetIcon(gBrowser.mCurrentBrowser.mIconURL);
|
||||
PageProxySetIcon(gBrowser.selectedBrowser.mIconURL);
|
||||
} else if (aState == "invalid") {
|
||||
gURLBar.removeEventListener("input", UpdatePageProxyState, false);
|
||||
PageProxyClearIcon();
|
||||
@ -3020,7 +3028,7 @@ const BrowserSearch = {
|
||||
browser.hiddenEngines = engines;
|
||||
else {
|
||||
browser.engines = engines;
|
||||
if (browser == gBrowser.mCurrentBrowser)
|
||||
if (browser == gBrowser.selectedBrowser)
|
||||
this.updateSearchButton();
|
||||
}
|
||||
},
|
||||
@ -3039,7 +3047,7 @@ const BrowserSearch = {
|
||||
if (!searchBar || !searchBar.searchButton)
|
||||
return;
|
||||
|
||||
var engines = gBrowser.mCurrentBrowser.engines;
|
||||
var engines = gBrowser.selectedBrowser.engines;
|
||||
if (engines && engines.length > 0)
|
||||
searchBar.searchButton.setAttribute("addengines", "true");
|
||||
else
|
||||
@ -3977,8 +3985,8 @@ var XULBrowserWindow = {
|
||||
if (aWebProgress.DOMWindow == content) {
|
||||
if (aRequest)
|
||||
this.endDocumentLoad(aRequest, aStatus);
|
||||
if (!gBrowser.mTabbedMode && !gBrowser.mCurrentBrowser.mIconURL)
|
||||
gBrowser.useDefaultIcon(gBrowser.mCurrentTab);
|
||||
if (!gBrowser.mTabbedMode && !gBrowser.selectedBrowser.mIconURL)
|
||||
gBrowser.useDefaultIcon(gBrowser.selectedTab);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4116,7 +4124,7 @@ var XULBrowserWindow = {
|
||||
}
|
||||
|
||||
if (!gBrowser.mTabbedMode && aWebProgress.isLoadingDocument)
|
||||
gBrowser.setIcon(gBrowser.mCurrentTab, null);
|
||||
gBrowser.setIcon(gBrowser.selectedTab, null);
|
||||
|
||||
if (gURLBar) {
|
||||
// Strip off "wyciwyg://" and passwords for the location bar
|
||||
@ -4279,10 +4287,10 @@ var XULBrowserWindow = {
|
||||
|
||||
startDocumentLoad: function (aRequest) {
|
||||
// clear out feed data
|
||||
gBrowser.mCurrentBrowser.feeds = null;
|
||||
gBrowser.selectedBrowser.feeds = null;
|
||||
|
||||
// clear out search-engine data
|
||||
gBrowser.mCurrentBrowser.engines = null;
|
||||
gBrowser.selectedBrowser.engines = null;
|
||||
|
||||
var uri = aRequest.QueryInterface(Ci.nsIChannel).URI;
|
||||
var observerService = Cc["@mozilla.org/observer-service;1"]
|
||||
@ -4445,8 +4453,9 @@ nsBrowserAccess.prototype =
|
||||
// If this is an external load, we need to load a blank tab first,
|
||||
// because loadflags can't be passed to loadOneTab.
|
||||
let loadBlankFirst = !aURI || isExternal;
|
||||
let tab = win.gBrowser.loadOneTab(loadBlankFirst ? "about:blank" : aURI.spec,
|
||||
referrer, null, null, loadInBackground, false);
|
||||
let tab = win.gBrowser.loadOneTab(loadBlankFirst ? "about:blank" : aURI.spec, {
|
||||
referrerURI: referrer,
|
||||
inBackground: loadInBackground});
|
||||
let browser = win.gBrowser.getBrowserForTab(tab);
|
||||
|
||||
if (loadBlankFirst && aURI)
|
||||
@ -5391,17 +5400,21 @@ var OfflineApps = {
|
||||
_getBrowserForContentWindow: function(aBrowserWindow, aContentWindow) {
|
||||
// This depends on pseudo APIs of browser.js and tabbrowser.xml
|
||||
aContentWindow = aContentWindow.top;
|
||||
var browsers = aBrowserWindow.getBrowser().browsers;
|
||||
var browsers = aBrowserWindow.gBrowser.browsers;
|
||||
for (var i = 0; i < browsers.length; ++i) {
|
||||
if (browsers[i].contentWindow == aContentWindow)
|
||||
return browsers[i];
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
_getManifestURI: function(aWindow) {
|
||||
if (!aWindow.document.documentElement) return null;
|
||||
if (!aWindow.document.documentElement)
|
||||
return null;
|
||||
|
||||
var attr = aWindow.document.documentElement.getAttribute("manifest");
|
||||
if (!attr) return null;
|
||||
if (!attr)
|
||||
return null;
|
||||
|
||||
try {
|
||||
var contentURI = makeURI(aWindow.location.href, null, null);
|
||||
@ -5415,9 +5428,9 @@ var OfflineApps = {
|
||||
// the best browser in which to warn the user about space usage
|
||||
_getBrowserForCacheUpdate: function(aCacheUpdate) {
|
||||
// Prefer the current browser
|
||||
var uri = this._getManifestURI(gBrowser.mCurrentBrowser.contentWindow);
|
||||
var uri = this._getManifestURI(content);
|
||||
if (uri && uri.equals(aCacheUpdate.manifestURI)) {
|
||||
return gBrowser.mCurrentBrowser;
|
||||
return gBrowser.selectedBrowser;
|
||||
}
|
||||
|
||||
var browsers = gBrowser.browsers;
|
||||
@ -5852,7 +5865,7 @@ function getPluginInfo(pluginElement)
|
||||
// only attempt if a pluginsPage is defined.
|
||||
if (pluginsPage) {
|
||||
var doc = pluginElement.ownerDocument;
|
||||
var docShell = findChildShell(doc, gBrowser.selectedBrowser.docShell, null);
|
||||
var docShell = findChildShell(doc, gBrowser.docShell, null);
|
||||
try {
|
||||
pluginsPage = makeURI(pluginsPage, doc.characterSet, docShell.currentURI).spec;
|
||||
} catch (ex) {
|
||||
@ -6006,7 +6019,7 @@ function blocklistInfo()
|
||||
var formatter = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"]
|
||||
.getService(Components.interfaces.nsIURLFormatter);
|
||||
var url = formatter.formatURLPref("extensions.blocklist.detailsURL");
|
||||
gBrowser.loadOneTab(url, null, null, null, false, false);
|
||||
gBrowser.loadOneTab(url, {inBackground: false});
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -6157,7 +6170,7 @@ var FeedHandler = {
|
||||
if (!this._feedMenupopup)
|
||||
this._feedMenupopup = document.getElementById("subscribeToPageMenupopup");
|
||||
|
||||
var feeds = gBrowser.mCurrentBrowser.feeds;
|
||||
var feeds = gBrowser.selectedBrowser.feeds;
|
||||
if (!feeds || feeds.length == 0) {
|
||||
if (feedButton) {
|
||||
feedButton.collapsed = true;
|
||||
@ -6200,7 +6213,7 @@ var FeedHandler = {
|
||||
|
||||
browserForLink.feeds.push({ href: link.href, title: link.title });
|
||||
|
||||
if (browserForLink == gBrowser.mCurrentBrowser) {
|
||||
if (browserForLink == gBrowser.selectedBrowser) {
|
||||
var feedButton = document.getElementById("feed-button");
|
||||
if (feedButton)
|
||||
feedButton.collapsed = false;
|
||||
@ -6219,9 +6232,9 @@ function undoCloseTab(aIndex) {
|
||||
var blankTabToRemove = null;
|
||||
if (gBrowser.tabContainer.childNodes.length == 1 &&
|
||||
!gPrefService.getBoolPref("browser.tabs.autoHide") &&
|
||||
gBrowser.selectedBrowser.sessionHistory.count < 2 &&
|
||||
gBrowser.selectedBrowser.currentURI.spec == "about:blank" &&
|
||||
!gBrowser.selectedBrowser.contentDocument.body.hasChildNodes() &&
|
||||
gBrowser.sessionHistory.count < 2 &&
|
||||
gBrowser.currentURI.spec == "about:blank" &&
|
||||
!gBrowser.contentDocument.body.hasChildNodes() &&
|
||||
!gBrowser.selectedTab.hasAttribute("busy"))
|
||||
blankTabToRemove = gBrowser.selectedTab;
|
||||
|
||||
@ -7047,3 +7060,141 @@ let gURLBarEmptyText = {
|
||||
return gURLBar.getAttribute(type + "emptytext");
|
||||
}
|
||||
};
|
||||
|
||||
var LightWeightThemeWebInstaller = {
|
||||
handleEvent: function (event) {
|
||||
switch (event.type) {
|
||||
case "InstallBrowserTheme":
|
||||
this._install(event);
|
||||
break;
|
||||
case "PreviewBrowserTheme":
|
||||
this._preview(event);
|
||||
break;
|
||||
case "ResetBrowserThemePreview":
|
||||
this._resetPreview(event);
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
get _manager () {
|
||||
var temp = {};
|
||||
Cu.import("resource://gre/modules/LightweightThemeManager.jsm", temp);
|
||||
delete this._manager;
|
||||
return this._manager = temp.LightweightThemeManager;
|
||||
},
|
||||
|
||||
_install: function (event) {
|
||||
var node = event.target;
|
||||
var data = this._getThemeFromNode(node);
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
if (this._isAllowed(node)) {
|
||||
this._manager.currentTheme = data;
|
||||
return;
|
||||
}
|
||||
|
||||
var allowButtonText =
|
||||
gNavigatorBundle.getString("lwthemeInstallRequest.allowButton");
|
||||
var allowButtonAccesskey =
|
||||
gNavigatorBundle.getString("lwthemeInstallRequest.allowButton.accesskey");
|
||||
var message =
|
||||
gNavigatorBundle.getFormattedString("lwthemeInstallRequest.message",
|
||||
[node.ownerDocument.location.host]);
|
||||
var buttons = [{
|
||||
label: allowButtonText,
|
||||
accessKey: allowButtonAccesskey,
|
||||
callback: function () {
|
||||
LightWeightThemeWebInstaller._manager.currentTheme = data;
|
||||
}
|
||||
}];
|
||||
var notificationBox = gBrowser.getNotificationBox();
|
||||
notificationBox.appendNotification(message, "lwtheme-install-request", "",
|
||||
notificationBox.PRIORITY_INFO_MEDIUM,
|
||||
buttons);
|
||||
},
|
||||
|
||||
_preview: function (event) {
|
||||
if (!this._isAllowed(event.target))
|
||||
return;
|
||||
|
||||
var data = this._getThemeFromNode(event.target);
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
this._manager.previewTheme(data);
|
||||
},
|
||||
|
||||
_resetPreview: function (event) {
|
||||
if (!this._isAllowed(event.target))
|
||||
return;
|
||||
|
||||
this._manager.resetPreview();
|
||||
},
|
||||
|
||||
_isAllowed: function (node) {
|
||||
var pm = Cc["@mozilla.org/permissionmanager;1"].getService(Ci.nsIPermissionManager);
|
||||
|
||||
var prefs = [["xpinstall.whitelist.add", pm.ALLOW_ACTION],
|
||||
["xpinstall.whitelist.add.36", pm.ALLOW_ACTION],
|
||||
["xpinstall.blacklist.add", pm.DENY_ACTION]];
|
||||
prefs.forEach(function ([pref, permission]) {
|
||||
try {
|
||||
var hosts = gPrefService.getCharPref(pref);
|
||||
} catch (e) {}
|
||||
|
||||
if (hosts) {
|
||||
hosts.split(",").forEach(function (host) {
|
||||
pm.add(makeURI("http://" + host), "install", permission);
|
||||
});
|
||||
|
||||
gPrefService.setCharPref(pref, "");
|
||||
}
|
||||
});
|
||||
|
||||
var uri = node.ownerDocument.documentURIObject;
|
||||
return pm.testPermission(uri, "install") == pm.ALLOW_ACTION;
|
||||
},
|
||||
|
||||
_getThemeFromNode: function (node) {
|
||||
const MANDATORY = ["id", "name", "headerURL"];
|
||||
const OPTIONAL = ["footerURL", "textcolor", "accentcolor", "iconURL",
|
||||
"previewURL", "author", "description", "homepageURL"];
|
||||
|
||||
try {
|
||||
var data = JSON.parse(node.getAttribute("data-browsertheme"));
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!data || typeof data != "object")
|
||||
return null;
|
||||
|
||||
for (let prop in data) {
|
||||
if (!data[prop] ||
|
||||
typeof data[prop] != "string" ||
|
||||
MANDATORY.indexOf(prop) == -1 && OPTIONAL.indexOf(prop) == -1) {
|
||||
delete data[prop];
|
||||
continue;
|
||||
}
|
||||
|
||||
if (/URL$/.test(prop)) {
|
||||
try {
|
||||
data[prop] = makeURLAbsolute(node.baseURI, data[prop]);
|
||||
|
||||
if (/^https?:/.test(data[prop]))
|
||||
continue;
|
||||
} catch (e) {}
|
||||
|
||||
delete data[prop];
|
||||
}
|
||||
}
|
||||
|
||||
for (let i = 0; i < MANDATORY.length; i++) {
|
||||
if (!(MANDATORY[i] in data))
|
||||
return null;
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
@ -253,8 +253,8 @@ nsContextMenu.prototype = {
|
||||
this.setItemAttr("context-viewvideo", "disabled", !this.mediaURL);
|
||||
|
||||
// View background image depends on whether there is one.
|
||||
this.showItem("context-viewbgimage", shouldShow);
|
||||
this.showItem("context-sep-viewbgimage", shouldShow);
|
||||
this.showItem("context-viewbgimage", shouldShow && !this._hasMultipleBGImages);
|
||||
this.showItem("context-sep-viewbgimage", shouldShow && !this._hasMultipleBGImages);
|
||||
document.getElementById("context-viewbgimage")
|
||||
.disabled = !this.hasBGImage;
|
||||
},
|
||||
@ -522,7 +522,13 @@ nsContextMenu.prototype = {
|
||||
else if (this.target instanceof HTMLHtmlElement) {
|
||||
var bodyElt = this.target.ownerDocument.body;
|
||||
if (bodyElt) {
|
||||
var computedURL = this.getComputedURL(bodyElt, "background-image");
|
||||
let computedURL;
|
||||
try {
|
||||
computedURL = this.getComputedURL(bodyElt, "background-image");
|
||||
this._hasMultipleBGImages = false;
|
||||
} catch (e) {
|
||||
this._hasMultipleBGImages = true;
|
||||
}
|
||||
if (computedURL) {
|
||||
this.hasBGImage = true;
|
||||
this.bgImageURL = makeURLAbsolute(bodyElt.baseURI,
|
||||
@ -576,8 +582,15 @@ nsContextMenu.prototype = {
|
||||
// Background image? Don't bother if we've already found a
|
||||
// background image further down the hierarchy. Otherwise,
|
||||
// we look for the computed background-image style.
|
||||
if (!this.hasBGImage) {
|
||||
var bgImgUrl = this.getComputedURL( elem, "background-image" );
|
||||
if (!this.hasBGImage &&
|
||||
!this._hasMultipleBGImages) {
|
||||
let bgImgUrl;
|
||||
try {
|
||||
bgImgUrl = this.getComputedURL(elem, "background-image");
|
||||
this._hasMultipleBGImages = false;
|
||||
} catch (e) {
|
||||
this._hasMultipleBGImages = true;
|
||||
}
|
||||
if (bgImgUrl) {
|
||||
this.hasBGImage = true;
|
||||
this.bgImageURL = makeURLAbsolute(elem.baseURI,
|
||||
@ -651,6 +664,11 @@ nsContextMenu.prototype = {
|
||||
var url = aElem.ownerDocument
|
||||
.defaultView.getComputedStyle(aElem, "")
|
||||
.getPropertyCSSValue(aProp);
|
||||
if (url instanceof CSSValueList) {
|
||||
if (url.length != 1)
|
||||
throw "found multiple URLs";
|
||||
url = url[0];
|
||||
}
|
||||
return url.primitiveType == CSSPrimitiveValue.CSS_URI ?
|
||||
url.getStringValue() : null;
|
||||
},
|
||||
|
@ -873,10 +873,17 @@ function makePreview(row)
|
||||
if (!mimeType)
|
||||
mimeType = getContentTypeFromHeaders(cacheEntryDescriptor);
|
||||
|
||||
// if we have a data url, get the MIME type from the url
|
||||
if (!mimeType && /^data:/.test(url)) {
|
||||
let dataMimeType = /^data:(image\/[^;,]+)/i.exec(url);
|
||||
if (dataMimeType)
|
||||
mimeType = dataMimeType[1].toLowerCase();
|
||||
}
|
||||
|
||||
var imageType;
|
||||
if (mimeType) {
|
||||
// We found the type, try to display it nicely
|
||||
var imageMimeType = /^image\/(.*)/.exec(mimeType);
|
||||
let imageMimeType = /^image\/(.*)/i.exec(mimeType);
|
||||
if (imageMimeType) {
|
||||
imageType = imageMimeType[1].toUpperCase();
|
||||
if (numFrames > 1)
|
||||
|
@ -692,6 +692,7 @@
|
||||
<body>
|
||||
<![CDATA[
|
||||
var browser = this.getBrowserForTab(aTab);
|
||||
var docURIObject = browser.contentDocument.documentURIObject;
|
||||
if (browser.contentDocument instanceof ImageDocument) {
|
||||
if (this.mPrefs.getBoolPref("browser.chrome.site_icons")) {
|
||||
try {
|
||||
@ -711,8 +712,8 @@
|
||||
}
|
||||
// Use documentURIObject in the check for shouldLoadFavIcon so that we
|
||||
// do the right thing with about:-style error pages. Bug 453442
|
||||
else if (this.shouldLoadFavIcon(browser.contentDocument.documentURIObject)) {
|
||||
var url = browser.currentURI.prePath + "/favicon.ico";
|
||||
else if (this.shouldLoadFavIcon(docURIObject)) {
|
||||
var url = docURIObject.prePath + "/favicon.ico";
|
||||
if (!this.isFailedIcon(url))
|
||||
this.setIcon(aTab, url);
|
||||
}
|
||||
@ -870,7 +871,6 @@
|
||||
const nsIWebProgressListener = Components.interfaces.nsIWebProgressListener;
|
||||
if (this.mCurrentTab.hasAttribute("busy") && !this.mIsBusy) {
|
||||
this.mIsBusy = true;
|
||||
webProgress = this.mCurrentBrowser.webProgress;
|
||||
for (i = 0; i < this.mProgressListeners.length; i++) {
|
||||
p = this.mProgressListeners[i];
|
||||
if (p)
|
||||
@ -887,7 +887,6 @@
|
||||
// we need to fire a stop to all progress listeners.
|
||||
if (!this.mCurrentTab.hasAttribute("busy") && this.mIsBusy) {
|
||||
this.mIsBusy = false;
|
||||
webProgress = this.mCurrentBrowser.webProgress;
|
||||
for (i = 0; i < this.mProgressListeners.length; i++) {
|
||||
p = this.mProgressListeners[i];
|
||||
if (p)
|
||||
@ -1145,7 +1144,7 @@
|
||||
}
|
||||
}
|
||||
else
|
||||
firstTabAdded = this.addTab(aURIs[0], null, null, null, owner, false);
|
||||
firstTabAdded = this.addTab(aURIs[0], {ownerTab: owner});
|
||||
|
||||
var tabNum = this.mTabContainer.selectedIndex;
|
||||
for (let i = 1; i < aURIs.length; ++i) {
|
||||
@ -2160,7 +2159,7 @@
|
||||
if (document.getBindingParent(aEvent.originalTarget).localName != "tab" || dropEffect == "copy") {
|
||||
// We're adding a new tab.
|
||||
newIndex = this.getNewIndex(aEvent);
|
||||
newTab = this.loadOneTab(getShortcutOrURI(url), null, null, null, bgLoad, false);
|
||||
newTab = this.loadOneTab(getShortcutOrURI(url), {inBackground: bgLoad});
|
||||
this.moveTabTo(newTab, newIndex);
|
||||
}
|
||||
else {
|
||||
|
@ -138,9 +138,10 @@ _BROWSER_FILES = \
|
||||
browser_bug304198.js \
|
||||
browser_drag.js \
|
||||
browser_relatedTabs.js \
|
||||
browser_contextSearchTabPosition.js \
|
||||
$(NULL)
|
||||
|
||||
ifeq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifneq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
_BROWSER_FILES += browser_bug462289.js
|
||||
else
|
||||
_BROWSER_FILES += browser_customize.js
|
||||
|
@ -8,7 +8,7 @@ function test() {
|
||||
|
||||
function onPageShow() {
|
||||
gBrowser.removeEventListener("pageshow", onPageShow, false);
|
||||
var frame = gBrowser.contentWindow.frames[0];
|
||||
var frame = content.frames[0];
|
||||
var sel = frame.getSelection();
|
||||
var range = frame.document.createRange();
|
||||
var tn = frame.document.body.childNodes[0];
|
||||
|
@ -11,14 +11,14 @@
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Idle Service for OSSO.
|
||||
* The Original Code is browser test code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Mozilla Corporation
|
||||
* The Initial Developer of the Original Code is
|
||||
* John Morkel <jmorkel@gmail.com>.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2008
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Doug Turner <dougt@meer.net> (Original Author)
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
@ -34,49 +34,25 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsIdleServiceOSSO.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "prtime.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
NS_IMPL_ISUPPORTS2(nsIdleServiceOSSO, nsIIdleService, nsIObserver)
|
||||
|
||||
nsIdleServiceOSSO::nsIdleServiceOSSO()
|
||||
: mIdle(PR_FALSE)
|
||||
{
|
||||
nsCOMPtr<nsIObserverService> obsServ = do_GetService("@mozilla.org/observer-service;1");
|
||||
obsServ->AddObserver(this, "system-display-on", PR_FALSE);
|
||||
obsServ->AddObserver(this, "system-display-dimmed-or-off", PR_FALSE);
|
||||
}
|
||||
|
||||
nsIdleServiceOSSO::~nsIdleServiceOSSO()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsIdleServiceOSSO::GetIdleTime(PRUint32 *aTimeDiff)
|
||||
{
|
||||
if (mIdle) {
|
||||
*aTimeDiff = ( PR_Now() - mIdleSince ) / PR_USEC_PER_MSEC;
|
||||
return NS_OK;
|
||||
function test() {
|
||||
function tabAdded(event) {
|
||||
let tab = event.target;
|
||||
tabs.push(tab);
|
||||
}
|
||||
|
||||
*aTimeDiff = 0;
|
||||
return NS_OK;
|
||||
}
|
||||
let tabs = [];
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsIdleServiceOSSO::Observe(nsISupports *aSubject, const char *aTopic, const PRUnichar *aData)
|
||||
{
|
||||
if (!strcmp(aTopic, "system-display-dimmed-or-off") && mIdle == PR_FALSE) {
|
||||
mIdle = PR_TRUE;
|
||||
mIdleSince = PR_Now();
|
||||
}
|
||||
else if (!strcmp(aTopic, "system-display-on")) {
|
||||
mIdle = PR_FALSE;
|
||||
}
|
||||
let container = gBrowser.tabContainer;
|
||||
container.addEventListener("TabOpen", tabAdded, false);
|
||||
|
||||
return NS_OK;
|
||||
gBrowser.addTab("about:blank");
|
||||
BrowserSearch.loadSearch("mozilla", true);
|
||||
BrowserSearch.loadSearch("firefox", true);
|
||||
|
||||
is(tabs[0], gBrowser.mTabs[3], "blank tab has been pushed to the end");
|
||||
is(tabs[1], gBrowser.mTabs[1], "first search tab opens next to the current tab");
|
||||
is(tabs[2], gBrowser.mTabs[2], "second search tab opens next to the first search tab");
|
||||
|
||||
container.removeEventListener("TabOpen", tabAdded, false);
|
||||
tabs.forEach(gBrowser.removeTab, gBrowser);
|
||||
}
|
@ -43,7 +43,7 @@ function test() {
|
||||
function tabOpenDance() {
|
||||
let tabs = [];
|
||||
function addTab(aURL,aReferrer)
|
||||
tabs.push(gBrowser.addTab(aURL, aReferrer));
|
||||
tabs.push(gBrowser.addTab(aURL, {referrerURI: aReferrer}));
|
||||
|
||||
addTab("http://localhost:8888/#0");
|
||||
gBrowser.selectedTab = tabs[0];
|
||||
|
@ -124,8 +124,10 @@
|
||||
if (aTriggeringEvent && aTriggeringEvent.altKey) {
|
||||
this.handleRevert();
|
||||
content.focus();
|
||||
gBrowser.loadOneTab(url, null, null, postData, false,
|
||||
true /* allow third party fixup */);
|
||||
gBrowser.loadOneTab(url, {
|
||||
postData: postData,
|
||||
inBackground: false,
|
||||
allowThirdPartyFixup: true});
|
||||
aTriggeringEvent.preventDefault();
|
||||
aTriggeringEvent.stopPropagation();
|
||||
}
|
||||
|
@ -227,8 +227,11 @@ function openUILinkIn( url, where, allowThirdPartyFixup, postData, referrerUrl )
|
||||
// fall through
|
||||
case "tab":
|
||||
let browser = w.getBrowser();
|
||||
browser.loadOneTab(url, referrerUrl, null, postData, loadInBackground,
|
||||
allowThirdPartyFixup || false);
|
||||
browser.loadOneTab(url, {
|
||||
referrerURI: referrerUrl,
|
||||
postData: postData,
|
||||
inBackground: loadInBackground,
|
||||
allowThirdPartyFixup: allowThirdPartyFixup});
|
||||
break;
|
||||
}
|
||||
|
||||
@ -428,6 +431,15 @@ function openReleaseNotes()
|
||||
openUILinkIn(relnotesURL, "tab");
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens the troubleshooting information (about:support) page for this version
|
||||
* of the application.
|
||||
*/
|
||||
function openTroubleshootingPage()
|
||||
{
|
||||
openUILinkIn("about:support", "tab");
|
||||
}
|
||||
|
||||
#ifdef MOZ_UPDATER
|
||||
/**
|
||||
* Opens the update manager and checks for updates to the application.
|
||||
@ -586,8 +598,12 @@ function openNewTabWith(aURL, aDocument, aPostData, aEvent,
|
||||
// open link in new tab
|
||||
var referrerURI = aDocument ? aDocument.documentURIObject : aReferrer;
|
||||
var browser = top.document.getElementById("content");
|
||||
return browser.loadOneTab(aURL, referrerURI, originCharset, aPostData,
|
||||
loadInBackground, aAllowThirdPartyFixup || false);
|
||||
return browser.loadOneTab(aURL, {
|
||||
referrerURI: referrerURI,
|
||||
charset: originCharset,
|
||||
postData: aPostData,
|
||||
inBackground: loadInBackground,
|
||||
allowThirdPartyFixup: aAllowThirdPartyFixup});
|
||||
}
|
||||
|
||||
function openNewWindowWith(aURL, aDocument, aPostData, aAllowThirdPartyFixup,
|
||||
|
@ -18,6 +18,7 @@ browser.jar:
|
||||
content/browser/aboutRobots-icon-rtl.png (content/aboutRobots-icon-rtl.png)
|
||||
content/browser/aboutRobots-widget-left.png (content/aboutRobots-widget-left.png)
|
||||
content/browser/aboutRobots-widget-right.png (content/aboutRobots-widget-right.png)
|
||||
* content/browser/aboutSupport.xhtml (content/aboutSupport.xhtml)
|
||||
* content/browser/browser.css (content/browser.css)
|
||||
* content/browser/browser.js (content/browser.js)
|
||||
* content/browser/browser.xul (content/browser.xul)
|
||||
|
@ -92,7 +92,9 @@ static RedirEntry kRedirMap[] = {
|
||||
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
|
||||
nsIAboutModule::ALLOW_SCRIPT },
|
||||
{ "sessionrestore", "chrome://browser/content/aboutSessionRestore.xhtml",
|
||||
nsIAboutModule::ALLOW_SCRIPT }
|
||||
nsIAboutModule::ALLOW_SCRIPT },
|
||||
{ "support", "chrome://browser/content/aboutSupport.xhtml",
|
||||
nsIAboutModule::ALLOW_SCRIPT },
|
||||
};
|
||||
static const int kRedirTotal = NS_ARRAY_LENGTH(kRedirMap);
|
||||
|
||||
|
@ -49,7 +49,7 @@ SHARED_LIBRARY_LIBS = \
|
||||
../about/$(LIB_PREFIX)browserabout_s.$(LIB_SUFFIX) \
|
||||
$(NULL)
|
||||
|
||||
ifneq (,$(filter windows mac cocoa gtk2, $(MOZ_WIDGET_TOOLKIT)))
|
||||
ifneq (,$(filter windows cocoa gtk2, $(MOZ_WIDGET_TOOLKIT)))
|
||||
SHARED_LIBRARY_LIBS += ../shell/src/$(LIB_PREFIX)shellservice_s.$(LIB_SUFFIX)
|
||||
endif
|
||||
|
||||
@ -72,7 +72,7 @@ EXTRA_DSO_LDOPTS += \
|
||||
|
||||
# Mac: Need to link with CoreFoundation for Mac Migrators (PList reading code)
|
||||
# GTK2: Need to link with glib for GNOME shell service
|
||||
ifneq (,$(filter mac cocoa gtk2,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifneq (,$(filter cocoa gtk2,$(MOZ_WIDGET_TOOLKIT)))
|
||||
EXTRA_DSO_LDOPTS += \
|
||||
$(TK_LIBS) \
|
||||
$(NULL)
|
||||
|
@ -187,6 +187,11 @@ static const nsModuleComponentInfo components[] =
|
||||
NS_ABOUT_MODULE_CONTRACTID_PREFIX "sessionrestore",
|
||||
AboutRedirector::Create },
|
||||
|
||||
{ "about:support",
|
||||
NS_BROWSER_ABOUT_REDIRECTOR_CID,
|
||||
NS_ABOUT_MODULE_CONTRACTID_PREFIX "support",
|
||||
AboutRedirector::Create },
|
||||
|
||||
#ifndef WINCE
|
||||
|
||||
{ "Profile Migrator",
|
||||
|
@ -44,9 +44,7 @@ include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = browsercomps
|
||||
LIBRARY_NAME = browserdirprovider
|
||||
ifeq (,$(filter WINNT WINCE,$(OS_ARCH)))
|
||||
SHORT_LIBNAME = brwsrdir
|
||||
endif
|
||||
IS_COMPONENT = 1
|
||||
MODULE_NAME = BrowserDirProvider
|
||||
FORCE_SHARED_LIB = 1
|
||||
@ -57,7 +55,6 @@ ifndef MOZ_MEMORY
|
||||
USE_STATIC_LIBS = 1
|
||||
endif
|
||||
|
||||
|
||||
CPPSRCS = nsBrowserDirectoryProvider.cpp
|
||||
|
||||
EXTRA_DSO_LDOPTS = \
|
||||
|
@ -154,7 +154,13 @@ MicrosummaryService.prototype = {
|
||||
classDescription: "Microsummary Service",
|
||||
contractID: "@mozilla.org/microsummary/service;1",
|
||||
classID: Components.ID("{460a9792-b154-4f26-a922-0f653e2c8f91}"),
|
||||
_xpcom_categories: [{ category: "update-timer",
|
||||
value: "@mozilla.org/microsummary/service;1," +
|
||||
"getService,microsummary-generator-update-timer," +
|
||||
"browser.microsummary.generatorUpdateInterval," +
|
||||
GENERATOR_INTERVAL }],
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIMicrosummaryService,
|
||||
Ci.nsITimerCallback,
|
||||
Ci.nsISupportsWeakReference,
|
||||
Ci.nsIAnnotationObserver,
|
||||
Ci.nsIObserver]),
|
||||
@ -172,6 +178,11 @@ MicrosummaryService.prototype = {
|
||||
}
|
||||
},
|
||||
|
||||
// cross-session timer used to periodically check for generator updates.
|
||||
notify: function MSS_notify(timer) {
|
||||
this._updateGenerators();
|
||||
},
|
||||
|
||||
_initTimers: function MSS__initTimers() {
|
||||
if (this._timer)
|
||||
this._timer.cancel();
|
||||
@ -188,18 +199,6 @@ MicrosummaryService.prototype = {
|
||||
this._timer.initWithCallback(callback,
|
||||
CHECK_INTERVAL,
|
||||
this._timer.TYPE_REPEATING_SLACK);
|
||||
|
||||
// Setup a cross-session timer to periodically check for generator updates.
|
||||
var updateManager = Cc["@mozilla.org/updates/timer-manager;1"].
|
||||
getService(Ci.nsIUpdateTimerManager);
|
||||
var interval = getPref("browser.microsummary.generatorUpdateInterval",
|
||||
GENERATOR_INTERVAL);
|
||||
var updateCallback = {
|
||||
_svc: this,
|
||||
notify: function(timer) { this._svc._updateGenerators() }
|
||||
};
|
||||
updateManager.registerTimer("microsummary-generator-update-timer",
|
||||
updateCallback, interval);
|
||||
},
|
||||
|
||||
_destroy: function MSS__destroy() {
|
||||
|
@ -72,7 +72,7 @@ CPPSRCS += nsIEProfileMigrator.cpp \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
CPPSRCS += nsSafariProfileMigrator.cpp \
|
||||
nsMacIEProfileMigrator.cpp \
|
||||
nsOmniWebProfileMigrator.cpp \
|
||||
|
@ -1254,15 +1254,16 @@ nsSafariProfileMigrator::GetSourceHomePageURL(nsACString& aResult)
|
||||
|
||||
// Let's first check if there's a home page key in the com.apple.safari file...
|
||||
CFDictionaryRef safariPrefs = CopySafariPrefs();
|
||||
if (GetDictionaryCStringValue(safariPrefs,
|
||||
CFSTR(SAFARI_HOME_PAGE_PREF),
|
||||
aResult, kCFStringEncodingUTF8)) {
|
||||
::CFRelease(safariPrefs);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
PRBool foundPref = GetDictionaryCStringValue(safariPrefs,
|
||||
CFSTR(SAFARI_HOME_PAGE_PREF),
|
||||
aResult, kCFStringEncodingUTF8);
|
||||
::CFRelease(safariPrefs);
|
||||
if (foundPref)
|
||||
return NS_OK;
|
||||
|
||||
#ifdef __LP64__
|
||||
return NS_ERROR_FAILURE;
|
||||
#else
|
||||
// Couldn't find the home page in com.apple.safai, time to check
|
||||
// com.apple.internetconfig for this key!
|
||||
ICInstance internetConfig;
|
||||
@ -1284,4 +1285,5 @@ nsSafariProfileMigrator::GetSourceHomePageURL(nsACString& aResult)
|
||||
::ICStop(internetConfig);
|
||||
|
||||
return NS_OK;
|
||||
#endif
|
||||
}
|
||||
|
@ -918,8 +918,7 @@ var PlacesUIUtils = {
|
||||
|
||||
var loadInBackground = where == "tabshifted" ? true : false;
|
||||
var replaceCurrentTab = where == "tab" ? false : true;
|
||||
browserWindow.getBrowser().loadTabs(urls, loadInBackground,
|
||||
replaceCurrentTab);
|
||||
browserWindow.gBrowser.loadTabs(urls, loadInBackground, replaceCurrentTab);
|
||||
},
|
||||
|
||||
openContainerNodeInTabs: function PU_openContainerInTabs(aNode, aEvent) {
|
||||
|
@ -113,9 +113,6 @@ registrar.registerFactory(Components.ID("{fbfae60b-64a4-44ef-a911-08ceb70b9f31}"
|
||||
"XULAppInfo", "@mozilla.org/xre/app-info;1",
|
||||
XULAppInfoFactory);
|
||||
|
||||
var updateSvc = Cc["@mozilla.org/updates/update-service;1"].
|
||||
getService(Ci.nsISupports);
|
||||
|
||||
var iosvc = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
|
||||
|
||||
function uri(spec) {
|
||||
|
@ -54,7 +54,7 @@ DEFINES += \
|
||||
-DMOZ_APP_DISPLAYNAME=$(MOZ_APP_DISPLAYNAME) \
|
||||
$(NULL)
|
||||
|
||||
ifneq (,$(filter windows gtk2 mac cocoa, $(MOZ_WIDGET_TOOLKIT)))
|
||||
ifneq (,$(filter windows gtk2 cocoa, $(MOZ_WIDGET_TOOLKIT)))
|
||||
DEFINES += -DHAVE_SHELL_SERVICE=1
|
||||
endif
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user