Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1005471 - Scratchpad "Jump to line" should preset input value based on current selection, handle LINE:COLUMN as well #27

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
062700e
Bug 1000513 - Combined navigation items in the context menu. r=Unfocu…
msujaws May 12, 2014
3d568c5
Bug 1009315 - Part 1: Sort TelemetryContract items. r=liuche
mcomella May 15, 2014
0f9122e
Bug 1009315 - Part 2: Refactor top sites probe names to be generic. r…
mcomella May 15, 2014
9aca6f8
Bug 1000513 - Tests for menugroup keyboard navigation. r=Unfocused
msujaws May 15, 2014
38bcbe4
Bug 993402 - [Linux] in-content prefs: remove the native treecol arro…
Paenglab May 23, 2014
65c6a34
Bug 993712 - Try to fix intermittent browser_984455_bookmarks_items_r…
mikeconley May 23, 2014
c0934cb
Merge m-c to fx-team
KWierso May 24, 2014
255e8d6
Bug 1000513 - Allow menuitems in menupopups to be children of a menug…
msujaws May 12, 2014
a2d8234
Bug 1014708 - Disable zoom for find in page. r=mfinkle
leibovic May 24, 2014
0315224
Bug 1014708 - Back out testFindInPage changes from bug 958111 and dis…
leibovic May 24, 2014
bb7b1a3
Bug 972723 - Fixed race condition and added a comment in this bug. r=…
gcaushik May 22, 2014
d8ca1d6
Bug 1010096 - Added logic to display addons alphabetical in about:add…
vikneshwar May 23, 2014
e92b57b
Bug 1015535 - Only consider text nodes and cdata sections as candidat…
felipc May 25, 2014
e6ebf8e
Bug 1013448 (part 1) - add telemetry probe for master-password usage.…
mhammond May 25, 2014
0947f43
Bug 1013448 (part 2) - add telemetry probes for sync. r=rnewman
mhammond May 25, 2014
e6fecd5
Bug 818587 - Adding a compression option for bookmark backups. r=mak
May 24, 2014
d874e66
Backed out changeset 0acc877be680 (bug 1013448)
BavarianTomcat May 26, 2014
f369098
Backed out changeset 1eb359cf7ac0 (bug 1013448) for xperf test failures
BavarianTomcat May 26, 2014
d02aeda
Bug 997921 - Restore pre-FF29 XUL textbox padding. r=roc
alexhenrie May 24, 2014
e595b83
No bug, Automated blocklist update from host bld-linux64-spot-041 - a…
May 24, 2014
04b8cbc
No bug, Automated HSTS preload list update from host bld-linux64-spot…
May 24, 2014
cd9c706
Address https://bugzilla.mozilla.org/show_bug.cgi?id=1005471#c9
anaran May 12, 2014
afd78eb
Bug 1005471 Add test coverage passing prior to feature implementation.
anaran May 14, 2014
e633ae7
Add test coverage for jumpToLine, including use cases for locating er…
anaran May 15, 2014
774586e
Remove todo_ prefixes from test functions.
anaran May 16, 2014
848bc10
Experimental window leak debug with potential fix.
anaran May 17, 2014
6f4a131
save experimental work.
anaran May 22, 2014
29029e7
Selectively update working tree with
anaran May 22, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions browser/app/blocklist.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1398899403000">
<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1400782040000">
<emItems>
<emItem blockID="i454" id="sqlmoz@facebook.com">
<versionRange minVersion="0" maxVersion="*" severity="3">
Expand Down Expand Up @@ -358,6 +358,12 @@
</versionRange>
<prefs>
</prefs>
</emItem>
<emItem blockID="i584" id="{52b0f3db-f988-4788-b9dc-861d016f4487}">
<versionRange minVersion="0" maxVersion="0.1.9999999" severity="1">
</versionRange>
<prefs>
</prefs>
</emItem>
<emItem blockID="i472" id="linksicle@linksicle.com">
<versionRange minVersion="0" maxVersion="*" severity="3">
Expand Down Expand Up @@ -1361,6 +1367,12 @@
</versionRange>
<prefs>
</prefs>
</emItem>
<emItem blockID="i564" id="/^(firefox@vebergreat\.net|EFGLQA@78ETGYN-0W7FN789T87\.COM)$/">
<versionRange minVersion="0" maxVersion="*" severity="1">
</versionRange>
<prefs>
</prefs>
</emItem>
<emItem blockID="i167" id="{b64982b1-d112-42b5-b1e4-d3867c4533f8}">
<versionRange minVersion="0" maxVersion="*" severity="1">
Expand Down Expand Up @@ -1404,7 +1416,7 @@
<prefs>
</prefs>
</emItem>
<emItem blockID="i564" id="/^(firefox@vebergreat\.net|EFGLQA@78ETGYN-0W7FN789T87\.COM|{52b0f3db-f988-4788-b9dc-861d016f4487})$/">
<emItem blockID="i224" id="{336D0C35-8A85-403a-B9D2-65C292C39087}">
<versionRange minVersion="0" maxVersion="*" severity="1">
</versionRange>
<prefs>
Expand Down Expand Up @@ -1536,7 +1548,7 @@
</prefs>
</emItem>
<emItem blockID="i580" id="{51c77233-c0ad-4220-8388-47c11c18b355}">
<versionRange minVersion="0" maxVersion="*" severity="1">
<versionRange minVersion="0" maxVersion="0.1.9999999" severity="1">
</versionRange>
<prefs>
</prefs>
Expand Down Expand Up @@ -1576,12 +1588,6 @@
</versionRange>
<prefs>
</prefs>
</emItem>
<emItem blockID="i224" id="{336D0C35-8A85-403a-B9D2-65C292C39087}">
<versionRange minVersion="0" maxVersion="*" severity="1">
</versionRange>
<prefs>
</prefs>
</emItem>
<emItem blockID="i452" id="{77beece6-3997-403a-92fa-0055bfcf88e5}">
<versionRange minVersion="0" maxVersion="*" severity="1">
Expand Down
55 changes: 31 additions & 24 deletions browser/base/content/browser-context.inc
Original file line number Diff line number Diff line change
Expand Up @@ -219,30 +219,37 @@
accesskey="&hidePluginCmd.accesskey;"
oncommand="gContextMenu.hidePlugin();"/>
<menuseparator id="context-sep-ctp"/>
<menuitem id="context-back"
label="&backCmd.label;"
accesskey="&backCmd.accesskey;"
command="Browser:BackOrBackDuplicate"
onclick="checkForMiddleClick(this, event);"/>
<menuitem id="context-forward"
label="&forwardCmd.label;"
accesskey="&forwardCmd.accesskey;"
command="Browser:ForwardOrForwardDuplicate"
onclick="checkForMiddleClick(this, event);"/>
<menuitem id="context-reload"
label="&reloadCmd.label;"
accesskey="&reloadCmd.accesskey;"
oncommand="gContextMenu.reload(event);"
onclick="checkForMiddleClick(this, event);"/>
<menuitem id="context-stop"
label="&stopCmd.label;"
accesskey="&stopCmd.accesskey;"
command="Browser:Stop"/>
<menuseparator id="context-sep-stop"/>
<menuitem id="context-bookmarkpage"
label="&bookmarkPageCmd2.label;"
accesskey="&bookmarkPageCmd2.accesskey;"
oncommand="gContextMenu.bookmarkThisPage();"/>
<menugroup id="context-navigation">
<menuitem id="context-back"
class="menuitem-iconic"
tooltiptext="&backButton.tooltip;"
aria-label="&backCmd.label;"
command="Browser:BackOrBackDuplicate"
onclick="checkForMiddleClick(this, event);"/>
<menuitem id="context-forward"
class="menuitem-iconic"
tooltiptext="&forwardButton.tooltip;"
aria-label="&forwardCmd.label;"
command="Browser:ForwardOrForwardDuplicate"
onclick="checkForMiddleClick(this, event);"/>
<menuitem id="context-reload"
class="menuitem-iconic"
tooltiptext="&reloadButton.tooltip;"
aria-label="&reloadCmd.label;"
oncommand="gContextMenu.reload(event);"
onclick="checkForMiddleClick(this, event);"/>
<menuitem id="context-stop"
class="menuitem-iconic"
tooltiptext="&stopButton.tooltip;"
aria-label="&stopCmd.label;"
command="Browser:Stop"/>
<menuitem id="context-bookmarkpage"
class="menuitem-iconic"
tooltiptext="&bookmarkPageCmd2.label;"
aria-label="&bookmarkPageCmd2.label;"
oncommand="gContextMenu.bookmarkThisPage();"/>
</menugroup>
<menuseparator id="context-sep-navigation"/>
<menuitem id="context-sharepage"
label="&sharePageCmd.label;"
accesskey="&sharePageCmd.accesskey;"
Expand Down
6 changes: 6 additions & 0 deletions browser/base/content/browser.css
Original file line number Diff line number Diff line change
Expand Up @@ -1133,3 +1133,9 @@ toolbarpaletteitem[place="palette"][hidden] {
animation-name: uitour-color;
animation-duration: 2s;
}

/* Combined context-menu items */
#context-navigation > .menuitem-iconic > .menu-iconic-text,
#context-navigation > .menuitem-iconic > .menu-accel-container {
display: none;
}
8 changes: 4 additions & 4 deletions browser/base/content/nsContextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ nsContextMenu.prototype = {
var shouldShow = !(this.isContentSelected || this.onLink || this.onImage ||
this.onCanvas || this.onVideo || this.onAudio ||
this.onTextInput || this.onSocial);
this.showItem("context-back", shouldShow);
this.showItem("context-forward", shouldShow);
this.showItem("context-navigation", shouldShow);
this.showItem("context-sep-navigation", shouldShow);

let stopped = XULBrowserWindow.stopCommand.getAttribute("disabled") == "true";

Expand All @@ -163,7 +163,6 @@ nsContextMenu.prototype = {

this.showItem("context-reload", stopReloadItem == "reload");
this.showItem("context-stop", stopReloadItem == "stop");
this.showItem("context-sep-stop", !!stopReloadItem);

// XXX: Stop is determined in browser.js; the canStop broadcaster is broken
//this.setItemAttrFromNode( "context-stop", "disabled", "canStop" );
Expand Down Expand Up @@ -270,7 +269,8 @@ nsContextMenu.prototype = {
// Use "Bookmark This Link" if on a link.
this.showItem("context-bookmarkpage",
!(this.isContentSelected || this.onTextInput || this.onLink ||
this.onImage || this.onVideo || this.onAudio || this.onSocial));
this.onImage || this.onVideo || this.onAudio || this.onSocial ||
this.onCanvas));
this.showItem("context-bookmarklink", (this.onLink && !this.onMailtoLink &&
!this.onSocial) || this.onPlainTextLink);
this.showItem("context-keywordfield",
Expand Down
3 changes: 3 additions & 0 deletions browser/base/content/test/general/browser_save_video.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ function test() {
EventUtils.synthesizeMouseAtCenter(video1,
{ type: "contextmenu", button: 2 },
gBrowser.contentWindow);
info("context menu click on video1");
});
});

function contextMenuOpened(event) {
event.currentTarget.removeEventListener("popupshown", contextMenuOpened);
info("context menu opened on video1");

// Create the folder the video will be saved into.
var destDir = createTemporarySaveDirectory();
Expand All @@ -56,6 +58,7 @@ function test() {
// Select "Save Video As" option from context menu
var saveVideoCommand = document.getElementById("context-savevideo");
saveVideoCommand.doCommand();
info("context-savevideo command executed");

event.target.hidePopup();
}
Expand Down
110 changes: 68 additions & 42 deletions browser/base/content/test/general/contextmenu_common.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,23 @@ function getVisibleMenuItems(aMenu, aData) {
}
items.push(item.id);
items.push(!item.disabled);
// Add a dummy item to that the indexes in checkMenu are the same
// Add a dummy item so that the indexes in checkMenu are the same
// for expectedItems and actualItems.
items.push([]);
items.push(null);
} else if (item.nodeName == "menugroup") {
ok(item.id, "child menugroup #" + i + " has an ID");
items.push(item.id);
items.push(!item.disabled);
var menugroupChildren = [];
for (var child of item.children) {
if (child.hidden)
continue;

menugroupChildren.push([child.id, !child.disabled]);
}
items.push(menugroupChildren);
items.push(null);
} else {
ok(false, "child #" + i + " of menu ID " + aMenu.id +
" has an unknown type (" + item.nodeName + ")");
Expand All @@ -114,6 +127,43 @@ function checkContextMenu(expectedItems) {
checkMenu(contextMenu, expectedItems, data);
}

function checkMenuItem(actualItem, actualEnabled, expectedItem, expectedEnabled, index) {
is(actualItem, expectedItem,
"checking item #" + index/2 + " (" + expectedItem + ") name");

if (typeof expectedEnabled == "object" && expectedEnabled != null ||
typeof actualEnabled == "object" && actualEnabled != null) {

ok(!(actualEnabled == null), "actualEnabled is not null");
ok(!(expectedEnabled == null), "expectedEnabled is not null");
is(typeof actualEnabled, typeof expectedEnabled, "checking types");

if (typeof actualEnabled != typeof expectedEnabled ||
actualEnabled == null || expectedEnabled == null)
return;

is(actualEnabled.type, expectedEnabled.type,
"checking item #" + index/2 + " (" + expectedItem + ") type attr value");
var icon = actualEnabled.icon;
if (icon) {
var tmp = "";
var j = icon.length - 1;
while (j && icon[j] != "/") {
tmp = icon[j--] + tmp;
}
icon = tmp;
}
is(icon, expectedEnabled.icon,
"checking item #" + index/2 + " (" + expectedItem + ") icon attr value");
is(actualEnabled.checked, expectedEnabled.checked,
"checking item #" + index/2 + " (" + expectedItem + ") has checked attr");
is(actualEnabled.disabled, expectedEnabled.disabled,
"checking item #" + index/2 + " (" + expectedItem + ") has disabled attr");
} else if (expectedEnabled != null)
is(actualEnabled, expectedEnabled,
"checking item #" + index/2 + " (" + expectedItem + ") enabled state");
}

/*
* checkMenu - checks to see if the specified <menupopup> contains the
* expected items and state.
Expand All @@ -136,50 +186,26 @@ function checkMenu(menu, expectedItems, data) {
var expectedItem = expectedItems[i];
var expectedEnabled = expectedItems[i + 1];
if (expectedItem instanceof Array) {
ok(true, "Checking submenu...");
var menuID = expectedItems[i - 2]; // The last item was the menu ID.
var submenu = menu.getElementsByAttribute("id", menuID)[0];
ok(submenu, "got a submenu element of id='" + menuID + "'");
if (submenu) {
is(submenu.nodeName, "menu", "submenu element of id='" + menuID +
ok(true, "Checking submenu/menugroup...");
var previousId = expectedItems[i - 2]; // The last item was the menu ID.
var previousItem = menu.getElementsByAttribute("id", previousId)[0];
ok(previousItem, (previousItem ? previousItem.nodeName : "item") + " with previous id (" + previousId + ") found");
if (previousItem && previousItem.nodeName == "menu") {
ok(previousItem, "got a submenu element of id='" + previousId + "'");
is(previousItem.nodeName, "menu", "submenu element of id='" + previousId +
"' has expected nodeName");
checkMenu(submenu.menupopup, expectedItem, data);
checkMenu(previousItem.menupopup, expectedItem, data, i);
} else if (previousItem && previousItem.nodeName == "menugroup") {
ok(expectedItem.length, "menugroup must not be empty");
for (var j = 0; j < expectedItem.length / 2; j++) {
checkMenuItem(actualItems[i][j][0], actualItems[i][j][1], expectedItem[j*2], expectedItem[j*2+1], i+j*2);
}
i += j;
} else {
ok(false, "previous item is not a menu or menugroup");
}
} else {
is(actualItem, expectedItem,
"checking item #" + i/2 + " (" + expectedItem + ") name");

if (typeof expectedEnabled == "object" && expectedEnabled != null ||
typeof actualEnabled == "object" && actualEnabled != null) {

ok(!(actualEnabled == null), "actualEnabled is not null");
ok(!(expectedEnabled == null), "expectedEnabled is not null");
is(typeof actualEnabled, typeof expectedEnabled, "checking types");

if (typeof actualEnabled != typeof expectedEnabled ||
actualEnabled == null || expectedEnabled == null)
continue;

is(actualEnabled.type, expectedEnabled.type,
"checking item #" + i/2 + " (" + expectedItem + ") type attr value");
var icon = actualEnabled.icon;
if (icon) {
var tmp = "";
var j = icon.length - 1;
while (j && icon[j] != "/") {
tmp = icon[j--] + tmp;
}
icon = tmp;
}
is(icon, expectedEnabled.icon,
"checking item #" + i/2 + " (" + expectedItem + ") icon attr value");
is(actualEnabled.checked, expectedEnabled.checked,
"checking item #" + i/2 + " (" + expectedItem + ") has checked attr");
is(actualEnabled.disabled, expectedEnabled.disabled,
"checking item #" + i/2 + " (" + expectedItem + ") has disabled attr");
} else if (expectedEnabled != null)
is(actualEnabled, expectedEnabled,
"checking item #" + i/2 + " (" + expectedItem + ") enabled state");
checkMenuItem(actualItem, actualEnabled, expectedItem, expectedEnabled, i);
}
}
// Could find unexpected extra items at the end...
Expand Down
Loading