mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Merge MC -> JM
This commit is contained in:
commit
987914bed5
@ -55,7 +55,7 @@
|
||||
|
||||
typedef GType (* AtkGetTypeType) (void);
|
||||
GType g_atk_hyperlink_impl_type = G_TYPE_INVALID;
|
||||
static PRBool sATKChecked = PR_FALSE;
|
||||
static bool sATKChecked = false;
|
||||
static PRLibrary *sATKLib = nsnull;
|
||||
static const char sATKLibName[] = "libatk-1.0.so.0";
|
||||
static const char sATKHyperlinkImplGetTypeSymbol[] =
|
||||
@ -100,8 +100,8 @@ static void insert_hf(gpointer key, gpointer value, gpointer data);
|
||||
static gint mai_key_snooper(GtkWidget *the_widget, GdkEventKey *event,
|
||||
gpointer func_data);
|
||||
|
||||
static GHashTable *listener_list = NULL;
|
||||
static gint listener_idx = 1;
|
||||
static GHashTable* sListener_list = NULL;
|
||||
static gint sListener_idx = 1;
|
||||
|
||||
#define MAI_TYPE_UTIL (mai_util_get_type ())
|
||||
#define MAI_UTIL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
|
||||
@ -115,8 +115,12 @@ static gint listener_idx = 1;
|
||||
#define MAI_UTIL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \
|
||||
MAI_TYPE_UTIL, MaiUtilClass))
|
||||
|
||||
static GHashTable *key_listener_list = NULL;
|
||||
static guint key_snooper_id = 0;
|
||||
static GHashTable* sKey_listener_list = NULL;
|
||||
static guint sKey_snooper_id = 0;
|
||||
static GQuark sQuark_gecko_acc_obj = g_quark_from_static_string("GeckoAccObj");
|
||||
static bool sToplevel_event_hook_added = false;
|
||||
static gulong sToplevel_show_hook = 0;
|
||||
static gulong sToplevel_hide_hook = 0;
|
||||
|
||||
G_BEGIN_DECLS
|
||||
typedef void (*GnomeAccessibilityInit) (void);
|
||||
@ -223,7 +227,10 @@ window_added (AtkObject *atk_obj,
|
||||
guint index,
|
||||
AtkObject *child)
|
||||
{
|
||||
guint id = g_signal_lookup ("create", MAI_TYPE_ATK_OBJECT);
|
||||
if (!IS_MAI_OBJECT(child))
|
||||
return;
|
||||
|
||||
static guint id = g_signal_lookup ("create", MAI_TYPE_ATK_OBJECT);
|
||||
g_signal_emit (child, id, 0);
|
||||
}
|
||||
|
||||
@ -232,7 +239,10 @@ window_removed (AtkObject *atk_obj,
|
||||
guint index,
|
||||
AtkObject *child)
|
||||
{
|
||||
guint id = g_signal_lookup ("destroy", MAI_TYPE_ATK_OBJECT);
|
||||
if (!IS_MAI_OBJECT(child))
|
||||
return;
|
||||
|
||||
static guint id = g_signal_lookup ("destroy", MAI_TYPE_ATK_OBJECT);
|
||||
g_signal_emit (child, id, 0);
|
||||
}
|
||||
|
||||
@ -264,8 +274,8 @@ mai_util_class_init(MaiUtilClass *klass)
|
||||
atk_class->get_toolkit_name = mai_util_get_toolkit_name;
|
||||
atk_class->get_toolkit_version = mai_util_get_toolkit_version;
|
||||
|
||||
listener_list = g_hash_table_new_full(g_int_hash, g_int_equal, NULL,
|
||||
_listener_info_destroy);
|
||||
sListener_list = g_hash_table_new_full(g_int_hash, g_int_equal, NULL,
|
||||
_listener_info_destroy);
|
||||
// Keep track of added/removed windows.
|
||||
AtkObject *root = atk_get_root ();
|
||||
g_signal_connect (root, "children-changed::add", (GCallback) window_added, NULL);
|
||||
@ -289,7 +299,7 @@ mai_util_add_global_event_listener(GSignalEmissionHook listener,
|
||||
gail_listenerid =
|
||||
gail_add_global_event_listener(listener, event_type);
|
||||
}
|
||||
|
||||
|
||||
rc = add_listener (listener, "MaiAtkObject", split_string[1],
|
||||
event_type, gail_listenerid);
|
||||
}
|
||||
@ -310,14 +320,14 @@ mai_util_remove_global_event_listener(guint remove_listener)
|
||||
gint tmp_idx = remove_listener;
|
||||
|
||||
listener_info = (MaiUtilListenerInfo *)
|
||||
g_hash_table_lookup(listener_list, &tmp_idx);
|
||||
g_hash_table_lookup(sListener_list, &tmp_idx);
|
||||
|
||||
if (listener_info != NULL) {
|
||||
if (gail_remove_global_event_listener &&
|
||||
listener_info->gail_listenerid) {
|
||||
gail_remove_global_event_listener(listener_info->gail_listenerid);
|
||||
}
|
||||
|
||||
|
||||
/* Hook id of 0 and signal id of 0 are invalid */
|
||||
if (listener_info->hook_id != 0 && listener_info->signal_id != 0) {
|
||||
/* Remove the emission hook */
|
||||
@ -325,7 +335,7 @@ mai_util_remove_global_event_listener(guint remove_listener)
|
||||
listener_info->hook_id);
|
||||
|
||||
/* Remove the element from the hash */
|
||||
g_hash_table_remove(listener_list, &tmp_idx);
|
||||
g_hash_table_remove(sListener_list, &tmp_idx);
|
||||
}
|
||||
else {
|
||||
g_warning("Invalid listener hook_id %ld or signal_id %d\n",
|
||||
@ -366,14 +376,14 @@ atk_key_event_from_gdk_event_key (GdkEventKey *key)
|
||||
event->state = key->state;
|
||||
event->keyval = key->keyval;
|
||||
event->length = key->length;
|
||||
if (key->string && key->string [0] &&
|
||||
if (key->string && key->string [0] &&
|
||||
(key->state & GDK_CONTROL_MASK ||
|
||||
g_unichar_isgraph (g_utf8_get_char (key->string)))) {
|
||||
event->string = key->string;
|
||||
}
|
||||
else if (key->type == GDK_KEY_PRESS ||
|
||||
key->type == GDK_KEY_RELEASE) {
|
||||
event->string = gdk_keyval_name (key->keyval);
|
||||
event->string = gdk_keyval_name (key->keyval);
|
||||
}
|
||||
event->keycode = key->hardware_keycode;
|
||||
event->timestamp = key->time;
|
||||
@ -409,9 +419,9 @@ mai_key_snooper(GtkWidget *the_widget, GdkEventKey *event, gpointer func_data)
|
||||
|
||||
MaiKeyEventInfo *info = g_new0(MaiKeyEventInfo, 1);
|
||||
gint consumed = 0;
|
||||
if (key_listener_list) {
|
||||
if (sKey_listener_list) {
|
||||
GHashTable *new_hash = g_hash_table_new(NULL, NULL);
|
||||
g_hash_table_foreach (key_listener_list, insert_hf, new_hash);
|
||||
g_hash_table_foreach (sKey_listener_list, insert_hf, new_hash);
|
||||
info->key_event = atk_key_event_from_gdk_event_key (event);
|
||||
info->func_data = func_data;
|
||||
consumed = g_hash_table_foreach_steal (new_hash, notify_hf, info);
|
||||
@ -430,13 +440,13 @@ mai_util_add_key_event_listener (AtkKeySnoopFunc listener,
|
||||
|
||||
static guint key=0;
|
||||
|
||||
if (!key_listener_list) {
|
||||
key_listener_list = g_hash_table_new(NULL, NULL);
|
||||
key_snooper_id = gtk_key_snooper_install(mai_key_snooper, data);
|
||||
if (!sKey_listener_list) {
|
||||
sKey_listener_list = g_hash_table_new(NULL, NULL);
|
||||
sKey_snooper_id = gtk_key_snooper_install(mai_key_snooper, data);
|
||||
}
|
||||
AtkKeySnoopFuncPointer atkKeySnoop;
|
||||
atkKeySnoop.func_ptr = listener;
|
||||
g_hash_table_insert(key_listener_list, GUINT_TO_POINTER (key++),
|
||||
g_hash_table_insert(sKey_listener_list, GUINT_TO_POINTER (key++),
|
||||
atkKeySnoop.data);
|
||||
return key;
|
||||
}
|
||||
@ -444,15 +454,15 @@ mai_util_add_key_event_listener (AtkKeySnoopFunc listener,
|
||||
static void
|
||||
mai_util_remove_key_event_listener (guint remove_listener)
|
||||
{
|
||||
if (!key_listener_list) {
|
||||
if (!sKey_listener_list) {
|
||||
// atk-bridge is initialized with gail (e.g. yelp)
|
||||
// try gail_remove_key_event_listener
|
||||
return gail_remove_key_event_listener(remove_listener);
|
||||
}
|
||||
|
||||
g_hash_table_remove(key_listener_list, GUINT_TO_POINTER (remove_listener));
|
||||
if (g_hash_table_size(key_listener_list) == 0) {
|
||||
gtk_key_snooper_remove(key_snooper_id);
|
||||
g_hash_table_remove(sKey_listener_list, GUINT_TO_POINTER (remove_listener));
|
||||
if (g_hash_table_size(sKey_listener_list) == 0) {
|
||||
gtk_key_snooper_remove(sKey_snooper_id);
|
||||
}
|
||||
}
|
||||
|
||||
@ -512,11 +522,11 @@ add_listener (GSignalEmissionHook listener,
|
||||
if (signal_id > 0) {
|
||||
MaiUtilListenerInfo *listener_info;
|
||||
|
||||
rc = listener_idx;
|
||||
rc = sListener_idx;
|
||||
|
||||
listener_info = (MaiUtilListenerInfo *)
|
||||
g_malloc(sizeof(MaiUtilListenerInfo));
|
||||
listener_info->key = listener_idx;
|
||||
listener_info->key = sListener_idx;
|
||||
listener_info->hook_id =
|
||||
g_signal_add_emission_hook(signal_id, 0, listener,
|
||||
g_strdup(hook_data),
|
||||
@ -524,9 +534,9 @@ add_listener (GSignalEmissionHook listener,
|
||||
listener_info->signal_id = signal_id;
|
||||
listener_info->gail_listenerid = gail_listenerid;
|
||||
|
||||
g_hash_table_insert(listener_list, &(listener_info->key),
|
||||
g_hash_table_insert(sListener_list, &(listener_info->key),
|
||||
listener_info);
|
||||
listener_idx++;
|
||||
sListener_idx++;
|
||||
}
|
||||
else {
|
||||
g_warning("Invalid signal type %s\n", signal);
|
||||
@ -554,6 +564,49 @@ nsApplicationAccessibleWrap::~nsApplicationAccessibleWrap()
|
||||
nsAccessibleWrap::ShutdownAtkObject();
|
||||
}
|
||||
|
||||
static gboolean
|
||||
toplevel_event_watcher(GSignalInvocationHint* ihint,
|
||||
guint n_param_values,
|
||||
const GValue* param_values,
|
||||
gpointer data)
|
||||
{
|
||||
if (nsAccessibilityService::IsShutdown())
|
||||
return TRUE;
|
||||
|
||||
GObject* object = reinterpret_cast<GObject*>(g_value_get_object(param_values));
|
||||
if (!GTK_IS_WINDOW(object))
|
||||
return TRUE;
|
||||
|
||||
AtkObject* child = gtk_widget_get_accessible(GTK_WIDGET(object));
|
||||
|
||||
// GTK native dialog
|
||||
if (!IS_MAI_OBJECT(child) &&
|
||||
(atk_object_get_role(child) == ATK_ROLE_DIALOG)) {
|
||||
|
||||
if (data == reinterpret_cast<gpointer>(nsIAccessibleEvent::EVENT_SHOW)) {
|
||||
|
||||
// Attach the dialog accessible to app accessible tree
|
||||
nsAccessible* windowAcc = GetAccService()->AddNativeRootAccessible(child);
|
||||
g_object_set_qdata(G_OBJECT(child), sQuark_gecko_acc_obj,
|
||||
reinterpret_cast<gpointer>(windowAcc));
|
||||
|
||||
} else {
|
||||
|
||||
// Deattach the dialog accessible
|
||||
nsAccessible* windowAcc =
|
||||
reinterpret_cast<nsAccessible*>
|
||||
(g_object_get_qdata(G_OBJECT(child), sQuark_gecko_acc_obj));
|
||||
if (windowAcc) {
|
||||
GetAccService()->RemoveNativeRootAccessible(windowAcc);
|
||||
g_object_set_qdata(G_OBJECT(child), sQuark_gecko_acc_obj, NULL);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsApplicationAccessibleWrap::Init()
|
||||
{
|
||||
@ -602,6 +655,18 @@ nsApplicationAccessibleWrap::Init()
|
||||
}
|
||||
else
|
||||
MAI_LOG_DEBUG(("Fail to load lib: %s\n", sAtkBridge.libName));
|
||||
|
||||
if (!sToplevel_event_hook_added) {
|
||||
sToplevel_event_hook_added = true;
|
||||
sToplevel_show_hook =
|
||||
g_signal_add_emission_hook(g_signal_lookup("show", GTK_TYPE_WINDOW),
|
||||
0, toplevel_event_watcher,
|
||||
reinterpret_cast<gpointer>(nsIAccessibleEvent::EVENT_SHOW), NULL);
|
||||
sToplevel_hide_hook =
|
||||
g_signal_add_emission_hook(g_signal_lookup("hide", GTK_TYPE_WINDOW),
|
||||
0, toplevel_event_watcher,
|
||||
reinterpret_cast<gpointer>(nsIAccessibleEvent::EVENT_HIDE), NULL);
|
||||
}
|
||||
}
|
||||
|
||||
return nsApplicationAccessible::Init();
|
||||
@ -610,6 +675,14 @@ nsApplicationAccessibleWrap::Init()
|
||||
void
|
||||
nsApplicationAccessibleWrap::Unload()
|
||||
{
|
||||
if (sToplevel_event_hook_added) {
|
||||
sToplevel_event_hook_added = false;
|
||||
g_signal_remove_emission_hook(g_signal_lookup("show", GTK_TYPE_WINDOW),
|
||||
sToplevel_show_hook);
|
||||
g_signal_remove_emission_hook(g_signal_lookup("hide", GTK_TYPE_WINDOW),
|
||||
sToplevel_hide_hook);
|
||||
}
|
||||
|
||||
if (sAtkBridge.lib) {
|
||||
// Do not shutdown/unload atk-bridge,
|
||||
// an exit function registered will take care of it
|
||||
@ -671,7 +744,7 @@ gboolean fireRootAccessibleAddedCB(gpointer data)
|
||||
g_object_unref(eventData->app_accessible);
|
||||
g_object_unref(eventData->root_accessible);
|
||||
free(data);
|
||||
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -741,7 +814,7 @@ nsApplicationAccessibleWrap::PreCreate()
|
||||
AtkSocketAccessible::g_atk_socket_embed;
|
||||
}
|
||||
}
|
||||
sATKChecked = PR_TRUE;
|
||||
sATKChecked = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,11 +43,6 @@
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsCoreUtils.h"
|
||||
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDOMWindowInternal.h"
|
||||
#include "nsIDocShellTreeItem.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
|
||||
void
|
||||
componentInterfaceInitCB(AtkComponentIface *aIface)
|
||||
{
|
||||
|
@ -46,9 +46,8 @@
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDOMHTMLDocument.h"
|
||||
#include "nsIDOMHTMLElement.h"
|
||||
#include "nsIDOMNodeList.h"
|
||||
#include "nsIDOMRange.h"
|
||||
#include "nsIDOMWindowInternal.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsIDOMXULElement.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIContentViewer.h"
|
||||
@ -427,12 +426,11 @@ nsCoreUtils::GetScreenCoordsForWindow(nsINode *aNode)
|
||||
|
||||
nsCOMPtr<nsIDOMWindow> window;
|
||||
domDoc->GetDefaultView(getter_AddRefs(window));
|
||||
nsCOMPtr<nsIDOMWindowInternal> windowInter(do_QueryInterface(window));
|
||||
if (!windowInter)
|
||||
if (!window)
|
||||
return coords;
|
||||
|
||||
windowInter->GetScreenX(&coords.x);
|
||||
windowInter->GetScreenY(&coords.y);
|
||||
window->GetScreenX(&coords.x);
|
||||
window->GetScreenY(&coords.y);
|
||||
return coords;
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@
|
||||
#include "nsIDocument.h"
|
||||
#include "nsEventListenerManager.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsIMenuFrame.h"
|
||||
#include "nsMenuFrame.h"
|
||||
#include "nsIHTMLDocument.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsISelectionPrivate.h"
|
||||
@ -688,16 +688,13 @@ nsRootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
|
||||
return; // Tree with nothing selected
|
||||
}
|
||||
#endif
|
||||
nsIFrame* menuFrame = accessible->GetFrame();
|
||||
if (!menuFrame)
|
||||
return;
|
||||
|
||||
nsIMenuFrame* imenuFrame = do_QueryFrame(menuFrame);
|
||||
if (imenuFrame)
|
||||
nsMenuFrame* menuFrame = do_QueryFrame(accessible->GetFrame());
|
||||
if (menuFrame)
|
||||
fireFocus = PR_TRUE;
|
||||
// QI failed for nsIMenuFrame means it's not on menu bar
|
||||
if (imenuFrame && imenuFrame->IsOnMenuBar() &&
|
||||
!imenuFrame->IsOnActiveMenuBar()) {
|
||||
// QI failed for nsMenuFrame means it's not on menu bar
|
||||
if (menuFrame && menuFrame->IsOnMenuBar() &&
|
||||
!menuFrame->IsOnActiveMenuBar()) {
|
||||
// It is a top level menuitem. Only fire a focus event when the menu bar
|
||||
// is active.
|
||||
return;
|
||||
|
@ -179,7 +179,7 @@ nsHTMLImageAccessible::DoAction(PRUint8 aIndex)
|
||||
|
||||
nsIDocument* document = mContent->GetOwnerDoc();
|
||||
nsCOMPtr<nsPIDOMWindow> piWindow = document->GetWindow();
|
||||
nsCOMPtr<nsIDOMWindowInternal> win(do_QueryInterface(piWindow));
|
||||
nsCOMPtr<nsIDOMWindow> win = do_QueryInterface(piWindow);
|
||||
NS_ENSURE_TRUE(win, NS_ERROR_FAILURE);
|
||||
nsCOMPtr<nsIDOMWindow> tmp;
|
||||
return win->Open(longDesc, EmptyString(), EmptyString(),
|
||||
|
@ -511,7 +511,7 @@ nsHTMLTableAccessible::GetRelationByType(PRUint32 aRelationType,
|
||||
aRelation);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (aRelationType == nsIAccessibleRelation::RELATION_DESCRIBED_BY)
|
||||
if (aRelationType == nsIAccessibleRelation::RELATION_LABELLED_BY)
|
||||
return nsRelUtils::AddTarget(aRelationType, aRelation, Caption());
|
||||
|
||||
return NS_OK;
|
||||
@ -1528,11 +1528,8 @@ nsHTMLCaptionAccessible::GetRelationByType(PRUint32 aRelationType,
|
||||
aRelation);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (aRelationType == nsIAccessibleRelation::RELATION_DESCRIPTION_FOR) {
|
||||
nsCOMPtr<nsIAccessible> accParent;
|
||||
GetParent(getter_AddRefs(accParent));
|
||||
return nsRelUtils::AddTarget(aRelationType, aRelation, accParent);
|
||||
}
|
||||
if (aRelationType == nsIAccessibleRelation::RELATION_LABEL_FOR)
|
||||
return nsRelUtils::AddTarget(aRelationType, aRelation, GetParent());
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -49,10 +49,8 @@
|
||||
#include "nsContentCID.h"
|
||||
#include "nsIDOMCharacterData.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsIDOMRange.h"
|
||||
#include "nsIDOMNSRange.h"
|
||||
#include "nsIDOMWindowInternal.h"
|
||||
#include "nsIDOMXULDocument.h"
|
||||
#include "nsIEditingSession.h"
|
||||
#include "nsIEditor.h"
|
||||
|
@ -102,8 +102,8 @@
|
||||
|
||||
// 'described by'/'description for' relation for html:table and
|
||||
// html:caption
|
||||
testRelation("caption", RELATION_DESCRIPTION_FOR, "table");
|
||||
testRelation("table", RELATION_DESCRIBED_BY, "caption");
|
||||
testRelation("caption", RELATION_LABEL_FOR, "table");
|
||||
testRelation("table", RELATION_LABELLED_BY, "caption");
|
||||
|
||||
// 'labelled by'/'label for' relation for html:fieldset and
|
||||
// html:legend
|
||||
|
@ -1,4 +0,0 @@
|
||||
For information about installing, running and configuring Firefox
|
||||
including a list of known issues and troubleshooting information,
|
||||
refer to: http://getfirefox.com/releases/
|
||||
|
@ -1,193 +1,201 @@
|
||||
<?xml version="1.0"?>
|
||||
<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
|
||||
<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1306529826000">
|
||||
<emItems>
|
||||
<emItem id="fdm_ffext@freedownloadmanager.org">
|
||||
<versionRange minVersion="1.0" maxVersion="1.3.1">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.0a1" maxVersion="*"/>
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem id="firefox@bandoo.com">
|
||||
<versionRange minVersion="5.0" maxVersion="5.0" severity="1">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.7a1pre" maxVersion="*"/>
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem id="langpack-vi-VN@firefox.mozilla.org">
|
||||
<versionRange minVersion="2.0" maxVersion="2.0"/>
|
||||
</emItem>
|
||||
<emItem id="masterfiler@gmail.com">
|
||||
<versionRange severity="3"/>
|
||||
</emItem>
|
||||
<emItem id="mozilla_cc@internetdownloadmanager.com">
|
||||
<versionRange minVersion=" " maxVersion="6.9.8">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.7a1pre" maxVersion="*"/>
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
<versionRange minVersion="2.1" maxVersion="3.3">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.0a1" maxVersion="*"/>
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem id="msntoolbar@msn.com">
|
||||
<versionRange minVersion=" " maxVersion="6.*"/>
|
||||
</emItem>
|
||||
<emItem id="personas@christopher.beard">
|
||||
<versionRange minVersion="1.6" maxVersion="1.6">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.6" maxVersion="3.6.*"/>
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem id="ShopperReports@ShopperReports.com">
|
||||
<versionRange minVersion="3.1.22.0" maxVersion="3.1.22.0"/>
|
||||
</emItem>
|
||||
<emItem id="support@daemon-tools.cc">
|
||||
<versionRange minVersion=" " maxVersion="1.0.0.5"/>
|
||||
</emItem>
|
||||
<emItem id="support@update-firefox.com"/>
|
||||
<emItem id="yslow@yahoo-inc.com">
|
||||
<versionRange minVersion="2.0.5" maxVersion="2.0.5">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.5.7" maxVersion="*"/>
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem id="{2224e955-00e9-4613-a844-ce69fccaae91}"/>
|
||||
<emItem id="{27182e60-b5f3-411c-b545-b44205977502}">
|
||||
<versionRange minVersion="1.0" maxVersion="1.0"/>
|
||||
</emItem>
|
||||
<emItem id="{3252b9ae-c69a-4eaf-9502-dc9c1f6c009e}">
|
||||
<versionRange minVersion="2.2" maxVersion="2.2"/>
|
||||
</emItem>
|
||||
<emItem id="{3f963a5b-e555-4543-90e2-c3908898db71}">
|
||||
<versionRange minVersion=" " maxVersion="8.5"/>
|
||||
</emItem>
|
||||
<emItem id="{46551EC9-40F0-4e47-8E18-8E5CF550CFB8}">
|
||||
<versionRange minVersion="1.1b1" maxVersion="1.1b1"/>
|
||||
</emItem>
|
||||
<emItem id="{4B3803EA-5230-4DC3-A7FC-33638F3D3542}">
|
||||
<versionRange minVersion="1.2" maxVersion="1.2">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.0a1" maxVersion="*"/>
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem id="{6E19037A-12E3-4295-8915-ED48BC341614}">
|
||||
<versionRange minVersion="0.1" maxVersion="1.3.328.4" severity="1">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.7a1pre" maxVersion="*"/>
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem id="{8CE11043-9A15-4207-A565-0C94C42D590D}"/>
|
||||
<emItem id="{AB2CE124-6272-4b12-94A9-7303C7397BD1}">
|
||||
<versionRange minVersion="0.1" maxVersion="5.2.0.7164" severity="1"/>
|
||||
</emItem>
|
||||
<emItem id="{B13721C7-F507-4982-B2E5-502A71474FED}">
|
||||
<versionRange severity="1"/>
|
||||
</emItem>
|
||||
<emItem id="{B7082FAA-CB62-4872-9106-E42DD88EDE45}">
|
||||
<versionRange minVersion="0.1" maxVersion="3.3.0.*">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.7a1" maxVersion="*"/>
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
<versionRange minVersion="3.3.1" maxVersion="*">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="5.0a1" maxVersion="*"/>
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem id="{E8E88AB0-7182-11DF-904E-6045E0D72085}"/>
|
||||
</emItems>
|
||||
<pluginItems>
|
||||
<pluginItem>
|
||||
<match name="name" exp="^Yahoo Application State Plugin$"/>
|
||||
<match name="description" exp="^Yahoo Application State Plugin$"/>
|
||||
<match name="filename" exp="npYState.dll"/>
|
||||
<versionRange>
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.0a1" maxVersion="3.*"/>
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</pluginItem>
|
||||
<pluginItem>
|
||||
<match name="name" exp="QuickTime Plug-in 7[.]1[.]"/>
|
||||
<match name="filename" exp="npqtplugin.?[.]dll"/>
|
||||
<versionRange>
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.0a1" maxVersion="3.*"/>
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</pluginItem>
|
||||
<pluginItem>
|
||||
<match name="filename" exp="NPFFAddOn.dll"/>
|
||||
<versionRange>
|
||||
</versionRange>
|
||||
</pluginItem>
|
||||
<pluginItem>
|
||||
<match name="filename" exp="NPMySrch.dll"/>
|
||||
<versionRange>
|
||||
</versionRange>
|
||||
</pluginItem>
|
||||
<pluginItem>
|
||||
<match name="filename" exp="npViewpoint.dll"/>
|
||||
<versionRange>
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.0" maxVersion="*"/>
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</pluginItem>
|
||||
<pluginItem>
|
||||
<match name="name" exp="[0-6]\.0\.[01]\d{2}\.\d+"/>
|
||||
<match name="filename" exp="npdeploytk.dll"/>
|
||||
<versionRange severity="1">
|
||||
</versionRange>
|
||||
</pluginItem>
|
||||
<pluginItem>
|
||||
<match name="filename" exp="[Nn][Pp][Jj][Pp][Ii]1[56]0_[0-9]+\.[Dd][Ll][Ll]"/>
|
||||
<versionRange>
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.6a1pre" maxVersion="*"/>
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</pluginItem>
|
||||
</pluginItems>
|
||||
<gfxItems>
|
||||
<gfxBlacklistEntry>
|
||||
<os>WINNT 6.1</os>
|
||||
<vendor>0x10de</vendor>
|
||||
<devices>
|
||||
<device>0x0a6c</device>
|
||||
</devices>
|
||||
<feature>DIRECT2D</feature>
|
||||
<featureStatus>BLOCKED_DRIVER_VERSION</featureStatus>
|
||||
<driverVersion>8.17.12.5896</driverVersion>
|
||||
<driverVersionComparator>LESS_THAN_OR_EQUAL</driverVersionComparator>
|
||||
</gfxBlacklistEntry>
|
||||
<gfxBlacklistEntry>
|
||||
<os>WINNT 6.1</os>
|
||||
<vendor>0x10de</vendor>
|
||||
<devices>
|
||||
<device>0x0a6c</device>
|
||||
</devices>
|
||||
<feature>DIRECT3D_9_LAYERS</feature>
|
||||
<featureStatus>BLOCKED_DRIVER_VERSION</featureStatus>
|
||||
<driverVersion>8.17.12.5896</driverVersion>
|
||||
<driverVersionComparator>LESS_THAN_OR_EQUAL</driverVersionComparator>
|
||||
</gfxBlacklistEntry>
|
||||
<gfxBlacklistEntry>
|
||||
<os>WINNT 5.1</os>
|
||||
<vendor>0x10de</vendor>
|
||||
<feature>DIRECT3D_9_LAYERS</feature>
|
||||
<featureStatus>BLOCKED_DRIVER_VERSION</featureStatus>
|
||||
<driverVersion>7.0.0.0</driverVersion>
|
||||
<driverVersionComparator>GREATER_THAN_OR_EQUAL</driverVersionComparator>
|
||||
</gfxBlacklistEntry>
|
||||
</gfxItems>
|
||||
</blocklist>
|
||||
<emItem blockID="i8" id="{B13721C7-F507-4982-B2E5-502A71474FED}">
|
||||
<versionRange minVersion=" " severity="1">
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i38" id="{B7082FAA-CB62-4872-9106-E42DD88EDE45}">
|
||||
<versionRange minVersion="0.1" maxVersion="3.3.0.*">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.7a1" maxVersion="*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
<versionRange minVersion="3.3.1" maxVersion="*">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="5.0a1" maxVersion="*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i19" id="{46551EC9-40F0-4e47-8E18-8E5CF550CFB8}">
|
||||
<versionRange minVersion="1.1b1" maxVersion="1.1b1">
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i16" id="{27182e60-b5f3-411c-b545-b44205977502}">
|
||||
<versionRange minVersion="1.0" maxVersion="1.0">
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i10" id="{8CE11043-9A15-4207-A565-0C94C42D590D}">
|
||||
</emItem>
|
||||
<emItem blockID="i1" id="mozilla_cc@internetdownloadmanager.com">
|
||||
<versionRange minVersion="2.1" maxVersion="3.3">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.0a1" maxVersion="*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
<versionRange minVersion=" " maxVersion="6.9.8">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.7a1pre" maxVersion="*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i18" id="msntoolbar@msn.com">
|
||||
<versionRange minVersion=" " maxVersion="6.*">
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i13" id="{E8E88AB0-7182-11DF-904E-6045E0D72085}">
|
||||
</emItem>
|
||||
<emItem blockID="i4" id="{4B3803EA-5230-4DC3-A7FC-33638F3D3542}">
|
||||
<versionRange minVersion="1.2" maxVersion="1.2">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.0a1" maxVersion="*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i23" id="firefox@bandoo.com">
|
||||
<versionRange minVersion="5.0" maxVersion="5.0" severity="1">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.7a1pre" maxVersion="*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i22" id="ShopperReports@ShopperReports.com">
|
||||
<versionRange minVersion="3.1.22.0" maxVersion="3.1.22.0">
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i2" id="fdm_ffext@freedownloadmanager.org">
|
||||
<versionRange minVersion="1.0" maxVersion="1.3.1">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.0a1" maxVersion="*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i5" id="support@daemon-tools.cc">
|
||||
<versionRange minVersion=" " maxVersion="1.0.0.5">
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i6" id="{3f963a5b-e555-4543-90e2-c3908898db71}">
|
||||
<versionRange minVersion=" " maxVersion="8.5">
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i12" id="masterfiler@gmail.com">
|
||||
<versionRange severity="3">
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i20" id="{AB2CE124-6272-4b12-94A9-7303C7397BD1}">
|
||||
<versionRange minVersion="0.1" maxVersion="5.2.0.7164" severity="1">
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i11" id="yslow@yahoo-inc.com">
|
||||
<versionRange minVersion="2.0.5" maxVersion="2.0.5">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.5.7" maxVersion="*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i17" id="{3252b9ae-c69a-4eaf-9502-dc9c1f6c009e}">
|
||||
<versionRange minVersion="2.2" maxVersion="2.2">
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i3" id="langpack-vi-VN@firefox.mozilla.org">
|
||||
<versionRange minVersion="2.0" maxVersion="2.0">
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i7" id="{2224e955-00e9-4613-a844-ce69fccaae91}">
|
||||
</emItem>
|
||||
<emItem blockID="i24" id="{6E19037A-12E3-4295-8915-ED48BC341614}">
|
||||
<versionRange minVersion="0.1" maxVersion="1.3.328.4" severity="1">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.7a1pre" maxVersion="*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i15" id="personas@christopher.beard">
|
||||
<versionRange minVersion="1.6" maxVersion="1.6">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.6" maxVersion="3.6.*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i21" id="support@update-firefox.com">
|
||||
</emItem>
|
||||
</emItems>
|
||||
|
||||
<pluginItems>
|
||||
<pluginItem blockID="p26">
|
||||
<match name="name" exp="^Yahoo Application State Plugin$" /> <match name="description" exp="^Yahoo Application State Plugin$" /> <match name="filename" exp="npYState.dll" /> <versionRange >
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.0a1" maxVersion="3.*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</pluginItem>
|
||||
<pluginItem blockID="p27">
|
||||
<match name="name" exp="QuickTime Plug-in 7[.]1[.]" /> <match name="filename" exp="npqtplugin.?[.]dll" /> <versionRange >
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.0a1" maxVersion="3.*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</pluginItem>
|
||||
<pluginItem blockID="p28">
|
||||
<match name="filename" exp="NPFFAddOn.dll" /> <versionRange >
|
||||
</versionRange>
|
||||
</pluginItem>
|
||||
<pluginItem blockID="p31">
|
||||
<match name="filename" exp="NPMySrch.dll" /> <versionRange >
|
||||
</versionRange>
|
||||
</pluginItem>
|
||||
<pluginItem blockID="p32">
|
||||
<match name="filename" exp="npViewpoint.dll" /> <versionRange >
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.0" maxVersion="*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</pluginItem>
|
||||
<pluginItem blockID="p33">
|
||||
<match name="name" exp="[0-6]\.0\.[01]\d{2}\.\d+" /> <match name="filename" exp="npdeploytk.dll" /> <versionRange severity="1">
|
||||
</versionRange>
|
||||
</pluginItem>
|
||||
<pluginItem blockID="p34">
|
||||
<match name="filename" exp="[Nn][Pp][Jj][Pp][Ii]1[56]0_[0-9]+\.[Dd][Ll][Ll]" /> <versionRange >
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.6a1pre" maxVersion="*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</pluginItem>
|
||||
</pluginItems>
|
||||
|
||||
<gfxItems>
|
||||
<gfxBlacklistEntry blockID="g35">
|
||||
<os>WINNT 6.1</os>
|
||||
<vendor>0x10de</vendor>
|
||||
<devices>
|
||||
<device>0x0a6c</device>
|
||||
</devices>
|
||||
<feature>DIRECT2D</feature>
|
||||
<featureStatus>BLOCKED_DRIVER_VERSION</featureStatus>
|
||||
<driverVersion>8.17.12.5896</driverVersion>
|
||||
<driverVersionComparator>LESS_THAN_OR_EQUAL</driverVersionComparator>
|
||||
</gfxBlacklistEntry>
|
||||
<gfxBlacklistEntry blockID="g36">
|
||||
<os>WINNT 6.1</os>
|
||||
<vendor>0x10de</vendor>
|
||||
<devices>
|
||||
<device>0x0a6c</device>
|
||||
</devices>
|
||||
<feature>DIRECT3D_9_LAYERS</feature>
|
||||
<featureStatus>BLOCKED_DRIVER_VERSION</featureStatus>
|
||||
<driverVersion>8.17.12.5896</driverVersion>
|
||||
<driverVersionComparator>LESS_THAN_OR_EQUAL</driverVersionComparator>
|
||||
</gfxBlacklistEntry>
|
||||
<gfxBlacklistEntry blockID="g37">
|
||||
<os>WINNT 5.1</os>
|
||||
<vendor>0x10de</vendor>
|
||||
<feature>DIRECT3D_9_LAYERS</feature>
|
||||
<featureStatus>BLOCKED_DRIVER_VERSION</featureStatus>
|
||||
<driverVersion>7.0.0.0</driverVersion>
|
||||
<driverVersionComparator>GREATER_THAN_OR_EQUAL</driverVersionComparator>
|
||||
</gfxBlacklistEntry>
|
||||
</gfxItems>
|
||||
|
||||
|
||||
</blocklist>
|
0
browser/app/profile/extensions/testpilot@labs.mozilla.com/install.rdf.in
Executable file → Normal file
0
browser/app/profile/extensions/testpilot@labs.mozilla.com/install.rdf.in
Executable file → Normal file
@ -567,7 +567,7 @@ pref("plugins.hide_infobar_for_missing_plugin", false);
|
||||
pref("plugins.hide_infobar_for_outdated_plugin", false);
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
pref("plugins.use_layers", false);
|
||||
pref("plugins.use_layers", true);
|
||||
pref("plugins.hide_infobar_for_carbon_failure_plugin", false);
|
||||
#endif
|
||||
|
||||
@ -900,6 +900,10 @@ pref("dom.ipc.plugins.enabled.x86_64", true);
|
||||
pref("dom.ipc.plugins.enabled", true);
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_E10S_COMPAT
|
||||
pref("browser.tabs.remote", true);
|
||||
#endif
|
||||
|
||||
// This pref governs whether we attempt to work around problems caused by
|
||||
// plugins using OS calls to manipulate the cursor while running out-of-
|
||||
// process. These workarounds all involve intercepting (hooking) certain
|
||||
|
@ -595,6 +595,7 @@ var allTabs = {
|
||||
delete this.tabCloseButton;
|
||||
return this.tabCloseButton = document.getElementById("allTabs-tab-close-button");
|
||||
},
|
||||
get toolbarButton() document.getElementById("alltabs-button"),
|
||||
get previews () this.container.getElementsByClassName("allTabs-preview"),
|
||||
get isOpen () this.panel.state == "open" || this.panel.state == "showing",
|
||||
|
||||
@ -632,7 +633,7 @@ var allTabs = {
|
||||
|
||||
prefName: "browser.allTabs.previews",
|
||||
readPref: function allTabs_readPref() {
|
||||
var allTabsButton = document.getElementById("alltabs-button");
|
||||
var allTabsButton = this.toolbarButton;
|
||||
if (!allTabsButton)
|
||||
return;
|
||||
|
||||
@ -697,6 +698,17 @@ var allTabs = {
|
||||
},
|
||||
|
||||
open: function allTabs_open() {
|
||||
var allTabsButton = this.toolbarButton;
|
||||
if (allTabsButton &&
|
||||
allTabsButton.getAttribute("type") == "menu") {
|
||||
// Without setTimeout, the menupopup won't stay open when invoking
|
||||
// "View > Show All Tabs" and the menu bar auto-hides.
|
||||
setTimeout(function () {
|
||||
allTabsButton.open = true;
|
||||
}, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
this.init();
|
||||
|
||||
if (this.isOpen)
|
||||
|
@ -435,7 +435,12 @@ let TabView = {
|
||||
|
||||
this.sessionRestoreEnabledOnce = true;
|
||||
|
||||
// enable session restore
|
||||
Services.prefs.setIntPref(this.PREF_STARTUP_PAGE, 3);
|
||||
// enable session restore if necessary
|
||||
if (Services.prefs.getIntPref(this.PREF_STARTUP_PAGE) != 3) {
|
||||
Services.prefs.setIntPref(this.PREF_STARTUP_PAGE, 3);
|
||||
|
||||
// show banner
|
||||
this._window.UI.notifySessionRestoreEnabled();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -500,3 +500,6 @@ statuspanel[label=""] {
|
||||
.panel-inner-arrowcontentfooter[footertype="promobox"] {
|
||||
-moz-binding: url("chrome://browser/content/urlbarBindings.xml#promobox");
|
||||
}
|
||||
|
||||
/* highlighter */
|
||||
%include highlighter.css
|
||||
|
@ -1415,6 +1415,8 @@ function prepareForStartup() {
|
||||
return;
|
||||
}
|
||||
|
||||
messageManager.loadFrameScript("chrome://browser/content/content.js", true);
|
||||
|
||||
// initialize observers and listeners
|
||||
// and give C++ access to gBrowser
|
||||
gBrowser.init();
|
||||
@ -1459,9 +1461,13 @@ function prepareForStartup() {
|
||||
Components.utils.reportError("Places database may be locked: " + ex);
|
||||
}
|
||||
|
||||
#ifdef MOZ_E10S_COMPAT
|
||||
// Bug 666801 - WebProgress support for e10s
|
||||
#else
|
||||
// hook up UI through progress listener
|
||||
gBrowser.addProgressListener(window.XULBrowserWindow);
|
||||
gBrowser.addTabsProgressListener(window.TabsProgressListener);
|
||||
#endif
|
||||
|
||||
// setup our common DOMLinkAdded listener
|
||||
gBrowser.addEventListener("DOMLinkAdded", DOMLinkHandler, false);
|
||||
@ -1583,9 +1589,13 @@ function delayedStartup(isLoadingBlank, mustLoadSidebar) {
|
||||
Components.utils.reportError("Failed to init content pref service:\n" + ex);
|
||||
}
|
||||
|
||||
#ifdef MOZ_E10S_COMPAT
|
||||
// Bug 666804 - NetworkPrioritizer support for e10s
|
||||
#else
|
||||
let NP = {};
|
||||
Cu.import("resource:///modules/NetworkPrioritizer.jsm", NP);
|
||||
NP.trackBrowserWindow(window);
|
||||
#endif
|
||||
|
||||
// initialize the session-restore service (in case it's not already running)
|
||||
try {
|
||||
@ -1636,8 +1646,12 @@ function delayedStartup(isLoadingBlank, mustLoadSidebar) {
|
||||
gBrowser.mPanelContainer.addEventListener("PreviewBrowserTheme", LightWeightThemeWebInstaller, false, true);
|
||||
gBrowser.mPanelContainer.addEventListener("ResetBrowserThemePreview", LightWeightThemeWebInstaller, false, true);
|
||||
|
||||
#ifdef MOZ_E10S_COMPAT
|
||||
// Bug 666808 - AeroPeek support for e10s
|
||||
#else
|
||||
if (Win7Features)
|
||||
Win7Features.onOpenWindow();
|
||||
#endif
|
||||
|
||||
// called when we go into full screen, even if it is
|
||||
// initiated by a web page script
|
||||
@ -4157,11 +4171,15 @@ var XULBrowserWindow = {
|
||||
init: function () {
|
||||
this.throbberElement = document.getElementById("navigator-throbber");
|
||||
|
||||
#ifdef MOZ_E10S_COMPAT
|
||||
// Bug 666809 - SecurityUI support for e10s
|
||||
#else
|
||||
// Initialize the security button's state and tooltip text. Remember to reset
|
||||
// _hostChanged, otherwise onSecurityChange will short circuit.
|
||||
var securityUI = gBrowser.securityUI;
|
||||
this._hostChanged = true;
|
||||
this.onSecurityChange(null, null, securityUI.state);
|
||||
#endif
|
||||
},
|
||||
|
||||
destroy: function () {
|
||||
|
@ -1024,12 +1024,6 @@
|
||||
#endif
|
||||
|
||||
</vbox>
|
||||
# <iframe id="highlighter-frame"
|
||||
# transparent="true"
|
||||
# type="content"
|
||||
# src="chrome://content/base/highlighter.html"/> is dynamically appended as
|
||||
# the last child of #tab-view-deck, only when it is needed, for minimal
|
||||
# performance impact.
|
||||
# <iframe id="tab-view"> is dynamically appended as the 2nd child of #tab-view-deck.
|
||||
# Introducing the iframe dynamically, as needed, was found to be better than
|
||||
# starting with an empty iframe here in browser.xul from a Ts standpoint.
|
||||
|
53
browser/base/content/content.js
Normal file
53
browser/base/content/content.js
Normal file
@ -0,0 +1,53 @@
|
||||
# -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
# ***** 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 multi-process front-end code.
|
||||
#
|
||||
# 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):
|
||||
# Felipe Gomes <felipc@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 *****
|
||||
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
const Cu = Components.utils;
|
||||
|
||||
// Bug 671101 - directly using webNavigation in this context
|
||||
// causes docshells to leak
|
||||
__defineGetter__("webNavigation", function() {
|
||||
return docShell.QueryInterface(Ci.nsIWebNavigation);
|
||||
});
|
||||
|
||||
addMessageListener("WebNavigation:LoadURI", function(message) {
|
||||
let flags = message.json.flags || webNavigation.LOAD_FLAGS_NONE;
|
||||
|
||||
webNavigation.loadURI(message.json.uri, flags, null, null, null);
|
||||
});
|
36
browser/base/content/highlighter.css
Normal file
36
browser/base/content/highlighter.css
Normal file
@ -0,0 +1,36 @@
|
||||
#highlighter-container {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
#highlighter-controls {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
#highlighter-veil-container {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.highlighter-veil,
|
||||
#highlighter-veil-middlebox,
|
||||
#highlighter-veil-transparentbox {
|
||||
-moz-transition-property: width, height;
|
||||
-moz-transition-duration: 0.1s;
|
||||
-moz-transition-timing-function: linear;
|
||||
}
|
||||
|
||||
#highlighter-veil-bottombox,
|
||||
#highlighter-veil-rightbox {
|
||||
-moz-box-flex: 1;
|
||||
}
|
||||
|
||||
#highlighter-veil-middlebox:-moz-locale-dir(rtl) {
|
||||
-moz-box-direction: reverse;
|
||||
}
|
||||
|
||||
#highlighter-close-button {
|
||||
position: absolute;
|
||||
pointer-events: auto;
|
||||
z-index: 1;
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html>
|
||||
<!-- ***** 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 Inspector Highlighter code.
|
||||
-
|
||||
- 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):
|
||||
- Rob Campbell <rcampbell@mozilla.com> (Original Author)
|
||||
- Paul Rouget <paul@mozilla.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 LGPL or the GPL. 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 ***** -->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<link rel="stylesheet" href="chrome://browser/skin/highlighter.css" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="close-button" role="button" class="clickable"/>
|
||||
|
||||
<!--
|
||||
To darken the page around the selected node, we use black-transparent
|
||||
divs, organized in 3 rows, keeping the div in the middle transparent.
|
||||
-->
|
||||
<div id="veil-container">
|
||||
<div id="veil">
|
||||
<div id="veil-topbox" class="veil"/>
|
||||
<div id="veil-middlebox">
|
||||
<div id="veil-leftbox" class="veil"/>
|
||||
<div id="veil-transparentbox"/>
|
||||
<div id="veil-rightbox" class="veil"/>
|
||||
</div>
|
||||
<div id="veil-bottombox" class="veil"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -58,9 +58,6 @@ const INSPECTOR_INVISIBLE_ELEMENTS = {
|
||||
|
||||
// Inspector notifications dispatched through the nsIObserverService.
|
||||
const INSPECTOR_NOTIFICATIONS = {
|
||||
// Fires once the Inspector highlighter is initialized and ready for use.
|
||||
HIGHLIGHTER_READY: "highlighter-ready",
|
||||
|
||||
// Fires once the Inspector highlights an element in the page.
|
||||
HIGHLIGHTING: "inspector-highlighting",
|
||||
|
||||
@ -76,86 +73,153 @@ const INSPECTOR_NOTIFICATIONS = {
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//// IFrameHighlighter
|
||||
//// Highlighter
|
||||
|
||||
/**
|
||||
* A highlighter mechanism using a transparent xul iframe.
|
||||
* A highlighter mechanism.
|
||||
*
|
||||
* The highlighter is built dynamically once the Inspector is invoked:
|
||||
* <stack id="highlighter-container">
|
||||
* <vbox id="highlighter-veil-container">...</vbox>
|
||||
* <box id="highlighter-controls>...</vbox>
|
||||
* </stack>
|
||||
*
|
||||
* @param nsIDOMNode aBrowser
|
||||
* The xul:browser object for the content window being highlighted.
|
||||
*/
|
||||
function IFrameHighlighter(aBrowser)
|
||||
function Highlighter(aBrowser)
|
||||
{
|
||||
this._init(aBrowser);
|
||||
}
|
||||
|
||||
IFrameHighlighter.prototype = {
|
||||
Highlighter.prototype = {
|
||||
|
||||
_init: function IFH__init(aBrowser)
|
||||
_init: function Highlighter__init(aBrowser)
|
||||
{
|
||||
this.browser = aBrowser;
|
||||
let stack = this.browser.parentNode;
|
||||
this.win = this.browser.contentWindow;
|
||||
this._highlighting = false;
|
||||
|
||||
let div = document.createElement("div");
|
||||
div.flex = 1;
|
||||
div.setAttribute("style", "pointer-events: none; -moz-user-focus: ignore");
|
||||
this.highlighterContainer = document.createElement("stack");
|
||||
this.highlighterContainer.id = "highlighter-container";
|
||||
|
||||
let iframe = document.createElement("iframe");
|
||||
iframe.setAttribute("id", "highlighter-frame");
|
||||
iframe.setAttribute("transparent", "true");
|
||||
iframe.setAttribute("type", "content");
|
||||
iframe.addEventListener("DOMTitleChanged", function(aEvent) {
|
||||
aEvent.stopPropagation();
|
||||
}, true);
|
||||
iframe.flex = 1;
|
||||
iframe.setAttribute("style", "-moz-user-focus: ignore");
|
||||
let veilBox = document.createElement("vbox");
|
||||
veilBox.id = "highlighter-veil-container";
|
||||
|
||||
this.listenOnce(iframe, "load", (function iframeLoaded() {
|
||||
this.iframeDoc = iframe.contentDocument;
|
||||
let controlsBox = document.createElement("box");
|
||||
controlsBox.id = "highlighter-controls";
|
||||
|
||||
this.veilTopDiv = this.iframeDoc.getElementById("veil-topbox");
|
||||
this.veilLeftDiv = this.iframeDoc.getElementById("veil-leftbox");
|
||||
this.veilMiddleDiv = this.iframeDoc.getElementById("veil-middlebox");
|
||||
this.veilTransparentDiv = this.iframeDoc.getElementById("veil-transparentbox");
|
||||
// The veil will make the whole page darker except
|
||||
// for the region of the selected box.
|
||||
this.buildVeil(veilBox);
|
||||
|
||||
let closeButton = this.iframeDoc.getElementById("close-button");
|
||||
this.listenOnce(closeButton, "click",
|
||||
InspectorUI.closeInspectorUI.bind(InspectorUI, false), false);
|
||||
// The controlsBox will host the different interactive
|
||||
// elements of the highlighter (buttons, toolbars, ...).
|
||||
this.buildControls(controlsBox);
|
||||
|
||||
this.browser.addEventListener("click", this, true);
|
||||
iframe.contentWindow.addEventListener("resize", this, false);
|
||||
this.handleResize();
|
||||
Services.obs.notifyObservers(null,
|
||||
INSPECTOR_NOTIFICATIONS.HIGHLIGHTER_READY, null);
|
||||
}).bind(this), true);
|
||||
this.highlighterContainer.appendChild(veilBox);
|
||||
this.highlighterContainer.appendChild(controlsBox);
|
||||
|
||||
iframe.setAttribute("src", "chrome://browser/content/highlighter.xhtml");
|
||||
stack.appendChild(this.highlighterContainer);
|
||||
|
||||
div.appendChild(iframe);
|
||||
stack.appendChild(div);
|
||||
this.iframe = iframe;
|
||||
this.iframeContainer = div;
|
||||
this.browser.addEventListener("resize", this, true);
|
||||
this.browser.addEventListener("scroll", this, true);
|
||||
|
||||
this.handleResize();
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Build the veil:
|
||||
*
|
||||
* <vbox id="highlighter-veil-container">
|
||||
* <box id="highlighter-veil-topbox" class="highlighter-veil"/>
|
||||
* <hbox id="highlighter-veil-middlebox">
|
||||
* <box id="highlighter-veil-leftbox" class="highlighter-veil"/>
|
||||
* <box id="highlighter-veil-transparentbox"/>
|
||||
* <box id="highlighter-veil-rightbox" class="highlighter-veil"/>
|
||||
* </hbox>
|
||||
* <box id="highlighter-veil-bottombox" class="highlighter-veil"/>
|
||||
* </vbox>
|
||||
*
|
||||
* @param nsIDOMNode aParent
|
||||
*/
|
||||
buildVeil: function Highlighter_buildVeil(aParent)
|
||||
{
|
||||
|
||||
// We will need to resize these boxes to surround a node.
|
||||
// See highlightRectangle().
|
||||
|
||||
this.veilTopBox = document.createElement("box");
|
||||
this.veilTopBox.id = "highlighter-veil-topbox";
|
||||
this.veilTopBox.className = "highlighter-veil";
|
||||
|
||||
this.veilMiddleBox = document.createElement("hbox");
|
||||
this.veilMiddleBox.id = "highlighter-veil-middlebox";
|
||||
|
||||
this.veilLeftBox = document.createElement("box");
|
||||
this.veilLeftBox.id = "highlighter-veil-leftbox";
|
||||
this.veilLeftBox.className = "highlighter-veil";
|
||||
|
||||
this.veilTransparentBox = document.createElement("box");
|
||||
this.veilTransparentBox.id = "highlighter-veil-transparentbox";
|
||||
|
||||
// We don't need any references to veilRightBox and veilBottomBox.
|
||||
// These boxes are automatically resized (flex=1)
|
||||
|
||||
let veilRightBox = document.createElement("box");
|
||||
veilRightBox.id = "highlighter-veil-rightbox";
|
||||
veilRightBox.className = "highlighter-veil";
|
||||
|
||||
let veilBottomBox = document.createElement("box");
|
||||
veilBottomBox.id = "highlighter-veil-bottombox";
|
||||
veilBottomBox.className = "highlighter-veil";
|
||||
|
||||
this.veilMiddleBox.appendChild(this.veilLeftBox);
|
||||
this.veilMiddleBox.appendChild(this.veilTransparentBox);
|
||||
this.veilMiddleBox.appendChild(veilRightBox);
|
||||
|
||||
aParent.appendChild(this.veilTopBox);
|
||||
aParent.appendChild(this.veilMiddleBox);
|
||||
aParent.appendChild(veilBottomBox);
|
||||
},
|
||||
|
||||
/**
|
||||
* Destroy the iframe and its nodes.
|
||||
* Build the controls:
|
||||
*
|
||||
* <box id="highlighter-close-button"/>
|
||||
*
|
||||
* @param nsIDOMNode aParent
|
||||
*/
|
||||
destroy: function IFH_destroy()
|
||||
buildControls: function Highlighter_buildControls(aParent)
|
||||
{
|
||||
this.browser.removeEventListener("click", this, true);
|
||||
let closeButton = document.createElement("box");
|
||||
closeButton.id = "highlighter-close-button";
|
||||
closeButton.appendChild(document.createElement("image"));
|
||||
|
||||
closeButton.setAttribute("onclick", "InspectorUI.closeInspectorUI(false);");
|
||||
|
||||
aParent.appendChild(closeButton);
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Destroy the nodes.
|
||||
*/
|
||||
destroy: function Highlighter_destroy()
|
||||
{
|
||||
this.browser.removeEventListener("scroll", this, true);
|
||||
this.browser.removeEventListener("resize", this, true);
|
||||
this._highlightRect = null;
|
||||
this._highlighting = false;
|
||||
this.veilTopDiv = null;
|
||||
this.veilLeftDiv = null;
|
||||
this.veilMiddleDiv = null;
|
||||
this.veilTransparentDiv = null;
|
||||
this.veilTopBox = null;
|
||||
this.veilLeftBox = null;
|
||||
this.veilMiddleBox = null;
|
||||
this.veilTransparentBox = null;
|
||||
this.node = null;
|
||||
this.iframeDoc = null;
|
||||
this.browser.parentNode.removeChild(this.iframeContainer);
|
||||
this.iframeContainer = null;
|
||||
this.iframe = null;
|
||||
this.highlighterContainer.parentNode.removeChild(this.highlighterContainer);
|
||||
this.highlighterContainer = null;
|
||||
this.win = null
|
||||
this.browser = null;
|
||||
},
|
||||
@ -174,7 +238,7 @@ IFrameHighlighter.prototype = {
|
||||
* @param boolean aScroll
|
||||
* Boolean determining whether to scroll or not.
|
||||
*/
|
||||
highlight: function IFH_highlight(aScroll)
|
||||
highlight: function Highlighter_highlight(aScroll)
|
||||
{
|
||||
// node is not set or node is not highlightable, bail
|
||||
if (!this.node || !this.isNodeHighlightable()) {
|
||||
@ -188,12 +252,6 @@ IFrameHighlighter.prototype = {
|
||||
left: clientRect.left,
|
||||
width: clientRect.width,
|
||||
height: clientRect.height};
|
||||
let oldRect = this._highlightRect;
|
||||
|
||||
if (oldRect && rect.top == oldRect.top && rect.left == oldRect.left &&
|
||||
rect.width == oldRect.width && rect.height == oldRect.height) {
|
||||
return; // same rectangle
|
||||
}
|
||||
|
||||
if (aScroll) {
|
||||
this.node.scrollIntoView();
|
||||
@ -248,7 +306,7 @@ IFrameHighlighter.prototype = {
|
||||
* @param object aParams
|
||||
* extra parameters object
|
||||
*/
|
||||
highlightNode: function IFH_highlightNode(aNode, aParams)
|
||||
highlightNode: function Highlighter_highlightNode(aNode, aParams)
|
||||
{
|
||||
this.node = aNode;
|
||||
this.highlight(aParams && aParams.scroll);
|
||||
@ -262,16 +320,23 @@ IFrameHighlighter.prototype = {
|
||||
* @returns boolean
|
||||
* True if the rectangle was highlighted, false otherwise.
|
||||
*/
|
||||
highlightRectangle: function IFH_highlightRectangle(aRect)
|
||||
highlightRectangle: function Highlighter_highlightRectangle(aRect)
|
||||
{
|
||||
let oldRect = this._highlightRect;
|
||||
|
||||
if (oldRect && aRect.top == oldRect.top && aRect.left == oldRect.left &&
|
||||
aRect.width == oldRect.width && aRect.height == oldRect.height) {
|
||||
return this._highlighting; // same rectangle
|
||||
}
|
||||
|
||||
if (aRect.left >= 0 && aRect.top >= 0 &&
|
||||
aRect.width > 0 && aRect.height > 0) {
|
||||
// The bottom div and the right div are flexibles (flex=1).
|
||||
// We don't need to resize them.
|
||||
this.veilTopDiv.style.height = aRect.top + "px";
|
||||
this.veilLeftDiv.style.width = aRect.left + "px";
|
||||
this.veilMiddleDiv.style.height = aRect.height + "px";
|
||||
this.veilTransparentDiv.style.width = aRect.width + "px";
|
||||
this.veilTopBox.style.height = aRect.top + "px";
|
||||
this.veilLeftBox.style.width = aRect.left + "px";
|
||||
this.veilMiddleBox.style.height = aRect.height + "px";
|
||||
this.veilTransparentBox.style.width = aRect.width + "px";
|
||||
|
||||
this._highlighting = true;
|
||||
} else {
|
||||
@ -286,11 +351,11 @@ IFrameHighlighter.prototype = {
|
||||
/**
|
||||
* Clear the highlighter surface.
|
||||
*/
|
||||
unhighlight: function IFH_unhighlight()
|
||||
unhighlight: function Highlighter_unhighlight()
|
||||
{
|
||||
this._highlighting = false;
|
||||
this.veilMiddleDiv.style.height = 0;
|
||||
this.veilTransparentDiv.style.width = 0;
|
||||
this.veilMiddleBox.style.height = 0;
|
||||
this.veilTransparentBox.style.width = 0;
|
||||
Services.obs.notifyObservers(null,
|
||||
INSPECTOR_NOTIFICATIONS.UNHIGHLIGHTING, null);
|
||||
},
|
||||
@ -305,7 +370,7 @@ IFrameHighlighter.prototype = {
|
||||
* @returns object
|
||||
* An object with x and y properties.
|
||||
*/
|
||||
midPoint: function IFH_midPoint(aPointA, aPointB)
|
||||
midPoint: function Highlighter_midPoint(aPointA, aPointB)
|
||||
{
|
||||
let pointC = { };
|
||||
pointC.x = (aPointB.x - aPointA.x) / 2 + aPointA.x;
|
||||
@ -352,7 +417,7 @@ IFrameHighlighter.prototype = {
|
||||
* @returns boolean
|
||||
* True if the node is highlightable or false otherwise.
|
||||
*/
|
||||
isNodeHighlightable: function IFH_isNodeHighlightable()
|
||||
isNodeHighlightable: function Highlighter_isNodeHighlightable()
|
||||
{
|
||||
if (!this.node || this.node.nodeType != Node.ELEMENT_NODE) {
|
||||
return false;
|
||||
@ -364,29 +429,32 @@ IFrameHighlighter.prototype = {
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//// Event Handling
|
||||
|
||||
attachInspectListeners: function IFH_attachInspectListeners()
|
||||
attachInspectListeners: function Highlighter_attachInspectListeners()
|
||||
{
|
||||
this.browser.addEventListener("mousemove", this, true);
|
||||
this.browser.addEventListener("click", this, true);
|
||||
this.browser.addEventListener("dblclick", this, true);
|
||||
this.browser.addEventListener("mousedown", this, true);
|
||||
this.browser.addEventListener("mouseup", this, true);
|
||||
},
|
||||
|
||||
detachInspectListeners: function IFH_detachInspectListeners()
|
||||
detachInspectListeners: function Highlighter_detachInspectListeners()
|
||||
{
|
||||
this.browser.removeEventListener("mousemove", this, true);
|
||||
this.browser.removeEventListener("click", this, true);
|
||||
this.browser.removeEventListener("dblclick", this, true);
|
||||
this.browser.removeEventListener("mousedown", this, true);
|
||||
this.browser.removeEventListener("mouseup", this, true);
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Generic event handler.
|
||||
*
|
||||
* @param nsIDOMEvent aEvent
|
||||
* The DOM event object.
|
||||
*/
|
||||
handleEvent: function IFH_handleEvent(aEvent)
|
||||
handleEvent: function Highlighter_handleEvent(aEvent)
|
||||
{
|
||||
switch (aEvent.type) {
|
||||
case "click":
|
||||
@ -404,54 +472,28 @@ IFrameHighlighter.prototype = {
|
||||
aEvent.stopPropagation();
|
||||
aEvent.preventDefault();
|
||||
break;
|
||||
case "scroll":
|
||||
this.highlight();
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Handle clicks on the iframe.
|
||||
* Handle clicks.
|
||||
*
|
||||
* @param nsIDOMEvent aEvent
|
||||
* The DOM event.
|
||||
*/
|
||||
handleClick: function IFH_handleClick(aEvent)
|
||||
handleClick: function Highlighter_handleClick(aEvent)
|
||||
{
|
||||
// Proxy the click event to the iframe.
|
||||
let x = aEvent.clientX;
|
||||
let y = aEvent.clientY;
|
||||
let frameWin = aEvent.view;
|
||||
while (frameWin != this.win) {
|
||||
if (frameWin.frameElement) {
|
||||
let frameRect = frameWin.frameElement.getBoundingClientRect();
|
||||
x += frameRect.left;
|
||||
y += frameRect.top;
|
||||
}
|
||||
frameWin = frameWin.parent;
|
||||
}
|
||||
|
||||
let element = this.iframeDoc.elementFromPoint(x, y);
|
||||
if (element && element.classList &&
|
||||
element.classList.contains("clickable")) {
|
||||
let newEvent = this.iframeDoc.createEvent("MouseEvents");
|
||||
newEvent.initMouseEvent(aEvent.type, aEvent.bubbles, aEvent.cancelable,
|
||||
this.iframeDoc.defaultView, aEvent.detail, aEvent.screenX,
|
||||
aEvent.screenY, x, y, aEvent.ctrlKey, aEvent.altKey, aEvent.shiftKey,
|
||||
aEvent.metaKey, aEvent.button, null);
|
||||
element.dispatchEvent(newEvent);
|
||||
aEvent.preventDefault();
|
||||
aEvent.stopPropagation();
|
||||
return;
|
||||
}
|
||||
|
||||
// Stop inspection when the user clicks on a node.
|
||||
if (InspectorUI.inspecting) {
|
||||
if (aEvent.button == 0) {
|
||||
let win = aEvent.target.ownerDocument.defaultView;
|
||||
InspectorUI.stopInspecting();
|
||||
win.focus();
|
||||
}
|
||||
aEvent.preventDefault();
|
||||
aEvent.stopPropagation();
|
||||
if (aEvent.button == 0) {
|
||||
let win = aEvent.target.ownerDocument.defaultView;
|
||||
InspectorUI.stopInspecting();
|
||||
win.focus();
|
||||
}
|
||||
aEvent.preventDefault();
|
||||
aEvent.stopPropagation();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -460,12 +502,8 @@ IFrameHighlighter.prototype = {
|
||||
* @param nsiDOMEvent aEvent
|
||||
* The MouseEvent triggering the method.
|
||||
*/
|
||||
handleMouseMove: function IFH_handleMouseMove(aEvent)
|
||||
handleMouseMove: function Highlighter_handleMouseMove(aEvent)
|
||||
{
|
||||
if (!InspectorUI.inspecting) {
|
||||
return;
|
||||
}
|
||||
|
||||
let element = InspectorUI.elementFromPoint(aEvent.target.ownerDocument,
|
||||
aEvent.clientX, aEvent.clientY);
|
||||
if (element && element != this.node) {
|
||||
@ -476,69 +514,10 @@ IFrameHighlighter.prototype = {
|
||||
/**
|
||||
* Handle window resize events.
|
||||
*/
|
||||
handleResize: function IFH_handleResize()
|
||||
handleResize: function Highlighter_handleResize()
|
||||
{
|
||||
let style = this.iframeContainer.style;
|
||||
if (this.win.scrollMaxY && this.win.scrollbars.visible) {
|
||||
style.paddingRight = this.getScrollbarWidth() + "px";
|
||||
} else {
|
||||
style.paddingRight = 0;
|
||||
}
|
||||
if (this.win.scrollMaxX && this.win.scrollbars.visible) {
|
||||
style.paddingBottom = this.getScrollbarWidth() + "px";
|
||||
} else {
|
||||
style.paddingBottom = 0;
|
||||
}
|
||||
|
||||
this.highlight();
|
||||
},
|
||||
|
||||
/**
|
||||
* Determine the scrollbar width in the current document.
|
||||
*
|
||||
* @returns number
|
||||
* The scrollbar width in pixels.
|
||||
*/
|
||||
getScrollbarWidth: function IFH_getScrollbarWidth()
|
||||
{
|
||||
if (this._scrollbarWidth) {
|
||||
return this._scrollbarWidth;
|
||||
}
|
||||
|
||||
let hbox = document.createElement("hbox");
|
||||
hbox.setAttribute("style", "height: 0%; overflow: hidden");
|
||||
|
||||
let scrollbar = document.createElement("scrollbar");
|
||||
scrollbar.setAttribute("orient", "vertical");
|
||||
hbox.appendChild(scrollbar);
|
||||
|
||||
document.documentElement.appendChild(hbox);
|
||||
this._scrollbarWidth = scrollbar.clientWidth;
|
||||
document.documentElement.removeChild(hbox);
|
||||
|
||||
return this._scrollbarWidth;
|
||||
},
|
||||
|
||||
/**
|
||||
* Helper to listen for an event only once.
|
||||
*
|
||||
* @param nsIDOMEventTarget aTarget
|
||||
* The DOM event target you want to add an event listener to.
|
||||
* @param string aName
|
||||
* The event name you want to listen for.
|
||||
* @param function aCallback
|
||||
* The function you want to execute once for the given event.
|
||||
* @param boolean aCapturing
|
||||
* Tells if you want to use capture for the event listener.
|
||||
* @returns void
|
||||
*/
|
||||
listenOnce: function IFH_listenOnce(aTarget, aName, aCallback, aCapturing)
|
||||
{
|
||||
aTarget.addEventListener(aName, function listenOnce_handler(aEvent) {
|
||||
aTarget.removeEventListener(aName, listenOnce_handler, aCapturing);
|
||||
aCallback.call(this, aEvent);
|
||||
}, aCapturing);
|
||||
},
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@ -785,7 +764,6 @@ var InspectorUI = {
|
||||
|
||||
this.openTreePanel();
|
||||
|
||||
this.browser.addEventListener("scroll", this, true);
|
||||
this.inspectCmd.setAttribute("checked", true);
|
||||
},
|
||||
|
||||
@ -794,9 +772,8 @@ var InspectorUI = {
|
||||
*/
|
||||
initializeHighlighter: function IUI_initializeHighlighter()
|
||||
{
|
||||
Services.obs.addObserver(this.highlighterReady,
|
||||
INSPECTOR_NOTIFICATIONS.HIGHLIGHTER_READY, false);
|
||||
this.highlighter = new IFrameHighlighter(this.browser);
|
||||
this.highlighter = new Highlighter(this.browser);
|
||||
this.highlighterReady();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -857,7 +834,6 @@ var InspectorUI = {
|
||||
gBrowser.tabContainer.removeEventListener("TabSelect", this, false);
|
||||
}
|
||||
|
||||
this.browser.removeEventListener("scroll", this, true);
|
||||
this.stopInspecting();
|
||||
if (this.highlighter) {
|
||||
this.highlighter.destroy();
|
||||
@ -953,7 +929,7 @@ var InspectorUI = {
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//// Event Handling
|
||||
|
||||
notifyReady: function IUI_notifyReady()
|
||||
highlighterReady: function IUI_highlighterReady()
|
||||
{
|
||||
// Setup the InspectorStore or restore state
|
||||
this.initializeStore();
|
||||
@ -966,13 +942,6 @@ var InspectorUI = {
|
||||
Services.obs.notifyObservers(null, INSPECTOR_NOTIFICATIONS.OPENED, null);
|
||||
},
|
||||
|
||||
highlighterReady: function IUI_highlighterReady()
|
||||
{
|
||||
Services.obs.removeObserver(InspectorUI.highlighterReady,
|
||||
INSPECTOR_NOTIFICATIONS.HIGHLIGHTER_READY, false);
|
||||
InspectorUI.notifyReady();
|
||||
},
|
||||
|
||||
/**
|
||||
* Main callback handler for events.
|
||||
*
|
||||
@ -1040,9 +1009,6 @@ var InspectorUI = {
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "scroll":
|
||||
this.highlighter.highlight();
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -96,8 +96,9 @@ function open()
|
||||
{
|
||||
var url;
|
||||
var postData = {};
|
||||
var mayInheritPrincipal = {value: false};
|
||||
if (browser)
|
||||
url = browser.getShortcutOrURI(dialog.input.value, postData);
|
||||
url = browser.getShortcutOrURI(dialog.input.value, postData, mayInheritPrincipal);
|
||||
else
|
||||
url = dialog.input.value;
|
||||
|
||||
@ -106,7 +107,11 @@ function open()
|
||||
// fixup the URI
|
||||
switch (dialog.openWhereList.value) {
|
||||
case "0":
|
||||
browser.loadURI(url, null, postData.value, true);
|
||||
var webNav = Components.interfaces.nsIWebNavigation;
|
||||
var flags = webNav.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP;
|
||||
if (!mayInheritPrincipal.value)
|
||||
flags |= webNav.LOAD_FLAGS_DISALLOW_INHERIT_OWNER;
|
||||
browser.gBrowser.loadURIWithFlags(url, flags, null, null, postData.value);
|
||||
break;
|
||||
case "1":
|
||||
window.opener.delayedOpenWindow(getBrowserURL(), "all,dialog=no",
|
||||
|
@ -643,6 +643,9 @@ var Scratchpad = {
|
||||
this._tabCharacter = expandtab ? (new Array(tabsize + 1)).join(" ") : "\t";
|
||||
this.textbox.style.MozTabSize = tabsize;
|
||||
|
||||
// Force LTR direction (otherwise the textbox inherits the locale direction)
|
||||
this.textbox.style.direction = "ltr";
|
||||
|
||||
this.insertIntro();
|
||||
|
||||
// Make the Tab key work.
|
||||
|
@ -777,12 +777,10 @@
|
||||
<body>
|
||||
<![CDATA[
|
||||
var newTitle = "";
|
||||
var docTitle;
|
||||
var docElement = this.ownerDocument.documentElement;
|
||||
var sep = docElement.getAttribute("titlemenuseparator");
|
||||
|
||||
if (aBrowser.docShell.contentViewer)
|
||||
docTitle = aBrowser.contentTitle;
|
||||
var docTitle = aBrowser.contentTitle;
|
||||
|
||||
if (!docTitle)
|
||||
docTitle = docElement.getAttribute("titledefault");
|
||||
@ -859,7 +857,7 @@
|
||||
var oldBrowser = this.mCurrentBrowser;
|
||||
if (oldBrowser) {
|
||||
oldBrowser.setAttribute("type", "content-targetable");
|
||||
oldBrowser.docShell.isActive = false;
|
||||
oldBrowser.docShellIsActive = false;
|
||||
}
|
||||
|
||||
var updatePageReport = false;
|
||||
@ -869,7 +867,8 @@
|
||||
updatePageReport = true;
|
||||
|
||||
newBrowser.setAttribute("type", "content-primary");
|
||||
newBrowser.docShell.isActive = true;
|
||||
newBrowser.docShellIsActive =
|
||||
(window.windowState != window.STATE_MINIMIZED);
|
||||
this.mCurrentBrowser = newBrowser;
|
||||
this.mCurrentTab = this.selectedTab;
|
||||
this.showTab(this.mCurrentTab);
|
||||
@ -880,6 +879,10 @@
|
||||
// Update the URL bar.
|
||||
var loc = this.mCurrentBrowser.currentURI;
|
||||
|
||||
#ifdef MOZ_E10S_COMPAT
|
||||
// Bug 666801 - WebProgress support for e10s and
|
||||
// Bug 666809 - SecurityUI support for e10s
|
||||
#else
|
||||
var webProgress = this.mCurrentBrowser.webProgress;
|
||||
var securityUI = this.mCurrentBrowser.securityUI;
|
||||
|
||||
@ -890,6 +893,7 @@
|
||||
this._callProgressListeners(null, "onSecurityChange",
|
||||
[webProgress, null, securityUI.state], true, false);
|
||||
}
|
||||
#endif
|
||||
|
||||
var listener = this.mTabListeners[this.tabContainer.selectedIndex] || null;
|
||||
if (listener && listener.mStateFlags) {
|
||||
@ -901,7 +905,11 @@
|
||||
|
||||
// Don't switch the fast find or update the titlebar (bug 540248) - this tab switch is temporary
|
||||
if (!this._previewMode) {
|
||||
#ifdef MOZ_E10S_COMPAT
|
||||
// Bug 666816 - TypeAheadFind support for e10s
|
||||
#else
|
||||
this._fastFind.setDocShell(this.mCurrentBrowser.docShell);
|
||||
#endif
|
||||
|
||||
this.updateTitlebar();
|
||||
|
||||
@ -1263,6 +1271,11 @@
|
||||
b.setAttribute("contextmenu", this.getAttribute("contentcontextmenu"));
|
||||
b.setAttribute("tooltip", this.getAttribute("contenttooltip"));
|
||||
|
||||
if (Services.prefs.getPrefType("browser.tabs.remote") == Services.prefs.PREF_BOOL &&
|
||||
Services.prefs.getBoolPref("browser.tabs.remote")) {
|
||||
b.setAttribute("remote", "true");
|
||||
}
|
||||
|
||||
if (window.gShowPageResizers && document.getElementById("addon-bar").collapsed &&
|
||||
window.windowState == window.STATE_NORMAL) {
|
||||
b.setAttribute("showresizer", "true");
|
||||
@ -1310,7 +1323,11 @@
|
||||
const filter = Components.classes["@mozilla.org/appshell/component/browser-status-filter;1"]
|
||||
.createInstance(Components.interfaces.nsIWebProgress);
|
||||
filter.addProgressListener(tabListener, Components.interfaces.nsIWebProgress.NOTIFY_ALL);
|
||||
#ifdef MOZ_E10S_COMPAT
|
||||
// Bug 666801 - WebProgress support for e10s
|
||||
#else
|
||||
b.webProgress.addProgressListener(filter, Components.interfaces.nsIWebProgress.NOTIFY_ALL);
|
||||
#endif
|
||||
this.mTabListeners[position] = tabListener;
|
||||
this.mTabFilters[position] = filter;
|
||||
|
||||
@ -1348,7 +1365,7 @@
|
||||
|
||||
// We start our browsers out as inactive, and then maintain
|
||||
// activeness in the tab switcher.
|
||||
b.docShell.isActive = false;
|
||||
b.docShellIsActive = false;
|
||||
|
||||
// Check if we're opening a tab related to the current tab and
|
||||
// move it to after the current tab.
|
||||
@ -1567,7 +1584,11 @@
|
||||
|
||||
// Remove the tab's filter and progress listener.
|
||||
const filter = this.mTabFilters[aTab._tPos];
|
||||
#ifdef MOZ_E10S_COMPAT
|
||||
// Bug 666801 - WebProgress support for e10s
|
||||
#else
|
||||
browser.webProgress.removeProgressListener(filter);
|
||||
#endif
|
||||
filter.removeProgressListener(this.mTabListeners[aTab._tPos]);
|
||||
this.mTabListeners[aTab._tPos].destroy();
|
||||
|
||||
@ -2443,6 +2464,12 @@
|
||||
case "keypress":
|
||||
this._handleKeyEvent(aEvent);
|
||||
break;
|
||||
case "sizemodechange":
|
||||
if (aEvent.target == window) {
|
||||
this.mCurrentBrowser.docShellIsActive =
|
||||
(window.windowState != window.STATE_MINIMIZED);
|
||||
}
|
||||
break;
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
@ -2452,6 +2479,7 @@
|
||||
this.mCurrentBrowser = this.mPanelContainer.childNodes[0].firstChild.firstChild;
|
||||
this.mCurrentTab = this.tabContainer.firstChild;
|
||||
document.addEventListener("keypress", this, false);
|
||||
window.addEventListener("sizemodechange", this, false);
|
||||
|
||||
var uniqueId = "panel" + Date.now();
|
||||
this.mPanelContainer.childNodes[0].id = uniqueId;
|
||||
@ -2514,6 +2542,7 @@
|
||||
this.mTabListeners[i] = null;
|
||||
}
|
||||
document.removeEventListener("keypress", this, false);
|
||||
window.removeEventListener("sizemodechange", this, false);
|
||||
]]>
|
||||
</destructor>
|
||||
|
||||
|
@ -191,6 +191,7 @@ function GroupItem(listOfEls, options) {
|
||||
self.$titleShield.show();
|
||||
if (self.getTitle())
|
||||
gTabView.firstUseExperienced = true;
|
||||
self.save();
|
||||
})
|
||||
.focus(function() {
|
||||
self._unfreezeItemSize();
|
||||
@ -825,9 +826,7 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
|
||||
} else {
|
||||
// child.removeSubscriber() must be called before child.close(),
|
||||
// therefore we call child.addSubscriber() if the tab is not removed.
|
||||
child.addSubscriber(self, "close", function() {
|
||||
self.remove(child);
|
||||
});
|
||||
child.addSubscriber(self, "close", self._onChildClose.bind(self));
|
||||
}
|
||||
});
|
||||
|
||||
@ -1010,19 +1009,7 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
|
||||
item.droppable(false);
|
||||
item.groupItemData = {};
|
||||
|
||||
item.addSubscriber(this, "close", function() {
|
||||
let count = self._children.length;
|
||||
let dontArrange = self.expanded || !self.shouldStack(count);
|
||||
let dontClose = !item.closedManually && gBrowser._numPinnedTabs > 0;
|
||||
self.remove(item, {dontArrange: dontArrange, dontClose: dontClose});
|
||||
|
||||
if (dontArrange)
|
||||
self._freezeItemSize(count);
|
||||
|
||||
if (self._children.length > 0 && self._activeTab)
|
||||
UI.setActive(self);
|
||||
});
|
||||
|
||||
item.addSubscriber(this, "close", this._onChildClose.bind(this));
|
||||
item.setParent(this);
|
||||
|
||||
if (typeof item.setResizable == 'function')
|
||||
@ -1050,6 +1037,25 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
|
||||
}
|
||||
},
|
||||
|
||||
// ----------
|
||||
// Function: _onChildClose
|
||||
// Handles "close" events from the group's children.
|
||||
//
|
||||
// Parameters:
|
||||
// tabItem - The tabItem that is closed.
|
||||
_onChildClose: function GroupItem__onChildClose(tabItem) {
|
||||
let count = this._children.length;
|
||||
let dontArrange = this.expanded || !this.shouldStack(count);
|
||||
let dontClose = !tabItem.closedManually && gBrowser._numPinnedTabs > 0;
|
||||
this.remove(tabItem, {dontArrange: dontArrange, dontClose: dontClose});
|
||||
|
||||
if (dontArrange)
|
||||
this._freezeItemSize(count);
|
||||
|
||||
if (this._children.length > 0 && this._activeTab)
|
||||
UI.setActive(this);
|
||||
},
|
||||
|
||||
// ----------
|
||||
// Function: remove
|
||||
// Removes an item from the groupItem.
|
||||
|
@ -265,8 +265,11 @@ TabItem.prototype = Utils.extend(new Item(), new Subscribable(), {
|
||||
let tabData = null;
|
||||
let self = this;
|
||||
let imageDataCb = function(imageData) {
|
||||
// we could have been unlinked while waiting for the thumbnail to load
|
||||
if (!self.tab)
|
||||
return;
|
||||
|
||||
Utils.assertThrow(tabData, "tabData");
|
||||
|
||||
tabData.imageData = imageData;
|
||||
|
||||
let currentUrl = self.tab.linkedBrowser.currentURI.spec;
|
||||
|
@ -178,6 +178,20 @@ body {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.banner {
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
padding: 10px 0;
|
||||
position: absolute;
|
||||
z-index: 1000060;
|
||||
background: #000;
|
||||
color: #fff;
|
||||
opacity: 0;
|
||||
text-align: center;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
/* Resizable
|
||||
----------------------------------*/
|
||||
.resizer {
|
||||
|
@ -135,6 +135,10 @@ let UI = {
|
||||
// Used to keep track of allowed browser keys.
|
||||
_browserKeys: null,
|
||||
|
||||
// Variable: _browserKeysWithShift
|
||||
// Used to keep track of allowed browser keys with Shift key combination.
|
||||
_browserKeysWithShift: null,
|
||||
|
||||
// Variable: ignoreKeypressForSearch
|
||||
// Used to prevent keypress being handled after quitting search mode.
|
||||
ignoreKeypressForSearch: false,
|
||||
@ -973,11 +977,15 @@ let UI = {
|
||||
"selectAll", "find"
|
||||
].forEach(function(key) {
|
||||
let element = gWindow.document.getElementById("key_" + key);
|
||||
keys[key] = element.getAttribute("key").toLocaleLowerCase().charCodeAt(0);
|
||||
let code = element.getAttribute("key").toLocaleLowerCase().charCodeAt(0);
|
||||
keys[code] = key;
|
||||
});
|
||||
this._browserKeys = keys;
|
||||
|
||||
// for key combinations with shift key, the charCode of upper case letters
|
||||
// are different to the lower case ones so need to handle them differently.
|
||||
keys = {};
|
||||
// The lower case letters are passed to processBrowserKeys() even with shift
|
||||
// key when stimulating a key press using EventUtils.synthesizeKey() so need
|
||||
// to handle both upper and lower cases here.
|
||||
[
|
||||
#ifdef XP_UNIX
|
||||
"redo",
|
||||
@ -986,11 +994,10 @@ let UI = {
|
||||
"privatebrowsing"
|
||||
].forEach(function(key) {
|
||||
let element = gWindow.document.getElementById("key_" + key);
|
||||
keys[key] = element.getAttribute("key").toLocaleUpperCase().charCodeAt(0);
|
||||
let code = element.getAttribute("key").toLocaleLowerCase().charCodeAt(0);
|
||||
keys[code] = key;
|
||||
});
|
||||
|
||||
delete this._browserKeys;
|
||||
this._browserKeys = keys;
|
||||
this._browserKeysWithShift = keys;
|
||||
},
|
||||
|
||||
// ----------
|
||||
@ -1022,44 +1029,25 @@ let UI = {
|
||||
#endif
|
||||
let preventDefault = true;
|
||||
if (evt.shiftKey) {
|
||||
switch (evt.charCode) {
|
||||
case self._browserKeys.tabview:
|
||||
// when a user presses ctrl+shift+key, upper case letter charCode
|
||||
// is passed to processBrowserKeys() so converting back to lower
|
||||
// case charCode before doing the check
|
||||
let lowercaseCharCode =
|
||||
String.fromCharCode(evt.charCode).toLocaleLowerCase().charCodeAt(0);
|
||||
if (lowercaseCharCode in self._browserKeysWithShift) {
|
||||
let key = self._browserKeysWithShift[lowercaseCharCode];
|
||||
if (key == "tabview")
|
||||
self.exit();
|
||||
break;
|
||||
#ifdef XP_UNIX
|
||||
case self._browserKeys.redo:
|
||||
#endif
|
||||
case self._browserKeys.closeWindow:
|
||||
case self._browserKeys.undoCloseTab:
|
||||
case self._browserKeys.undoCloseWindow:
|
||||
case self._browserKeys.privatebrowsing:
|
||||
else
|
||||
preventDefault = false;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch (evt.charCode) {
|
||||
case self._browserKeys.find:
|
||||
if (evt.charCode in self._browserKeys) {
|
||||
let key = self._browserKeys[evt.charCode];
|
||||
if (key == "find")
|
||||
self.enableSearch();
|
||||
break;
|
||||
#ifdef XP_UNIX
|
||||
case self._browserKeys.quitApplication:
|
||||
#else
|
||||
case self._browserKeys.redo:
|
||||
#endif
|
||||
#ifdef XP_MACOSX
|
||||
case self._browserKeys.preferencesCmdMac:
|
||||
case self._browserKeys.minimizeWindow:
|
||||
case self._browserKeys.hideThisAppCmdMac:
|
||||
#endif
|
||||
case self._browserKeys.newNavigator:
|
||||
case self._browserKeys.newNavigatorTab:
|
||||
case self._browserKeys.undo:
|
||||
case self._browserKeys.cut:
|
||||
case self._browserKeys.copy:
|
||||
case self._browserKeys.paste:
|
||||
case self._browserKeys.selectAll:
|
||||
else
|
||||
preventDefault = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (preventDefault) {
|
||||
@ -1568,6 +1556,35 @@ let UI = {
|
||||
url = gFavIconService.getFaviconImageForPage(tab.linkedBrowser.currentURI).spec;
|
||||
|
||||
return url;
|
||||
},
|
||||
|
||||
// ----------
|
||||
// Function: notifySessionRestoreEnabled
|
||||
// Notify the user that session restore has been automatically enabled
|
||||
// by showing a banner that expects no user interaction. It fades out after
|
||||
// some seconds.
|
||||
notifySessionRestoreEnabled: function UI_notifySessionRestoreEnabled() {
|
||||
let brandBundle = gWindow.document.getElementById("bundle_brand");
|
||||
let brandShortName = brandBundle.getString("brandShortName");
|
||||
let notificationText = tabviewBundle.formatStringFromName(
|
||||
"tabview.notification.sessionStore", [brandShortName], 1);
|
||||
|
||||
let banner = iQ("<div>")
|
||||
.text(notificationText)
|
||||
.addClass("banner")
|
||||
.appendTo("body");
|
||||
|
||||
let onFadeOut = function () {
|
||||
banner.remove();
|
||||
};
|
||||
|
||||
let onFadeIn = function () {
|
||||
setTimeout(function () {
|
||||
banner.animate({opacity: 0}, {duration: 1500, complete: onFadeOut});
|
||||
}, 5000);
|
||||
};
|
||||
|
||||
banner.animate({opacity: 0.7}, {duration: 1500, complete: onFadeIn});
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -220,6 +220,7 @@ _BROWSER_FILES = \
|
||||
browser_tabfocus.js \
|
||||
browser_tabs_isActive.js \
|
||||
browser_tabs_owner.js \
|
||||
browser_urlbarCopying.js \
|
||||
browser_urlbarTrimURLs.js \
|
||||
browser_urlHighlight.js \
|
||||
browser_visibleFindSelection.js \
|
||||
@ -255,6 +256,7 @@ _BROWSER_FILES = \
|
||||
browser_addon_bar_shortcut.js \
|
||||
browser_addon_bar_aomlistener.js \
|
||||
test_bug628179.html \
|
||||
browser_minimize.js \
|
||||
$(NULL)
|
||||
|
||||
ifneq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
|
@ -1,5 +1,11 @@
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
|
||||
Services.prefs.setBoolPref(allTabs.prefName, true);
|
||||
registerCleanupFunction(function () {
|
||||
Services.prefs.clearUserPref(allTabs.prefName);
|
||||
});
|
||||
|
||||
allTabs.init();
|
||||
nextSequence();
|
||||
}
|
||||
|
@ -41,8 +41,10 @@ var progressListener4 = {
|
||||
onLocationChange: function onLocationChange() {
|
||||
ok(expectListener4, "didn't call progressListener4 for the first location change");
|
||||
gBrowser.removeProgressListener(this);
|
||||
gBrowser.addTab();
|
||||
gBrowser.removeCurrentTab();
|
||||
finish();
|
||||
executeSoon(function () {
|
||||
gBrowser.addTab();
|
||||
gBrowser.removeCurrentTab();
|
||||
finish();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
@ -50,7 +50,7 @@ function wait_for_install_dialog(aCallback) {
|
||||
Services.wm.removeListener(this);
|
||||
|
||||
var domwindow = aXULWindow.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindowInternal);
|
||||
.getInterface(Ci.nsIDOMWindow);
|
||||
waitForFocus(function() {
|
||||
info("Saw install dialog");
|
||||
is(domwindow.document.location.href, XPINSTALL_URL, "Should have seen the right window open");
|
||||
|
33
browser/base/content/test/browser_minimize.js
Normal file
33
browser/base/content/test/browser_minimize.js
Normal file
@ -0,0 +1,33 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
function waitForActive() {
|
||||
if (!gBrowser.docShell.isActive) {
|
||||
executeSoon(waitForActive);
|
||||
return;
|
||||
}
|
||||
is(gBrowser.docShell.isActive, true, "Docshell should be active again");
|
||||
finish();
|
||||
}
|
||||
|
||||
function waitForInactive() {
|
||||
if (gBrowser.docShell.isActive) {
|
||||
executeSoon(waitForInactive);
|
||||
return;
|
||||
}
|
||||
is(gBrowser.docShell.isActive, false, "Docshell should be inactive");
|
||||
window.restore();
|
||||
waitForActive();
|
||||
}
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
is(gBrowser.docShell.isActive, true, "Docshell should be active");
|
||||
window.minimize();
|
||||
// XXX On Linux minimize/restore seem to be very very async, but
|
||||
// our window.windowState changes sync.... so we can't rely on the
|
||||
// latter correctly reflecting the state of the former. In
|
||||
// particular, a restore() call before minimizing is done will not
|
||||
// actually restore the window, but change the window state. As a
|
||||
// result, just poll waiting for our expected isActive values.
|
||||
waitForInactive();
|
||||
}
|
@ -110,9 +110,11 @@ function runNextTest() {
|
||||
|
||||
let onHidden = onHiddenArray.shift();
|
||||
info("[Test #" + gTestIndex + "] popup hidden (" + onHiddenArray.length + " hides remaining)");
|
||||
onHidden.call(nextTest, this);
|
||||
if (!onHiddenArray.length)
|
||||
goNext();
|
||||
executeSoon(function () {
|
||||
onHidden.call(nextTest, this);
|
||||
if (!onHiddenArray.length)
|
||||
goNext();
|
||||
});
|
||||
}, onHiddenArray.length);
|
||||
info("[Test #" + gTestIndex + "] added listeners; panel state: " + PopupNotifications.isPanelOpen);
|
||||
}
|
||||
@ -739,4 +741,4 @@ function dismissNotification(popup) {
|
||||
executeSoon(function () {
|
||||
EventUtils.synthesizeKey("VK_ESCAPE", {});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ function test()
|
||||
|
||||
// Close the UI if necessary
|
||||
let win = Services.ww.getWindowByName("Sanatize", null);
|
||||
if (win && (win instanceof Ci.nsIDOMWindowInternal))
|
||||
if (win && (win instanceof Ci.nsIDOMWindow))
|
||||
win.close();
|
||||
|
||||
// Start the test when the sanitize window loads
|
||||
@ -154,7 +154,7 @@ function test()
|
||||
// Let the methods that run onload finish before we test
|
||||
let doTest = function() setTimeout(function() {
|
||||
let win = Services.ww.getWindowByName("Sanitize", null)
|
||||
.QueryInterface(Ci.nsIDOMWindowInternal);
|
||||
.QueryInterface(Ci.nsIDOMWindow);
|
||||
|
||||
for (let i = 0; i < tests.length; i++)
|
||||
tests[i](win);
|
||||
|
165
browser/base/content/test/browser_urlbarCopying.js
Normal file
165
browser/base/content/test/browser_urlbarCopying.js
Normal file
@ -0,0 +1,165 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
const trimPref = "browser.urlbar.trimURLs";
|
||||
|
||||
function test() {
|
||||
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
|
||||
registerCleanupFunction(function () {
|
||||
gBrowser.removeCurrentTab();
|
||||
Services.prefs.clearUserPref(trimPref);
|
||||
URLBarSetURI();
|
||||
});
|
||||
|
||||
Services.prefs.setBoolPref(trimPref, true);
|
||||
|
||||
waitForExplicitFinish();
|
||||
|
||||
nextTest();
|
||||
}
|
||||
|
||||
var tests = [
|
||||
// pageproxystate="invalid"
|
||||
{
|
||||
setURL: "http://example.com/",
|
||||
expectedURL: "example.com",
|
||||
copyExpected: "example.com"
|
||||
},
|
||||
{
|
||||
copyVal: "<e>xample.com",
|
||||
copyExpected: "e"
|
||||
},
|
||||
|
||||
|
||||
// pageproxystate="valid" from this point on (due to the load)
|
||||
{
|
||||
loadURL: "http://example.com/",
|
||||
expectedURL: "example.com",
|
||||
copyExpected: "http://example.com/"
|
||||
},
|
||||
{
|
||||
copyVal: "<example.co>m",
|
||||
copyExpected: "http://example.co"
|
||||
},
|
||||
{
|
||||
copyVal: "e<x>ample.com",
|
||||
copyExpected: "x"
|
||||
},
|
||||
{
|
||||
copyVal: "<e>xample.com",
|
||||
copyExpected: "http://e"
|
||||
},
|
||||
|
||||
// Test escaping
|
||||
{
|
||||
loadURL: "http://example.com/()%C3%A9",
|
||||
expectedURL: "example.com/()\xe9",
|
||||
copyExpected: "http://example.com/%28%29%C3%A9"
|
||||
},
|
||||
{
|
||||
copyVal: "<example.com/(>)\xe9",
|
||||
copyExpected: "http://example.com/("
|
||||
},
|
||||
{
|
||||
copyVal: "e<xample.com/(>)\xe9",
|
||||
copyExpected: "xample.com/("
|
||||
},
|
||||
|
||||
{
|
||||
loadURL: "http://example.com/%C3%A9%C3%A9",
|
||||
expectedURL: "example.com/\xe9\xe9",
|
||||
copyExpected: "http://example.com/%C3%A9%C3%A9"
|
||||
},
|
||||
{
|
||||
copyVal: "e<xample.com/\xe9>\xe9",
|
||||
copyExpected: "xample.com/\xe9"
|
||||
},
|
||||
{
|
||||
copyVal: "<example.com/\xe9>\xe9",
|
||||
copyExpected: "http://example.com/\xe9"
|
||||
},
|
||||
|
||||
// data: and javsacript: URIs shouldn't be encoded
|
||||
{
|
||||
loadURL: "javascript:('%C3%A9')",
|
||||
expectedURL: "javascript:('\xe9')",
|
||||
copyExpected: "javascript:('\xe9')"
|
||||
},
|
||||
{
|
||||
copyVal: "<javascript:(>'\xe9')",
|
||||
copyExpected: "javascript:("
|
||||
},
|
||||
|
||||
{
|
||||
loadURL: "data:text/html,(%C3%A9)",
|
||||
expectedURL: "data:text/html,(\xe9)",
|
||||
copyExpected: "data:text/html,(\xe9)"
|
||||
},
|
||||
{
|
||||
copyVal: "<data:text/html,(>\xe9)",
|
||||
copyExpected: "data:text/html,("
|
||||
},
|
||||
{
|
||||
copyVal: "data:<text/html,(\xe9>)",
|
||||
copyExpected: "text/html,(\xe9"
|
||||
}
|
||||
];
|
||||
|
||||
function nextTest() {
|
||||
let test = tests.shift();
|
||||
if (tests.length == 0)
|
||||
runTest(test, finish);
|
||||
else
|
||||
runTest(test, nextTest);
|
||||
}
|
||||
|
||||
function runTest(test, cb) {
|
||||
function doCheck() {
|
||||
if (test.setURL || test.loadURL)
|
||||
is(gURLBar.value, test.expectedURL, "url bar value set");
|
||||
|
||||
testCopy(test.copyVal, test.copyExpected, cb);
|
||||
}
|
||||
|
||||
if (test.loadURL) {
|
||||
loadURL(test.loadURL, doCheck);
|
||||
} else {
|
||||
if (test.setURL)
|
||||
gURLBar.value = test.setURL;
|
||||
doCheck();
|
||||
}
|
||||
}
|
||||
|
||||
function testCopy(copyVal, targetValue, cb) {
|
||||
info("Expecting copy of: " + targetValue);
|
||||
waitForClipboard(targetValue, function () {
|
||||
gURLBar.focus();
|
||||
if (copyVal) {
|
||||
let startBracket = copyVal.indexOf("<");
|
||||
let endBracket = copyVal.indexOf(">");
|
||||
if (startBracket == -1 || endBracket == -1 ||
|
||||
startBracket > endBracket ||
|
||||
copyVal.replace("<", "").replace(">", "") != gURLBar.value) {
|
||||
ok(false, "invalid copyVal: " + copyVal);
|
||||
}
|
||||
gURLBar.selectionStart = startBracket;
|
||||
gURLBar.selectionEnd = endBracket - 1;
|
||||
} else {
|
||||
gURLBar.select();
|
||||
}
|
||||
|
||||
goDoCommand("cmd_copy");
|
||||
}, cb, cb);
|
||||
}
|
||||
|
||||
function loadURL(aURL, aCB) {
|
||||
gBrowser.selectedBrowser.addEventListener("load", function () {
|
||||
gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
|
||||
is(gBrowser.currentURI.spec, aURL, "loaded expected URL");
|
||||
aCB();
|
||||
}, true);
|
||||
|
||||
gBrowser.loadURI(aURL);
|
||||
}
|
@ -4,7 +4,7 @@
|
||||
|
||||
function testVal(originalValue, targetValue) {
|
||||
gURLBar.value = originalValue;
|
||||
is(gURLBar.value, targetValue || originalValue, "original value: " + originalValue);
|
||||
is(gURLBar.value, targetValue || originalValue, "url bar value set");
|
||||
}
|
||||
|
||||
function test() {
|
||||
@ -72,7 +72,7 @@ function test() {
|
||||
|
||||
function testCopy(originalValue, targetValue, cb) {
|
||||
waitForClipboard(targetValue, function () {
|
||||
is(gURLBar.value, originalValue);
|
||||
is(gURLBar.value, originalValue, "url bar copy value set");
|
||||
|
||||
gURLBar.focus();
|
||||
gURLBar.select();
|
||||
|
@ -110,7 +110,6 @@ _BROWSER_FILES = \
|
||||
browser_tabview_bug625195.js \
|
||||
browser_tabview_bug625269.js \
|
||||
browser_tabview_bug625424.js \
|
||||
browser_tabview_bug625666.js \
|
||||
browser_tabview_bug626368.js \
|
||||
browser_tabview_bug626525.js \
|
||||
browser_tabview_bug626791.js \
|
||||
|
@ -3,124 +3,78 @@
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
|
||||
window.addEventListener("tabviewshown", onTabViewWindowLoaded, false);
|
||||
if (TabView.isVisible())
|
||||
onTabViewWindowLoaded();
|
||||
else
|
||||
TabView.show();
|
||||
showTabView(onTabViewShown);
|
||||
}
|
||||
|
||||
function onTabViewWindowLoaded() {
|
||||
window.removeEventListener("tabviewshown", onTabViewWindowLoaded, false);
|
||||
|
||||
let contentWindow = document.getElementById("tab-view").contentWindow;
|
||||
function onTabViewShown() {
|
||||
let contentWindow = TabView.getContentWindow();
|
||||
let [originalTab] = gBrowser.visibleTabs;
|
||||
|
||||
ok(TabView.isVisible(), "Tab View is visible");
|
||||
is(contentWindow.GroupItems.groupItems.length, 1, "There is only one group");
|
||||
let currentActiveGroup = contentWindow.GroupItems.getActiveGroupItem();
|
||||
|
||||
// set double click interval to negative so quick drag and drop doesn't
|
||||
// trigger the double click code.
|
||||
let origDBlClickInterval = contentWindow.UI.DBLCLICK_INTERVAL;
|
||||
contentWindow.UI.DBLCLICK_INTERVAL = -1;
|
||||
|
||||
let endGame = function() {
|
||||
contentWindow.UI.reset();
|
||||
contentWindow.UI.DBLCLICK_INTERVAL = origDBlClickInterval;
|
||||
|
||||
let onTabViewHidden = function() {
|
||||
window.removeEventListener("tabviewhidden", onTabViewHidden, false);
|
||||
ok(!TabView.isVisible(), "TabView is shown");
|
||||
finish();
|
||||
};
|
||||
window.addEventListener("tabviewhidden", onTabViewHidden, false);
|
||||
|
||||
ok(TabView.isVisible(), "TabView is shown");
|
||||
|
||||
gBrowser.selectedTab = originalTab;
|
||||
TabView.hide();
|
||||
}
|
||||
|
||||
let part1 = function() {
|
||||
// move down 20 so we're far enough away from the top.
|
||||
checkSnap(currentActiveGroup, 0, 20, contentWindow, function(snapped){
|
||||
ok(!snapped,"Move away from the edge");
|
||||
|
||||
// Just pick it up and drop it.
|
||||
checkSnap(currentActiveGroup, 0, 0, contentWindow, function(snapped){
|
||||
ok(!snapped,"Just pick it up and drop it");
|
||||
|
||||
checkSnap(currentActiveGroup, 0, 1, contentWindow, function(snapped){
|
||||
ok(snapped,"Drag one pixel: should snap");
|
||||
|
||||
checkSnap(currentActiveGroup, 0, 5, contentWindow, function(snapped){
|
||||
ok(!snapped,"Moving five pixels: shouldn't snap");
|
||||
endGame();
|
||||
});
|
||||
});
|
||||
});
|
||||
hideTabView(function () {
|
||||
ok(!TabView.isVisible(), "TabView is hidden");
|
||||
finish();
|
||||
});
|
||||
}
|
||||
|
||||
// we need to stop the setBounds() css animation or else the test will
|
||||
// fail in single-mode because the group is newly created "ontabshown".
|
||||
let $container = contentWindow.iQ(currentActiveGroup.container);
|
||||
$container.css("-moz-transition-property", "none");
|
||||
|
||||
currentActiveGroup.setPosition(40, 40, true);
|
||||
currentActiveGroup.arrange({animate: false});
|
||||
part1();
|
||||
|
||||
// move down 20 so we're far enough away from the top.
|
||||
checkSnap(currentActiveGroup, 0, 20, contentWindow, function(snapped){
|
||||
is(currentActiveGroup.getBounds().top, 60, "group.top is 60px");
|
||||
ok(!snapped,"Move away from the edge");
|
||||
|
||||
// Just pick it up and drop it.
|
||||
checkSnap(currentActiveGroup, 0, 0, contentWindow, function(snapped){
|
||||
is(currentActiveGroup.getBounds().top, 60, "group.top is 60px");
|
||||
ok(!snapped,"Just pick it up and drop it");
|
||||
|
||||
checkSnap(currentActiveGroup, 0, 1, contentWindow, function(snapped){
|
||||
is(currentActiveGroup.getBounds().top, 60, "group.top is 60px");
|
||||
ok(snapped,"Drag one pixel: should snap");
|
||||
|
||||
checkSnap(currentActiveGroup, 0, 5, contentWindow, function(snapped){
|
||||
is(currentActiveGroup.getBounds().top, 65, "group.top is 65px");
|
||||
ok(!snapped,"Moving five pixels: shouldn't snap");
|
||||
endGame();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function simulateDragDrop(tabItem, offsetX, offsetY, contentWindow) {
|
||||
// enter drag mode
|
||||
let dataTransfer;
|
||||
function simulateDragDrop(item, offsetX, offsetY, contentWindow) {
|
||||
let target = item.container;
|
||||
|
||||
EventUtils.synthesizeMouse(
|
||||
tabItem.container, 1, 1, { type: "mousedown" }, contentWindow);
|
||||
let event = contentWindow.document.createEvent("DragEvents");
|
||||
event.initDragEvent(
|
||||
"dragenter", true, true, contentWindow, 0, 0, 0, 0, 0,
|
||||
false, false, false, false, 1, null, dataTransfer);
|
||||
tabItem.container.dispatchEvent(event);
|
||||
|
||||
// drag over
|
||||
if (offsetX || offsetY) {
|
||||
let Ci = Components.interfaces;
|
||||
let utils = contentWindow.QueryInterface(Ci.nsIInterfaceRequestor).
|
||||
getInterface(Ci.nsIDOMWindowUtils);
|
||||
let rect = tabItem.getBounds();
|
||||
for (let i = 1; i <= 5; i++) {
|
||||
let left = rect.left + 1 + Math.round(i * offsetX / 5);
|
||||
let top = rect.top + 1 + Math.round(i * offsetY / 5);
|
||||
utils.sendMouseEvent("mousemove", left, top, 0, 1, 0);
|
||||
}
|
||||
event = contentWindow.document.createEvent("DragEvents");
|
||||
event.initDragEvent(
|
||||
"dragover", true, true, contentWindow, 0, 0, 0, 0, 0,
|
||||
false, false, false, false, 0, null, dataTransfer);
|
||||
tabItem.container.dispatchEvent(event);
|
||||
}
|
||||
|
||||
// drop
|
||||
EventUtils.synthesizeMouse(
|
||||
tabItem.container, 0, 0, { type: "mouseup" }, contentWindow);
|
||||
event = contentWindow.document.createEvent("DragEvents");
|
||||
event.initDragEvent(
|
||||
"drop", true, true, contentWindow, 0, 0, 0, 0, 0,
|
||||
false, false, false, false, 0, null, dataTransfer);
|
||||
tabItem.container.dispatchEvent(event);
|
||||
EventUtils.synthesizeMouse(target, 1, 1, {type: "mousedown"}, contentWindow);
|
||||
EventUtils.synthesizeMouse(target, 1 + offsetX, 1 + offsetY, {type: "mousemove"}, contentWindow);
|
||||
EventUtils.synthesizeMouse(target, 1, 1, {type: "mouseup"}, contentWindow);
|
||||
}
|
||||
|
||||
function checkSnap(item, offsetX, offsetY, contentWindow, callback) {
|
||||
let firstTop = item.getBounds().top;
|
||||
let firstLeft = item.getBounds().left;
|
||||
let onDrop = function() {
|
||||
let snapped = false;
|
||||
item.container.removeEventListener('drop', onDrop, false);
|
||||
if (item.getBounds().top != firstTop + offsetY)
|
||||
snapped = true;
|
||||
if (item.getBounds().left != firstLeft + offsetX)
|
||||
snapped = true;
|
||||
callback(snapped);
|
||||
};
|
||||
item.container.addEventListener('drop', onDrop, false);
|
||||
|
||||
simulateDragDrop(item, offsetX, offsetY, contentWindow);
|
||||
|
||||
let snapped = false;
|
||||
if (item.getBounds().top != firstTop + offsetY)
|
||||
snapped = true;
|
||||
if (item.getBounds().left != firstLeft + offsetX)
|
||||
snapped = true;
|
||||
|
||||
callback(snapped);
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ function test1() {
|
||||
ok(!TabView.isVisible(), "Tab View is not visible");
|
||||
showTabView(test2);
|
||||
});
|
||||
EventUtils.synthesizeKey("E", { accelKey: true, shiftKey: true }, contentWindow);
|
||||
EventUtils.synthesizeKey("e", { accelKey: true, shiftKey: true }, contentWindow);
|
||||
}
|
||||
|
||||
function test2() {
|
||||
@ -58,7 +58,7 @@ function test4() {
|
||||
executeSoon(function() {
|
||||
is(gBrowser.tabs.length, 1, "There is one tab after removing one");
|
||||
|
||||
EventUtils.synthesizeKey("T", { accelKey: true, shiftKey: true }, contentWindow);
|
||||
EventUtils.synthesizeKey("t", { accelKey: true, shiftKey: true }, contentWindow);
|
||||
is(gBrowser.tabs.length, 2, "There are two tabs after restoring one");
|
||||
|
||||
gBrowser.tabs[0].linkedBrowser.loadURI("about:blank");
|
||||
@ -96,7 +96,7 @@ function test9() {
|
||||
function test10() {
|
||||
is(gBrowser.tabs.length, 1, "There is one tab before cmd/ctrl + shift + a is pressed");
|
||||
// it would open about:addons on a new tab if it passes through the white list.
|
||||
EventUtils.synthesizeKey("A", { accelKey: true, shiftKey: true }, contentWindow);
|
||||
EventUtils.synthesizeKey("a", { accelKey: true, shiftKey: true }, contentWindow);
|
||||
|
||||
executeSoon(function() {
|
||||
is(gBrowser.tabs.length, 1, "There is still one tab after cmd/ctrl + shift + a is pressed");
|
||||
|
@ -11,6 +11,8 @@ function test() {
|
||||
let assertWindowTitle = function (win, title) {
|
||||
let browser = win.gBrowser.tabs[0].linkedBrowser;
|
||||
let winTitle = win.gBrowser.getWindowTitleForBrowser(browser);
|
||||
|
||||
info('window title is: "' + winTitle + '"');
|
||||
is(winTitle.indexOf(title), 0, "title starts with '" + title + "'");
|
||||
};
|
||||
|
||||
|
@ -57,5 +57,5 @@ function toggleTabViewTest(contentWindow) {
|
||||
}
|
||||
contentWindow.addEventListener("tabviewhidden", onTabViewHidden, false);
|
||||
// Use keyboard shortcut to toggle back to browser view
|
||||
EventUtils.synthesizeKey("E", { accelKey: true, shiftKey: true });
|
||||
EventUtils.synthesizeKey("e", { accelKey: true, shiftKey: true });
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ function onTabViewWindowLoaded() {
|
||||
// verify that the keyboard combo works (this is the crux of bug 595518)
|
||||
// Prepare the key combo
|
||||
window.addEventListener("tabviewshown", onTabViewShown, false);
|
||||
EventUtils.synthesizeKey("E", { accelKey: true, shiftKey: true }, contentWindow);
|
||||
EventUtils.synthesizeKey("e", { accelKey: true, shiftKey: true }, contentWindow);
|
||||
}
|
||||
|
||||
let onTabViewShown = function() {
|
||||
|
@ -41,7 +41,7 @@ function onTabViewWindowLoaded() {
|
||||
// the appropriate group would get selected when the key
|
||||
// combination is pressed
|
||||
executeSoon(function() {
|
||||
EventUtils.synthesizeKey("E", {accelKey : true, shiftKey: true}, contentWindow);
|
||||
EventUtils.synthesizeKey("e", {accelKey : true, shiftKey: true}, contentWindow);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -78,8 +78,8 @@ function part2(win) {
|
||||
finish();
|
||||
}, false);
|
||||
// show tabview
|
||||
EventUtils.synthesizeKey("E", { accelKey: true, shiftKey: true }, win);
|
||||
EventUtils.synthesizeKey("e", { accelKey: true, shiftKey: true }, win);
|
||||
// hide tabview
|
||||
EventUtils.synthesizeKey("E", { accelKey: true, shiftKey: true }, win);
|
||||
EventUtils.synthesizeKey("e", { accelKey: true, shiftKey: true }, win);
|
||||
})
|
||||
}
|
||||
|
@ -1,49 +0,0 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
function test() {
|
||||
let cw;
|
||||
|
||||
let getTabItemAspect = function (tabItem) {
|
||||
let bounds = cw.iQ('.thumb', tabItem.container).bounds();
|
||||
let padding = cw.TabItems.tabItemPadding;
|
||||
return (bounds.height + padding.y) / (bounds.width + padding.x);
|
||||
}
|
||||
|
||||
let getAspectRange = function () {
|
||||
let aspect = cw.TabItems.tabAspect;
|
||||
let variance = aspect / 100 * 1.5;
|
||||
return new cw.Range(aspect - variance, aspect + variance);
|
||||
}
|
||||
|
||||
waitForExplicitFinish();
|
||||
|
||||
newWindowWithTabView(function (win) {
|
||||
registerCleanupFunction(function () win.close());
|
||||
cw = win.TabView.getContentWindow();
|
||||
|
||||
// prepare orphan tab
|
||||
let tabItem = win.gBrowser.tabs[0]._tabViewTabItem;
|
||||
tabItem.parent.remove(tabItem, {immediately: true});
|
||||
tabItem.setBounds(new cw.Rect(20, 20, 200, 165), true);
|
||||
|
||||
let bounds = tabItem.getBounds();
|
||||
|
||||
// prepare group item
|
||||
let box = new cw.Rect(20, 300, 400, 200);
|
||||
let groupItem = new cw.GroupItem([], {bounds: box, immediately: true});
|
||||
|
||||
groupItem.setBounds(new cw.Rect(20, 100, 400, 200));
|
||||
groupItem.pushAway(true);
|
||||
|
||||
let newBounds = tabItem.getBounds();
|
||||
ok(newBounds.width < bounds.width, "The new width of item is smaller than the old one.");
|
||||
ok(newBounds.height < bounds.height, "The new height of item is smaller than the old one.");
|
||||
|
||||
let aspectRange = getAspectRange();
|
||||
let aspect = getTabItemAspect(tabItem);
|
||||
ok(aspectRange.contains(aspect), "orphaned tabItem's aspect is correct");
|
||||
|
||||
finish();
|
||||
});
|
||||
}
|
@ -30,6 +30,16 @@ function test() {
|
||||
assertBoolPref(TabView.PREF_RESTORE_ENABLED_ONCE, enabledOnce);
|
||||
};
|
||||
|
||||
let assertNotificationBannerVisible = function (win) {
|
||||
let cw = win.TabView.getContentWindow();
|
||||
is(cw.iQ(".banner").length, 1, "notification banner is visible");
|
||||
};
|
||||
|
||||
let assertNotificationBannerNotVisible = function (win) {
|
||||
let cw = win.TabView.getContentWindow();
|
||||
is(cw.iQ(".banner").length, 0, "notification banner is not visible");
|
||||
};
|
||||
|
||||
let next = function () {
|
||||
if (tests.length == 0) {
|
||||
waitForFocus(finish);
|
||||
@ -52,6 +62,7 @@ function test() {
|
||||
setPreferences(1, true, false);
|
||||
|
||||
newWindowWithTabView(function (win) {
|
||||
assertNotificationBannerVisible(win);
|
||||
assertPreferences(3, true, true);
|
||||
|
||||
win.close();
|
||||
@ -72,10 +83,12 @@ function test() {
|
||||
setPreferences(1, false, false);
|
||||
|
||||
newWindowWithTabView(function (win) {
|
||||
assertNotificationBannerNotVisible(win);
|
||||
assertPreferences(1, false, false);
|
||||
|
||||
win.TabView.firstUseExperienced = true;
|
||||
|
||||
assertNotificationBannerVisible(win);
|
||||
assertPreferences(3, true, true);
|
||||
|
||||
win.close();
|
||||
@ -94,6 +107,7 @@ function test() {
|
||||
setPreferences(3, true, false);
|
||||
|
||||
newWindowWithTabView(function (win) {
|
||||
assertNotificationBannerNotVisible(win);
|
||||
assertPreferences(3, true, true);
|
||||
|
||||
win.close();
|
||||
@ -111,6 +125,7 @@ function test() {
|
||||
setPreferences(3, true, true);
|
||||
|
||||
newWindowWithTabView(function (win) {
|
||||
assertNotificationBannerNotVisible(win);
|
||||
assertPreferences(3, true, true);
|
||||
|
||||
win.close();
|
||||
@ -129,6 +144,7 @@ function test() {
|
||||
setPreferences(1, true, true);
|
||||
|
||||
newWindowWithTabView(function (win) {
|
||||
assertNotificationBannerNotVisible(win);
|
||||
assertPreferences(1, true, true);
|
||||
|
||||
win.close();
|
||||
|
@ -28,7 +28,7 @@ function test() {
|
||||
newWin.document.getElementById("menu_tabview").doCommand();
|
||||
}, function() {
|
||||
testMethodToHideAndShowTabView(function() {
|
||||
EventUtils.synthesizeKey("E", { accelKey: true, shiftKey: true }, newWin);
|
||||
EventUtils.synthesizeKey("e", { accelKey: true, shiftKey: true }, newWin);
|
||||
}, finish);
|
||||
});
|
||||
});
|
||||
|
@ -83,9 +83,11 @@ function newWindowWithTabView(shownCallback, loadCallback, width, height) {
|
||||
",width=" + winWidth);
|
||||
|
||||
whenWindowLoaded(win, function () {
|
||||
if (typeof loadCallback == "function")
|
||||
if (loadCallback)
|
||||
loadCallback(win);
|
||||
});
|
||||
|
||||
whenDelayedStartupFinished(win, function () {
|
||||
showTabView(function () shownCallback(win), win);
|
||||
});
|
||||
}
|
||||
|
@ -505,23 +505,40 @@
|
||||
<body><![CDATA[
|
||||
// Grab the actual input field's value, not our value, which could include moz-action:
|
||||
var inputVal = this.inputField.value;
|
||||
var val = inputVal.substring(this.selectionStart, this.selectionEnd);
|
||||
var selectedVal = inputVal.substring(this.selectionStart, this.selectionEnd);
|
||||
|
||||
// If the entire value is selected and it's a valid non-javascript,
|
||||
// non-data URI, encode it.
|
||||
if (val == inputVal &&
|
||||
this.getAttribute("pageproxystate") == "valid") {
|
||||
let uri = gBrowser.currentURI;
|
||||
// If the selection doesn't start at the beginning or URL bar is
|
||||
// modified, nothing else to do here.
|
||||
if (this.getAttribute("pageproxystate") != "valid" || this.selectionStart > 0)
|
||||
return selectedVal;
|
||||
|
||||
if (uri && !uri.schemeIs("javascript") && !uri.schemeIs("data")) {
|
||||
val = uri.spec;
|
||||
let uri = gBrowser.currentURI;
|
||||
|
||||
// If the entire URL is selected, just use the actual loaded URI.
|
||||
if (inputVal == selectedVal) {
|
||||
// ... but only if isn't a javascript: or data: URI, since those
|
||||
// are hard to read when encoded
|
||||
if (!uri.schemeIs("javascript") && !uri.schemeIs("data")) {
|
||||
// Parentheses are known to confuse third-party applications (bug 458565).
|
||||
val = val.replace(/[()]/g, function (c) escape(c));
|
||||
selectedVal = uri.spec.replace(/[()]/g, function (c) escape(c));
|
||||
}
|
||||
|
||||
return selectedVal;
|
||||
}
|
||||
|
||||
return val;
|
||||
// Just the beginning of the URL is selected, check for a trimmed
|
||||
// value
|
||||
let spec = uri.spec;
|
||||
let trimmedSpec = this.trimValue(spec);
|
||||
if (spec != trimmedSpec) {
|
||||
// Prepend the portion that trimValue removed from the beginning.
|
||||
// This assumes trimValue will only truncate the URL at
|
||||
// the beginning or end (or both).
|
||||
let trimmedSegments = spec.split(trimmedSpec);
|
||||
selectedVal = trimmedSegments[0] + selectedVal;
|
||||
}
|
||||
|
||||
return selectedVal;
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
|
@ -29,8 +29,8 @@ browser.jar:
|
||||
* content/browser/browser.js (content/browser.js)
|
||||
* content/browser/browser.xul (content/browser.xul)
|
||||
* content/browser/browser-tabPreviews.xml (content/browser-tabPreviews.xml)
|
||||
* content/browser/content.js (content/content.js)
|
||||
* content/browser/fullscreen-video.xhtml (content/fullscreen-video.xhtml)
|
||||
content/browser/highlighter.xhtml (content/highlighter.xhtml)
|
||||
* content/browser/inspector.html (content/inspector.html)
|
||||
* content/browser/scratchpad.xul (content/scratchpad.xul)
|
||||
* content/browser/scratchpad.js (content/scratchpad.js)
|
||||
|
@ -9,7 +9,7 @@ pref("app.update.interval", 28800);
|
||||
pref("app.update.download.backgroundInterval", 60);
|
||||
// URL user can browse to manually if for some reason all update installation
|
||||
// attempts fail.
|
||||
pref("app.update.url.manual", "http://nightly.mozilla.org/");
|
||||
pref("app.update.url.manual", "http://www.mozilla.com/firefox/channel/");
|
||||
// A default value for the "More information about this update" link
|
||||
// supplied in the "An update is available" page of the update wizard.
|
||||
pref("app.update.url.details", "http://www.mozilla.org/projects/%APP%/");
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
#include "nsIBrowserProfileMigrator.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIDOMWindowInternal.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsILocalFile.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsIProperties.h"
|
||||
|
@ -24,12 +24,10 @@ let PlacesOrganizer;
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
openLibrary(onLibraryReady);
|
||||
gLibrary = openLibrary(onLibraryReady);
|
||||
}
|
||||
|
||||
function onLibraryReady(library) {
|
||||
gLibrary = library;
|
||||
|
||||
function onLibraryReady() {
|
||||
ok(PlacesUtils, "PlacesUtils in scope");
|
||||
ok(PlacesUIUtils, "PlacesUIUtils in scope");
|
||||
|
||||
|
@ -6,13 +6,14 @@ const TEST_URL = "http://example.com/";
|
||||
|
||||
let gLibrary;
|
||||
let gItemId;
|
||||
let PlacesOrganizer;
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
gLibrary = openLibrary(onLibraryReady);
|
||||
}
|
||||
|
||||
function onLibraryReady(library) {
|
||||
function onLibraryReady() {
|
||||
PlacesOrganizer = gLibrary.PlacesOrganizer;
|
||||
|
||||
// Sanity checks.
|
||||
|
@ -96,10 +96,7 @@ function test() {
|
||||
.removeFolderChildren(PlacesUtils.unfiledBookmarksFolderId);
|
||||
});
|
||||
|
||||
openLibrary(function (library) {
|
||||
gLibrary = library;
|
||||
executeSoon(nextTest);
|
||||
});
|
||||
gLibrary = openLibrary(nextTest);
|
||||
}
|
||||
|
||||
function nextTest() {
|
||||
@ -111,6 +108,6 @@ function nextTest() {
|
||||
else {
|
||||
// Close Library window.
|
||||
gLibrary.close();
|
||||
executeSoon(finish);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
@ -180,8 +180,5 @@ function test() {
|
||||
ok(PlacesUIUtils, "PlacesUIUtils is running in chrome context");
|
||||
|
||||
// Open Library.
|
||||
openLibrary(function (library) {
|
||||
gLibrary = library;
|
||||
nextTest();
|
||||
});
|
||||
gLibrary = openLibrary(nextTest);
|
||||
}
|
||||
|
@ -84,13 +84,17 @@ var gTabsListener = {
|
||||
|
||||
// Reset arrays.
|
||||
this._loadedURIs.length = 0;
|
||||
// Close all tabs.
|
||||
while (gBrowser.tabs.length > 1)
|
||||
gBrowser.removeCurrentTab();
|
||||
|
||||
this._openTabsCount = 0;
|
||||
|
||||
// Test finished. This will move to the next one.
|
||||
waitForFocus(gCurrentTest.finish, gBrowser.ownerDocument.defaultView);
|
||||
executeSoon(function () {
|
||||
// Close all tabs.
|
||||
while (gBrowser.tabs.length > 1)
|
||||
gBrowser.removeCurrentTab();
|
||||
|
||||
// Test finished. This will move to the next one.
|
||||
waitForFocus(gCurrentTest.finish, gBrowser.ownerDocument.defaultView);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -114,10 +114,10 @@ let gSyncPane = {
|
||||
Services.prompt.BUTTON_POS_1_DEFAULT;
|
||||
let buttonChoice =
|
||||
Services.prompt.confirmEx(window,
|
||||
this._stringBundle.GetStringFromName("stopUsingAccount.title"),
|
||||
this._stringBundle.GetStringFromName("differentAccount.label"),
|
||||
this._stringBundle.GetStringFromName("syncUnlink.title"),
|
||||
this._stringBundle.GetStringFromName("syncUnlink.label"),
|
||||
flags,
|
||||
this._stringBundle.GetStringFromName("differentAccountConfirm.label"),
|
||||
this._stringBundle.GetStringFromName("syncUnlinkConfirm.label"),
|
||||
null, null, null, {});
|
||||
|
||||
// If the user selects cancel, just bail
|
||||
|
@ -101,12 +101,12 @@
|
||||
<menuitem label="&viewQuota.label;"
|
||||
oncommand="gSyncPane.openQuotaDialog();"/>
|
||||
<menuseparator/>
|
||||
<menuitem label="&changePassword.label;"
|
||||
<menuitem label="&changePassword2.label;"
|
||||
oncommand="gSyncUtils.changePassword();"/>
|
||||
<menuitem label="&mySyncKey.label;"
|
||||
oncommand="gSyncUtils.resetPassphrase();"/>
|
||||
<menuseparator/>
|
||||
<menuitem label="&resetSync.label;"
|
||||
<menuitem label="&resetSync2.label;"
|
||||
oncommand="gSyncPane.resetSync();"/>
|
||||
</menupopup>
|
||||
</button>
|
||||
@ -172,7 +172,7 @@
|
||||
<hbox>
|
||||
<label class="text-link"
|
||||
onclick="gSyncPane.startOver(true); return false;"
|
||||
value="&deactivateDevice.label;"/>
|
||||
value="&unlinkDevice.label;"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
<hbox id="tosPP" pack="center">
|
||||
@ -197,7 +197,7 @@
|
||||
</hbox>
|
||||
<label class="text-link"
|
||||
onclick="gSyncPane.startOver(true); return false;"
|
||||
value="&deactivateDevice.label;"/>
|
||||
value="&unlinkDevice.label;"/>
|
||||
</vbox>
|
||||
</deck>
|
||||
</prefpane>
|
||||
|
@ -295,7 +295,7 @@ function addWindowListener(aURL, aCallback) {
|
||||
Services.wm.removeListener(this);
|
||||
|
||||
var domwindow = aXULWindow.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindowInternal);
|
||||
.getInterface(Ci.nsIDOMWindow);
|
||||
waitForFocus(function() {
|
||||
is(domwindow.document.location.href, aURL, "should have seen the right window open");
|
||||
domwindow.close();
|
||||
|
@ -289,6 +289,7 @@ var treeView = {
|
||||
isSeparator: function(idx) { return false; },
|
||||
isSorted: function() { return false; },
|
||||
isEditable: function(idx, column) { return false; },
|
||||
canDrop: function(idx, orientation, dt) { return false; },
|
||||
getLevel: function(idx) { return this.isContainer(idx) ? 0 : 1; },
|
||||
|
||||
getParentIndex: function(idx) {
|
||||
|
@ -43,11 +43,11 @@
|
||||
* - and allows to restore everything into one window.
|
||||
*/
|
||||
|
||||
[scriptable, uuid(e7bb7828-0e32-4995-a848-4aa35df603c7)]
|
||||
[scriptable, uuid(170c6857-7f71-46ce-bc9b-185723b1c3a8)]
|
||||
interface nsISessionStartup: nsISupports
|
||||
{
|
||||
// Get session state as string
|
||||
readonly attribute AString state;
|
||||
// Get session state
|
||||
readonly attribute jsval state;
|
||||
|
||||
/**
|
||||
* Determine if session should be restored
|
||||
|
@ -89,7 +89,7 @@ function SessionStartup() {
|
||||
SessionStartup.prototype = {
|
||||
|
||||
// the state to restore at startup
|
||||
_iniString: null,
|
||||
_initialState: null,
|
||||
_sessionType: Ci.nsISessionStartup.NO_SESSION,
|
||||
|
||||
/* ........ Global Event Handlers .............. */
|
||||
@ -121,31 +121,30 @@ SessionStartup.prototype = {
|
||||
return;
|
||||
|
||||
// get string containing session state
|
||||
this._iniString = this._readStateFile(sessionFile);
|
||||
if (!this._iniString)
|
||||
let iniString = this._readStateFile(sessionFile);
|
||||
if (!iniString)
|
||||
return;
|
||||
|
||||
// parse the session state into a JS object
|
||||
let initialState;
|
||||
try {
|
||||
// remove unneeded braces (added for compatibility with Firefox 2.0 and 3.0)
|
||||
if (this._iniString.charAt(0) == '(')
|
||||
this._iniString = this._iniString.slice(1, -1);
|
||||
if (iniString.charAt(0) == '(')
|
||||
iniString = iniString.slice(1, -1);
|
||||
try {
|
||||
initialState = JSON.parse(this._iniString);
|
||||
this._initialState = JSON.parse(iniString);
|
||||
}
|
||||
catch (exJSON) {
|
||||
var s = new Cu.Sandbox("about:blank");
|
||||
initialState = Cu.evalInSandbox("(" + this._iniString + ")", s);
|
||||
this._iniString = JSON.stringify(initialState);
|
||||
this._initialState = Cu.evalInSandbox("(" + iniString + ")", s);
|
||||
}
|
||||
}
|
||||
catch (ex) { debug("The session file is invalid: " + ex); }
|
||||
|
||||
let resumeFromCrash = prefBranch.getBoolPref("sessionstore.resume_from_crash");
|
||||
let lastSessionCrashed =
|
||||
initialState && initialState.session && initialState.session.state &&
|
||||
initialState.session.state == STATE_RUNNING_STR;
|
||||
this._initialState && this._initialState.session &&
|
||||
this._initialState.session.state &&
|
||||
this._initialState.session.state == STATE_RUNNING_STR;
|
||||
|
||||
// Report shutdown success via telemetry. Shortcoming here are
|
||||
// being-killed-by-OS-shutdown-logic, shutdown freezing after
|
||||
@ -158,17 +157,17 @@ SessionStartup.prototype = {
|
||||
this._sessionType = Ci.nsISessionStartup.RECOVER_SESSION;
|
||||
else if (!lastSessionCrashed && doResumeSession)
|
||||
this._sessionType = Ci.nsISessionStartup.RESUME_SESSION;
|
||||
else if (initialState)
|
||||
else if (this._initialState)
|
||||
this._sessionType = Ci.nsISessionStartup.DEFER_SESSION;
|
||||
else
|
||||
this._iniString = null; // reset the state string
|
||||
this._initialState = null; // reset the state
|
||||
|
||||
// wait for the first browser window to open
|
||||
// Don't reset the initial window's default args (i.e. the home page(s))
|
||||
// if all stored tabs are pinned.
|
||||
if (this.doRestore() &&
|
||||
(!initialState.windows ||
|
||||
!initialState.windows.every(function (win)
|
||||
(!this._initialState.windows ||
|
||||
!this._initialState.windows.every(function (win)
|
||||
win.tabs.every(function (tab) tab.pinned))))
|
||||
Services.obs.addObserver(this, "domwindowopened", true);
|
||||
|
||||
@ -204,8 +203,8 @@ SessionStartup.prototype = {
|
||||
break;
|
||||
case "sessionstore-windows-restored":
|
||||
Services.obs.removeObserver(this, "sessionstore-windows-restored");
|
||||
// free _iniString after nsSessionStore is done with it
|
||||
this._iniString = null;
|
||||
// free _initialState after nsSessionStore is done with it
|
||||
this._initialState = null;
|
||||
this._sessionType = Ci.nsISessionStartup.NO_SESSION;
|
||||
break;
|
||||
}
|
||||
@ -254,7 +253,7 @@ SessionStartup.prototype = {
|
||||
* Get the session state as a string
|
||||
*/
|
||||
get state() {
|
||||
return this._iniString;
|
||||
return this._initialState;
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -304,33 +304,31 @@ SessionStoreService.prototype = {
|
||||
this._sessionFileBackup.append("sessionstore.bak");
|
||||
|
||||
// get string containing session state
|
||||
var iniString;
|
||||
var ss = Cc["@mozilla.org/browser/sessionstartup;1"].
|
||||
getService(Ci.nsISessionStartup);
|
||||
try {
|
||||
if (ss.doRestore() ||
|
||||
ss.sessionType == Ci.nsISessionStartup.DEFER_SESSION)
|
||||
iniString = ss.state;
|
||||
this._initialState = ss.state;
|
||||
}
|
||||
catch(ex) { dump(ex + "\n"); } // no state to restore, which is ok
|
||||
|
||||
if (iniString) {
|
||||
if (this._initialState) {
|
||||
try {
|
||||
// If we're doing a DEFERRED session, then we want to pull pinned tabs
|
||||
// out so they can be restored.
|
||||
if (ss.sessionType == Ci.nsISessionStartup.DEFER_SESSION) {
|
||||
let [iniState, remainingState] = this._prepDataForDeferredRestore(iniString);
|
||||
let [iniState, remainingState] = this._prepDataForDeferredRestore(this._initialState);
|
||||
// If we have a iniState with windows, that means that we have windows
|
||||
// with app tabs to restore.
|
||||
if (iniState.windows.length)
|
||||
this._initialState = iniState;
|
||||
else
|
||||
this._initialState = null;
|
||||
if (remainingState.windows.length)
|
||||
this._lastSessionState = remainingState;
|
||||
}
|
||||
else {
|
||||
// parse the session state into JS objects
|
||||
this._initialState = JSON.parse(iniString);
|
||||
|
||||
let lastSessionCrashed =
|
||||
this._initialState.session && this._initialState.session.state &&
|
||||
this._initialState.session.state == STATE_RUNNING_STR;
|
||||
@ -342,7 +340,7 @@ SessionStoreService.prototype = {
|
||||
// replace the crashed session with a restore-page-only session
|
||||
let pageData = {
|
||||
url: "about:sessionrestore",
|
||||
formdata: { "#sessionData": iniString }
|
||||
formdata: { "#sessionData": JSON.stringify(this._initialState) }
|
||||
};
|
||||
this._initialState = { windows: [{ tabs: [{ entries: [pageData] }] }] };
|
||||
}
|
||||
@ -811,7 +809,7 @@ SessionStoreService.prototype = {
|
||||
// We'll cheat a little bit and reuse _prepDataForDeferredRestore
|
||||
// even though it wasn't built exactly for this.
|
||||
let [appTabsState, normalTabsState] =
|
||||
this._prepDataForDeferredRestore(JSON.stringify({ windows: [closedWindowState] }));
|
||||
this._prepDataForDeferredRestore({ windows: [closedWindowState] });
|
||||
|
||||
// These are our pinned tabs, which we should restore
|
||||
if (appTabsState.windows.length) {
|
||||
@ -2222,8 +2220,14 @@ SessionStoreService.prototype = {
|
||||
if (!aWindow._hosts)
|
||||
return;
|
||||
for (var [host, isPinned] in Iterator(aWindow._hosts)) {
|
||||
var list = CookieSvc.getCookiesFromHost(host);
|
||||
while (list.hasMoreElements()) {
|
||||
let list;
|
||||
try {
|
||||
list = CookieSvc.getCookiesFromHost(host);
|
||||
}
|
||||
catch (ex) {
|
||||
debug("getCookiesFromHost failed. Host: " + host);
|
||||
}
|
||||
while (list && list.hasMoreElements()) {
|
||||
var cookie = list.getNext().QueryInterface(Ci.nsICookie2);
|
||||
// aWindow._hosts will only have hosts with the right privacy rules,
|
||||
// so there is no need to do anything special with this call to
|
||||
@ -2952,8 +2956,11 @@ SessionStoreService.prototype = {
|
||||
// so we can just set the URL to null.
|
||||
browser.__SS_restore_data = { url: null };
|
||||
browser.__SS_restore_tab = aTab;
|
||||
if (didStartLoad)
|
||||
browser.stop();
|
||||
didStartLoad = true;
|
||||
browser.loadURI(tabData.userTypedValue, null, null, true);
|
||||
browser.loadURIWithFlags(tabData.userTypedValue,
|
||||
Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3785,12 +3792,11 @@ SessionStoreService.prototype = {
|
||||
* this._lastSessionState and will be kept in case the user explicitly wants
|
||||
* to restore the previous session (publicly exposed as restoreLastSession).
|
||||
*
|
||||
* @param stateString
|
||||
* The state string, presumably from nsISessionStartup.state
|
||||
* @param state
|
||||
* The state, presumably from nsISessionStartup.state
|
||||
* @returns [defaultState, state]
|
||||
*/
|
||||
_prepDataForDeferredRestore: function sss__prepDataForDeferredRestore(stateString) {
|
||||
let state = JSON.parse(stateString);
|
||||
_prepDataForDeferredRestore: function sss__prepDataForDeferredRestore(state) {
|
||||
let defaultState = { windows: [], selectedWindow: 1 };
|
||||
|
||||
state.selectedWindow = state.selectedWindow || 1;
|
||||
|
@ -129,7 +129,7 @@ function test() {
|
||||
}
|
||||
|
||||
function getCanvas(width, height) {
|
||||
let win = window.QueryInterface(Ci.nsIDOMWindowInternal);
|
||||
let win = window.QueryInterface(Ci.nsIDOMWindow);
|
||||
let doc = win.document;
|
||||
let canvas = doc.createElementNS("http://www.w3.org/1999/xhtml", "canvas");
|
||||
canvas.width = width;
|
||||
|
@ -222,7 +222,7 @@ BrowserTab.prototype = {
|
||||
if (!(aEvent.originalTarget instanceof Ci.nsIDOMDocument))
|
||||
return;
|
||||
|
||||
if (aEvent.originalTarget.defaultView instanceof Ci.nsIDOMWindowInternal &&
|
||||
if (aEvent.originalTarget.defaultView instanceof Ci.nsIDOMWindow &&
|
||||
aEvent.originalTarget.defaultView.frameElement)
|
||||
return;
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ WindowOpenListener.prototype = {
|
||||
|
||||
this.window = window;
|
||||
this.domwindow = window.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindowInternal);
|
||||
.getInterface(Ci.nsIDOMWindow);
|
||||
this.domwindow.addEventListener("load", this, false);
|
||||
},
|
||||
|
||||
|
@ -45,6 +45,9 @@
|
||||
@BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@mozalloc@DLL_SUFFIX@
|
||||
#ifdef MOZ_MEMORY_DARWIN
|
||||
@BINPATH@/@DLL_PREFIX@jemalloc@DLL_SUFFIX@
|
||||
#endif
|
||||
#ifdef XP_MACOSX
|
||||
@BINPATH@/XUL
|
||||
#else
|
||||
@ -98,7 +101,6 @@
|
||||
#else
|
||||
@BINPATH@/mozsqlt3@DLL_SUFFIX@
|
||||
#endif
|
||||
@BINPATH@/README.txt
|
||||
@BINPATH@/blocklist.xml
|
||||
#ifdef XP_UNIX
|
||||
@BINPATH@/run-mozilla.sh
|
||||
|
@ -229,6 +229,7 @@ install.rdf
|
||||
modules/JSON.jsm
|
||||
mozilla-runtime@BIN_SUFFIX@
|
||||
old-homepage-default.properties
|
||||
README.txt
|
||||
res/arrow.gif
|
||||
res/arrowd.gif
|
||||
res/broken-image.gif
|
||||
|
@ -125,8 +125,6 @@ install::
|
||||
$(LOCALE_SRCDIR)/existing-profile-defaults.js > $(DESTDIR)$(mozappdir)/defaults/existing-profile-defaults.js; \
|
||||
fi
|
||||
|
||||
README_FILE = $(call MERGE_FILE,README.txt)
|
||||
|
||||
PROFILE_FILES = \
|
||||
localstore.rdf \
|
||||
mimeTypes.rdf \
|
||||
@ -134,18 +132,6 @@ PROFILE_FILES = \
|
||||
|
||||
PROFILE_CHROME = userChrome-example.css userContent-example.css
|
||||
|
||||
libs:: $(README_FILE)
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
$(EXIT_ON_ERROR) \
|
||||
for file in $^; do \
|
||||
$(PERL) -pe 's/(?<!\r)\n/\r\n/g;' < $$file > $(FINAL_TARGET)/`basename $$file`; \
|
||||
done
|
||||
else
|
||||
ifneq ($(OS_ARCH),OS2)
|
||||
$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)
|
||||
endif
|
||||
endif
|
||||
|
||||
NO_JA_JP_MAC_AB_CD := $(if $(filter ja-JP-mac, $(AB_CD)),ja,$(AB_CD))
|
||||
|
||||
%/defaults/profile/bookmarks.html: bookmarks.inc generic/profile/bookmarks.html.in
|
||||
|
@ -1,4 +0,0 @@
|
||||
For information about installing, running and configuring Firefox
|
||||
including a list of known issues and troubleshooting information,
|
||||
refer to: http://getfirefox.com/releases/
|
||||
|
@ -111,6 +111,6 @@ offlinepermissionstitle=Offline Data
|
||||
# %2$S = unit (MB, KB, etc.)
|
||||
actualCacheSize=Your cache is currently using %1$S %2$S of disk space
|
||||
|
||||
stopUsingAccount.title=Do you want to stop using this account?
|
||||
differentAccount.label=This will reset all of your Sync account information and preferences.
|
||||
differentAccountConfirm.label=Reset All Information
|
||||
syncUnlink.title=Do you want to unlink your device?
|
||||
syncUnlink.label=This device will no longer be associated with your Sync account. All of your personal data, both on this device and in your Sync account, will remain intact.
|
||||
syncUnlinkConfirm.label=Unlink
|
||||
|
@ -13,9 +13,10 @@
|
||||
<!ENTITY manageAccount.label "Manage Account">
|
||||
<!ENTITY manageAccount.accesskey "A">
|
||||
<!ENTITY viewQuota.label "View Quota">
|
||||
<!ENTITY changePassword.label "Change Password">
|
||||
<!ENTITY changePassword2.label "Change Password…">
|
||||
<!ENTITY mySyncKey.label "My Sync Key">
|
||||
<!ENTITY resetSync.label "Reset Sync">
|
||||
<!ENTITY resetSync2.label "Reset Sync…">
|
||||
|
||||
<!ENTITY addDevice.label "Add a Device">
|
||||
|
||||
<!ENTITY syncMy.label "Sync My">
|
||||
@ -33,7 +34,7 @@
|
||||
<!-- Device Settings -->
|
||||
<!ENTITY syncComputerName.label "Computer Name:">
|
||||
<!ENTITY syncComputerName.accesskey "c">
|
||||
<!ENTITY deactivateDevice.label "Deactivate This Device">
|
||||
<!ENTITY unlinkDevice.label "Unlink This Device">
|
||||
|
||||
<!-- Footer stuff -->
|
||||
<!ENTITY prefs.tosLink.label "Terms of Service">
|
||||
|
@ -2,3 +2,4 @@ tabview.groupItem.newTabButton=New tab
|
||||
tabview.groupItem.defaultName=Name this tab group…
|
||||
tabview.groupItem.undoCloseGroup=Undo Close Group
|
||||
tabview.search.otherWindowTabs=Tabs from other windows
|
||||
tabview.notification.sessionStore=Tabs and groups will automatically be restored the next time you start %S.
|
||||
|
@ -98,7 +98,6 @@ if [ "$ENABLE_TESTS" ]; then
|
||||
browser/components/places/tests/Makefile
|
||||
browser/components/places/tests/chrome/Makefile
|
||||
browser/components/places/tests/browser/Makefile
|
||||
browser/components/places/tests/perf/Makefile
|
||||
browser/components/privatebrowsing/test/Makefile
|
||||
browser/components/privatebrowsing/test/browser/Makefile
|
||||
browser/components/safebrowsing/content/test/Makefile
|
||||
|
@ -1935,3 +1935,27 @@ panel[dimmed="true"] {
|
||||
border-top-left-radius: .3em;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
/* Highlighter */
|
||||
|
||||
.highlighter-veil {
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
#highlighter-close-button {
|
||||
list-style-image: url("chrome://browser/skin/KUI-close.png");
|
||||
top: 12px;
|
||||
right: 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#highlighter-close-button:-moz-locale-dir(rtl) {
|
||||
right: auto;
|
||||
left: 12px;
|
||||
}
|
||||
|
||||
#highlighter-veil-transparentbox {
|
||||
box-shadow: 0 0 0 1px rgba(0,0,0,0.5);
|
||||
outline: 1px dashed rgba(255,255,255,0.5);
|
||||
outline-offset: -1px;
|
||||
}
|
||||
|
@ -17,7 +17,6 @@ browser.jar:
|
||||
skin/classic/browser/Geolocation-16.png
|
||||
skin/classic/browser/Geolocation-64.png
|
||||
skin/classic/browser/Go-arrow.png
|
||||
* skin/classic/browser/highlighter.css
|
||||
skin/classic/browser/identity.png
|
||||
skin/classic/browser/Info.png
|
||||
skin/classic/browser/KUI-close.png
|
||||
|
@ -2508,3 +2508,28 @@ panel[dimmed="true"] {
|
||||
border-top-left-radius: .3em;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
|
||||
/* Highlighter */
|
||||
|
||||
.highlighter-veil {
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
#highlighter-close-button {
|
||||
list-style-image: url("chrome://browser/skin/KUI-close.png");
|
||||
top: 12px;
|
||||
right: 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#highlighter-close-button:-moz-locale-dir(rtl) {
|
||||
right: auto;
|
||||
left: 12px;
|
||||
}
|
||||
|
||||
#highlighter-veil-transparentbox {
|
||||
box-shadow: 0 0 0 1px rgba(0,0,0,0.5);
|
||||
outline: 1px dashed rgba(255,255,255,0.5);
|
||||
outline-offset: -1px;
|
||||
}
|
||||
|
@ -15,7 +15,6 @@ browser.jar:
|
||||
skin/classic/browser/Geolocation-16.png
|
||||
skin/classic/browser/Geolocation-64.png
|
||||
skin/classic/browser/Go-arrow.png
|
||||
* skin/classic/browser/highlighter.css
|
||||
skin/classic/browser/home.png
|
||||
skin/classic/browser/hud-style-check-box-checked.png
|
||||
skin/classic/browser/hud-style-check-box-empty.png
|
||||
|
@ -602,8 +602,8 @@ menuitem.bookmark-item {
|
||||
}
|
||||
|
||||
#navigator-toolbox[iconsize=large][mode=icons] > #nav-bar {
|
||||
padding-left: 2px;
|
||||
padding-right: 2px;
|
||||
-moz-padding-start: 0;
|
||||
-moz-padding-end: 2px;
|
||||
}
|
||||
|
||||
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button,
|
||||
@ -665,17 +665,18 @@ menuitem.bookmark-item {
|
||||
}
|
||||
|
||||
#nav-bar .toolbarbutton-1[disabled="true"] {
|
||||
opacity: .8;
|
||||
opacity: .4;
|
||||
}
|
||||
|
||||
#nav-bar .toolbarbutton-1[disabled="true"] > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
|
||||
#nav-bar .toolbarbutton-1[disabled="true"] > .toolbarbutton-icon {
|
||||
opacity: .5;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled="true"]):not(:active):hover,
|
||||
#nav-bar .toolbarbutton-1:not([open="true"]):not(:active):hover > .toolbarbutton-menubutton-dropmarker:not([disabled="true"]),
|
||||
#nav-bar .toolbarbutton-1:not([type="menu-button"]):not([disabled="true"]):not([checked="true"]):not([open="true"]):not(:active):hover {
|
||||
#nav-bar .toolbarbutton-1:not([type="menu-button"]):not([disabled="true"]):not([checked="true"]):not([open="true"]):not(:active):hover,
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button:not([disabled="true"]):not([open]):not(:active):hover > .toolbarbutton-icon {
|
||||
background-color: hsla(190,60%,70%,.5);
|
||||
border-color: hsla(190,50%,65%,.8) hsla(190,50%,50%,.8) hsla(190,50%,40%,.8);
|
||||
box-shadow: 0 0 0 1px rgba(255,255,255,.3) inset,
|
||||
@ -794,14 +795,26 @@ toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
|
||||
}
|
||||
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button {
|
||||
border-radius: 10000px;
|
||||
padding: 0;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
margin: -5px 0;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
-moz-padding-start: 5px;
|
||||
-moz-padding-end: 0;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
margin-top: -2px;
|
||||
margin-bottom: -2px;
|
||||
border-radius: 0 10000px 10000px 0;
|
||||
background: transparent;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button:-moz-locale-dir(rtl) {
|
||||
border-radius: 10000px 0 0 10000px;
|
||||
}
|
||||
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button > .toolbarbutton-icon {
|
||||
border-radius: 10000px;
|
||||
padding: 5px;
|
||||
border: none;
|
||||
background-image: -moz-linear-gradient(rgba(251,252,253,.97), rgba(246,247,248,.5) 49%,
|
||||
rgba(231,232,233,.45) 51%, rgba(225,226,229,.2));
|
||||
@ -812,7 +825,7 @@ toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
|
||||
0 1px 1px rgba(0,0,0,.3);
|
||||
}
|
||||
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button:not([disabled="true"]):not([open="true"]):not(:active):hover {
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button:not([disabled="true"]):not([open="true"]):not(:active):hover > .toolbarbutton-icon {
|
||||
box-shadow: 0 0 0 1px rgba(255,255,255,.3) inset,
|
||||
0 0 0 2px rgba(255,255,255,.1) inset,
|
||||
0 0 0 1px hsla(190,50%,40%,.3),
|
||||
@ -821,8 +834,8 @@ toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
|
||||
0 0 5px 1px hsl(190,90%,80%);
|
||||
}
|
||||
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button:not([disabled="true"]):hover:active,
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button[open="true"] {
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button:not([disabled="true"]):hover:active > .toolbarbutton-icon,
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button[open="true"] > .toolbarbutton-icon {
|
||||
box-shadow: 0 0 6.5px rgba(0,0,0,.4) inset,
|
||||
0 0 2px rgba(0,0,0,.4) inset,
|
||||
0 0 0 1px rgba(0,0,0,.65),
|
||||
@ -2421,3 +2434,27 @@ panel[dimmed="true"] {
|
||||
border-top-left-radius: .3em;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
/* Highlighter */
|
||||
|
||||
.highlighter-veil {
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
#highlighter-close-button {
|
||||
list-style-image: url("chrome://browser/skin/KUI-close.png");
|
||||
top: 12px;
|
||||
right: 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#highlighter-close-button:-moz-locale-dir(rtl) {
|
||||
right: auto;
|
||||
left: 12px;
|
||||
}
|
||||
|
||||
#highlighter-veil-transparentbox {
|
||||
box-shadow: 0 0 0 1px rgba(0,0,0,0.5);
|
||||
outline: 1px dashed rgba(255,255,255,0.5);
|
||||
outline-offset: -1px;
|
||||
}
|
||||
|
@ -1,105 +0,0 @@
|
||||
/* ***** 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 Mozilla Inspector Module.
|
||||
*
|
||||
* 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):
|
||||
* Rob Campbell <rcampbell@mozilla.com> (original author)
|
||||
* Paul Rouget <paul@mozilla.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 ***** */
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#close-button {
|
||||
background-image: url("KUI-close.png");
|
||||
border: none;
|
||||
padding: 0;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
position: fixed;
|
||||
top: 12px;
|
||||
right: 12px;
|
||||
z-index: 1;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.veil {
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.veil, #veil-middlebox, #veil-transparentbox {
|
||||
-moz-transition: 0.1s;
|
||||
-moz-transition-timing-function: linear;
|
||||
}
|
||||
|
||||
#veil-container {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#veil {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: -moz-box;
|
||||
-moz-box-orient: vertical;
|
||||
}
|
||||
|
||||
#veil-topbox, #veil-bottombox {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#veil-bottombox {
|
||||
-moz-box-flex: 1;
|
||||
}
|
||||
|
||||
#veil-middlebox {
|
||||
display: -moz-box;
|
||||
-moz-box-orient: horizontal;
|
||||
}
|
||||
|
||||
#veil-leftbox, #veil-rightbox {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#veil-rightbox {
|
||||
-moz-box-flex: 1;
|
||||
}
|
||||
|
||||
#veil {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
@ -19,7 +19,6 @@ browser.jar:
|
||||
skin/classic/browser/fullscreen-video.css
|
||||
skin/classic/browser/Geolocation-16.png
|
||||
skin/classic/browser/Geolocation-64.png
|
||||
* skin/classic/browser/highlighter.css
|
||||
skin/classic/browser/Info.png (Info.png)
|
||||
skin/classic/browser/identity.png (identity.png)
|
||||
skin/classic/browser/keyhole-forward-mask.svg
|
||||
@ -134,7 +133,6 @@ browser.jar:
|
||||
skin/classic/aero/browser/fullscreen-video.css
|
||||
skin/classic/aero/browser/Geolocation-16.png
|
||||
skin/classic/aero/browser/Geolocation-64.png
|
||||
* skin/classic/aero/browser/highlighter.css
|
||||
skin/classic/aero/browser/Info.png (Info-aero.png)
|
||||
skin/classic/aero/browser/identity.png (identity-aero.png)
|
||||
skin/classic/aero/browser/keyhole-forward-mask.svg
|
||||
|
@ -67,7 +67,7 @@ def find_version(e):
|
||||
return encode_ver(last_version)
|
||||
|
||||
if __name__ == '__main__':
|
||||
cxx_env = os.environ.get('CXX', 'c++')
|
||||
cxx_env = os.environ['CXX']
|
||||
print 'MOZ_LIBSTDCXX_TARGET_VERSION=%s' % find_version(cxx_env)
|
||||
host_cxx_env = os.environ.get('HOST_CXX', cxx_env)
|
||||
print 'MOZ_LIBSTDCXX_HOST_VERSION=%s' % find_version(host_cxx_env)
|
||||
|
@ -763,7 +763,7 @@ user_pref("camino.use_system_proxy_settings", false); // Camino-only, harmless t
|
||||
self.lastTestSeen = line.split("|")[1].strip()
|
||||
if stackFixerFunction:
|
||||
line = stackFixerFunction(line)
|
||||
self.log.info(line.rstrip())
|
||||
self.log.info(line.rstrip().decode("UTF-8", "ignore"))
|
||||
if self.UNIXISH and not debuggerInfo and not self.haveDumpedScreen and "TEST-UNEXPECTED-FAIL" in line and "Test timed out" in line:
|
||||
self.dumpScreen(utilityPath)
|
||||
|
||||
|
@ -39,6 +39,7 @@ class DeviceManagerADB(DeviceManager):
|
||||
def mkDir(self, name):
|
||||
try:
|
||||
self.checkCmd(["shell", "mkdir", name])
|
||||
self.chmodDir(name)
|
||||
return name
|
||||
except:
|
||||
return None
|
||||
|
@ -91,7 +91,6 @@ if __name__ == '__main__':
|
||||
t.start()
|
||||
|
||||
automation.setServerInfo("localhost", PORT)
|
||||
automation.initializeProfile(PROFILE_DIRECTORY)
|
||||
browserEnv = automation.environment()
|
||||
browserEnv["XPCOM_DEBUG_BREAK"] = "warn"
|
||||
browserEnv["MOZ_JAR_LOG_DIR"] = MOZ_JAR_LOG_DIR
|
||||
@ -102,6 +101,7 @@ if __name__ == '__main__':
|
||||
for i in range(0, num_runs):
|
||||
if num_runs != 1:
|
||||
print "Starting profiling run %d of %d" % (i + 1, num_runs)
|
||||
automation.initializeProfile(PROFILE_DIRECTORY)
|
||||
status = automation.runApp(url, browserEnv, appPath, PROFILE_DIRECTORY, {},
|
||||
debuggerInfo=debuggerInfo,
|
||||
# the profiling HTML doesn't output anything,
|
||||
|
@ -416,6 +416,9 @@ int do_relocation_section(Elf *elf, unsigned int rel_type, unsigned int rel_type
|
||||
int entry_sz = (elf->getClass() == ELFCLASS32) ? 4 : 8;
|
||||
for (typename std::vector<Rel_Type>::iterator i = section->rels.begin();
|
||||
i != section->rels.end(); i++) {
|
||||
// We don't need to keep R_*_NONE relocations
|
||||
if (!ELF32_R_TYPE(i->r_info))
|
||||
continue;
|
||||
ElfSection *section = elf->getSectionAt(i->r_offset);
|
||||
// __cxa_pure_virtual is a function used in vtables to point at pure
|
||||
// virtual methods. The __cxa_pure_virtual function usually abort()s.
|
||||
|
@ -59,7 +59,7 @@ public:
|
||||
NS_DECL_NSIPRINCIPAL
|
||||
NS_DECL_NSISERIALIZABLE
|
||||
|
||||
nsresult Init();
|
||||
nsresult Init(JSPrincipals **jsprin);
|
||||
|
||||
nsSystemPrincipal();
|
||||
|
||||
|
@ -2712,7 +2712,7 @@ nsScriptSecurityManager::CheckConfirmDialog(JSContext* cx, nsIPrincipal* aPrinci
|
||||
nsIScriptContext *scriptContext = GetScriptContext(cx);
|
||||
if (scriptContext)
|
||||
{
|
||||
nsCOMPtr<nsIDOMWindowInternal> domWin =
|
||||
nsCOMPtr<nsIDOMWindow> domWin =
|
||||
do_QueryInterface(scriptContext->GetGlobalObject());
|
||||
if (domWin)
|
||||
domWin->GetPrompter(getter_AddRefs(prompter));
|
||||
@ -3379,7 +3379,8 @@ nsresult nsScriptSecurityManager::Init()
|
||||
nsRefPtr<nsSystemPrincipal> system = new nsSystemPrincipal();
|
||||
NS_ENSURE_TRUE(system, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
rv = system->Init();
|
||||
JSPrincipals *jsprin;
|
||||
rv = system->Init(&jsprin);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
mSystemPrincipal = system;
|
||||
@ -3406,6 +3407,8 @@ nsresult nsScriptSecurityManager::Init()
|
||||
JS_SetRuntimeSecurityCallbacks(sRuntime, &securityCallbacks);
|
||||
NS_ASSERTION(!oldcallbacks, "Someone else set security callbacks!");
|
||||
|
||||
JS_SetTrustedPrincipals(sRuntime, jsprin);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -3429,6 +3432,7 @@ nsScriptSecurityManager::Shutdown()
|
||||
{
|
||||
if (sRuntime) {
|
||||
JS_SetRuntimeSecurityCallbacks(sRuntime, NULL);
|
||||
JS_SetTrustedPrincipals(sRuntime, NULL);
|
||||
sRuntime = nsnull;
|
||||
}
|
||||
sEnabledID = JSID_VOID;
|
||||
|
@ -314,7 +314,7 @@ nsSystemPrincipal::nsSystemPrincipal()
|
||||
#define SYSTEM_PRINCIPAL_SPEC "[System Principal]"
|
||||
|
||||
nsresult
|
||||
nsSystemPrincipal::Init()
|
||||
nsSystemPrincipal::Init(JSPrincipals **jsprin)
|
||||
{
|
||||
// Use an nsCString so we only do the allocation once here and then
|
||||
// share with nsJSPrincipals
|
||||
@ -324,7 +324,11 @@ nsSystemPrincipal::Init()
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
return mJSPrincipals.Init(this, str);
|
||||
nsresult rv = mJSPrincipals.Init(this, str);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
*jsprin = &mJSPrincipals;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsSystemPrincipal::~nsSystemPrincipal(void)
|
||||
|
@ -64,7 +64,7 @@
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMLocation.h"
|
||||
#include "nsIDOMWindowCollection.h"
|
||||
#include "nsIDOMWindowInternal.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsIIOService.h"
|
||||
#include "nsIJARProtocolHandler.h"
|
||||
#include "nsIObserverService.h"
|
||||
@ -351,7 +351,7 @@ nsChromeRegistry::ConvertChromeURL(nsIURI* aChromeURI, nsIURI* *aResult)
|
||||
// theme stuff
|
||||
|
||||
|
||||
static void FlushSkinBindingsForWindow(nsIDOMWindowInternal* aWindow)
|
||||
static void FlushSkinBindingsForWindow(nsIDOMWindow* aWindow)
|
||||
{
|
||||
// Get the DOM document.
|
||||
nsCOMPtr<nsIDOMDocument> domDocument;
|
||||
@ -383,7 +383,7 @@ NS_IMETHODIMP nsChromeRegistry::RefreshSkins()
|
||||
nsCOMPtr<nsISupports> protoWindow;
|
||||
windowEnumerator->GetNext(getter_AddRefs(protoWindow));
|
||||
if (protoWindow) {
|
||||
nsCOMPtr<nsIDOMWindowInternal> domWindow = do_QueryInterface(protoWindow);
|
||||
nsCOMPtr<nsIDOMWindow> domWindow = do_QueryInterface(protoWindow);
|
||||
if (domWindow)
|
||||
FlushSkinBindingsForWindow(domWindow);
|
||||
}
|
||||
@ -398,7 +398,7 @@ NS_IMETHODIMP nsChromeRegistry::RefreshSkins()
|
||||
nsCOMPtr<nsISupports> protoWindow;
|
||||
windowEnumerator->GetNext(getter_AddRefs(protoWindow));
|
||||
if (protoWindow) {
|
||||
nsCOMPtr<nsIDOMWindowInternal> domWindow = do_QueryInterface(protoWindow);
|
||||
nsCOMPtr<nsIDOMWindow> domWindow = do_QueryInterface(protoWindow);
|
||||
if (domWindow)
|
||||
RefreshWindow(domWindow);
|
||||
}
|
||||
@ -428,7 +428,7 @@ static PRBool IsChromeURI(nsIURI* aURI)
|
||||
}
|
||||
|
||||
// XXXbsmedberg: move this to windowmediator
|
||||
nsresult nsChromeRegistry::RefreshWindow(nsIDOMWindowInternal* aWindow)
|
||||
nsresult nsChromeRegistry::RefreshWindow(nsIDOMWindow* aWindow)
|
||||
{
|
||||
// Deal with our subframes first.
|
||||
nsCOMPtr<nsIDOMWindowCollection> frames;
|
||||
@ -439,8 +439,7 @@ nsresult nsChromeRegistry::RefreshWindow(nsIDOMWindowInternal* aWindow)
|
||||
for (j = 0; j < length; j++) {
|
||||
nsCOMPtr<nsIDOMWindow> childWin;
|
||||
frames->Item(j, getter_AddRefs(childWin));
|
||||
nsCOMPtr<nsIDOMWindowInternal> childInt(do_QueryInterface(childWin));
|
||||
RefreshWindow(childInt);
|
||||
RefreshWindow(childWin);
|
||||
}
|
||||
|
||||
nsresult rv;
|
||||
@ -568,8 +567,7 @@ nsChromeRegistry::ReloadChrome()
|
||||
nsCOMPtr<nsISupports> protoWindow;
|
||||
rv = windowEnumerator->GetNext(getter_AddRefs(protoWindow));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsCOMPtr<nsIDOMWindowInternal> domWindow =
|
||||
do_QueryInterface(protoWindow);
|
||||
nsCOMPtr<nsIDOMWindow> domWindow = do_QueryInterface(protoWindow);
|
||||
if (domWindow) {
|
||||
nsCOMPtr<nsIDOMLocation> location;
|
||||
domWindow->GetLocation(getter_AddRefs(location));
|
||||
|
@ -63,7 +63,7 @@
|
||||
|
||||
#include "mozilla/Omnijar.h"
|
||||
|
||||
class nsIDOMWindowInternal;
|
||||
class nsIDOMWindow;
|
||||
class nsIURL;
|
||||
|
||||
// The chrome registry is actually split between nsChromeRegistryChrome and
|
||||
@ -130,7 +130,7 @@ protected:
|
||||
|
||||
nsresult SelectLocaleFromPref(nsIPrefBranch* prefs);
|
||||
|
||||
static nsresult RefreshWindow(nsIDOMWindowInternal* aWindow);
|
||||
static nsresult RefreshWindow(nsIDOMWindow* aWindow);
|
||||
static nsresult GetProviderAndPath(nsIURL* aChromeURL,
|
||||
nsACString& aProvider, nsACString& aPath);
|
||||
|
||||
|
@ -112,6 +112,7 @@ MOZ_JPROF = @MOZ_JPROF@
|
||||
MOZ_SHARK = @MOZ_SHARK@
|
||||
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@
|
||||
@ -343,6 +344,7 @@ AS_DASH_C_FLAG = @AS_DASH_C_FLAG@
|
||||
LD = @LD@
|
||||
RC = @RC@
|
||||
RCFLAGS = @RCFLAGS@
|
||||
MC = @MC@
|
||||
WINDRES = @WINDRES@
|
||||
IMPLIB = @IMPLIB@
|
||||
FILTER = @FILTER@
|
||||
|
@ -2020,6 +2020,7 @@ showbuild:
|
||||
@echo "MKSHLIB = $(MKSHLIB)"
|
||||
@echo "MKCSHLIB = $(MKCSHLIB)"
|
||||
@echo "RC = $(RC)"
|
||||
@echo "MC = $(MC)"
|
||||
@echo "CFLAGS = $(CFLAGS)"
|
||||
@echo "OS_CFLAGS = $(OS_CFLAGS)"
|
||||
@echo "COMPILE_CFLAGS = $(COMPILE_CFLAGS)"
|
||||
|
65
configure.in
65
configure.in
@ -123,7 +123,7 @@ CAIRO_VERSION=1.10
|
||||
PANGO_VERSION=1.14.0
|
||||
GTK2_VERSION=2.10.0
|
||||
WINDRES_VERSION=2.14.90
|
||||
W32API_VERSION=3.8
|
||||
W32API_VERSION=3.14
|
||||
GNOMEVFS_VERSION=2.0
|
||||
GNOMEUI_VERSION=2.2.0
|
||||
GCONF_VERSION=1.2.1
|
||||
@ -317,6 +317,12 @@ case "$target" in
|
||||
if test -e "$android_ndk/sources/cxx-stl/stlport/libs/armeabi-v7a/libstlport_static.a" ; then
|
||||
STLPORT_CPPFLAGS="-I$android_ndk/sources/cxx-stl/stlport/stlport"
|
||||
STLPORT_LDFLAGS="-L$android_ndk/sources/cxx-stl/stlport/libs/armeabi-v7a/ -lstlport_static"
|
||||
elif test -e "$android_ndk/tmp/ndk-digit/build/install/sources/cxx-stl/stlport/libs/armeabi-v7a/libstlport_static.a" ; then
|
||||
STLPORT_CPPFLAGS="-I$android_ndk/sources/cxx-stl/stlport/stlport"
|
||||
STLPORT_LDFLAGS="-L$android_ndk/tmp/ndk-digit/build/install/sources/cxx-stl/stlport/libs/armeabi-v7a -lstlport_static"
|
||||
elif test "$target" != "arm-android-eabi"; then
|
||||
dnl fail if we're not building with NDKr4
|
||||
AC_MSG_ERROR([Couldn't find path to stlport in the android ndk])
|
||||
fi
|
||||
|
||||
CPPFLAGS="-I$android_platform/usr/include $STLPORT_CPPFLAGS $CPPFLAGS"
|
||||
@ -870,8 +876,7 @@ EOF
|
||||
AC_MSG_ERROR([windres version $WINDRES_VERSION or higher is required to build.])
|
||||
fi
|
||||
|
||||
# Server 2003 is the highest version supported
|
||||
MOZ_WINSDK_MAXVER=0x05020000
|
||||
MOZ_WINSDK_MAXVER=0x06010000
|
||||
fi # !GNU_CC
|
||||
|
||||
AC_DEFINE_UNQUOTED(WINVER,0x$WINVER)
|
||||
@ -2255,13 +2260,17 @@ ia64*-hpux*)
|
||||
MOZ_DEBUG_FLAGS="-g" # We want inlining
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
if test -z "$MC"; then
|
||||
MC=mc.exe
|
||||
fi
|
||||
;;
|
||||
*-mingw*)
|
||||
DSO_CFLAGS=
|
||||
DSO_PIC_CFLAGS=
|
||||
DLL_SUFFIX=.dll
|
||||
RC=rc.exe
|
||||
MC=mc.exe
|
||||
# certain versions of cygwin's makedepend barf on the
|
||||
# #include <string> vs -I./dist/include/string issue so don't use it
|
||||
SYSTEM_MAKEDEPEND=
|
||||
@ -2549,6 +2558,7 @@ ia64*-hpux*)
|
||||
TARGET_MD_ARCH=os2
|
||||
_PLATFORM_DEFAULT_TOOLKIT="cairo-os2"
|
||||
RC=rc.exe
|
||||
MC=mc.exe
|
||||
RCFLAGS='-n'
|
||||
MOZ_USER_DIR="Mozilla"
|
||||
ZIP="$ZIP -X"
|
||||
@ -5680,6 +5690,23 @@ fi
|
||||
|
||||
AC_SUBST(MOZ_IPDL_TESTS)
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Turns off code necessary for e10s compatibility
|
||||
dnl ========================================================
|
||||
dnl This is a temporary flag to be removed in bug 662601 when
|
||||
dnl it's no longer needed
|
||||
|
||||
MOZ_E10S_COMPAT=
|
||||
|
||||
MOZ_ARG_ENABLE_BOOL(e10s-compat,
|
||||
[ --enable-e10s-compat Turns off code for e10s compat],
|
||||
MOZ_E10S_COMPAT=1,
|
||||
MOZ_E10S_COMPAT=)
|
||||
|
||||
if test -n "$MOZ_E10S_COMPAT"; then
|
||||
AC_DEFINE(MOZ_E10S_COMPAT)
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Disable building dbm
|
||||
dnl ========================================================
|
||||
@ -7459,12 +7486,12 @@ else
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "$OS_ARCH" != "Darwin"; then
|
||||
if test "$OS_ARCH" != "WINNT"; then
|
||||
dnl NB: this must be kept in sync with jemalloc.h
|
||||
AC_DEFINE(HAVE_JEMALLOC_VALLOC)
|
||||
AC_DEFINE(HAVE_JEMALLOC_POSIX_MEMALIGN)
|
||||
AC_DEFINE(HAVE_JEMALLOC_MEMALIGN)
|
||||
fi
|
||||
AC_DEFINE(HAVE_JEMALLOC_POSIX_MEMALIGN)
|
||||
AC_DEFINE(HAVE_JEMALLOC_MEMALIGN)
|
||||
fi # MOZ_MEMORY
|
||||
AC_SUBST(MOZ_MEMORY)
|
||||
AC_SUBST(MOZ_MEMORY_LDFLAGS)
|
||||
@ -7530,6 +7557,26 @@ if test -n "$MOZ_GCTIMER"; then
|
||||
AC_DEFINE(MOZ_GCTIMER)
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl ETW - Event Tracing for Windows
|
||||
dnl ========================================================
|
||||
MOZ_ARG_ENABLE_BOOL(ETW,
|
||||
[ --enable-ETW Enable ETW (Event Tracing for Windows) event reporting
|
||||
(needs Windows Vista+ SDK)],
|
||||
MOZ_ETW=1,
|
||||
MOZ_ETW= )
|
||||
if test -n "$MOZ_ETW"; then
|
||||
AC_DEFINE(MOZ_ETW)
|
||||
fi
|
||||
|
||||
if test -n "$MOZ_ETW"; then
|
||||
if test -z "$MOZ_WINSDK_TARGETVER"; then
|
||||
AC_MSG_ERROR([--enable-ETW is only valid on Windows])
|
||||
elif test "$MOZ_WINSDK_TARGETVER" -lt "06000000"; then
|
||||
AC_MSG_ERROR([--enable-ETW requires the Windows Vista SDK or newer])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl Zealous JavaScript GC
|
||||
dnl ========================================================
|
||||
@ -7681,7 +7728,7 @@ MOZ_ARG_ENABLE_BOOL(stdcxx-compat,
|
||||
AC_SUBST(STDCXX_COMPAT)
|
||||
|
||||
if test -n "$STDCXX_COMPAT"; then
|
||||
eval $($PYTHON $_topsrcdir/build/autoconf/libstdcxx.py)
|
||||
eval $(CXX="$CXX" $PYTHON $_topsrcdir/build/autoconf/libstdcxx.py)
|
||||
AC_SUBST(MOZ_LIBSTDCXX_TARGET_VERSION)
|
||||
AC_SUBST(MOZ_LIBSTDCXX_HOST_VERSION)
|
||||
fi
|
||||
@ -8834,6 +8881,7 @@ AC_SUBST(AS_DASH_C_FLAG)
|
||||
AC_SUBST(LD)
|
||||
AC_SUBST(RC)
|
||||
AC_SUBST(RCFLAGS)
|
||||
AC_SUBST(MC)
|
||||
AC_SUBST(WINDRES)
|
||||
AC_SUBST(IMPLIB)
|
||||
AC_SUBST(FILTER)
|
||||
@ -8866,6 +8914,7 @@ AC_SUBST(MOZ_JPROF)
|
||||
AC_SUBST(MOZ_SHARK)
|
||||
AC_SUBST(MOZ_CALLGRIND)
|
||||
AC_SUBST(MOZ_VTUNE)
|
||||
AC_SUBST(MOZ_ETW)
|
||||
AC_SUBST(MOZ_PROFILING)
|
||||
AC_SUBST(MOZ_QUANTIFY)
|
||||
AC_SUBST(LIBICONV)
|
||||
|
@ -42,6 +42,7 @@
|
||||
|
||||
#include "nsIContent.h"
|
||||
#include "nsEventStates.h"
|
||||
#include "nsDOMMemoryReporter.h"
|
||||
|
||||
class nsEventStateManager;
|
||||
class nsGlobalWindow;
|
||||
@ -97,6 +98,8 @@ public:
|
||||
{}
|
||||
#endif // MOZILLA_INTERNAL_API
|
||||
|
||||
NS_DECL_AND_IMPL_DOM_MEMORY_REPORTER_SIZEOF(Element, nsIContent)
|
||||
|
||||
/**
|
||||
* Method to get the full state of this element. See nsEventStates.h for
|
||||
* the possible bits that could be set here.
|
||||
|
@ -54,53 +54,111 @@
|
||||
#include "prmem.h"
|
||||
#include "nsAutoPtr.h"
|
||||
|
||||
#ifndef PR_UINT64_MAX
|
||||
#define PR_UINT64_MAX (~(PRUint64)(0))
|
||||
#endif
|
||||
|
||||
class nsIFile;
|
||||
class nsIInputStream;
|
||||
class nsIClassInfo;
|
||||
class nsIBlobBuilder;
|
||||
|
||||
nsresult NS_NewBlobBuilder(nsISupports* *aSupports);
|
||||
void ParseSize(PRInt64 aSize, PRInt64& aStart, PRInt64& aEnd);
|
||||
|
||||
class nsDOMFile : public nsIDOMFile,
|
||||
public nsIXHRSendable,
|
||||
public nsIJSNativeInitializer
|
||||
class nsDOMFileBase : public nsIDOMFile,
|
||||
public nsIXHRSendable
|
||||
{
|
||||
public:
|
||||
|
||||
nsDOMFileBase(const nsAString& aName, const nsAString& aContentType,
|
||||
PRUint64 aLength)
|
||||
: mIsFile(true), mContentType(aContentType), mName(aName),
|
||||
mStart(0), mLength(aLength)
|
||||
{
|
||||
// Ensure non-null mContentType by default
|
||||
mContentType.SetIsVoid(PR_FALSE);
|
||||
}
|
||||
|
||||
nsDOMFileBase(const nsAString& aContentType, PRUint64 aLength)
|
||||
: mIsFile(false), mContentType(aContentType),
|
||||
mStart(0), mLength(aLength)
|
||||
{
|
||||
// Ensure non-null mContentType by default
|
||||
mContentType.SetIsVoid(PR_FALSE);
|
||||
}
|
||||
|
||||
nsDOMFileBase(const nsAString& aContentType,
|
||||
PRUint64 aStart, PRUint64 aLength)
|
||||
: mIsFile(false), mContentType(aContentType),
|
||||
mStart(aStart), mLength(aLength)
|
||||
{
|
||||
NS_ASSERTION(aLength != PR_UINT64_MAX,
|
||||
"Must know length when creating slice");
|
||||
// Ensure non-null mContentType by default
|
||||
mContentType.SetIsVoid(PR_FALSE);
|
||||
}
|
||||
|
||||
virtual ~nsDOMFileBase() {}
|
||||
|
||||
virtual already_AddRefed<nsIDOMBlob>
|
||||
CreateSlice(PRUint64 aStart, PRUint64 aLength,
|
||||
const nsAString& aContentType) = 0;
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIDOMBLOB
|
||||
NS_DECL_NSIDOMFILE
|
||||
NS_DECL_NSIXHRSENDABLE
|
||||
|
||||
nsDOMFile(nsIFile *aFile, const nsAString& aContentType,
|
||||
nsISupports *aCacheToken = nsnull)
|
||||
: mFile(aFile),
|
||||
mCacheToken(aCacheToken),
|
||||
mContentType(aContentType),
|
||||
mIsFullFile(true)
|
||||
{}
|
||||
|
||||
nsDOMFile(nsIFile *aFile)
|
||||
: mFile(aFile),
|
||||
mIsFullFile(true)
|
||||
{}
|
||||
|
||||
nsDOMFile(const nsDOMFile* aOther, PRUint64 aStart, PRUint64 aLength,
|
||||
const nsAString& aContentType)
|
||||
: mFile(aOther->mFile),
|
||||
mCacheToken(aOther->mCacheToken),
|
||||
mStart(aOther->mIsFullFile ? aStart :
|
||||
(aOther->mStart + aStart)),
|
||||
mLength(aLength),
|
||||
mContentType(aContentType),
|
||||
mIsFullFile(false)
|
||||
protected:
|
||||
bool IsSizeUnknown()
|
||||
{
|
||||
NS_ASSERTION(mFile, "must have file");
|
||||
// Ensure non-null mContentType
|
||||
mContentType.SetIsVoid(PR_FALSE);
|
||||
return mLength == PR_UINT64_MAX;
|
||||
}
|
||||
|
||||
virtual ~nsDOMFile() {}
|
||||
bool mIsFile;
|
||||
nsString mContentType;
|
||||
nsString mName;
|
||||
|
||||
PRUint64 mStart;
|
||||
PRUint64 mLength;
|
||||
};
|
||||
|
||||
class nsDOMFileFile : public nsDOMFileBase,
|
||||
public nsIJSNativeInitializer
|
||||
{
|
||||
public:
|
||||
// Create as a file
|
||||
nsDOMFileFile(nsIFile *aFile)
|
||||
: nsDOMFileBase(EmptyString(), EmptyString(), PR_UINT64_MAX),
|
||||
mFile(aFile), mWholeFile(true)
|
||||
{
|
||||
NS_ASSERTION(mFile, "must have file");
|
||||
// Lazily get the content type and size
|
||||
mContentType.SetIsVoid(PR_TRUE);
|
||||
mFile->GetLeafName(mName);
|
||||
}
|
||||
|
||||
// Create as a blob
|
||||
nsDOMFileFile(nsIFile *aFile, const nsAString& aContentType,
|
||||
nsISupports *aCacheToken = nsnull)
|
||||
: nsDOMFileBase(aContentType, PR_UINT64_MAX),
|
||||
mFile(aFile), mWholeFile(true),
|
||||
mCacheToken(aCacheToken)
|
||||
{
|
||||
NS_ASSERTION(mFile, "must have file");
|
||||
}
|
||||
|
||||
// Create as a file to be later initialized
|
||||
nsDOMFileFile()
|
||||
: nsDOMFileBase(EmptyString(), EmptyString(), PR_UINT64_MAX),
|
||||
mWholeFile(true)
|
||||
{
|
||||
// Lazily get the content type and size
|
||||
mContentType.SetIsVoid(PR_TRUE);
|
||||
mName.SetIsVoid(PR_TRUE);
|
||||
}
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
// nsIJSNativeInitializer
|
||||
NS_IMETHOD Initialize(nsISupports* aOwner,
|
||||
@ -109,62 +167,74 @@ public:
|
||||
PRUint32 aArgc,
|
||||
jsval* aArgv);
|
||||
|
||||
// Overrides
|
||||
NS_IMETHOD GetSize(PRUint64* aSize);
|
||||
NS_IMETHOD GetType(nsAString& aType);
|
||||
NS_IMETHOD GetMozFullPathInternal(nsAString& aFullPath);
|
||||
NS_IMETHOD GetInternalStream(nsIInputStream**);
|
||||
|
||||
// DOMClassInfo constructor (for File("foo"))
|
||||
static nsresult
|
||||
NewFile(nsISupports* *aNewObject);
|
||||
|
||||
protected:
|
||||
// Create slice
|
||||
nsDOMFileFile(const nsDOMFileFile* aOther, PRUint64 aStart, PRUint64 aLength,
|
||||
const nsAString& aContentType)
|
||||
: nsDOMFileBase(aContentType, aOther->mStart + aStart, aLength),
|
||||
mFile(aOther->mFile), mWholeFile(false),
|
||||
mCacheToken(aOther->mCacheToken)
|
||||
{
|
||||
NS_ASSERTION(mFile, "must have file");
|
||||
}
|
||||
virtual already_AddRefed<nsIDOMBlob>
|
||||
CreateSlice(PRUint64 aStart, PRUint64 aLength,
|
||||
const nsAString& aContentType);
|
||||
|
||||
nsCOMPtr<nsIFile> mFile;
|
||||
bool mWholeFile;
|
||||
nsCOMPtr<nsISupports> mCacheToken;
|
||||
|
||||
// start and length in
|
||||
PRUint64 mStart;
|
||||
PRUint64 mLength;
|
||||
|
||||
nsString mContentType;
|
||||
|
||||
bool mIsFullFile;
|
||||
};
|
||||
|
||||
class nsDOMMemoryFile : public nsDOMFile
|
||||
class nsDOMMemoryFile : public nsDOMFileBase
|
||||
{
|
||||
public:
|
||||
// Create as file
|
||||
nsDOMMemoryFile(void *aMemoryBuffer,
|
||||
PRUint64 aLength,
|
||||
const nsAString& aName,
|
||||
const nsAString& aContentType)
|
||||
: nsDOMFile(nsnull, aContentType),
|
||||
mDataOwner(new DataOwner(aMemoryBuffer)),
|
||||
mName(aName)
|
||||
: nsDOMFileBase(aName, aContentType, aLength),
|
||||
mDataOwner(new DataOwner(aMemoryBuffer))
|
||||
{
|
||||
mStart = 0;
|
||||
mLength = aLength;
|
||||
NS_ASSERTION(mDataOwner && mDataOwner->mData, "must have data");
|
||||
}
|
||||
|
||||
// Create as blob
|
||||
nsDOMMemoryFile(void *aMemoryBuffer,
|
||||
PRUint64 aLength,
|
||||
const nsAString& aContentType)
|
||||
: nsDOMFileBase(aContentType, aLength),
|
||||
mDataOwner(new DataOwner(aMemoryBuffer))
|
||||
{
|
||||
NS_ASSERTION(mDataOwner && mDataOwner->mData, "must have data");
|
||||
}
|
||||
|
||||
NS_IMETHOD GetInternalStream(nsIInputStream**);
|
||||
|
||||
protected:
|
||||
// Create slice
|
||||
nsDOMMemoryFile(const nsDOMMemoryFile* aOther, PRUint64 aStart,
|
||||
PRUint64 aLength, const nsAString& aContentType)
|
||||
: nsDOMFile(nsnull, aContentType),
|
||||
: nsDOMFileBase(aContentType, aOther->mStart + aStart, aLength),
|
||||
mDataOwner(aOther->mDataOwner)
|
||||
{
|
||||
NS_ASSERTION(mDataOwner && mDataOwner->mData, "must have data");
|
||||
|
||||
mIsFullFile = false;
|
||||
mStart = aOther->mStart + aStart;
|
||||
mLength = aLength;
|
||||
|
||||
// Ensure non-null mContentType
|
||||
mContentType.SetIsVoid(PR_FALSE);
|
||||
}
|
||||
virtual already_AddRefed<nsIDOMBlob>
|
||||
CreateSlice(PRUint64 aStart, PRUint64 aLength,
|
||||
const nsAString& aContentType);
|
||||
|
||||
NS_IMETHOD GetName(nsAString&);
|
||||
NS_IMETHOD GetSize(PRUint64*);
|
||||
NS_IMETHOD GetInternalStream(nsIInputStream**);
|
||||
NS_IMETHOD GetMozFullPathInternal(nsAString&);
|
||||
NS_IMETHOD MozSlice(PRInt64 aStart, PRInt64 aEnd,
|
||||
const nsAString& aContentType, PRUint8 optional_argc,
|
||||
nsIDOMBlob **aBlob);
|
||||
|
||||
protected:
|
||||
friend class DataOwnerAdapter; // Needs to see DataOwner
|
||||
class DataOwner {
|
||||
public:
|
||||
@ -181,8 +251,6 @@ protected:
|
||||
|
||||
// Used when backed by a memory store
|
||||
nsRefPtr<DataOwner> mDataOwner;
|
||||
|
||||
nsString mName;
|
||||
};
|
||||
|
||||
class nsDOMFileList : public nsIDOMFileList
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include "nsChangeHint.h"
|
||||
#include "nsINode.h"
|
||||
#include "nsIDocument.h" // for IsInHTMLDocument
|
||||
#include "nsDOMMemoryReporter.h"
|
||||
|
||||
// Forward declarations
|
||||
class nsIAtom;
|
||||
@ -76,8 +77,8 @@ enum nsLinkState {
|
||||
|
||||
// IID for the nsIContent interface
|
||||
#define NS_ICONTENT_IID \
|
||||
{ 0x860ee35b, 0xe505, 0x438f, \
|
||||
{ 0xa7, 0x7b, 0x65, 0xb9, 0xf5, 0x0b, 0xe5, 0x29 } }
|
||||
{ 0x4aad2c06, 0xd6c3, 0x4f44, \
|
||||
{ 0x94, 0xf9, 0xd5, 0xac, 0xe5, 0x04, 0x67, 0xec } }
|
||||
|
||||
/**
|
||||
* A node of content in a document's content model. This interface
|
||||
@ -100,6 +101,8 @@ public:
|
||||
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICONTENT_IID)
|
||||
|
||||
NS_DECL_AND_IMPL_DOM_MEMORY_REPORTER_SIZEOF(nsIContent, nsINode);
|
||||
|
||||
/**
|
||||
* Bind this content node to a tree. If this method throws, the caller must
|
||||
* call UnbindFromTree() on the node. In the typical case of a node being
|
||||
@ -946,10 +949,6 @@ public:
|
||||
|
||||
virtual nsresult PreHandleEvent(nsEventChainPreVisitor& aVisitor);
|
||||
|
||||
PRInt64 SizeOf() const {
|
||||
return sizeof(*this);
|
||||
}
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Hook for implementing GetID. This is guaranteed to only be
|
||||
|
@ -47,7 +47,7 @@ interface nsIURI;
|
||||
interface nsIPrincipal;
|
||||
interface nsIDOMBlob;
|
||||
|
||||
[scriptable, uuid(d5237f31-443a-460b-9e42-449a135346f0)]
|
||||
[scriptable, builtinclass, uuid(d5237f31-443a-460b-9e42-449a135346f0)]
|
||||
interface nsIDOMBlob : nsISupports
|
||||
{
|
||||
readonly attribute unsigned long long size;
|
||||
@ -58,12 +58,12 @@ interface nsIDOMBlob : nsISupports
|
||||
// moz-filedata: protocol handler
|
||||
[noscript] DOMString getInternalUrl(in nsIPrincipal principal);
|
||||
|
||||
[optional_argc] nsIDOMBlob mozSlice(in long long start,
|
||||
[optional_argc] nsIDOMBlob mozSlice([optional] in long long start,
|
||||
[optional] in long long end,
|
||||
[optional] in DOMString contentType);
|
||||
};
|
||||
|
||||
[scriptable, uuid(b096ef67-7b77-47f8-8e70-5d8ee36416bf)]
|
||||
[scriptable, builtinclass, uuid(b096ef67-7b77-47f8-8e70-5d8ee36416bf)]
|
||||
interface nsIDOMFile : nsIDOMBlob
|
||||
{
|
||||
readonly attribute DOMString name;
|
||||
@ -73,9 +73,10 @@ interface nsIDOMFile : nsIDOMBlob
|
||||
[noscript] readonly attribute DOMString mozFullPathInternal;
|
||||
};
|
||||
|
||||
[scriptable, uuid(c4a77171-039b-4f84-97f9-820fb51626af)]
|
||||
[scriptable, builtinclass, uuid(006d2cde-ec18-41d4-acc3-43682dd418e2)]
|
||||
interface nsIDOMMozBlobBuilder : nsISupports
|
||||
{
|
||||
nsIDOMBlob getBlob([optional] in DOMString contentType);
|
||||
nsIDOMFile getFile(in DOMString name, [optional] in DOMString contentType);
|
||||
[implicit_jscontext] void append(in jsval data);
|
||||
};
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user