Merge fx-team to m-c.

This commit is contained in:
Ryan VanderMeulen 2013-12-17 16:10:10 -05:00
commit 8f78df13ef
11 changed files with 67 additions and 64 deletions

View File

@ -1065,13 +1065,13 @@ let RemoteDebugger = {
if ("nsIProfiler" in Ci) {
DebuggerServer.addActors("resource://gre/modules/devtools/server/actors/profiler.js");
}
DebuggerServer.addActors("resource://gre/modules/devtools/server/actors/styleeditor.js");
DebuggerServer.registerModule("devtools/server/actors/inspector")
DebuggerServer.registerModule("devtools/server/actors/styleeditor");
DebuggerServer.enableWebappsContentActor = true;
}
DebuggerServer.addActors('chrome://browser/content/dbg-browser-actors.js');
DebuggerServer.addActors("resource://gre/modules/devtools/server/actors/webapps.js");
DebuggerServer.registerModule("devtools/server/actors/device");
DebuggerServer.registerModule("devtools/server/actors/inspector")
#ifdef MOZ_WIDGET_GONK
DebuggerServer.onConnectionChange = function(what) {

View File

@ -95,7 +95,6 @@ let UI = {
let newSelection = document.querySelector("." + panel + "-" + type);
if (oldSelection) oldSelection.removeAttribute("selected");
if (newSelection) {
newSelection.scrollIntoView(false);
newSelection.setAttribute("selected", "true");
if (newSelection.classList.contains("toolbox")) {
isToolboxTab = true;

View File

@ -26,6 +26,10 @@ h1 {
border-bottom: 1px solid rgba(0,0,0,0.1);
}
form {
display: inline-block;
}
label {
display: block;
margin: 10px;
@ -39,7 +43,7 @@ label > span {
}
#submit {
margin-left: 160px;
float: right;
}
input:invalid {

View File

@ -12,7 +12,7 @@
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<head>
<title>&title;</title>
<link rel="stylesheet" href="chrome://browser/skin/devtools/common.css" type="text/css"/>
<link rel="stylesheet" href="chrome://browser/skin/devtools/dark-theme.css" type="text/css"/>
<link rel="stylesheet" href="chrome://browser/content/devtools/connect.css" type="text/css"/>
<script type="application/javascript;version=1.8" src="connect.js"></script>
</head>

View File

@ -11,6 +11,11 @@
color: #8fa1b2;
}
::-moz-selection {
background-color: #1d4f73;
color: #f5f7fa;
}
.theme-twisty {
cursor: pointer;
width: 14px;

View File

@ -11,6 +11,11 @@
color: black;
}
::-moz-selection {
background-color: #4c9ed9;
color: #f5f7fa;
}
.theme-twisty {
cursor: pointer;
width: 14px;

View File

@ -132,50 +132,38 @@
.devtools-searchinput {
-moz-appearance: none;
margin: 0 3px;
min-height: 22px;
border: 1px solid hsla(210,8%,5%,.6);
border: 1px solid rgb(88, 94, 101);
%ifdef XP_MACOSX
border-radius: 20px;
%else
border-radius: 2px;
%endif
background-color: transparent;
background-image: linear-gradient(hsla(210,16%,76%,.15), hsla(210,16%,76%,.35));
padding: 3px;
box-shadow: 0 1px 1px hsla(210,8%,5%,.3) inset,
0 0 0 1px hsla(210,16%,76%,.1) inset,
0 1px 0 hsla(210,16%,76%,.15);
color: inherit;
background-color: rgba(24, 29, 32, 1);
padding: 4px 6px;
color: rgba(184, 200, 217, 1);
}
.devtools-searchinput {
padding-top: 0;
padding-bottom: 0;
-moz-padding-start: 18px;
padding-top: 3px;
padding-bottom: 3px;
-moz-padding-start: 22px;
-moz-padding-end: 12px;
background-image: url(magnifying-glass.png), linear-gradient(hsla(210,16%,76%,.15), hsla(210,16%,76%,.35));
background-position: 4px center, top left, top left;
background-image: url(magnifying-glass.png);
background-position: 8px center;
background-repeat: no-repeat;
font-size: inherit;
}
.devtools-searchinput:-moz-locale-dir(rtl) {
background-position: calc(100% - 4px) center, top left, top left;
background-position: calc(100% - 8px) center;
}
.devtools-searchinput > .textbox-input-box > .textbox-search-icons {
display: none;
}
.devtools-searchinput > .textbox-input-box > .textbox-input::-moz-placeholder {
color: hsl(208,10%,66%);
opacity: 1.0;
}
.devtools-no-search-result {
box-shadow: inset 0 0 0 1px hsla(0,68%,6%,.35);
border-color: hsl(10,70%,40%) hsl(10,75%,37%) hsl(10,80%,35%) !important;
background-image: url(magnifying-glass.png), linear-gradient(hsla(1,16%,76%,.45), hsla(1,16%,76%,.75));
border-color: #eb5368 !important;
}
/* Close button */
@ -549,21 +537,24 @@
#toolbox-tabs .devtools-tab[selected=true] {
color: #f5f7fa;
background-color: #1a4666;
border-width: 0;
box-shadow: 0 2px 0 #d7f1ff inset,
0 8px 3px -5px #2b82bf inset,
0 -2px 0 rgba(0,0,0,.2) inset;
}
.devtools-tab[selected=true]:not(:first-child) {
.devtools-tab[selected=true]:not(:first-child),
.devtools-tab.highlighted:not(:first-child) {
border-width: 0;
-moz-padding-start: 1px;
}
.devtools-tab[selected=true]:last-child {
.devtools-tab[selected=true]:last-child,
.devtools-tab.highlighted:last-child {
-moz-padding-end: 1px;
}
.devtools-tab[selected=true] + .devtools-tab {
.devtools-tab[selected=true] + .devtools-tab,
.devtools-tab.highlighted + .devtools-tab {
-moz-border-start-width: 0;
-moz-padding-start: 1px;
}

View File

@ -119,9 +119,12 @@ class ActionModeCompatView extends LinearLayout implements GeckoMenu.ActionItemB
maxWidth = mActionButtonBar.getMeasuredWidth();
}
// Since we don't know how many items will be added, we always reserve space for the overflow menu
mMenuButton.measure(SPEC, SPEC);
maxWidth -= mMenuButton.getMeasuredWidth();
// If the menu button is already visible, no need to account for it
if (mMenuButton.getVisibility() == View.GONE) {
// Since we don't know how many items will be added, we always reserve space for the overflow menu
mMenuButton.measure(SPEC, SPEC);
maxWidth -= mMenuButton.getMeasuredWidth();
}
if (mActionButtonsWidth <= 0) {
mActionButtonsWidth = 0;
@ -142,12 +145,14 @@ class ActionModeCompatView extends LinearLayout implements GeckoMenu.ActionItemB
mActionButtonBar.addView(actionItem);
return true;
}
return false;
}
/* GeckoMenu.ActionItemBarPresenter */
@Override
public void removeActionItem(View actionItem) {
actionItem.measure(SPEC, SPEC);
mActionButtonsWidth -= actionItem.getMeasuredWidth();
mActionButtonBar.removeView(actionItem);
}

View File

@ -171,11 +171,12 @@ public class GeckoMenu extends ListView
}
});
mActionItems.put(menuItem, actionView);
mActionItemBarPresenter.addActionItem(actionView);
mItems.add(menuItem);
return true;
if (mActionItemBarPresenter.addActionItem(actionView)) {
mActionItems.put(menuItem, actionView);
mItems.add(menuItem);
return true;
}
return false;
}
@Override

View File

@ -10,18 +10,6 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/Prompt.jsm");
// Whitelist of methods we remote - to check against malicious data.
// For example, it would be dangerous to allow content to show auth prompts.
const REMOTABLE_METHODS = {
alert: { outParams: [] },
alertCheck: { outParams: [4] },
confirm: { outParams: [] },
prompt: { outParams: [3, 5] },
confirmEx: { outParams: [8] },
confirmCheck: { outParams: [4] },
select: { outParams: [5] }
};
var gPromptService = null;
function PromptService() {
@ -134,18 +122,21 @@ InternalPrompt.prototype = {
PromptUtils.getLocaleString("Cancel")
]
});
return p;
},
addCheckbox: function addCheckbox(aPrompt, aCheckMsg, aCheckState) {
// Don't bother to check for aCheckSate. For nsIPomptService interfaces, aCheckState is an
// out param and is required to be defined. If we've gotten here without it, something
// has probably gone wrong and we should fail
if (aCheckMsg) {
p.addCheckbox({
aPrompt.addCheckbox({
label: PromptUtils.cleanUpLabel(aCheckMsg),
checked: aCheckState.value
});
}
return p;
return aPrompt;
},
/* Shows a native prompt, and then spins the event loop for this thread while we wait
@ -223,7 +214,8 @@ InternalPrompt.prototype = {
},
alertCheck: function alertCheck(aTitle, aText, aCheckMsg, aCheckState) {
let p = this._getPrompt(aTitle, aText, [ PromptUtils.getLocaleString("OK") ], aCheckMsg, aCheckState);
let p = this._getPrompt(aTitle, aText, [ PromptUtils.getLocaleString("OK") ]);
this.addCheckbox(p, aCheckMsg, aCheckState);
let data = this.showPrompt(p);
if (aCheckState && data.button > -1)
aCheckState.value = data.checkbox0 == "true";
@ -237,7 +229,8 @@ InternalPrompt.prototype = {
},
confirmCheck: function confirmCheck(aTitle, aText, aCheckMsg, aCheckState) {
let p = this._getPrompt(aTitle, aText, null, aCheckMsg, aCheckState);
let p = this._getPrompt(aTitle, aText, null);
this.addCheckbox(p, aCheckMsg, aCheckState);
let data = this.showPrompt(p);
let ok = data.button == 0;
if (aCheckState && data.button > -1)
@ -284,7 +277,8 @@ InternalPrompt.prototype = {
aButtonFlags >>= 8;
}
let p = this._getPrompt(aTitle, aText, buttons, aCheckMsg, aCheckState);
let p = this._getPrompt(aTitle, aText, buttons);
this.addCheckbox(p, aCheckMsg, aCheckState);
let data = this.showPrompt(p);
if (aCheckState && data.button > -1)
aCheckState.value = data.checkbox0 == "true";
@ -298,6 +292,7 @@ InternalPrompt.prototype = {
value: aValue.value,
autofocus: true
});
this.addCheckbox(p, aCheckMsg, aCheckState);
let data = this.showPrompt(p);
let ok = data.button == 0;
@ -310,12 +305,13 @@ InternalPrompt.prototype = {
nsIPrompt_promptPassword: function nsIPrompt_promptPassword(
aTitle, aText, aPassword, aCheckMsg, aCheckState) {
let p = this._getPrompt(aTitle, aText, null, aCheckMsg, aCheckState);
let p = this._getPrompt(aTitle, aText, null);
p.addPassword({
value: aPassword.value || "",
autofocus: true,
hint: PromptUtils.getLocaleString("password", "passwdmgr")
});
this.addCheckbox(p, aCheckMsg, aCheckState);
let data = this.showPrompt(p);
let ok = data.button == 0;
@ -328,7 +324,7 @@ InternalPrompt.prototype = {
nsIPrompt_promptUsernameAndPassword: function nsIPrompt_promptUsernameAndPassword(
aTitle, aText, aUsername, aPassword, aCheckMsg, aCheckState) {
let p = this._getPrompt(aTitle, aText, null, aCheckMsg, aCheckState);
let p = this._getPrompt(aTitle, aText, null);
p.addTextbox({
value: aUsername.value,
autofocus: true,
@ -337,6 +333,7 @@ InternalPrompt.prototype = {
value: aPassword.value,
hint: PromptUtils.getLocaleString("password", "passwdmgr")
});
this.addCheckbox(p, aCheckMsg, aCheckState);
let data = this.showPrompt(p);
let ok = data.button == 0;
@ -350,7 +347,7 @@ InternalPrompt.prototype = {
},
select: function select(aTitle, aText, aCount, aSelectList, aOutSelection) {
let p = this._getPrompt(aTitle, aText, [ PromptUtils.getLocaleString("OK") ], "", { value: false });
let p = this._getPrompt(aTitle, aText, [ PromptUtils.getLocaleString("OK") ]);
p.addMenulist({ values: aSelectList });
let data = this.showPrompt(p);

View File

@ -356,10 +356,6 @@ body {
background-repeat: no-repeat;
}
.button:active {
background-color: #ff9500;
}
.dropdown {
text-align: center;
display: inline-block;