Merge m-c to m-i

This commit is contained in:
Phil Ringnalda 2014-01-20 18:46:36 -08:00
commit 27963a40d2
35 changed files with 454 additions and 198 deletions

View File

@ -12,7 +12,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="fd157cf37c851fdbd97075f414ea07e8e8f28b52"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e218d17ae7d01a81d48f833cd6fafb4e11b26cd8"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="eda08beb3ba9a159843c70ffde0f9660ec351eb9"/>

View File

@ -11,7 +11,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="fd157cf37c851fdbd97075f414ea07e8e8f28b52"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e218d17ae7d01a81d48f833cd6fafb4e11b26cd8"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="96d2d00165f4561fbde62d1062706eab74b3a01f"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="221bcaecbbbc9d185f691471b64aed9e75b0c11d"/>

View File

@ -12,7 +12,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="fd157cf37c851fdbd97075f414ea07e8e8f28b52"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e218d17ae7d01a81d48f833cd6fafb4e11b26cd8"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="eda08beb3ba9a159843c70ffde0f9660ec351eb9"/>

View File

@ -1,4 +1,4 @@
{
"revision": "d7643b0dfd7a670658780952587f95e20b251fc3",
"revision": "6946a71605af13e0284fb6f5bbe38aa4c05155d7",
"repo_path": "/integration/gaia-central"
}

View File

@ -11,7 +11,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="fd157cf37c851fdbd97075f414ea07e8e8f28b52"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e218d17ae7d01a81d48f833cd6fafb4e11b26cd8"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>

View File

@ -10,7 +10,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="fd157cf37c851fdbd97075f414ea07e8e8f28b52"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e218d17ae7d01a81d48f833cd6fafb4e11b26cd8"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>

View File

@ -12,7 +12,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="fd157cf37c851fdbd97075f414ea07e8e8f28b52"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e218d17ae7d01a81d48f833cd6fafb4e11b26cd8"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>

View File

@ -11,7 +11,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="fd157cf37c851fdbd97075f414ea07e8e8f28b52"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e218d17ae7d01a81d48f833cd6fafb4e11b26cd8"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>

View File

@ -11,7 +11,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="fd157cf37c851fdbd97075f414ea07e8e8f28b52"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e218d17ae7d01a81d48f833cd6fafb4e11b26cd8"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="96d2d00165f4561fbde62d1062706eab74b3a01f"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="221bcaecbbbc9d185f691471b64aed9e75b0c11d"/>

View File

@ -11,7 +11,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="fd157cf37c851fdbd97075f414ea07e8e8f28b52"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e218d17ae7d01a81d48f833cd6fafb4e11b26cd8"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>

View File

@ -36,21 +36,31 @@ function startTests() {
Task.spawn(function() {
yield prepareHighlighter();
// Highlighter should be shown on this element
yield hoverElement("#id1");
assertHighlighterShownOn("#id1");
// But not over a comment
yield hoverComment();
assertHighlighterHidden();
// It should be shown again when coming back to the same element tough
yield hoverElement("#id1");
assertHighlighterShownOn("#id1");
// Shown here too
yield hoverElement("#id2");
assertHighlighterShownOn("#id2");
// But not over a script tag
yield hoverElement("script");
assertHighlighterHidden();
// Shown here
yield hoverElement("#id3");
assertHighlighterShownOn("#id3");
// But not over a hidden element
yield hoverElement("#id4");
assertHighlighterHidden();
}).then(null, Cu.reportError).then(finishTest);

View File

@ -7,8 +7,7 @@
let inspector, h1;
function createDocument()
{
function createDocument() {
let doc = content.document;
let div = doc.createElement("div");
h1 = doc.createElement("h1");
@ -42,43 +41,28 @@ function createDocument()
setupHighlighterTests();
}
function setupHighlighterTests()
{
function setupHighlighterTests() {
ok(h1, "we have the header node");
openInspector(runSelectionTests);
}
function runSelectionTests(aInspector)
{
function runSelectionTests(aInspector) {
inspector = aInspector;
inspector.toolbox.startPicker();
inspector.toolbox.once("picker-started", () => {
EventUtils.synthesizeMouse(h1, 2, 2, {type: "mousemove"}, content);
inspector.toolbox.once("picker-node-hovered", () => {
executeSoon(performTestComparisons);
info("Picker mode started, now clicking on H1 to select that node");
executeSoon(() => {
EventUtils.synthesizeMouseAtCenter(h1, {}, content);
inspector.toolbox.once("picker-stopped", () => {
info("Picker mode stopped, H1 selected, now switching to the console");
openConsole(gBrowser.selectedTab).then(performWebConsoleTests);
});
});
});
}
function getHighlighterOutline()
{
return gBrowser.selectedBrowser.parentNode
.querySelector(".highlighter-container .highlighter-outline");
}
function performTestComparisons()
{
let outline = getHighlighterOutline();
ok(outline && !outline.hasAttribute("hidden"), "inspector is highlighting");
EventUtils.synthesizeMouseAtCenter(h1, {}, content);
inspector.toolbox.once("picker-stopped", () => {
openConsole(gBrowser.selectedTab, performWebConsoleTests);
});
}
function performWebConsoleTests(hud)
{
function performWebConsoleTests(hud) {
let target = TargetFactory.forTab(gBrowser.selectedTab);
let jsterm = hud.jsterm;
outputNode = hud.outputNode;
@ -86,16 +70,14 @@ function performWebConsoleTests(hud)
jsterm.clearOutput();
jsterm.execute("$0", onNodeOutput);
function onNodeOutput(node)
{
function onNodeOutput(node) {
isnot(node.textContent.indexOf("<h1>"), -1, "correct output for $0");
jsterm.clearOutput();
jsterm.execute("$0.textContent = 'bug653531'", onNodeUpdate);
}
function onNodeUpdate(node)
{
function onNodeUpdate(node) {
isnot(node.textContent.indexOf("bug653531"), -1,
"correct output for $0.textContent");
is(inspector.selection.node.textContent, "bug653531",
@ -107,8 +89,7 @@ function performWebConsoleTests(hud)
}
}
function test()
{
function test() {
waitForExplicitFinish();
gBrowser.selectedTab = gBrowser.addTab();

View File

@ -132,6 +132,14 @@ XPCOMUtils.defineLazyGetter(this, "ALL_BUILTIN_ITEMS", function() {
const OTHER_MOUSEUP_MONITORED_ITEMS = [
"PlacesChevron",
"PlacesToolbarItems",
"menubar-items",
];
// Items that open arrow panels will often be overlapped by
// the panel that they're opening by the time the mouseup
// event is fired, so for these items, we monitor mousedown.
const MOUSEDOWN_MONITORED_ITEMS = [
"PanelUI-menu-button",
];
// Weakly maps browser windows to objects whose keys are relative
@ -260,6 +268,13 @@ this.BrowserUITelemetry = {
}
}
for (let itemID of MOUSEDOWN_MONITORED_ITEMS) {
let item = document.getElementById(itemID);
if (item) {
item.addEventListener("mousedown", this);
}
}
WINDOW_DURATION_MAP.set(aWindow, {});
},
@ -280,6 +295,13 @@ this.BrowserUITelemetry = {
item.removeEventListener("mouseup", this);
}
}
for (let itemID of MOUSEDOWN_MONITORED_ITEMS) {
let item = document.getElementById(itemID);
if (item) {
item.removeEventListener("mousedown", this);
}
}
},
handleEvent: function(aEvent) {
@ -290,6 +312,9 @@ this.BrowserUITelemetry = {
case "mouseup":
this._handleMouseUp(aEvent);
break;
case "mousedown":
this._handleMouseDown(aEvent);
break;
}
},
@ -303,11 +328,24 @@ this.BrowserUITelemetry = {
case "PlacesChevron":
this._PlacesChevronMouseUp(aEvent);
break;
case "menubar-items":
this._menubarMouseUp(aEvent);
break;
default:
this._checkForBuiltinItem(aEvent);
}
},
_handleMouseDown: function(aEvent) {
if (aEvent.currentTarget.id == "PanelUI-menu-button") {
// _countMouseUpEvent expects a detail for the second argument,
// but we don't really have any details to give. Just passing in
// "button" is probably simpler than trying to modify
// _countMouseUpEvent for this particular case.
this._countMouseUpEvent("click-menu-button", "button", aEvent.button);
}
},
_PlacesChevronMouseUp: function(aEvent) {
let target = aEvent.originalTarget;
let result = target.id == "PlacesChevron" ? "chevron" : "overflowed-item";
@ -325,6 +363,13 @@ this.BrowserUITelemetry = {
this._countMouseUpEvent("click-bookmarks-bar", result, aEvent.button);
},
_menubarMouseUp: function(aEvent) {
let target = aEvent.originalTarget;
let tag = target.localName
let result = (tag == "menu" || tag == "menuitem") ? tag : "other";
this._countMouseUpEvent("click-menubar", result, aEvent.button);
},
_bookmarksMenuButtonMouseUp: function(aEvent) {
let bookmarksWidget = CustomizableUI.getWidget("bookmarks-menu-button");
if (bookmarksWidget.areaType == CustomizableUI.TYPE_MENU_PANEL) {
@ -391,6 +436,13 @@ this.BrowserUITelemetry = {
let bookmarksBar = document.getElementById("PersonalToolbar");
result.bookmarksBarEnabled = bookmarksBar && !bookmarksBar.collapsed;
// Determine if the menubar is currently visible. On OS X, the menubar
// is never shown, despite not having the collapsed attribute set.
let menuBar = document.getElementById("toolbar-menubar");
result.menuBarEnabled =
menuBar && Services.appinfo.OS != "Darwin"
&& menuBar.getAttribute("autohide") != "true";
// Examine all customizable areas and see what default items
// are present and missing.
let defaultKept = [];

View File

@ -284,6 +284,7 @@ nsFrameLoader::nsFrameLoader(Element* aOwner, bool aNetworkCreated)
, mChildID(0)
, mRenderMode(RENDER_MODE_DEFAULT)
, mEventMode(EVENT_MODE_NORMAL_DISPATCH)
, mPendingFrameSent(false)
{
ResetPermissionManagerStatus();
}
@ -458,8 +459,17 @@ nsFrameLoader::ReallyStartLoadingInternal()
if (mRemoteFrame) {
if (!mRemoteBrowser) {
if (!mPendingFrameSent) {
nsCOMPtr<nsIObserverService> os = services::GetObserverService();
if (OwnerIsBrowserOrAppFrame() && os && !mRemoteBrowserInitialized) {
os->NotifyObservers(NS_ISUPPORTS_CAST(nsIFrameLoader*, this),
"remote-browser-frame-pending", nullptr);
mPendingFrameSent = true;
}
}
if (Preferences::GetBool("dom.ipc.processPrelaunch.enabled", false) &&
!ContentParent::PreallocatedProcessReady()) {
ContentParent::RunAfterPreallocatedProcessReady(
new DelayedStartLoadingRunnable(this));
return NS_ERROR_FAILURE;
@ -983,6 +993,11 @@ nsFrameLoader::ShowRemoteFrame(const nsIntSize& size,
nsCOMPtr<nsIObserverService> os = services::GetObserverService();
if (OwnerIsBrowserOrAppFrame() && os && !mRemoteBrowserInitialized) {
if (!mPendingFrameSent) {
os->NotifyObservers(NS_ISUPPORTS_CAST(nsIFrameLoader*, this),
"remote-browser-frame-pending", nullptr);
mPendingFrameSent = true;
}
os->NotifyObservers(NS_ISUPPORTS_CAST(nsIFrameLoader*, this),
"remote-browser-frame-shown", nullptr);
mRemoteBrowserInitialized = true;

View File

@ -459,6 +459,9 @@ private:
// See nsIFrameLoader.idl. EVENT_MODE_NORMAL_DISPATCH automatically
// forwards some input events to out-of-process content.
uint32_t mEventMode;
// Indicate if we have sent 'remote-browser-frame-pending'.
bool mPendingFrameSent;
};
#endif

View File

@ -65,7 +65,7 @@ BrowserElementParentFactory.prototype = {
// alive for as long as its frame element lives.
this._bepMap = new WeakMap();
Services.obs.addObserver(this, 'remote-browser-frame-shown', /* ownsWeak = */ true);
Services.obs.addObserver(this, 'remote-browser-frame-pending', /* ownsWeak = */ true);
Services.obs.addObserver(this, 'in-process-browser-or-app-frame-shown', /* ownsWeak = */ true);
},
@ -80,17 +80,22 @@ BrowserElementParentFactory.prototype = {
_observeInProcessBrowserFrameShown: function(frameLoader) {
debug("In-process browser frame shown " + frameLoader);
this._createBrowserElementParent(frameLoader, /* hasRemoteFrame = */ false);
this._createBrowserElementParent(frameLoader,
/* hasRemoteFrame = */ false,
/* pending frame */ false);
},
_observeRemoteBrowserFrameShown: function(frameLoader) {
_observeRemoteBrowserFramePending: function(frameLoader) {
debug("Remote browser frame shown " + frameLoader);
this._createBrowserElementParent(frameLoader, /* hasRemoteFrame = */ true);
this._createBrowserElementParent(frameLoader,
/* hasRemoteFrame = */ true,
/* pending frame */ true);
},
_createBrowserElementParent: function(frameLoader, hasRemoteFrame) {
_createBrowserElementParent: function(frameLoader, hasRemoteFrame, isPendingFrame) {
let frameElement = frameLoader.QueryInterface(Ci.nsIFrameLoader).ownerElement;
this._bepMap.set(frameElement, BrowserElementParentBuilder.create(frameLoader, hasRemoteFrame));
this._bepMap.set(frameElement, BrowserElementParentBuilder.create(
frameLoader, hasRemoteFrame, isPendingFrame));
},
observe: function(subject, topic, data) {
@ -103,8 +108,8 @@ BrowserElementParentFactory.prototype = {
this._init();
}
break;
case 'remote-browser-frame-shown':
this._observeRemoteBrowserFrameShown(subject);
case 'remote-browser-frame-pending':
this._observeRemoteBrowserFramePending(subject);
break;
case 'in-process-browser-or-app-frame-shown':
this._observeInProcessBrowserFrameShown(subject);

View File

@ -87,7 +87,7 @@ function visibilityChangeHandler(e) {
}
this.BrowserElementParentBuilder = {
create: function create(frameLoader, hasRemoteFrame) {
create: function create(frameLoader, hasRemoteFrame, isPendingFrame) {
return new BrowserElementParent(frameLoader, hasRemoteFrame);
}
}
@ -96,7 +96,7 @@ this.BrowserElementParentBuilder = {
// The active input method iframe.
let activeInputFrame = null;
function BrowserElementParent(frameLoader, hasRemoteFrame) {
function BrowserElementParent(frameLoader, hasRemoteFrame, isPendingFrame) {
debug("Creating new BrowserElementParent object for " + frameLoader);
this._domRequestCounter = 0;
this._pendingDOMRequests = {};
@ -105,56 +105,12 @@ function BrowserElementParent(frameLoader, hasRemoteFrame) {
this._frameLoader = frameLoader;
this._frameElement = frameLoader.QueryInterface(Ci.nsIFrameLoader).ownerElement;
let self = this;
if (!this._frameElement) {
debug("No frame element?");
return;
}
this._mm = frameLoader.messageManager;
let self = this;
// Messages we receive are handed to functions which take a (data) argument,
// where |data| is the message manager's data object.
// We use a single message and dispatch to various function based
// on data.msg_name
let mmCalls = {
"hello": this._recvHello,
"contextmenu": this._fireCtxMenuEvent,
"locationchange": this._fireEventFromMsg,
"loadstart": this._fireEventFromMsg,
"loadend": this._fireEventFromMsg,
"titlechange": this._fireEventFromMsg,
"iconchange": this._fireEventFromMsg,
"close": this._fireEventFromMsg,
"resize": this._fireEventFromMsg,
"activitydone": this._fireEventFromMsg,
"opensearch": this._fireEventFromMsg,
"securitychange": this._fireEventFromMsg,
"error": this._fireEventFromMsg,
"scroll": this._fireEventFromMsg,
"firstpaint": this._fireEventFromMsg,
"documentfirstpaint": this._fireEventFromMsg,
"nextpaint": this._recvNextPaint,
"keyevent": this._fireKeyEvent,
"showmodalprompt": this._handleShowModalPrompt,
"got-purge-history": this._gotDOMRequestResult,
"got-screenshot": this._gotDOMRequestResult,
"got-can-go-back": this._gotDOMRequestResult,
"got-can-go-forward": this._gotDOMRequestResult,
"fullscreen-origin-change": this._remoteFullscreenOriginChange,
"rollback-fullscreen": this._remoteFrameFullscreenReverted,
"exit-fullscreen": this._exitFullscreen,
"got-visible": this._gotDOMRequestResult,
"visibilitychange": this._childVisibilityChange,
"got-set-input-method-active": this._gotDOMRequestResult
}
this._mm.addMessageListener('browser-element-api:call', function(aMsg) {
if (self._isAlive() && (aMsg.data.msg_name in mmCalls)) {
return mmCalls[aMsg.data.msg_name].apply(self, arguments);
}
});
Services.obs.addObserver(this, 'ask-children-to-exit-fullscreen', /* ownsWeak = */ true);
Services.obs.addObserver(this, 'oop-frameloader-crashed', /* ownsWeak = */ true);
@ -166,8 +122,26 @@ function BrowserElementParent(frameLoader, hasRemoteFrame) {
};
}
let defineNoReturnMethod = function(name, fn) {
XPCNativeWrapper.unwrap(self._frameElement)[name] = function method() {
if (!self._mm) {
// Remote browser haven't been created, we just queue the API call.
let args = Array.slice(arguments);
args.unshift(self);
self._pendingAPICalls.push(method.bind.apply(fn, args));
return;
}
if (self._isAlive()) {
fn.apply(self, arguments);
}
};
};
let defineDOMRequestMethod = function(domName, msgName) {
XPCNativeWrapper.unwrap(self._frameElement)[domName] = function() {
if (!self._mm) {
return self._queueDOMRequest;
}
if (self._isAlive()) {
return self._sendDOMRequest(msgName);
}
@ -175,19 +149,19 @@ function BrowserElementParent(frameLoader, hasRemoteFrame) {
}
// Define methods on the frame element.
defineMethod('setVisible', this._setVisible);
defineNoReturnMethod('setVisible', this._setVisible);
defineDOMRequestMethod('getVisible', 'get-visible');
defineMethod('sendMouseEvent', this._sendMouseEvent);
defineNoReturnMethod('sendMouseEvent', this._sendMouseEvent);
// 0 = disabled, 1 = enabled, 2 - auto detect
if (getIntPref(TOUCH_EVENTS_ENABLED_PREF, 0) != 0) {
defineMethod('sendTouchEvent', this._sendTouchEvent);
defineNoReturnMethod('sendTouchEvent', this._sendTouchEvent);
}
defineMethod('goBack', this._goBack);
defineMethod('goForward', this._goForward);
defineMethod('reload', this._reload);
defineMethod('stop', this._stop);
defineMethod('purgeHistory', this._purgeHistory);
defineNoReturnMethod('goBack', this._goBack);
defineNoReturnMethod('goForward', this._goForward);
defineNoReturnMethod('reload', this._reload);
defineNoReturnMethod('stop', this._stop);
defineDOMRequestMethod('purgeHistory', 'purge-history');
defineMethod('getScreenshot', this._getScreenshot);
defineMethod('addNextPaintListener', this._addNextPaintListener);
defineMethod('removeNextPaintListener', this._removeNextPaintListener);
@ -223,17 +197,14 @@ function BrowserElementParent(frameLoader, hasRemoteFrame) {
// Insert ourself into the prompt service.
BrowserElementPromptService.mapFrameToBrowserElementParent(this._frameElement, this);
// If this browser represents an app then let the Webapps module register for
// any messages that it needs.
let appManifestURL =
this._frameElement.QueryInterface(Ci.nsIMozBrowserFrame).appManifestURL;
if (appManifestURL) {
let appId =
DOMApplicationRegistry.getAppLocalIdByManifestURL(appManifestURL);
if (appId != Ci.nsIScriptSecurityManager.NO_APP_ID) {
DOMApplicationRegistry.registerBrowserElementParentForApp(this, appId);
}
if (!isPendingFrame) {
this._setupMessageListener();
this._registerAppManifest();
} else {
// if we are a pending frame, we setup message manager after
// observing remote-browser-frame-shown
this._pendingAPICalls = [];
Services.obs.addObserver(this, 'remote-browser-frame-shown', /* ownsWeak = */ true);
}
}
@ -242,6 +213,82 @@ BrowserElementParent.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
Ci.nsISupportsWeakReference]),
_runPendingAPICall: function() {
if (!this._pendingAPICalls) {
return;
}
for (let i = 0; i < this._pendingAPICalls.length; i++) {
try {
this._pendingAPICalls[i]();
} catch (e) {
// throw the expections from pending functions.
debug('Exception when running pending API call: ' + e);
}
}
delete this._pendingAPICalls;
},
_registerAppManifest: function() {
// If this browser represents an app then let the Webapps module register for
// any messages that it needs.
let appManifestURL =
this._frameElement.QueryInterface(Ci.nsIMozBrowserFrame).appManifestURL;
if (appManifestURL) {
let appId =
DOMApplicationRegistry.getAppLocalIdByManifestURL(appManifestURL);
if (appId != Ci.nsIScriptSecurityManager.NO_APP_ID) {
DOMApplicationRegistry.registerBrowserElementParentForApp(this, appId);
}
}
},
_setupMessageListener: function() {
this._mm = this._frameLoader.messageManager;
let self = this;
// Messages we receive are handed to functions which take a (data) argument,
// where |data| is the message manager's data object.
// We use a single message and dispatch to various function based
// on data.msg_name
let mmCalls = {
"hello": this._recvHello,
"contextmenu": this._fireCtxMenuEvent,
"locationchange": this._fireEventFromMsg,
"loadstart": this._fireEventFromMsg,
"loadend": this._fireEventFromMsg,
"titlechange": this._fireEventFromMsg,
"iconchange": this._fireEventFromMsg,
"close": this._fireEventFromMsg,
"resize": this._fireEventFromMsg,
"activitydone": this._fireEventFromMsg,
"opensearch": this._fireEventFromMsg,
"securitychange": this._fireEventFromMsg,
"error": this._fireEventFromMsg,
"scroll": this._fireEventFromMsg,
"firstpaint": this._fireEventFromMsg,
"documentfirstpaint": this._fireEventFromMsg,
"nextpaint": this._recvNextPaint,
"keyevent": this._fireKeyEvent,
"showmodalprompt": this._handleShowModalPrompt,
"got-purge-history": this._gotDOMRequestResult,
"got-screenshot": this._gotDOMRequestResult,
"got-can-go-back": this._gotDOMRequestResult,
"got-can-go-forward": this._gotDOMRequestResult,
"fullscreen-origin-change": this._remoteFullscreenOriginChange,
"rollback-fullscreen": this._remoteFrameFullscreenReverted,
"exit-fullscreen": this._exitFullscreen,
"got-visible": this._gotDOMRequestResult,
"visibilitychange": this._childVisibilityChange,
"got-set-input-method-active": this._gotDOMRequestResult
};
this._mm.addMessageListener('browser-element-api:call', function(aMsg) {
if (self._isAlive() && (aMsg.data.msg_name in mmCalls)) {
return mmCalls[aMsg.data.msg_name].apply(self, arguments);
}
});
},
/**
* You shouldn't touch this._frameElement or this._window if _isAlive is
* false. (You'll likely get an exception if you do.)
@ -444,6 +491,32 @@ BrowserElementParent.prototype = {
cancelable: cancelable });
},
/**
* If remote frame haven't been set up, we enqueue a function that get a
* DOMRequest until the remote frame is ready and return another DOMRequest
* to caller. When we get the real DOMRequest, we will help forward the
* success/error callback to the DOMRequest that caller got.
*/
_queueDOMRequest: function(msgName, args) {
if (!this._pendingAPICalls) {
return;
}
let req = Services.DOMRequest.createRequest(this._window);
let self = this;
let getRealDOMRequest = function() {
let realReq = self._sendDOMRequest(msgName, args);
realReq.onsuccess = function(v) {
Services.DOMRequest.fireSuccess(req, v);
};
realReq.onerror = function(v) {
Services.DOMRequest.fireError(req, v);
};
};
this._pendingAPICalls.push(getRealDOMRequest);
return req;
},
/**
* Kick off a DOMRequest in the child process.
*
@ -543,10 +616,6 @@ BrowserElementParent.prototype = {
this._sendAsyncMsg('stop');
},
_purgeHistory: function() {
return this._sendDOMRequest('purge-history');
},
_getScreenshot: function(_width, _height, _mimeType) {
let width = parseInt(_width);
let height = parseInt(_height);
@ -557,6 +626,13 @@ BrowserElementParent.prototype = {
Cr.NS_ERROR_INVALID_ARG);
}
if (!this._mm) {
// Child haven't been loaded.
return this._queueDOMRequest('get-screenshot',
{width: width, height: height,
mimeType: mimeType});
}
return this._sendDOMRequest('get-screenshot',
{width: width, height: height,
mimeType: mimeType});
@ -578,23 +654,39 @@ BrowserElementParent.prototype = {
if (typeof listener != 'function')
throw Components.Exception("Invalid argument", Cr.NS_ERROR_INVALID_ARG);
if (this._nextPaintListeners.push(listener) == 1)
this._sendAsyncMsg('activate-next-paint-listener');
let self = this;
let run = function() {
if (self._nextPaintListeners.push(listener) == 1)
self._sendAsyncMsg('activate-next-paint-listener');
};
if (!this._mm) {
this._pendingAPICalls.push(run);
} else {
run();
}
},
_removeNextPaintListener: function(listener) {
if (typeof listener != 'function')
throw Components.Exception("Invalid argument", Cr.NS_ERROR_INVALID_ARG);
for (let i = this._nextPaintListeners.length - 1; i >= 0; i--) {
if (this._nextPaintListeners[i] == listener) {
this._nextPaintListeners.splice(i, 1);
break;
let self = this;
let run = function() {
for (let i = self._nextPaintListeners.length - 1; i >= 0; i--) {
if (self._nextPaintListeners[i] == listener) {
self._nextPaintListeners.splice(i, 1);
break;
}
}
}
if (this._nextPaintListeners.length == 0)
this._sendAsyncMsg('deactivate-next-paint-listener');
if (self._nextPaintListeners.length == 0)
self._sendAsyncMsg('deactivate-next-paint-listener');
};
if (!this._mm) {
this._pendingAPICalls.push(run);
} else {
run();
}
},
_setInputMethodActive: function(isActive) {
@ -704,6 +796,15 @@ BrowserElementParent.prototype = {
this._sendAsyncMsg('exit-fullscreen');
}
break;
case 'remote-browser-frame-shown':
if (this._frameLoader == subject) {
if (!this._mm) {
this._setupMessageListener();
this._registerAppManifest();
this._runPendingAPICall();
}
Services.obs.removeObserver(this, 'remote-browser-frame-shown');
}
default:
debug('Unknown topic: ' + topic);
break;

View File

@ -717,7 +717,17 @@ this.EncodedStringValue = {
encode: function(data, str) {
let begin = data.offset;
try {
WSP.TextString.encode(data, str);
// Quoted from OMA-TS-MMS-CONF-V1_3-20110913-A:
// Some of the MMS headers have been defined as "Encoded-string-value".
// The character set IANA MIBEnum value in these headers SHALL be
// encoded as Integer-value ([WAPWSP] section 8.4.2.3). The character
// set us-ascii (IANA MIBenum 3) SHALL always be accepted. If the
// character set is not specified (simple Text-string encoding) the
// character set SHALL be identified as us-ascii (lower half of ISO
// 8859-1 [ISO8859-1]). When the text string cannot be represented as
// us-ascii, the character set SHALL be encoded as utf-8 (IANA MIBenum
// 106) which has unique byte ordering.
WSP.TextString.encode(data, str, true);
} catch (e) {
data.offset = begin;
this.encodeCharsetEncodedString(data, str);

View File

@ -383,16 +383,19 @@ this.Text = {
* A wrapped object to store encoded raw data.
* @param text
* String text of one character to be encoded.
* @param asciiOnly
* A boolean to decide if it's only allowed to encode ASCII (0 ~ 127).
*
* @throws CodeError if a control character got.
*/
encode: function(data, text) {
encode: function(data, text, asciiOnly) {
if (!text) {
throw new CodeError("Text: empty string");
}
let code = text.charCodeAt(0);
if ((code < CTLS) || (code == DEL) || (code > 255)) {
if ((code < CTLS) || (code == DEL) || (code > 255) ||
(code >= 128 && asciiOnly)) {
throw new CodeError("Text: invalid char code " + code);
}
Octet.encode(data, code);
@ -425,11 +428,13 @@ this.NullTerminatedTexts = {
* A wrapped object to store encoded raw data.
* @param str
* A String to be encoded.
* @param asciiOnly
* A boolean to decide if it's only allowed to encode ASCII (0 ~ 127).
*/
encode: function(data, str) {
encode: function(data, str, asciiOnly) {
if (str) {
for (let i = 0; i < str.length; i++) {
Text.encode(data, str.charAt(i));
Text.encode(data, str.charAt(i), asciiOnly);
}
}
Octet.encode(data, 0);
@ -590,8 +595,10 @@ this.TextString = {
* A wrapped object to store encoded raw data.
* @param str
* A String to be encoded.
* @param asciiOnly
* A boolean to decide if it's only allowed to encode ASCII (0 ~ 127).
*/
encode: function(data, str) {
encode: function(data, str, asciiOnly) {
if (!str) {
Octet.encode(data, 0);
return;
@ -599,10 +606,14 @@ this.TextString = {
let firstCharCode = str.charCodeAt(0);
if (firstCharCode >= 128) {
if (asciiOnly) {
throw new CodeError("Text: invalid char code " + code);
}
Octet.encode(data, 127);
}
NullTerminatedTexts.encode(data, str);
NullTerminatedTexts.encode(data, str, asciiOnly);
},
};

View File

@ -412,6 +412,7 @@ add_test(function test_EncodedStringValue_decode() {
add_test(function test_EncodedStringValue_encode() {
// Test for normal TextString
wsp_encode_test(MMS.EncodedStringValue, "Hello", strToCharCodeArray("Hello"));
// Test for utf-8
let (entry = MMS.WSP.WSP_WELL_KNOWN_CHARSETS["utf-8"]) {
// "Mozilla" in full width.
@ -424,6 +425,16 @@ add_test(function test_EncodedStringValue_encode() {
let raw = conv.convertToByteArray(str).concat([0]);
wsp_encode_test(MMS.EncodedStringValue, str,
[raw.length + 2, 0x80 | entry.number, 127].concat(raw));
// MMS.EncodedStringValue encodes non us-ascii characters (128 ~ 255)
// (e.g., 'Ñ' or 'ü') by the utf-8 encoding. Otherwise, for us-ascii
// characters (0 ~ 127), still use the normal TextString encoding.
// "Ñü" in full width.
str = "\u00d1\u00fc";
raw = conv.convertToByteArray(str).concat([0]);
wsp_encode_test(MMS.EncodedStringValue, str,
[raw.length + 2, 0x80 | entry.number, 127].concat(raw));
}
run_next_test();

View File

@ -170,25 +170,18 @@ public class Prompt implements OnClickListener, OnCancelListener, OnItemClickLis
/* Adds to a result value from the lists that can be shown in dialogs.
* Will set the selected value(s) to the button attribute of the
* object that's passed in. If this is a multi-select dialog, sets a
* selected attribute to an array of booleans.
* object that's passed in. If this is a multi-select dialog, can set
* the button attribute to an array.
*/
private void addListResult(final JSONObject result, int which) {
try {
if (mSelected != null) {
JSONArray selected = new JSONArray();
for (int i = 0; i < mSelected.length; i++) {
if (mSelected[i]) {
selected.put(i);
}
selected.put(mSelected[i]);
}
result.put("list", selected);
result.put("button", selected);
} else {
// Mirror the selected array from multi choice for consistency.
JSONArray selected = new JSONArray();
selected.put(which);
result.put("list", selected);
// Make the button be the index of the select item.
result.put("button", which);
}
} catch(JSONException ex) { }
@ -229,12 +222,12 @@ public class Prompt implements OnClickListener, OnCancelListener, OnItemClickLis
JSONObject ret = new JSONObject();
try {
ListView list = mDialog.getListView();
addButtonResult(ret, which);
addInputValues(ret);
if (list != null || mSelected != null) {
addListResult(ret, which);
} else {
addButtonResult(ret, which);
}
addInputValues(ret);
} catch(Exception ex) {
Log.i(LOGTAG, "Error building return: " + ex);
}

View File

@ -37,25 +37,32 @@ var SelectHelper = {
}
p.show((function(data) {
let selected = data.list;
let selected = data.button;
if (selected == -1)
return;
if (aElement instanceof Ci.nsIDOMXULMenuListElement) {
if (aElement.selectedIndex != selected[0]) {
aElement.selectedIndex = selected[0];
if (aElement.selectedIndex != selected) {
aElement.selectedIndex = selected;
this.fireOnCommand(aElement);
}
} else if (aElement instanceof HTMLSelectElement) {
let changed = false;
if (!Array.isArray(selected)) {
let temp = [];
for (let i = 0; i <= list.length; i++) {
temp[i] = (i == selected);
}
selected = temp;
}
let i = 0;
this.forOptions(aElement, function(aNode) {
if (aNode.selected == (selected.indexOf(i) == -1)) {
if (aNode.selected != selected[i]) {
changed = true;
aNode.selected = false;
} else if (!aNode.selected == (selected.indexOf(i) != -1)) {
changed = true;
aNode.selected = true;
aNode.selected = selected[i];
}
i++;
i++
});
if (changed)

View File

@ -460,11 +460,15 @@
"dom/apps/tests/test_app_update.html": "debug-only failure",
"dom/apps/tests/test_packaged_app_install.html": "debug-only failure",
"dom/apps/tests/test_packaged_app_update.html": "debug-only timeout",
"dom/apps/tests/test_uninstall_errors.html": "debug-only timeout",
"dom/bindings/test/test_exceptions_from_jsimplemented.html": "debug-only failure; bug 926547",
"dom/camera/test/test_camera.html": "debug-only failure; no assertions when 34 were expected",
"dom/contacts/tests/test_contacts_basics.html": "debug-only failure",
"dom/contacts/tests/test_contacts_getall.html": "debug-only failure",
"dom/datastore/tests/test_arrays.html": "debug-only failure; time out",
"dom/datastore/tests/test_certifiedApp.html": "debug-only failure; time out",
"dom/datastore/tests/test_oop.html": "debug-only failure; time out",
"dom/datastore/tests/test_readonly.html": "debug-only failure; time out",
"dom/datastore/tests/test_sync.html": "debug-only failure; time out",
"dom/imptests/editing/selecttest/test_extend.html": "debug-only failure; time out",
"dom/imptests/editing/selecttest/test_selectAllChildren.html": "debug-only failure",

View File

@ -514,6 +514,7 @@ BoxModelHighlighter.prototype = {
if (oldRect && aRect.top == oldRect.top && aRect.left == oldRect.left &&
aRect.width == oldRect.width && aRect.height == oldRect.height) {
this._showOutline();
return true; // same rectangle
}

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- 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/. -->
<svg xmlns="http://www.w3.org/2000/svg"
width="10"
height="20">
<path d="M 10,0 L 0,10 10,20 z"
fill="ThreeDShadow"/>
<path d="M 10,1 L 1,10 10,19 z"
fill="-moz-field"/>
</svg>

After

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 293 B

View File

@ -7,7 +7,7 @@
width="10"
height="20">
<path d="M 10,0 L 0,10 10,20 z"
fill="ThreeDShadow"/>
fill="hsla(210,4%,10%,.2)"/>
<path d="M 10,1 L 1,10 10,19 z"
fill="-moz-Dialog"/>
fill="-moz-field"/>
</svg>

Before

Width:  |  Height:  |  Size: 460 B

After

Width:  |  Height:  |  Size: 466 B

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- 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/. -->
<svg xmlns="http://www.w3.org/2000/svg"
width="20"
height="10">
<path d="M 0,10 L 10,0 20,10 z"
fill="ThreeDShadow"/>
<path d="M 1,10 L 10,1 19,10 z"
fill="-moz-field"/>
</svg>

After

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 291 B

View File

@ -7,7 +7,7 @@
width="20"
height="10">
<path d="M 0,10 L 10,0 20,10 z"
fill="ThreeDShadow"/>
fill="hsla(210,4%,10%,.2)"/>
<path d="M 1,10 L 10,1 19,10 z"
fill="-moz-Dialog"/>
fill="-moz-field"/>
</svg>

Before

Width:  |  Height:  |  Size: 460 B

After

Width:  |  Height:  |  Size: 466 B

View File

@ -82,9 +82,9 @@ toolkit.jar:
skin/classic/global/arrow/arrow-up-hov.gif (arrow/arrow-up-hov.gif)
skin/classic/global/arrow/arrow-up-sharp.gif (arrow/arrow-up-sharp.gif)
skin/classic/global/arrow/panelarrow-horizontal.svg (arrow/panelarrow-horizontal.svg)
skin/classic/global/arrow/panelarrow-horizontal-white.png (arrow/panelarrow-horizontal-white.png)
skin/classic/global/arrow/panelarrow-vertical.svg (arrow/panelarrow-vertical.svg)
skin/classic/global/arrow/panelarrow-vertical-white.png (arrow/panelarrow-vertical-white.png)
skin/classic/global/arrow/panelarrow-horizontal-themed.svg (arrow/panelarrow-horizontal-themed.svg)
skin/classic/global/arrow/panelarrow-vertical-themed.svg (arrow/panelarrow-vertical-themed.svg)
skin/classic/global/checkbox/cbox-check.gif (checkbox/cbox-check.gif)
skin/classic/global/checkbox/cbox-check-dis.gif (checkbox/cbox-check-dis.gif)
skin/classic/global/console/console.css (console/console.css)
@ -225,7 +225,7 @@ toolkit.jar:
skin/classic/aero/global/numberbox.css
* skin/classic/aero/global/notification.css (notification-aero.css)
skin/classic/aero/global/passwordmgr.css
* skin/classic/aero/global/popup.css
* skin/classic/aero/global/popup.css (popup-aero.css)
skin/classic/aero/global/preferences.css
skin/classic/aero/global/printPageSetup.css
skin/classic/aero/global/printPreview.css
@ -267,9 +267,9 @@ toolkit.jar:
skin/classic/aero/global/arrow/arrow-up-hov.gif (arrow/arrow-up-hov.gif)
skin/classic/aero/global/arrow/arrow-up-sharp.gif (arrow/arrow-up-sharp.gif)
skin/classic/aero/global/arrow/panelarrow-horizontal.svg (arrow/panelarrow-horizontal.svg)
skin/classic/aero/global/arrow/panelarrow-horizontal-white.png (arrow/panelarrow-horizontal-white.png)
skin/classic/aero/global/arrow/panelarrow-vertical.svg (arrow/panelarrow-vertical.svg)
skin/classic/aero/global/arrow/panelarrow-vertical-white.png (arrow/panelarrow-vertical-white.png)
skin/classic/aero/global/arrow/panelarrow-horizontal-themed.svg (arrow/panelarrow-horizontal-themed.svg)
skin/classic/aero/global/arrow/panelarrow-vertical-themed.svg (arrow/panelarrow-vertical-themed.svg)
skin/classic/aero/global/checkbox/cbox-check.gif (checkbox/cbox-check.gif)
skin/classic/aero/global/checkbox/cbox-check-dis.gif (checkbox/cbox-check-dis.gif)
* skin/classic/aero/global/console/console.css (console/console-aero.css)

View File

@ -0,0 +1,7 @@
% 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/.
%define WINDOWS_AERO
%include popup.css
%undef WINDOWS_AERO

View File

@ -75,18 +75,29 @@ panel[type="arrow"][side="right"] {
}
.panel-arrowcontent {
border-radius: 4px;
padding: 10px;
color: -moz-DialogText;
background: -moz-Dialog;
color: -moz-FieldText;
background: -moz-field;
background-clip: padding-box;
border: 1px solid ThreeDShadow;
margin: 4px;
}
%ifdef WINDOWS_AERO
@media (-moz-os-version: windows-vista),
(-moz-os-version: windows-win7) {
%endif
/* < Win8 */
.panel-arrowcontent {
border-radius: 4px;
}
%ifdef WINDOWS_AERO
}
%endif
.panel-arrow[side="top"],
.panel-arrow[side="bottom"] {
list-style-image: url("chrome://global/skin/arrow/panelarrow-vertical.svg");
list-style-image: url("chrome://global/skin/arrow/panelarrow-vertical-themed.svg");
position: relative;
margin-left: 10px;
margin-right: 10px;
@ -103,7 +114,7 @@ panel[type="arrow"][side="right"] {
.panel-arrow[side="left"],
.panel-arrow[side="right"] {
list-style-image: url("chrome://global/skin/arrow/panelarrow-horizontal.svg");
list-style-image: url("chrome://global/skin/arrow/panelarrow-horizontal-themed.svg");
position: relative;
margin-top: 10px;
margin-bottom: 10px;
@ -121,34 +132,19 @@ panel[type="arrow"][side="right"] {
%ifdef XP_WIN
@media (-moz-windows-default-theme) {
.panel-arrowcontent {
border-color: rgba(0,0,0,.3);
box-shadow: 0 0 4px rgba(0,0,0,.3);
}
.panel-arrowcontent[side="top"] {
background-image: linear-gradient(white 1px, rgba(255,255,255,0) 15px);
}
.panel-arrowcontent[side="bottom"] {
background-image: linear-gradient(to top, white 1px, rgba(255,255,255,0) 15px);
}
.panel-arrowcontent[side="left"] {
background-image: linear-gradient(to right, white 1px, rgba(255,255,255,0) 15px);
}
.panel-arrowcontent[side="right"] {
background-image: linear-gradient(to left, white 1px, rgba(255,255,255,0) 15px);
border-color: hsla(210,4%,10%,.2);
box-shadow: 0 3px 5px hsla(210,4%,10%,.1),
0 0 7px hsla(210,4%,10%,.1);
}
.panel-arrow[side="top"],
.panel-arrow[side="bottom"] {
list-style-image: url("chrome://global/skin/arrow/panelarrow-vertical-white.png");
list-style-image: url("chrome://global/skin/arrow/panelarrow-vertical.svg");
}
.panel-arrow[side="left"],
.panel-arrow[side="right"] {
list-style-image: url("chrome://global/skin/arrow/panelarrow-horizontal-white.png");
list-style-image: url("chrome://global/skin/arrow/panelarrow-horizontal.svg");
}
}
%endif

View File

@ -299,11 +299,21 @@
#header-search {
-moz-appearance: none;
border: 1px solid rgba(0, 0, 0, 0.32);
border-radius: 2.5px;
padding-bottom: 2px;
background-color: rgba(255, 255, 255, 0.4);
}
%ifdef WINDOWS_AERO
@media (-moz-os-version: windows-vista),
(-moz-os-version: windows-win7) {
%endif
#header-search {
border-radius: 2.5px;
}
%ifdef WINDOWS_AERO
}
%endif
#header-search:hover {
background-color: rgba(255, 255, 255, .75);
}
@ -1138,13 +1148,23 @@ button.button-link:not([disabled="true"]):active:hover {
background: linear-gradient(rgba(251, 252, 253, 0.95), rgba(246, 247, 248, 0) 49%,
rgba(211, 212, 213, 0.45) 51%, rgba(225, 226, 229, 0.3));
background-clip: padding-box;
border-radius: 2.5px;
border: 1px solid rgba(31, 64, 100, 0.4);
border-top-color: rgba(31, 64, 100, 0.3);
box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25) inset,
0 0 2px 1px rgba(255, 255, 255, 0.25) inset;
}
%ifdef WINDOWS_AERO
@media (-moz-os-version: windows-vista),
(-moz-os-version: windows-win7) {
%endif
.header-button {
border-radius: 2.5px;
}
%ifdef WINDOWS_AERO
}
%endif
.header-button[disabled="true"] {
opacity: 0.8;
}

View File

@ -220,6 +220,7 @@ WinTaskbar::Initialize() {
hr = mTaskbar->HrInit();
if (FAILED(hr)) {
// This may fail with shell extensions like blackbox installed.
NS_WARNING("Unable to initialize taskbar");
NS_RELEASE(mTaskbar);
return false;
@ -366,7 +367,9 @@ WinTaskbar::RegisterAppUserModelID() {
NS_IMETHODIMP
WinTaskbar::GetAvailable(bool *aAvailable) {
*aAvailable = IsWin7OrLater();
// ITaskbarList4::HrInit() may fail with shell extensions like blackbox
// installed. Initialize early to return available=false in those cases.
*aAvailable = IsWin7OrLater() && Initialize();
return NS_OK;
}