This commit is contained in:
Victor Porof 2013-05-16 10:32:06 +03:00
Родитель 6b9ae573ef b61cf72937
Коммит 5541c2365f
746 изменённых файлов: 7924 добавлений и 46966 удалений

Просмотреть файл

@ -17,5 +17,4 @@
#
# Modifying this file will now automatically clobber the buildbot machines \o/
#
Bug 866093 - Change in .gyp file for Android builds.
Bug 861039 - Nuking and rebuilding gfx/angle without clobber caused: "No rule to make target `../../../../gfx/angle/src/compiler/ArrayBoundsClamper.cpp', needed by `ArrayBoundsClamper.o'. Stop."
Bug 852687 - changing an idl without clobbering resulted test failures

Просмотреть файл

@ -630,6 +630,9 @@ Accessible::VisibilityState()
if (view && view->GetVisibility() == nsViewVisibility_kHide)
return states::INVISIBLE;
if (nsLayoutUtils::IsPopup(curFrame))
return 0;
// Offscreen state for background tab content and invisible for not selected
// deck panel.
nsIFrame* parentFrame = curFrame->GetParent();

Просмотреть файл

@ -1108,13 +1108,47 @@ HyperTextAccessible::GetTextAfterOffset(int32_t aOffset,
if (IsDefunct())
return NS_ERROR_FAILURE;
if (aBoundaryType == BOUNDARY_CHAR) {
GetCharAt(aOffset, eGetAfter, aText, aStartOffset, aEndOffset);
return NS_OK;
}
int32_t offset = ConvertMagicOffset(aOffset);
if (offset < 0)
return NS_ERROR_INVALID_ARG;
return GetTextHelper(eGetAfter, aBoundaryType, aOffset,
aStartOffset, aEndOffset, aText);
switch (aBoundaryType) {
case BOUNDARY_CHAR:
GetCharAt(aOffset, eGetAfter, aText, aStartOffset, aEndOffset);
return NS_OK;
case BOUNDARY_WORD_START:
// Move word forward twice to find start and end offsets.
*aStartOffset = FindWordBoundary(offset, eDirNext, eStartWord);
*aEndOffset = FindWordBoundary(*aStartOffset, eDirNext, eStartWord);
return GetText(*aStartOffset, *aEndOffset, aText);
case BOUNDARY_WORD_END:
// If the offset is a word end (except 0 offset) then move forward to find
// end offset (start offset is the given offset). Otherwise move forward
// twice to find both start and end offsets.
if (offset == 0) {
*aStartOffset = FindWordBoundary(offset, eDirNext, eEndWord);
*aEndOffset = FindWordBoundary(*aStartOffset, eDirNext, eEndWord);
} else {
*aEndOffset = FindWordBoundary(offset, eDirNext, eEndWord);
*aStartOffset = FindWordBoundary(*aEndOffset, eDirPrevious, eEndWord);
if (*aStartOffset != offset) {
*aStartOffset = *aEndOffset;
*aEndOffset = FindWordBoundary(*aStartOffset, eDirNext, eEndWord);
}
}
return GetText(*aStartOffset, *aEndOffset, aText);
case BOUNDARY_LINE_START:
case BOUNDARY_LINE_END:
case BOUNDARY_ATTRIBUTE_RANGE:
return GetTextHelper(eGetAfter, aBoundaryType, aOffset,
aStartOffset, aEndOffset, aText);
default:
return NS_ERROR_INVALID_ARG;
}
}
// nsIPersistentProperties

Просмотреть файл

@ -15,16 +15,76 @@
src="../role.js" />
<script type="application/javascript"
src="../states.js" />
<script type="application/javascript"
src="../events.js" />
<script type="application/javascript">
<![CDATA[
function openMenu(aID, aSubID, aOffscreenSubID)
{
this.menuNode = getNode(aID);
this.eventSeq = [
new invokerChecker(EVENT_FOCUS, this.menuNode)
];
this.invoke = function openMenu_invoke()
{
this.menuNode.open = true;
}
this.finalCheck = function openMenu_finalCheck()
{
testStates(aID, 0, 0, STATE_INVISIBLE | STATE_OFFSCREEN);
testStates(aSubID, 0, 0, STATE_INVISIBLE | STATE_OFFSCREEN);
if (aOffscreenSubID)
testStates(aOffscreenSubID, STATE_OFFSCREEN, 0, STATE_INVISIBLE);
}
this.getID = function openMenu_invoke()
{
return "open menu '" + aID + "' and test states";
}
}
function closeMenu(aID, aSubID, aSub2ID)
{
this.menuNode = getNode(aID);
this.eventSeq = [
new invokerChecker(EVENT_FOCUS, document)
];
this.invoke = function openMenu_invoke()
{
this.menuNode.open = false;
}
this.finalCheck = function openMenu_finalCheck()
{
testStates(aID, 0, 0, STATE_INVISIBLE | STATE_OFFSCREEN);
testStates(aSubID, STATE_INVISIBLE, 0, STATE_OFFSCREEN);
testStates(aSub2ID, STATE_INVISIBLE, 0, STATE_OFFSCREEN);
}
this.getID = function openMenu_invoke()
{
return "open menu and test states";
}
}
var gQueue = null;
function doTest()
{
testStates("deck_pane2", 0, 0, STATE_INVISIBLE | STATE_OFFSCREEN);
testStates("tabs_pane1", 0, 0, STATE_INVISIBLE | STATE_OFFSCREEN);
testStates("tabs_pane2", STATE_OFFSCREEN, 0, STATE_INVISIBLE);
SimpleTest.finish();
gQueue = new eventQueue();
gQueue.push(new openMenu("mi_file1", "mi_file1.1"));
gQueue.push(new openMenu("mi_file1.2", "mi_file1.2.1", "mi_file1.2.4"));
gQueue.push(new closeMenu("mi_file1", "mi_file1.1", "mi_file1.2.1"));
gQueue.invoke(); // Will call SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
@ -36,9 +96,14 @@
<body xmlns="http://www.w3.org/1999/xhtml">
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=810260"
title=" xul:deck hidden pages shouldn't be offscreen">
title="xul:deck hidden pages shouldn't be offscreen">
Mozilla Bug 810260
</a>
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=865591"
title="Visible menu item have offscreen state">
Mozilla Bug 865591
</a>
<p id="display"></p>
<div id="content" style="display: none">
@ -65,6 +130,21 @@
</tabpanels>
</tabbox>
<menubar>
<menu label="File" id="mi_file1">
<menupopup>
<menuitem label="SubFile" id="mi_file1.1"/>
<menu label="SubFile2" id="mi_file1.2">
<menupopup style="max-height: 5em;">
<menuitem label="SubSubFile" id="mi_file1.2.1"/>
<menuitem label="SubSubFile2" id="mi_file1.2.2"/>
<menuitem label="SubSubFile3" id="mi_file1.2.3"/>
<menuitem label="SubSubFile4" id="mi_file1.2.4"/>
</menupopup>
</menu>
</menupopup>
</menu>
</menubar>
</vbox>
</hbox>

Просмотреть файл

@ -58,50 +58,20 @@
"textarea", kOk, kOk, kOk);
// BOUNDARY_WORD_START
testTextAfterOffset(0, BOUNDARY_WORD_START, "two ", 9, 13,
"div", kTodo, kTodo, kTodo,
"divbr", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"editablebr", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(0, BOUNDARY_WORD_START, "two ", 9, 13, IDs);
testTextAfterOffset(8, BOUNDARY_WORD_START, "two ", 9, 13,
"div", kTodo, kTodo, kTodo,
"divbr", kTodo, kTodo, kOk,
"editable", kTodo, kTodo, kTodo,
"editablebr", kTodo, kTodo, kOk,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(9, BOUNDARY_WORD_START, "words\n", 13, 19,
"div", kTodo, kTodo, kTodo,
"div", kOk, kOk, kOk,
"divbr", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"editable", kOk, kOk, kOk,
"editablebr", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
"textarea", kOk, kOk, kOk);
testTextAfterOffset(9, BOUNDARY_WORD_START, "words\n", 13, 19, IDs);
// BOUNDARY_WORD_END
testTextAfterOffset(0, BOUNDARY_WORD_END, "\n\ntwo", 7, 12,
"div", kTodo, kTodo, kTodo,
"divbr", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"editablebr", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(6, BOUNDARY_WORD_END, "\n\ntwo", 7, 12,
"div", kTodo, kTodo, kTodo,
"divbr", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"editablebr", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(7, BOUNDARY_WORD_END, "\n\ntwo", 7, 12,
"div", kOk, kOk, kOk,
"divbr", kOk, kOk, kOk,
"editable", kOk, kOk, kOk,
"editablebr", kOk, kOk, kOk,
"textarea", kOk, kOk, kOk);
testTextAfterOffset(8, BOUNDARY_WORD_END, " words", 12, 18,
"div", kTodo, kTodo, kTodo,
"divbr", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"editablebr", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(0, BOUNDARY_WORD_END, "\n\ntwo", 7, 12, IDs);
testTextAfterOffset(6, BOUNDARY_WORD_END, "\n\ntwo", 7, 12, IDs);
testTextAfterOffset(7, BOUNDARY_WORD_END, "\n\ntwo", 7, 12, IDs);
testTextAfterOffset(8, BOUNDARY_WORD_END, " words", 12, 18, IDs);
// BOUNDARY_LINE_START
testTextAfterOffset(0, BOUNDARY_LINE_START, "\n", 8, 9,

Просмотреть файл

@ -12,9 +12,9 @@
src="../text.js"></script>
<script type="application/javascript">
if (navigator.platform.startsWith("Mac")) {
SimpleTest.expectAssertions(0, 20);
SimpleTest.expectAssertions(0, 14);
} else {
SimpleTest.expectAssertions(20);
SimpleTest.expectAssertions(14);
}
function doTest()
@ -59,108 +59,28 @@
testCharAfterOffset("textarea", 15, "", 16, 16);
// BOUNDARY_WORD_START
testTextAfterOffset(0, BOUNDARY_WORD_START, "my ", 6, 9,
"input", kTodo, kTodo, kTodo,
"div", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(1, BOUNDARY_WORD_START, "my ", 6, 9,
"input", kTodo, kTodo, kTodo,
"div", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(5, BOUNDARY_WORD_START, "my ", 6, 9,
"input", kTodo, kTodo, kTodo,
"div", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(6, BOUNDARY_WORD_START, "friend", 9, 15,
"input", kTodo, kTodo, kTodo,
"div", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(7, BOUNDARY_WORD_START, "friend", 9, 15,
"input", kTodo, kTodo, kTodo,
"div", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(8, BOUNDARY_WORD_START, "friend", 9, 15,
"input", kTodo, kTodo, kTodo,
"div", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(9, BOUNDARY_WORD_START, "", 15, 15,
"input", kTodo, kTodo, kOk,
"div", kTodo, kTodo, kOk,
"editable", kTodo, kTodo, kOk,
"textarea", kTodo, kTodo, kOk);
testTextAfterOffset(11, BOUNDARY_WORD_START, "", 15, 15,
"input", kTodo, kTodo, kOk,
"div", kTodo, kTodo, kOk,
"editable", kTodo, kTodo, kOk,
"textarea", kTodo, kTodo, kOk);
testTextAfterOffset(14, BOUNDARY_WORD_START, "", 15, 15,
"input", kTodo, kTodo, kOk,
"div", kTodo, kTodo, kOk,
"editable", kTodo, kTodo, kOk,
"textarea", kTodo, kTodo, kOk);
testTextAfterOffset(15, BOUNDARY_WORD_START, "", 15, 15,
"input", kOk, kOk, kOk,
"div", kOk, kOk, kOk,
"editable", kOk, kOk, kOk,
"textarea", kTodo, kOk, kTodo);
testTextAfterOffset(0, BOUNDARY_WORD_START, "my ", 6, 9, IDs);
testTextAfterOffset(1, BOUNDARY_WORD_START, "my ", 6, 9, IDs);
testTextAfterOffset(5, BOUNDARY_WORD_START, "my ", 6, 9, IDs);
testTextAfterOffset(6, BOUNDARY_WORD_START, "friend", 9, 15, IDs);
testTextAfterOffset(7, BOUNDARY_WORD_START, "friend", 9, 15, IDs);
testTextAfterOffset(8, BOUNDARY_WORD_START, "friend", 9, 15, IDs);
testTextAfterOffset(9, BOUNDARY_WORD_START, "", 15, 15, IDs);
testTextAfterOffset(11, BOUNDARY_WORD_START, "", 15, 15, IDs);
testTextAfterOffset(14, BOUNDARY_WORD_START, "", 15, 15, IDs);
testTextAfterOffset(15, BOUNDARY_WORD_START, "", 15, 15, IDs);
// BOUNDARY_WORD_END
testTextAfterOffset(0, BOUNDARY_WORD_END, " my", 5, 8,
"input", kTodo, kTodo, kTodo,
"div", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(1, BOUNDARY_WORD_END, " my", 5, 8,
"input", kTodo, kTodo, kTodo,
"div", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(5, BOUNDARY_WORD_END, " my", 5, 8,
"input", kOk, kOk, kOk,
"div", kOk, kOk, kOk,
"editable", kOk, kOk, kOk,
"textarea", kOk, kOk, kOk);
testTextAfterOffset(6, BOUNDARY_WORD_END, " friend", 8, 15,
"input", kTodo, kTodo, kTodo,
"div", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(7, BOUNDARY_WORD_END, " friend", 8, 15,
"input", kTodo, kTodo, kTodo,
"div", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(8, BOUNDARY_WORD_END, " friend", 8, 15,
"input", kOk, kOk, kOk,
"div", kOk, kOk, kOk,
"editable", kOk, kOk, kOk,
"textarea", kOk, kOk, kOk);
testTextAfterOffset(9, BOUNDARY_WORD_END, "", 15, 15,
"input", kTodo, kTodo, kOk,
"div", kTodo, kTodo, kOk,
"editable", kTodo, kTodo, kOk,
"textarea", kTodo, kTodo, kOk);
testTextAfterOffset(11, BOUNDARY_WORD_END, "", 15, 15,
"input", kTodo, kTodo, kOk,
"div", kTodo, kTodo, kOk,
"editable", kTodo, kTodo, kOk,
"textarea", kTodo, kTodo, kOk);
testTextAfterOffset(14, BOUNDARY_WORD_END, "", 15, 15,
"input", kTodo, kTodo, kOk,
"div", kTodo, kTodo, kOk,
"editable", kTodo, kTodo, kOk,
"textarea", kTodo, kTodo, kOk);
testTextAfterOffset(15, BOUNDARY_WORD_END, "", 15, 15,
"input", kOk, kOk, kOk,
"div", kOk, kOk, kOk,
"editable", kOk, kOk, kOk,
"textarea", kTodo, kOk, kTodo);
testTextAfterOffset(0, BOUNDARY_WORD_END, " my", 5, 8, IDs);
testTextAfterOffset(1, BOUNDARY_WORD_END, " my", 5, 8, IDs);
testTextAfterOffset(5, BOUNDARY_WORD_END, " my", 5, 8, IDs);
testTextAfterOffset(6, BOUNDARY_WORD_END, " friend", 8, 15, IDs);
testTextAfterOffset(7, BOUNDARY_WORD_END, " friend", 8, 15, IDs);
testTextAfterOffset(8, BOUNDARY_WORD_END, " friend", 8, 15, IDs);
testTextAfterOffset(9, BOUNDARY_WORD_END, "", 15, 15, IDs);
testTextAfterOffset(11, BOUNDARY_WORD_END, "", 15, 15, IDs);
testTextAfterOffset(14, BOUNDARY_WORD_END, "", 15, 15, IDs);
testTextAfterOffset(15, BOUNDARY_WORD_END, "", 15, 15, IDs);
// BOUNDARY_LINE_START
testTextAfterOffset(0, BOUNDARY_LINE_START, "", 15, 15,

Просмотреть файл

@ -13,12 +13,6 @@
<script type="application/javascript"
src="../text.js"></script>
<script type="application/javascript">
if (navigator.platform.startsWith("Mac")) {
SimpleTest.expectAssertions(0, 3);
} else {
SimpleTest.expectAssertions(3);
}
function doTest()
{
// __B__r__a__v__e__ __S__i__r__ __ __R__o__b__i__n__ __ __ __r__a__n
@ -60,128 +54,68 @@
testCharAfterOffset(IDs, 18, "r", 19, 20);
// BOUNDARY_WORD_START
testTextAfterOffset(0, BOUNDARY_WORD_START, "Sir ", 6, 11,
"input", kTodo, kTodo, kTodo,
"div", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(5, BOUNDARY_WORD_START, "Sir ", 6, 11,
"input", kTodo, kTodo, kTodo,
"div", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(6, BOUNDARY_WORD_START, "Robin ", 11, 19,
"input", kTodo, kTodo, kTodo,
"div", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(9, BOUNDARY_WORD_START, "Robin ", 11, 19,
"input", kTodo, kTodo, kTodo,
"div", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(10, BOUNDARY_WORD_START, "Robin ", 11, 19,
"input", kTodo, kTodo, kTodo,
"div", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(0, BOUNDARY_WORD_START, "Sir ", 6, 11, IDs);
testTextAfterOffset(5, BOUNDARY_WORD_START, "Sir ", 6, 11, IDs);
testTextAfterOffset(6, BOUNDARY_WORD_START, "Robin ", 11, 19, IDs);
testTextAfterOffset(9, BOUNDARY_WORD_START, "Robin ", 11, 19, IDs);
testTextAfterOffset(10, BOUNDARY_WORD_START, "Robin ", 11, 19, IDs);
testTextAfterOffset(11, BOUNDARY_WORD_START, "ran", 19, 22,
"input", kTodo, kTodo, kTodo,
"div", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(16, BOUNDARY_WORD_START, "ran", 19, 22,
"input", kTodo, kTodo, kTodo,
"div", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(18, BOUNDARY_WORD_START, "ran", 19, 22,
"input", kTodo, kTodo, kTodo,
"div", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(19, BOUNDARY_WORD_START, "", 22, 22,
"input", kTodo, kTodo, kOk,
"div", kTodo, kTodo, kOk,
"editable", kTodo, kTodo, kOk,
"textarea", kTodo, kTodo, kTodo);
// BOUNDARY_WORD_END
testTextAfterOffset(0, BOUNDARY_WORD_END, " Sir", 5, 9,
"input", kTodo, kTodo, kTodo,
"div", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(4, BOUNDARY_WORD_END, " Sir", 5, 9,
"input", kTodo, kTodo, kTodo,
"div", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(5, BOUNDARY_WORD_END, " Sir", 5, 9,
"input", kOk, kOk, kOk,
"div", kOk, kOk, kOk,
"editable", kOk, kOk, kOk,
"textarea", kOk, kOk, kOk);
testTextAfterOffset(6, BOUNDARY_WORD_END, " Robin", 9, 16,
"input", kTodo, kTodo, kTodo,
"div", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(8, BOUNDARY_WORD_END, " Robin", 9, 16,
"input", kTodo, kTodo, kTodo,
"div", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(9, BOUNDARY_WORD_END, " Robin", 9, 16,
"input", kOk, kOk, kOk,
"div", kOk, kOk, kOk,
"editable", kOk, kOk, kOk,
"textarea", kOk, kOk, kOk);
testTextAfterOffset(10, BOUNDARY_WORD_END, " ran", 16, 22,
"input", kTodo, kTodo, kTodo,
"div", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(11, BOUNDARY_WORD_END, " ran", 16, 22,
"input", kTodo, kTodo, kTodo,
"div", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(15, BOUNDARY_WORD_END, " ran", 16, 22,
"input", kTodo, kTodo, kTodo,
"div", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(16, BOUNDARY_WORD_END, " ran", 16, 22,
"input", kOk, kOk, kOk,
"div", kOk, kOk, kOk,
"editable", kOk, kOk, kOk,
"textarea", kOk, kOk, kOk);
testTextAfterOffset(17, BOUNDARY_WORD_END, "", 22, 22,
"input", kTodo, kTodo, kOk,
"div", kTodo, kTodo, kOk,
"editable", kTodo, kTodo, kOk,
"textarea", kTodo, kTodo, kOk);
testTextAfterOffset(18, BOUNDARY_WORD_END, "", 22, 22,
"input", kTodo, kTodo, kOk,
"div", kTodo, kTodo, kOk,
"editable", kTodo, kTodo, kOk,
"textarea", kTodo, kTodo, kOk);
testTextAfterOffset(19, BOUNDARY_WORD_END, "", 22, 22,
"input", kTodo, kTodo, kOk,
"div", kTodo, kTodo, kOk,
"editable", kTodo, kTodo, kOk,
"textarea", kTodo, kTodo, kOk);
testTextAfterOffset(21, BOUNDARY_WORD_END, "", 22, 22,
"input", kTodo, kTodo, kOk,
"div", kTodo, kTodo, kOk,
"editable", kTodo, kTodo, kOk,
"textarea", kTodo, kTodo, kOk);
testTextAfterOffset(22, BOUNDARY_WORD_END, "", 22, 22,
"input", kOk, kOk, kOk,
"div", kOk, kOk, kOk,
"editable", kOk, kOk, kOk,
"textarea", kTodo, kOk, kTodo);
testTextAfterOffset(16, BOUNDARY_WORD_START, "ran", 19, 22,
"input", kOk, kOk, kOk,
"div", kOk, kOk, kOk,
"editable", kOk, kOk, kOk,
"textarea", kTodo, kOk, kTodo);
testTextAfterOffset(18, BOUNDARY_WORD_START, "ran", 19, 22,
"input", kOk, kOk, kOk,
"div", kOk, kOk, kOk,
"editable", kOk, kOk, kOk,
"textarea", kTodo, kOk, kTodo);
testTextAfterOffset(19, BOUNDARY_WORD_START, "", 22, 22,
"input", kOk, kOk, kOk,
"div", kOk, kOk, kOk,
"editable", kOk, kOk, kOk,
"textarea", kOk, kTodo, kTodo);
// BOUNDARY_WORD_END
testTextAfterOffset(0, BOUNDARY_WORD_END, " Sir", 5, 9, IDs);
testTextAfterOffset(4, BOUNDARY_WORD_END, " Sir", 5, 9, IDs);
testTextAfterOffset(5, BOUNDARY_WORD_END, " Sir", 5, 9, IDs);
testTextAfterOffset(6, BOUNDARY_WORD_END, " Robin", 9, 16, IDs);
testTextAfterOffset(8, BOUNDARY_WORD_END, " Robin", 9, 16, IDs);
testTextAfterOffset(9, BOUNDARY_WORD_END, " Robin", 9, 16, IDs);
testTextAfterOffset(10, BOUNDARY_WORD_END, " ran", 16, 22, IDs);
testTextAfterOffset(11, BOUNDARY_WORD_END, " ran", 16, 22, IDs);
testTextAfterOffset(15, BOUNDARY_WORD_END, " ran", 16, 22, IDs);
testTextAfterOffset(16, BOUNDARY_WORD_END, " ran", 16, 22, IDs);
testTextAfterOffset(17, BOUNDARY_WORD_END, "", 22, 22,
"input", kOk, kOk, kOk,
"div", kOk, kOk, kOk,
"editable", kOk, kOk, kOk,
"textarea", kTodo, kOk, kTodo);
testTextAfterOffset(18, BOUNDARY_WORD_END, "", 22, 22,
"input", kOk, kOk, kOk,
"div", kOk, kOk, kOk,
"editable", kOk, kOk, kOk,
"textarea", kTodo, kOk, kTodo);
testTextAfterOffset(19, BOUNDARY_WORD_END, "", 22, 22,
"input", kOk, kOk, kOk,
"div", kOk, kOk, kOk,
"editable", kOk, kOk, kOk,
"textarea", kTodo, kOk, kTodo);
testTextAfterOffset(21, BOUNDARY_WORD_END, "", 22, 22,
"input", kOk, kOk, kOk,
"div", kOk, kOk, kOk,
"editable", kOk, kOk, kOk,
"textarea", kTodo, kOk, kTodo);
testTextAfterOffset(22, BOUNDARY_WORD_END, "", 22, 22,
"input", kOk, kOk, kOk,
"div", kOk, kOk, kOk,
"editable", kOk, kOk, kOk,
"textarea", kOk, kTodo, kTodo);
////////////////////////////////////////////////////////////////////////
// getTextBeforeOffset

Просмотреть файл

@ -8,7 +8,5 @@ srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = @relativesrcdir@
DISABLED_XPCSHELL_TESTS = unit
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -1,17 +0,0 @@
#ifndef BOOTANIMATION_H
#define BOOTANIMATION_H
namespace android {
class FramebufferNativeWindow;
}
/* This returns a FramebufferNativeWindow if one exists.
* If not, one is created and the boot animation is started. */
__attribute__ ((weak))
android::FramebufferNativeWindow* NativeWindow();
/* This stops the boot animation if it's still running. */
__attribute__ ((weak))
void StopBootAnimation();
#endif /* BOOTANIMATION_H */

Просмотреть файл

@ -22,17 +22,24 @@ ifndef LIBXUL_SDK
CPPSRCS = nsBrowserApp.cpp
ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
CPPSRCS += BootAnimation.cpp
LIBS += \
-lui \
-lEGL \
-lhardware_legacy \
-lhardware \
-lcutils \
$(DEPTH)/media/libpng/$(LIB_PREFIX)mozpng.$(LIB_SUFFIX) \
$(DEPTH)/widget/gonk/libdisplay/$(LIB_PREFIX)display.$(LIB_SUFFIX) \
$(MOZ_ZLIB_LIBS) \
$(NULL)
ifeq (17,$(ANDROID_VERSION))
LIBS += \
-lgui \
-lsuspend \
$(NULL)
endif
OS_LDFLAGS += -Wl,--export-dynamic
LOCAL_INCLUDES += -I$(ANDROID_SOURCE)/hardware/libhardware_legacy/include
LOCAL_INCLUDES += -I$(topsrcdir)/widget/gonk/libdisplay
endif
LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre

Просмотреть файл

@ -385,6 +385,8 @@ pref("dom.sms.requestStatusReport", true); // Enabled by default.
// Temporary permission hack for WebContacts
pref("dom.mozContacts.enabled", true);
pref("dom.navigator-property.disable.mozContacts", false);
pref("dom.global-constructor.disable.mozContact", false);
// WebAlarms
pref("dom.mozAlarms.enabled", true);
@ -394,12 +396,13 @@ pref("services.push.enabled", true);
// serverURL to be assigned by services team
pref("services.push.serverURL", "");
pref("services.push.userAgentID", "");
// exponential back-off start is 5 seconds like in HTTP/1.1
// Exponential back-off start is 5 seconds like in HTTP/1.1.
// Maximum back-off is pingInterval.
pref("services.push.retryBaseInterval", 5000);
// WebSocket level ping transmit interval in seconds.
pref("services.push.websocketPingInterval", 55);
// exponential back-off end is 20 minutes
pref("services.push.maxRetryInterval", 1200000);
// Interval at which to ping PushServer to check connection status. In
// milliseconds. If no reply is received within requestTimeout, the connection
// is considered closed.
pref("services.push.pingInterval", 1800000); // 30 minutes
// How long before a DOMRequest errors as timeout
pref("services.push.requestTimeout", 10000);
// enable udp wakeup support
@ -415,6 +418,7 @@ pref("ril.lastKnownMcc", "724");
// WebSettings
pref("dom.mozSettings.enabled", true);
pref("dom.navigator-property.disable.mozSettings", false);
pref("dom.mozPermissionSettings.enabled", true);
// controls if we want camera support

Просмотреть файл

@ -30,7 +30,7 @@
#endif
#ifdef MOZ_WIDGET_GONK
#include "BootAnimation.h"
#include "GonkDisplay.h"
#endif
#include "BinaryPath.h"
@ -150,7 +150,7 @@ static int do_main(int argc, char* argv[])
#ifdef MOZ_WIDGET_GONK
/* Called to start the boot animation */
(void) NativeWindow();
(void) mozilla::GetGonkDisplay();
#endif
if (appini) {

Просмотреть файл

@ -13,6 +13,4 @@ FAIL_ON_WARNINGS := 1
include $(DEPTH)/config/autoconf.mk
DISABLED_XPCSHELL_TESTS = unit
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -352,8 +352,6 @@
@BINPATH@/components/BrowserElementParent.js
@BINPATH@/components/ContactManager.js
@BINPATH@/components/ContactManager.manifest
@BINPATH@/components/NavigatorPropertyHelper.js
@BINPATH@/components/NavigatorPropertyHelper.manifest
@BINPATH@/components/PermissionSettings.js
@BINPATH@/components/PermissionSettings.manifest
@BINPATH@/components/PermissionPromptService.js

Просмотреть файл

@ -579,11 +579,18 @@ pref("network.protocol-handler.external.mailto", true); // for mail
pref("network.protocol-handler.external.news", true); // for news
pref("network.protocol-handler.external.snews", true); // for secure news
pref("network.protocol-handler.external.nntp", true); // also news
#ifdef XP_WIN
pref("network.protocol-handler.external.ms-windows-store", true);
#endif
// ...without warning dialogs
pref("network.protocol-handler.warn-external.mailto", false);
pref("network.protocol-handler.warn-external.news", false);
pref("network.protocol-handler.warn-external.snews", false);
pref("network.protocol-handler.warn-external.nntp", false);
#ifdef XP_WIN
pref("network.protocol-handler.warn-external.ms-windows-store", false);
#endif
// By default, all protocol handlers are exposed. This means that
// the browser will respond to openURL commands for all URL types.

Просмотреть файл

@ -10,6 +10,4 @@ relativesrcdir = @relativesrcdir@
include $(DEPTH)/config/autoconf.mk
DISABLED_XPCSHELL_TESTS = unit
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -10,6 +10,4 @@ relativesrcdir = @relativesrcdir@
include $(DEPTH)/config/autoconf.mk
DISABLED_XPCSHELL_TESTS = unit
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -10,9 +10,8 @@ relativesrcdir = @relativesrcdir@
include $(DEPTH)/config/autoconf.mk
DISABLED_XPCSHELL_TESTS = unit
MOCHITEST_FILES = bug408328-data.xml \
MOCHITEST_FILES = \
bug408328-data.xml \
bug368464-data.xml \
test_bug494328.html \
bug494328-data.xml \

Просмотреть файл

@ -10,6 +10,4 @@ relativesrcdir = @relativesrcdir@
include $(DEPTH)/config/autoconf.mk
DISABLED_XPCSHELL_TESTS = unit
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -168,7 +168,7 @@ BrowserGlue.prototype = {
this._onAppDefaults();
break;
case "final-ui-startup":
this._onProfileStartup();
this._finalUIStartup();
break;
case "browser-delayed-startup-finished":
this._onFirstWindowLoaded();
@ -388,12 +388,13 @@ BrowserGlue.prototype = {
_onAppDefaults: function BG__onAppDefaults() {
// apply distribution customizations (prefs)
// other customizations are applied in _onProfileStartup()
// other customizations are applied in _finalUIStartup()
this._distributionCustomizer.applyPrefDefaults();
},
// profile startup handler (contains profile initialization routines)
_onProfileStartup: function BG__onProfileStartup() {
// runs on startup, before the first command line handler is invoked
// (i.e. before the first window is opened)
_finalUIStartup: function BG__finalUIStartup() {
this._sanitizer.onStartup();
// check if we're in safe mode
if (Services.appinfo.inSafeMode) {

Просмотреть файл

@ -11,6 +11,4 @@ relativesrcdir = @relativesrcdir@
include $(DEPTH)/config/autoconf.mk
DISABLED_XPCSHELL_TESTS = unit
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -15,10 +15,6 @@ include $(DEPTH)/config/autoconf.mk
# browser_589246.js is disabled for leaking browser windows (bug 752467)
# browser_580512.js is disabled for leaking browser windows (bug 752467)
DISABLED_XPCSHELL_TESTS = \
unit \
$(NULL)
MOCHITEST_BROWSER_FILES = \
head.js \
browser_attributes.js \

Просмотреть файл

@ -10,10 +10,8 @@ relativesrcdir = @relativesrcdir@
include $(DEPTH)/config/autoconf.mk
DISABLED_XPCSHELL_TESTS = unit
MOCHITEST_BROWSER_FILES = browser_420786.js \
MOCHITEST_BROWSER_FILES = \
browser_420786.js \
browser_633221.js \
$(NULL)

Просмотреть файл

@ -1928,7 +1928,7 @@ const { DebuggerServer } = Cu.import("resource://gre/modules/devtools/dbg-server
gcli.addCommand({
name: "listen",
description: gcli.lookup("listenDesc"),
manual: gcli.lookup("listenManual"),
manual: gcli.lookupFormat("listenManual2", [BRAND_SHORT_NAME]),
params: [
{
name: "port",

Просмотреть файл

@ -20,7 +20,6 @@ function test() {
// (1) Check that the scroll position is maintained at the bottom
// when the requests overflow the vertical size of the container.
.then(() => {
debuggee.performRequests();
return waitForRequestsToOverflowContainer(monitor, requestsContainer);
}).then(() => {
ok(scrolledToBottom(requestsContainer), "Scrolled to bottom on overflow.");

Просмотреть файл

@ -9,6 +9,10 @@ function test() {
initNetMonitor(SORTING_URL).then(([aTab, aDebuggee, aMonitor]) => {
info("Starting test... ");
// It seems that this test may be slow on debug builds. This could be because
// of the heavy dom manipulation associated with sorting.
requestLongerTimeout(2);
let { $, L10N, NetMonitorView } = aMonitor.panelWin;
let { RequestsMenu } = NetMonitorView;
@ -172,6 +176,7 @@ function test() {
verifyRequestItemTarget(RequestsMenu.getItemAtIndex(a),
"GET1", SORTING_SJS + "?index=1", {
fuzzyUrl: true,
status: 101,
statusText: "Meh",
type: "1",
@ -181,6 +186,7 @@ function test() {
});
verifyRequestItemTarget(RequestsMenu.getItemAtIndex(b),
"GET2", SORTING_SJS + "?index=2", {
fuzzyUrl: true,
status: 200,
statusText: "Meh",
type: "2",
@ -190,6 +196,7 @@ function test() {
});
verifyRequestItemTarget(RequestsMenu.getItemAtIndex(c),
"GET3", SORTING_SJS + "?index=3", {
fuzzyUrl: true,
status: 300,
statusText: "Meh",
type: "3",
@ -199,6 +206,7 @@ function test() {
});
verifyRequestItemTarget(RequestsMenu.getItemAtIndex(d),
"GET4", SORTING_SJS + "?index=4", {
fuzzyUrl: true,
status: 400,
statusText: "Meh",
type: "4",
@ -208,6 +216,7 @@ function test() {
});
verifyRequestItemTarget(RequestsMenu.getItemAtIndex(e),
"GET5", SORTING_SJS + "?index=5", {
fuzzyUrl: true,
status: 500,
statusText: "Meh",
type: "5",

Просмотреть файл

@ -9,6 +9,10 @@ function test() {
initNetMonitor(SORTING_URL).then(([aTab, aDebuggee, aMonitor]) => {
info("Starting test... ");
// It seems that this test may be slow on debug builds. This could be because
// of the heavy dom manipulation associated with sorting.
requestLongerTimeout(2);
let { $, L10N, NetMonitorView } = aMonitor.panelWin;
let { RequestsMenu } = NetMonitorView;
@ -109,6 +113,7 @@ function test() {
for (let i = 0, len = aOrder.length / 5; i < len; i++) {
verifyRequestItemTarget(RequestsMenu.getItemAtIndex(aOrder[i]),
"GET1", SORTING_SJS + "?index=1", {
fuzzyUrl: true,
status: 101,
statusText: "Meh",
type: "1",
@ -120,6 +125,7 @@ function test() {
for (let i = 0, len = aOrder.length / 5; i < len; i++) {
verifyRequestItemTarget(RequestsMenu.getItemAtIndex(aOrder[i + len]),
"GET2", SORTING_SJS + "?index=2", {
fuzzyUrl: true,
status: 200,
statusText: "Meh",
type: "2",
@ -131,6 +137,7 @@ function test() {
for (let i = 0, len = aOrder.length / 5; i < len; i++) {
verifyRequestItemTarget(RequestsMenu.getItemAtIndex(aOrder[i + len * 2]),
"GET3", SORTING_SJS + "?index=3", {
fuzzyUrl: true,
status: 300,
statusText: "Meh",
type: "3",
@ -142,6 +149,7 @@ function test() {
for (let i = 0, len = aOrder.length / 5; i < len; i++) {
verifyRequestItemTarget(RequestsMenu.getItemAtIndex(aOrder[i + len * 3]),
"GET4", SORTING_SJS + "?index=4", {
fuzzyUrl: true,
status: 400,
statusText: "Meh",
type: "4",
@ -153,6 +161,7 @@ function test() {
for (let i = 0, len = aOrder.length / 5; i < len; i++) {
verifyRequestItemTarget(RequestsMenu.getItemAtIndex(aOrder[i + len * 4]),
"GET5", SORTING_SJS + "?index=5", {
fuzzyUrl: true,
status: 500,
statusText: "Meh",
type: "5",

Просмотреть файл

@ -186,7 +186,7 @@ function verifyRequestItemTarget(aRequestItem, aMethod, aUrl, aData = {}) {
info("> Verifying: " + aMethod + " " + aUrl + " " + aData.toSource());
info("> Request: " + aRequestItem.attachment.toSource());
let { status, statusText, type, fullMimeType, size, time } = aData;
let { fuzzyUrl, status, statusText, type, fullMimeType, size, time } = aData;
let { attachment, target } = aRequestItem
let uri = Services.io.newURI(aUrl, null, null).QueryInterface(Ci.nsIURL);
@ -194,19 +194,28 @@ function verifyRequestItemTarget(aRequestItem, aMethod, aUrl, aData = {}) {
let query = uri.query;
let hostPort = uri.hostPort;
is(attachment.method, aMethod,
"The attached method is incorrect.");
is(attachment.url, aUrl,
"The attached url is incorrect.");
if (fuzzyUrl) {
ok(attachment.method.startsWith(aMethod), "The attached method is incorrect.");
ok(attachment.url.startsWith(aUrl), "The attached url is incorrect.");
} else {
is(attachment.method, aMethod, "The attached method is incorrect.");
is(attachment.url, aUrl, "The attached url is incorrect.");
}
is(target.querySelector(".requests-menu-method").getAttribute("value"),
aMethod, "The displayed method is incorrect.");
is(target.querySelector(".requests-menu-file").getAttribute("value"),
name + (query ? "?" + query : ""), "The displayed file is incorrect.");
is(target.querySelector(".requests-menu-file").getAttribute("tooltiptext"),
name + (query ? "?" + query : ""), "The tooltip file is incorrect.");
if (fuzzyUrl) {
ok(target.querySelector(".requests-menu-file").getAttribute("value").startsWith(
name + (query ? "?" + query : "")), "The displayed file is incorrect.");
ok(target.querySelector(".requests-menu-file").getAttribute("tooltiptext").startsWith(
name + (query ? "?" + query : "")), "The tooltip file is incorrect.");
} else {
is(target.querySelector(".requests-menu-file").getAttribute("value"),
name + (query ? "?" + query : ""), "The displayed file is incorrect.");
is(target.querySelector(".requests-menu-file").getAttribute("tooltiptext"),
name + (query ? "?" + query : ""), "The tooltip file is incorrect.");
}
is(target.querySelector(".requests-menu-domain").getAttribute("value"),
hostPort, "The displayed domain is incorrect.");

Просмотреть файл

@ -25,11 +25,11 @@
// Use a count parameter to defeat caching.
var count = 0;
function performRequests() {
(function performRequests() {
get("request_" + (count++), function() {
setTimeout(performRequests, 0);
});
}
})();
</script>
</body>

Просмотреть файл

@ -12,7 +12,8 @@
<script type="text/javascript">
function get(aAddress, aIndex, aCallback) {
var xhr = new XMLHttpRequest();
xhr.open("GET" + aIndex, aAddress + "?index=" + aIndex, true);
// Use a random parameter to defeat caching.
xhr.open("GET" + aIndex, aAddress + "?index=" + aIndex + "&" + Math.random(), true);
xhr.onreadystatechange = function() {
if (this.readyState == this.DONE) {

Просмотреть файл

@ -14,5 +14,5 @@ function handleRequest(request, response) {
response.setHeader("Content-Type", "text/" + index, false);
response.write(new Array(index * 10).join(index)); // + 0.01 KB
response.finish();
}, 50, Ci.nsITimer.TYPE_ONE_SHOT); // Make sure this request takes a few ms.
}, 10, Ci.nsITimer.TYPE_ONE_SHOT); // Make sure this request takes a few ms.
}

Просмотреть файл

@ -11,8 +11,6 @@ relativesrcdir = @relativesrcdir@
include $(DEPTH)/config/autoconf.mk
DISABLED_XPCSHELL_TESTS = unit
MOCHITEST_BROWSER_FILES = \
browser_require_basic.js \
browser_templater_basic.js \

Просмотреть файл

@ -515,8 +515,6 @@
@BINPATH@/components/PermissionSettings.manifest
@BINPATH@/components/ContactManager.js
@BINPATH@/components/ContactManager.manifest
@BINPATH@/components/NavigatorPropertyHelper.js
@BINPATH@/components/NavigatorPropertyHelper.manifest
@BINPATH@/components/AlarmsManager.js
@BINPATH@/components/AlarmsManager.manifest
@BINPATH@/components/TCPSocket.js

Просмотреть файл

@ -73,7 +73,7 @@ VIAddVersionKey "OriginalFilename" "setup.exe"
!insertmacro AddDisabledDDEHandlerValues
!insertmacro ChangeMUIHeaderImage
!insertmacro CheckForFilesInUse
!insertmacro CleanUpdatesDir
!insertmacro CleanUpdateDirectories
!insertmacro CopyFilesFromDir
!insertmacro CreateRegKey
!insertmacro GetLongPath
@ -207,8 +207,11 @@ Section "-InstallStartCleanup"
ClearErrors
${EndIf}
; setup the application model id registration value
${InitHashAppModelId} "$INSTDIR" "Software\Mozilla\${AppName}\TaskBarIDs"
; Remove the updates directory for Vista and above
${CleanUpdatesDir} "Mozilla\Firefox"
${CleanUpdateDirectories} "Mozilla\Firefox" "Mozilla\updates"
${RemoveDeprecatedFiles}
@ -306,9 +309,6 @@ Section "-Application" APP_IDX
${EndIf}
${EndIf}
; setup the application model id registration value
${InitHashAppModelId} "$INSTDIR" "Software\Mozilla\${AppName}\TaskBarIDs"
!ifdef MOZ_METRO
${ResetWin8MetroSplash}
!endif

Просмотреть файл

@ -61,6 +61,7 @@ VIAddVersionKey "FileDescription" "${BrandShortName} Helper"
VIAddVersionKey "OriginalFilename" "helper.exe"
!insertmacro AddDisabledDDEHandlerValues
!insertmacro CleanUpdateDirectories
!insertmacro CleanVirtualStore
!insertmacro ElevateUAC
!insertmacro GetLongPath
@ -89,7 +90,7 @@ VIAddVersionKey "OriginalFilename" "helper.exe"
!insertmacro un.ChangeMUIHeaderImage
!insertmacro un.CheckForFilesInUse
!insertmacro un.CleanUpdatesDir
!insertmacro un.CleanUpdateDirectories
!insertmacro un.CleanVirtualStore
!insertmacro un.DeleteRelativeProfiles
!insertmacro un.DeleteShortcuts
@ -271,6 +272,9 @@ Section "Uninstall"
ApplicationID::UninstallJumpLists "$AppUserModelID"
${EndIf}
; Remove the updates directory for Vista and above
${un.CleanUpdateDirectories} "Mozilla\Firefox" "Mozilla\updates"
; Remove any app model id's stored in the registry for this install path
DeleteRegValue HKCU "Software\Mozilla\${AppName}\TaskBarIDs" "$INSTDIR"
DeleteRegValue HKLM "Software\Mozilla\${AppName}\TaskBarIDs" "$INSTDIR"
@ -398,9 +402,6 @@ Section "Uninstall"
Delete /REBOOTOK "$INSTDIR\removed-files"
${EndIf}
; Remove the updates directory for Vista and above
${un.CleanUpdatesDir} "Mozilla\Firefox"
; Remove files that may be left behind by the application in the
; VirtualStore directory.
${un.CleanVirtualStore}

Просмотреть файл

@ -1263,9 +1263,9 @@ profilerNotReady=For this command to work you need to open the profiler first
# function of the 'listen' command.
listenDesc=Open a remote debug port
# LOCALIZATION NOTE (listenManual) A longer description of the 'listen'
# LOCALIZATION NOTE (listenManual2) A longer description of the 'listen'
# command.
listenManual=Firefox can allow remote debugging over a TCP/IP connection. For security reasons this is turned off by default, but can be enabled using this command.
listenManual2=%1$S can allow remote debugging over a TCP/IP connection. For security reasons this is turned off by default, but can be enabled using this command.
# LOCALIZATION NOTE (listenPortDesc) A very short string used to describe the
# function of 'port' parameter to the 'listen' command.

Просмотреть файл

@ -177,6 +177,11 @@ var Appbar = {
},
showContextualActions: function(aVerbs) {
if (aVerbs.length)
this.appbar.setAttribute("contextual", "true");
else
this.appbar.removeAttribute("contextual");
let doc = document;
// button element id to action verb lookup
let buttonsMap = new Map();

Просмотреть файл

@ -193,67 +193,6 @@
</vbox>
</hbox>
<!-- Main Toolbar -->
<hbox id="toolbar-container" observes="bcast_windowState" >
<toolbar id="toolbar" flex="1">
<observes element="bcast_windowState" attribute="*"/>
<observes element="bcast_urlbarState" attribute="*"/>
<hbox id="unified-back-forward-button" class="chromeclass-toolbar-additional"
observes="bcast_windowState"
context="backForwardMenu" removable="true"
forwarddisabled="true"
title="Back/Forward">
<toolbarbutton id="back-button" class="toolbarbutton"
label="&back.label;"
command="cmd_back"/>
<toolbarbutton id="forward-button" class="toolbarbutton"
label="&forward.label;"
command="cmd_forward"/>
<dummyobservertarget hidden="true"
onbroadcast="if (this.getAttribute('disabled') == 'true')
this.parentNode.setAttribute('forwarddisabled', 'true');
else
this.parentNode.removeAttribute('forwarddisabled');">
<observes element="cmd_forward" attribute="disabled"/>
</dummyobservertarget>
</hbox>
<hbox id="urlbar-container" flex="1" observes="bcast_urlbarState">
<hbox id="urlbar" flex="1">
<box id="identity-box" role="button">
<hbox id="identity-box-inner" align="center" mousethrough="always">
<image id="identity-icon"/>
</hbox>
</box>
<textbox id="urlbar-edit"
type="url"
class="uri-element"
autocompletesearch="history"
autocompletepopup="start-autocomplete"
completeselectedindex="true"
placeholder="&urlbar.emptytext;"
flex="1"
ontextentered="BrowserUI.handleUrlbarEnter(param);"
onkeydown="BrowserUI.navEditKeyPress();"
onclick="BrowserUI._urlbarClicked(event);"
onblur="BrowserUI._urlbarBlurred();"/>
</hbox>
</hbox>
<hbox id="urlbar-icons" observes="bcast_urlbarState">
<toolbarbutton id="tool-reload" oncommand="CommandUpdater.doCommand(event.shiftKey ? 'cmd_forceReload' : 'cmd_reload');"/>
<toolbarbutton id="tool-stop" command="cmd_stop"/>
</hbox>
</toolbar>
<box id="toolbar-transition" observes="bcast_windowState" >
<toolbarbutton id="tool-new-tab" command="cmd_newTab" label="&newtab.label;"/>
</box>
</hbox>
<hbox id="progress-control" layer="true"></hbox>
<!-- Start UI -->
<hbox id="start-container" flex="1" observes="bcast_windowState" class="meta content-height content-width" onclick="false;">
<!-- portrait/landscape/filled view -->
@ -309,7 +248,7 @@
</vbox>
<!-- popup for content navigator helper -->
<vbox id="content-navigator" top="0">
<vbox id="content-navigator">
<textbox id="find-helper-textbox" class="search-bar content-navigator-item" oncommand="FindHelperUI.search(this.value)" oninput="FindHelperUI.updateCommands(this.value);" type="search"/>
</vbox>
@ -367,25 +306,61 @@
<!-- Windows 8 Appbar -->
<appbar id="appbar" mousethrough="never" observes="bcast_windowState">
<hbox id="contextualactions-tray" flex="1">
<hbox id="progress-control" layer="true"/>
<!-- Main Toolbar -->
<toolbar id="toolbar" observes="bcast_windowState" flex="1">
<observes element="bcast_windowState" attribute="*"/>
<observes element="bcast_urlbarState" attribute="*"/>
<toolbarbutton id="back-button" command="cmd_back"/>
<hbox id="urlbar-container" flex="1" observes="bcast_urlbarState">
<toolbarbutton id="forward-button" command="cmd_forward"/>
<hbox id="urlbar" flex="1">
<box id="identity-box" role="button">
<hbox id="identity-box-inner" align="center" mousethrough="always">
<image id="identity-icon"/>
</hbox>
</box>
<textbox id="urlbar-edit"
type="url"
class="uri-element"
autocompletesearch="history"
autocompletepopup="start-autocomplete"
completeselectedindex="true"
placeholder="&urlbar.emptytext;"
flex="1"
ontextentered="BrowserUI.handleUrlbarEnter(param);"
onkeydown="BrowserUI.navEditKeyPress();"
onclick="BrowserUI._urlbarClicked(event);"
onblur="BrowserUI._urlbarBlurred();"/>
</hbox>
</hbox>
<toolbarbutton id="tool-reload" oncommand="CommandUpdater.doCommand(event.shiftKey ? 'cmd_forceReload' : 'cmd_reload');"/>
<toolbarbutton id="tool-stop" command="cmd_stop"/>
<!-- developer buttons -->
<toolbarbutton id="console-button" oncommand="Appbar.onConsoleButton()"/>
<toolbarbutton id="jsshell-button" oncommand="Appbar.onJSShellButton()"/>
<toolbarbutton id="download-button" oncommand="Appbar.onDownloadButton()"/>
<toolbarbutton id="zoomout-button" oncommand="Appbar.onZoomOutButton()"/>
<toolbarbutton id="zoomin-button" oncommand="Appbar.onZoomInButton()"/>
<toolbarbutton id="star-button" type="checkbox" oncommand="Appbar.onStarButton()"/>
<toolbarbutton id="pin-button" type="checkbox" oncommand="Appbar.onPinButton()"/>
<toolbarbutton id="more-button" onclick="Appbar.onMoreButton(event)"/>
</toolbar>
<toolbar id="contextualactions-tray" flex="1">
<toolbarbutton id="delete-selected-button" hidden="true" fade="true" oncommand="Appbar.dispatchContextualAction('delete')"/>
<toolbarbutton id="restore-selected-button" hidden="true" fade="true" oncommand="Appbar.dispatchContextualAction('restore')"/>
<toolbarbutton id="pin-selected-button" hidden="true" fade="true" oncommand="Appbar.dispatchContextualAction('pin')"/>
<toolbarbutton id="unpin-selected-button" hidden="true" fade="true" oncommand="Appbar.dispatchContextualAction('unpin')"/>
<toolbarbutton id="clear-selected-button" hidden="true" fade="true" oncommand="Appbar.dispatchContextualAction('clear')"/>
</hbox>
<hbox flex="1">
<toolbarbutton id="download-button" oncommand="Appbar.onDownloadButton()"/>
<toolbarbutton id="console-button" oncommand="Appbar.onConsoleButton()"/>
<toolbarbutton id="jsshell-button" oncommand="Appbar.onJSShellButton()"/>
</hbox>
<hbox>
<toolbarbutton id="more-button" onclick="Appbar.onMoreButton(event)" />
<toolbarbutton id="zoomout-button" oncommand="Appbar.onZoomOutButton()"/>
<toolbarbutton id="zoomin-button" oncommand="Appbar.onZoomInButton()"/>
<toolbarbutton id="star-button" type="checkbox" oncommand="Appbar.onStarButton()"/>
<toolbarbutton id="pin-button" type="checkbox" oncommand="Appbar.onPinButton()"/>
</hbox>
</toolbar>
</appbar>
<!-- Selection overlay - this should be below any content that can have selectable text -->
@ -598,18 +573,10 @@
<richlistitem id="context-copy" type="copy" onclick="ContextCommands.copy();">
<label value="&contextTextCopy.label;"/>
</richlistitem>
<!-- only displayed if there is text on the clipboard -->
<richlistitem id="context-paste" type="paste" onclick="ContextCommands.paste();">
<label value="&contextTextPaste.label;"/>
</richlistitem>
<!-- Search Bing for "(text..)", displayed on selected content text only -->
<richlistitem id="context-search" type="selected-text,!input-text" onclick="ContextCommands.searchText(this);">
<label id="context-search-label" value=""/>
</richlistitem>
<!-- only display if there is text on the clipboard and the target is the urlbar -->
<richlistitem id="context-paste-n-go" type="paste-url" onclick="ContextCommands.pasteAndGo();">
<label value="&contextTextPasteAndGo.label;"/>
</richlistitem>
<!-- only displayed in inputs with text that do not have selection -->
<richlistitem id="context-select" type="selectable" onclick="ContextCommands.select();">
<label value="&contextTextSelect.label;"/>
@ -618,6 +585,14 @@
<richlistitem id="context-select-all" type="selectable" onclick="ContextCommands.selectAll();">
<label value="&contextTextSelectAll.label;"/>
</richlistitem>
<!-- only displayed if there is text on the clipboard -->
<richlistitem id="context-paste" type="paste" onclick="ContextCommands.paste();">
<label value="&contextTextPaste.label;"/>
</richlistitem>
<!-- only display if there is text on the clipboard and the target is the urlbar -->
<richlistitem id="context-paste-n-go" type="paste-url" onclick="ContextCommands.pasteAndGo();">
<label value="&contextTextPasteAndGo.label;"/>
</richlistitem>
<!-- Image related -->
<!-- save image to user pictures library -->
@ -707,13 +682,4 @@
<html:div id="overlay-plus" class="overlay-button"
observes="cmd_back" onclick="CommandUpdater.doCommand('cmd_newTab');"></html:div>
<svg:svg height="0">
<svg:clipPath id="forward-button-clip-path" clipPathUnits="objectBoundingBox">
<svg:path d="M 0,0 C 0.15,0.12 0.25,0.3 0.25,0.5 0.25,0.7 0.15,0.88 0,1 L 1,1 1,0 0,0 z"/>
</svg:clipPath>
<svg:clipPath id="back-button-clip-path" clipPathUnits="userSpaceOnUse">
<svg:path d="m -1,-5 0,4.03 C 3.6,1.8 18,21.4 0,40 l 0,27 10000,0 0,-55 L 0,-5 z" />
</svg:clipPath>
</svg:svg>
</window>

Просмотреть файл

@ -46,7 +46,7 @@ HistoryView.prototype = {
for (let i = 0, addedCount = 0; i < childCount && addedCount < limit; i++) {
let node = rootNode.getChild(i);
let uri = node.uri;
let title = node.title || uri;
let title = (node.title && node.title.length) ? node.title : uri;
// If item is marked for deletion, skip it.
if (this._toRemove && this._toRemove.indexOf(uri) !== -1)

Просмотреть файл

@ -10,8 +10,6 @@ relativesrcdir = @relativesrcdir@
include $(DEPTH)/config/autoconf.mk
DISABLED_XPCSHELL_TESTS = unit
# For now we're copying the actual Util code.
# We should make this into a jsm module. See bug 848137
XPCSHELL_RESOURCES = \

Просмотреть файл

@ -83,6 +83,8 @@ pref("browser.offline-apps.notify", true);
pref("network.protocol-handler.warn-external.tel", false);
pref("network.protocol-handler.warn-external.mailto", false);
pref("network.protocol-handler.warn-external.vnd.youtube", false);
pref("network.protocol-handler.warn-external.ms-windows-store", false);
pref("network.protocol-handler.external.ms-windows-store", true);
/* history max results display */
pref("browser.display.history.maxresults", 100);

Просмотреть файл

@ -6,39 +6,35 @@
%include defines.inc
%define forward_transition_length 150ms
%define forward_width 51px
%define back_width 62px
%define clipped_url_back_width 71px
%define forward_width 22px
%define forward_spacing 12px
/* Sliding Toolbar/Tab Tray ------------------------------------------------- */
#tray {
transition: transform @metro_animation_duration@ @metro_animation_easing@;
transform: translateY(-@tray_slide_height@);
transform: translateY(-@tabs_height@);
width: 100%;
}
#progress-control {
display: block;
position: absolute;
top: -@progress_height@;
height: @progress_height@;
max-height: @progress_height@;
margin-bottom: -@progress_height@;
opacity: 1;
background: linear-gradient(to right, @progress_start_color@, @progress_end_color@);
transition-property: width;
transition-duration: .3s;
-moz-user-focus: ignore;
transition: width .3s ease-in;
}
#progress-control:-moz-dir(rtl) {
background: linear-gradient(to left, @progress_start_color@, @progress_end_color@);
transform: scaleX(-1);
}
#progress-control[fade] {
opacity: 0;
transition-property: width, opacity;
transition-duration: .3s, .5s;
transition-timing-function: ease-in, ease-in;
transition: width .3s ease-in, .5s opacity ease-in;
}
/* in non-tabsonly mode the navigation bar and tab tray float over content. In
@ -47,15 +43,10 @@
position: fixed;
}
#tray[visible][expanded] {
#tray[visible][expanded]:not([viewstate="snapped"]) {
transform: none;
}
#tray[startpage],
#tray[visible]:not([expanded]) {
transform: translateY(-@tabs_height@);
}
/* Tabs --------------------------------------------------------------------- */
#tabs-container {
@ -320,126 +311,58 @@ documenttab[selected] .documenttab-selection {
/* Toolbar ------------------------------------------------------------------ */
#toolbar-container {
background: @panel_dark_color@ @panel_dark_background@;
border-bottom: @border_width_small@ solid @border_color@;
-moz-padding-end: @padding_large@;
width: 100%;
}
#toolbar-container[filtering],
#toolbar-container[startpage] {
border-bottom-width: 0;
}
#toolbar {
-moz-appearance: none;
-moz-box-align: center;
padding: 0;
-moz-padding-end: @metro_spacing_xxxlarge@;
-moz-padding-start: @metro_spacing_xxnormal@;
border: none;
border-top: @metro_border_thin@ solid #293642;
background-color: @panel_light_color@;
background-image: url("chrome://browser/skin/images/tab-selection-right.png"),
linear-gradient(rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.5)),
@panel_light_background@;
background-repeat: no-repeat, repeat-x;
background-position: right bottom;
min-height: @toolbar_height@;
background-color: @panel_dark_color@;
background-image: @panel_dark_background@;
}
#toolbar[dir=ltr] {
background-position: left bottom;
}
#toolbar toolbarbutton {
margin: 0 @toolbar_horizontal_spacing@;
}
/* Unified back-forward buttons */
/* TODO: Pull code from mainline firefox to support RTL. */
#unified-back-forward-button {
-moz-box-align: center;
position: relative;
z-index: 1;
}
#back-button {
-moz-appearance: none;
margin: 0 !important;
margin-right: -@metro_spacing_normal@ !important;
#toolbar > #back-button {
list-style-image: url(chrome://browser/skin/images/back.png);
-moz-image-region: rect(0 48px 48px 0);
-moz-image-region: rect(0 96px 48px 48px);
position: relative;
z-index: 1;
padding: 0 !important;
min-height: 48px !important;
max-height: 48px !important;
-moz-margin-end: -@forward_spacing@;
min-height: 48px;
max-height: 48px;
}
#back-button[disabled] {
-moz-image-region: rect(0 96px 48px 48px);
#toolbar > #back-button[disabled] {
visibility: visible;
-moz-image-region: rect(0 48px 48px 0);
}
#forward-button {
background: linear-gradient(to bottom, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.5)), @panel_light_background@;
border: @metro_border_thick@ solid rgb(192, 198, 204);
margin: 0 !important;
padding: 0 !important;
-moz-padding-start: 17px !important;
-moz-padding-end: 7px !important;
transition: opacity @forward_transition_length@ ease-out;
list-style-image: url(chrome://browser/skin/images/forward.png);
-moz-image-region: rect(1px 22px 25px 0); /* width: 22px; height: 24px; */
-moz-border-end: @metro_border_thick@ solid @urlbar_border_color@;
margin: -1.5px 0;
padding: 0;
-moz-padding-start: calc(@metro_spacing_snormal@ + @forward_spacing@);
-moz-padding-end: @forward_spacing@;
transition: -moz-margin-start @forward_transition_length@ ease-out,
opacity @forward_transition_length@ ease-out;
}
/* XXX: Hack to move the image up one pixel because
it's not vertically centered for some reason. */
#forward-button image {
margin: -1px 0 1px 0 !important;
}
#unified-back-forward-button > #forward-button[disabled] {
#forward-button[disabled] {
-moz-margin-start: calc(-@forward_width@ - @forward_spacing@ * 2);
opacity: 0;
pointer-events: none;
}
/* URL bar */
#unified-back-forward-button + #urlbar-container {
margin: 0;
padding: 0;
padding-left: @back_width@;
-moz-margin-start: -@forward_width@;
-moz-margin-end: @metro_spacing_normal@;
position: relative;
pointer-events: none;
#urlbar-container {
border: @metro_border_thick@ solid @urlbar_border_color@;
-moz-border-start: 0 none;
background: @field_background_color@;
}
#unified-back-forward-button + #urlbar-container > #urlbar {
-moz-border-start: none;
pointer-events: all;
transition: margin-left @forward_transition_length@ ease-out;
}
#unified-back-forward-button[forwarddisabled] + #urlbar-container {
clip-path: url("chrome://browser/content/browser.xul#back-button-clip-path");
padding-left: @clipped_url_back_width@;
}
#unified-back-forward-button[forwarddisabled] + #urlbar-container > #urlbar {
margin-left: -@forward_width@;
margin: 0;
-moz-margin-end: @toolbar_horizontal_spacing@;
padding: 0;
background-color: @field_background_color@;
overflow: hidden;
}
/* Identity widget */
#identity-icon {
width: @metro_spacing_xxnormal@;
height: @metro_spacing_xxnormal@;
margin: 0;
-moz-margin-end: @metro_spacing_small@;
padding: 0;
padding: 0 @metro_spacing_snormal@;
list-style-image: url(chrome://browser/skin/images/identity-icons-generic.png);
}
@ -461,10 +384,6 @@ documenttab[selected] .documenttab-selection {
padding: 0 !important;
}
#urlbar-edit :invalid {
box-shadow: none;
}
/* Combined stop-reload button */
#tool-reload {
list-style-image: url("chrome://browser/skin/images/reload.png");
@ -474,33 +393,11 @@ documenttab[selected] .documenttab-selection {
list-style-image: url("chrome://browser/skin/images/stop-hdpi.png");
}
#urlbar-icons[mode="loading"] > #tool-reload {
#toolbar[mode="loading"] > #tool-reload,
#toolbar:-moz-any([mode="edit"], [mode="view"]) > #tool-stop {
visibility: collapse;
}
#urlbar-icons[mode="edit"] > #tool-stop,
#urlbar-icons[mode="view"] > #tool-stop {
visibility: collapse;
}
/* Toggle that displays the tab bar */
#toolbar-transition {
-moz-padding-end: @metro_spacing_snormal@;
background: @panel_dark_color@ @panel_dark_background@;
}
#tool-new-tab {
margin: 0;
-moz-margin-start: -@metro_spacing_normal@;
list-style-image: url("images/newtab-default.png");
transition: opacity ease-out 0.2s;
}
/* Hide the tab toggle if the tabs are visible */
#tray[visible][expanded] #tool-new-tab {
opacity: 0;
}
/* Hide the tab toggle if we're showing classic tabs or we're snap-viewed. */
#toolbar[viewstate="snapped"],
#tray[tabsonly] #toolbar {
@ -508,76 +405,64 @@ documenttab[selected] .documenttab-selection {
-moz-padding-end: 0;
}
#toolbar-container[viewstate="snapped"],
#tray[tabsonly] #toolbar-container {
-moz-padding-end: 0;
}
#toolbar-transition[viewstate="snapped"],
#tray[tabsonly] #toolbar-transition {
visibility: collapse;
}
/* If we're in the small snap view, compress and simplify the UI. */
#tray[visible][expanded][viewstate="snapped"] {
margin-top: -@tabs_height@ !important;
}
#toolbar[viewstate="snapped"] {
-moz-padding-end: 0;
}
#unified-back-forward-button[viewstate="snapped"] + #urlbar-container {
#toolbar[viewstate="snapped"] > #urlbar-container {
-moz-margin-end: 0;
}
#toolbar[viewstate="snapped"] > #tool-stop ~ toolbarbutton {
visibility: collapse;
}
/* App Bar ----------------------------------------------------------------- */
appbar {
display: block;
position: fixed;
height: @toolbar_height@;
bottom: 0;
width: 100%;
transform: translateY(@toolbar_height@);
transition: transform @metro_animation_duration@ @metro_animation_easing@;
width: 100%;
font-size: 0;
}
appbar toolbar {
border-top: 1px solid @appbar_top_border@;
border-bottom: 0px;
height: @toolbar_height@;
appbar > toolbar {
-moz-appearance: none;
background-color: @appbar_color@;
-moz-box-align: center;
border: 0;
width: 100%;
min-height: @toolbar_height@;
font-size: 1rem;
}
appbar toolbarbutton {
float: left;
border-width: 0px;
appbar > toolbar > toolbarbutton {
border: 0;
margin: 0 @toolbar_horizontal_spacing@;
padding: 0;
/* Don't inherit background-color from toolbarbutton[checked="true"] */
background-color: transparent;
}
appbar toolbarbutton[disabled] {
appbar > toolbar > toolbarbutton[disabled] {
visibility: collapse;
}
#appbar:not([viewstate="snapped"])[visible] {
#appbar[startpage],
#appbar[visible] {
transform: none;
}
#appbar toolbarbutton {
#appbar > toolbar > toolbarbutton {
list-style-image: url(chrome://browser/skin/images/appbar-icons.png);
-moz-image-region: rect(0px, 200px, 40px, 160px); /* Gear icon is default. */
}
#appbar toolbarbutton:hover {
#appbar > toolbar > toolbarbutton:hover {
-moz-image-region: rect(40px, 200px, 80px, 160px);
}
#appbar toolbarbutton:active {
#appbar > toolbar > toolbarbutton:active {
-moz-image-region: rect(80px, 200px, 120px, 160px);
}
@ -648,6 +533,15 @@ appbar toolbarbutton[disabled] {
}
/* Tile-selection-Specific */
#appbar[contextual] > #toolbar,
#appbar:not([contextual]) > #contextualactions-tray {
visibility: collapse;
}
#contextualactions-tray {
background-color: @metro_orange@;
}
#contextualactions-tray > toolbarbutton {
opacity: 1;
}
@ -912,14 +806,10 @@ setting[type="radio"] > vbox {
-moz-box-orient: horizontal;
}
#start-autocomplete[viewstate="snapped"] {
padding-left: 0px;
padding-right: 0px;
}
#start-container[viewstate="snapped"] {
padding-left: 0px;
padding-right: 0px;
#start-container,
#start-autocomplete {
padding-left: 0;
padding-right: 0;
}
#start-container[viewstate="snapped"] .meta-section {

Просмотреть файл

@ -21,14 +21,12 @@
%define toolbar_horizontal_spacing 20px
%define toolbar_height 68px
%define tabs_height 178px
%define tray_slide_height 247px
%define progress_height 3px
%define progress_start_color #0095dd
%define progress_end_color #97cbff
%define appbar_color #FF8000
%define appbar_top_border #BFC6CE
%define metro_orange #FF8000
%define label_height 30px
@ -55,7 +53,6 @@
%define metro_spacing_xxxnormal 30px
%define metro_spacing_large 40px
%define metro_spacing_xlarge 45px
%define metro_spacing_xxxlarge 65px
%define metro_border_thin 1px
%define metro_border_thick 2px

Просмотреть файл

@ -7,10 +7,7 @@
flyoutpanel {
height: 100%;
border-width: 2px;
border-color: #d7d6d6;
background-color: #ffffff;
-moz-border-start-style: solid;
visibility: collapse;
position: fixed;
transition: transform @metro_animation_duration@ @metro_animation_easing@;
@ -41,6 +38,9 @@ flyoutpanel[visible] {
}
.flyoutpanel-header {
border-width: 1px;
-moz-border-start-style: solid;
border-color: #1b1b1b;
background-color: #002147;
height: 80px;
width: 100%;
@ -60,6 +60,9 @@ flyoutpanel[visible] {
}
.flyoutpanel-contents {
border-width: 1px;
-moz-border-start-style: solid;
border-color: #c2c2c2;
padding: 40px;
width: 100%;
}

Просмотреть файл

@ -10,7 +10,9 @@
display: none;
pointer-events: none;
padding: 0;
background-color: @appbar_color@;
background-color: @metro_orange@;
bottom: 0;
position: fixed;
}
#content-navigator[type="find"],

Просмотреть файл

@ -699,21 +699,8 @@ arrowbox {
.meta {
background-color: @panel_light_color@;
background-image: radial-gradient(circle farthest-corner at left bottom,
rgba(255, 127, 0, 0.2) 0%,
rgba(255, 212, 0, 0) 30%),
radial-gradient(circle farthest-corner at 40% 100%,
rgba(0, 120, 255, 0.15) 0%,
rgba(0, 186, 255, 0) 20%),
radial-gradient(circle farthest-corner at 60% 100%,
rgba(0, 120, 255, 0.125) 0%,
rgba(0, 186, 255, 0) 20%),
radial-gradient(circle farthest-corner at right bottom,
rgba(185, 17, 255, 0.1) 0%,
rgba(255, 84, 253, 0) 30%),
url("chrome://browser/skin/images/firefox-watermark.png"),
@panel_light_background@;
background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, repeat;
background-image: url("chrome://browser/skin/images/firefox-watermark.png");
background-repeat: no-repeat;
background-position: center center;
padding: @metro_spacing_normal@ @metro_spacing_xxnormal@;
overflow: auto;

Просмотреть файл

@ -91,6 +91,11 @@ toolbarbutton.bookmark-item[open="true"] {
height: 16px;
}
#PlacesToolbarItems > .bookmark-item:not([image]):not([label=""]):not([container]) > .toolbarbutton-icon {
display: none;
}
/* Prevent [mode="icons"] from hiding the label */
.bookmark-item > .toolbarbutton-text {
display: -moz-box !important;

Просмотреть файл

@ -216,6 +216,11 @@ toolbarbutton.bookmark-item > menupopup {
max-height: 16px;
}
#PlacesToolbarItems > .bookmark-item:not([image]):not([label=""]):not([container]) > .toolbarbutton-icon {
display: none;
}
.bookmark-item > .toolbarbutton-icon[label]:not([label=""]),
.bookmark-item > .toolbarbutton-icon[type="menu"] {
-moz-margin-end: 5px;

Просмотреть файл

@ -612,6 +612,10 @@ toolbarbutton.bookmark-item[open="true"] {
height: 16px;
}
#PlacesToolbarItems > .bookmark-item:not([image]):not([label=""]):not([container]) > .toolbarbutton-icon {
display: none;
}
/* Prevent [mode="icons"] from hiding the label */
.bookmark-item > .toolbarbutton-text {
display: -moz-box !important;

Просмотреть файл

@ -89,7 +89,7 @@ class RemoteAutomation(Automation):
def checkForJavaException(self, logcat):
found_exception = False
for i, line in enumerate(logcat):
if "REPORTING UNCAUGHT EXCEPTION" in line:
if "REPORTING UNCAUGHT EXCEPTION" in line or "FATAL EXCEPTION" in line:
# Strip away the date, time, logcat tag and pid from the next two lines and
# concatenate the remainder to form a concise summary of the exception.
#

Просмотреть файл

@ -10,11 +10,4 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DISABLED_XPCSHELL_TESTS = unit \
$(NULL)
# FIXME/bug 575918: out-of-process xpcshell is broken on OS X
ifneq ($(OS_ARCH),Darwin)
DISABLED_XPCSHELL_TESTS += unit_ipc
endif
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -486,24 +486,7 @@ case "$target" in
AC_MSG_ERROR([The major versions of \$CC and \$CXX do not match.])
fi
if test "$_CC_MAJOR_VERSION" = "14"; then
dnl Require VC8SP1 or newer.
dnl VC8 is 14.00.50727.42, VC8SP1 is 14.00.50727.762.
if test "$_CC_RELEASE" -lt 50727 -o \
\( "$_CC_RELEASE" -eq 50727 -a "$_CC_BUILD" -lt 762 \); then
AC_MSG_ERROR([This version ($CC_VERSION) of the MSVC compiler is unsupported. You probably need to install Service Pack 1 of Visual Studio 2005. See https://developer.mozilla.org/en/Windows_Build_Prerequisites.])
fi
_CC_SUITE=8
_MSVS_VERSION=2005
AC_DEFINE(_CRT_SECURE_NO_DEPRECATE)
AC_DEFINE(_CRT_NONSTDC_NO_DEPRECATE)
elif test "$_CC_MAJOR_VERSION" = "15"; then
_CC_SUITE=9
_MSVS_VERSION=2008
AC_DEFINE(_CRT_SECURE_NO_WARNINGS)
AC_DEFINE(_CRT_NONSTDC_NO_WARNINGS)
elif test "$_CC_MAJOR_VERSION" = "16"; then
if test "$_CC_MAJOR_VERSION" = "16"; then
_CC_SUITE=10
_MSVS_VERSION=2010
AC_DEFINE(_CRT_SECURE_NO_WARNINGS)

Просмотреть файл

@ -1774,14 +1774,14 @@ public:
* getting generic data like a device context or widget from it is OK, but it
* might not be this document's actual presentation.
*/
static nsIPresShell* FindPresShellForDocument(nsIDocument* aDoc);
static nsIPresShell* FindPresShellForDocument(const nsIDocument* aDoc);
/**
* Returns the widget for this document if there is one. Looks at all ancestor
* documents to try to find a widget, so for example this can still find a
* widget for documents in display:none frames that have no presentation.
*/
static nsIWidget* WidgetForDocument(nsIDocument* aDoc);
static nsIWidget* WidgetForDocument(const nsIDocument* aDoc);
/**
* Returns a layer manager to use for the given document. Basically we
@ -1794,7 +1794,7 @@ public:
* layer manager should be used for retained layers
*/
static already_AddRefed<mozilla::layers::LayerManager>
LayerManagerForDocument(nsIDocument *aDoc, bool *aAllowRetaining = nullptr);
LayerManagerForDocument(const nsIDocument *aDoc, bool *aAllowRetaining = nullptr);
/**
* Returns a layer manager to use for the given document. Basically we

Просмотреть файл

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

Просмотреть файл

@ -6207,9 +6207,9 @@ nsContentUtils::PlatformToDOMLineBreaks(nsString &aString)
}
nsIPresShell*
nsContentUtils::FindPresShellForDocument(nsIDocument* aDoc)
nsContentUtils::FindPresShellForDocument(const nsIDocument* aDoc)
{
nsIDocument* doc = aDoc;
const nsIDocument* doc = aDoc;
nsIDocument* displayDoc = doc->GetDisplayDocument();
if (displayDoc) {
doc = displayDoc;
@ -6241,7 +6241,7 @@ nsContentUtils::FindPresShellForDocument(nsIDocument* aDoc)
}
nsIWidget*
nsContentUtils::WidgetForDocument(nsIDocument* aDoc)
nsContentUtils::WidgetForDocument(const nsIDocument* aDoc)
{
nsIPresShell* shell = FindPresShellForDocument(aDoc);
if (shell) {
@ -6261,7 +6261,7 @@ nsContentUtils::WidgetForDocument(nsIDocument* aDoc)
}
static already_AddRefed<LayerManager>
LayerManagerForDocumentInternal(nsIDocument *aDoc, bool aRequirePersistent,
LayerManagerForDocumentInternal(const nsIDocument *aDoc, bool aRequirePersistent,
bool* aAllowRetaining)
{
nsIWidget *widget = nsContentUtils::WidgetForDocument(aDoc);
@ -6277,7 +6277,7 @@ LayerManagerForDocumentInternal(nsIDocument *aDoc, bool aRequirePersistent,
}
already_AddRefed<LayerManager>
nsContentUtils::LayerManagerForDocument(nsIDocument *aDoc, bool *aAllowRetaining)
nsContentUtils::LayerManagerForDocument(const nsIDocument *aDoc, bool *aAllowRetaining)
{
return LayerManagerForDocumentInternal(aDoc, false, aAllowRetaining);
}

Просмотреть файл

@ -93,9 +93,7 @@ NS_IMPL_FORWARD_EVENT_HANDLER(nsDOMFileReader, error, FileIOObject)
void
nsDOMFileReader::RootResultArrayBuffer()
{
nsContentUtils::PreserveWrapper(
static_cast<EventTarget*>(
static_cast<nsDOMEventTargetHelper*>(this)), this);
NS_HOLD_JS_OBJECTS(this, nsDOMFileReader);
}
//nsDOMFileReader constructors/initializers
@ -113,7 +111,8 @@ nsDOMFileReader::nsDOMFileReader()
nsDOMFileReader::~nsDOMFileReader()
{
FreeFileData();
mResultArrayBuffer = nullptr;
NS_DROP_JS_OBJECTS(this, nsDOMFileReader);
nsLayoutStatics::Release();
}

Просмотреть файл

@ -7977,6 +7977,17 @@ NotifyPageHide(nsIDocument* aDocument, void* aData)
return true;
}
static void
DispatchFullScreenChange(nsIDocument* aTarget)
{
nsRefPtr<nsAsyncDOMEvent> e =
new nsAsyncDOMEvent(aTarget,
NS_LITERAL_STRING("mozfullscreenchange"),
true,
false);
e->PostDOMEvent();
}
void
nsDocument::OnPageHide(bool aPersisted,
EventTarget* aDispatchStartTarget)
@ -8050,6 +8061,10 @@ nsDocument::OnPageHide(bool aPersisted,
// so calling CleanupFullscreenState() here will ensure all hidden
// documents have their fullscreen state reset.
CleanupFullscreenState();
// If anyone was listening to this document's state, advertizing the state
// change would be the least of the politeness.
DispatchFullScreenChange(this);
}
}
@ -9483,17 +9498,6 @@ nsDocument::SetFullscreenRoot(nsIDocument* aRoot)
mFullscreenRoot = do_GetWeakReference(aRoot);
}
static void
DispatchFullScreenChange(nsIDocument* aTarget)
{
nsRefPtr<nsAsyncDOMEvent> e =
new nsAsyncDOMEvent(aTarget,
NS_LITERAL_STRING("mozfullscreenchange"),
true,
false);
e->PostDOMEvent();
}
NS_IMETHODIMP
nsDocument::MozCancelFullScreen()
{

Просмотреть файл

@ -2094,7 +2094,7 @@ nsINode::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
} \
NS_IMETHODIMP nsINode::GetOn##name_(JSContext *cx, JS::Value *vp) { \
EventHandlerNonNull* h = GetOn##name_(); \
vp->setObjectOrNull(h ? h->Callable() : nullptr); \
vp->setObjectOrNull(h ? h->Callable().get() : nullptr); \
return NS_OK; \
} \
NS_IMETHODIMP nsINode::SetOn##name_(JSContext *cx, const JS::Value &v) { \

Просмотреть файл

@ -324,15 +324,17 @@ nsXMLHttpRequest::~nsXMLHttpRequest()
NS_ABORT_IF_FALSE(!(mState & XML_HTTP_REQUEST_SYNCLOOPING), "we rather crash than hang");
mState &= ~XML_HTTP_REQUEST_SYNCLOOPING;
mResultJSON = JSVAL_VOID;
mResultArrayBuffer = nullptr;
NS_DROP_JS_OBJECTS(this, nsXMLHttpRequest);
nsLayoutStatics::Release();
}
void
nsXMLHttpRequest::RootJSResultObjects()
{
nsContentUtils::PreserveWrapper(
static_cast<EventTarget*>(
static_cast<nsDOMEventTargetHelper*>(this)), this);
NS_HOLD_JS_OBJECTS(this, nsXMLHttpRequest);
}
/**
@ -2645,7 +2647,8 @@ nsXMLHttpRequest::Send(nsIVariant* aVariant, const Nullable<RequestBody>& aBody)
mLoadLengthComputable = false;
mLoadTotal = 0;
if ((aVariant || !aBody.IsNull()) && httpChannel &&
!method.EqualsLiteral("GET")) {
!method.LowerCaseEqualsLiteral("get") &&
!method.LowerCaseEqualsLiteral("head")) {
nsAutoCString charset;
nsAutoCString defaultContentType;

Просмотреть файл

@ -17,16 +17,6 @@ CPP_UNIT_TESTS = \
TestPlainTextSerializer.cpp \
$(NULL)
DISABLED_XPCSHELL_TESTS = \
unit \
$(NULL)
# FIXME/bug 575918: out-of-process xpcshell is broken on OS X
ifneq ($(OS_ARCH),Darwin)
DISABLED_XPCSHELL_TESTS += unit_ipc
endif
# Split files arbitrarily in three groups to not run into too-long command lines
# which break on Windows (see bug 563151 and bug 831989)
MOCHITEST_FILES_A = \

Просмотреть файл

@ -441,6 +441,11 @@ public:
static_cast<CanvasRenderingContext2DUserData*>(aData);
CanvasRenderingContext2D* context = self->mContext;
if (self->mContext && context->mGLContext) {
if (self->mContext->mTarget != nullptr) {
// Since SkiaGL default to store drawing command until flush
// We will have to flush it before present.
self->mContext->mTarget->Flush();
}
context->mGLContext->MakeCurrent();
context->mGLContext->PublishFrame();
}
@ -797,7 +802,12 @@ CanvasRenderingContext2D::EnsureTarget()
size.height),
caps,
mozilla::gl::GLContext::ContextFlagsNone);
mTarget = gfxPlatform::GetPlatform()->CreateDrawTargetForFBO(0, mGLContext, size, format);
if (mGLContext) {
mTarget = gfxPlatform::GetPlatform()->CreateDrawTargetForFBO(0, mGLContext, size, format);
} else {
mTarget = layerManager->CreateDrawTarget(size, format);
}
} else
#endif
mTarget = layerManager->CreateDrawTarget(size, format);

Просмотреть файл

@ -1 +1,3 @@
conformance/more/conformance/quickCheckAPI-B2.html
conformance/more/conformance/quickCheckAPI-B3.html
conformance/more/functions/bufferSubDataBadArgs.html

Просмотреть файл

@ -858,11 +858,10 @@ nsEventListenerManager::CompileEventHandlerInternal(nsListenerStruct *aListenerS
options.setFileAndLine(url.get(), lineNo)
.setVersion(SCRIPTVERSION_DEFAULT);
JS::RootedObject rootedNull(cx, nullptr); // See bug 781070.
JSObject *handlerFun = nullptr;
result = nsJSUtils::CompileFunction(cx, rootedNull, options,
JS::Rooted<JSObject*> handlerFun(cx);
result = nsJSUtils::CompileFunction(cx, JS::NullPtr(), options,
nsAtomCString(aListenerStruct->mTypeAtom),
argCount, argNames, *body, &handlerFun);
argCount, argNames, *body, handlerFun.address());
NS_ENSURE_SUCCESS(result, result);
handler = handlerFun;
NS_ENSURE_TRUE(handler, NS_ERROR_FAILURE);

Просмотреть файл

@ -95,7 +95,7 @@ nsEventListenerInfo::GetJSVal(JSContext* aCx,
nsCOMPtr<nsIJSEventListener> jsl = do_QueryInterface(mListener);
if (jsl) {
JSObject *handler = jsl->GetHandler().Ptr()->Callable();
JS::Handle<JSObject*> handler(jsl->GetHandler().Ptr()->Callable());
if (handler) {
aAc.construct(aCx, handler);
*aJSVal = OBJECT_TO_JSVAL(handler);

Просмотреть файл

@ -500,7 +500,7 @@ HTMLBodyElement::IsEventAttributeName(nsIAtom *aName)
HTMLBodyElement::GetOn##name_(JSContext *cx, JS::Value *vp) \
{ \
getter_type_ h = forwardto_::GetOn##name_(); \
vp->setObjectOrNull(h ? h->Callable() : nullptr); \
vp->setObjectOrNull(h ? h->Callable().get() : nullptr); \
return NS_OK; \
} \
NS_IMETHODIMP \

Просмотреть файл

@ -365,7 +365,7 @@ HTMLFrameSetElement::IsEventAttributeName(nsIAtom *aName)
HTMLFrameSetElement::GetOn##name_(JSContext *cx, JS::Value *vp) \
{ \
getter_type_ h = forwardto_::GetOn##name_(); \
vp->setObjectOrNull(h ? h->Callable() : nullptr); \
vp->setObjectOrNull(h ? h->Callable().get() : nullptr); \
return NS_OK; \
} \
NS_IMETHODIMP \

Просмотреть файл

@ -5028,8 +5028,6 @@ HTMLInputElement::GetStep() const
step = GetDefaultStep();
}
// TODO: This multiplication can lead to inexact results, we should use a
// type that supports a better precision than double. Bug 783607.
return step * GetStepScaleFactor();
}
@ -5220,15 +5218,6 @@ HTMLInputElement::HasStepMismatch() const
return false;
}
if (mType == NS_FORM_INPUT_DATE) {
// The multiplication by the stepScaleFactor for date can easily lead
// to precision loss, since in most use cases this value should be
// an integer (millisecond precision), we can get rid of the precision
// loss by rounding step. This will however lead to erroneous results
// when step was intented to have a precision superior to a millisecond.
step = step.round();
}
// Value has to be an integral multiple of step.
return NS_floorModulo(value - GetStepBase(), step) != 0;
}

Просмотреть файл

@ -1566,9 +1566,9 @@ HTMLMediaElement::GetMozSampleRate(uint32_t* aMozSampleRate)
}
// Helper struct with arguments for our hash iterator.
typedef struct {
typedef struct MOZ_STACK_CLASS {
JSContext* cx;
JSObject* tags;
JS::HandleObject tags;
bool error;
} MetadataIterCx;

Просмотреть файл

@ -1163,8 +1163,8 @@ UndoManager::DispatchTransactionEvent(JSContext* aCx, const nsAString& aType,
nsCOMArray<nsIVariant> keepAlive;
nsTArray<nsIVariant*> transactionItems;
for (uint32_t i = 0; i < items.Length(); i++) {
JS::Value txVal = JS::ObjectValue(*items[i]->Callback());
if (!JS_WrapValue(aCx, &txVal)) {
JS::Rooted<JS::Value> txVal(aCx, JS::ObjectValue(*items[i]->Callback()));
if (!JS_WrapValue(aCx, txVal.address())) {
aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
return;
}

Просмотреть файл

@ -3122,8 +3122,8 @@ nsGenericHTMLElement::GetItemValue(JSContext* aCx, JSObject* aScope,
}
if (ItemScope()) {
JS::Value v;
if (!mozilla::dom::WrapObject(aCx, scope, this, &v)) {
JS::Rooted<JS::Value> v(aCx);
if (!mozilla::dom::WrapObject(aCx, scope, this, v.address())) {
aError.Throw(NS_ERROR_FAILURE);
return JS::UndefinedValue();
}

Просмотреть файл

@ -60,6 +60,7 @@ MOCHITEST_FILES = \
submit_invalid_file.sjs \
test_input_file_picker.html \
test_input_event.html \
test_input_number_rounding.html \
$(NULL)
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -0,0 +1,116 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=783607
-->
<head>
<title>Test rounding behaviour for &lt;input type='number'&gt;</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<meta charset="UTF-8">
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=783607">Mozilla Bug 783607</a>
<p id="display"></p>
<div id="content">
<input id=number type=number value=0 step=0.01 max=1>
</div>
<pre id="test">
<script type="application/javascript">
/**
* Test for Bug 783607.
* This test checks that when <input type=number> has fractional step values,
* the values that a content author will see in their script will not have
* ugly rounding errors.
**/
SimpleTest.waitForExplicitFinish();
SimpleTest.waitForFocus(function() {
test();
SimpleTest.finish();
});
/**
* We can _NOT_ generate these values by looping and simply incrementing a
* variable by 0.01 and stringifying it, since we'll end up with strings like
* "0.060000000000000005" due to the inability of binary floating point numbers
* to accurately represent decimal values.
*/
var stepVals = [
"0", "0.01", "0.02", "0.03", "0.04", "0.05", "0.06", "0.07", "0.08", "0.09",
"0.1", "0.11", "0.12", "0.13", "0.14", "0.15", "0.16", "0.17", "0.18", "0.19",
"0.2", "0.21", "0.22", "0.23", "0.24", "0.25", "0.26", "0.27", "0.28", "0.29",
"0.3", "0.31", "0.32", "0.33", "0.34", "0.35", "0.36", "0.37", "0.38", "0.39",
"0.4", "0.41", "0.42", "0.43", "0.44", "0.45", "0.46", "0.47", "0.48", "0.49",
"0.5", "0.51", "0.52", "0.53", "0.54", "0.55", "0.56", "0.57", "0.58", "0.59",
"0.6", "0.61", "0.62", "0.63", "0.64", "0.65", "0.66", "0.67", "0.68", "0.69",
"0.7", "0.71", "0.72", "0.73", "0.74", "0.75", "0.76", "0.77", "0.78", "0.79",
"0.8", "0.81", "0.82", "0.83", "0.84", "0.85", "0.86", "0.87", "0.88", "0.89",
"0.9", "0.91", "0.92", "0.93", "0.94", "0.95", "0.96", "0.97", "0.98", "0.99",
"1"
];
var pgUpDnVals = [
"0", "0.1", "0.2", "0.3", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "1"
];
function test() {
var elem = document.getElementById("number");
elem.focus();
/**
* TODO:
* When <input type='number'> widget will have a widge we should test PAGE_UP,
* PAGE_DOWN, UP and DOWN keys. For the moment, there is no widget so those
* keys do not have any effect.
* The tests using those keys as marked as todo_is() hoping that at least part
* of them will fail when the widget will be implemented.
*/
for (var i = 1; i < pgUpDnVals.length; ++i) {
synthesizeKey("VK_PAGE_UP", {});
todo_is(elem.value, pgUpDnVals[i], "Test VK_PAGE_UP");
is(elem.validity.valid, true, "Check element is valid for value " + pgUpDnVals[i]);
}
for (var i = pgUpDnVals.length - 2; i >= 0; --i) {
synthesizeKey("VK_PAGE_DOWN", {});
// TODO: this condition is there because the todo_is() below would pass otherwise.
if (stepVals[i] == 0) { continue; }
todo_is(elem.value, pgUpDnVals[i], "Test VK_PAGE_DOWN");
is(elem.validity.valid, true, "Check element is valid for value " + pgUpDnVals[i]);
}
for (var i = 1; i < stepVals.length; ++i) {
synthesizeKey("VK_UP", {});
todo_is(elem.value, stepVals[i], "Test VK_UP");
is(elem.validity.valid, true, "Check element is valid for value " + stepVals[i]);
}
for (var i = stepVals.length - 2; i >= 0; --i) {
synthesizeKey("VK_DOWN", {});
// TODO: this condition is there because the todo_is() below would pass otherwise.
if (stepVals[i] == 0) { continue; }
todo_is(elem.value, stepVals[i], "Test VK_DOWN");
is(elem.validity.valid, true, "Check element is valid for value " + stepVals[i]);
}
for (var i = 1; i < stepVals.length; ++i) {
elem.stepUp();
is(elem.value, stepVals[i], "Test stepUp()");
is(elem.validity.valid, true, "Check element is valid for value " + stepVals[i]);
}
for (var i = stepVals.length - 2; i >= 0; --i) {
elem.stepDown();
is(elem.value, stepVals[i], "Test stepDown()");
is(elem.validity.valid, true, "Check element is valid for value " + stepVals[i]);
}
}
</script>
</pre>
</body>
</html>

Просмотреть файл

@ -406,6 +406,13 @@ for (var test of data) {
input.value = 2;
checkValidity(input, false, apply, {low: 1, high: 3});
// Rounding issues.
input = getFreshElement(test.type);
input.min = 0.1;
input.step = 0.2;
input.value = 0.3;
checkValidity(input, true, apply);
// Check that when the higher value is higher than max, we don't show it.
input = getFreshElement(test.type);
input.step = '2';

Просмотреть файл

@ -135,6 +135,7 @@ function checkGarbageValues()
var caught = false;
element.valueAsDate = value;
} catch(e) {
is(e.name, "TypeError", "Exception should be 'TypeError'.");
caught = true;
}
ok(caught, "Assigning " + value + " to .valueAsDate should throw");
@ -333,8 +334,6 @@ function checkWithBustedPrototype()
var element = document.createElement('input');
element.type = type;
var witnessDate = new Date();
var backupPrototype = {};
backupPrototype.getUTCFullYear = Date.prototype.getUTCFullYear;
backupPrototype.getUTCMonth = Date.prototype.getUTCMonth;
@ -351,8 +350,22 @@ function checkWithBustedPrototype()
element.valueAsDate = new Date();
isnot(element.valueAsDate, null, ".valueAsDate should not return null");
// TODO: check the Date object value (UTCFullYear, UTCMonth and UTCDate)
// when .valueAsDate will stop returning null.
// The object returned by element.valueAsDate should return a Date object
// with the same prototype:
is(element.valueAsDate.getUTCFullYear, Date.prototype.getUTCFullYear,
"prototype is the same");
is(element.valueAsDate.getUTCMonth, Date.prototype.getUTCMonth,
"prototype is the same");
is(element.valueAsDate.getUTCDate, Date.prototype.getUTCDate,
"prototype is the same");
is(element.valueAsDate.getTime, Date.prototype.getTime,
"prototype is the same");
is(element.valueAsDate.setUTCFullYear, Date.prototype.setUTCFullYear,
"prototype is the same");
// However the Date should have the correct information.
var witnessDate = new Date(element.valueAsNumber);
is(element.valueAsDate.valueOf(), witnessDate.valueOf(), "correct Date");
// Same test as above but using NaN instead of {}.
@ -365,8 +378,22 @@ function checkWithBustedPrototype()
element.valueAsDate = new Date();
isnot(element.valueAsDate, null, ".valueAsDate should not return null");
// TODO: check the Date object value (UTCFullYear, UTCMonth and UTCDate)
// when .valueAsDate will stop returning null.
// The object returned by element.valueAsDate should return a Date object
// with the same prototype:
is(element.valueAsDate.getUTCFullYear, Date.prototype.getUTCFullYear,
"prototype is the same");
is(element.valueAsDate.getUTCMonth, Date.prototype.getUTCMonth,
"prototype is the same");
is(element.valueAsDate.getUTCDate, Date.prototype.getUTCDate,
"prototype is the same");
is(element.valueAsDate.getTime, Date.prototype.getTime,
"prototype is the same");
is(element.valueAsDate.setUTCFullYear, Date.prototype.setUTCFullYear,
"prototype is the same");
// However the Date should have the correct information.
var witnessDate = new Date(element.valueAsNumber);
is(element.valueAsDate.valueOf(), witnessDate.valueOf(), "correct Date");
Date.prototype.getUTCFullYear = backupPrototype.getUTCFullYear;
Date.prototype.getUTCMonth = backupPrototype.getUTCMonth;

Просмотреть файл

@ -145,15 +145,6 @@ static bool ConvertToMidasInternalCommand(const nsAString & inCommandID,
// ==================================================================
// =
// ==================================================================
static void
ReportUseOfDeprecatedMethod(nsHTMLDocument* aDoc, const char* aWarning)
{
nsContentUtils::ReportToConsole(nsIScriptError::warningFlag,
"DOM Events", aDoc,
nsContentUtils::eDOM_PROPERTIES,
aWarning);
}
static nsresult
RemoveFromAgentSheets(nsCOMArray<nsIStyleSheet> &aAgentSheets, const nsAString& url)
{
@ -2251,27 +2242,6 @@ nsHTMLDocument::GetSelection(ErrorResult& rv)
return sel.forget();
}
NS_IMETHODIMP
nsHTMLDocument::CaptureEvents(int32_t aEventFlags)
{
ReportUseOfDeprecatedMethod(this, "UseOfCaptureEventsWarning");
return NS_OK;
}
NS_IMETHODIMP
nsHTMLDocument::ReleaseEvents(int32_t aEventFlags)
{
ReportUseOfDeprecatedMethod(this, "UseOfReleaseEventsWarning");
return NS_OK;
}
NS_IMETHODIMP
nsHTMLDocument::RouteEvent(nsIDOMEvent* aEvt)
{
ReportUseOfDeprecatedMethod(this, "UseOfRouteEventWarning");
return NS_OK;
}
// Mapped to document.embeds for NS4 compatibility
NS_IMETHODIMP
nsHTMLDocument::GetPlugins(nsIDOMHTMLCollection** aPlugins)

Просмотреть файл

@ -99,11 +99,6 @@ public:
// nsIDOMHTMLDocument interface
NS_DECL_NSIDOMHTMLDOCUMENT
void RouteEvent(nsDOMEvent& aEvent)
{
RouteEvent(&aEvent);
}
/**
* Returns the result of document.all[aID] which can either be a node
* or a nodelist depending on if there are multiple nodes with the same
@ -248,9 +243,6 @@ public:
// Deprecated
}
already_AddRefed<nsISelection> GetSelection(mozilla::ErrorResult& rv);
// The XPCOM CaptureEvents works fine for us.
// The XPCOM ReleaseEvents works fine for us.
// The XPCOM RouteEvent works fine for us.
// We're picking up GetLocation from Document
already_AddRefed<nsIDOMLocation> GetLocation() const {
return nsIDocument::GetLocation();

Просмотреть файл

@ -188,6 +188,11 @@ public:
{
NS_ERROR("SetBuffer called on engine that doesn't support it");
}
// This consumes the contents of aData. aData will be emptied after this returns.
virtual void SetRawArrayData(nsTArray<float>& aData)
{
NS_ERROR("SetRawArrayData called on an engine that doesn't support it");
}
/**
* Produce the next block of audio samples, given input samples aInput

Просмотреть файл

@ -159,6 +159,28 @@ AudioNodeStream::SetBuffer(already_AddRefed<ThreadSharedFloatArrayBufferList> aB
GraphImpl()->AppendMessage(new Message(this, aBuffer));
}
void
AudioNodeStream::SetRawArrayData(nsTArray<float>& aData)
{
class Message : public ControlMessage {
public:
Message(AudioNodeStream* aStream,
nsTArray<float>& aData)
: ControlMessage(aStream)
{
mData.SwapElements(aData);
}
virtual void Run()
{
static_cast<AudioNodeStream*>(mStream)->Engine()->SetRawArrayData(mData);
}
nsTArray<float> mData;
};
MOZ_ASSERT(this);
GraphImpl()->AppendMessage(new Message(this, aData));
}
void
AudioNodeStream::SetChannelMixingParameters(uint32_t aNumberOfChannels,
ChannelCountMode aChannelCountMode,

Просмотреть файл

@ -75,6 +75,8 @@ public:
void SetTimelineParameter(uint32_t aIndex, const dom::AudioParamTimeline& aValue);
void SetThreeDPointParameter(uint32_t aIndex, const dom::ThreeDPoint& aValue);
void SetBuffer(already_AddRefed<ThreadSharedFloatArrayBufferList> aBuffer);
// This consumes the contents of aData. aData will be emptied after this returns.
void SetRawArrayData(nsTArray<float>& aData);
void SetChannelMixingParameters(uint32_t aNumberOfChannels,
dom::ChannelCountMode aChannelCountMoe,
dom::ChannelInterpretation aChannelInterpretation);

Просмотреть файл

@ -256,6 +256,13 @@ bool OmxDecoder::Init() {
// for (h.264). So if we don't get a hardware decoder, just give
// up.
int flags = kHardwareCodecsOnly;
char propQemu[PROPERTY_VALUE_MAX];
property_get("ro.kernel.qemu", propQemu, "");
if (!strncmp(propQemu, "1", 1)) {
// If we are in emulator, allow to fall back to software.
flags = 0;
}
videoSource = OMXCodec::Create(omx,
videoTrack->getFormat(),
false, // decoder

Просмотреть файл

@ -450,7 +450,6 @@ AudioBufferSourceNode::AudioBufferSourceNode(AudioContext* aContext)
, mLoop(false)
, mStartCalled(false)
, mStopped(false)
, mOffsetAndDurationRemembered(false)
{
AudioBufferSourceNodeEngine* engine =
new AudioBufferSourceNodeEngine(this, aContext->Destination());
@ -494,12 +493,11 @@ AudioBufferSourceNode::Start(double aWhen, double aOffset,
std::numeric_limits<double>::min();
SendOffsetAndDurationParametersToStream(ns, aOffset, duration);
} else {
// Remember our argument so that we can use them once we have a buffer
// Remember our arguments so that we can use them once we have a buffer
mOffset = aOffset;
mDuration = aDuration.WasPassed() ?
aDuration.Value() :
std::numeric_limits<double>::min();
mOffsetAndDurationRemembered = true;
}
// Don't set parameter unnecessarily
@ -527,9 +525,7 @@ AudioBufferSourceNode::SendBufferParameterToStream(JSContext* aCx)
ns->SetBuffer(nullptr);
}
if (mOffsetAndDurationRemembered) {
SendOffsetAndDurationParametersToStream(ns, mOffset, mDuration);
}
SendOffsetAndDurationParametersToStream(ns, mOffset, mDuration);
}
void

Просмотреть файл

@ -152,7 +152,6 @@ private:
bool mLoop;
bool mStartCalled;
bool mStopped;
bool mOffsetAndDurationRemembered;
};
}

Просмотреть файл

@ -22,6 +22,7 @@
#include "ScriptProcessorNode.h"
#include "ChannelMergerNode.h"
#include "ChannelSplitterNode.h"
#include "WaveShaperNode.h"
#include "nsNetUtil.h"
// Note that this number is an arbitrary large value to protect against OOM
@ -195,6 +196,13 @@ AudioContext::CreateGain()
return gainNode.forget();
}
already_AddRefed<WaveShaperNode>
AudioContext::CreateWaveShaper()
{
nsRefPtr<WaveShaperNode> waveShaperNode = new WaveShaperNode(this);
return waveShaperNode.forget();
}
already_AddRefed<DelayNode>
AudioContext::CreateDelay(double aMaxDelayTime, ErrorResult& aRv)
{

Просмотреть файл

@ -52,6 +52,7 @@ class GainNode;
class GlobalObject;
class PannerNode;
class ScriptProcessorNode;
class WaveShaperNode;
class AudioContext MOZ_FINAL : public nsDOMEventTargetHelper,
public EnableWebAudioCheck
@ -126,6 +127,9 @@ public:
already_AddRefed<GainNode>
CreateGain();
already_AddRefed<WaveShaperNode>
CreateWaveShaper();
already_AddRefed<GainNode>
CreateGainNode()
{

Просмотреть файл

@ -36,6 +36,7 @@ CPPSRCS := \
PannerNode.cpp \
ScriptProcessorNode.cpp \
ThreeDPoint.cpp \
WaveShaperNode.cpp \
WebAudioUtils.cpp \
$(NULL)

Просмотреть файл

@ -0,0 +1,140 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et cindent: */
/* 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 "WaveShaperNode.h"
#include "mozilla/dom/WaveShaperNodeBinding.h"
#include "AudioNode.h"
#include "AudioNodeEngine.h"
#include "AudioNodeStream.h"
#include "mozilla/PodOperations.h"
namespace mozilla {
namespace dom {
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(WaveShaperNode, AudioNode)
NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER
tmp->ClearCurve();
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(WaveShaperNode, AudioNode)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(WaveShaperNode)
NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER
NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mCurve)
NS_IMPL_CYCLE_COLLECTION_TRACE_END
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(WaveShaperNode)
NS_INTERFACE_MAP_END_INHERITING(AudioNode)
NS_IMPL_ADDREF_INHERITED(WaveShaperNode, AudioNode)
NS_IMPL_RELEASE_INHERITED(WaveShaperNode, AudioNode)
class WaveShaperNodeEngine : public AudioNodeEngine
{
public:
explicit WaveShaperNodeEngine(AudioNode* aNode)
: AudioNodeEngine(aNode)
{
}
virtual void SetRawArrayData(nsTArray<float>& aCurve) MOZ_OVERRIDE
{
mCurve.SwapElements(aCurve);
}
virtual void ProduceAudioBlock(AudioNodeStream* aStream,
const AudioChunk& aInput,
AudioChunk* aOutput,
bool* aFinished)
{
uint32_t channelCount = aInput.mChannelData.Length();
if (!mCurve.Length() || !channelCount) {
// Optimize the case where we don't have a curve buffer,
// or the input is null.
*aOutput = aInput;
return;
}
AllocateAudioBlock(channelCount, aOutput);
for (uint32_t i = 0; i < channelCount; ++i) {
const float* inputBuffer = static_cast<const float*>(aInput.mChannelData[i]);
float* outputBuffer = const_cast<float*> (static_cast<const float*>(aOutput->mChannelData[i]));
for (uint32_t j = 0; j < WEBAUDIO_BLOCK_SIZE; ++j) {
// Index into the curve array based on the amplitude of the
// incoming signal by clamping the amplitude to [-1, 1] and
// performing a linear interpolation of the neighbor values.
float index = std::max(0.0f, std::min(float(mCurve.Length() - 1),
mCurve.Length() * (inputBuffer[j] + 1) / 2));
uint32_t indexLower = uint32_t(index);
uint32_t indexHigher = uint32_t(index + 1.0f);
if (indexHigher == mCurve.Length()) {
outputBuffer[j] = mCurve[indexLower];
} else {
float interpolationFactor = index - indexLower;
outputBuffer[j] = (1.0f - interpolationFactor) * mCurve[indexLower] +
interpolationFactor * mCurve[indexHigher];
}
}
}
}
private:
nsTArray<float> mCurve;
};
WaveShaperNode::WaveShaperNode(AudioContext* aContext)
: AudioNode(aContext,
2,
ChannelCountMode::Max,
ChannelInterpretation::Speakers)
, mCurve(nullptr)
{
NS_HOLD_JS_OBJECTS(this, WaveShaperNode);
WaveShaperNodeEngine* engine = new WaveShaperNodeEngine(this);
mStream = aContext->Graph()->CreateAudioNodeStream(engine, MediaStreamGraph::INTERNAL_STREAM);
}
WaveShaperNode::~WaveShaperNode()
{
ClearCurve();
}
void
WaveShaperNode::ClearCurve()
{
mCurve = nullptr;
NS_DROP_JS_OBJECTS(this, WaveShaperNode);
}
JSObject*
WaveShaperNode::WrapObject(JSContext *aCx, JS::Handle<JSObject*> aScope)
{
return WaveShaperNodeBinding::Wrap(aCx, aScope, this);
}
void
WaveShaperNode::SetCurve(const Float32Array* aCurve)
{
nsTArray<float> curve;
if (aCurve) {
mCurve = aCurve->Obj();
curve.SetLength(aCurve->Length());
PodCopy(curve.Elements(), aCurve->Data(), aCurve->Length());
} else {
mCurve = nullptr;
}
AudioNodeStream* ns = static_cast<AudioNodeStream*>(mStream.get());
MOZ_ASSERT(ns, "Why don't we have a stream here?");
ns->SetRawArrayData(curve);
}
}
}

Просмотреть файл

@ -0,0 +1,46 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et cindent: */
/* 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/. */
#ifndef WaveShaperNode_h_
#define WaveShaperNode_h_
#include "AudioNode.h"
#include "AudioParam.h"
namespace mozilla {
namespace dom {
class AudioContext;
class WaveShaperNode : public AudioNode
{
public:
explicit WaveShaperNode(AudioContext *aContext);
virtual ~WaveShaperNode();
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(WaveShaperNode, AudioNode)
virtual JSObject* WrapObject(JSContext *aCx,
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
JSObject* GetCurve(JSContext* aCx) const
{
return mCurve;
}
void SetCurve(const Float32Array* aData);
private:
void ClearCurve();
private:
JSObject* mCurve;
};
}
}
#endif

Просмотреть файл

@ -36,5 +36,6 @@ EXPORTS.mozilla.dom += [
'GainNode.h',
'PannerNode.h',
'ScriptProcessorNode.h',
'WaveShaperNode.h',
]

Просмотреть файл

@ -20,6 +20,7 @@ MOCHITEST_FILES := \
test_bug866570.html \
test_bug866737.html \
test_bug867089.html \
test_bug867104.html \
test_bug867174.html \
test_bug867203.html \
test_analyserNode.html \
@ -61,6 +62,9 @@ MOCHITEST_FILES := \
test_scriptProcessorNode.html \
test_scriptProcessorNodeChannelCount.html \
test_singleSourceDest.html \
test_waveShaper.html \
test_waveShaperNoCurve.html \
test_waveShaperZeroLengthCurve.html \
ting.ogg \
ting-expected.wav \
ting-dualchannel44.1.ogg \

Просмотреть файл

@ -0,0 +1,36 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Crashtest for bug 867104</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<pre id="test">
<script class="testbody" type="text/javascript">
SpecialPowers.setBoolPref("media.webaudio.enabled", true);
SimpleTest.waitForExplicitFinish();
addLoadEvent(function() {
var ctx = new AudioContext();
var source = ctx.createBufferSource();
var b0 = ctx.createBuffer(32,798,22050);
var b1 = ctx.createBuffer(32,28,22050);
var sp = ctx.createScriptProcessor();
source.buffer = b0;
source.connect(sp);
source.start(0);
source.buffer = b1;
sp.onaudioprocess = function() {
ok(true, "We did not crash.");
sp.onaudioprocess = null;
SpecialPowers.clearUserPref("media.webaudio.enabled");
SimpleTest.finish();
};
});
</script>
</pre>
</body>
</html>

Просмотреть файл

@ -0,0 +1,60 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test WaveShaperNode with no curve</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="webaudio.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<pre id="test">
<script class="testbody" type="text/javascript">
var gTest = {
length: 4096,
numberOfChannels: 1,
createGraph: function(context) {
var source = context.createBufferSource();
source.buffer = this.buffer;
var shaper = context.createWaveShaper();
shaper.curve = this.curve;
source.connect(shaper);
source.start(0);
return shaper;
},
createExpectedBuffers: function(context) {
this.buffer = context.createBuffer(1, 4096, context.sampleRate);
for (var i = 1; i < 4095; ++i) {
this.buffer.getChannelData(0)[i] = 2 * (i / 4096) - 1;
}
// Two out of range values
this.buffer.getChannelData(0)[0] = -2;
this.buffer.getChannelData(0)[4095] = 2;
this.curve = new Float32Array(2048);
for (var i = 0; i < 2048; ++i) {
this.curve[i] = Math.sin(100 * Math.PI * (i + 1) / context.sampleRate);
}
var expectedBuffer = context.createBuffer(1, 4096, context.sampleRate);
for (var i = 1; i < 4095; ++i) {
var input = this.buffer.getChannelData(0)[i];
var index = Math.floor(this.curve.length * (input + 1) / 2);
index = Math.max(0, Math.min(this.curve.length - 1, index));
expectedBuffer.getChannelData(0)[i] = this.curve[index];
}
expectedBuffer.getChannelData(0)[0] = this.curve[0];
expectedBuffer.getChannelData(0)[4095] = this.curve[2047];
return expectedBuffer;
},
};
runTest();
</script>
</pre>
</body>
</html>

Просмотреть файл

@ -0,0 +1,43 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test WaveShaperNode with no curve</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="webaudio.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<pre id="test">
<script class="testbody" type="text/javascript">
var gTest = {
length: 2048,
numberOfChannels: 1,
createGraph: function(context) {
var source = context.createBufferSource();
source.buffer = this.buffer;
var shaper = context.createWaveShaper();
is(shaper.curve, null, "The shaper curve must be null by default");
source.connect(shaper);
source.start(0);
return shaper;
},
createExpectedBuffers: function(context) {
var expectedBuffer = context.createBuffer(1, 2048, context.sampleRate);
for (var i = 0; i < 2048; ++i) {
expectedBuffer.getChannelData(0)[i] = Math.sin(440 * 2 * Math.PI * i / context.sampleRate);
}
this.buffer = expectedBuffer;
return expectedBuffer;
},
};
runTest();
</script>
</pre>
</body>
</html>

Просмотреть файл

@ -0,0 +1,43 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test WaveShaperNode with no curve</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="webaudio.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<pre id="test">
<script class="testbody" type="text/javascript">
var gTest = {
length: 2048,
numberOfChannels: 1,
createGraph: function(context) {
var source = context.createBufferSource();
source.buffer = this.buffer;
var shaper = context.createWaveShaper();
shaper.curve = new Float32Array(0);
source.connect(shaper);
source.start(0);
return shaper;
},
createExpectedBuffers: function(context) {
var expectedBuffer = context.createBuffer(1, 2048, context.sampleRate);
for (var i = 0; i < 2048; ++i) {
expectedBuffer.getChannelData(0)[i] = Math.sin(440 * 2 * Math.PI * i / context.sampleRate);
}
this.buffer = expectedBuffer;
return expectedBuffer;
},
};
runTest();
</script>
</pre>
</body>
</html>

Просмотреть файл

@ -97,7 +97,10 @@ MediaEngineWebRTC::EnumerateVideoDevices(nsTArray<nsRefPtr<MediaEngineVideoSourc
JNIEnv *env;
jint res = jvm->AttachCurrentThread(&env, NULL);
webrtc::VideoEngine::SetAndroidObjects(jvm, (void*)context);
if (webrtc::VideoEngine::SetAndroidObjects(jvm, (void*)context) != 0) {
LOG(("VieCapture:SetAndroidObjects Failed"));
return;
}
env->DeleteGlobalRef(context);
#endif
@ -230,7 +233,10 @@ MediaEngineWebRTC::EnumerateAudioDevices(nsTArray<nsRefPtr<MediaEngineAudioSourc
JNIEnv *env;
jvm->AttachCurrentThread(&env, NULL);
webrtc::VoiceEngine::SetAndroidObjects(jvm, (void*)context);
if (webrtc::VoiceEngine::SetAndroidObjects(jvm, (void*)context) != 0) {
LOG(("VoiceEngine:SetAndroidObjects Failed"));
return;
}
env->DeleteGlobalRef(context);
#endif

Просмотреть файл

@ -11,6 +11,4 @@ relativesrcdir = @relativesrcdir@
include $(DEPTH)/config/autoconf.mk
DISABLED_XPCSHELL_TESTS = unit
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -177,8 +177,8 @@ nsXBLProtoImpl::InitTargetObjects(nsXBLPrototypeBinding* aBinding,
AutoPushJSContext cx(aContext->GetNativeContext());
JS::Rooted<JSObject*> global(cx, sgo->GetGlobalJSObject());
nsCOMPtr<nsIXPConnectJSObjectHolder> wrapper;
JS::Value v;
rv = nsContentUtils::WrapNative(cx, global, aBoundElement, &v,
JS::Rooted<JS::Value> v(cx);
rv = nsContentUtils::WrapNative(cx, global, aBoundElement, v.address(),
getter_AddRefs(wrapper));
NS_ENSURE_SUCCESS(rv, rv);

Просмотреть файл

@ -3653,8 +3653,9 @@ XULDocument::ExecuteScript(nsIScriptContext * aContext, JSScript* aScriptObject)
NS_ENSURE_TRUE(mScriptGlobalObject, NS_ERROR_NOT_INITIALIZED);
// Execute the precompiled script with the given version
JS::Rooted<JSScript*> script(aContext->GetNativeContext(), aScriptObject);
JSObject* global = mScriptGlobalObject->GetGlobalJSObject();
return aContext->ExecuteScript(aScriptObject, global);
return aContext->ExecuteScript(script, global);
}
nsresult

Просмотреть файл

@ -1397,14 +1397,14 @@ nsXULTemplateBuilder::InitHTMLTemplateRoot()
if (mDB) {
// database
JS::Value jsdatabase;
JS::Rooted<JS::Value> jsdatabase(jscontext);
rv = nsContentUtils::WrapNative(jscontext, scope, mDB,
&NS_GET_IID(nsIRDFCompositeDataSource),
&jsdatabase, getter_AddRefs(wrapper));
jsdatabase.address(), getter_AddRefs(wrapper));
NS_ENSURE_SUCCESS(rv, rv);
bool ok;
ok = JS_SetProperty(jscontext, jselement, "database", &jsdatabase);
ok = JS_SetProperty(jscontext, jselement, "database", jsdatabase.address());
NS_ASSERTION(ok, "unable to set database property");
if (! ok)
return NS_ERROR_FAILURE;
@ -1412,16 +1412,16 @@ nsXULTemplateBuilder::InitHTMLTemplateRoot()
{
// builder
JS::Value jsbuilder;
JS::Rooted<JS::Value> jsbuilder(jscontext);
nsCOMPtr<nsIXPConnectJSObjectHolder> wrapper;
rv = nsContentUtils::WrapNative(jscontext, jselement,
static_cast<nsIXULTemplateBuilder*>(this),
&NS_GET_IID(nsIXULTemplateBuilder),
&jsbuilder, getter_AddRefs(wrapper));
jsbuilder.address(), getter_AddRefs(wrapper));
NS_ENSURE_SUCCESS(rv, rv);
bool ok;
ok = JS_SetProperty(jscontext, jselement, "builder", &jsbuilder);
ok = JS_SetProperty(jscontext, jselement, "builder", jsbuilder.address());
if (! ok)
return NS_ERROR_FAILURE;
}

Просмотреть файл

@ -202,6 +202,8 @@
#include "nsIAppShellService.h"
#include "nsAppShellCID.h"
#include "nsIAppsService.h"
static NS_DEFINE_CID(kDOMScriptObjectFactoryCID,
NS_DOM_SCRIPT_OBJECT_FACTORY_CID);
static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID);
@ -4595,8 +4597,10 @@ nsDocShell::Stop(uint32_t aStopFlags)
if (nsIWebNavigation::STOP_CONTENT & aStopFlags) {
// Stop the document loading
if (mContentViewer)
mContentViewer->Stop();
if (mContentViewer) {
nsCOMPtr<nsIContentViewer> cv = mContentViewer;
cv->Stop();
}
}
if (nsIWebNavigation::STOP_NETWORK & aStopFlags) {
@ -6436,6 +6440,30 @@ nsDocShell::OnRedirectStateChange(nsIChannel* aOldChannel,
if (!oldURI || !newURI) {
return;
}
// Check if we have a redirect registered for this url.
uint32_t appId;
nsresult rv = GetAppId(&appId);
if (NS_FAILED(rv)) {
return;
}
if (appId != nsIScriptSecurityManager::NO_APP_ID &&
appId != nsIScriptSecurityManager::UNKNOWN_APP_ID) {
nsCOMPtr<nsIAppsService> appsService =
do_GetService(APPS_SERVICE_CONTRACTID);
NS_ASSERTION(appsService, "No AppsService available");
nsCOMPtr<nsIURI> redirect;
rv = appsService->GetRedirect(appId, newURI, getter_AddRefs(redirect));
if (NS_SUCCEEDED(rv) && redirect) {
aNewChannel->Cancel(NS_BINDING_ABORTED);
rv = LoadURI(redirect, nullptr, 0, false);
if (NS_SUCCEEDED(rv)) {
return;
}
}
}
// On session restore we get a redirect from page to itself. Don't count it.
bool equals = false;
if (mTiming &&
@ -10499,6 +10527,7 @@ nsDocShell::AddToSessionHistory(nsIURI * aURI, nsIChannel * aChannel,
shContainer->GetChildAt(i, getter_AddRefs(child));
shContainer->RemoveChild(child);
} // for
entry->AbandonBFCacheEntry();
} // shContainer
}

Просмотреть файл

@ -11,12 +11,6 @@ relativesrcdir = @relativesrcdir@
include $(DEPTH)/config/autoconf.mk
DISABLED_XPCSHELL_TESTS = unit
# FIXME/bug 575918: out-of-process xpcshell is broken on OS X
ifneq ($(OS_ARCH),Darwin)
DISABLED_XPCSHELL_TESTS += unit_ipc
endif
MOCHITEST_FILES = \
test_bug123696.html \
bug123696-subframe.html \

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше