Merge MC -> JM
@ -66,7 +66,7 @@ tier_base_dirs = \
|
||||
|
||||
ifndef LIBXUL_SDK
|
||||
ifeq (android,$(MOZ_WIDGET_TOOLKIT))
|
||||
tier_base_dirs += other-licenses/android
|
||||
tier_base_dirs += other-licenses/android other-licenses/skia-npapi
|
||||
endif
|
||||
|
||||
tier_base_dirs += memory
|
||||
|
@ -44,7 +44,8 @@
|
||||
#include "nsMai.h"
|
||||
#include "prlink.h"
|
||||
#include "prenv.h"
|
||||
#include "nsIPrefBranch.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "nsIGConfService.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsAccessibilityService.h"
|
||||
@ -53,6 +54,8 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <atk/atk.h>
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
typedef GType (* AtkGetTypeType) (void);
|
||||
GType g_atk_hyperlink_impl_type = G_TYPE_INVALID;
|
||||
static bool sATKChecked = false;
|
||||
@ -61,10 +64,12 @@ static const char sATKLibName[] = "libatk-1.0.so.0";
|
||||
static const char sATKHyperlinkImplGetTypeSymbol[] =
|
||||
"atk_hyperlink_impl_get_type";
|
||||
static const char sAccEnv [] = "GNOME_ACCESSIBILITY";
|
||||
static const char sSysPrefService [] =
|
||||
"@mozilla.org/system-preference-service;1";
|
||||
static const char sUseSystemPrefsKey[] =
|
||||
"config.use_system_prefs";
|
||||
static const char sAccessibilityKey [] =
|
||||
"config.use_system_prefs.accessibility";
|
||||
static const char sGconfAccessibilityKey[] =
|
||||
"/desktop/gnome/interface/accessibility";
|
||||
|
||||
/* gail function pointer */
|
||||
static guint (* gail_add_global_event_listener) (GSignalEmissionHook listener,
|
||||
@ -625,11 +630,17 @@ nsApplicationAccessibleWrap::Init()
|
||||
isGnomeATEnabled = !!atoi(envValue);
|
||||
} else {
|
||||
//check gconf-2 setting
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIPrefBranch> sysPrefService =
|
||||
do_GetService(sSysPrefService, &rv);
|
||||
if (NS_SUCCEEDED(rv) && sysPrefService) {
|
||||
sysPrefService->GetBoolPref(sAccessibilityKey, &isGnomeATEnabled);
|
||||
if (Preferences::GetBool(sUseSystemPrefsKey, false)) {
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIGConfService> gconf =
|
||||
do_GetService(NS_GCONFSERVICE_CONTRACTID, &rv);
|
||||
if (NS_SUCCEEDED(rv) && gconf) {
|
||||
gconf->GetBool(NS_LITERAL_CSTRING(sGconfAccessibilityKey),
|
||||
&isGnomeATEnabled);
|
||||
}
|
||||
} else {
|
||||
isGnomeATEnabled =
|
||||
Preferences::GetBool(sAccessibilityKey, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -50,6 +50,7 @@
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsCURILoader.h"
|
||||
#include "nsDocAccessible.h"
|
||||
#include "nsHTMLCanvasAccessible.h"
|
||||
#include "nsHTMLImageMapAccessible.h"
|
||||
#include "nsHTMLLinkAccessible.h"
|
||||
#include "nsHTMLSelectAccessible.h"
|
||||
@ -275,6 +276,16 @@ nsAccessibilityService::CreateHTMLComboboxAccessible(nsIContent* aContent,
|
||||
return accessible;
|
||||
}
|
||||
|
||||
already_AddRefed<nsAccessible>
|
||||
nsAccessibilityService::CreateHTMLCanvasAccessible(nsIContent* aContent,
|
||||
nsIPresShell* aPresShell)
|
||||
{
|
||||
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
|
||||
nsAccessible* accessible = new nsHTMLCanvasAccessible(aContent, weakShell);
|
||||
NS_IF_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
already_AddRefed<nsAccessible>
|
||||
nsAccessibilityService::CreateHTMLImageAccessible(nsIContent* aContent,
|
||||
nsIPresShell* aPresShell)
|
||||
|
@ -83,6 +83,8 @@ public:
|
||||
CreateHTML4ButtonAccessible(nsIContent* aContent, nsIPresShell* aPresShell);
|
||||
virtual already_AddRefed<nsAccessible>
|
||||
CreateHTMLButtonAccessible(nsIContent* aContent, nsIPresShell* aPresShell);
|
||||
already_AddRefed<nsAccessible>
|
||||
CreateHTMLCanvasAccessible(nsIContent* aContent, nsIPresShell* aPresShell);
|
||||
virtual already_AddRefed<nsAccessible>
|
||||
CreateHTMLCaptionAccessible(nsIContent* aContent, nsIPresShell* aPresShell);
|
||||
virtual already_AddRefed<nsAccessible>
|
||||
|
@ -50,6 +50,7 @@ LIBXUL_LIBRARY = 1
|
||||
|
||||
|
||||
CPPSRCS = \
|
||||
nsHTMLCanvasAccessible.cpp \
|
||||
nsHTMLFormControlAccessible.cpp \
|
||||
nsHTMLImageAccessible.cpp \
|
||||
nsHTMLImageMapAccessible.cpp \
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* vim:set ts=2 sw=2 sts=2 et: */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
@ -12,17 +12,14 @@
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is DevTools test code.
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Mozilla Foundation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2010
|
||||
* The Initial Developer of the Original Code is
|
||||
* Mozilla Foundation
|
||||
* Portions created by the Initial Developer are Copyright (C) 2011
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* David Dahl <ddahl@mozilla.com>
|
||||
* Patrick Walton <pcwalton@mozilla.com>
|
||||
* Julian Viereck <jviereck@mozilla.com>
|
||||
* Mihai Sucan <mihai.sucan@gmail.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
@ -38,46 +35,18 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
// Test that the recordManyEntries() method of the console store works.
|
||||
#include "nsHTMLCanvasAccessible.h"
|
||||
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
||||
browser.addEventListener("DOMContentLoaded", testStorageRecordManyEntries,
|
||||
false);
|
||||
nsHTMLCanvasAccessible::
|
||||
nsHTMLCanvasAccessible(nsIContent* aContent, nsIWeakReference* aShell) :
|
||||
nsHyperTextAccessible(aContent, aShell)
|
||||
{
|
||||
}
|
||||
|
||||
function testStorageRecordManyEntries() {
|
||||
browser.removeEventListener("DOMContentLoaded",
|
||||
testStorageRecordManyEntries, false);
|
||||
|
||||
openConsole();
|
||||
|
||||
let cs = HUDService.storage;
|
||||
|
||||
cs.createDisplay("foo");
|
||||
|
||||
var configArr = [];
|
||||
|
||||
for (var i = 0; i < 1000; i++){
|
||||
let config = {
|
||||
logLevel: "network",
|
||||
message: "HumminaHummina!",
|
||||
activity: {
|
||||
stage: "barStage",
|
||||
data: "bar bar bar bar"
|
||||
}
|
||||
};
|
||||
configArr.push(config);
|
||||
}
|
||||
|
||||
cs.recordEntries("foo", configArr);
|
||||
ok(cs.displayIndexes["foo"].length == 1000,
|
||||
"1000 entries in foo now");
|
||||
|
||||
cs.removeDisplay("foo");
|
||||
|
||||
finishTest();
|
||||
PRUint32
|
||||
nsHTMLCanvasAccessible::NativeRole()
|
||||
{
|
||||
return nsIAccessibleRole::ROLE_CANVAS;
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
@ -14,14 +15,11 @@
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Mozilla Foundation
|
||||
* Portions created by the Initial Developer are Copyright (C) 2011
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Dave Hyatt <hyatt@mozilla.org> (Original Author)
|
||||
* Jan Varga <varga@ku.sk>
|
||||
* Scott Johnson <sjohnson@mozilla.com>, Mozilla Corporation
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
@ -37,28 +35,22 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsITreeImageListener_h__
|
||||
#define nsITreeImageListener_h__
|
||||
#include "nsHyperTextAccessible.h"
|
||||
|
||||
// The interface for our image listener.
|
||||
// {90586540-2D50-403e-8DCE-981CAA778444}
|
||||
#define NS_ITREEIMAGELISTENER_IID \
|
||||
{ 0x90586540, 0x2d50, 0x403e, { 0x8d, 0xce, 0x98, 0x1c, 0xaa, 0x77, 0x84, 0x44 } }
|
||||
#ifndef _nsHTMLCanvasAccessible_H_
|
||||
#define _nsHTMLCanvasAccessible_H_
|
||||
|
||||
class nsITreeImageListener : public nsISupports
|
||||
/**
|
||||
* HTML canvas accessible (html:canvas).
|
||||
*/
|
||||
class nsHTMLCanvasAccessible : public nsHyperTextAccessible
|
||||
{
|
||||
public:
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ITREEIMAGELISTENER_IID)
|
||||
nsHTMLCanvasAccessible(nsIContent* aContent, nsIWeakReference* aShell);
|
||||
virtual ~nsHTMLCanvasAccessible() { }
|
||||
|
||||
NS_IMETHOD AddCell(PRInt32 aIndex, nsITreeColumn* aCol) = 0;
|
||||
|
||||
/**
|
||||
* Clear the internal frame pointer to prevent dereferencing an object
|
||||
* that no longer exists.
|
||||
*/
|
||||
NS_IMETHOD ClearFrame() = 0;
|
||||
// nsAccessible
|
||||
virtual PRUint32 NativeRole();
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsITreeImageListener, NS_ITREEIMAGELISTENER_IID)
|
||||
|
||||
#endif
|
@ -1414,6 +1414,9 @@ nsHTMLTableAccessible::IsProbablyForLayout(bool *aIsProbablyForLayout)
|
||||
RETURN_LAYOUT_ANSWER(false, "Has role attribute, weak role, and role is table");
|
||||
}
|
||||
|
||||
if (mContent->Tag() != nsGkAtoms::table)
|
||||
RETURN_LAYOUT_ANSWER(true, "table built by CSS display:table style");
|
||||
|
||||
// Check if datatable attribute has "0" value.
|
||||
if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::datatable,
|
||||
NS_LITERAL_STRING("0"), eCaseMatters)) {
|
||||
|
@ -176,6 +176,8 @@ __try {
|
||||
*aNSelections = 0;
|
||||
|
||||
nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
|
||||
if (textAcc->IsDefunct())
|
||||
return E_FAIL;
|
||||
|
||||
PRInt32 selCount = 0;
|
||||
nsresult rv = textAcc->GetSelectionCount(&selCount);
|
||||
|
@ -7,6 +7,7 @@ const ROLE_APPLICATION = nsIAccessibleRole.ROLE_APPLICATION;
|
||||
const ROLE_APP_ROOT = nsIAccessibleRole.ROLE_APP_ROOT;
|
||||
const ROLE_AUTOCOMPLETE = nsIAccessibleRole.ROLE_AUTOCOMPLETE;
|
||||
const ROLE_BUTTONDROPDOWNGRID = nsIAccessibleRole.ROLE_BUTTONDROPDOWNGRID;
|
||||
const ROLE_CANVAS = nsIAccessibleRole.ROLE_CANVAS;
|
||||
const ROLE_CAPTION = nsIAccessibleRole.ROLE_CAPTION;
|
||||
const ROLE_CELL = nsIAccessibleRole.ROLE_CELL;
|
||||
const ROLE_CHECKBUTTON = nsIAccessibleRole.ROLE_CHECKBUTTON;
|
||||
|
@ -98,6 +98,9 @@
|
||||
// layout table having datatable="0" attribute and containing data table structure (tfoot element)
|
||||
testAttrs("table22", attr, true);
|
||||
|
||||
// css table with non-table tag
|
||||
testAttrs("table23", attr, true);
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
@ -117,6 +120,11 @@
|
||||
title="Data table elements used to determine layout-guess attribute shouldn't be picked from nested tables">
|
||||
Mozilla Bug 690222
|
||||
</a>
|
||||
<a target="_blank"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id=693948"
|
||||
title="Expose layout-guess: true object attribute on CSS table accessible">
|
||||
Mozilla Bug 693948
|
||||
</a>
|
||||
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none"></div>
|
||||
@ -431,5 +439,14 @@
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<!-- css table with noon-table tag -->
|
||||
<div id="table23" style="display:table;">
|
||||
<div style="display:table-row;">
|
||||
<div style="display:table-cell;">Row 1, column 1</div>
|
||||
<div style="display:table-cell;">Row 1, column 2</div>
|
||||
<div style="display:table-cell;">Row 1, column 3</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -52,6 +52,7 @@ _TEST_FILES =\
|
||||
test_aria_imgmap.html \
|
||||
test_aria_presentation.html \
|
||||
test_button.xul \
|
||||
test_canvas.html \
|
||||
test_combobox.xul \
|
||||
test_cssoverflow.html \
|
||||
test_dochierarchy.html \
|
||||
|
57
accessible/tests/mochitest/tree/test_canvas.html
Normal file
@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=495912
|
||||
-->
|
||||
<head>
|
||||
<title>File Input Control tests</title>
|
||||
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
||||
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
|
||||
<script type="application/javascript"
|
||||
src="../common.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="../role.js"></script>
|
||||
|
||||
<script type="application/javascript">
|
||||
function doTest()
|
||||
{
|
||||
var accTree = {
|
||||
role: ROLE_CANVAS,
|
||||
children: [
|
||||
]
|
||||
};
|
||||
testAccessibleTree("canvas", accTree);
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a target="_blank"
|
||||
title="Expose alternative content in Canvas element to ATs"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id=495912">Mozilla Bug 495912</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none"></div>
|
||||
<pre id="test">
|
||||
</pre>
|
||||
|
||||
<canvas id="canvas" tabindex="0">
|
||||
fallback content.
|
||||
</canvas>
|
||||
|
||||
<script type="text/javascript">
|
||||
var c=document.getElementById("canvas");
|
||||
var cxt=c.getContext("2d");
|
||||
cxt.fillStyle="#005500";
|
||||
cxt.fillRect(0,0,150,75);
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
1
aclocal.m4
vendored
@ -12,6 +12,7 @@ builtin(include, build/autoconf/codeset.m4)dnl
|
||||
builtin(include, build/autoconf/altoptions.m4)dnl
|
||||
builtin(include, build/autoconf/mozprog.m4)dnl
|
||||
builtin(include, build/autoconf/mozheader.m4)dnl
|
||||
builtin(include, build/autoconf/mozcommonheader.m4)dnl
|
||||
builtin(include, build/autoconf/acwinpaths.m4)dnl
|
||||
builtin(include, build/autoconf/lto.m4)dnl
|
||||
builtin(include, build/autoconf/gcc-pr49911.m4)dnl
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1318359094000">
|
||||
<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1321712096000">
|
||||
<emItems>
|
||||
<emItem blockID="i41" id="{99079a25-328f-4bd4-be04-00955acaa0a7}">
|
||||
<versionRange minVersion="0.1" maxVersion="4.3.1.00" severity="1">
|
||||
@ -117,6 +117,13 @@
|
||||
<versionRange minVersion="2.2" maxVersion="2.2">
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i45" id="{22119944-ED35-4ab1-910B-E619EA06A115}">
|
||||
<versionRange minVersion="0.1" maxVersion="7.6.1">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="8.0a1" maxVersion="*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i3" id="langpack-vi-VN@firefox.mozilla.org">
|
||||
<versionRange minVersion="2.0" maxVersion="2.0">
|
||||
</versionRange>
|
||||
|
@ -3481,7 +3481,6 @@ const BrowserSearch = {
|
||||
openLinkIn(submission.uri.spec,
|
||||
useNewTab ? "tab" : "current",
|
||||
{ postData: submission.postData,
|
||||
inBackground: false,
|
||||
relatedToCurrent: true });
|
||||
},
|
||||
|
||||
@ -3951,6 +3950,9 @@ var FullScreen = {
|
||||
return;
|
||||
}
|
||||
|
||||
if (gFindBarInitialized)
|
||||
gFindBar.close();
|
||||
|
||||
this.showWarning(true);
|
||||
|
||||
// Exit DOM full-screen mode upon open, close, or change tab.
|
||||
|
@ -54,7 +54,7 @@
|
||||
|
||||
<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/webConsole.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://browser/skin/devtools/webconsole.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
|
||||
|
||||
<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
|
||||
|
@ -12,10 +12,10 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#highlighter-veil-container:not([locked]) > .highlighter-veil,
|
||||
#highlighter-veil-container:not([locked]) > #highlighter-veil-middlebox,
|
||||
#highlighter-veil-container:not([locked]) > #highlighter-veil-middlebox > .highlighter-veil,
|
||||
#highlighter-veil-container:not([locked]) > #highlighter-veil-middlebox > #highlighter-veil-transparentbox {
|
||||
#highlighter-veil-container:not([disable-transitions]) > .highlighter-veil,
|
||||
#highlighter-veil-container:not([disable-transitions]) > #highlighter-veil-middlebox,
|
||||
#highlighter-veil-container:not([disable-transitions]) > #highlighter-veil-middlebox > .highlighter-veil,
|
||||
#highlighter-veil-container:not([disable-transitions]) > #highlighter-veil-middlebox > #highlighter-veil-transparentbox {
|
||||
-moz-transition-property: width, height;
|
||||
-moz-transition-duration: 0.1s;
|
||||
-moz-transition-timing-function: linear;
|
||||
@ -51,7 +51,7 @@
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
#highlighter-nodeinfobar-container:not([locked]) {
|
||||
#highlighter-nodeinfobar-container:not([disable-transitions]) {
|
||||
-moz-transition-property: top, left;
|
||||
-moz-transition-duration: 0.1s;
|
||||
-moz-transition-timing-function: linear;
|
||||
@ -63,6 +63,17 @@
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
#highlighter-nodeinfobar-container[locked] > #highlighter-nodeinfobar {
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
#highlighter-nodeinfobar-id,
|
||||
.highlighter-nodeinfobar-class,
|
||||
#highlighter-nodeinfobar-tagname {
|
||||
-moz-user-select: text;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.highlighter-nodeinfobar-arrow {
|
||||
display: none;
|
||||
}
|
||||
@ -83,14 +94,6 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
#highlighter-nodeinfobar-id::before {
|
||||
content: "#";
|
||||
}
|
||||
|
||||
.highlighter-nodeinfobar-class::before {
|
||||
content: ".";
|
||||
}
|
||||
|
||||
#highlighter-nodeinfobar-tagname {
|
||||
text-transform: lowercase;
|
||||
}
|
||||
|
@ -859,15 +859,15 @@ nsContextMenu.prototype = {
|
||||
},
|
||||
|
||||
fullScreenVideo: function () {
|
||||
let video = this.target;
|
||||
let video = this.target;
|
||||
if (document.mozFullScreenEnabled)
|
||||
video.mozRequestFullScreen();
|
||||
else {
|
||||
// Fallback for the legacy full-screen video implementation.
|
||||
video.pause();
|
||||
openDialog("chrome://browser/content/fullscreen-video.xhtml",
|
||||
"", "chrome,centerscreen,dialog=no", video);
|
||||
}
|
||||
// Fallback for the legacy full-screen video implementation.
|
||||
video.pause();
|
||||
openDialog("chrome://browser/content/fullscreen-video.xhtml",
|
||||
"", "chrome,centerscreen,dialog=no", video);
|
||||
}
|
||||
},
|
||||
|
||||
// Change current window to the URL of the background image.
|
||||
|
@ -55,6 +55,22 @@ tier_app_dirs += browser
|
||||
# Never add other tier_app_dirs after browser. They won't get packaged
|
||||
# properly on mac.
|
||||
|
||||
################################################
|
||||
# Parallel build on Windows with GNU make check
|
||||
|
||||
default::
|
||||
ifeq (,$(findstring pymake,$(MAKE)))
|
||||
ifeq ($(HOST_OS_ARCH),WINNT)
|
||||
ifneq (1,$(NUMBER_OF_PROCESSORS))
|
||||
@echo $(if $(findstring -j,$(value MAKEFLAGS)), \
|
||||
$(error You are using GNU make to build Firefox with -jN on Windows. \
|
||||
This will randomly deadlock. To compile a parallel build on Windows \
|
||||
run "python -OO build/pymake/make.py -f client.mk build". \
|
||||
See https://developer.mozilla.org/en/pymake for more details.))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
installer:
|
||||
@$(MAKE) -C browser/installer installer
|
||||
|
||||
|
@ -340,6 +340,9 @@ var MigrationWizard = {
|
||||
case "safari":
|
||||
source = "sourceNameSafari";
|
||||
break;
|
||||
case "chrome":
|
||||
source = "sourceNameChrome";
|
||||
break;
|
||||
}
|
||||
|
||||
// semi-wallpaper for crash when multiple profiles exist, since we haven't initialized mSourceProfile in places
|
||||
|
@ -79,6 +79,7 @@
|
||||
#endif
|
||||
<radio id="opera" label="&importFromOpera.label;" accesskey="&importFromOpera.accesskey;"/>
|
||||
#endif
|
||||
<radio id="chrome" label="&importFromChrome.label;" accesskey="&importFromChrome.accesskey;"/>
|
||||
<radio id="fromfile" label="&importFromHTMLFile.label;" accesskey="&importFromHTMLFile.accesskey;" hidden="true"/>
|
||||
<radio id="nothing" label="&importFromNothing.label;" accesskey="&importFromNothing.accesskey;" hidden="true"/>
|
||||
</radiogroup>
|
||||
|
@ -0,0 +1,2 @@
|
||||
component {4cec1de4-1671-4fc3-a53e-6c539dc77a26} ChromeProfileMigrator.js
|
||||
contract @mozilla.org/profile/migrator;1?app=browser&type=chrome {4cec1de4-1671-4fc3-a53e-6c539dc77a26}
|
532
browser/components/migration/src/ChromeProfileMigrator.js
Normal file
@ -0,0 +1,532 @@
|
||||
/* -*- Mode: js; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
* vim: sw=2 ts=2 sts=2 et
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License
|
||||
* at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
|
||||
* the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*
|
||||
* The Original Code is the Browser Profile Migrator.
|
||||
*
|
||||
* The Initial Developer of the Original Code is the Mozilla Foundation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2011
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Makoto Kato <m_kato@ga2.so-net.ne.jp> (Original Author)
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
const Cu = Components.utils;
|
||||
|
||||
const LOCAL_FILE_CID = "@mozilla.org/file/local;1";
|
||||
const FILE_INPUT_STREAM_CID = "@mozilla.org/network/file-input-stream;1";
|
||||
|
||||
const BUNDLE_MIGRATION = "chrome://browser/locale/migration/migration.properties";
|
||||
|
||||
const MIGRATE_ALL = 0x0000;
|
||||
const MIGRATE_SETTINGS = 0x0001;
|
||||
const MIGRATE_COOKIES = 0x0002;
|
||||
const MIGRATE_HISTORY = 0x0004;
|
||||
const MIGRATE_FORMDATA = 0x0008;
|
||||
const MIGRATE_PASSWORDS = 0x0010;
|
||||
const MIGRATE_BOOKMARKS = 0x0020;
|
||||
const MIGRATE_OTHERDATA = 0x0040;
|
||||
|
||||
const S100NS_FROM1601TO1970 = 0x19DB1DED53E8000;
|
||||
const S100NS_PER_MS = 10;
|
||||
|
||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
Components.utils.import("resource://gre/modules/PlacesUtils.jsm");
|
||||
Components.utils.import("resource://gre/modules/NetUtil.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "bookmarksSubfolderTitle", function () {
|
||||
// get "import from google chrome" string for folder
|
||||
let strbundle =
|
||||
Services.strings.createBundle(BUNDLE_MIGRATION);
|
||||
let sourceNameChrome = strbundle.GetStringFromName("sourceNameChrome");
|
||||
return strbundle.formatStringFromName("importedBookmarksFolder",
|
||||
[sourceNameChrome],
|
||||
1);
|
||||
});
|
||||
|
||||
/*
|
||||
* Convert Chrome time format to Date object
|
||||
*
|
||||
* @param aTime
|
||||
* Chrome time
|
||||
* @return converted Date object
|
||||
* @note Google Chrome uses FILETIME / 10 as time.
|
||||
* FILETIME is based on same structure of Windows.
|
||||
*/
|
||||
function chromeTimeToDate(aTime)
|
||||
{
|
||||
return new Date((aTime * S100NS_PER_MS - S100NS_FROM1601TO1970 ) / 10000);
|
||||
}
|
||||
|
||||
/*
|
||||
* Insert bookmark items into specific folder.
|
||||
*
|
||||
* @param aFolderId
|
||||
* id of folder where items will be inserted
|
||||
* @param aItems
|
||||
* bookmark items to be inserted
|
||||
*/
|
||||
function insertBookmarkItems(aFolderId, aItems)
|
||||
{
|
||||
for (let i = 0; i < aItems.length; i++) {
|
||||
let item = aItems[i];
|
||||
|
||||
try {
|
||||
if (item.type == "url") {
|
||||
PlacesUtils.bookmarks.insertBookmark(aFolderId,
|
||||
NetUtil.newURI(item.url),
|
||||
PlacesUtils.bookmarks.DEFAULT_INDEX,
|
||||
item.name);
|
||||
} else if (item.type == "folder") {
|
||||
let newFolderId =
|
||||
PlacesUtils.bookmarks.createFolder(aFolderId,
|
||||
item.name,
|
||||
PlacesUtils.bookmarks.DEFAULT_INDEX);
|
||||
|
||||
insertBookmarkItems(newFolderId, item.children);
|
||||
}
|
||||
} catch (e) {
|
||||
Cu.reportError(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function ChromeProfileMigrator()
|
||||
{
|
||||
}
|
||||
|
||||
ChromeProfileMigrator.prototype = {
|
||||
_paths: {
|
||||
bookmarks : null,
|
||||
cookies : null,
|
||||
history : null,
|
||||
prefs : null,
|
||||
},
|
||||
|
||||
_homepageURL : null,
|
||||
_replaceBookmarks : false,
|
||||
|
||||
/*
|
||||
* Notify to observers to start migration
|
||||
*
|
||||
* @param aType
|
||||
* notification type such as MIGRATE_BOOKMARKS
|
||||
*/
|
||||
|
||||
_notifyStart : function Chrome_notifyStart(aType)
|
||||
{
|
||||
Services.obs.notifyObservers(null, "Migration:ItemBeforeMigrate", aType);
|
||||
this._pendingCount++;
|
||||
},
|
||||
|
||||
/*
|
||||
* Notify to observers to finish migration for item
|
||||
* If all items are finished, it sends migration end notification.
|
||||
*
|
||||
* @param aType
|
||||
* notification type such as MIGRATE_BOOKMARKS
|
||||
*/
|
||||
_notifyCompleted : function Chrome_notifyIfCompleted(aType)
|
||||
{
|
||||
Services.obs.notifyObservers(null, "Migration:ItemAfterMigrate", aType);
|
||||
if (--this._pendingCount == 0) {
|
||||
// All items are migrated, so we have to send end notification.
|
||||
Services.obs.notifyObservers(null, "Migration:Ended", null);
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
* Migrating bookmark items
|
||||
*/
|
||||
_migrateBookmarks : function Chrome_migrateBookmarks()
|
||||
{
|
||||
this._notifyStart(MIGRATE_BOOKMARKS);
|
||||
|
||||
try {
|
||||
PlacesUtils.bookmarks.runInBatchMode({
|
||||
_self : this,
|
||||
runBatched : function (aUserData) {
|
||||
let migrator = this._self;
|
||||
let file = Cc[LOCAL_FILE_CID].createInstance(Ci.nsILocalFile);
|
||||
file.initWithPath(migrator._paths.bookmarks);
|
||||
|
||||
NetUtil.asyncFetch(file, function(aInputStream, aResultCode) {
|
||||
if (!Components.isSuccessCode(aResultCode)) {
|
||||
migrator._notifyCompleted(MIGRATE_BOOKMARKS);
|
||||
return;
|
||||
}
|
||||
|
||||
// Parse Chrome bookmark file that is JSON format
|
||||
let bookmarkJSON = NetUtil.readInputStreamToString(aInputStream,
|
||||
aInputStream.available(),
|
||||
{ charset : "UTF-8" });
|
||||
let roots = JSON.parse(bookmarkJSON).roots;
|
||||
|
||||
// Importing bookmark bar items
|
||||
if (roots.bookmark_bar.children &&
|
||||
roots.bookmark_bar.children.length > 0) {
|
||||
// Toolbar
|
||||
let parentId = PlacesUtils.toolbarFolderId;
|
||||
if (!migrator._replaceBookmarks) {
|
||||
parentId =
|
||||
PlacesUtils.bookmarks.createFolder(parentId,
|
||||
bookmarksSubfolderTitle,
|
||||
PlacesUtils.bookmarks.DEFAULT_INDEX);
|
||||
}
|
||||
insertBookmarkItems(parentId, roots.bookmark_bar.children);
|
||||
}
|
||||
|
||||
// Importing bookmark menu items
|
||||
if (roots.other.children &&
|
||||
roots.other.children.length > 0) {
|
||||
// Bookmark menu
|
||||
let parentId = PlacesUtils.bookmarksMenuFolderId;
|
||||
if (!migrator._replaceBookmarks) {
|
||||
parentId =
|
||||
PlacesUtils.bookmarks.createFolder(parentId,
|
||||
bookmarksSubfolderTitle,
|
||||
PlacesUtils.bookmarks.DEFAULT_INDEX);
|
||||
}
|
||||
insertBookmarkItems(parentId, roots.other.children);
|
||||
}
|
||||
|
||||
migrator._notifyCompleted(MIGRATE_BOOKMARKS);
|
||||
});
|
||||
}
|
||||
}, null);
|
||||
} catch (e) {
|
||||
Cu.reportError(e);
|
||||
this._notifyCompleted(MIGRATE_BOOKMARKS);
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
* Migrating history
|
||||
*/
|
||||
_migrateHistory : function Chrome_migrateHistory()
|
||||
{
|
||||
this._notifyStart(MIGRATE_HISTORY);
|
||||
|
||||
try {
|
||||
PlacesUtils.history.runInBatchMode({
|
||||
_self : this,
|
||||
runBatched : function (aUserData) {
|
||||
// access sqlite3 database of Chrome's history
|
||||
let file = Cc[LOCAL_FILE_CID].createInstance(Ci.nsILocalFile);
|
||||
file.initWithPath(this._self._paths.history);
|
||||
|
||||
let dbConn = Services.storage.openUnsharedDatabase(file);
|
||||
let stmt = dbConn.createAsyncStatement(
|
||||
"SELECT url, title, last_visit_time, typed_count FROM urls WHERE hidden = 0");
|
||||
|
||||
stmt.executeAsync({
|
||||
_asyncHistory : Cc["@mozilla.org/browser/history;1"]
|
||||
.getService(Ci.mozIAsyncHistory),
|
||||
_db : dbConn,
|
||||
_self : this._self,
|
||||
handleResult : function(aResults) {
|
||||
let places = [];
|
||||
for (let row = aResults.getNextRow(); row; row = aResults.getNextRow()) {
|
||||
try {
|
||||
// if having typed_count, we changes transition type to typed.
|
||||
let transType = PlacesUtils.history.TRANSITION_LINK;
|
||||
if (row.getResultByName("typed_count") > 0)
|
||||
transType = PlacesUtils.history.TRANSITION_TYPED;
|
||||
|
||||
places.push({
|
||||
uri: NetUtil.newURI(row.getResultByName("url")),
|
||||
title: row.getResultByName("title"),
|
||||
visits: [{
|
||||
transitionType: transType,
|
||||
visitDate: chromeTimeToDate(
|
||||
row.getResultByName(
|
||||
"last_visit_time")) * 1000,
|
||||
}],
|
||||
});
|
||||
} catch (e) {
|
||||
Cu.reportError(e);
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
this._asyncHistory.updatePlaces(places);
|
||||
} catch (e) {
|
||||
Cu.reportError(e);
|
||||
}
|
||||
},
|
||||
|
||||
handleError : function(aError) {
|
||||
Cu.reportError("Async statement execution returned with '" +
|
||||
aError.result + "', '" + aError.message + "'");
|
||||
},
|
||||
|
||||
handleCompletion : function(aReason) {
|
||||
this._db.asyncClose();
|
||||
this._self._notifyCompleted(MIGRATE_HISTORY);
|
||||
}
|
||||
});
|
||||
stmt.finalize();
|
||||
}
|
||||
}, null);
|
||||
} catch (e) {
|
||||
Cu.reportError(e);
|
||||
this._notifyCompleted(MIGRATE_HISTORY);
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
* Migrating cookies
|
||||
*/
|
||||
_migrateCookies : function Chrome_migrateCookies()
|
||||
{
|
||||
this._notifyStart(MIGRATE_COOKIES);
|
||||
|
||||
try {
|
||||
// Access sqlite3 database of Chrome's cookie
|
||||
let file = Cc[LOCAL_FILE_CID].createInstance(Ci.nsILocalFile);
|
||||
file.initWithPath(this._paths.cookies);
|
||||
|
||||
let dbConn = Services.storage.openUnsharedDatabase(file);
|
||||
let stmt = dbConn.createAsyncStatement(
|
||||
"SELECT host_key, path, name, value, secure, httponly, expires_utc FROM cookies");
|
||||
|
||||
stmt.executeAsync({
|
||||
_db : dbConn,
|
||||
_self : this,
|
||||
handleResult : function(aResults) {
|
||||
for (let row = aResults.getNextRow(); row; row = aResults.getNextRow()) {
|
||||
let host_key = row.getResultByName("host_key");
|
||||
if (host_key.match(/^\./)) {
|
||||
// 1st character of host_key may be ".", so we have to remove it
|
||||
host_key = host_key.substr(1);
|
||||
}
|
||||
|
||||
try {
|
||||
let expiresUtc =
|
||||
chromeTimeToDate(row.getResultByName("expires_utc")) / 1000;
|
||||
Services.cookies.add(host_key,
|
||||
row.getResultByName("path"),
|
||||
row.getResultByName("name"),
|
||||
row.getResultByName("value"),
|
||||
row.getResultByName("secure"),
|
||||
row.getResultByName("httponly"),
|
||||
false,
|
||||
parseInt(expiresUtc));
|
||||
} catch (e) {
|
||||
Cu.reportError(e);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
handleError : function(aError) {
|
||||
Cu.reportError("Async statement execution returned with '" +
|
||||
aError.result + "', '" + aError.message + "'");
|
||||
},
|
||||
|
||||
handleCompletion : function(aReason) {
|
||||
this._db.asyncClose();
|
||||
this._self._notifyCompleted(MIGRATE_COOKIES);
|
||||
},
|
||||
});
|
||||
stmt.finalize();
|
||||
} catch (e) {
|
||||
Cu.reportError(e);
|
||||
this._notifyCompleted(MIGRATE_COOKIES);
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
* nsIBrowserProfileMigrator interface implementation
|
||||
*/
|
||||
|
||||
/*
|
||||
* Let's migrate all items
|
||||
*
|
||||
* @param aItems
|
||||
* list of data items to migrate. but this is unused.
|
||||
* @param aStartup
|
||||
* non-null if called during startup.
|
||||
* @param aProfile
|
||||
* this is unused due to single profile support only
|
||||
*/
|
||||
migrate : function Chrome_migrate(aItems, aStartup, aProfile)
|
||||
{
|
||||
if (aStartup) {
|
||||
aStartup.doStartup();
|
||||
this._replaceBookmarks = true;
|
||||
}
|
||||
|
||||
Services.obs.notifyObservers(null, "Migration:Started", null);
|
||||
|
||||
// Reset panding count. If this count becomes 0, "Migration:Ended"
|
||||
// notification is sent
|
||||
this._pendingCount = 1;
|
||||
|
||||
if (aItems & MIGRATE_HISTORY)
|
||||
this._migrateHistory();
|
||||
|
||||
if (aItems & MIGRATE_COOKIES)
|
||||
this._migrateCookies();
|
||||
|
||||
if (aItems & MIGRATE_BOOKMARKS)
|
||||
this._migrateBookmarks();
|
||||
|
||||
if (--this._pendingCount == 0) {
|
||||
// When async imports are immeditelly completed unfortunately,
|
||||
// this will be called.
|
||||
// Usually, this notification is sent by _notifyCompleted()
|
||||
Services.obs.notifyObservers(null, "Migration:Ended", null);
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
* return supported migration types
|
||||
*
|
||||
* @param aProfile
|
||||
* this is unused due to single profile support only
|
||||
* @param aDoingStartup
|
||||
* non-null if called during startup.
|
||||
* @return supported migration types
|
||||
*/
|
||||
getMigrateData: function Chrome_getMigrateData(aProfile, aDoingStartup)
|
||||
{
|
||||
#ifdef XP_WIN
|
||||
let chromepath = Services.dirsvc.get("LocalAppData", Ci.nsIFile).path +
|
||||
"\\Google\\Chrome\\User Data\\Default\\";
|
||||
#elifdef XP_MACOSX
|
||||
let chromepath = Services.dirsvc.get("Home", Ci.nsIFile).path +
|
||||
"/Library/Application Support/Google/Chrome/Default/";
|
||||
#else
|
||||
let chromepath = Services.dirsvc.get("Home", Ci.nsIFile).path +
|
||||
"/.config/google-chrome/Default/";
|
||||
#endif
|
||||
|
||||
let result = 0;
|
||||
|
||||
// bookmark and preference are JSON format
|
||||
|
||||
try {
|
||||
let file = Cc[LOCAL_FILE_CID].createInstance(Ci.nsILocalFile);
|
||||
file.initWithPath(chromepath + "Bookmarks");
|
||||
if (file.exists()) {
|
||||
this._paths.bookmarks = file.path
|
||||
result += MIGRATE_BOOKMARKS;
|
||||
}
|
||||
} catch (e) {
|
||||
Cu.reportError(e);
|
||||
}
|
||||
|
||||
if (!this._paths.prefs)
|
||||
this._paths.prefs = chromepath + "Preferences";
|
||||
|
||||
// history and cookies are SQLite database
|
||||
|
||||
try {
|
||||
let file = Cc[LOCAL_FILE_CID].createInstance(Ci.nsILocalFile);
|
||||
file.initWithPath(chromepath + "History");
|
||||
if (file.exists()) {
|
||||
this._paths.history = file.path
|
||||
result += MIGRATE_HISTORY;
|
||||
}
|
||||
} catch (e) {
|
||||
Cu.reportError(e);
|
||||
}
|
||||
|
||||
try {
|
||||
let file = Cc[LOCAL_FILE_CID].createInstance(Ci.nsILocalFile);
|
||||
file.initWithPath(chromepath + "Cookies");
|
||||
if (file.exists()) {
|
||||
this._paths.cookies = file.path
|
||||
result += MIGRATE_COOKIES;
|
||||
}
|
||||
} catch (e) {
|
||||
Cu.reportError(e);
|
||||
}
|
||||
|
||||
return result;
|
||||
},
|
||||
|
||||
/*
|
||||
* Whether we support migration of Chrome
|
||||
*
|
||||
* @return true if supported
|
||||
*/
|
||||
get sourceExists()
|
||||
{
|
||||
let result = this.getMigrateData(null, false);
|
||||
return result != 0;
|
||||
},
|
||||
|
||||
// Although Chrome supports multi-profiles, there is no way
|
||||
// to get profile lists.
|
||||
sourceHasMultipleProfiles: false,
|
||||
sourceProfiles: null,
|
||||
|
||||
/*
|
||||
* Return home page URL
|
||||
*
|
||||
* @return home page URL
|
||||
*/
|
||||
get sourceHomePageURL()
|
||||
{
|
||||
try {
|
||||
if (this._homepageURL)
|
||||
return this._homepageURL;
|
||||
|
||||
if (!this._paths.prefs)
|
||||
this.getMigrateData(null, false);
|
||||
|
||||
// XXX reading and parsing JSON is synchronous.
|
||||
let file = Cc[LOCAL_FILE_CID].createInstance(Ci.nsILocalFile);
|
||||
file.initWithPath(this._paths.prefs);
|
||||
let fstream = Cc[FILE_INPUT_STREAM_CID].
|
||||
createInstance(Ci.nsIFileInputStream);
|
||||
fstream.init(file, -1, 0, 0);
|
||||
this._homepageURL = JSON.parse(
|
||||
NetUtil.readInputStreamToString(fstream, fstream.available(),
|
||||
{ charset: "UTF-8" })).homepage;
|
||||
return this._homepageURL;
|
||||
} catch (e) {
|
||||
Cu.reportError(e);
|
||||
}
|
||||
return "";
|
||||
},
|
||||
|
||||
QueryInterface: XPCOMUtils.generateQI([
|
||||
Ci.nsIBrowserProfileMigrator
|
||||
]),
|
||||
|
||||
classDescription: "Chrome Profile Migrator",
|
||||
contractID: "@mozilla.org/profile/migrator;1?app=browser&type=chrome",
|
||||
classID: Components.ID("{4cec1de4-1671-4fc3-a53e-6c539dc77a26}")
|
||||
};
|
||||
|
||||
const NSGetFactory = XPCOMUtils.generateNSGetFactory([ChromeProfileMigrator]);
|
@ -67,5 +67,13 @@ CPPSRCS += nsSafariProfileMigrator.cpp \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
EXTRA_PP_COMPONENTS = \
|
||||
ChromeProfileMigrator.js \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_COMPONENTS = \
|
||||
BrowserProfileMigrators.manifest \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
@ -163,6 +163,7 @@ NS_IMPL_ISUPPORTS1(nsProfileMigrator, nsIProfileMigrator)
|
||||
#define INTERNAL_NAME_IEXPLORE "iexplore"
|
||||
#define INTERNAL_NAME_MOZILLA_SUITE "apprunner"
|
||||
#define INTERNAL_NAME_OPERA "opera"
|
||||
#define INTERNAL_NAME_CHROME "chrome"
|
||||
#endif
|
||||
|
||||
nsresult
|
||||
@ -246,6 +247,10 @@ nsProfileMigrator::GetDefaultBrowserMigratorKey(nsACString& aKey,
|
||||
aKey = "opera";
|
||||
return NS_OK;
|
||||
}
|
||||
else if (internalName.LowerCaseEqualsLiteral(INTERNAL_NAME_CHROME)) {
|
||||
aKey = "chrome";
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#else
|
||||
bool exists = false;
|
||||
@ -262,6 +267,7 @@ nsProfileMigrator::GetDefaultBrowserMigratorKey(nsACString& aKey,
|
||||
CHECK_MIGRATOR("safari");
|
||||
#endif
|
||||
CHECK_MIGRATOR("opera");
|
||||
CHECK_MIGRATOR("chrome");
|
||||
|
||||
#undef CHECK_MIGRATOR
|
||||
#endif
|
||||
|
@ -1532,10 +1532,10 @@ ContentPermissionPrompt.prototype = {
|
||||
|
||||
// Different message/options if it is a local file
|
||||
if (requestingURI.schemeIs("file")) {
|
||||
message = browserBundle.formatStringFromName("geolocation.fileWantsToKnow",
|
||||
message = browserBundle.formatStringFromName("geolocation.shareWithFile",
|
||||
[requestingURI.path], 1);
|
||||
} else {
|
||||
message = browserBundle.formatStringFromName("geolocation.siteWantsToKnow",
|
||||
message = browserBundle.formatStringFromName("geolocation.shareWithSite",
|
||||
[requestingURI.host], 1);
|
||||
|
||||
// Don't offer to "always/never share" in PB mode
|
||||
@ -1545,16 +1545,16 @@ ContentPermissionPrompt.prototype = {
|
||||
|
||||
if (!inPrivateBrowsing) {
|
||||
secondaryActions.push({
|
||||
label: browserBundle.GetStringFromName("geolocation.alwaysShare"),
|
||||
accessKey: browserBundle.GetStringFromName("geolocation.alwaysShare.accesskey"),
|
||||
label: browserBundle.GetStringFromName("geolocation.alwaysShareLocation"),
|
||||
accessKey: browserBundle.GetStringFromName("geolocation.alwaysShareLocation.accesskey"),
|
||||
callback: function () {
|
||||
Services.perms.add(requestingURI, "geo", Ci.nsIPermissionManager.ALLOW_ACTION);
|
||||
request.allow();
|
||||
}
|
||||
});
|
||||
secondaryActions.push({
|
||||
label: browserBundle.GetStringFromName("geolocation.neverShare"),
|
||||
accessKey: browserBundle.GetStringFromName("geolocation.neverShare.accesskey"),
|
||||
label: browserBundle.GetStringFromName("geolocation.neverShareLocation"),
|
||||
accessKey: browserBundle.GetStringFromName("geolocation.neverShareLocation.accesskey"),
|
||||
callback: function () {
|
||||
Services.perms.add(requestingURI, "geo", Ci.nsIPermissionManager.DENY_ACTION);
|
||||
request.cancel();
|
||||
|
@ -447,7 +447,6 @@ PlacesController.prototype = {
|
||||
* "tagChild" node is a child of a tag
|
||||
* "folder" node is a folder
|
||||
* "query" node is a query
|
||||
* "dynamiccontainer" node is a dynamic container
|
||||
* "separator" node is a separator line
|
||||
* "host" node is a host
|
||||
*
|
||||
@ -490,9 +489,6 @@ PlacesController.prototype = {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Ci.nsINavHistoryResultNode.RESULT_TYPE_DYNAMIC_CONTAINER:
|
||||
nodeData["dynamiccontainer"] = true;
|
||||
break;
|
||||
case Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER:
|
||||
case Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER_SHORTCUT:
|
||||
nodeData["folder"] = true;
|
||||
|
@ -359,7 +359,7 @@ SessionStoreService.prototype = {
|
||||
// replace the crashed session with a restore-page-only session
|
||||
let pageData = {
|
||||
url: "about:sessionrestore",
|
||||
formdata: { "#sessionData": JSON.stringify(this._initialState) }
|
||||
formdata: { "#sessionData": this._initialState }
|
||||
};
|
||||
this._initialState = { windows: [{ tabs: [{ entries: [pageData] }] }] };
|
||||
}
|
||||
@ -2140,10 +2140,17 @@ SessionStoreService.prototype = {
|
||||
}
|
||||
var isHTTPS = this._getURIFromString((aContent.parent || aContent).
|
||||
document.location.href).schemeIs("https");
|
||||
if (aFullData || this._checkPrivacyLevel(isHTTPS, aIsPinned) ||
|
||||
aContent.top.document.location.href == "about:sessionrestore") {
|
||||
let isAboutSR = aContent.top.document.location.href == "about:sessionrestore";
|
||||
if (aFullData || this._checkPrivacyLevel(isHTTPS, aIsPinned) || isAboutSR) {
|
||||
if (aFullData || aUpdateFormData) {
|
||||
let formData = this._collectFormDataForFrame(aContent.document);
|
||||
|
||||
// We want to avoid saving data for about:sessionrestore as a string.
|
||||
// Since it's stored in the form as stringified JSON, stringifying further
|
||||
// causes an explosion of escape characters. cf. bug 467409
|
||||
if (formData && isAboutSR)
|
||||
formData["#sessionData"] = JSON.parse(formData["#sessionData"]);
|
||||
|
||||
if (formData)
|
||||
aData.formdata = formData;
|
||||
else if (aData.formdata)
|
||||
@ -2981,8 +2988,9 @@ SessionStoreService.prototype = {
|
||||
restoreHistory:
|
||||
function sss_restoreHistory(aWindow, aTabs, aTabData, aIdMap, aDocIdentMap) {
|
||||
var _this = this;
|
||||
while (aTabs.length > 0 && (!aTabs[0].linkedBrowser.__SS_tabStillLoading || !aTabs[0].parentNode)) {
|
||||
aTabs.shift(); // this tab got removed before being completely restored
|
||||
// if the tab got removed before being completely restored, then skip it
|
||||
while (aTabs.length > 0 && !(this._canRestoreTabHistory(aTabs[0]))) {
|
||||
aTabs.shift();
|
||||
aTabData.shift();
|
||||
}
|
||||
if (aTabs.length == 0) {
|
||||
@ -3379,6 +3387,13 @@ SessionStoreService.prototype = {
|
||||
|
||||
let eventType;
|
||||
let value = aData[key];
|
||||
|
||||
// for about:sessionrestore we saved the field as JSON to avoid nested
|
||||
// instances causing humongous sessionstore.js files. cf. bug 467409
|
||||
if (aURL == "about:sessionrestore" && typeof value == "object") {
|
||||
value = JSON.stringify(value);
|
||||
}
|
||||
|
||||
if (typeof value == "string" && node.type != "file") {
|
||||
if (node.value == value)
|
||||
continue; // don't dispatch an input event for no change
|
||||
@ -3996,6 +4011,20 @@ SessionStoreService.prototype = {
|
||||
!aTabState.userTypedValue);
|
||||
},
|
||||
|
||||
/**
|
||||
* Determine if we can restore history into this tab.
|
||||
* This will be false when a tab has been removed (usually between
|
||||
* restoreHistoryPrecursor && restoreHistory) or if the tab is still marked
|
||||
* as loading.
|
||||
*
|
||||
* @param aTab
|
||||
* @returns boolean
|
||||
*/
|
||||
_canRestoreTabHistory: function sss__canRestoreTabHistory(aTab) {
|
||||
return aTab.parentNode && aTab.linkedBrowser &&
|
||||
aTab.linkedBrowser.__SS_tabStillLoading;
|
||||
},
|
||||
|
||||
/**
|
||||
* This is going to take a state as provided at startup (via
|
||||
* nsISessionStartup.state) and split it into 2 parts. The first part
|
||||
|
@ -100,6 +100,7 @@ _BROWSER_TEST_FILES = \
|
||||
browser_465223.js \
|
||||
browser_466937.js \
|
||||
browser_466937_sample.html \
|
||||
browser_467409-backslashplosion.js \
|
||||
browser_477657.js \
|
||||
browser_480148.js \
|
||||
browser_480893.js \
|
||||
|
@ -0,0 +1,90 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
// Test Summary:
|
||||
// 1. Open about:sessionrestore via setBrowserState where formdata is a JS object, not a string
|
||||
// 1a. Check that #sessionData on the page is readable after JSON.parse (skipped, checking formdata is sufficient)
|
||||
// 1b. Check that there are no backslashes in the formdata
|
||||
// 1c. Check that formdata (via getBrowserState) doesn't require JSON.parse
|
||||
//
|
||||
// 2. Use the current state (currently about:sessionrestore with data) and then open than in a new instance of about:sessionrestore
|
||||
// 2a. Check that there are no backslashes in the formdata
|
||||
// 2b. Check that formdata (via getBrowserState) doesn't require JSON.parse
|
||||
//
|
||||
// 3. [backwards compat] Use a stringified state as formdata when opening about:sessionrestore
|
||||
// 3a. Make sure there are nodes in the tree on about:sessionrestore (skipped, checking formdata is sufficient)
|
||||
// 3b. Check that there are no backslashes in the formdata
|
||||
// 3c. Check that formdata (via getBrowserState) doesn't require JSON.parse
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
|
||||
let blankState = { windows: [{ tabs: [{ entries: [{ url: "about:blank" }] }]}]};
|
||||
let crashState = { windows: [{ tabs: [{ entries: [{ url: "about:mozilla" }] }]}]};
|
||||
|
||||
let pagedata = { url: "about:sessionrestore",
|
||||
formdata: { "#sessionData": crashState } };
|
||||
let state = { windows: [{ tabs: [{ entries: [pagedata] }] }] };
|
||||
|
||||
// test1 calls test2 calls test3 calls finish
|
||||
test1(state);
|
||||
|
||||
|
||||
function test1(aState) {
|
||||
waitForBrowserState(aState, function() {
|
||||
checkState("test1", test2);
|
||||
});
|
||||
}
|
||||
|
||||
function test2(aState) {
|
||||
let pagedata2 = { url: "about:sessionrestore",
|
||||
formdata: { "#sessionData": aState } };
|
||||
let state2 = { windows: [{ tabs: [{ entries: [pagedata2] }] }] };
|
||||
|
||||
waitForBrowserState(state2, function() {
|
||||
checkState("test2", test3);
|
||||
});
|
||||
}
|
||||
|
||||
function test3(aState) {
|
||||
let pagedata3 = { url: "about:sessionrestore",
|
||||
formdata: { "#sessionData": JSON.stringify(crashState) } };
|
||||
let state3 = { windows: [{ tabs: [{ entries: [pagedata3] }] }] };
|
||||
waitForBrowserState(state3, function() {
|
||||
// In theory we should do inspection of the treeview on about:sessionrestore,
|
||||
// but we don't actually need to. If we fail tests in checkState then
|
||||
// about:sessionrestore won't be able to turn the form value into a usable page.
|
||||
checkState("test3", function() waitForBrowserState(blankState, finish));
|
||||
});
|
||||
}
|
||||
|
||||
function checkState(testName, callback) {
|
||||
let curState = JSON.parse(ss.getBrowserState());
|
||||
let formdata = curState.windows[0].tabs[0].entries[0].formdata;
|
||||
|
||||
ok(formdata["#sessionData"], testName + ": we have form data for about:sessionrestore");
|
||||
|
||||
let sessionData_raw = JSON.stringify(formdata["#sessionData"]);
|
||||
ok(!/\\/.test(sessionData_raw), testName + ": #sessionData contains no backslashes");
|
||||
info(sessionData_raw);
|
||||
|
||||
let gotError = false;
|
||||
try {
|
||||
JSON.parse(formdata["#sessionData"]);
|
||||
}
|
||||
catch (e) {
|
||||
info(testName + ": got error: " + e);
|
||||
gotError = true;
|
||||
}
|
||||
ok(gotError, testName + ": attempting to JSON.parse form data threw error");
|
||||
|
||||
// Panorama sticks JSON into extData, which we stringify causing the
|
||||
// naive backslash check to fail. extData doesn't matter in the grand
|
||||
// scheme here, so we'll delete the extData so doesn't end up in future states.
|
||||
delete curState.windows[0].extData;
|
||||
delete curState.windows[0].tabs[0].extData;
|
||||
callback(curState);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ function test() {
|
||||
};
|
||||
let pageData = {
|
||||
url: "about:sessionrestore",
|
||||
formdata: { "#sessionData": "(" + JSON.stringify(oldState) + ")" }
|
||||
formdata: { "#sessionData": oldState }
|
||||
};
|
||||
let state = { windows: [{ tabs: [{ entries: [pageData] }] }] };
|
||||
|
||||
|
@ -1091,8 +1091,8 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
|
||||
// immediately - don't animate
|
||||
remove: function GroupItem_remove(a, options) {
|
||||
try {
|
||||
var $el;
|
||||
var item;
|
||||
let $el;
|
||||
let item;
|
||||
|
||||
if (a.isAnItem) {
|
||||
item = a;
|
||||
@ -1105,7 +1105,7 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
|
||||
if (!options)
|
||||
options = {};
|
||||
|
||||
var index = this._children.indexOf(item);
|
||||
let index = this._children.indexOf(item);
|
||||
if (index != -1)
|
||||
this._children.splice(index, 1);
|
||||
|
||||
@ -1142,7 +1142,9 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
|
||||
options.dontClose = true;
|
||||
|
||||
let closed = options.dontClose ? false : this.closeIfEmpty();
|
||||
if (closed) {
|
||||
if (closed ||
|
||||
(this._children.length == 0 && !gBrowser.selectedTab.pinned &&
|
||||
!item.isDragging)) {
|
||||
this._makeLastActiveGroupItemActive();
|
||||
} else if (!options.dontArrange) {
|
||||
this.arrange({animate: !options.immediately});
|
||||
|
@ -260,9 +260,15 @@ TabItem.prototype = Utils.extend(new Item(), new Subscribable(), {
|
||||
|
||||
function TabItem_loadThumbnail_callback(error, imageData) {
|
||||
// we could have been unlinked while waiting for the thumbnail to load
|
||||
if (error || !imageData || !self.tab)
|
||||
if (!self.tab)
|
||||
return;
|
||||
|
||||
if (error || !imageData) {
|
||||
// paint the canvas to avoid leaving traces when dragging tab over it
|
||||
self.tabCanvas.paint();
|
||||
return;
|
||||
}
|
||||
|
||||
self._sendToSubscribers("loadedCachedImageData");
|
||||
|
||||
// If we have a cached image, then show it if the loaded URL matches
|
||||
|
@ -164,6 +164,7 @@ _BROWSER_FILES = \
|
||||
browser_tabview_bug685692.js \
|
||||
browser_tabview_bug686654.js \
|
||||
browser_tabview_bug697390.js \
|
||||
browser_tabview_bug705621.js \
|
||||
browser_tabview_click_group.js \
|
||||
browser_tabview_dragdrop.js \
|
||||
browser_tabview_exit_button.js \
|
||||
|
@ -49,6 +49,10 @@ function onTabViewWindowLoaded() {
|
||||
is(appTabCount(groupItemTwo), 1,
|
||||
"there's an app tab icon in the second group");
|
||||
|
||||
// When the tab was pinned, the last active group with an item got the focus.
|
||||
// Therefore, switching the focus back to group item one.
|
||||
contentWindow.UI.setActive(groupItemOne);
|
||||
|
||||
// unpin the tab, make sure the icon goes away and the TabItem comes on
|
||||
gBrowser.unpinTab(xulTab);
|
||||
is(groupItemOne._children.length, 1, "the app tab's TabItem is back");
|
||||
|
@ -104,6 +104,10 @@ function onTabViewShown(win) {
|
||||
ok(!trayContainer.hasClass("appTabTrayContainerTruncated"),
|
||||
"$appTabTray container does not have .appTabTrayContainerTruncated");
|
||||
|
||||
// When the tab was pinned, the last active group with an item got the focus.
|
||||
// Therefore, switching the focus back to group item one.
|
||||
contentWindow.UI.setActive(groupItem);
|
||||
|
||||
// unpin the last remaining tab
|
||||
gBrowser.unpinTab(xulTabs[0]);
|
||||
|
||||
|
30
browser/components/tabview/test/browser_tabview_bug705621.js
Normal file
@ -0,0 +1,30 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
|
||||
newWindowWithTabView(function(win) {
|
||||
registerCleanupFunction(function() {
|
||||
win.close();
|
||||
});
|
||||
|
||||
let cw = win.TabView.getContentWindow();
|
||||
|
||||
let groupItemOne = cw.GroupItems.groupItems[0];
|
||||
is(groupItemOne.getChildren().length, 1, "Group one has 1 tab item");
|
||||
|
||||
let groupItemTwo = createGroupItemWithBlankTabs(win, 300, 300, 40, 1);
|
||||
is(groupItemTwo.getChildren().length, 1, "Group two has 2 tab items");
|
||||
|
||||
whenTabViewIsHidden(function() {
|
||||
executeSoon(function() {
|
||||
win.gBrowser.removeTab(win.gBrowser.selectedTab);
|
||||
is(cw.UI.getActiveTab(), groupItemOne.getChild(0), "TabItem in Group one is selected");
|
||||
finish();
|
||||
});
|
||||
}, win);
|
||||
groupItemTwo.getChild(0).zoomIn();
|
||||
});
|
||||
}
|
||||
|
@ -784,7 +784,7 @@ let UI = {
|
||||
return;
|
||||
}
|
||||
|
||||
var groupItem = GroupItems.getActiveGroupItem();
|
||||
let groupItem = GroupItems.getActiveGroupItem();
|
||||
|
||||
// 1) Only go back to the TabView tab when there you close the last
|
||||
// tab of a groupItem.
|
||||
|
@ -147,9 +147,16 @@ Highlighter.prototype = {
|
||||
|
||||
this.buildInfobar(controlsBox);
|
||||
|
||||
if (!this.IUI.store.getValue(this.winID, "inspecting")) {
|
||||
this.veilContainer.setAttribute("locked", true);
|
||||
this.nodeInfo.container.setAttribute("locked", true);
|
||||
}
|
||||
|
||||
this.browser.addEventListener("resize", this, true);
|
||||
this.browser.addEventListener("scroll", this, true);
|
||||
|
||||
this.transitionDisabler = null;
|
||||
|
||||
this.handleResize();
|
||||
},
|
||||
|
||||
@ -487,7 +494,7 @@ Highlighter.prototype = {
|
||||
this.nodeInfo.tagNameLabel.textContent = this.node.tagName;
|
||||
|
||||
// ID
|
||||
this.nodeInfo.idLabel.textContent = this.node.id;
|
||||
this.nodeInfo.idLabel.textContent = this.node.id ? "#" + this.node.id : "";
|
||||
|
||||
// Classes
|
||||
let classes = this.nodeInfo.classesBox;
|
||||
@ -500,7 +507,7 @@ Highlighter.prototype = {
|
||||
for (let i = 0; i < this.node.classList.length; i++) {
|
||||
let classLabel = this.chromeDoc.createElement("label");
|
||||
classLabel.className = "highlighter-nodeinfobar-class plain";
|
||||
classLabel.textContent = this.node.classList[i];
|
||||
classLabel.textContent = "." + this.node.classList[i];
|
||||
fragment.appendChild(classLabel);
|
||||
}
|
||||
classes.appendChild(fragment);
|
||||
@ -665,6 +672,7 @@ Highlighter.prototype = {
|
||||
this.handleMouseMove(aEvent);
|
||||
break;
|
||||
case "resize":
|
||||
this.brieflyDisableTransitions();
|
||||
this.handleResize(aEvent);
|
||||
break;
|
||||
case "dblclick":
|
||||
@ -674,11 +682,32 @@ Highlighter.prototype = {
|
||||
aEvent.preventDefault();
|
||||
break;
|
||||
case "scroll":
|
||||
this.brieflyDisableTransitions();
|
||||
this.highlight();
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Disable the CSS transitions for a short time to avoid laggy animations
|
||||
* during scrolling or resizing.
|
||||
*/
|
||||
brieflyDisableTransitions: function Highlighter_brieflyDisableTransitions()
|
||||
{
|
||||
if (this.transitionDisabler) {
|
||||
this.IUI.win.clearTimeout(this.transitionDisabler);
|
||||
} else {
|
||||
this.veilContainer.setAttribute("disable-transitions", "true");
|
||||
this.nodeInfo.container.setAttribute("disable-transitions", "true");
|
||||
}
|
||||
this.transitionDisabler =
|
||||
this.IUI.win.setTimeout(function() {
|
||||
this.veilContainer.removeAttribute("disable-transitions");
|
||||
this.nodeInfo.container.removeAttribute("disable-transitions");
|
||||
this.transitionDisabler = null;
|
||||
}.bind(this), 500);
|
||||
},
|
||||
|
||||
/**
|
||||
* Handle clicks.
|
||||
*
|
||||
@ -963,6 +992,8 @@ InspectorUI.prototype = {
|
||||
initializeHighlighter: function IUI_initializeHighlighter()
|
||||
{
|
||||
this.highlighter = new Highlighter(this);
|
||||
this.browser.addEventListener("keypress", this, true);
|
||||
this.highlighter.highlighterContainer.addEventListener("keypress", this, true);
|
||||
this.highlighterReady();
|
||||
},
|
||||
|
||||
@ -1086,10 +1117,6 @@ InspectorUI.prototype = {
|
||||
this.treePanel.closeEditor();
|
||||
|
||||
this.inspectToolbutton.checked = true;
|
||||
// Attach event listeners to content window and child windows to enable
|
||||
// highlighting and click to stop inspection.
|
||||
this.browser.addEventListener("keypress", this, true);
|
||||
this.highlighter.highlighterContainer.addEventListener("keypress", this, true);
|
||||
this.highlighter.attachInspectListeners();
|
||||
|
||||
this.inspecting = true;
|
||||
|
@ -24,9 +24,9 @@ function test()
|
||||
function setupInfobarTest()
|
||||
{
|
||||
nodes = [
|
||||
{node: doc.querySelector("#top"), position: "bottom", tag: "DIV", id: "top", classes: "class1 class2"},
|
||||
{node: doc.querySelector("#vertical"), position: "overlap", tag: "DIV", id: "vertical", classes: ""},
|
||||
{node: doc.querySelector("#bottom"), position: "top", tag: "DIV", id: "bottom", classes: ""},
|
||||
{node: doc.querySelector("#top"), position: "bottom", tag: "DIV", id: "#top", classes: ".class1 .class2"},
|
||||
{node: doc.querySelector("#vertical"), position: "overlap", tag: "DIV", id: "#vertical", classes: ""},
|
||||
{node: doc.querySelector("#bottom"), position: "top", tag: "DIV", id: "#bottom", classes: ""},
|
||||
{node: doc.querySelector("body"), position: "overlap", tag: "BODY", id: "", classes: ""},
|
||||
]
|
||||
|
||||
|
@ -187,10 +187,18 @@ function inspectorFocusTab2()
|
||||
is(InspectorUI.store.length, 2, "Inspector.store.length is 2");
|
||||
isnot(InspectorUI.selection, div, "selection does not match the div element");
|
||||
|
||||
// Switch back to tab 1.
|
||||
Services.obs.addObserver(inspectorSecondFocusTab1,
|
||||
InspectorUI.INSPECTOR_NOTIFICATIONS.TREEPANELREADY, false);
|
||||
gBrowser.selectedTab = tab1;
|
||||
// Make sure keybindings still sork
|
||||
EventUtils.synthesizeKey("VK_RETURN", { });
|
||||
|
||||
executeSoon(function() {
|
||||
ok(InspectorUI.inspecting, "Inspector is highlighting");
|
||||
InspectorUI.toggleInspection();
|
||||
|
||||
// Switch back to tab 1.
|
||||
Services.obs.addObserver(inspectorSecondFocusTab1,
|
||||
InspectorUI.INSPECTOR_NOTIFICATIONS.TREEPANELREADY, false);
|
||||
gBrowser.selectedTab = tab1;
|
||||
});
|
||||
}
|
||||
|
||||
function inspectorSecondFocusTab1()
|
||||
|
@ -29,6 +29,7 @@
|
||||
* Mihai Șucan <mihai.sucan@gmail.com>
|
||||
* Michael Ratcliffe <mratcliffe@mozilla.com>
|
||||
* Joe Walker <jwalker@mozilla.com>
|
||||
* Sonny Piers <sonny.piers@gmail.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
@ -284,6 +285,9 @@ const ERRORS = { LOG_MESSAGE_MISSING_ARGS:
|
||||
// The indent of a console group in pixels.
|
||||
const GROUP_INDENT = 12;
|
||||
|
||||
// The pref prefix for webconsole filters
|
||||
const PREFS_PREFIX = "devtools.webconsole.filter.";
|
||||
|
||||
/**
|
||||
* Implements the nsIStreamListener and nsIRequestObserver interface. Used
|
||||
* within the HS_httpObserverFactory function to get the response body of
|
||||
@ -1790,9 +1794,18 @@ HUD_SERVICE.prototype =
|
||||
if (!aHUDId){
|
||||
throw new Error(ERRORS.MISSING_ARGS);
|
||||
}
|
||||
this.filterPrefs[aHUDId] = this.defaultFilterPrefs;
|
||||
// init storage objects:
|
||||
this.storage.createDisplay(aHUDId);
|
||||
this.filterPrefs[aHUDId] = {
|
||||
network: Services.prefs.getBoolPref(PREFS_PREFIX + "network"),
|
||||
networkinfo: Services.prefs.getBoolPref(PREFS_PREFIX + "networkinfo"),
|
||||
csserror: Services.prefs.getBoolPref(PREFS_PREFIX + "csserror"),
|
||||
cssparser: Services.prefs.getBoolPref(PREFS_PREFIX + "cssparser"),
|
||||
exception: Services.prefs.getBoolPref(PREFS_PREFIX + "exception"),
|
||||
jswarn: Services.prefs.getBoolPref(PREFS_PREFIX + "jswarn"),
|
||||
error: Services.prefs.getBoolPref(PREFS_PREFIX + "error"),
|
||||
info: Services.prefs.getBoolPref(PREFS_PREFIX + "info"),
|
||||
warn: Services.prefs.getBoolPref(PREFS_PREFIX + "warn"),
|
||||
log: Services.prefs.getBoolPref(PREFS_PREFIX + "log"),
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
@ -1839,9 +1852,6 @@ HUD_SERVICE.prototype =
|
||||
|
||||
delete this.hudReferences[aHUDId];
|
||||
|
||||
// remove the related storage object
|
||||
this.storage.removeDisplay(aHUDId);
|
||||
|
||||
for (let windowID in this.windowIds) {
|
||||
if (this.windowIds[windowID] == aHUDId) {
|
||||
delete this.windowIds[windowID];
|
||||
@ -1882,10 +1892,6 @@ HUD_SERVICE.prototype =
|
||||
return;
|
||||
}
|
||||
|
||||
this.storage = new ConsoleStorage();
|
||||
this.defaultFilterPrefs = this.storage.defaultDisplayPrefs;
|
||||
this.defaultGlobalConsolePrefs = this.storage.defaultGlobalConsolePrefs;
|
||||
|
||||
// begin observing HTTP traffic
|
||||
this.startHTTPObservation();
|
||||
|
||||
@ -1911,10 +1917,7 @@ HUD_SERVICE.prototype =
|
||||
this.openRequests = {};
|
||||
this.openResponseHeaders = {};
|
||||
|
||||
// delete the storage as it holds onto channels
|
||||
delete this.storage;
|
||||
delete this.defaultFilterPrefs;
|
||||
delete this.defaultGlobalConsolePrefs;
|
||||
|
||||
delete this.lastFinishedRequestCallback;
|
||||
|
||||
@ -3938,7 +3941,7 @@ HeadsUpDisplay.prototype = {
|
||||
let menuPopup = this.makeXULNode("menupopup");
|
||||
toolbarButton.appendChild(menuPopup);
|
||||
|
||||
let allChecked = true;
|
||||
let someChecked = false;
|
||||
for (let i = 0; i < aDescriptor.severities.length; i++) {
|
||||
let severity = aDescriptor.severities[i];
|
||||
let menuItem = this.makeXULNode("menuitem");
|
||||
@ -3952,8 +3955,8 @@ HeadsUpDisplay.prototype = {
|
||||
|
||||
let checked = this.filterPrefs[prefKey];
|
||||
menuItem.setAttribute("checked", checked);
|
||||
if (!checked) {
|
||||
allChecked = false;
|
||||
if (checked) {
|
||||
someChecked = true;
|
||||
}
|
||||
|
||||
menuItem.addEventListener("command", toggleFilter, false);
|
||||
@ -3961,7 +3964,7 @@ HeadsUpDisplay.prototype = {
|
||||
menuPopup.appendChild(menuItem);
|
||||
}
|
||||
|
||||
toolbarButton.setAttribute("checked", allChecked);
|
||||
toolbarButton.setAttribute("checked", someChecked);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -6331,175 +6334,6 @@ HeadsUpDisplayUICommands = {
|
||||
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// ConsoleStorage
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var prefs = Services.prefs;
|
||||
|
||||
const GLOBAL_STORAGE_INDEX_ID = "GLOBAL_CONSOLE";
|
||||
const PREFS_PREFIX = "devtools.webconsole.filter.";
|
||||
const PREFS = { network: PREFS_PREFIX + "network",
|
||||
networkinfo: PREFS_PREFIX + "networkinfo",
|
||||
csserror: PREFS_PREFIX + "csserror",
|
||||
cssparser: PREFS_PREFIX + "cssparser",
|
||||
exception: PREFS_PREFIX + "exception",
|
||||
jswarn: PREFS_PREFIX + "jswarn",
|
||||
error: PREFS_PREFIX + "error",
|
||||
info: PREFS_PREFIX + "info",
|
||||
warn: PREFS_PREFIX + "warn",
|
||||
log: PREFS_PREFIX + "log",
|
||||
};
|
||||
|
||||
function ConsoleStorage()
|
||||
{
|
||||
this.sequencer = null;
|
||||
this.consoleDisplays = {};
|
||||
// each display will have an index that tracks each ConsoleEntry
|
||||
this.displayIndexes = {};
|
||||
this.globalStorageIndex = [];
|
||||
this.globalDisplay = {};
|
||||
this.createDisplay(GLOBAL_STORAGE_INDEX_ID);
|
||||
// TODO: need to create a method that truncates the message
|
||||
// see bug 570543
|
||||
|
||||
this.defaultDisplayPrefs = {
|
||||
network: prefs.getBoolPref(PREFS.network),
|
||||
networkinfo: prefs.getBoolPref(PREFS.networkinfo),
|
||||
csserror: prefs.getBoolPref(PREFS.csserror),
|
||||
cssparser: prefs.getBoolPref(PREFS.cssparser),
|
||||
exception: prefs.getBoolPref(PREFS.exception),
|
||||
jswarn: prefs.getBoolPref(PREFS.jswarn),
|
||||
error: prefs.getBoolPref(PREFS.error),
|
||||
info: prefs.getBoolPref(PREFS.info),
|
||||
warn: prefs.getBoolPref(PREFS.warn),
|
||||
log: prefs.getBoolPref(PREFS.log),
|
||||
};
|
||||
}
|
||||
|
||||
ConsoleStorage.prototype = {
|
||||
|
||||
sequenceId: function CS_sequencerId()
|
||||
{
|
||||
if (!this.sequencer) {
|
||||
this.sequencer = this.createSequencer();
|
||||
}
|
||||
return this.sequencer.next();
|
||||
},
|
||||
|
||||
createSequencer: function CS_createSequencer()
|
||||
{
|
||||
function sequencer(aInt) {
|
||||
while(1) {
|
||||
aInt++;
|
||||
yield aInt;
|
||||
}
|
||||
}
|
||||
return sequencer(-1);
|
||||
},
|
||||
|
||||
globalStore: function CS_globalStore(aIndex)
|
||||
{
|
||||
return this.displayStore(GLOBAL_CONSOLE_DOM_NODE_ID);
|
||||
},
|
||||
|
||||
displayStore: function CS_displayStore(aId)
|
||||
{
|
||||
var self = this;
|
||||
var idx = -1;
|
||||
var id = aId;
|
||||
var aLength = self.displayIndexes[id].length;
|
||||
|
||||
function displayStoreGenerator(aInt, aLength)
|
||||
{
|
||||
// create a generator object to iterate through any of the display stores
|
||||
// from any index-starting-point
|
||||
while(1) {
|
||||
// throw if we exceed the length of displayIndexes?
|
||||
aInt++;
|
||||
var indexIt = self.displayIndexes[id];
|
||||
var index = indexIt[aInt];
|
||||
if (aLength < aInt) {
|
||||
// try to see if we have more entries:
|
||||
var newLength = self.displayIndexes[id].length;
|
||||
if (newLength > aLength) {
|
||||
aLength = newLength;
|
||||
}
|
||||
else {
|
||||
throw new StopIteration();
|
||||
}
|
||||
}
|
||||
var entry = self.consoleDisplays[id][index];
|
||||
yield entry;
|
||||
}
|
||||
}
|
||||
|
||||
return displayStoreGenerator(-1, aLength);
|
||||
},
|
||||
|
||||
recordEntries: function CS_recordEntries(aHUDId, aConfigArray)
|
||||
{
|
||||
var len = aConfigArray.length;
|
||||
for (var i = 0; i < len; i++){
|
||||
this.recordEntry(aHUDId, aConfigArray[i]);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
recordEntry: function CS_recordEntry(aHUDId, aConfig)
|
||||
{
|
||||
var id = this.sequenceId();
|
||||
|
||||
this.globalStorageIndex[id] = { hudId: aHUDId };
|
||||
|
||||
var displayStorage = this.consoleDisplays[aHUDId];
|
||||
|
||||
var displayIndex = this.displayIndexes[aHUDId];
|
||||
|
||||
if (displayStorage && displayIndex) {
|
||||
var entry = new ConsoleEntry(aConfig, id);
|
||||
displayIndex.push(entry.id);
|
||||
displayStorage[entry.id] = entry;
|
||||
return entry;
|
||||
}
|
||||
else {
|
||||
throw new Error("Cannot get displayStorage or index object for id " + aHUDId);
|
||||
}
|
||||
},
|
||||
|
||||
getEntry: function CS_getEntry(aId)
|
||||
{
|
||||
var display = this.globalStorageIndex[aId];
|
||||
var storName = display.hudId;
|
||||
return this.consoleDisplays[storName][aId];
|
||||
},
|
||||
|
||||
updateEntry: function CS_updateEntry(aUUID)
|
||||
{
|
||||
// update an individual entry
|
||||
// TODO: see bug 568634
|
||||
},
|
||||
|
||||
createDisplay: function CS_createdisplay(aId)
|
||||
{
|
||||
if (!this.consoleDisplays[aId]) {
|
||||
this.consoleDisplays[aId] = {};
|
||||
this.displayIndexes[aId] = [];
|
||||
}
|
||||
},
|
||||
|
||||
removeDisplay: function CS_removeDisplay(aId)
|
||||
{
|
||||
try {
|
||||
delete this.consoleDisplays[aId];
|
||||
delete this.displayIndexes[aId];
|
||||
}
|
||||
catch (ex) {
|
||||
Cu.reportError("Could not remove console display for id " + aId);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* A Console log entry
|
||||
*
|
||||
|
@ -49,7 +49,7 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<link rel="stylesheet" href="chrome://global/skin/webConsole_networkPanel.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="chrome://browser/skin/devtools/webconsole_networkpanel.css" type="text/css"/>
|
||||
</head>
|
||||
<body role="application">
|
||||
<table id="header">
|
||||
|
@ -22,6 +22,7 @@
|
||||
# Patrick Walton <pcwalton@mozilla.com>
|
||||
# Mihai Șucan <mihai.sucan@gmail.com>
|
||||
# Rob Campbell <rcampbell@mozilla.com>
|
||||
# Sonny Piers <sonny.piers@gmail.com>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
@ -81,10 +82,6 @@ _BROWSER_TEST_FILES = \
|
||||
browser_webconsole_property_panel.js \
|
||||
browser_webconsole_property_provider.js \
|
||||
browser_webconsole_registries.js \
|
||||
browser_webconsole_storage_create_display.js \
|
||||
browser_webconsole_storage_iteration.js \
|
||||
browser_webconsole_storage_record_entry.js \
|
||||
browser_webconsole_storage_record_many_entries.js \
|
||||
browser_webconsole_bug_587617_output_copy.js \
|
||||
browser_webconsole_bug_585237_line_limit.js \
|
||||
browser_webconsole_bug_581231_close_button.js \
|
||||
|
@ -3,57 +3,114 @@
|
||||
|
||||
function test() {
|
||||
let prefService = Services.prefs;
|
||||
let prefs = [
|
||||
"network",
|
||||
"networkinfo",
|
||||
"csserror",
|
||||
"cssparser",
|
||||
"exception",
|
||||
"jswarn",
|
||||
"error",
|
||||
"warn",
|
||||
"info",
|
||||
"log"
|
||||
];
|
||||
|
||||
//Set all prefs to true
|
||||
prefs.forEach(function(pref) {
|
||||
prefService.setBoolPref("devtools.webconsole.filter." + pref, true);
|
||||
});
|
||||
let prefs = {
|
||||
"net": [
|
||||
"network",
|
||||
"networkinfo"
|
||||
],
|
||||
"css": [
|
||||
"csserror",
|
||||
"cssparser"
|
||||
],
|
||||
"js": [
|
||||
"exception",
|
||||
"jswarn"
|
||||
],
|
||||
"logging": [
|
||||
"error",
|
||||
"warn",
|
||||
"info",
|
||||
"log"
|
||||
]
|
||||
};
|
||||
|
||||
// Set all prefs to true
|
||||
for (let category in prefs) {
|
||||
prefs[category].forEach(function(pref) {
|
||||
prefService.setBoolPref("devtools.webconsole.filter." + pref, true);
|
||||
});
|
||||
}
|
||||
|
||||
addTab("about:blank");
|
||||
openConsole();
|
||||
|
||||
let hud = HUDService.getHudByWindow(content);
|
||||
let hudId = HUDService.getHudIdByWindow(content);
|
||||
|
||||
//Check if the filters menuitems exists and is checked
|
||||
prefs.forEach(function(pref) {
|
||||
let checked = hud.HUDBox.querySelector("menuitem[prefKey=" + pref + "]").
|
||||
getAttribute("checked");
|
||||
is(checked, "true", "menuitem for " + pref + " exists and is checked");
|
||||
});
|
||||
|
||||
//Set all prefs to false
|
||||
prefs.forEach(function(pref) {
|
||||
HUDService.setFilterState(hudId, pref, false);
|
||||
});
|
||||
let hud = HUDService.getHudByWindow(content);
|
||||
|
||||
// Check if the filters menuitems exists and are checked
|
||||
for (let category in prefs) {
|
||||
let button = hud.HUDBox.querySelector(".webconsole-filter-button[category=\""
|
||||
+ category + "\"]");
|
||||
ok(isChecked(button), "main button for " + category + " category is checked");
|
||||
|
||||
prefs[category].forEach(function(pref) {
|
||||
let menuitem = hud.HUDBox.querySelector("menuitem[prefKey=" + pref + "]");
|
||||
ok(isChecked(menuitem), "menuitem for " + pref + " is checked");
|
||||
});
|
||||
}
|
||||
|
||||
// Set all prefs to false
|
||||
for (let category in prefs) {
|
||||
prefs[category].forEach(function(pref) {
|
||||
HUDService.setFilterState(hud.hudId, pref, false);
|
||||
});
|
||||
}
|
||||
|
||||
//Re-init the console
|
||||
closeConsole();
|
||||
openConsole();
|
||||
|
||||
hud = HUDService.getHudByWindow(content);
|
||||
|
||||
//Check if filters menuitems exists and are unchecked
|
||||
prefs.forEach(function(pref) {
|
||||
let checked = hud.HUDBox.querySelector("menuitem[prefKey=" + pref + "]").
|
||||
getAttribute("checked");
|
||||
is(checked, "false", "menuitem for " + pref + " exists and is not checked");
|
||||
prefService.clearUserPref("devtools.webconsole.filter." + pref);
|
||||
});
|
||||
|
||||
|
||||
// Check if the filter button and menuitems are unchecked
|
||||
for (let category in prefs) {
|
||||
let button = hud.HUDBox.querySelector(".webconsole-filter-button[category=\""
|
||||
+ category + "\"]");
|
||||
ok(isUnchecked(button), "main button for " + category + " category is not checked");
|
||||
|
||||
prefs[category].forEach(function(pref) {
|
||||
let menuitem = hud.HUDBox.querySelector("menuitem[prefKey=" + pref + "]");
|
||||
ok(isUnchecked(menuitem), "menuitem for " + pref + " is not checked");
|
||||
});
|
||||
}
|
||||
|
||||
// Set first pref in each category to true
|
||||
for (let category in prefs) {
|
||||
HUDService.setFilterState(hud.hudId, prefs[category][0], true);
|
||||
}
|
||||
|
||||
// Re-init the console
|
||||
closeConsole();
|
||||
openConsole();
|
||||
|
||||
hud = HUDService.getHudByWindow(content);
|
||||
|
||||
// Check the main category button is checked and first menuitem is checked
|
||||
for (let category in prefs) {
|
||||
let button = hud.HUDBox.querySelector(".webconsole-filter-button[category=\""
|
||||
+ category + "\"]");
|
||||
ok(isChecked(button), category + " button is checked when first pref is true");
|
||||
|
||||
let pref = prefs[category][0];
|
||||
let menuitem = hud.HUDBox.querySelector("menuitem[prefKey=" + pref + "]");
|
||||
ok(isChecked(menuitem), "first " + category + " menuitem is checked");
|
||||
}
|
||||
|
||||
// Clear prefs
|
||||
for (let category in prefs) {
|
||||
prefs[category].forEach(function(pref) {
|
||||
prefService.clearUserPref("devtools.webconsole.filter." + pref);
|
||||
});
|
||||
}
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
|
||||
finish();
|
||||
}
|
||||
|
||||
function isChecked(aNode) {
|
||||
return aNode.getAttribute("checked") === "true";
|
||||
}
|
||||
|
||||
function isUnchecked(aNode) {
|
||||
return aNode.getAttribute("checked") === "false";
|
||||
}
|
||||
|
@ -1,92 +0,0 @@
|
||||
/* vim:set ts=2 sw=2 sts=2 et: */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is DevTools test code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Mozilla Foundation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2010
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* David Dahl <ddahl@mozilla.com>
|
||||
* Patrick Walton <pcwalton@mozilla.com>
|
||||
* Julian Viereck <jviereck@mozilla.com>
|
||||
* Mihai Sucan <mihai.sucan@gmail.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
// Test that the iterator API of the console message store works.
|
||||
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
||||
browser.addEventListener("DOMContentLoaded", testStorageIteration, false);
|
||||
}
|
||||
|
||||
function testStorageIteration() {
|
||||
browser.removeEventListener("DOMContentLoaded", testStorageIteration,
|
||||
false);
|
||||
|
||||
openConsole();
|
||||
|
||||
let cs = HUDService.storage;
|
||||
|
||||
// Must have enough entries present to avoid exhausting the iterators below.
|
||||
cs.createDisplay("foo");
|
||||
for (let i = 0; i < 300; i++) {
|
||||
cs.recordEntry("foo", { logLevel: "network", message: "foo" });
|
||||
}
|
||||
|
||||
var id = "foo";
|
||||
var it = cs.displayStore(id);
|
||||
var entry = it.next();
|
||||
var entry2 = it.next();
|
||||
|
||||
let entries = [];
|
||||
for (var i = 0; i < 100; i++) {
|
||||
let _entry = it.next();
|
||||
entries.push(_entry);
|
||||
}
|
||||
|
||||
ok(entries.length == 100, "entries length == 100");
|
||||
|
||||
let entries2 = [];
|
||||
|
||||
for (var i = 0; i < 100; i++){
|
||||
let _entry = it.next();
|
||||
entries2.push(_entry);
|
||||
}
|
||||
|
||||
ok(entries[0].id != entries2[0].id,
|
||||
"two distinct pages of log entries");
|
||||
|
||||
cs.removeDisplay("foo");
|
||||
cs = null;
|
||||
|
||||
finishTest();
|
||||
}
|
||||
|
@ -134,6 +134,7 @@
|
||||
@BINPATH@/components/directory.xpt
|
||||
@BINPATH@/components/docshell.xpt
|
||||
@BINPATH@/components/dom.xpt
|
||||
@BINPATH@/components/dom_apps.xpt
|
||||
@BINPATH@/components/dom_base.xpt
|
||||
@BINPATH@/components/dom_battery.xpt
|
||||
@BINPATH@/components/dom_canvas.xpt
|
||||
@ -357,6 +358,8 @@
|
||||
@BINPATH@/components/contentSecurityPolicy.js
|
||||
@BINPATH@/components/contentAreaDropListener.manifest
|
||||
@BINPATH@/components/contentAreaDropListener.js
|
||||
@BINPATH@/components/BrowserProfileMigrators.manifest
|
||||
@BINPATH@/components/ChromeProfileMigrator.js
|
||||
#ifdef XP_MACOSX
|
||||
@BINPATH@/components/libalerts_s.dylib
|
||||
#endif
|
||||
@ -373,6 +376,8 @@
|
||||
#endif
|
||||
@BINPATH@/components/TelemetryPing.js
|
||||
@BINPATH@/components/TelemetryPing.manifest
|
||||
@BINPATH@/components/Webapps.js
|
||||
@BINPATH@/components/Webapps.manifest
|
||||
|
||||
; Modules
|
||||
@BINPATH@/modules/*
|
||||
|
@ -252,6 +252,7 @@ res/fonts/mathfontMath4.properties
|
||||
res/fonts/mathfontPUA.properties
|
||||
res/fonts/pangoFontEncoding.properties
|
||||
res/forms.css
|
||||
res/full-screen-override.css
|
||||
res/hiddenWindow.html
|
||||
res/html.css
|
||||
res/html/gopher-audio.gif
|
||||
|
@ -244,18 +244,16 @@ puAlertText=Click here for details
|
||||
|
||||
# Geolocation UI
|
||||
|
||||
# LOCALIZATION NOTE (geolocation.shareLocation geolocation.dontShareLocation geolocation.alwaysShare geolocation.neverShare):
|
||||
# LOCALIZATION NOTE (geolocation.shareLocation geolocation.alwaysShareLocation geolocation.neverShareLocation):
|
||||
#If you're having trouble with the word Share, please use Allow and Block in your language.
|
||||
geolocation.shareLocation=Share Location
|
||||
geolocation.shareLocation.accesskey=a
|
||||
geolocation.dontShareLocation=Don't Share
|
||||
geolocation.dontShareLocation.accesskey=o
|
||||
geolocation.alwaysShare=Always Share
|
||||
geolocation.alwaysShare.accesskey=A
|
||||
geolocation.neverShare=Never Share
|
||||
geolocation.neverShare.accesskey=N
|
||||
geolocation.siteWantsToKnow=%S wants to know your location.
|
||||
geolocation.fileWantsToKnow=The file %S wants to know your location.
|
||||
geolocation.alwaysShareLocation=Always Share Location
|
||||
geolocation.alwaysShareLocation.accesskey=A
|
||||
geolocation.neverShareLocation=Never Share Location
|
||||
geolocation.neverShareLocation.accesskey=N
|
||||
geolocation.shareWithSite=Would you like to share your location with %S?
|
||||
geolocation.shareWithFile=Would you like to share your location with the file %S?
|
||||
# LOCALIZATION NOTE (geolocation.learnMore): Use the unicode ellipsis char, \u2026,
|
||||
# or use "..." if \u2026 doesn't suit traditions in your locale.
|
||||
geolocation.learnMore=Learn More…
|
||||
|
@ -15,6 +15,8 @@
|
||||
<!ENTITY importFromOpera.accesskey "O">
|
||||
<!ENTITY importFromSafari.label "Safari">
|
||||
<!ENTITY importFromSafari.accesskey "S">
|
||||
<!ENTITY importFromChrome.label "Chrome">
|
||||
<!ENTITY importFromChrome.accesskey "C">
|
||||
<!ENTITY importFromHTMLFile.label "From an HTML File">
|
||||
<!ENTITY importFromHTMLFile.accesskey "F">
|
||||
|
||||
|
@ -5,6 +5,7 @@ sourceNameIE=Internet Explorer
|
||||
sourceNameSeamonkey=Netscape 6/7/Mozilla
|
||||
sourceNameOpera=Opera
|
||||
sourceNameSafari=Safari
|
||||
sourceNameChrome=Google Chrome
|
||||
|
||||
importedBookmarksFolder=From %S
|
||||
importedSearchURLsFolder=Keyword Searches (From %S)
|
||||
@ -21,34 +22,41 @@ importedOperaSearchUrls=Keyword Searches (From Opera)
|
||||
1_opera=Preferences
|
||||
1_seamonkey=Preferences
|
||||
1_safari=Preferences
|
||||
1_chrome=Preferences
|
||||
|
||||
2_ie=Cookies
|
||||
2_opera=Cookies
|
||||
2_seamonkey=Cookies
|
||||
2_safari=Cookies
|
||||
2_chrome=Cookies
|
||||
|
||||
4_ie=Browsing History
|
||||
4_opera=Browsing History
|
||||
4_seamonkey=Browsing History
|
||||
4_safari=Browsing History
|
||||
4_chrome=Browsing History
|
||||
|
||||
8_ie=Saved Form History
|
||||
8_opera=Saved Form History
|
||||
8_seamonkey=Saved Form History
|
||||
8_safari=Saved Form History
|
||||
8_chrome=Saved Form History
|
||||
|
||||
16_ie=Saved Passwords
|
||||
16_opera=Saved Passwords
|
||||
16_seamonkey=Saved Passwords
|
||||
16_safari=Saved Passwords
|
||||
16_chrome=Saved Passwords
|
||||
|
||||
32_ie=Favorites
|
||||
32_opera=Bookmarks
|
||||
32_seamonkey=Bookmarks
|
||||
32_safari=Bookmarks
|
||||
32_chrome=Bookmarks
|
||||
|
||||
64_ie=Other Data
|
||||
64_opera=Other Data
|
||||
64_seamonkey=Other Data
|
||||
64_safari=Other Data
|
||||
64_chrome=Other Data
|
||||
|
||||
|
@ -222,7 +222,7 @@ menuitem.bookmark-item {
|
||||
}
|
||||
|
||||
.bookmark-item[query][tagContainer] {
|
||||
list-style-image: url("chrome://mozapps/skin/places/tagContainerIcon.png");
|
||||
list-style-image: url("chrome://browser/skin/places/tag.png");
|
||||
}
|
||||
|
||||
.bookmark-item[query][dayContainer] {
|
||||
@ -1959,7 +1959,7 @@ panel[dimmed="true"] {
|
||||
/* Highlighter */
|
||||
|
||||
.highlighter-veil {
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
background-color: rgba(25, 25, 25, 0.5);
|
||||
}
|
||||
|
||||
#highlighter-closebutton {
|
||||
|
@ -70,7 +70,7 @@
|
||||
}
|
||||
|
||||
.hud-msg-node {
|
||||
list-style-image: url(chrome://global/skin/icons/webconsole.png);
|
||||
list-style-image: url(chrome://browser/skin/devtools/webconsole.png);
|
||||
-moz-image-region: rect(0, 1px, 0, 0);
|
||||
}
|
||||
|
||||
@ -162,7 +162,7 @@
|
||||
.webconsole-filter-button > .toolbarbutton-menubutton-button,
|
||||
.webconsole-filter-button:not([type="menu-button"]) {
|
||||
-moz-box-orient: horizontal;
|
||||
list-style-image: url("chrome://global/skin/icons/webconsole.png");
|
||||
list-style-image: url("chrome://browser/skin/devtools/webconsole.png");
|
||||
}
|
||||
|
||||
/* Network styles */
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 799 B |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 799 B |
@ -39,10 +39,10 @@ browser.jar:
|
||||
skin/classic/browser/urlbar-arrow.png
|
||||
skin/classic/browser/feeds/feedIcon.png (feeds/feedIcon.png)
|
||||
skin/classic/browser/feeds/feedIcon16.png (feeds/feedIcon16.png)
|
||||
skin/classic/browser/feeds/videoFeedIcon.png (feeds/videoFeedIcon.png)
|
||||
skin/classic/browser/feeds/videoFeedIcon16.png (feeds/videoFeedIcon16.png)
|
||||
skin/classic/browser/feeds/audioFeedIcon.png (feeds/audioFeedIcon.png)
|
||||
skin/classic/browser/feeds/audioFeedIcon16.png (feeds/audioFeedIcon16.png)
|
||||
skin/classic/browser/feeds/videoFeedIcon.png (feeds/feedIcon.png)
|
||||
skin/classic/browser/feeds/videoFeedIcon16.png (feeds/feedIcon16.png)
|
||||
skin/classic/browser/feeds/audioFeedIcon.png (feeds/feedIcon.png)
|
||||
skin/classic/browser/feeds/audioFeedIcon16.png (feeds/feedIcon16.png)
|
||||
skin/classic/browser/feeds/subscribe.css (feeds/subscribe.css)
|
||||
skin/classic/browser/feeds/subscribe-ui.css (feeds/subscribe-ui.css)
|
||||
skin/classic/browser/places/bookmarksMenu.png (places/bookmarksMenu.png)
|
||||
@ -86,6 +86,9 @@ browser.jar:
|
||||
skin/classic/browser/devtools/arrows.png (devtools/arrows.png)
|
||||
skin/classic/browser/devtools/goto-mdn.png (devtools/goto-mdn.png)
|
||||
skin/classic/browser/devtools/csshtmltree.css (devtools/csshtmltree.css)
|
||||
skin/classic/browser/devtools/webconsole.css (devtools/webconsole.css)
|
||||
skin/classic/browser/devtools/webconsole_networkpanel.css (devtools/webconsole_networkpanel.css)
|
||||
skin/classic/browser/devtools/webconsole.png (devtools/webconsole.png)
|
||||
skin/classic/browser/devtools/gcli.css (devtools/gcli.css)
|
||||
skin/classic/browser/devtools/breadcrumbs/ltr-end-pressed.png (devtools/breadcrumbs/ltr-end-pressed.png)
|
||||
skin/classic/browser/devtools/breadcrumbs/ltr-end-selected-pressed.png (devtools/breadcrumbs/ltr-end-selected-pressed.png)
|
||||
|
@ -77,7 +77,7 @@ treechildren::-moz-tree-image(query, OrganizerQuery_Downloads) {
|
||||
|
||||
treechildren::-moz-tree-image(title, query, tagContainer),
|
||||
treechildren::-moz-tree-image(query, OrganizerQuery_Tags) {
|
||||
list-style-image: url("chrome://mozapps/skin/places/tagContainerIcon.png");
|
||||
list-style-image: url("chrome://browser/skin/places/tag.png");
|
||||
}
|
||||
|
||||
/* calendar icon for folders grouping items by date */
|
||||
|
@ -88,6 +88,17 @@
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
/* Because of -moz-box-align: center above, separators will be invisible unless
|
||||
we set their min-height. See bug 583510 for more information. */
|
||||
toolbarseparator {
|
||||
min-height: 22px;
|
||||
}
|
||||
|
||||
/* We need more height when toolbar buttons show both icon and text. */
|
||||
toolbar[mode="full"] toolbarseparator {
|
||||
min-height: 36px;
|
||||
}
|
||||
|
||||
#nav-bar {
|
||||
padding-bottom: 4px !important;
|
||||
}
|
||||
@ -231,7 +242,7 @@ toolbarbutton.bookmark-item > menupopup {
|
||||
}
|
||||
|
||||
.bookmark-item[query][tagContainer] {
|
||||
list-style-image: url("chrome://mozapps/skin/places/tagContainerIcon.png");
|
||||
list-style-image: url("chrome://browser/skin/places/tag.png");
|
||||
}
|
||||
|
||||
.bookmark-item[query][dayContainer] {
|
||||
@ -1902,6 +1913,7 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
||||
}
|
||||
|
||||
.tabbrowser-tab[selected="true"] {
|
||||
color: #000;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
}
|
||||
@ -2678,7 +2690,7 @@ panel[dimmed="true"] {
|
||||
/* Highlighter */
|
||||
|
||||
.highlighter-veil {
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
background-color: rgba(25, 25, 25, 0.5);
|
||||
}
|
||||
|
||||
#highlighter-closebutton {
|
||||
|
@ -37,7 +37,7 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
%include shared.inc
|
||||
%include ../shared.inc
|
||||
|
||||
.hud-box {
|
||||
border-bottom: 1px solid #aaa;
|
||||
@ -73,7 +73,7 @@
|
||||
}
|
||||
|
||||
.hud-msg-node {
|
||||
list-style-image: url(chrome://global/skin/icons/webconsole.png);
|
||||
list-style-image: url(chrome://browser/skin/devtools/webconsole.png);
|
||||
-moz-image-region: rect(0, 1px, 0, 0);
|
||||
}
|
||||
|
||||
@ -187,7 +187,7 @@
|
||||
-moz-appearance: none;
|
||||
margin: 0;
|
||||
padding: 1px 0;
|
||||
list-style-image: url("chrome://global/skin/icons/webconsole.png");
|
||||
list-style-image: url(chrome://browser/skin/devtools/webconsole.png);
|
||||
-moz-box-orient: horizontal;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 852 B |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 852 B |
@ -51,10 +51,10 @@ browser.jar:
|
||||
skin/classic/browser/feeds/subscribe-ui.css (feeds/subscribe-ui.css)
|
||||
skin/classic/browser/feeds/feedIcon.png (feeds/feedIcon.png)
|
||||
skin/classic/browser/feeds/feedIcon16.png (feeds/feedIcon16.png)
|
||||
skin/classic/browser/feeds/videoFeedIcon.png (feeds/videoFeedIcon.png)
|
||||
skin/classic/browser/feeds/videoFeedIcon16.png (feeds/videoFeedIcon16.png)
|
||||
skin/classic/browser/feeds/audioFeedIcon.png (feeds/audioFeedIcon.png)
|
||||
skin/classic/browser/feeds/audioFeedIcon16.png (feeds/audioFeedIcon16.png)
|
||||
skin/classic/browser/feeds/videoFeedIcon.png (feeds/feedIcon.png)
|
||||
skin/classic/browser/feeds/videoFeedIcon16.png (feeds/feedIcon16.png)
|
||||
skin/classic/browser/feeds/audioFeedIcon.png (feeds/feedIcon.png)
|
||||
skin/classic/browser/feeds/audioFeedIcon16.png (feeds/feedIcon16.png)
|
||||
skin/classic/browser/setDesktopBackground.css
|
||||
skin/classic/browser/inspector.css
|
||||
skin/classic/browser/monitor.png
|
||||
@ -127,6 +127,9 @@ browser.jar:
|
||||
skin/classic/browser/devtools/csshtmltree.css (devtools/csshtmltree.css)
|
||||
skin/classic/browser/devtools/gcli.css (devtools/gcli.css)
|
||||
skin/classic/browser/devtools/toolbarbutton-close.png (devtools/toolbarbutton-close.png)
|
||||
* skin/classic/browser/devtools/webconsole.css (devtools/webconsole.css)
|
||||
skin/classic/browser/devtools/webconsole_networkpanel.css (devtools/webconsole_networkpanel.css)
|
||||
skin/classic/browser/devtools/webconsole.png (devtools/webconsole.png)
|
||||
skin/classic/browser/devtools/breadcrumbs/ltr-end-pressed.png (devtools/breadcrumbs/ltr-end-pressed.png)
|
||||
skin/classic/browser/devtools/breadcrumbs/ltr-end-selected-pressed.png (devtools/breadcrumbs/ltr-end-selected-pressed.png)
|
||||
skin/classic/browser/devtools/breadcrumbs/ltr-end-selected.png (devtools/breadcrumbs/ltr-end-selected.png)
|
||||
|
@ -2,12 +2,6 @@
|
||||
|
||||
/* Sidebars */
|
||||
|
||||
.sidebar-placesTree {
|
||||
background-color: transparent !important;
|
||||
-moz-appearance: none !important;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
#bookmarksPanel,
|
||||
#history-panel,
|
||||
#sidebar-search-container {
|
||||
@ -150,7 +144,7 @@ treechildren::-moz-tree-image(query, OrganizerQuery_Downloads) {
|
||||
|
||||
treechildren::-moz-tree-image(title, query, tagContainer),
|
||||
treechildren::-moz-tree-image(query, OrganizerQuery_Tags) {
|
||||
list-style-image: url("chrome://mozapps/skin/places/tagContainerIcon.png");
|
||||
list-style-image: url("chrome://browser/skin/places/tag.png");
|
||||
}
|
||||
|
||||
/* calendar icon for folders grouping items by date */
|
||||
|
Before Width: | Height: | Size: 441 B |
@ -75,6 +75,11 @@
|
||||
-moz-margin-start: -3px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.menu-accel,
|
||||
.menu-iconic-accel {
|
||||
color: graytext;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (-moz-windows-compositor) {
|
||||
|
@ -621,7 +621,7 @@ menuitem.bookmark-item {
|
||||
}
|
||||
|
||||
.bookmark-item[query][tagContainer] {
|
||||
list-style-image: url("chrome://mozapps/skin/places/tagContainerIcon.png");
|
||||
list-style-image: url("chrome://browser/skin/places/tag.png");
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
@ -2625,7 +2625,7 @@ panel[dimmed="true"] {
|
||||
/* Highlighter */
|
||||
|
||||
.highlighter-veil {
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
background-color: rgba(25, 25, 25, 0.5);
|
||||
}
|
||||
|
||||
#highlighter-closebutton {
|
||||
|
@ -69,7 +69,7 @@
|
||||
}
|
||||
|
||||
.hud-msg-node {
|
||||
list-style-image: url(chrome://global/skin/icons/webconsole.png);
|
||||
list-style-image: url(chrome://browser/skin/devtools/webconsole.png);
|
||||
-moz-image-region: rect(0, 1px, 0, 0);
|
||||
}
|
||||
|
||||
@ -156,7 +156,7 @@
|
||||
|
||||
.webconsole-filter-button > .toolbarbutton-menubutton-button {
|
||||
-moz-box-orient: horizontal;
|
||||
list-style-image: url("chrome://global/skin/icons/webconsole.png");
|
||||
list-style-image: url("chrome://browser/skin/devtools/webconsole.png");
|
||||
}
|
||||
|
||||
.webconsole-filter-button > .toolbarbutton-menubutton-button,
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 787 B |
Before Width: | Height: | Size: 791 B |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 787 B |
Before Width: | Height: | Size: 791 B |
@ -6,7 +6,7 @@ browser.jar:
|
||||
skin/classic/browser/sanitizeDialog.css (sanitizeDialog.css)
|
||||
* skin/classic/browser/aboutPrivateBrowsing.css (aboutPrivateBrowsing.css)
|
||||
* skin/classic/browser/aboutSessionRestore.css (aboutSessionRestore.css)
|
||||
skin/classic/browser/aboutSessionRestore-window-icon.png (aboutSessionRestore-window-icon.png)
|
||||
skin/classic/browser/aboutSessionRestore-window-icon.png (preferences/application.png)
|
||||
skin/classic/browser/aboutCertError.css (aboutCertError.css)
|
||||
#ifdef MOZ_SERVICES_SYNC
|
||||
skin/classic/browser/aboutSyncTabs.css
|
||||
@ -51,10 +51,10 @@ browser.jar:
|
||||
skin/classic/browser/urlbar-history-dropmarker.png
|
||||
skin/classic/browser/feeds/feedIcon.png (feeds/feedIcon.png)
|
||||
skin/classic/browser/feeds/feedIcon16.png (feeds/feedIcon16.png)
|
||||
skin/classic/browser/feeds/audioFeedIcon.png (feeds/audioFeedIcon.png)
|
||||
skin/classic/browser/feeds/audioFeedIcon16.png (feeds/audioFeedIcon16.png)
|
||||
skin/classic/browser/feeds/videoFeedIcon.png (feeds/videoFeedIcon.png)
|
||||
skin/classic/browser/feeds/videoFeedIcon16.png (feeds/videoFeedIcon16.png)
|
||||
skin/classic/browser/feeds/audioFeedIcon.png (feeds/feedIcon.png)
|
||||
skin/classic/browser/feeds/audioFeedIcon16.png (feeds/feedIcon16.png)
|
||||
skin/classic/browser/feeds/videoFeedIcon.png (feeds/feedIcon.png)
|
||||
skin/classic/browser/feeds/videoFeedIcon16.png (feeds/feedIcon16.png)
|
||||
skin/classic/browser/feeds/subscribe.css (feeds/subscribe.css)
|
||||
skin/classic/browser/feeds/subscribe-ui.css (feeds/subscribe-ui.css)
|
||||
skin/classic/browser/inspector.css
|
||||
@ -111,6 +111,9 @@ browser.jar:
|
||||
skin/classic/browser/devtools/csshtmltree.css (devtools/csshtmltree.css)
|
||||
skin/classic/browser/devtools/gcli.css (devtools/gcli.css)
|
||||
skin/classic/browser/devtools/toolbarbutton-close.png (devtools/toolbarbutton-close.png)
|
||||
skin/classic/browser/devtools/webconsole.css (devtools/webconsole.css)
|
||||
skin/classic/browser/devtools/webconsole_networkpanel.css (devtools/webconsole_networkpanel.css)
|
||||
skin/classic/browser/devtools/webconsole.png (devtools/webconsole.png)
|
||||
skin/classic/browser/devtools/breadcrumbs/ltr-end-pressed.png (devtools/breadcrumbs/ltr-end-pressed.png)
|
||||
skin/classic/browser/devtools/breadcrumbs/ltr-end-selected-pressed.png (devtools/breadcrumbs/ltr-end-selected-pressed.png)
|
||||
skin/classic/browser/devtools/breadcrumbs/ltr-end-selected.png (devtools/breadcrumbs/ltr-end-selected.png)
|
||||
@ -204,10 +207,10 @@ browser.jar:
|
||||
skin/classic/aero/browser/urlbar-history-dropmarker.png
|
||||
skin/classic/aero/browser/feeds/feedIcon.png (feeds/feedIcon-aero.png)
|
||||
skin/classic/aero/browser/feeds/feedIcon16.png (feeds/feedIcon16-aero.png)
|
||||
skin/classic/aero/browser/feeds/audioFeedIcon.png (feeds/audioFeedIcon-aero.png)
|
||||
skin/classic/aero/browser/feeds/audioFeedIcon16.png (feeds/audioFeedIcon16-aero.png)
|
||||
skin/classic/aero/browser/feeds/videoFeedIcon.png (feeds/videoFeedIcon-aero.png)
|
||||
skin/classic/aero/browser/feeds/videoFeedIcon16.png (feeds/videoFeedIcon16-aero.png)
|
||||
skin/classic/aero/browser/feeds/audioFeedIcon.png (feeds/feedIcon-aero.png)
|
||||
skin/classic/aero/browser/feeds/audioFeedIcon16.png (feeds/feedIcon16-aero.png)
|
||||
skin/classic/aero/browser/feeds/videoFeedIcon.png (feeds/feedIcon-aero.png)
|
||||
skin/classic/aero/browser/feeds/videoFeedIcon16.png (feeds/feedIcon16-aero.png)
|
||||
skin/classic/aero/browser/feeds/subscribe.css (feeds/subscribe.css)
|
||||
skin/classic/aero/browser/feeds/subscribe-ui.css (feeds/subscribe-ui.css)
|
||||
skin/classic/aero/browser/inspector.css
|
||||
@ -228,7 +231,7 @@ browser.jar:
|
||||
skin/classic/aero/browser/places/history.png (places/history-aero.png)
|
||||
skin/classic/aero/browser/places/allBookmarks.png (places/allBookmarks-aero.png)
|
||||
skin/classic/aero/browser/places/unsortedBookmarks.png (places/unsortedBookmarks-aero.png)
|
||||
skin/classic/aero/browser/places/searching_16.png (places/searching_16-aero.png)
|
||||
skin/classic/aero/browser/places/searching_16.png (places/searching_16.png)
|
||||
skin/classic/aero/browser/places/downloads.png (places/downloads.png)
|
||||
skin/classic/aero/browser/preferences/alwaysAsk.png (preferences/alwaysAsk-aero.png)
|
||||
skin/classic/aero/browser/preferences/application.png (preferences/application-aero.png)
|
||||
@ -237,7 +240,6 @@ browser.jar:
|
||||
#ifdef MOZ_SERVICES_SYNC
|
||||
skin/classic/aero/browser/preferences/Options-sync.png (preferences/Options-sync.png)
|
||||
#endif
|
||||
skin/classic/aero/browser/preferences/plugin.png (preferences/plugin-aero.png)
|
||||
skin/classic/aero/browser/preferences/saveFile.png (preferences/saveFile-aero.png)
|
||||
* skin/classic/aero/browser/preferences/preferences.css (preferences/preferences.css)
|
||||
skin/classic/aero/browser/preferences/applications.css (preferences/applications.css)
|
||||
@ -265,6 +267,9 @@ browser.jar:
|
||||
skin/classic/aero/browser/devtools/csshtmltree.css (devtools/csshtmltree.css)
|
||||
skin/classic/aero/browser/devtools/gcli.css (devtools/gcli.css)
|
||||
skin/classic/aero/browser/devtools/toolbarbutton-close.png (devtools/toolbarbutton-close.png)
|
||||
skin/classic/aero/browser/devtools/webconsole.css (devtools/webconsole.css)
|
||||
skin/classic/aero/browser/devtools/webconsole_networkpanel.css (devtools/webconsole_networkpanel.css)
|
||||
skin/classic/aero/browser/devtools/webconsole.png (devtools/webconsole.png)
|
||||
skin/classic/aero/browser/devtools/breadcrumbs/ltr-end-pressed.png (devtools/breadcrumbs/ltr-end-pressed.png)
|
||||
skin/classic/aero/browser/devtools/breadcrumbs/ltr-end-selected-pressed.png (devtools/breadcrumbs/ltr-end-selected-pressed.png)
|
||||
skin/classic/aero/browser/devtools/breadcrumbs/ltr-end-selected.png (devtools/breadcrumbs/ltr-end-selected.png)
|
||||
|
@ -81,7 +81,7 @@ treechildren::-moz-tree-image(title, query) {
|
||||
|
||||
treechildren::-moz-tree-image(title, query, tagContainer),
|
||||
treechildren::-moz-tree-image(query, OrganizerQuery_Tags) {
|
||||
list-style-image: url("chrome://mozapps/skin/places/tagContainerIcon.png");
|
||||
list-style-image: url("chrome://browser/skin/places/tag.png");
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 539 B |
41
build/autoconf/mozcommonheader.m4
Normal file
@ -0,0 +1,41 @@
|
||||
dnl ***** BEGIN LICENSE BLOCK *****
|
||||
dnl Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
dnl
|
||||
dnl The contents of this file are subject to the Mozilla Public License Version
|
||||
dnl 1.1 (the "License"); you may not use this file except in compliance with
|
||||
dnl the License. You may obtain a copy of the License at
|
||||
dnl http://www.mozilla.org/MPL/
|
||||
dnl
|
||||
dnl Software distributed under the License is distributed on an "AS IS" basis,
|
||||
dnl WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
dnl for the specific language governing rights and limitations under the
|
||||
dnl License.
|
||||
dnl
|
||||
dnl The Original Code is mozilla.org code.
|
||||
dnl
|
||||
dnl The Initial Developer of the Original Code is the
|
||||
dnl Mozilla Foundation <http://www.mozilla.org>
|
||||
dnl
|
||||
dnl Portions created by the Initial Developer are Copyright (C) 2009
|
||||
dnl the Initial Developer. All Rights Reserved.
|
||||
dnl
|
||||
dnl
|
||||
dnl Alternatively, the contents of this file may be used under the terms of
|
||||
dnl either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
dnl or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
dnl in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
dnl of those above. If you wish to allow use of your version of this file only
|
||||
dnl under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
dnl use your version of this file under the terms of the MPL, indicate your
|
||||
dnl decision by deleting the provisions above and replace them with the notice
|
||||
dnl and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
dnl the provisions above, a recipient may use your version of this file under
|
||||
dnl the terms of any one of the MPL, the GPL or the LGPL.
|
||||
dnl
|
||||
dnl ***** END LICENSE BLOCK *****
|
||||
|
||||
AC_DEFUN(MOZ_CHECK_COMMON_HEADERS,
|
||||
MOZ_CHECK_HEADERS(sys/byteorder.h compat.h getopt.h sys/bitypes.h \
|
||||
memory.h unistd.h gnu/libc-version.h nl_types.h malloc.h \
|
||||
X11/XKBlib.h io.h cpuid.h)
|
||||
)
|
@ -36,13 +36,14 @@ dnl the terms of any one of the MPL, the GPL or the LGPL.
|
||||
dnl
|
||||
dnl ***** END LICENSE BLOCK *****
|
||||
|
||||
dnl MOZ_CHECK_HEADER(HEADER-FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||
dnl MOZ_CHECK_HEADER(HEADER-FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, INCLUDES]]])
|
||||
AC_DEFUN([MOZ_CHECK_HEADER],
|
||||
[ dnl Do the transliteration at runtime so arg 1 can be a shell variable.
|
||||
ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
|
||||
AC_MSG_CHECKING([for $1])
|
||||
AC_CACHE_VAL(ac_cv_header_$ac_safe,
|
||||
[ AC_TRY_COMPILE([#include <$1>], ,
|
||||
[ AC_TRY_COMPILE([$4
|
||||
#include <$1>], ,
|
||||
eval "ac_cv_header_$ac_safe=yes",
|
||||
eval "ac_cv_header_$ac_safe=no") ])
|
||||
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
||||
@ -54,12 +55,12 @@ AC_DEFUN([MOZ_CHECK_HEADER],
|
||||
fi
|
||||
])
|
||||
|
||||
dnl MOZ_CHECK_HEADERS(HEADER-FILE... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||
dnl MOZ_CHECK_HEADERS(HEADER-FILE... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, INCLUDES]]])
|
||||
AC_DEFUN([MOZ_CHECK_HEADERS],
|
||||
[ for ac_hdr in $1
|
||||
do
|
||||
MOZ_CHECK_HEADER($ac_hdr,
|
||||
[ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
|
||||
AC_DEFINE_UNQUOTED($ac_tr_hdr) $2], $3)
|
||||
AC_DEFINE_UNQUOTED($ac_tr_hdr) $2], $3, [$4])
|
||||
done
|
||||
])
|
||||
|
@ -138,7 +138,8 @@ log = logging.getLogger()
|
||||
|
||||
def isURL(thing):
|
||||
"""Return True if |thing| looks like a URL."""
|
||||
return urlparse(thing).scheme != ''
|
||||
# We want to download URLs like http://... but not Windows paths like c:\...
|
||||
return len(urlparse(thing).scheme) >= 2
|
||||
|
||||
def addCommonOptions(parser, defaults={}):
|
||||
parser.add_option("--xre-path",
|
||||
@ -284,7 +285,7 @@ def getDebuggerInfo(directory, debugger, debuggerArgs, debuggerInteractive = Fal
|
||||
debuggerInfo["args"] = debuggerArgs.split()
|
||||
if debuggerInteractive:
|
||||
debuggerInfo["interactive"] = debuggerInteractive
|
||||
|
||||
|
||||
return debuggerInfo
|
||||
|
||||
|
||||
|
@ -119,7 +119,6 @@ MOZ_CALLGRIND = @MOZ_CALLGRIND@
|
||||
MOZ_VTUNE = @MOZ_VTUNE@
|
||||
MOZ_ETW = @MOZ_ETW@
|
||||
MOZ_TRACE_JSCALLS = @MOZ_TRACE_JSCALLS@
|
||||
MOZ_TRACEVIS = @MOZ_TRACEVIS@
|
||||
DEHYDRA_PATH = @DEHYDRA_PATH@
|
||||
|
||||
NS_TRACE_MALLOC = @NS_TRACE_MALLOC@
|
||||
|
27
configure.in
@ -3409,12 +3409,7 @@ freebsd*|openbsd*)
|
||||
CPPFLAGS="${CPPFLAGS} ${X_CFLAGS}"
|
||||
;;
|
||||
esac
|
||||
MOZ_CHECK_HEADERS(sys/byteorder.h compat.h getopt.h)
|
||||
MOZ_CHECK_HEADERS(sys/bitypes.h memory.h unistd.h)
|
||||
MOZ_CHECK_HEADERS(gnu/libc-version.h nl_types.h)
|
||||
MOZ_CHECK_HEADERS(malloc.h)
|
||||
MOZ_CHECK_HEADERS(X11/XKBlib.h)
|
||||
MOZ_CHECK_HEADERS(io.h)
|
||||
MOZ_CHECK_COMMON_HEADERS
|
||||
|
||||
dnl These are all the places some variant of statfs can be hiding.
|
||||
MOZ_CHECK_HEADERS(sys/statvfs.h sys/statfs.h sys/vfs.h sys/mount.h)
|
||||
@ -5935,12 +5930,11 @@ if test "$MOZ_XTF"; then
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl Pref extensions (autoconfig and system-pref)
|
||||
dnl Pref extensions (autoconfig)
|
||||
dnl ========================================================
|
||||
MOZ_ARG_DISABLE_BOOL(pref-extensions,
|
||||
[ --disable-pref-extensions
|
||||
Disable pref extensions such as autoconfig and
|
||||
system-pref],
|
||||
Disable pref extensions such as autoconfig],
|
||||
MOZ_PREF_EXTENSIONS=,
|
||||
MOZ_PREF_EXTENSIONS=1 )
|
||||
|
||||
@ -7326,17 +7320,6 @@ if test -n "$MOZ_TRACE_JSCALLS"; then
|
||||
AC_DEFINE(MOZ_TRACE_JSCALLS)
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Use TraceVis
|
||||
dnl ========================================================
|
||||
MOZ_ARG_ENABLE_BOOL(tracevis,
|
||||
[ --enable-tracevis Enable TraceVis tracing tool (default=no)],
|
||||
MOZ_TRACEVIS=1,
|
||||
MOZ_TRACEVIS= )
|
||||
if test -n "$MOZ_TRACEVIS"; then
|
||||
AC_DEFINE(MOZ_TRACEVIS)
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Use incremental GC
|
||||
dnl ========================================================
|
||||
@ -8761,8 +8744,8 @@ if test "$USE_FC_FREETYPE"; then
|
||||
if test "$COMPILE_ENVIRONMENT"; then
|
||||
_SAVE_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $FT2_CFLAGS $XCFLAGS"
|
||||
AC_CHECK_HEADERS(fontconfig/fcfreetype.h, ,
|
||||
[AC_MSG_ERROR(Can't find header fontconfig/fcfreetype.h.)])
|
||||
MOZ_CHECK_HEADERS([fontconfig/fcfreetype.h], ,
|
||||
[AC_MSG_ERROR(Can't find header fontconfig/fcfreetype.h.)], [#include <fontconfig/fontconfig.h>])
|
||||
CPPFLAGS="$_SAVE_CPPFLAGS"
|
||||
else
|
||||
AC_DEFINE(HAVE_FONTCONFIG_FCFREETYPE_H)
|
||||
|
@ -1290,11 +1290,6 @@ public:
|
||||
static void TraceWrapper(nsWrapperCache* aCache, TraceCallback aCallback,
|
||||
void *aClosure);
|
||||
|
||||
/**
|
||||
* Convert nsIContent::IME_STATUS_* to nsIWidget::IME_STATUS_*
|
||||
*/
|
||||
static PRUint32 GetWidgetStatusFromIMEStatus(PRUint32 aState);
|
||||
|
||||
/*
|
||||
* Notify when the first XUL menu is opened and when the all XUL menus are
|
||||
* closed. At opening, aInstalling should be TRUE, otherwise, it should be
|
||||
|
@ -63,8 +63,11 @@ class nsIDOMCSSStyleDeclaration;
|
||||
namespace mozilla {
|
||||
namespace css {
|
||||
class StyleRule;
|
||||
}
|
||||
}
|
||||
} // namespace css
|
||||
namespace widget {
|
||||
struct IMEState;
|
||||
} // namespace widget
|
||||
} // namespace mozilla
|
||||
|
||||
enum nsLinkState {
|
||||
eLinkState_Unknown = 0,
|
||||
@ -75,8 +78,8 @@ enum nsLinkState {
|
||||
|
||||
// IID for the nsIContent interface
|
||||
#define NS_ICONTENT_IID \
|
||||
{ 0x3128b3a0, 0xb609, 0x44e3, \
|
||||
{ 0xad, 0x91, 0xdc, 0xf1, 0x4a, 0x3f, 0xf6, 0xa0 } }
|
||||
{ 0xed40a3e5, 0xd7ed, 0x473e, \
|
||||
{ 0x85, 0xe3, 0x82, 0xc3, 0xf0, 0x41, 0xdb, 0x52 } }
|
||||
|
||||
/**
|
||||
* A node of content in a document's content model. This interface
|
||||
@ -84,6 +87,8 @@ enum nsLinkState {
|
||||
*/
|
||||
class nsIContent : public nsINode {
|
||||
public:
|
||||
typedef mozilla::widget::IMEState IMEState;
|
||||
|
||||
#ifdef MOZILLA_INTERNAL_API
|
||||
// If you're using the external API, the only thing you can know about
|
||||
// nsIContent is that it exists with an IID
|
||||
@ -604,40 +609,18 @@ public:
|
||||
* Get desired IME state for the content.
|
||||
*
|
||||
* @return The desired IME status for the content.
|
||||
* This is a combination of IME_STATUS_* flags,
|
||||
* controlling what happens to IME when the content takes focus.
|
||||
* If this is IME_STATUS_NONE, IME remains in its current state.
|
||||
* IME_STATUS_ENABLE and IME_STATUS_DISABLE must not be set
|
||||
* together; likewise IME_STATUS_OPEN and IME_STATUS_CLOSE must
|
||||
* not be set together.
|
||||
* If you return IME_STATUS_DISABLE, you should not set the
|
||||
* OPEN or CLOSE flag; that way, when IME is next enabled,
|
||||
* the previous OPEN/CLOSE state will be restored (unless the newly
|
||||
* focused content specifies the OPEN/CLOSE state by setting the OPEN
|
||||
* or CLOSE flag with the ENABLE flag).
|
||||
* IME_STATUS_PASSWORD should be returned only from password editor,
|
||||
* this value has a special meaning. It is used as alternative of
|
||||
* IME_STATUS_DISABLED.
|
||||
* IME_STATUS_PLUGIN should be returned only when plug-in has focus.
|
||||
* When a plug-in is focused content, we should send native events
|
||||
* directly. Because we don't process some native events, but they may
|
||||
* be needed by the plug-in.
|
||||
* This is a combination of an IME enabled value and
|
||||
* an IME open value of widget::IMEState.
|
||||
* If you return DISABLED, you should not set the OPEN and CLOSE
|
||||
* value.
|
||||
* PASSWORD should be returned only from password editor, this value
|
||||
* has a special meaning. It is used as alternative of DISABLED.
|
||||
* PLUGIN should be returned only when plug-in has focus. When a
|
||||
* plug-in is focused content, we should send native events directly.
|
||||
* Because we don't process some native events, but they may be needed
|
||||
* by the plug-in.
|
||||
*/
|
||||
enum {
|
||||
IME_STATUS_NONE = 0x0000,
|
||||
IME_STATUS_ENABLE = 0x0001,
|
||||
IME_STATUS_DISABLE = 0x0002,
|
||||
IME_STATUS_PASSWORD = 0x0004,
|
||||
IME_STATUS_PLUGIN = 0x0008,
|
||||
IME_STATUS_OPEN = 0x0010,
|
||||
IME_STATUS_CLOSE = 0x0020
|
||||
};
|
||||
enum {
|
||||
IME_STATUS_MASK_ENABLED = IME_STATUS_ENABLE | IME_STATUS_DISABLE |
|
||||
IME_STATUS_PASSWORD | IME_STATUS_PLUGIN,
|
||||
IME_STATUS_MASK_OPENED = IME_STATUS_OPEN | IME_STATUS_CLOSE
|
||||
};
|
||||
virtual PRUint32 GetDesiredIMEState();
|
||||
virtual IMEState GetDesiredIMEState();
|
||||
|
||||
/**
|
||||
* Gets content node with the binding (or native code, possibly on the
|
||||
|
@ -64,7 +64,7 @@
|
||||
#include "nsSMILAnimationController.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
#include "nsIDocumentEncoder.h"
|
||||
#include "nsIAnimationFrameListener.h"
|
||||
#include "nsIFrameRequestCallback.h"
|
||||
#include "nsEventStates.h"
|
||||
#include "nsIStructuredCloneContainer.h"
|
||||
#include "nsIBFCacheEntry.h"
|
||||
@ -1518,18 +1518,14 @@ public:
|
||||
*/
|
||||
virtual Element* LookupImageElement(const nsAString& aElementId) = 0;
|
||||
|
||||
void ScheduleBeforePaintEvent(nsIAnimationFrameListener* aListener);
|
||||
void BeforePaintEventFiring()
|
||||
{
|
||||
mHavePendingPaint = false;
|
||||
}
|
||||
void ScheduleFrameRequestCallback(nsIFrameRequestCallback* aCallback);
|
||||
|
||||
typedef nsTArray< nsCOMPtr<nsIAnimationFrameListener> > AnimationListenerList;
|
||||
typedef nsTArray< nsCOMPtr<nsIFrameRequestCallback> > FrameRequestCallbackList;
|
||||
/**
|
||||
* Put this documents animation frame listeners into the provided
|
||||
* Put this document's frame request callbacks into the provided
|
||||
* list, and forget about them.
|
||||
*/
|
||||
void TakeAnimationFrameListeners(AnimationListenerList& aListeners);
|
||||
void TakeFrameRequestCallbacks(FrameRequestCallbackList& aCallbacks);
|
||||
|
||||
// This returns true when the document tree is being teared down.
|
||||
bool InUnlinkOrDeletion() { return mInUnlinkOrDeletion; }
|
||||
@ -1746,9 +1742,6 @@ protected:
|
||||
// True if document has ever had script handling object.
|
||||
bool mHasHadScriptHandlingObject;
|
||||
|
||||
// True if we're waiting for a before-paint event.
|
||||
bool mHavePendingPaint;
|
||||
|
||||
// True if we're an SVG document being used as an image.
|
||||
bool mIsBeingUsedAsImage;
|
||||
|
||||
@ -1812,7 +1805,7 @@ protected:
|
||||
|
||||
nsCOMPtr<nsIDocumentEncoder> mCachedEncoder;
|
||||
|
||||
AnimationListenerList mAnimationFrameListeners;
|
||||
FrameRequestCallbackList mFrameRequestCallbacks;
|
||||
|
||||
// This object allows us to evict ourself from the back/forward cache. The
|
||||
// pointer is non-null iff we're currently in the bfcache.
|
||||
|
@ -51,6 +51,9 @@
|
||||
#include "nsISHContainer.h"
|
||||
#include "nsIWindowWatcher.h"
|
||||
#include "mozilla/Services.h"
|
||||
#include "nsIXULWindow.h"
|
||||
#include "nsIAppShellService.h"
|
||||
#include "nsAppShellCID.h"
|
||||
|
||||
static bool sInited = 0;
|
||||
PRUint32 nsCCUncollectableMarker::sGeneration = 0;
|
||||
@ -231,6 +234,19 @@ nsCCUncollectableMarker::Observe(nsISupports* aSubject, const char* aTopic,
|
||||
MarkWindowList(windowList);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIAppShellService> appShell =
|
||||
do_GetService(NS_APPSHELLSERVICE_CONTRACTID);
|
||||
if (appShell) {
|
||||
nsCOMPtr<nsIXULWindow> hw;
|
||||
appShell->GetHiddenWindow(getter_AddRefs(hw));
|
||||
if (hw) {
|
||||
nsCOMPtr<nsIDocShell> shell;
|
||||
hw->GetDocShell(getter_AddRefs(shell));
|
||||
nsCOMPtr<nsIDocShellTreeNode> shellTreeNode = do_QueryInterface(shell);
|
||||
MarkDocShell(shellTreeNode);
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -212,6 +212,7 @@ static NS_DEFINE_CID(kXTFServiceCID, NS_XTFSERVICE_CID);
|
||||
|
||||
using namespace mozilla::dom;
|
||||
using namespace mozilla::layers;
|
||||
using namespace mozilla::widget;
|
||||
using namespace mozilla;
|
||||
|
||||
const char kLoadAsData[] = "loadAsData";
|
||||
@ -4026,25 +4027,6 @@ nsContentUtils::DropJSObjects(void* aScriptObjectHolder)
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* static */
|
||||
PRUint32
|
||||
nsContentUtils::GetWidgetStatusFromIMEStatus(PRUint32 aState)
|
||||
{
|
||||
switch (aState & nsIContent::IME_STATUS_MASK_ENABLED) {
|
||||
case nsIContent::IME_STATUS_DISABLE:
|
||||
return nsIWidget::IME_STATUS_DISABLED;
|
||||
case nsIContent::IME_STATUS_ENABLE:
|
||||
return nsIWidget::IME_STATUS_ENABLED;
|
||||
case nsIContent::IME_STATUS_PASSWORD:
|
||||
return nsIWidget::IME_STATUS_PASSWORD;
|
||||
case nsIContent::IME_STATUS_PLUGIN:
|
||||
return nsIWidget::IME_STATUS_PLUGIN;
|
||||
default:
|
||||
NS_ERROR("The given state doesn't have valid enable state");
|
||||
return nsIWidget::IME_STATUS_ENABLED;
|
||||
}
|
||||
}
|
||||
|
||||
/* static */
|
||||
void
|
||||
nsContentUtils::NotifyInstalledMenuKeyboardListener(bool aInstalling)
|
||||
|