Merge last green PGO from inbound to central

This commit is contained in:
Marco Bonardo 2012-04-17 15:31:58 +02:00
commit 8fd56f3066
690 changed files with 9151 additions and 9101 deletions

View File

@ -44,6 +44,7 @@
#include "nsIWebProgress.h"
#include "nsIWebProgressListener.h"
#include "nsWeakReference.h"
#include "nsIPresShell.h"
class nsAccessible;
class nsDocAccessible;
@ -69,6 +70,14 @@ public:
*/
nsDocAccessible *GetDocAccessible(nsIDocument *aDocument);
/**
* Return document accessible for the given presshell.
*/
nsDocAccessible* GetDocAccessible(const nsIPresShell* aPresShell)
{
return aPresShell ? GetDocAccessible(aPresShell->GetDocument()) : nsnull;
}
/**
* Search through all document accessibles for an accessible with the given
* unique id.

View File

@ -137,23 +137,13 @@ public:
*/
static nsIAtom* GetARIAToken(mozilla::dom::Element* aElement, nsIAtom* aAttr);
/**
* Return document accessible for the given presshell.
*/
static nsDocAccessible* GetDocAccessibleFor(const nsIPresShell* aPresShell)
{
return aPresShell ?
GetAccService()->GetDocAccessible(aPresShell->GetDocument()) : nsnull;
}
/**
* Return document accessible for the given DOM node.
*/
static nsDocAccessible *GetDocAccessibleFor(nsINode *aNode)
{
nsIPresShell *presShell = nsCoreUtils::GetPresShellFor(aNode);
return presShell ?
GetAccService()->GetDocAccessible(presShell->GetDocument()) : nsnull;
return GetAccService()->GetDocAccessible(presShell);
}
/**
@ -164,8 +154,7 @@ public:
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(aContainer));
nsCOMPtr<nsIPresShell> presShell;
docShell->GetPresShell(getter_AddRefs(presShell));
return presShell ?
GetAccService()->GetDocAccessible(presShell->GetDocument()) : nsnull;
return GetAccService()->GetDocAccessible(presShell);
}
/**

View File

@ -202,8 +202,7 @@ nsAccessibilityService::CreateOuterDocAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new OuterDocAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
new OuterDocAccessible(aContent, GetDocAccessible(aPresShell));
NS_ADDREF(accessible);
return accessible;
}
@ -213,8 +212,7 @@ nsAccessibilityService::CreateHTMLButtonAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new HTMLButtonAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
new HTMLButtonAccessible(aContent, GetDocAccessible(aPresShell));
NS_ADDREF(accessible);
return accessible;
}
@ -224,8 +222,7 @@ nsAccessibilityService::CreateHTMLLIAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLLIAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
new nsHTMLLIAccessible(aContent, GetDocAccessible(aPresShell));
NS_ADDREF(accessible);
return accessible;
}
@ -235,8 +232,7 @@ nsAccessibilityService::CreateHyperTextAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHyperTextAccessibleWrap(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
new nsHyperTextAccessibleWrap(aContent, GetDocAccessible(aPresShell));
NS_ADDREF(accessible);
return accessible;
}
@ -246,8 +242,7 @@ nsAccessibilityService::CreateHTMLCheckboxAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new HTMLCheckboxAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
new HTMLCheckboxAccessible(aContent, GetDocAccessible(aPresShell));
NS_ADDREF(accessible);
return accessible;
}
@ -257,8 +252,7 @@ nsAccessibilityService::CreateHTMLComboboxAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLComboboxAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
new nsHTMLComboboxAccessible(aContent, GetDocAccessible(aPresShell));
NS_ADDREF(accessible);
return accessible;
}
@ -268,8 +262,7 @@ nsAccessibilityService::CreateHTMLCanvasAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLCanvasAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
new nsHTMLCanvasAccessible(aContent, GetDocAccessible(aPresShell));
NS_ADDREF(accessible);
return accessible;
}
@ -279,8 +272,7 @@ nsAccessibilityService::CreateHTMLFileInputAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new HTMLFileInputAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
new HTMLFileInputAccessible(aContent, GetDocAccessible(aPresShell));
NS_ADDREF(accessible);
return accessible;
}
@ -290,8 +282,7 @@ nsAccessibilityService::CreateHTMLImageAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLImageAccessibleWrap(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
new nsHTMLImageAccessibleWrap(aContent, GetDocAccessible(aPresShell));
NS_ADDREF(accessible);
return accessible;
}
@ -301,8 +292,7 @@ nsAccessibilityService::CreateHTMLImageMapAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLImageMapAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
new nsHTMLImageMapAccessible(aContent, GetDocAccessible(aPresShell));
NS_ADDREF(accessible);
return accessible;
}
@ -312,8 +302,7 @@ nsAccessibilityService::CreateHTMLGroupboxAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new HTMLGroupboxAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
new HTMLGroupboxAccessible(aContent, GetDocAccessible(aPresShell));
NS_ADDREF(accessible);
return accessible;
}
@ -323,8 +312,7 @@ nsAccessibilityService::CreateHTMLListboxAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLSelectListAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
new nsHTMLSelectListAccessible(aContent, GetDocAccessible(aPresShell));
NS_ADDREF(accessible);
return accessible;
}
@ -334,8 +322,7 @@ nsAccessibilityService::CreateHTMLMediaAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsEnumRoleAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell),
new nsEnumRoleAccessible(aContent, GetDocAccessible(aPresShell),
roles::GROUPING);
NS_ADDREF(accessible);
return accessible;
@ -379,7 +366,7 @@ nsAccessibilityService::CreateHTMLObjectFrameAccessible(nsObjectFrame* aFrame,
nsAccessible* accessible =
new nsHTMLWin32ObjectOwnerAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell),
GetDocAccessible(aPresShell),
pluginPort);
NS_ADDREF(accessible);
return accessible;
@ -393,8 +380,7 @@ nsAccessibilityService::CreateHTMLObjectFrameAccessible(nsObjectFrame* aFrame,
NPPVpluginNativeAccessibleAtkPlugId, &plugId);
if (NS_SUCCEEDED(rv) && !plugId.IsEmpty()) {
AtkSocketAccessible* socketAccessible =
new AtkSocketAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell),
new AtkSocketAccessible(aContent, GetDocAccessible(aPresShell),
plugId);
NS_ADDREF(socketAccessible);
@ -415,8 +401,7 @@ nsAccessibilityService::CreateHTMLRadioButtonAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new HTMLRadioButtonAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
new HTMLRadioButtonAccessible(aContent, GetDocAccessible(aPresShell));
NS_ADDREF(accessible);
return accessible;
}
@ -426,8 +411,7 @@ nsAccessibilityService::CreateHTMLTableAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLTableAccessibleWrap(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
new nsHTMLTableAccessibleWrap(aContent, GetDocAccessible(aPresShell));
NS_ADDREF(accessible);
return accessible;
}
@ -437,8 +421,7 @@ nsAccessibilityService::CreateHTMLTableCellAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLTableCellAccessibleWrap(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
new nsHTMLTableCellAccessibleWrap(aContent, GetDocAccessible(aPresShell));
NS_ADDREF(accessible);
return accessible;
}
@ -448,8 +431,7 @@ nsAccessibilityService::CreateHTMLTextAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLTextAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
new nsHTMLTextAccessible(aContent, GetDocAccessible(aPresShell));
NS_ADDREF(accessible);
return accessible;
}
@ -459,8 +441,7 @@ nsAccessibilityService::CreateHTMLTextFieldAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new HTMLTextFieldAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
new HTMLTextFieldAccessible(aContent, GetDocAccessible(aPresShell));
NS_ADDREF(accessible);
return accessible;
}
@ -470,8 +451,7 @@ nsAccessibilityService::CreateHTMLLabelAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLLabelAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
new nsHTMLLabelAccessible(aContent, GetDocAccessible(aPresShell));
NS_ADDREF(accessible);
return accessible;
}
@ -481,8 +461,7 @@ nsAccessibilityService::CreateHTMLHRAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLHRAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
new nsHTMLHRAccessible(aContent, GetDocAccessible(aPresShell));
NS_ADDREF(accessible);
return accessible;
}
@ -492,8 +471,7 @@ nsAccessibilityService::CreateHTMLBRAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLBRAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
new nsHTMLBRAccessible(aContent, GetDocAccessible(aPresShell));
NS_ADDREF(accessible);
return accessible;
}
@ -503,8 +481,7 @@ nsAccessibilityService::CreateHTMLCaptionAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLCaptionAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
new nsHTMLCaptionAccessible(aContent, GetDocAccessible(aPresShell));
NS_ADDREF(accessible);
return accessible;
}
@ -539,7 +516,7 @@ nsAccessibilityService::ContentRangeInserted(nsIPresShell* aPresShell,
NS_ConvertUTF16toUTF8(ctag).get(), cid.get(), aEndChild);
#endif
nsDocAccessible* docAccessible = GetDocAccessible(aPresShell->GetDocument());
nsDocAccessible* docAccessible = GetDocAccessible(aPresShell);
if (docAccessible)
docAccessible->ContentInserted(aContainer, aStartChild, aEndChild);
}
@ -573,7 +550,7 @@ nsAccessibilityService::ContentRemoved(nsIPresShell* aPresShell,
NS_ConvertUTF16toUTF8(ctag).get(), cid.get());
#endif
nsDocAccessible* docAccessible = GetDocAccessible(aPresShell->GetDocument());
nsDocAccessible* docAccessible = GetDocAccessible(aPresShell);
if (docAccessible)
docAccessible->ContentRemoved(aContainer, aChild);
}
@ -582,7 +559,7 @@ void
nsAccessibilityService::UpdateText(nsIPresShell* aPresShell,
nsIContent* aContent)
{
nsDocAccessible* document = GetDocAccessible(aPresShell->GetDocument());
nsDocAccessible* document = GetDocAccessible(aPresShell);
if (document)
document->UpdateText(aContent);
}
@ -592,7 +569,7 @@ nsAccessibilityService::TreeViewChanged(nsIPresShell* aPresShell,
nsIContent* aContent,
nsITreeView* aView)
{
nsDocAccessible* document = GetDocAccessible(aPresShell->GetDocument());
nsDocAccessible* document = GetDocAccessible(aPresShell);
if (document) {
nsAccessible* accessible = document->GetAccessible(aContent);
if (accessible) {
@ -608,7 +585,7 @@ nsAccessibilityService::UpdateListBullet(nsIPresShell* aPresShell,
nsIContent* aHTMLListItemContent,
bool aHasBullet)
{
nsDocAccessible* document = GetDocAccessible(aPresShell->GetDocument());
nsDocAccessible* document = GetDocAccessible(aPresShell);
if (document) {
nsAccessible* accessible = document->GetAccessible(aHTMLListItemContent);
if (accessible) {
@ -623,7 +600,7 @@ void
nsAccessibilityService::UpdateImageMap(nsImageFrame* aImageFrame)
{
nsIPresShell* presShell = aImageFrame->PresContext()->PresShell();
nsDocAccessible* document = GetDocAccessible(presShell->GetDocument());
nsDocAccessible* document = GetDocAccessible(presShell);
if (document) {
nsAccessible* accessible =
document->GetAccessible(aImageFrame->GetContent());
@ -682,7 +659,7 @@ void
nsAccessibilityService::RecreateAccessible(nsIPresShell* aPresShell,
nsIContent* aContent)
{
nsDocAccessible* document = GetDocAccessible(aPresShell->GetDocument());
nsDocAccessible* document = GetDocAccessible(aPresShell);
if (document)
document->RecreateAccessible(aContent);
}

View File

@ -80,7 +80,7 @@ IsModuleVersionLessThan(HMODULE aModuleHandle, DWORD aMajor, DWORD aMinor)
// Compatibility
////////////////////////////////////////////////////////////////////////////////
PRUint32 Compatibility::sMode = Compatibility::NoCompatibilityMode;
PRUint32 Compatibility::sConsumers = Compatibility::UNKNOWN;
void
Compatibility::Init()
@ -88,47 +88,53 @@ Compatibility::Init()
// Note we collect some AT statistics/telemetry here for convenience.
HMODULE jawsHandle = ::GetModuleHandleW(L"jhook");
if (jawsHandle) {
sMode |= JAWSMode;
// IA2 off mode for JAWS versions below 8.0.2173.
if (IsModuleVersionLessThan(jawsHandle, 8, 2173)) {
sMode |= IA2OffMode;
statistics::A11yConsumers(OLDJAWS);
} else {
statistics::A11yConsumers(JAWS);
}
}
if (jawsHandle)
sConsumers |= (IsModuleVersionLessThan(jawsHandle, 8, 2173)) ?
OLDJAWS : JAWS;
if (::GetModuleHandleW(L"gwm32inc")) {
sMode |= WEMode;
statistics::A11yConsumers(WE);
}
if (::GetModuleHandleW(L"dolwinhk")) {
sMode |= DolphinMode;
statistics::A11yConsumers(DOLPHIN);
}
if (::GetModuleHandleW(L"gwm32inc"))
sConsumers |= WE;
if (::GetModuleHandleW(L"dolwinhk"))
sConsumers |= DOLPHIN;
if (::GetModuleHandleW(L"STSA32"))
statistics::A11yConsumers(SEROTEK);
sConsumers |= SEROTEK;
if (::GetModuleHandleW(L"nvdaHelperRemote"))
statistics::A11yConsumers(NVDA);
sConsumers |= NVDA;
if (::GetModuleHandleW(L"OsmHooks"))
statistics::A11yConsumers(COBRA);
sConsumers |= COBRA;
if (::GetModuleHandleW(L"WebFinderRemote"))
statistics::A11yConsumers(ZOOMTEXT);
sConsumers |= ZOOMTEXT;
if (::GetModuleHandleW(L"Kazahook"))
statistics::A11yConsumers(KAZAGURU);
sConsumers |= KAZAGURU;
if (::GetModuleHandleW(L"TextExtractorImpl32") ||
::GetModuleHandleW(L"TextExtractorImpl64"))
statistics::A11yConsumers(YOUDAO);
sConsumers |= YOUDAO;
if (::GetModuleHandleW(L"uiautomation"))
sConsumers |= UIAUTOMATION;
// If we have a known consumer remove the unknown bit.
if (sConsumers != Compatibility::UNKNOWN)
sConsumers ^= Compatibility::UNKNOWN;
// Gather telemetry
PRUint32 temp = sConsumers;
for (int i = 0; temp; i++) {
if (temp & 0x1)
statistics::A11yConsumers(i);
temp >>= 1;
}
// Turn off new tab switching for Jaws and WE.
if (sMode & JAWSMode || sMode & WEMode) {
if (sConsumers & (JAWS | OLDJAWS | WE)) {
// Check to see if the pref for disallowing CtrlTab is already set. If so,
// bail out (respect the user settings). If not, set it.
if (!Preferences::HasUserValue("browser.ctrlTab.disallowForScreenReaders"))

View File

@ -57,22 +57,22 @@ public:
/**
* Return true if IAccessible2 disabled.
*/
static bool IsIA2Off() { return sMode & IA2OffMode; }
static bool IsIA2Off() { return !!(sConsumers & OLDJAWS); }
/**
* Return true if JAWS mode is enabled.
*/
static bool IsJAWS() { return sMode & JAWSMode; }
static bool IsJAWS() { return !!(sConsumers & (JAWS | OLDJAWS)); }
/**
* Return true if WE mode is enabled.
*/
static bool IsWE() { return sMode & WEMode; }
static bool IsWE() { return !!(sConsumers & WE); }
/**
* Return true if Dolphin mode is enabled.
*/
static bool IsDolphin() { return sMode & DolphinMode; }
static bool IsDolphin() { return !!(sConsumers & DOLPHIN); }
private:
Compatibility();
@ -87,34 +87,25 @@ private:
friend class nsAccessNodeWrap;
/**
* List of compatibility modes.
* List of detected consumers of a11y (used for statistics/telemetry and compat)
*/
enum {
NoCompatibilityMode = 0,
JAWSMode = 1 << 0,
WEMode = 1 << 1,
DolphinMode = 1 << 2,
IA2OffMode = 1 << 3
};
/**
* List of detected consumers of a11y (used for statistics/telemetry)
*/
enum {
NVDA = 0,
JAWS = 1,
OLDJAWS = 2,
WE = 3,
DOLPHIN = 4,
SEROTEK = 5,
COBRA = 6,
ZOOMTEXT = 7,
KAZAGURU = 8,
YOUDAO = 9
NVDA = 1 << 0,
JAWS = 1 << 1,
OLDJAWS = 1 << 2,
WE = 1 << 3,
DOLPHIN = 1 << 4,
SEROTEK = 1 << 5,
COBRA = 1 << 6,
ZOOMTEXT = 1 << 7,
KAZAGURU = 1 << 8,
YOUDAO = 1 << 9,
UNKNOWN = 1 << 10,
UIAUTOMATION = 1 << 11
};
private:
static PRUint32 sMode;
static PRUint32 sConsumers;
};
} // a11y namespace

View File

@ -323,6 +323,10 @@ var shell = {
navigator.mozPower.screenEnabled = true;
}
}
if (topic == "cpu") {
navigator.mozPower.cpuSleepAllowed = (state != "locked-foreground" &&
state != "locked-background");
}
}
let idleTimeout = Services.prefs.getIntPref("power.screen.timeout");

View File

@ -12,6 +12,7 @@
Jakob Miland <saebekassebil@gmail.com>
Artur Adib <aadib@mozilla.com>
Brendan Dahl <bdahl@mozilla.com>
David Quintana <gigaherz@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),

View File

@ -1,4 +1,4 @@
This is the pdf.js project output, https://github.com/mozilla/pdf.js
Current extension version is: 0.2.414
Current extension version is: 0.2.536

View File

@ -30,23 +30,11 @@ function log(aMsg) {
Services.console.logStringMessage(msg);
dump(msg + '\n');
}
function getWindow(top, id) {
return top.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindowUtils)
.getOuterWindowWithId(id);
}
function windowID(win) {
return win.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindowUtils)
.outerWindowID;
}
function topWindow(win) {
return win.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIDocShellTreeItem)
.rootTreeItem
.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindow);
function getDOMWindow(aChannel) {
var requestor = aChannel.notificationCallbacks;
var win = requestor.getInterface(Components.interfaces.nsIDOMWindow);
return win;
}
// All the priviledged actions.
@ -75,6 +63,7 @@ ChromeActions.prototype = {
}
};
// Event listener to trigger chrome privedged code.
function RequestListener(actions) {
this.actions = actions;
@ -163,38 +152,32 @@ PdfStreamConverter.prototype = {
var channel = ioService.newChannel(
'resource://pdf.js/web/viewer.html', null, null);
var listener = this.listener;
// Proxy all the request observer calls, when it gets to onStopRequest
// we can get the dom window.
var proxy = {
onStartRequest: function() {
listener.onStartRequest.apply(listener, arguments);
},
onDataAvailable: function() {
listener.onDataAvailable.apply(listener, arguments);
},
onStopRequest: function() {
var domWindow = getDOMWindow(channel);
// Double check the url is still the correct one.
if (domWindow.document.documentURIObject.equals(aRequest.URI)) {
let requestListener = new RequestListener(new ChromeActions);
domWindow.addEventListener(PDFJS_EVENT_ID, function(event) {
requestListener.receive(event);
}, false, true);
}
listener.onStopRequest.apply(listener, arguments);
}
};
// Keep the URL the same so the browser sees it as the same.
channel.originalURI = aRequest.URI;
channel.asyncOpen(this.listener, aContext);
// Setup a global listener waiting for the next DOM to be created and verfiy
// that its the one we want by its URL. When the correct DOM is found create
// an event listener on that window for the pdf.js events that require
// chrome priviledges. Code snippet from John Galt.
let window = aRequest.loadGroup.groupObserver
.QueryInterface(Ci.nsIWebProgress)
.DOMWindow;
let top = topWindow(window);
let id = windowID(window);
window = null;
top.addEventListener('DOMWindowCreated', function onDOMWinCreated(event) {
let doc = event.originalTarget;
let win = doc.defaultView;
if (id == windowID(win)) {
top.removeEventListener('DOMWindowCreated', onDOMWinCreated, true);
if (!doc.documentURIObject.equals(aRequest.URI))
return;
let requestListener = new RequestListener(new ChromeActions);
win.addEventListener(PDFJS_EVENT_ID, function(event) {
requestListener.receive(event);
}, false, true);
} else if (!getWindow(top, id)) {
top.removeEventListener('DOMWindowCreated', onDOMWinCreated, true);
}
}, true);
channel.asyncOpen(proxy, aContext);
},
// nsIRequestObserver::onStopRequest

View File

@ -391,11 +391,43 @@ canvas {
}
}
#loading {
#loadingBox {
margin: 100px 0;
text-align: center;
}
#loadingBar {
background-color: #333;
display: inline-block;
border: 1px solid black;
clear: both;
margin:0px;
line-height: 0;
border-radius: 4px;
width: 15em;
height: 1.5em;
}
#loadingBar .progress {
background-color: green;
display: inline-block;
float: left;
background: #b4e391;
background: -moz-linear-gradient(top, #b4e391 0%, #61c419 50%, #b4e391 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b4e391), color-stop(50%,#61c419), color-stop(100%,#b4e391));
background: -webkit-linear-gradient(top, #b4e391 0%,#61c419 50%,#b4e391 100%);
background: -o-linear-gradient(top, #b4e391 0%,#61c419 50%,#b4e391 100%);
background: -ms-linear-gradient(top, #b4e391 0%,#61c419 50%,#b4e391 100%);
background: linear-gradient(top, #b4e391 0%,#61c419 50%,#b4e391 100%);
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
width: 0%;
height: 100%;
}
#PDFBug {
font-size: 10px;
position: fixed;

View File

@ -15,6 +15,15 @@ var kMaxScale = 4.0;
var kImageDirectory = './images/';
var kSettingsMemory = 20;
function getFileName(url) {
var anchor = url.indexOf('#');
var query = url.indexOf('?');
var end = Math.min(
anchor > 0 ? anchor : url.length,
query > 0 ? query : url.length);
return url.substring(url.lastIndexOf('/', end) + 1, end);
}
var Cache = function cacheCache(size) {
var data = [];
this.push = function cachePush(view) {
@ -27,6 +36,48 @@ var Cache = function cacheCache(size) {
};
};
var ProgressBar = (function ProgressBarClosure() {
function clamp(v, min, max) {
return Math.min(Math.max(v, min), max);
}
function ProgressBar(id, opts) {
// Fetch the sub-elements for later
this.div = document.querySelector(id + ' .progress');
// Get options, with sensible defaults
this.height = opts.height || 100;
this.width = opts.width || 100;
this.units = opts.units || '%';
this.percent = opts.percent || 0;
// Initialize heights
this.div.style.height = this.height + this.units;
}
ProgressBar.prototype = {
updateBar: function ProgressBar_updateBar() {
var progressSize = this.width * this._percent / 100;
this.div.style.width = progressSize + this.units;
},
get percent() {
return this._percent;
},
set percent(val) {
this._percent = clamp(val, 0, 100);
this.updateBar();
}
};
return ProgressBar;
})();
var RenderingQueue = (function RenderingQueueClosure() {
function RenderingQueue() {
this.items = [];
@ -258,7 +309,13 @@ var PDFView = {
},
open: function pdfViewOpen(url, scale) {
document.title = this.url = url;
this.url = url;
document.title = decodeURIComponent(getFileName(url)) || url;
if (!PDFView.loadingBar) {
PDFView.loadingBar = new ProgressBar('#loadingBar', {});
}
var self = this;
PDFJS.getPdf(
@ -400,6 +457,8 @@ var PDFView = {
var percent = Math.round(level * 100);
var loadingIndicator = document.getElementById('loading');
loadingIndicator.textContent = 'Loading... ' + percent + '%';
PDFView.loadingBar.percent = percent;
},
load: function pdfViewLoad(data, scale) {
@ -414,8 +473,8 @@ var PDFView = {
var errorWrapper = document.getElementById('errorWrapper');
errorWrapper.setAttribute('hidden', 'true');
var loadingIndicator = document.getElementById('loading');
loadingIndicator.setAttribute('hidden', 'true');
var loadingBox = document.getElementById('loadingBox');
loadingBox.setAttribute('hidden', 'true');
var sidebar = document.getElementById('sidebarView');
sidebar.parentNode.scrollTop = 0;
@ -499,6 +558,24 @@ var PDFView = {
// Setting the default one.
this.parseScale(kDefaultScale, true);
}
this.metadata = null;
var metadata = pdf.catalog.metadata;
var info = this.documentInfo = pdf.info;
var pdfTitle;
if (metadata) {
this.metadata = metadata = new PDFJS.Metadata(metadata);
if (metadata.has('dc:title'))
pdfTitle = metadata.get('dc:title');
}
if (!pdfTitle && info && info['Title'])
pdfTitle = info['Title'];
if (pdfTitle)
document.title = pdfTitle;
},
setHash: function pdfViewSetHash(hash) {
@ -1195,10 +1272,6 @@ window.addEventListener('load', function webViewerLoad(evt) {
sidebarScrollView.addEventListener('scroll', updateThumbViewArea, true);
}, true);
window.addEventListener('unload', function webViewerUnload(evt) {
window.scrollTo(0, 0);
}, true);
/**
* Render the next not yet visible page already such that it is
* hopefully ready once the user scrolls to it.

View File

@ -8,7 +8,7 @@
<Description about="urn:mozilla:install-manifest">
<em:id>uriloader@pdf.js</em:id>
<em:name>PDF Viewer</em:name>
<em:version>0.2.414</em:version>
<em:version>0.2.536</em:version>
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
@ -20,7 +20,7 @@
<em:bootstrap>true</em:bootstrap>
<em:creator>Mozilla</em:creator>
<em:description>Uses HTML5 to display PDF files directly in Firefox.</em:description>
<em:homepageURL>http://support.mozilla.org/kb/using-mozilla-pdf-viewer</em:homepageURL>
<em:homepageURL>https://support.mozilla.org/kb/Opening%20PDF%20files%20within%20Firefox</em:homepageURL>
<em:type>2</em:type>
</Description>
</RDF>

View File

@ -939,8 +939,8 @@ const gFormSubmitObserver = {
element.addEventListener("blur", blurHandler, false);
// One event to bring them all and in the darkness bind them.
this.panel.addEventListener("popuphiding", function(aEvent) {
aEvent.target.removeEventListener("popuphiding", arguments.callee, false);
this.panel.addEventListener("popuphiding", function onPopupHiding(aEvent) {
aEvent.target.removeEventListener("popuphiding", onPopupHiding, false);
element.removeEventListener("input", inputHandler, false);
element.removeEventListener("blur", blurHandler, false);
}, false);
@ -3746,8 +3746,8 @@ function BrowserCustomizeToolbar()
// Open the panel, but make it invisible until the iframe has loaded so
// that the user doesn't see a white flash.
panel.style.visibility = "hidden";
gNavToolbox.addEventListener("beforecustomization", function () {
gNavToolbox.removeEventListener("beforecustomization", arguments.callee, false);
gNavToolbox.addEventListener("beforecustomization", function onBeforeCustomization() {
gNavToolbox.removeEventListener("beforecustomization", onBeforeCustomization, false);
panel.style.removeProperty("visibility");
}, false);
panel.openPopup(gNavToolbox, "after_start", 0, 0);
@ -5182,9 +5182,9 @@ var TabsProgressListener = {
Components.isSuccessCode(aStatus) &&
/^about:/.test(aWebProgress.DOMWindow.document.documentURI)) {
aBrowser.addEventListener("click", BrowserOnClick, false);
aBrowser.addEventListener("pagehide", function () {
aBrowser.addEventListener("pagehide", function onPageHide() {
aBrowser.removeEventListener("click", BrowserOnClick, false);
aBrowser.removeEventListener("pagehide", arguments.callee, true);
aBrowser.removeEventListener("pagehide", onPageHide, true);
}, true);
// We also want to make changes to page UI for unprivileged about pages.
@ -6922,8 +6922,8 @@ function BrowserOpenAddonsMgr(aView) {
if (aView) {
// This must be a new load, else the ping/pong would have
// found the window above.
Services.obs.addObserver(function (aSubject, aTopic, aData) {
Services.obs.removeObserver(arguments.callee, aTopic);
Services.obs.addObserver(function observer(aSubject, aTopic, aData) {
Services.obs.removeObserver(observer, aTopic);
aSubject.loadView(aView);
}, "EM-loaded", false);
}
@ -8330,8 +8330,8 @@ var gIdentityHandler = {
// Add the "open" attribute to the identity box for styling
this._identityBox.setAttribute("open", "true");
var self = this;
this._identityPopup.addEventListener("popuphidden", function (e) {
e.currentTarget.removeEventListener("popuphidden", arguments.callee, false);
this._identityPopup.addEventListener("popuphidden", function onPopupHidden(e) {
e.currentTarget.removeEventListener("popuphidden", onPopupHidden, false);
self._identityBox.removeAttribute("open");
}, false);

View File

@ -924,6 +924,7 @@
if (!this._previewMode) {
this.mCurrentTab.removeAttribute("unread");
this.selectedTab.lastAccessed = Date.now();
#ifdef MOZ_E10S_COMPAT
// Bug 666816 - TypeAheadFind support for e10s
@ -3816,6 +3817,7 @@
<field name="mCorrespondingMenuitem">null</field>
<field name="_fullyOpen">false</field>
<field name="closing">false</field>
<field name="lastAccessed">0</field>
</implementation>
<handlers>

View File

@ -273,6 +273,7 @@ _BROWSER_FILES = \
browser_middleMouse_inherit.js \
redirect_bug623155.sjs \
browser_tabDrop.js \
browser_lastAccessedTab.js \
$(NULL)
ifneq (cocoa,$(MOZ_WIDGET_TOOLKIT))

View File

@ -0,0 +1,24 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
/**
* Test for bug 739866.
*
* 1. Adds a new tab (but doesn't select it)
* 2. Checks if timestamp on the new tab is 0
* 3. Selects the new tab, checks that the timestamp is updated (>0)
* 4. Selects the original tab & checks if new tab's timestamp has remained changed
*/
function test() {
let originalTab = gBrowser.selectedTab;
let newTab = gBrowser.addTab("about:blank", {skipAnimation: true});
is(newTab.lastAccessed, 0, "Timestamp on the new tab is 0.");
gBrowser.selectedTab = newTab;
let newTabAccessedDate = newTab.lastAccessed;
ok(newTabAccessedDate > 0, "Timestamp on the selected tab is more than 0.");
ok(newTabAccessedDate <= Date.now(), "Timestamp less than or equal current Date.");
gBrowser.selectedTab = originalTab;
is(newTab.lastAccessed, newTabAccessedDate, "New tab's timestamp remains the same.");
gBrowser.removeTab(newTab);
}

View File

@ -401,9 +401,8 @@ WebContentConverterRegistrar.prototype = {
function WCCR_registerProtocolHandler(aProtocol, aURIString, aTitle, aContentWindow) {
LOG("registerProtocolHandler(" + aProtocol + "," + aURIString + "," + aTitle + ")");
if (Cc["@mozilla.org/privatebrowsing;1"].
getService(Ci.nsIPrivateBrowsingService).
privateBrowsingEnabled) {
var browserWindow = this._getBrowserWindowForContentWindow(aContentWindow);
if (browserWindow.gPrivateBrowsingUI.privateWindow) {
// Inside the private browsing mode, we don't want to alert the user to save
// a protocol handler. We log it to the error console so that web developers
// would have some way to tell what's going wrong.
@ -488,7 +487,7 @@ WebContentConverterRegistrar.prototype = {
buttons = [addButton];
}
var browserWindow = this._getBrowserWindowForContentWindow(aContentWindow);
var browserElement = this._getBrowserForContentWindow(browserWindow, aContentWindow);
var notificationBox = browserWindow.getBrowser().getNotificationBox(browserElement);
notificationBox.appendNotification(message,

View File

@ -133,32 +133,18 @@ Cu.import("resource://gre/modules/debug.js");
Cu.import("resource:///modules/TelemetryTimestamps.jsm");
Cu.import("resource://gre/modules/TelemetryStopwatch.jsm");
XPCOMUtils.defineLazyGetter(this, "NetUtil", function() {
Cu.import("resource://gre/modules/NetUtil.jsm");
return NetUtil;
});
XPCOMUtils.defineLazyGetter(this, "ScratchpadManager", function() {
Cu.import("resource:///modules/devtools/scratchpad-manager.jsm");
return ScratchpadManager;
});
XPCOMUtils.defineLazyGetter(this, "XPathGenerator", function() {
Cu.import("resource:///modules/sessionstore/XPathGenerator.jsm");
return XPathGenerator;
});
XPCOMUtils.defineLazyServiceGetter(this, "CookieSvc",
"@mozilla.org/cookiemanager;1", "nsICookieManager2");
XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
"resource://gre/modules/NetUtil.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "ScratchpadManager",
"resource:///modules/devtools/scratchpad-manager.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "XPathGenerator",
"resource:///modules/sessionstore/XPathGenerator.jsm");
#ifdef MOZ_CRASHREPORTER
XPCOMUtils.defineLazyServiceGetter(this, "CrashReporter",
"@mozilla.org/xre/app-info;1", "nsICrashReporter");
#endif
XPCOMUtils.defineLazyServiceGetter(this, "SecuritySvc",
"@mozilla.org/scriptsecuritymanager;1", "nsIScriptSecurityManager");
function debug(aMsg) {
aMsg = ("SessionStore: " + aMsg).replace(/\S{80}/g, "$&\n");
Services.console.logStringMessage(aMsg);
@ -168,8 +154,7 @@ function debug(aMsg) {
function SessionStoreService() {
XPCOMUtils.defineLazyGetter(this, "_prefBranch", function () {
return Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefService).getBranch("browser.");
return Services.prefs.getBranch("browser.");
});
// minimal interval between two save operations (in milliseconds)
@ -2141,7 +2126,7 @@ SessionStoreService.prototype = {
let storage, storageItemCount = 0;
try {
var principal = SecuritySvc.getCodebasePrincipal(uri);
var principal = Services.scriptSecurityManager.getCodebasePrincipal(uri);
// Using getSessionStorageForPrincipal instead of getSessionStorageForURI
// just to be able to pass aCreate = false, that avoids creation of the
@ -2515,7 +2500,7 @@ SessionStoreService.prototype = {
for (var [host, isPinned] in Iterator(internalWindow.hosts)) {
let list;
try {
list = CookieSvc.getCookiesFromHost(host);
list = Services.cookies.getCookiesFromHost(host);
}
catch (ex) {
debug("getCookiesFromHost failed. Host: " + host);
@ -3711,9 +3696,9 @@ SessionStoreService.prototype = {
for (let i = 0; i < aCookies.length; i++) {
var cookie = aCookies[i];
try {
CookieSvc.add(cookie.host, cookie.path || "", cookie.name || "",
cookie.value, !!cookie.secure, !!cookie.httponly, true,
"expiry" in cookie ? cookie.expiry : MAX_EXPIRY);
Services.cookies.add(cookie.host, cookie.path || "", cookie.name || "",
cookie.value, !!cookie.secure, !!cookie.httponly, true,
"expiry" in cookie ? cookie.expiry : MAX_EXPIRY);
}
catch (ex) { Cu.reportError(ex); } // don't let a single cookie stop recovering
}

View File

@ -611,23 +611,14 @@ nsScriptSecurityManager::ContentSecurityPolicyPermitsJSAction(JSContext *cx)
if (!evalOK) {
// get the script filename, script sample, and line number
// to log with the violation
JSStackFrame *fp = nsnull;
nsAutoString fileName;
PRUint32 lineNum = 0;
unsigned lineNum = 0;
NS_NAMED_LITERAL_STRING(scriptSample, "call to eval() or related function blocked by CSP");
fp = JS_FrameIterator(cx, &fp);
if (fp) {
JSScript *script = JS_GetFrameScript(cx, fp);
if (script) {
const char *file = JS_GetScriptFilename(cx, script);
if (file) {
CopyUTF8toUTF16(nsDependentCString(file), fileName);
}
jsbytecode *pc = JS_GetFramePC(cx, fp);
if (pc) {
lineNum = JS_PCToLineNumber(cx, script, pc);
}
JSScript *script;
if (JS_DescribeScriptedCaller(cx, &script, &lineNum)) {
if (const char *file = JS_GetScriptFilename(cx, script)) {
CopyUTF8toUTF16(nsDependentCString(file), fileName);
}
}

View File

@ -1439,6 +1439,8 @@ void
nsContentSink::DidBuildModelImpl(bool aTerminated)
{
if (mDocument && !aTerminated) {
MOZ_ASSERT(mDocument->GetReadyStateEnum() ==
nsIDocument::READYSTATE_LOADING, "Bad readyState");
mDocument->SetReadyStateInternal(nsIDocument::READYSTATE_INTERACTIVE);
}

View File

@ -4109,16 +4109,9 @@ nsContentUtils::CreateDocument(const nsAString& aNamespaceURI,
DocumentFlavor aFlavor,
nsIDOMDocument** aResult)
{
nsresult rv = NS_NewDOMDocument(aResult, aNamespaceURI, aQualifiedName,
aDoctype, aDocumentURI, aBaseURI, aPrincipal,
true, aEventObject, aFlavor);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDocument> document = do_QueryInterface(*aResult);
// created documents are immediately "complete" (ready to use)
document->SetReadyStateInternal(nsIDocument::READYSTATE_COMPLETE);
return NS_OK;
return NS_NewDOMDocument(aResult, aNamespaceURI, aQualifiedName,
aDoctype, aDocumentURI, aBaseURI, aPrincipal,
true, aEventObject, aFlavor);
}
/* static */
@ -5732,18 +5725,15 @@ nsContentUtils::CanAccessNativeAnon()
sSecurityManager->GetCxSubjectPrincipalAndFrame(cx, &fp);
NS_ENSURE_TRUE(principal, false);
JSScript *script = nsnull;
if (!fp) {
if (!JS_FrameIterator(cx, &fp)) {
if (!JS_DescribeScriptedCaller(cx, &script, nsnull)) {
// No code at all is running. So we must be arriving here as the result
// of C++ code asking us to do something. Allow access.
return true;
}
// Some code is running, we can't make the assumption, as above, but we
// can't use a native frame, so clear fp.
fp = nsnull;
} else if (!JS_IsScriptFrame(cx, fp)) {
fp = nsnull;
} else if (JS_IsScriptFrame(cx, fp)) {
script = JS_GetFrameScript(cx, fp);
}
bool privileged;
@ -5757,8 +5747,8 @@ nsContentUtils::CanAccessNativeAnon()
// if they've been cloned into less privileged contexts.
static const char prefix[] = "chrome://global/";
const char *filename;
if (fp && JS_IsScriptFrame(cx, fp) &&
(filename = JS_GetScriptFilename(cx, JS_GetFrameScript(cx, fp))) &&
if (script &&
(filename = JS_GetScriptFilename(cx, script)) &&
!strncmp(filename, prefix, ArrayLength(prefix) - 1)) {
return true;
}

View File

@ -1442,12 +1442,21 @@ nsDOMImplementation::CreateDocument(const nsAString& aNamespaceURI,
NS_ENSURE_STATE(!mScriptObject || scriptHandlingObject);
return nsContentUtils::CreateDocument(aNamespaceURI, aQualifiedName, aDoctype,
mDocumentURI, mBaseURI,
mOwner->NodePrincipal(),
scriptHandlingObject,
nsCOMPtr<nsIDOMDocument> document;
rv = nsContentUtils::CreateDocument(aNamespaceURI, aQualifiedName, aDoctype,
mDocumentURI, mBaseURI,
mOwner->NodePrincipal(),
scriptHandlingObject,
DocumentFlavorLegacyGuess,
aReturn);
getter_AddRefs(document));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDocument> doc = do_QueryInterface(document);
doc->SetReadyStateInternal(nsIDocument::READYSTATE_COMPLETE);
document.forget(aReturn);
return NS_OK;
}
NS_IMETHODIMP
@ -1519,6 +1528,8 @@ nsDOMImplementation::CreateHTMLDocument(const nsAString& aTitle,
rv = root->AppendChildTo(body, false);
NS_ENSURE_SUCCESS(rv, rv);
doc->SetReadyStateInternal(nsIDocument::READYSTATE_COMPLETE);
document.forget(aReturn);
return NS_OK;
@ -2366,6 +2377,8 @@ nsDocument::StartDocumentLoad(const char* aCommand, nsIChannel* aChannel,
}
#endif
MOZ_ASSERT(GetReadyStateEnum() == nsIDocument::READYSTATE_UNINITIALIZED,
"Bad readyState");
SetReadyStateInternal(READYSTATE_LOADING);
if (nsCRT::strcmp(kLoadAsData, aCommand) == 0) {
@ -7646,6 +7659,12 @@ void
nsDocument::SetReadyStateInternal(ReadyState rs)
{
mReadyState = rs;
if (rs == READYSTATE_UNINITIALIZED) {
// Transition back to uninitialized happens only to keep assertions happy
// right before readyState transitions to something else. Make this
// transition undetectable by Web content.
return;
}
if (mTiming) {
switch (rs) {
case READYSTATE_LOADING:

View File

@ -54,6 +54,7 @@
#include "nsFrameLoader.h"
#include "nsDOMTouchEvent.h"
#include "nsDOMStorage.h"
#include "sampler.h"
#define NS_TARGET_CHAIN_FORCE_CONTENT_DISPATCH (1 << 0)
#define NS_TARGET_CHAIN_WANTS_WILL_HANDLE_EVENT (1 << 1)
@ -480,6 +481,7 @@ nsEventDispatcher::Dispatch(nsISupports* aTarget,
nsDispatchingCallback* aCallback,
nsCOMArray<nsIDOMEventTarget>* aTargets)
{
SAMPLE_LABEL("nsEventDispatcher", "Dispatch");
NS_ASSERTION(aEvent, "Trying to dispatch without nsEvent!");
NS_ENSURE_TRUE(!NS_IS_EVENT_IN_DISPATCH(aEvent),
NS_ERROR_ILLEGAL_VALUE);

View File

@ -88,7 +88,6 @@
#include "nsIContentSecurityPolicy.h"
#include "nsJSEnvironment.h"
#include "xpcpublic.h"
#include "sampler.h"
using namespace mozilla::dom;
using namespace mozilla::hal;
@ -836,7 +835,6 @@ nsEventListenerManager::HandleEventInternal(nsPresContext* aPresContext,
nsEventStatus* aEventStatus,
nsCxPusher* aPusher)
{
SAMPLE_LABEL("nsEventListenerManager", "HandleEventInternal");
//Set the value of the internal PreventDefault flag properly based on aEventStatus
if (*aEventStatus == nsEventStatus_eConsumeNoDefault) {
aEvent->flags |= NS_EVENT_FLAG_NO_DEFAULT;

View File

@ -1067,9 +1067,9 @@ nsEventStateManager::PreHandleEvent(nsPresContext* aPresContext,
// Store last known screenPoint and clientPoint so pointer lock
// can use these values as constants.
if (NS_IS_TRUSTED_EVENT(aEvent) &&
(NS_IS_MOUSE_EVENT_STRUCT(aEvent) &&
((NS_IS_MOUSE_EVENT_STRUCT(aEvent) &&
IsMouseEventReal(aEvent)) ||
aEvent->eventStructType == NS_MOUSE_SCROLL_EVENT) {
aEvent->eventStructType == NS_MOUSE_SCROLL_EVENT)) {
if (!sIsPointerLocked) {
sLastScreenPoint = nsDOMUIEvent::CalculateScreenPoint(aPresContext, aEvent);
sLastClientPoint = nsDOMUIEvent::CalculateClientPoint(aPresContext, aEvent, nsnull);

View File

@ -1578,6 +1578,8 @@ nsHTMLDocument::Open(const nsAString& aContentTypeOrUrl,
--mWriteLevel;
SetReadyStateInternal(nsIDocument::READYSTATE_LOADING);
NS_ENSURE_SUCCESS(rv, rv);
return CallQueryInterface(this, aReturn);
}

View File

@ -165,6 +165,9 @@ void nsAudioAvailableEventManager::QueueWrittenAudioData(AudioDataValue* aAudioD
signalBuffer[i] = MOZ_CONVERT_AUDIO_SAMPLE(audioData[i]);
}
audioData += signalBufferTail;
NS_ASSERTION(audioDataLength >= signalBufferTail,
"audioDataLength about to wrap past zero to +infinity!");
audioDataLength -= signalBufferTail;
if (mPendingEvents.Length() > 0) {
@ -192,7 +195,6 @@ void nsAudioAvailableEventManager::QueueWrittenAudioData(AudioDataValue* aAudioD
mSignalBuffer = new float[currentBufferSize];
mSignalBufferPosition = 0;
signalBufferTail = currentBufferSize;
NS_ASSERTION(audioDataLength >= 0, "Past new signal data length.");
}
NS_ASSERTION(mSignalBufferPosition + audioDataLength < mSignalBufferLength,

View File

@ -457,6 +457,14 @@ nsXMLDocument::Load(const nsAString& aUrl, bool *aReturn)
return rv;
}
// StartDocumentLoad asserts that readyState is uninitialized, so
// uninitialize it. SetReadyStateInternal make this transition invisible to
// Web content. But before doing that, assert that the current readyState
// is complete as it should be after the call to ResetToURI() above.
MOZ_ASSERT(GetReadyStateEnum() == nsIDocument::READYSTATE_COMPLETE,
"Bad readyState");
SetReadyStateInternal(nsIDocument::READYSTATE_UNINITIALIZED);
// Prepare for loading the XML document "into oneself"
nsCOMPtr<nsIStreamListener> listener;
if (NS_FAILED(rv = StartDocumentLoad(kLoadAsData, channel,

View File

@ -258,6 +258,8 @@ txMozillaXMLOutput::endDocument(nsresult aResult)
if (mCreatingNewDocument) {
// This should really be handled by nsIDocument::EndLoad
MOZ_ASSERT(mDocument->GetReadyStateEnum() ==
nsIDocument::READYSTATE_LOADING, "Bad readyState");
mDocument->SetReadyStateInternal(nsIDocument::READYSTATE_INTERACTIVE);
nsScriptLoader* loader = mDocument->ScriptLoader();
if (loader) {
@ -837,6 +839,8 @@ txMozillaXMLOutput::createResultDocument(const nsSubstring& aName, PRInt32 aNsID
NS_ENSURE_SUCCESS(rv, rv);
}
// This should really be handled by nsIDocument::BeginLoad
MOZ_ASSERT(mDocument->GetReadyStateEnum() ==
nsIDocument::READYSTATE_UNINITIALIZED, "Bad readyState");
mDocument->SetReadyStateInternal(nsIDocument::READYSTATE_LOADING);
nsCOMPtr<nsIDocument> source = do_QueryInterface(aSourceDocument);
NS_ENSURE_STATE(source);

View File

@ -687,6 +687,8 @@ txMozillaXSLTProcessor::TransformToDoc(nsIDOMDocument **aResult)
static_cast<txAOutputXMLEventHandler*>(es.mOutputHandler);
handler->getOutputDocument(aResult);
nsCOMPtr<nsIDocument> doc = do_QueryInterface(*aResult);
MOZ_ASSERT(doc->GetReadyStateEnum() ==
nsIDocument::READYSTATE_INTERACTIVE, "Bad readyState");
doc->SetReadyStateInternal(nsIDocument::READYSTATE_COMPLETE);
}
}

View File

@ -1834,21 +1834,13 @@ PrintWarningOnConsole(JSContext *cx, const char *stringBundleProperty)
return;
}
JSStackFrame *fp, *iterator = nsnull;
fp = ::JS_FrameIterator(cx, &iterator);
PRUint32 lineno = 0;
unsigned lineno = 0;
JSScript *script;
nsAutoString sourcefile;
if (fp) {
JSScript* script = ::JS_GetFrameScript(cx, fp);
if (script) {
const char* filename = ::JS_GetScriptFilename(cx, script);
if (filename) {
CopyUTF8toUTF16(nsDependentCString(filename), sourcefile);
}
jsbytecode* pc = ::JS_GetFramePC(cx, fp);
if (pc) {
lineno = ::JS_PCToLineNumber(cx, script, pc);
}
if (JS_DescribeScriptedCaller(cx, &script, &lineno)) {
if (const char *filename = ::JS_GetScriptFilename(cx, script)) {
CopyUTF8toUTF16(nsDependentCString(filename), sourcefile);
}
}

View File

@ -311,6 +311,10 @@ nsDOMWindowUtils::SetDisplayPortForElement(float aXPx, float aYPx,
return NS_ERROR_INVALID_ARG;
}
if (content->GetCurrentDoc() != presShell->GetDocument()) {
return NS_ERROR_INVALID_ARG;
}
nsRect lastDisplayPort;
if (nsLayoutUtils::GetDisplayPort(content, &lastDisplayPort) &&
displayport.IsEqualInterior(lastDisplayPort)) {

View File

@ -5979,23 +5979,7 @@ JSObject* nsGlobalWindow::CallerGlobal()
return nsnull;
}
JSObject *scope = nsnull;
JSStackFrame *fp = nsnull;
JS_FrameIterator(cx, &fp);
if (fp) {
while (!JS_IsScriptFrame(cx, fp)) {
if (!JS_FrameIterator(cx, &fp))
break;
}
if (fp)
scope = JS_GetGlobalForFrame(fp);
}
if (!scope)
scope = JS_GetGlobalForScopeChain(cx);
return scope;
return JS_GetScriptedGlobal(cx);
}
nsGlobalWindow*

View File

@ -445,11 +445,8 @@ NS_ScriptErrorReporter(JSContext *cx,
// We don't want to report exceptions too eagerly, but warnings in the
// absence of werror are swallowed whole, so report those now.
if (!JSREPORT_IS_WARNING(report->flags)) {
JSStackFrame * fp = nsnull;
while ((fp = JS_FrameIterator(cx, &fp))) {
if (JS_IsScriptFrame(cx, fp)) {
return;
}
if (JS_DescribeScriptedCaller(cx, nsnull, nsnull)) {
return;
}
nsIXPConnect* xpc = nsContentUtils::XPConnect();

View File

@ -67,35 +67,17 @@ JSBool
nsJSUtils::GetCallingLocation(JSContext* aContext, const char* *aFilename,
PRUint32* aLineno)
{
// Get the current filename and line number
JSStackFrame* frame = nsnull;
JSScript* script = nsnull;
do {
frame = ::JS_FrameIterator(aContext, &frame);
unsigned lineno = 0;
if (frame) {
script = ::JS_GetFrameScript(aContext, frame);
}
} while (frame && !script);
if (script) {
const char* filename = ::JS_GetScriptFilename(aContext, script);
if (filename) {
PRUint32 lineno = 0;
jsbytecode* bytecode = ::JS_GetFramePC(aContext, frame);
if (bytecode) {
lineno = ::JS_PCToLineNumber(aContext, script, bytecode);
}
*aFilename = filename;
*aLineno = lineno;
return JS_TRUE;
}
if (!JS_DescribeScriptedCaller(aContext, &script, &lineno)) {
return JS_FALSE;
}
return JS_FALSE;
*aFilename = ::JS_GetScriptFilename(aContext, script);
*aLineno = lineno;
return JS_TRUE;
}
nsIScriptGlobalObject *

View File

@ -236,6 +236,27 @@ PowerManager::SetScreenBrightness(double aBrightness)
return NS_OK;
}
NS_IMETHODIMP
PowerManager::GetCpuSleepAllowed(bool *aAllowed)
{
if (!CheckPermission()) {
*aAllowed = true;
return NS_OK;
}
*aAllowed = hal::GetCpuSleepAllowed();
return NS_OK;
}
NS_IMETHODIMP
PowerManager::SetCpuSleepAllowed(bool aAllowed)
{
NS_ENSURE_TRUE(CheckPermission(), NS_ERROR_DOM_SECURITY_ERR);
hal::SetCpuSleepAllowed(aAllowed);
return NS_OK;
}
} // power
} // dom
} // mozilla

View File

@ -42,7 +42,7 @@ interface nsIDOMMozWakeLockListener;
/**
* This interface implements navigator.mozPower
*/
[scriptable, uuid(4586bed1-cf78-4436-b503-88277d645b68)]
[scriptable, uuid(256a3287-f528-45b5-9ba8-2b3650c056e6)]
interface nsIDOMMozPowerManager : nsISupports
{
void powerOff();
@ -96,4 +96,11 @@ interface nsIDOMMozPowerManager : nsISupports
* @throw NS_ERROR_INVALID_ARG if brightness is not in the range [0, 1].
*/
attribute double screenBrightness;
/**
* Is it possible that the device's CPU will sleep after the screen is
* disabled? Setting this attribute to false will prevent the device
* entering suspend state.
*/
attribute boolean cpuSleepAllowed;
};

View File

@ -1847,7 +1847,8 @@ public:
FLAG_CHAR_IS_TAB = 0x08,
FLAG_CHAR_IS_NEWLINE = 0x10,
FLAG_CHAR_IS_LOW_SURROGATE = 0x20,
CHAR_IDENTITY_FLAGS_MASK = 0x38,
GLYPH_COUNT_MASK = 0x00FFFF00U,
GLYPH_COUNT_SHIFT = 8
};
@ -1901,6 +1902,10 @@ public:
return !IsSimpleGlyph() && (mValue & FLAG_CHAR_IS_LOW_SURROGATE) != 0;
}
PRUint32 CharIdentityFlags() const {
return IsSimpleGlyph() ? 0 : (mValue & CHAR_IDENTITY_FLAGS_MASK);
}
void SetClusterStart(bool aIsClusterStart) {
NS_ASSERTION(!IsSimpleGlyph(),
"can't call SetClusterStart on simple glyphs");
@ -1927,15 +1932,17 @@ public:
CompressedGlyph& SetSimpleGlyph(PRUint32 aAdvanceAppUnits, PRUint32 aGlyph) {
NS_ASSERTION(IsSimpleAdvance(aAdvanceAppUnits), "Advance overflow");
NS_ASSERTION(IsSimpleGlyphID(aGlyph), "Glyph overflow");
mValue = (mValue & FLAGS_CAN_BREAK_BEFORE) |
NS_ASSERTION(!CharIdentityFlags(), "Char identity flags lost");
mValue = (mValue & (FLAGS_CAN_BREAK_BEFORE | FLAG_CHAR_IS_SPACE)) |
FLAG_IS_SIMPLE_GLYPH |
(aAdvanceAppUnits << ADVANCE_SHIFT) | aGlyph;
return *this;
}
CompressedGlyph& SetComplex(bool aClusterStart, bool aLigatureStart,
PRUint32 aGlyphCount) {
mValue = (mValue & FLAGS_CAN_BREAK_BEFORE) |
mValue = (mValue & (FLAGS_CAN_BREAK_BEFORE | FLAG_CHAR_IS_SPACE)) |
FLAG_NOT_MISSING |
CharIdentityFlags() |
(aClusterStart ? 0 : FLAG_NOT_CLUSTER_START) |
(aLigatureStart ? 0 : FLAG_NOT_LIGATURE_GROUP_START) |
(aGlyphCount << GLYPH_COUNT_SHIFT);
@ -1946,7 +1953,9 @@ public:
* the cluster-start flag (see bugs 618870 and 619286).
*/
CompressedGlyph& SetMissing(PRUint32 aGlyphCount) {
mValue = (mValue & (FLAGS_CAN_BREAK_BEFORE | FLAG_NOT_CLUSTER_START)) |
mValue = (mValue & (FLAGS_CAN_BREAK_BEFORE | FLAG_NOT_CLUSTER_START |
FLAG_CHAR_IS_SPACE)) |
CharIdentityFlags() |
(aGlyphCount << GLYPH_COUNT_SHIFT);
return *this;
}

View File

@ -363,6 +363,22 @@ void SetScreenEnabled(bool enabled)
PROXY_IF_SANDBOXED(SetScreenEnabled(enabled));
}
bool GetCpuSleepAllowed()
{
// Generally for interfaces that are accessible by normal web content
// we should cache the result and be notified on state changes, like
// what the battery API does. But since this is only used by
// privileged interface, the synchronous getter is OK here.
AssertMainThread();
RETURN_PROXY_IF_SANDBOXED(GetCpuSleepAllowed());
}
void SetCpuSleepAllowed(bool allowed)
{
AssertMainThread();
PROXY_IF_SANDBOXED(SetCpuSleepAllowed(allowed));
}
double GetScreenBrightness()
{
AssertMainThread();

View File

@ -148,6 +148,17 @@ double GetScreenBrightness();
*/
void SetScreenBrightness(double brightness);
/**
* Determine whether the device is allowed to sleep.
*/
bool GetCpuSleepAllowed();
/**
* Set whether the device is allowed to suspend automatically after
* the screen is disabled.
*/
void SetCpuSleepAllowed(bool allowed);
/**
* Set the value of a light to a particular color, with a specific flash pattern.
* light specifices which light. See Hal.idl for the list of constants

View File

@ -117,7 +117,11 @@ CPPSRCS += \
endif
ifneq (gonk,$(MOZ_WIDGET_TOOLKIT)) #{
CPPSRCS += FallbackLights.cpp FallbackTime.cpp
CPPSRCS += \
FallbackLights.cpp \
FallbackTime.cpp \
FallbackWakeLocks.cpp \
$(NULL)
endif #}
# Screen Orientation backend

View File

@ -0,0 +1,23 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set sw=2 ts=8 et ft=cpp : */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "Hal.h"
namespace mozilla {
namespace hal_impl {
bool
GetCpuSleepAllowed()
{
return true;
}
void
SetCpuSleepAllowed(bool allowed)
{}
} // namespace hal_impl
} // namespace mozilla

View File

@ -329,6 +329,8 @@ namespace {
* RAII class to help us remember to close file descriptors.
*/
const char *screenEnabledFilename = "/sys/power/state";
const char *wakeLockFilename = "/sys/power/wake_lock";
const char *wakeUnlockFilename = "/sys/power/wake_unlock";
template<ssize_t n>
bool ReadFromFile(const char *filename, char (&buf)[n])
@ -370,6 +372,12 @@ void WriteToFile(const char *filename, const char *toWrite)
// the screen is on or not.
bool sScreenEnabled = true;
// We can read wakeLockFilename to find out whether the cpu wake lock
// is already acquired, but reading and parsing it is a lot more work
// than tracking it ourselves, and it won't be accurate anyway (kernel
// internal wake locks aren't counted here.)
bool sCpuSleepAllowed = true;
} // anonymous namespace
bool
@ -422,6 +430,19 @@ SetScreenBrightness(double brightness)
hal::SetLight(hal::eHalLightID_Buttons, aConfig);
}
bool
GetCpuSleepAllowed()
{
return sCpuSleepAllowed;
}
void
SetCpuSleepAllowed(bool aAllowed)
{
WriteToFile(aAllowed ? wakeUnlockFilename : wakeLockFilename, "gecko");
sCpuSleepAllowed = aAllowed;
}
static light_device_t* sLights[hal::eHalLightID_Count]; // will be initialized to NULL
light_device_t* GetDevice(hw_module_t* module, char const* name)

View File

@ -120,6 +120,9 @@ parent:
sync GetScreenEnabled() returns (bool enabled);
SetScreenEnabled(bool enabled);
sync GetCpuSleepAllowed() returns (bool allowed);
SetCpuSleepAllowed(bool allowed);
sync GetScreenBrightness() returns (double brightness);
SetScreenBrightness(double brightness);

View File

@ -138,6 +138,20 @@ SetScreenEnabled(bool enabled)
Hal()->SendSetScreenEnabled(enabled);
}
bool
GetCpuSleepAllowed()
{
bool allowed = true;
Hal()->SendGetCpuSleepAllowed(&allowed);
return allowed;
}
void
SetCpuSleepAllowed(bool allowed)
{
Hal()->SendSetCpuSleepAllowed(allowed);
}
double
GetScreenBrightness()
{
@ -367,6 +381,20 @@ public:
return true;
}
NS_OVERRIDE virtual bool
RecvGetCpuSleepAllowed(bool *allowed)
{
*allowed = hal::GetCpuSleepAllowed();
return true;
}
NS_OVERRIDE virtual bool
RecvSetCpuSleepAllowed(const bool &allowed)
{
hal::SetCpuSleepAllowed(allowed);
return true;
}
NS_OVERRIDE virtual bool
RecvGetScreenBrightness(double *brightness)
{

View File

@ -136,15 +136,12 @@ ScriptErrorReporter(JSContext *cx,
int i, j, k, n;
char *prefix = NULL, *tmp;
const char *ctmp;
JSStackFrame * fp = nsnull;
nsCOMPtr<nsIXPConnect> xpc;
// Don't report an exception from inner JS frames as the callers may intend
// to handle it.
while ((fp = JS_FrameIterator(cx, &fp))) {
if (JS_IsScriptFrame(cx, fp)) {
return;
}
if (JS_DescribeScriptedCaller(cx, nsnull, nsnull)) {
return;
}
// In some cases cx->fp is null here so use XPConnect to tell us about inner

View File

@ -6717,3 +6717,14 @@ JS_DecodeInterpretedFunction(JSContext *cx, const void *data, uint32_t length,
return NULL;
return funobj;
}
JS_PUBLIC_API(JSObject *)
JS_GetScriptedGlobal(JSContext *cx)
{
FrameRegsIter i(cx);
if (i.done())
return JS_GetGlobalForScopeChain(cx);
return JS_GetGlobalForFrame(Jsvalify(i.fp()));
}

View File

@ -2871,6 +2871,9 @@ JS_GetGlobalForObject(JSContext *cx, JSObject *obj);
extern JS_PUBLIC_API(JSObject *)
JS_GetGlobalForScopeChain(JSContext *cx);
extern JS_PUBLIC_API(JSObject *)
JS_GetScriptedGlobal(JSContext *cx);
/*
* Initialize the 'Reflect' object on a global object.
*/

View File

@ -78,3 +78,5 @@ PKG_STAGE = $(DIST)/test-package-stage
stage-package:
$(NSINSTALL) -D $(PKG_STAGE)/jsreftest/tests
@(cd $(srcdir) && tar $(TAR_CREATE_FLAGS) - $(TEST_FILES)) | (cd $(PKG_STAGE)/jsreftest/tests && tar -xf -)
$(srcdir)/jstests.py --make-manifests $(PKG_STAGE)/jsreftest/tests/

31
js/src/tests/README.txt Normal file
View File

@ -0,0 +1,31 @@
JS Test Suite Readme
====================
The JS test suite is a fairly extensive collection of correctness and regression
tests for the Spidermonkey engine. Two harnesses run these tests: the shell test
harness in this directory and the "reftest" harness built into the browser, used
by Tinderbox. The browser reftests require additional manifest files; these are
generated automatically by the build phase 'package-tests'.
Adding a test
-------------
Drop it in an appropriate directory under the tests directory.
<fineprint> Some names are forbidden. Do not name your test browser.js,
shell.js, jsref.js, template.js, user.js, js-test-driver-begin.js, or
js-test-driver-end.js. </fineprint>
Adjusting when and how a test runs
----------------------------------
Put a comment at the top of the header matching the format:
// |reftest| <options> -- <comment>
Where <options> is a standard reftest options string, as documented by:
http://mxr.mozilla.org/mozilla-central/source/layout/tools/reftest/README.txt
Example:
// |reftest| skip-if(!xulRuntime.shell) -- does not always dismiss alert
<fineprint> Either // or /* */ style comments may be used. The entire
comment must appear in the first 512 bytes of the file. The control
string must be in its own comment block. </fineprint>

View File

@ -1,3 +1,4 @@
// |reftest| fails
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,30 +0,0 @@
url-prefix ../../jsreftest.html?test=e4x/Expressions/
script 11.1.1.js
script 11.1.2.js
script 11.1.3.js
script 11.1.4-01.js
script 11.1.4-02.js
script 11.1.4-03.js
script 11.1.4-04.js
script 11.1.4-05.js
script 11.1.4-06.js
script 11.1.4-07.js
fails script 11.1.4-08.js
script 11.1.4.js
script 11.1.5.js
script 11.2.1.js
script 11.2.2.js
script 11.2.3.js
script 11.2.4.js
script 11.3.1.js
script 11.3.2.js
script 11.4.1.js
script 11.5.1.js
script 11.6.1.js
script 11.6.2.js
script 11.6.3.js
script regress-301545.js
script regress-302531.js
script regress-340024.js
script regress-366123.js
script regress-496113.js

View File

@ -1,11 +0,0 @@
url-prefix ../../jsreftest.html?test=e4x/GC/
skip-if(Android) script regress-280844-1.js
skip-if(Android) script regress-280844-2.js
skip-if(!xulRuntime.shell) script regress-292455.js # does not always dismiss alert
script regress-313952-01.js
script regress-313952-02.js
script regress-324117.js
skip script regress-324278.js # slow
script regress-339785.js
script regress-357063-01.js
script regress-357063-02.js

View File

@ -1,3 +1,4 @@
// |reftest| skip-if(Android)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1

View File

@ -1,3 +1,4 @@
// |reftest| skip-if(Android)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1

View File

@ -1,3 +1,4 @@
// |reftest| skip-if(!xulRuntime.shell) -- does not always dismiss alert
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1

View File

@ -1,3 +1,4 @@
// |reftest| skip -- slow
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1

View File

@ -1,3 +1,4 @@
// |reftest| fails
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,2 +0,0 @@
url-prefix ../../jsreftest.html?test=e4x/Global/
fails script 13.1.2.1.js

View File

@ -1,9 +0,0 @@
url-prefix ../../jsreftest.html?test=e4x/Namespace/
script 13.2.1.js
script 13.2.2.js
script 13.2.5.js
script regress-283972.js
fails script regress-292863.js
script regress-350442.js
script regress-444608-02.js
script regress-444608.js

View File

@ -1,3 +1,4 @@
// |reftest| fails
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1

View File

@ -1,9 +0,0 @@
url-prefix ../../jsreftest.html?test=e4x/QName/
script 13.3.1.js
script 13.3.2.js
script 13.3.5.js
script regress-373595-01.js
script regress-373595-02.js
script regress-373595-03.js
script regress-444608.js
script regress-619529.js

View File

@ -1,96 +0,0 @@
url-prefix ../../jsreftest.html?test=e4x/Regress/
script regress-257679.js
script regress-263934.js
script regress-263935.js
script regress-263936.js
script regress-264369.js
script regress-271545.js
script regress-277650.js
script regress-277664.js
script regress-277683.js
script regress-277779.js
script regress-277935.js
skip script regress-278112.js # obsolete test
script regress-283349.js
script regress-290056.js
script regress-290499.js
script regress-301553.js
script regress-301573.js
script regress-301596.js
script regress-301692.js
skip-if(!xulRuntime.shell&&isDebugBuild) slow script regress-308111.js
script regress-309897.js
script regress-311580.js
script regress-313799.js
script regress-318922.js
skip script regress-319872.js # slow
script regress-321547.js
script regress-322499.js
script regress-323338-1.js
script regress-323338-2.js
script regress-325425.js
script regress-327564.js
script regress-327691-01.js
script regress-327691-02.js
script regress-327697.js
script regress-328249.js
script regress-329257.js
script regress-331558.js
script regress-331664.js
script regress-344455.js
script regress-347155.js
script regress-350206-1.js
script regress-350206.js
skip-if(!xulRuntime.shell) slow script regress-350238.js
script regress-350629.js
script regress-352097.js
script regress-352103.js
script regress-352223.js
script regress-354145-01.js
script regress-354145-02.js
script regress-354145-03.js
script regress-354145-04.js
script regress-354145-05.js
script regress-354145-07.js
script regress-354998.js
script regress-355474-02.js
script regress-355478.js
script regress-355569.js
script regress-356238-01.js
script regress-356238-02.js
script regress-356238-03.js
skip script regress-361451.js # obsolete test
script regress-364017.js
script regress-369032.js
script regress-369536.js
script regress-369740.js
script regress-370016.js
script regress-370048-01.js
script regress-370048-02.js
script regress-370372.js
script regress-371369.js
script regress-372563.js
script regress-372564.js
script regress-373082.js
script regress-374106.js
script regress-374112.js
script regress-374116.js
script regress-374160.js
script regress-375406.js
script regress-378492.js
script regress-380833.js
script regress-383255.js
skip-if(Android) silentfail script regress-394941.js
script regress-407323.js
script regress-426520.js
script regress-453915.js
skip-if(Android) silentfail script regress-458679-01.js
skip-if(Android) silentfail script regress-458679-02.js
script regress-460180.js
script regress-465063.js
script regress-470619.js
skip-if(Android) script regress-473709.js
skip-if(Android) script regress-474319.js
script regress-477053.js
script regress-561031.js
script regress-587434.js

View File

@ -1,3 +1,4 @@
// |reftest| skip -- obsolete test
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,3 +1,4 @@
// |reftest| skip-if(!xulRuntime.shell&&isDebugBuild) slow
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1

View File

@ -1,3 +1,4 @@
// |reftest| skip -- slow
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1

View File

@ -1,3 +1,4 @@
// |reftest| skip-if(!xulRuntime.shell) slow
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,3 +1,4 @@
// |reftest| skip -- obsolete test
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,3 +1,4 @@
// |reftest| skip-if(Android) silentfail
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,3 +1,4 @@
// |reftest| skip-if(Android) silentfail
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,3 +1,4 @@
// |reftest| skip-if(Android) silentfail
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,3 +1,4 @@
// |reftest| skip-if(Android)
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,3 +1,4 @@
// |reftest| skip-if(Android)
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,4 +0,0 @@
url-prefix ../../jsreftest.html?test=e4x/Statements/
script 12.1.js
script 12.2.js
script 12.3-01.js

View File

@ -1,3 +1,4 @@
// |reftest| fails
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
*

View File

@ -1,3 +1,4 @@
// |reftest| skip -- obsolete test
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,3 +1,4 @@
// |reftest| skip -- obsolete test
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,3 +1,4 @@
// |reftest| skip -- obsolete test
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,3 +1,4 @@
// |reftest| skip -- obsolete test
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,13 +0,0 @@
url-prefix ../../jsreftest.html?test=e4x/TypeConversion/
script 10.1.1.js
script 10.1.2.js
fails script 10.2.1.js
script 10.3.1.js
script 10.3.js
script 10.4.1.js
script 10.4.js
skip script 10.5.1.js # obsolete test
skip script 10.5.js # obsolete test
skip script 10.6.1.js # obsolete test
skip script 10.6.js # obsolete test
script regress-302097.js

View File

@ -1,3 +1,4 @@
// |reftest| skip -- obsolete test
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,3 +1,4 @@
// |reftest| skip -- obsolete test
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,3 +1,4 @@
// |reftest| skip -- obsolete test
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,3 +1,4 @@
// |reftest| skip -- obsolete test
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,3 +1,4 @@
// |reftest| skip -- obsolete test
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,3 +1,4 @@
// |reftest| skip -- obsolete test
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,3 +1,4 @@
// |reftest| skip -- obsolete test
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,3 +1,4 @@
// |reftest| skip -- obsolete test
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,3 +1,4 @@
// |reftest| skip -- obsolete test
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,3 +1,4 @@
// |reftest| skip -- obsolete test
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,3 +1,4 @@
// |reftest| skip -- obsolete test
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,3 +1,4 @@
// |reftest| skip -- obsolete test
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,3 +1,4 @@
// |reftest| skip -- obsolete test
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,3 +1,4 @@
// |reftest| skip -- obsolete test
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,24 +0,0 @@
url-prefix ../../jsreftest.html?test=e4x/Types/
script 9.1.1.1.js
skip script 9.1.1.10.js # obsolete test
skip script 9.1.1.11.js # obsolete test
skip script 9.1.1.12.js # obsolete test
skip script 9.1.1.13.js # obsolete test
script 9.1.1.2.js
script 9.1.1.3.js
skip script 9.1.1.4.js # obsolete test
skip script 9.1.1.5.js # obsolete test
script 9.1.1.6.js
skip script 9.1.1.7.js # obsolete test
skip script 9.1.1.8.js # obsolete test
script 9.1.1.9.js
script 9.2.1.1.js
skip script 9.2.1.10.js # obsolete test
script 9.2.1.2.js
skip script 9.2.1.3.js # obsolete test
skip script 9.2.1.4.js # obsolete test
skip script 9.2.1.5.js # obsolete test
skip script 9.2.1.6.js # obsolete test
skip script 9.2.1.7.js # obsolete test
script 9.2.1.8.js
script 9.2.1.9.js

View File

@ -1,3 +1,4 @@
// |reftest| skip -- obsolete test
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* ***** BEGIN LICENSE BLOCK *****

View File

@ -1,57 +0,0 @@
url-prefix ../../jsreftest.html?test=e4x/XML/
script 13.4.1.js
script 13.4.2.js
script 13.4.3.10.js
script 13.4.3.js
skip script 13.4.4.1.js # obsolete test
script 13.4.4.10.js
script 13.4.4.11.js
script 13.4.4.12-1.js
script 13.4.4.12.js
script 13.4.4.13.js
script 13.4.4.14.js
script 13.4.4.15.js
script 13.4.4.16.js
script 13.4.4.17.js
script 13.4.4.18.js
script 13.4.4.19.js
script 13.4.4.2.js
script 13.4.4.20.js
script 13.4.4.21.js
script 13.4.4.22.js
script 13.4.4.23.js
script 13.4.4.24.js
script 13.4.4.25.js
script 13.4.4.26.js
script 13.4.4.27.js
script 13.4.4.28.js
script 13.4.4.29.js
script 13.4.4.3-01.js
script 13.4.4.3-02.js
script 13.4.4.3.js
script 13.4.4.30.js
script 13.4.4.31.js
script 13.4.4.32-01.js
script 13.4.4.32.js
script 13.4.4.33.js
script 13.4.4.34.js
script 13.4.4.35.js
script 13.4.4.36.js
script 13.4.4.37.js
script 13.4.4.38.js
script 13.4.4.39.js
script 13.4.4.4.js
script 13.4.4.40.js
script 13.4.4.5.js
script 13.4.4.6.js
script 13.4.4.7.js
script 13.4.4.8.js
script 13.4.4.9.js
script regress-291930.js
skip-if(Android) silentfail script regress-324422-1.js
skip script regress-324422-2.js # slow
skip script regress-324688.js # bug 528404 - disable due to random timeouts
script regress-336921.js
script regress-376773.js
script regress-621464.js
script regress-638982.js

View File

@ -1,3 +1,4 @@
// |reftest| skip-if(Android) silentfail
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****

Some files were not shown because too many files have changed in this diff Show More