зеркало из https://github.com/mozilla/gecko-dev.git
Merge m-c to s-c
This commit is contained in:
Коммит
905e47b26e
|
@ -54,7 +54,7 @@ interface nsIDOMCSSPrimitiveValue;
|
||||||
* If the DOM node for this access node is "accessible",
|
* If the DOM node for this access node is "accessible",
|
||||||
* then a QueryInterface to nsIAccessible will succeed.
|
* then a QueryInterface to nsIAccessible will succeed.
|
||||||
*/
|
*/
|
||||||
[scriptable, uuid(ef16ff42-0256-4b48-ae87-b18a95b7f7d6)]
|
[scriptable, uuid(bbbd5a68-bad2-48c1-ab09-beb6c34f03d9)]
|
||||||
interface nsIAccessNode : nsISupports
|
interface nsIAccessNode : nsISupports
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -99,12 +99,6 @@ interface nsIAccessNode : nsISupports
|
||||||
*/
|
*/
|
||||||
void scrollToPoint(in unsigned long aCoordinateType, in long aX, in long aY);
|
void scrollToPoint(in unsigned long aCoordinateType, in long aX, in long aY);
|
||||||
|
|
||||||
/**
|
|
||||||
* The OS window handle for the window this node
|
|
||||||
* is being displayed in.
|
|
||||||
*/
|
|
||||||
[noscript] readonly attribute voidPtr ownerWindow;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A unique ID calculated for this DOM node, for the
|
* A unique ID calculated for this DOM node, for the
|
||||||
* purposes of caching and referencing this object.
|
* purposes of caching and referencing this object.
|
||||||
|
|
|
@ -117,7 +117,6 @@ static gint sListener_idx = 1;
|
||||||
|
|
||||||
static GHashTable* sKey_listener_list = NULL;
|
static GHashTable* sKey_listener_list = NULL;
|
||||||
static guint sKey_snooper_id = 0;
|
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 bool sToplevel_event_hook_added = false;
|
||||||
static gulong sToplevel_show_hook = 0;
|
static gulong sToplevel_show_hook = 0;
|
||||||
static gulong sToplevel_hide_hook = 0;
|
static gulong sToplevel_hide_hook = 0;
|
||||||
|
@ -570,6 +569,11 @@ toplevel_event_watcher(GSignalInvocationHint* ihint,
|
||||||
const GValue* param_values,
|
const GValue* param_values,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
|
static GQuark sQuark_gecko_acc_obj = 0;
|
||||||
|
|
||||||
|
if (!sQuark_gecko_acc_obj)
|
||||||
|
sQuark_gecko_acc_obj = g_quark_from_static_string("GeckoAccObj");
|
||||||
|
|
||||||
if (nsAccessibilityService::IsShutdown())
|
if (nsAccessibilityService::IsShutdown())
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
#include "nsEventShell.h"
|
#include "nsEventShell.h"
|
||||||
#include "nsTextAccessible.h"
|
#include "nsTextAccessible.h"
|
||||||
#include "TextUpdater.h"
|
#include "TextUpdater.h"
|
||||||
|
#include "mozilla/dom/Element.h"
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -281,6 +282,10 @@ NotificationController::WillRefresh(mozilla::TimeStamp aTime)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Process invalidation list of the document after all accessible tree
|
||||||
|
// modification are done.
|
||||||
|
mDocument->ProcessInvalidationList();
|
||||||
|
|
||||||
// If a generic notification occurs after this point then we may be allowed to
|
// If a generic notification occurs after this point then we may be allowed to
|
||||||
// process it synchronously.
|
// process it synchronously.
|
||||||
mObservingState = eRefreshObserving;
|
mObservingState = eRefreshObserving;
|
||||||
|
|
|
@ -206,6 +206,19 @@ private:
|
||||||
printf("document type: [failed]"); \
|
printf("document type: [failed]"); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define NS_LOG_ACCDOC_DOCSHELLTREE(aDocument) \
|
||||||
|
if (aDocument->IsActive()) { \
|
||||||
|
nsCOMPtr<nsISupports> container = aDocument->GetContainer(); \
|
||||||
|
nsCOMPtr<nsIDocShellTreeItem> treeItem(do_QueryInterface(container)); \
|
||||||
|
nsCOMPtr<nsIDocShellTreeItem> parentTreeItem; \
|
||||||
|
treeItem->GetParent(getter_AddRefs(parentTreeItem)); \
|
||||||
|
nsCOMPtr<nsIDocShellTreeItem> rootTreeItem; \
|
||||||
|
treeItem->GetRootTreeItem(getter_AddRefs(rootTreeItem)); \
|
||||||
|
printf("docshell hierarchy, parent: %p, root: %p, is tab document: %s;", \
|
||||||
|
parentTreeItem, rootTreeItem, \
|
||||||
|
(nsCoreUtils::IsTabDocument(aDocument) ? "yes" : "no")); \
|
||||||
|
}
|
||||||
|
|
||||||
#define NS_LOG_ACCDOC_SHELLSTATE(aDocument) \
|
#define NS_LOG_ACCDOC_SHELLSTATE(aDocument) \
|
||||||
nsCAutoString docShellBusy; \
|
nsCAutoString docShellBusy; \
|
||||||
nsCOMPtr<nsISupports> container = aDocument->GetContainer(); \
|
nsCOMPtr<nsISupports> container = aDocument->GetContainer(); \
|
||||||
|
@ -352,6 +365,8 @@ private:
|
||||||
printf("; "); \
|
printf("; "); \
|
||||||
NS_LOG_ACCDOC_TYPE(aDocument) \
|
NS_LOG_ACCDOC_TYPE(aDocument) \
|
||||||
printf("\n "); \
|
printf("\n "); \
|
||||||
|
NS_LOG_ACCDOC_DOCSHELLTREE(aDocument) \
|
||||||
|
printf("\n "); \
|
||||||
NS_LOG_ACCDOC_DOCSTATES(aDocument) \
|
NS_LOG_ACCDOC_DOCSTATES(aDocument) \
|
||||||
printf("\n "); \
|
printf("\n "); \
|
||||||
NS_LOG_ACCDOC_DOCPRESSHELL(aDocument) \
|
NS_LOG_ACCDOC_DOCPRESSHELL(aDocument) \
|
||||||
|
|
|
@ -161,19 +161,6 @@ nsAccessNode::GetUniqueID(void **aUniqueID)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
// nsIAccessNode
|
|
||||||
NS_IMETHODIMP
|
|
||||||
nsAccessNode::GetOwnerWindow(void **aWindow)
|
|
||||||
{
|
|
||||||
NS_ENSURE_ARG_POINTER(aWindow);
|
|
||||||
*aWindow = nsnull;
|
|
||||||
|
|
||||||
if (IsDefunct())
|
|
||||||
return NS_ERROR_FAILURE;
|
|
||||||
|
|
||||||
return GetDocAccessible()->GetWindowHandle(aWindow);
|
|
||||||
}
|
|
||||||
|
|
||||||
nsApplicationAccessible*
|
nsApplicationAccessible*
|
||||||
nsAccessNode::GetApplicationAccessible()
|
nsAccessNode::GetApplicationAccessible()
|
||||||
{
|
{
|
||||||
|
|
|
@ -105,6 +105,7 @@
|
||||||
|
|
||||||
#include "mozilla/unused.h"
|
#include "mozilla/unused.h"
|
||||||
#include "mozilla/Preferences.h"
|
#include "mozilla/Preferences.h"
|
||||||
|
#include "mozilla/dom/Element.h"
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
|
|
||||||
|
@ -3109,16 +3110,7 @@ nsAccessible::EnsureChildren()
|
||||||
// State is embedded children until text leaf accessible is appended.
|
// State is embedded children until text leaf accessible is appended.
|
||||||
SetChildrenFlag(eEmbeddedChildren); // Prevent reentry
|
SetChildrenFlag(eEmbeddedChildren); // Prevent reentry
|
||||||
|
|
||||||
// Notify the document about caching status.
|
|
||||||
nsDocAccessible* document = GetDocAccessible();
|
|
||||||
if (document)
|
|
||||||
document->NotifyOfCachingStart(this);
|
|
||||||
|
|
||||||
CacheChildren();
|
CacheChildren();
|
||||||
|
|
||||||
if (document)
|
|
||||||
document->NotifyOfCachingEnd(this);
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -483,14 +483,6 @@ nsApplicationAccessible::ScrollToPoint(PRUint32 aCoordinateType,
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
nsApplicationAccessible::GetOwnerWindow(void **aOwnerWindow)
|
|
||||||
{
|
|
||||||
NS_ENSURE_ARG_POINTER(aOwnerWindow);
|
|
||||||
*aOwnerWindow = nsnull;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsApplicationAccessible::GetComputedStyleValue(const nsAString &aPseudoElt,
|
nsApplicationAccessible::GetComputedStyleValue(const nsAString &aPseudoElt,
|
||||||
const nsAString &aPropertyName,
|
const nsAString &aPropertyName,
|
||||||
|
|
|
@ -76,7 +76,6 @@ public:
|
||||||
NS_SCRIPTABLE NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML);
|
NS_SCRIPTABLE NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML);
|
||||||
NS_SCRIPTABLE NS_IMETHOD ScrollTo(PRUint32 aScrollType);
|
NS_SCRIPTABLE NS_IMETHOD ScrollTo(PRUint32 aScrollType);
|
||||||
NS_SCRIPTABLE NS_IMETHOD ScrollToPoint(PRUint32 aCoordinateType, PRInt32 aX, PRInt32 aY);
|
NS_SCRIPTABLE NS_IMETHOD ScrollToPoint(PRUint32 aCoordinateType, PRInt32 aX, PRInt32 aY);
|
||||||
NS_IMETHOD GetOwnerWindow(void **aOwnerWindow);
|
|
||||||
NS_SCRIPTABLE NS_IMETHOD GetComputedStyleValue(const nsAString& aPseudoElt,
|
NS_SCRIPTABLE NS_IMETHOD GetComputedStyleValue(const nsAString& aPseudoElt,
|
||||||
const nsAString& aPropertyName,
|
const nsAString& aPropertyName,
|
||||||
nsAString& aValue NS_OUTPARAM);
|
nsAString& aValue NS_OUTPARAM);
|
||||||
|
|
|
@ -66,6 +66,7 @@
|
||||||
#include "nsContentCID.h"
|
#include "nsContentCID.h"
|
||||||
#include "nsComponentManagerUtils.h"
|
#include "nsComponentManagerUtils.h"
|
||||||
#include "nsIInterfaceRequestorUtils.h"
|
#include "nsIInterfaceRequestorUtils.h"
|
||||||
|
#include "mozilla/dom/Element.h"
|
||||||
|
|
||||||
static NS_DEFINE_IID(kRangeCID, NS_RANGE_CID);
|
static NS_DEFINE_IID(kRangeCID, NS_RANGE_CID);
|
||||||
|
|
||||||
|
@ -479,6 +480,26 @@ nsCoreUtils::IsContentDocument(nsIDocument *aDocument)
|
||||||
return (contentType == nsIDocShellTreeItem::typeContent);
|
return (contentType == nsIDocShellTreeItem::typeContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
nsCoreUtils::IsTabDocument(nsIDocument* aDocumentNode)
|
||||||
|
{
|
||||||
|
nsCOMPtr<nsISupports> container = aDocumentNode->GetContainer();
|
||||||
|
nsCOMPtr<nsIDocShellTreeItem> treeItem(do_QueryInterface(container));
|
||||||
|
|
||||||
|
nsCOMPtr<nsIDocShellTreeItem> parentTreeItem;
|
||||||
|
treeItem->GetParent(getter_AddRefs(parentTreeItem));
|
||||||
|
|
||||||
|
// Tab document running in own process doesn't have parent.
|
||||||
|
if (XRE_GetProcessType() == GeckoProcessType_Content)
|
||||||
|
return !parentTreeItem;
|
||||||
|
|
||||||
|
// Parent of docshell for tab document running in chrome process is root.
|
||||||
|
nsCOMPtr<nsIDocShellTreeItem> rootTreeItem;
|
||||||
|
treeItem->GetRootTreeItem(getter_AddRefs(rootTreeItem));
|
||||||
|
|
||||||
|
return parentTreeItem == rootTreeItem;
|
||||||
|
}
|
||||||
|
|
||||||
PRBool
|
PRBool
|
||||||
nsCoreUtils::IsErrorPage(nsIDocument *aDocument)
|
nsCoreUtils::IsErrorPage(nsIDocument *aDocument)
|
||||||
{
|
{
|
||||||
|
|
|
@ -233,6 +233,11 @@ public:
|
||||||
*/
|
*/
|
||||||
static PRBool IsContentDocument(nsIDocument *aDocument);
|
static PRBool IsContentDocument(nsIDocument *aDocument);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return true if the given document node is for tab document accessible.
|
||||||
|
*/
|
||||||
|
static bool IsTabDocument(nsIDocument* aDocumentNode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if the given document is an error page.
|
* Return true if the given document is an error page.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -104,8 +104,7 @@ nsDocAccessible::
|
||||||
nsDocAccessible(nsIDocument *aDocument, nsIContent *aRootContent,
|
nsDocAccessible(nsIDocument *aDocument, nsIContent *aRootContent,
|
||||||
nsIWeakReference *aShell) :
|
nsIWeakReference *aShell) :
|
||||||
nsHyperTextAccessibleWrap(aRootContent, aShell),
|
nsHyperTextAccessibleWrap(aRootContent, aShell),
|
||||||
mDocument(aDocument), mScrollPositionChangedTicks(0), mIsLoaded(PR_FALSE),
|
mDocument(aDocument), mScrollPositionChangedTicks(0), mIsLoaded(PR_FALSE)
|
||||||
mCacheRoot(nsnull), mIsPostCacheProcessing(PR_FALSE)
|
|
||||||
{
|
{
|
||||||
mFlags |= eDocAccessible;
|
mFlags |= eDocAccessible;
|
||||||
|
|
||||||
|
@ -1425,43 +1424,30 @@ nsDocAccessible::RecreateAccessible(nsIContent* aContent)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsDocAccessible::NotifyOfCachingStart(nsAccessible* aAccessible)
|
nsDocAccessible::ProcessInvalidationList()
|
||||||
{
|
{
|
||||||
if (!mCacheRoot)
|
// Invalidate children of container accessible for each element in
|
||||||
mCacheRoot = aAccessible;
|
// invalidation list. Allow invalidation list insertions while container
|
||||||
}
|
// children are recached.
|
||||||
|
for (PRUint32 idx = 0; idx < mInvalidationList.Length(); idx++) {
|
||||||
void
|
nsIContent* content = mInvalidationList[idx];
|
||||||
nsDocAccessible::NotifyOfCachingEnd(nsAccessible* aAccessible)
|
nsAccessible* accessible = GetAccessible(content);
|
||||||
{
|
if (!accessible) {
|
||||||
if (mCacheRoot == aAccessible && !mIsPostCacheProcessing) {
|
nsAccessible* container = GetContainerAccessible(content);
|
||||||
// Allow invalidation list insertions while container children are recached.
|
NS_ASSERTION(container,
|
||||||
mIsPostCacheProcessing = PR_TRUE;
|
"Got a referenced element that is not in document!");
|
||||||
|
if (container) {
|
||||||
// Invalidate children of container accessible for each element in
|
container->UpdateChildren();
|
||||||
// invalidation list.
|
accessible = GetAccessible(content);
|
||||||
for (PRUint32 idx = 0; idx < mInvalidationList.Length(); idx++) {
|
|
||||||
nsIContent* content = mInvalidationList[idx];
|
|
||||||
nsAccessible* accessible = GetAccessible(content);
|
|
||||||
if (!accessible) {
|
|
||||||
nsAccessible* container = GetContainerAccessible(content);
|
|
||||||
NS_ASSERTION(container,
|
|
||||||
"Got a referenced element that is not in document!");
|
|
||||||
if (container) {
|
|
||||||
container->UpdateChildren();
|
|
||||||
accessible = GetAccessible(content);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure the subtree is created.
|
|
||||||
if (accessible)
|
|
||||||
CacheChildrenInSubtree(accessible);
|
|
||||||
}
|
}
|
||||||
mInvalidationList.Clear();
|
|
||||||
|
|
||||||
mCacheRoot = nsnull;
|
// Make sure the subtree is created.
|
||||||
mIsPostCacheProcessing = PR_FALSE;
|
if (accessible)
|
||||||
|
CacheChildrenInSubtree(accessible);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mInvalidationList.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -325,17 +325,6 @@ public:
|
||||||
*/
|
*/
|
||||||
void RecreateAccessible(nsIContent* aContent);
|
void RecreateAccessible(nsIContent* aContent);
|
||||||
|
|
||||||
/**
|
|
||||||
* Used to notify the document that the accessible caching is started or
|
|
||||||
* finished.
|
|
||||||
*
|
|
||||||
* While children are cached we may encounter the case there's no accessible
|
|
||||||
* for referred content by related accessible. Keep the caching root and
|
|
||||||
* these related nodes to invalidate their containers after root caching.
|
|
||||||
*/
|
|
||||||
void NotifyOfCachingStart(nsAccessible* aAccessible);
|
|
||||||
void NotifyOfCachingEnd(nsAccessible* aAccessible);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// nsAccessible
|
// nsAccessible
|
||||||
|
@ -439,6 +428,15 @@ protected:
|
||||||
void ProcessContentInserted(nsAccessible* aContainer,
|
void ProcessContentInserted(nsAccessible* aContainer,
|
||||||
const nsTArray<nsCOMPtr<nsIContent> >* aInsertedContent);
|
const nsTArray<nsCOMPtr<nsIContent> >* aInsertedContent);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to notify the document to make it process the invalidation list.
|
||||||
|
*
|
||||||
|
* While children are cached we may encounter the case there's no accessible
|
||||||
|
* for referred content by related accessible. Store these related nodes to
|
||||||
|
* invalidate their containers later.
|
||||||
|
*/
|
||||||
|
void ProcessInvalidationList();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update the accessible tree for content insertion or removal.
|
* Update the accessible tree for content insertion or removal.
|
||||||
*/
|
*/
|
||||||
|
@ -532,15 +530,12 @@ protected:
|
||||||
friend class RelatedAccIterator;
|
friend class RelatedAccIterator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used for our caching algorithm. We store the root of the tree that needs
|
* Used for our caching algorithm. We store the list of nodes that should be
|
||||||
* caching, the list of nodes that should be invalidated, and whether we are
|
* invalidated.
|
||||||
* processing the invalidation list.
|
|
||||||
*
|
*
|
||||||
* @see NotifyOfCachingStart/NotifyOfCachingEnd
|
* @see ProcessInvalidationList
|
||||||
*/
|
*/
|
||||||
nsAccessible* mCacheRoot;
|
|
||||||
nsTArray<nsIContent*> mInvalidationList;
|
nsTArray<nsIContent*> mInvalidationList;
|
||||||
PRBool mIsPostCacheProcessing;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to process notification from core and accessible events.
|
* Used to process notification from core and accessible events.
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
#include "nsCoreUtils.h"
|
#include "nsCoreUtils.h"
|
||||||
|
|
||||||
#include "nsEventStates.h"
|
#include "nsEventStates.h"
|
||||||
|
#include "mozilla/dom/Element.h"
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// nsHTMLLinkAccessible
|
// nsHTMLLinkAccessible
|
||||||
|
|
|
@ -107,6 +107,8 @@ EXPORTS = \
|
||||||
# we don't want the shared lib, but we want to force the creation of a static lib.
|
# we don't want the shared lib, but we want to force the creation of a static lib.
|
||||||
FORCE_STATIC_LIB = 1
|
FORCE_STATIC_LIB = 1
|
||||||
|
|
||||||
|
include $(topsrcdir)/config/config.mk
|
||||||
|
include $(topsrcdir)/ipc/chromium/chromium-config.mk
|
||||||
include $(topsrcdir)/config/rules.mk
|
include $(topsrcdir)/config/rules.mk
|
||||||
|
|
||||||
LOCAL_INCLUDES += \
|
LOCAL_INCLUDES += \
|
||||||
|
@ -114,5 +116,6 @@ LOCAL_INCLUDES += \
|
||||||
-I$(srcdir)/../base \
|
-I$(srcdir)/../base \
|
||||||
-I$(srcdir)/../html \
|
-I$(srcdir)/../html \
|
||||||
-I$(srcdir)/../xul \
|
-I$(srcdir)/../xul \
|
||||||
|
-I$(srcdir)/../../../content/base/src \
|
||||||
|
-I$(srcdir)/../../../content/events/src \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
|
|
@ -204,7 +204,7 @@ __try {
|
||||||
// accessibles.
|
// accessibles.
|
||||||
if (!doc->ParentDocument() ||
|
if (!doc->ParentDocument() ||
|
||||||
nsWinUtils::IsWindowEmulationStarted() &&
|
nsWinUtils::IsWindowEmulationStarted() &&
|
||||||
nsWinUtils::IsTabDocument(doc->GetDocumentNode())) {
|
nsCoreUtils::IsTabDocument(doc->GetDocumentNode())) {
|
||||||
HWND hwnd = static_cast<HWND>(doc->GetNativeWindow());
|
HWND hwnd = static_cast<HWND>(doc->GetNativeWindow());
|
||||||
if (hwnd && SUCCEEDED(AccessibleObjectFromWindow(hwnd, OBJID_WINDOW,
|
if (hwnd && SUCCEEDED(AccessibleObjectFromWindow(hwnd, OBJID_WINDOW,
|
||||||
IID_IAccessible,
|
IID_IAccessible,
|
||||||
|
|
|
@ -36,6 +36,8 @@
|
||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
|
#include "mozilla/dom/TabChild.h"
|
||||||
|
|
||||||
#include "nsDocAccessibleWrap.h"
|
#include "nsDocAccessibleWrap.h"
|
||||||
#include "ISimpleDOMDocument_i.c"
|
#include "ISimpleDOMDocument_i.c"
|
||||||
#include "nsIAccessibilityService.h"
|
#include "nsIAccessibilityService.h"
|
||||||
|
@ -242,7 +244,7 @@ nsDocAccessibleWrap::Shutdown()
|
||||||
// Do window emulation specific shutdown if emulation was started.
|
// Do window emulation specific shutdown if emulation was started.
|
||||||
if (nsWinUtils::IsWindowEmulationStarted()) {
|
if (nsWinUtils::IsWindowEmulationStarted()) {
|
||||||
// Destroy window created for root document.
|
// Destroy window created for root document.
|
||||||
if (nsWinUtils::IsTabDocument(mDocument)) {
|
if (nsCoreUtils::IsTabDocument(mDocument)) {
|
||||||
sHWNDCache.Remove(mHWND);
|
sHWNDCache.Remove(mHWND);
|
||||||
::DestroyWindow(static_cast<HWND>(mHWND));
|
::DestroyWindow(static_cast<HWND>(mHWND));
|
||||||
}
|
}
|
||||||
|
@ -272,9 +274,19 @@ nsDocAccessibleWrap::NotifyOfInitialUpdate()
|
||||||
|
|
||||||
if (nsWinUtils::IsWindowEmulationStarted()) {
|
if (nsWinUtils::IsWindowEmulationStarted()) {
|
||||||
// Create window for tab document.
|
// Create window for tab document.
|
||||||
if (nsWinUtils::IsTabDocument(mDocument)) {
|
if (nsCoreUtils::IsTabDocument(mDocument)) {
|
||||||
|
mozilla::dom::TabChild* tabChild =
|
||||||
|
mozilla::dom::GetTabChildFrom(mDocument->GetShell());
|
||||||
|
|
||||||
nsRootAccessible* rootDocument = RootAccessible();
|
nsRootAccessible* rootDocument = RootAccessible();
|
||||||
|
|
||||||
|
mozilla::WindowsHandle nativeData = nsnull;
|
||||||
|
if (tabChild)
|
||||||
|
tabChild->SendGetWidgetNativeData(&nativeData);
|
||||||
|
else
|
||||||
|
nativeData = reinterpret_cast<mozilla::WindowsHandle>(
|
||||||
|
rootDocument->GetNativeWindow());
|
||||||
|
|
||||||
PRBool isActive = PR_TRUE;
|
PRBool isActive = PR_TRUE;
|
||||||
PRInt32 x = CW_USEDEFAULT, y = CW_USEDEFAULT, width = 0, height = 0;
|
PRInt32 x = CW_USEDEFAULT, y = CW_USEDEFAULT, width = 0, height = 0;
|
||||||
if (nsWinUtils::IsWindowEmulationFor(kDolphinModuleHandle)) {
|
if (nsWinUtils::IsWindowEmulationFor(kDolphinModuleHandle)) {
|
||||||
|
@ -289,7 +301,7 @@ nsDocAccessibleWrap::NotifyOfInitialUpdate()
|
||||||
docShell->GetIsActive(&isActive);
|
docShell->GetIsActive(&isActive);
|
||||||
}
|
}
|
||||||
|
|
||||||
HWND parentWnd = static_cast<HWND>(rootDocument->GetNativeWindow());
|
HWND parentWnd = reinterpret_cast<HWND>(nativeData);
|
||||||
mHWND = nsWinUtils::CreateNativeWindow(kClassNameTabContent, parentWnd,
|
mHWND = nsWinUtils::CreateNativeWindow(kClassNameTabContent, parentWnd,
|
||||||
x, y, width, height, isActive);
|
x, y, width, height, isActive);
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ void
|
||||||
nsRootAccessibleWrap::DocumentActivated(nsDocAccessible* aDocument)
|
nsRootAccessibleWrap::DocumentActivated(nsDocAccessible* aDocument)
|
||||||
{
|
{
|
||||||
if (nsWinUtils::IsWindowEmulationFor(kDolphinModuleHandle) &&
|
if (nsWinUtils::IsWindowEmulationFor(kDolphinModuleHandle) &&
|
||||||
nsWinUtils::IsTabDocument(aDocument->GetDocumentNode())) {
|
nsCoreUtils::IsTabDocument(aDocument->GetDocumentNode())) {
|
||||||
PRUint32 count = mChildDocuments.Length();
|
PRUint32 count = mChildDocuments.Length();
|
||||||
for (PRUint32 idx = 0; idx < count; idx++) {
|
for (PRUint32 idx = 0; idx < count; idx++) {
|
||||||
nsDocAccessible* childDoc = mChildDocuments[idx];
|
nsDocAccessible* childDoc = mChildDocuments[idx];
|
||||||
|
|
|
@ -176,23 +176,13 @@ nsWinUtils::HideNativeWindow(HWND aWnd)
|
||||||
bool
|
bool
|
||||||
nsWinUtils::IsWindowEmulationFor(LPCWSTR kModuleHandle)
|
nsWinUtils::IsWindowEmulationFor(LPCWSTR kModuleHandle)
|
||||||
{
|
{
|
||||||
|
#ifdef MOZ_E10S_COMPAT
|
||||||
|
// Window emulation is always enabled in multiprocess Firefox.
|
||||||
|
return kModuleHandle ? ::GetModuleHandleW(kModuleHandle) : true;
|
||||||
|
#else
|
||||||
return kModuleHandle ? ::GetModuleHandleW(kModuleHandle) :
|
return kModuleHandle ? ::GetModuleHandleW(kModuleHandle) :
|
||||||
::GetModuleHandleW(kJAWSModuleHandle) ||
|
::GetModuleHandleW(kJAWSModuleHandle) ||
|
||||||
::GetModuleHandleW(kWEModuleHandle) ||
|
::GetModuleHandleW(kWEModuleHandle) ||
|
||||||
::GetModuleHandleW(kDolphinModuleHandle);
|
::GetModuleHandleW(kDolphinModuleHandle);
|
||||||
}
|
#endif
|
||||||
|
|
||||||
bool
|
|
||||||
nsWinUtils::IsTabDocument(nsIDocument* aDocumentNode)
|
|
||||||
{
|
|
||||||
nsCOMPtr<nsISupports> container = aDocumentNode->GetContainer();
|
|
||||||
nsCOMPtr<nsIDocShellTreeItem> treeItem(do_QueryInterface(container));
|
|
||||||
|
|
||||||
nsCOMPtr<nsIDocShellTreeItem> parentTreeItem;
|
|
||||||
treeItem->GetParent(getter_AddRefs(parentTreeItem));
|
|
||||||
|
|
||||||
nsCOMPtr<nsIDocShellTreeItem> rootTreeItem;
|
|
||||||
treeItem->GetRootTreeItem(getter_AddRefs(rootTreeItem));
|
|
||||||
|
|
||||||
return parentTreeItem == rootTreeItem;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,11 +104,6 @@ public:
|
||||||
* Return true if window emulation is enabled.
|
* Return true if window emulation is enabled.
|
||||||
*/
|
*/
|
||||||
static bool IsWindowEmulationFor(LPCWSTR kModuleHandle);
|
static bool IsWindowEmulationFor(LPCWSTR kModuleHandle);
|
||||||
|
|
||||||
/**
|
|
||||||
* Return true if the given document node is for tab document accessible.
|
|
||||||
*/
|
|
||||||
static bool IsTabDocument(nsIDocument* aDocumentNode);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -58,6 +58,7 @@
|
||||||
#include "nsWidgetsCID.h"
|
#include "nsWidgetsCID.h"
|
||||||
|
|
||||||
#include "mozilla/Preferences.h"
|
#include "mozilla/Preferences.h"
|
||||||
|
#include "mozilla/dom/Element.h"
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
|
|
||||||
|
@ -464,7 +465,7 @@ nsXULMenuitemAccessible::KeyboardShortcut() const
|
||||||
|
|
||||||
PRUint32 modifierMask = 0;
|
PRUint32 modifierMask = 0;
|
||||||
if (modifiersStr.Find("shift") != -1)
|
if (modifiersStr.Find("shift") != -1)
|
||||||
modifierMask != KeyBinding::kShift;
|
modifierMask |= KeyBinding::kShift;
|
||||||
if (modifiersStr.Find("alt") != -1)
|
if (modifiersStr.Find("alt") != -1)
|
||||||
modifierMask |= KeyBinding::kAlt;
|
modifierMask |= KeyBinding::kAlt;
|
||||||
if (modifiersStr.Find("meta") != -1)
|
if (modifiersStr.Find("meta") != -1)
|
||||||
|
|
|
@ -13,11 +13,66 @@
|
||||||
|
|
||||||
<script type="application/javascript"
|
<script type="application/javascript"
|
||||||
src="../common.js" />
|
src="../common.js" />
|
||||||
|
<script type="application/javascript"
|
||||||
|
src="../events.js" />
|
||||||
<script type="application/javascript"
|
<script type="application/javascript"
|
||||||
src="../attributes.js" />
|
src="../attributes.js" />
|
||||||
|
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
function openMenu(aID)
|
||||||
|
{
|
||||||
|
this.menuNode = getNode(aID);
|
||||||
|
|
||||||
|
this.eventSeq = [
|
||||||
|
new invokerChecker(EVENT_FOCUS, this.menuNode)
|
||||||
|
];
|
||||||
|
|
||||||
|
this.invoke = function openMenu_invoke()
|
||||||
|
{
|
||||||
|
this.menuNode.open = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.finalCheck = function openMenu_finalCheck()
|
||||||
|
{
|
||||||
|
testGroupAttrs("menu_item1.1", 1, 1);
|
||||||
|
testGroupAttrs("menu_item1.2", 1, 3);
|
||||||
|
testGroupAttrs("menu_item1.4", 2, 3);
|
||||||
|
testGroupAttrs("menu_item2", 3, 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.getID = function openMenu_getID()
|
||||||
|
{
|
||||||
|
return "open menu " + prettyName(aID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function openSubMenu(aID)
|
||||||
|
{
|
||||||
|
this.menuNode = getNode(aID);
|
||||||
|
|
||||||
|
this.eventSeq = [
|
||||||
|
new invokerChecker(EVENT_FOCUS, this.menuNode)
|
||||||
|
];
|
||||||
|
|
||||||
|
this.invoke = function openSubMenu_invoke()
|
||||||
|
{
|
||||||
|
this.menuNode.open = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.finalCheck = function openSubMenu_finalCheck()
|
||||||
|
{
|
||||||
|
testGroupAttrs("menu_item2.1", 1, 2, 1);
|
||||||
|
testGroupAttrs("menu_item2.2", 2, 2, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.getID = function openSubMenu_getID()
|
||||||
|
{
|
||||||
|
return "open submenu " + prettyName(aID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var gQueue = null;
|
||||||
function doTest()
|
function doTest()
|
||||||
{
|
{
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -25,30 +80,6 @@
|
||||||
testGroupAttrs("item1", 1, 2);
|
testGroupAttrs("item1", 1, 2);
|
||||||
testGroupAttrs("item2", 2, 2);
|
testGroupAttrs("item2", 2, 2);
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
|
||||||
// xul:menu (bug 443881)
|
|
||||||
var menu1 = document.getElementById("menu_item1");
|
|
||||||
menu1.open = true;
|
|
||||||
|
|
||||||
menu1.addEventListener("popupshown", function() {
|
|
||||||
var menu2 = document.getElementById("menu_item2");
|
|
||||||
menu2.open = true;
|
|
||||||
|
|
||||||
menu2.addEventListener("popupshown", function() {
|
|
||||||
testGroupAttrs("menu_item1.1", 1, 1);
|
|
||||||
testGroupAttrs("menu_item1.2", 1, 3);
|
|
||||||
testGroupAttrs("menu_item1.4", 2, 3);
|
|
||||||
testGroupAttrs("menu_item2", 3, 3);
|
|
||||||
testGroupAttrs("menu_item2.1", 1, 2, 1);
|
|
||||||
testGroupAttrs("menu_item2.2", 2, 2, 1);
|
|
||||||
|
|
||||||
menu1.open = false;
|
|
||||||
menu2.open = false;
|
|
||||||
|
|
||||||
SimpleTest.finish();
|
|
||||||
}, false);
|
|
||||||
}, false);
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
// xul:tab
|
// xul:tab
|
||||||
testGroupAttrs("tab1", 1, 2);
|
testGroupAttrs("tab1", 1, 2);
|
||||||
|
@ -65,6 +96,13 @@
|
||||||
testGroupAttrs("aria-menuitemcheckbox", 2, 3);
|
testGroupAttrs("aria-menuitemcheckbox", 2, 3);
|
||||||
testGroupAttrs("aria-menuitemradio", 3, 3);
|
testGroupAttrs("aria-menuitemradio", 3, 3);
|
||||||
testGroupAttrs("aria-menuitem2", 1, 1);
|
testGroupAttrs("aria-menuitem2", 1, 1);
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
// xul:menu (bug 443881)
|
||||||
|
gQueue = new eventQueue();
|
||||||
|
gQueue.push(new openMenu("menu_item1"));
|
||||||
|
gQueue.push(new openSubMenu("menu_item2"));
|
||||||
|
gQueue.invoke(); // SimpleTest.finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
SimpleTest.waitForExplicitFinish();
|
SimpleTest.waitForExplicitFinish();
|
||||||
|
@ -72,6 +110,7 @@
|
||||||
]]>
|
]]>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<hbox flex="1" style="overflow: auto;">
|
||||||
<body xmlns="http://www.w3.org/1999/xhtml">
|
<body xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<a target="_blank"
|
<a target="_blank"
|
||||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id=417317"
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=417317"
|
||||||
|
@ -96,6 +135,7 @@
|
||||||
</pre>
|
</pre>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
<vbox flex="1">
|
||||||
<listbox>
|
<listbox>
|
||||||
<listitem label="item1" id="item1"/>
|
<listitem label="item1" id="item1"/>
|
||||||
<listitem label="item2" id="item2"/>
|
<listitem label="item2" id="item2"/>
|
||||||
|
@ -148,5 +188,8 @@
|
||||||
<description role="menuitem" id="aria-menuitem2"
|
<description role="menuitem" id="aria-menuitem2"
|
||||||
value="conventional menuitem"/>
|
value="conventional menuitem"/>
|
||||||
</vbox>
|
</vbox>
|
||||||
|
|
||||||
|
</vbox>
|
||||||
|
</hbox>
|
||||||
</window>
|
</window>
|
||||||
|
|
||||||
|
|
|
@ -63,6 +63,7 @@ _TEST_FILES =\
|
||||||
test_groupbox.xul \
|
test_groupbox.xul \
|
||||||
test_iframe.html \
|
test_iframe.html \
|
||||||
test_img.html \
|
test_img.html \
|
||||||
|
test_invalidationlist.html \
|
||||||
test_list.html \
|
test_list.html \
|
||||||
test_media.html \
|
test_media.html \
|
||||||
test_select.html \
|
test_select.html \
|
||||||
|
|
|
@ -0,0 +1,59 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Test document hierarchy</title>
|
||||||
|
<link rel="stylesheet" type="text/css"
|
||||||
|
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
||||||
|
|
||||||
|
<script type="application/javascript"
|
||||||
|
src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
||||||
|
<script type="application/javascript"
|
||||||
|
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||||
|
|
||||||
|
<script type="application/javascript"
|
||||||
|
src="../common.js"></script>
|
||||||
|
<script type="application/javascript"
|
||||||
|
src="../role.js"></script>
|
||||||
|
<script type="application/javascript"
|
||||||
|
src="../states.js"></script>
|
||||||
|
|
||||||
|
<script type="application/javascript">
|
||||||
|
function doTest()
|
||||||
|
{
|
||||||
|
var tree =
|
||||||
|
{ SECTION: [
|
||||||
|
{ SECTION: [ // div
|
||||||
|
{ LABEL: [ ] } // link
|
||||||
|
] },
|
||||||
|
{ SECTION: [ // div table-cell referred by label
|
||||||
|
{ TEXT_LEAF: [ ] }, // 'Z'
|
||||||
|
{ TEXT_LEAF: [ ] } // ' '
|
||||||
|
] }
|
||||||
|
] };
|
||||||
|
testAccessibleTree("container", tree);
|
||||||
|
|
||||||
|
SimpleTest.finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
SimpleTest.waitForExplicitFinish();
|
||||||
|
addA11yLoadEvent(doTest);
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<a target="_blank"
|
||||||
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=673757"
|
||||||
|
title="Do not process invalidation list while tree is created">
|
||||||
|
Mozilla Bug 673757
|
||||||
|
</a>
|
||||||
|
<p id="display"></p>
|
||||||
|
<div id="content" style="display: none"></div>
|
||||||
|
<pre id="test">
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<div id="container">
|
||||||
|
<div><label for="x"></label></div>
|
||||||
|
<div style="display: table-cell;" id="x">Z<span> </span><span></span></div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -1,6 +1,10 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1306529826000">
|
<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1311096050000">
|
||||||
<emItems>
|
<emItems>
|
||||||
|
<emItem blockID="i41" id="{99079a25-328f-4bd4-be04-00955acaa0a7}">
|
||||||
|
<versionRange minVersion="0.1" maxVersion="4.3.0.00" severity="1">
|
||||||
|
</versionRange>
|
||||||
|
</emItem>
|
||||||
<emItem blockID="i8" id="{B13721C7-F507-4982-B2E5-502A71474FED}">
|
<emItem blockID="i8" id="{B13721C7-F507-4982-B2E5-502A71474FED}">
|
||||||
<versionRange minVersion=" " severity="1">
|
<versionRange minVersion=" " severity="1">
|
||||||
</versionRange>
|
</versionRange>
|
||||||
|
@ -25,6 +29,10 @@
|
||||||
<versionRange minVersion="1.0" maxVersion="1.0">
|
<versionRange minVersion="1.0" maxVersion="1.0">
|
||||||
</versionRange>
|
</versionRange>
|
||||||
</emItem>
|
</emItem>
|
||||||
|
<emItem blockID="i39" id="{c2d64ff7-0ab8-4263-89c9-ea3b0f8f050c}">
|
||||||
|
<versionRange minVersion="0.1" maxVersion="4.3.0.00" severity="1">
|
||||||
|
</versionRange>
|
||||||
|
</emItem>
|
||||||
<emItem blockID="i10" id="{8CE11043-9A15-4207-A565-0C94C42D590D}">
|
<emItem blockID="i10" id="{8CE11043-9A15-4207-A565-0C94C42D590D}">
|
||||||
</emItem>
|
</emItem>
|
||||||
<emItem blockID="i1" id="mozilla_cc@internetdownloadmanager.com">
|
<emItem blockID="i1" id="mozilla_cc@internetdownloadmanager.com">
|
||||||
|
@ -52,6 +60,10 @@
|
||||||
</targetApplication>
|
</targetApplication>
|
||||||
</versionRange>
|
</versionRange>
|
||||||
</emItem>
|
</emItem>
|
||||||
|
<emItem blockID="i40" id="{28387537-e3f9-4ed7-860c-11e69af4a8a0}">
|
||||||
|
<versionRange minVersion="0.1" maxVersion="4.3.0.00" severity="1">
|
||||||
|
</versionRange>
|
||||||
|
</emItem>
|
||||||
<emItem blockID="i23" id="firefox@bandoo.com">
|
<emItem blockID="i23" id="firefox@bandoo.com">
|
||||||
<versionRange minVersion="5.0" maxVersion="5.0" severity="1">
|
<versionRange minVersion="5.0" maxVersion="5.0" severity="1">
|
||||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||||
|
|
|
@ -6797,9 +6797,9 @@ var gPluginHandler = {
|
||||||
submitReport : function(pluginDumpID, browserDumpID) {
|
submitReport : function(pluginDumpID, browserDumpID) {
|
||||||
// The crash reporter wants a DOM element it can append an IFRAME to,
|
// The crash reporter wants a DOM element it can append an IFRAME to,
|
||||||
// which it uses to submit a form. Let's just give it gBrowser.
|
// which it uses to submit a form. Let's just give it gBrowser.
|
||||||
this.CrashSubmit.submit(pluginDumpID, gBrowser, null, null);
|
this.CrashSubmit.submit(pluginDumpID);
|
||||||
if (browserDumpID)
|
if (browserDumpID)
|
||||||
this.CrashSubmit.submit(browserDumpID, gBrowser, null, null);
|
this.CrashSubmit.submit(browserDumpID);
|
||||||
},
|
},
|
||||||
|
|
||||||
// Callback for user clicking a "reload page" link
|
// Callback for user clicking a "reload page" link
|
||||||
|
|
|
@ -882,6 +882,7 @@ var InspectorUI = {
|
||||||
{
|
{
|
||||||
this.attachPageListeners();
|
this.attachPageListeners();
|
||||||
this.inspecting = true;
|
this.inspecting = true;
|
||||||
|
this.highlighter.veilTransparentBox.removeAttribute("locked");
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -901,6 +902,7 @@ var InspectorUI = {
|
||||||
} else {
|
} else {
|
||||||
this.select(null, true, true);
|
this.select(null, true, true);
|
||||||
}
|
}
|
||||||
|
this.highlighter.veilTransparentBox.setAttribute("locked", true);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -330,6 +330,7 @@
|
||||||
</popupset>
|
</popupset>
|
||||||
|
|
||||||
<textbox id="scratchpad-textbox"
|
<textbox id="scratchpad-textbox"
|
||||||
|
class="monospace"
|
||||||
multiline="true"
|
multiline="true"
|
||||||
flex="1"
|
flex="1"
|
||||||
context="scratchpad-text-popup"
|
context="scratchpad-text-popup"
|
||||||
|
|
|
@ -1372,15 +1372,19 @@
|
||||||
// aReferrerURI is null or undefined if the tab is opened from
|
// aReferrerURI is null or undefined if the tab is opened from
|
||||||
// an external application or bookmark, i.e. somewhere other
|
// an external application or bookmark, i.e. somewhere other
|
||||||
// than the current tab.
|
// than the current tab.
|
||||||
if ((aRelatedToCurrent == null ? aReferrerURI : aRelatedToCurrent) &&
|
if (aRelatedToCurrent == null ? aReferrerURI : aRelatedToCurrent) {
|
||||||
Services.prefs.getBoolPref("browser.tabs.insertRelatedAfterCurrent")) {
|
|
||||||
let newTabPos = (this._lastRelatedTab ||
|
let newTabPos = (this._lastRelatedTab ||
|
||||||
this.selectedTab)._tPos + 1;
|
this.selectedTab)._tPos + 1;
|
||||||
|
|
||||||
if (this._lastRelatedTab)
|
if (this._lastRelatedTab)
|
||||||
this._lastRelatedTab.owner = null;
|
this._lastRelatedTab.owner = null;
|
||||||
else
|
else
|
||||||
t.owner = this.selectedTab;
|
t.owner = this.selectedTab;
|
||||||
this.moveTabTo(t, newTabPos);
|
|
||||||
|
if (!this.selectedTab.pinned &&
|
||||||
|
Services.prefs.getBoolPref("browser.tabs.insertRelatedAfterCurrent"))
|
||||||
|
this.moveTabTo(t, newTabPos);
|
||||||
|
|
||||||
this._lastRelatedTab = t;
|
this._lastRelatedTab = t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -124,15 +124,6 @@ function GroupItem(listOfEls, options) {
|
||||||
.css({zIndex: -100})
|
.css({zIndex: -100})
|
||||||
.appendTo("body");
|
.appendTo("body");
|
||||||
|
|
||||||
// ___ New Tab Button
|
|
||||||
this.$ntb = iQ("<div>")
|
|
||||||
.addClass('newTabButton')
|
|
||||||
.click(function() {
|
|
||||||
self.newTab();
|
|
||||||
})
|
|
||||||
.attr('title', tabviewString('groupItem.newTabButton'))
|
|
||||||
.appendTo($container);
|
|
||||||
|
|
||||||
// ___ Resizer
|
// ___ Resizer
|
||||||
this.$resizer = iQ("<div>")
|
this.$resizer = iQ("<div>")
|
||||||
.addClass('resizer')
|
.addClass('resizer')
|
||||||
|
@ -1660,9 +1651,45 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
|
||||||
// Helper routine for the constructor; adds various event handlers to the container.
|
// Helper routine for the constructor; adds various event handlers to the container.
|
||||||
_addHandlers: function GroupItem__addHandlers(container) {
|
_addHandlers: function GroupItem__addHandlers(container) {
|
||||||
let self = this;
|
let self = this;
|
||||||
|
let lastMouseDownTarget;
|
||||||
|
|
||||||
var dropIndex = false;
|
container.mousedown(function(e) {
|
||||||
var dropSpaceTimer = null;
|
let target = e.target;
|
||||||
|
// only set the last mouse down target if it is a left click, not on the
|
||||||
|
// close button, not on the new tab button, not on the title bar and its
|
||||||
|
// element
|
||||||
|
if (Utils.isLeftClick(e) &&
|
||||||
|
self.$closeButton[0] != target &&
|
||||||
|
self.$titlebar[0] != target &&
|
||||||
|
!self.$titlebar.contains(target) &&
|
||||||
|
!self.$appTabTray.contains(target)) {
|
||||||
|
lastMouseDownTarget = target;
|
||||||
|
} else {
|
||||||
|
lastMouseDownTarget = null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
container.mouseup(function(e) {
|
||||||
|
let same = (e.target == lastMouseDownTarget);
|
||||||
|
lastMouseDownTarget = null;
|
||||||
|
|
||||||
|
if (same && !self.isDragging) {
|
||||||
|
if (gBrowser.selectedTab.pinned &&
|
||||||
|
UI.getActiveTab() != self.getActiveTab() &&
|
||||||
|
self.getChildren().length > 0) {
|
||||||
|
UI.setActive(self, { dontSetActiveTabInGroup: true });
|
||||||
|
UI.goToTab(gBrowser.selectedTab);
|
||||||
|
} else {
|
||||||
|
let tabItem = self.getTopChild();
|
||||||
|
if (tabItem)
|
||||||
|
tabItem.zoomIn();
|
||||||
|
else
|
||||||
|
self.newTab();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
let dropIndex = false;
|
||||||
|
let dropSpaceTimer = null;
|
||||||
|
|
||||||
// When the _dropSpaceActive flag is turned on on a group, and a tab is
|
// When the _dropSpaceActive flag is turned on on a group, and a tab is
|
||||||
// dragged on top, a space will open up.
|
// dragged on top, a space will open up.
|
||||||
|
|
|
@ -35,6 +35,8 @@
|
||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const Cu = Components.utils;
|
const Cu = Components.utils;
|
||||||
Cu.import("resource://gre/modules/Services.jsm");
|
Cu.import("resource://gre/modules/Services.jsm");
|
||||||
|
|
||||||
|
@ -164,8 +166,8 @@ function tabEventListener(event) {
|
||||||
function observer(subject, topic, data) {
|
function observer(subject, topic, data) {
|
||||||
switch (topic) {
|
switch (topic) {
|
||||||
case "domwindowopened":
|
case "domwindowopened":
|
||||||
subject.addEventListener("load", function() {
|
subject.addEventListener("load", function onLoad() {
|
||||||
subject.removeEventListener("load", arguments.callee, false);
|
subject.removeEventListener("load", onLoad, false);
|
||||||
|
|
||||||
// Now that the window has loaded, only register on browser windows
|
// Now that the window has loaded, only register on browser windows
|
||||||
let doc = subject.document.documentElement;
|
let doc = subject.document.documentElement;
|
||||||
|
|
|
@ -45,6 +45,8 @@
|
||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
// **********
|
// **********
|
||||||
// Title: utils.js
|
// Title: utils.js
|
||||||
|
|
||||||
|
@ -369,10 +371,11 @@ Range.prototype = {
|
||||||
// little graph. It goes from near 0 at x=0 to near 1 at x=1
|
// little graph. It goes from near 0 at x=0 to near 1 at x=1
|
||||||
// smoothly and beautifully.
|
// smoothly and beautifully.
|
||||||
// http://www.wolframalpha.com/input/?i=.5+%2B+.5+*+tanh%28%284+*+x%29+-+2%29
|
// http://www.wolframalpha.com/input/?i=.5+%2B+.5+*+tanh%28%284+*+x%29+-+2%29
|
||||||
function tanh(x) {
|
let tanh = function tanh(x) {
|
||||||
var e = Math.exp(x);
|
var e = Math.exp(x);
|
||||||
return (e - 1/e) / (e + 1/e);
|
return (e - 1/e) / (e + 1/e);
|
||||||
}
|
};
|
||||||
|
|
||||||
return .5 - .5 * tanh(2 - 4 * proportion);
|
return .5 - .5 * tanh(2 - 4 * proportion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -585,8 +585,7 @@ function ensureSearchShown(activatedByKeypress) {
|
||||||
|
|
||||||
// NOTE: when this function is called by keydown handler, next keypress
|
// NOTE: when this function is called by keydown handler, next keypress
|
||||||
// event or composition events of IME will be fired on the focused editor.
|
// event or composition events of IME will be fired on the focused editor.
|
||||||
|
let dispatchTabViewSearchEnabledEvent = function dispatchTabViewSearchEnabledEvent() {
|
||||||
function dispatchTabViewSearchEnabledEvent() {
|
|
||||||
let newEvent = document.createEvent("Events");
|
let newEvent = document.createEvent("Events");
|
||||||
newEvent.initEvent("tabviewsearchenabled", false, false);
|
newEvent.initEvent("tabviewsearchenabled", false, false);
|
||||||
dispatchEvent(newEvent);
|
dispatchEvent(newEvent);
|
||||||
|
|
|
@ -482,6 +482,7 @@ TabItem.prototype = Utils.extend(new Item(), new Subscribable(), {
|
||||||
// closing tab doesn't belong to a group and no empty group, create a new
|
// closing tab doesn't belong to a group and no empty group, create a new
|
||||||
// one for the new tab.
|
// one for the new tab.
|
||||||
if (!groupClose && gBrowser.tabs.length == 1) {
|
if (!groupClose && gBrowser.tabs.length == 1) {
|
||||||
|
let group;
|
||||||
if (this.tab._tabViewTabItem.parent) {
|
if (this.tab._tabViewTabItem.parent) {
|
||||||
group = this.tab._tabViewTabItem.parent;
|
group = this.tab._tabViewTabItem.parent;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -144,11 +144,6 @@ body {
|
||||||
/* Other
|
/* Other
|
||||||
----------------------------------*/
|
----------------------------------*/
|
||||||
|
|
||||||
.newTabButton {
|
|
||||||
position: absolute !important;
|
|
||||||
z-index: 99999;
|
|
||||||
}
|
|
||||||
|
|
||||||
.titlebar {
|
.titlebar {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const Cc = Components.classes;
|
const Cc = Components.classes;
|
||||||
const Ci = Components.interfaces;
|
const Ci = Components.interfaces;
|
||||||
const Cu = Components.utils;
|
const Cu = Components.utils;
|
||||||
|
|
|
@ -105,8 +105,8 @@ let ThumbnailStorage = {
|
||||||
};
|
};
|
||||||
if (browser.contentDocument.readyState != "complete" ||
|
if (browser.contentDocument.readyState != "complete" ||
|
||||||
browser.webProgress.isLoadingDocument) {
|
browser.webProgress.isLoadingDocument) {
|
||||||
browser.addEventListener("load", function() {
|
browser.addEventListener("load", function onLoad() {
|
||||||
browser.removeEventListener("load", arguments.callee, true);
|
browser.removeEventListener("load", onLoad, true);
|
||||||
checkAndAddToList(browser);
|
checkAndAddToList(browser);
|
||||||
}, true);
|
}, true);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -861,8 +861,8 @@ let UI = {
|
||||||
if (this.restoredClosedTab) {
|
if (this.restoredClosedTab) {
|
||||||
// when the tab view UI is being displayed, update the thumb for the
|
// when the tab view UI is being displayed, update the thumb for the
|
||||||
// restored closed tab after the page load
|
// restored closed tab after the page load
|
||||||
tab.linkedBrowser.addEventListener("load", function (event) {
|
tab.linkedBrowser.addEventListener("load", function onLoad(event) {
|
||||||
tab.linkedBrowser.removeEventListener("load", arguments.callee, true);
|
tab.linkedBrowser.removeEventListener("load", onLoad, true);
|
||||||
TabItems._update(tab);
|
TabItems._update(tab);
|
||||||
}, true);
|
}, true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -260,6 +260,9 @@ _BROWSER_FILES = \
|
||||||
browser_addon_bar_shortcut.js \
|
browser_addon_bar_shortcut.js \
|
||||||
browser_addon_bar_aomlistener.js \
|
browser_addon_bar_aomlistener.js \
|
||||||
test_bug628179.html \
|
test_bug628179.html \
|
||||||
|
browser_wyciwyg_urlbarCopying.js \
|
||||||
|
test_wyciwyg_copying.html \
|
||||||
|
authenticate.sjs \
|
||||||
browser_minimize.js \
|
browser_minimize.js \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,205 @@
|
||||||
|
function handleRequest(request, response)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
reallyHandleRequest(request, response);
|
||||||
|
} catch (e) {
|
||||||
|
response.setStatusLine("1.0", 200, "AlmostOK");
|
||||||
|
response.write("Error handling request: " + e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function reallyHandleRequest(request, response) {
|
||||||
|
var match;
|
||||||
|
var requestAuth = true, requestProxyAuth = true;
|
||||||
|
|
||||||
|
// Allow the caller to drive how authentication is processed via the query.
|
||||||
|
// Eg, http://localhost:8888/authenticate.sjs?user=foo&realm=bar
|
||||||
|
var query = request.queryString;
|
||||||
|
|
||||||
|
var expected_user = "", expected_pass = "", realm = "mochitest";
|
||||||
|
var proxy_expected_user = "", proxy_expected_pass = "", proxy_realm = "mochi-proxy";
|
||||||
|
var huge = false, plugin = false;
|
||||||
|
var authHeaderCount = 1;
|
||||||
|
// user=xxx
|
||||||
|
match = /user=([^&]*)/.exec(query);
|
||||||
|
if (match)
|
||||||
|
expected_user = match[1];
|
||||||
|
|
||||||
|
// pass=xxx
|
||||||
|
match = /pass=([^&]*)/.exec(query);
|
||||||
|
if (match)
|
||||||
|
expected_pass = match[1];
|
||||||
|
|
||||||
|
// realm=xxx
|
||||||
|
match = /realm=([^&]*)/.exec(query);
|
||||||
|
if (match)
|
||||||
|
realm = match[1];
|
||||||
|
|
||||||
|
// proxy_user=xxx
|
||||||
|
match = /proxy_user=([^&]*)/.exec(query);
|
||||||
|
if (match)
|
||||||
|
proxy_expected_user = match[1];
|
||||||
|
|
||||||
|
// proxy_pass=xxx
|
||||||
|
match = /proxy_pass=([^&]*)/.exec(query);
|
||||||
|
if (match)
|
||||||
|
proxy_expected_pass = match[1];
|
||||||
|
|
||||||
|
// proxy_realm=xxx
|
||||||
|
match = /proxy_realm=([^&]*)/.exec(query);
|
||||||
|
if (match)
|
||||||
|
proxy_realm = match[1];
|
||||||
|
|
||||||
|
// huge=1
|
||||||
|
match = /huge=1/.exec(query);
|
||||||
|
if (match)
|
||||||
|
huge = true;
|
||||||
|
|
||||||
|
// plugin=1
|
||||||
|
match = /plugin=1/.exec(query);
|
||||||
|
if (match)
|
||||||
|
plugin = true;
|
||||||
|
|
||||||
|
// multiple=1
|
||||||
|
match = /multiple=([^&]*)/.exec(query);
|
||||||
|
if (match)
|
||||||
|
authHeaderCount = match[1]+0;
|
||||||
|
|
||||||
|
|
||||||
|
// Look for an authentication header, if any, in the request.
|
||||||
|
//
|
||||||
|
// EG: Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
|
||||||
|
//
|
||||||
|
// This test only supports Basic auth. The value sent by the client is
|
||||||
|
// "username:password", obscured with base64 encoding.
|
||||||
|
|
||||||
|
var actual_user = "", actual_pass = "", authHeader;
|
||||||
|
if (request.hasHeader("Authorization")) {
|
||||||
|
authHeader = request.getHeader("Authorization");
|
||||||
|
match = /Basic (.+)/.exec(authHeader);
|
||||||
|
if (match.length != 2)
|
||||||
|
throw "Couldn't parse auth header: " + authHeader;
|
||||||
|
|
||||||
|
var userpass = base64ToString(match[1]); // no atob() :-(
|
||||||
|
match = /(.*):(.*)/.exec(userpass);
|
||||||
|
if (match.length != 3)
|
||||||
|
throw "Couldn't decode auth header: " + userpass;
|
||||||
|
actual_user = match[1];
|
||||||
|
actual_pass = match[2];
|
||||||
|
}
|
||||||
|
|
||||||
|
var proxy_actual_user = "", proxy_actual_pass = "";
|
||||||
|
if (request.hasHeader("Proxy-Authorization")) {
|
||||||
|
authHeader = request.getHeader("Proxy-Authorization");
|
||||||
|
match = /Basic (.+)/.exec(authHeader);
|
||||||
|
if (match.length != 2)
|
||||||
|
throw "Couldn't parse auth header: " + authHeader;
|
||||||
|
|
||||||
|
var userpass = base64ToString(match[1]); // no atob() :-(
|
||||||
|
match = /(.*):(.*)/.exec(userpass);
|
||||||
|
if (match.length != 3)
|
||||||
|
throw "Couldn't decode auth header: " + userpass;
|
||||||
|
proxy_actual_user = match[1];
|
||||||
|
proxy_actual_pass = match[2];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Don't request authentication if the credentials we got were what we
|
||||||
|
// expected.
|
||||||
|
if (expected_user == actual_user &&
|
||||||
|
expected_pass == actual_pass) {
|
||||||
|
requestAuth = false;
|
||||||
|
}
|
||||||
|
if (proxy_expected_user == proxy_actual_user &&
|
||||||
|
proxy_expected_pass == proxy_actual_pass) {
|
||||||
|
requestProxyAuth = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (requestProxyAuth) {
|
||||||
|
response.setStatusLine("1.0", 407, "Proxy authentication required");
|
||||||
|
for (i = 0; i < authHeaderCount; ++i)
|
||||||
|
response.setHeader("Proxy-Authenticate", "basic realm=\"" + proxy_realm + "\"", true);
|
||||||
|
} else if (requestAuth) {
|
||||||
|
response.setStatusLine("1.0", 401, "Authentication required");
|
||||||
|
for (i = 0; i < authHeaderCount; ++i)
|
||||||
|
response.setHeader("WWW-Authenticate", "basic realm=\"" + realm + "\"", true);
|
||||||
|
} else {
|
||||||
|
response.setStatusLine("1.0", 200, "OK");
|
||||||
|
}
|
||||||
|
|
||||||
|
response.setHeader("Content-Type", "application/xhtml+xml", false);
|
||||||
|
response.write("<html xmlns='http://www.w3.org/1999/xhtml'>");
|
||||||
|
response.write("<p>Login: <span id='ok'>" + (requestAuth ? "FAIL" : "PASS") + "</span></p>\n");
|
||||||
|
response.write("<p>Proxy: <span id='proxy'>" + (requestProxyAuth ? "FAIL" : "PASS") + "</span></p>\n");
|
||||||
|
response.write("<p>Auth: <span id='auth'>" + authHeader + "</span></p>\n");
|
||||||
|
response.write("<p>User: <span id='user'>" + actual_user + "</span></p>\n");
|
||||||
|
response.write("<p>Pass: <span id='pass'>" + actual_pass + "</span></p>\n");
|
||||||
|
|
||||||
|
if (huge) {
|
||||||
|
response.write("<div style='display: none'>");
|
||||||
|
for (i = 0; i < 100000; i++) {
|
||||||
|
response.write("123456789\n");
|
||||||
|
}
|
||||||
|
response.write("</div>");
|
||||||
|
response.write("<span id='footnote'>This is a footnote after the huge content fill</span>");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (plugin) {
|
||||||
|
response.write("<embed id='embedtest' style='width: 400px; height: 100px;' " +
|
||||||
|
"type='application/x-test'></embed>\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
response.write("</html>");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// base64 decoder
|
||||||
|
//
|
||||||
|
// Yoinked from extensions/xml-rpc/src/nsXmlRpcClient.js because btoa()
|
||||||
|
// doesn't seem to exist. :-(
|
||||||
|
/* Convert Base64 data to a string */
|
||||||
|
const toBinaryTable = [
|
||||||
|
-1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
|
||||||
|
-1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
|
||||||
|
-1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,62, -1,-1,-1,63,
|
||||||
|
52,53,54,55, 56,57,58,59, 60,61,-1,-1, -1, 0,-1,-1,
|
||||||
|
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,
|
||||||
|
15,16,17,18, 19,20,21,22, 23,24,25,-1, -1,-1,-1,-1,
|
||||||
|
-1,26,27,28, 29,30,31,32, 33,34,35,36, 37,38,39,40,
|
||||||
|
41,42,43,44, 45,46,47,48, 49,50,51,-1, -1,-1,-1,-1
|
||||||
|
];
|
||||||
|
const base64Pad = '=';
|
||||||
|
|
||||||
|
function base64ToString(data) {
|
||||||
|
|
||||||
|
var result = '';
|
||||||
|
var leftbits = 0; // number of bits decoded, but yet to be appended
|
||||||
|
var leftdata = 0; // bits decoded, but yet to be appended
|
||||||
|
|
||||||
|
// Convert one by one.
|
||||||
|
for (var i = 0; i < data.length; i++) {
|
||||||
|
var c = toBinaryTable[data.charCodeAt(i) & 0x7f];
|
||||||
|
var padding = (data[i] == base64Pad);
|
||||||
|
// Skip illegal characters and whitespace
|
||||||
|
if (c == -1) continue;
|
||||||
|
|
||||||
|
// Collect data into leftdata, update bitcount
|
||||||
|
leftdata = (leftdata << 6) | c;
|
||||||
|
leftbits += 6;
|
||||||
|
|
||||||
|
// If we have 8 or more bits, append 8 bits to the result
|
||||||
|
if (leftbits >= 8) {
|
||||||
|
leftbits -= 8;
|
||||||
|
// Append if not padding.
|
||||||
|
if (!padding)
|
||||||
|
result += String.fromCharCode((leftdata >> leftbits) & 0xff);
|
||||||
|
leftdata &= (1 << leftbits) - 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// If there are any bits left, the base64 string was corrupted
|
||||||
|
if (leftbits)
|
||||||
|
throw Components.Exception('Corrupted base64 string');
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
|
@ -46,6 +46,10 @@ function testURL(url, loadFunc, endFunc) {
|
||||||
loadFunc(url);
|
loadFunc(url);
|
||||||
|
|
||||||
addPageShowListener(function () {
|
addPageShowListener(function () {
|
||||||
|
let fm = Cc["@mozilla.org/focus-manager;1"].getService(Ci.nsIFocusManager);
|
||||||
|
is(fm.focusedElement, null, "should be no focused element");
|
||||||
|
is(fm.focusedWindow, gBrowser.contentWindow, "content window should be focused");
|
||||||
|
|
||||||
ok(!gBrowser.contentPrincipal.equals(pagePrincipal),
|
ok(!gBrowser.contentPrincipal.equals(pagePrincipal),
|
||||||
"load of " + url + " by " + loadFunc.name + " should produce a page with a different principal");
|
"load of " + url + " by " + loadFunc.name + " should produce a page with a different principal");
|
||||||
endFunc();
|
endFunc();
|
||||||
|
|
|
@ -78,5 +78,14 @@ function test() {
|
||||||
testPosition(7, 8, "blank tab without referrer opens at the end");
|
testPosition(7, 8, "blank tab without referrer opens at the end");
|
||||||
testPosition(8, 9, "tab without referrer opens at the end");
|
testPosition(8, 9, "tab without referrer opens at the end");
|
||||||
|
|
||||||
|
gBrowser.selectedTab = tabs[0];
|
||||||
|
gBrowser.pinTab(gBrowser.selectedTab);
|
||||||
|
addTab("http://mochi.test:8888/#8", gBrowser.currentURI);
|
||||||
|
testPosition(9, 10, "tab with referrer should open at the end when the selected tab is pinned");
|
||||||
|
gBrowser.selectedTab = tabs[9];
|
||||||
|
gBrowser.removeTab(tabs.pop());
|
||||||
|
is(gBrowser.selectedTab, tabs[0],
|
||||||
|
"opening a tab from a pinned tab, selecting it and closing it should go back to the pinned tab");
|
||||||
|
|
||||||
tabs.forEach(gBrowser.removeTab, gBrowser);
|
tabs.forEach(gBrowser.removeTab, gBrowser);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,18 +2,21 @@
|
||||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||||
|
|
||||||
const trimPref = "browser.urlbar.trimURLs";
|
const trimPref = "browser.urlbar.trimURLs";
|
||||||
|
const phishyUserPassPref = "network.http.phishy-userpass-length";
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
|
|
||||||
gBrowser.selectedTab = gBrowser.addTab();
|
let tab = gBrowser.selectedTab = gBrowser.addTab();
|
||||||
|
|
||||||
registerCleanupFunction(function () {
|
registerCleanupFunction(function () {
|
||||||
gBrowser.removeCurrentTab();
|
gBrowser.removeTab(tab);
|
||||||
Services.prefs.clearUserPref(trimPref);
|
Services.prefs.clearUserPref(trimPref);
|
||||||
|
Services.prefs.clearUserPref(phishyUserPassPref);
|
||||||
URLBarSetURI();
|
URLBarSetURI();
|
||||||
});
|
});
|
||||||
|
|
||||||
Services.prefs.setBoolPref(trimPref, true);
|
Services.prefs.setBoolPref(trimPref, true);
|
||||||
|
Services.prefs.setIntPref(phishyUserPassPref, 32); // avoid prompting about phishing
|
||||||
|
|
||||||
waitForExplicitFinish();
|
waitForExplicitFinish();
|
||||||
|
|
||||||
|
@ -32,7 +35,6 @@ var tests = [
|
||||||
copyExpected: "e"
|
copyExpected: "e"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
// pageproxystate="valid" from this point on (due to the load)
|
// pageproxystate="valid" from this point on (due to the load)
|
||||||
{
|
{
|
||||||
loadURL: "http://example.com/",
|
loadURL: "http://example.com/",
|
||||||
|
@ -52,6 +54,13 @@ var tests = [
|
||||||
copyExpected: "http://e"
|
copyExpected: "http://e"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Test that userPass is stripped out
|
||||||
|
{
|
||||||
|
loadURL: "http://user:pass@mochi.test:8888/browser/browser/base/content/test/authenticate.sjs?user=user&pass=pass",
|
||||||
|
expectedURL: "mochi.test:8888/browser/browser/base/content/test/authenticate.sjs?user=user&pass=pass",
|
||||||
|
copyExpected: "http://mochi.test:8888/browser/browser/base/content/test/authenticate.sjs?user=user&pass=pass"
|
||||||
|
},
|
||||||
|
|
||||||
// Test escaping
|
// Test escaping
|
||||||
{
|
{
|
||||||
loadURL: "http://example.com/()%C3%A9",
|
loadURL: "http://example.com/()%C3%A9",
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
/* Any copyright is dedicated to the Public Domain.
|
||||||
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||||
|
|
||||||
|
function test() {
|
||||||
|
waitForExplicitFinish();
|
||||||
|
|
||||||
|
let url = "http://mochi.test:8888/browser/browser/base/content/test/test_wyciwyg_copying.html";
|
||||||
|
let tab = gBrowser.selectedTab = gBrowser.addTab(url);
|
||||||
|
tab.linkedBrowser.addEventListener("pageshow", function () {
|
||||||
|
let btn = content.document.getElementById("btn");
|
||||||
|
executeSoon(function () {
|
||||||
|
EventUtils.synthesizeMouseAtCenter(btn, {}, content);
|
||||||
|
let currentURL = gBrowser.currentURI.spec;
|
||||||
|
ok(/^wyciwyg:\/\//i.test(currentURL), currentURL + " is a wyciwyg URI");
|
||||||
|
|
||||||
|
executeSoon(function () {
|
||||||
|
testURLBarCopy(url, endTest);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}, false);
|
||||||
|
|
||||||
|
function endTest() {
|
||||||
|
while (gBrowser.tabs.length > 1)
|
||||||
|
gBrowser.removeCurrentTab();
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
function testURLBarCopy(targetValue, cb) {
|
||||||
|
info("Expecting copy of: " + targetValue);
|
||||||
|
waitForClipboard(targetValue, function () {
|
||||||
|
gURLBar.focus();
|
||||||
|
gURLBar.select();
|
||||||
|
|
||||||
|
goDoCommand("cmd_copy");
|
||||||
|
}, cb, cb);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -150,6 +150,7 @@ _BROWSER_FILES = \
|
||||||
browser_tabview_bug663421.js \
|
browser_tabview_bug663421.js \
|
||||||
browser_tabview_bug665502.js \
|
browser_tabview_bug665502.js \
|
||||||
browser_tabview_bug669694.js \
|
browser_tabview_bug669694.js \
|
||||||
|
browser_tabview_click_group.js \
|
||||||
browser_tabview_dragdrop.js \
|
browser_tabview_dragdrop.js \
|
||||||
browser_tabview_exit_button.js \
|
browser_tabview_exit_button.js \
|
||||||
browser_tabview_expander.js \
|
browser_tabview_expander.js \
|
||||||
|
@ -167,7 +168,6 @@ _BROWSER_FILES = \
|
||||||
head.js \
|
head.js \
|
||||||
search1.html \
|
search1.html \
|
||||||
search2.html \
|
search2.html \
|
||||||
test_bug599626.html \
|
|
||||||
test_bug600645.html \
|
test_bug600645.html \
|
||||||
test_bug644097.html \
|
test_bug644097.html \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
|
@ -1,53 +1,37 @@
|
||||||
/* Any copyright is dedicated to the Public Domain.
|
/* Any copyright is dedicated to the Public Domain.
|
||||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||||
|
|
||||||
|
let contentWindow;
|
||||||
|
let groupItemTwoId;
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
waitForExplicitFinish();
|
waitForExplicitFinish();
|
||||||
|
|
||||||
window.addEventListener("tabviewshown", setup, false);
|
registerCleanupFunction(function() {
|
||||||
TabView.toggle();
|
while (gBrowser.tabs[1])
|
||||||
|
gBrowser.removeTab(gBrowser.tabs[1]);
|
||||||
|
hideTabView(function() {});
|
||||||
|
});
|
||||||
|
gBrowser.loadOneTab("about:blank", { inBackground: true });
|
||||||
|
showTabView(setup);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setup() {
|
function setup() {
|
||||||
window.removeEventListener("tabviewshown", setup, false);
|
registerCleanupFunction(function() {
|
||||||
|
let groupItem = contentWindow.GroupItems.groupItem(groupItemTwoId);
|
||||||
|
if (groupItem)
|
||||||
|
closeGroupItem(groupItem, function() {});
|
||||||
|
});
|
||||||
|
|
||||||
let contentWindow = document.getElementById("tab-view").contentWindow;
|
let contentWindow = TabView.getContentWindow();
|
||||||
is(contentWindow.GroupItems.groupItems.length, 1, "Has only one group");
|
is(contentWindow.GroupItems.groupItems.length, 1, "Has only one group");
|
||||||
|
|
||||||
let groupItemOne = contentWindow.GroupItems.groupItems[0];
|
let groupItemOne = contentWindow.GroupItems.groupItems[0];
|
||||||
// add a blank tab to group one.
|
is(groupItemOne.getChildren().length, 2, "Group one has 2 tab items");
|
||||||
createNewTabItemInGroupItem(groupItemOne, contentWindow, function() {
|
|
||||||
is(groupItemOne.getChildren().length, 2, "Group one has 2 tab items");
|
|
||||||
|
|
||||||
// create group two with a blank tab.
|
let groupItemTwo = createGroupItemWithBlankTabs(window, 250, 250, 40, 1);
|
||||||
let groupItemTwo = createEmptyGroupItem(contentWindow, 250, 250, 40);
|
groupItemTwoId = groupItemTwo.id;
|
||||||
createNewTabItemInGroupItem(groupItemTwo, contentWindow, function() {
|
testGroups(groupItemOne, groupItemTwo, contentWindow);
|
||||||
// start the first test.
|
|
||||||
testGroups(groupItemOne, groupItemTwo, contentWindow);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function createNewTabItemInGroupItem(groupItem, contentWindow, callback) {
|
|
||||||
// click on the + button to create a blank tab in group item
|
|
||||||
let newTabButton = groupItem.container.getElementsByClassName("newTabButton");
|
|
||||||
ok(newTabButton[0], "New tab button exists");
|
|
||||||
|
|
||||||
let onTabViewHidden = function() {
|
|
||||||
window.removeEventListener("tabviewhidden", onTabViewHidden, false);
|
|
||||||
|
|
||||||
ok(!TabView.isVisible(), "Tab View is hidden because we just opened a tab");
|
|
||||||
TabView.toggle();
|
|
||||||
};
|
|
||||||
let onTabViewShown = function() {
|
|
||||||
window.removeEventListener("tabviewshown", onTabViewShown, false);
|
|
||||||
|
|
||||||
ok(TabView.isVisible(), "Tab View is visible");
|
|
||||||
callback();
|
|
||||||
};
|
|
||||||
window.addEventListener("tabviewhidden", onTabViewHidden, false);
|
|
||||||
window.addEventListener("tabviewshown", onTabViewShown, false);
|
|
||||||
EventUtils.sendMouseEvent({ type: "click" }, newTabButton[0], contentWindow);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function testGroups(groupItemOne, groupItemTwo, contentWindow) {
|
function testGroups(groupItemOne, groupItemTwo, contentWindow) {
|
||||||
|
@ -70,15 +54,12 @@ function testGroups(groupItemOne, groupItemTwo, contentWindow) {
|
||||||
is(contentWindow.UI.getActiveTab(), groupItemOne.getChild(0),
|
is(contentWindow.UI.getActiveTab(), groupItemOne.getChild(0),
|
||||||
"The first tab item in group one is active");
|
"The first tab item in group one is active");
|
||||||
|
|
||||||
let onTabViewHidden = function() {
|
whenTabViewIsHidden(function() {
|
||||||
window.removeEventListener("tabviewhidden", onTabViewHidden, false);
|
|
||||||
is(groupItemOne.getChildren().length, 2,
|
is(groupItemOne.getChildren().length, 2,
|
||||||
"The num of childen in group one is 2");
|
"The num of childen in group one is 2");
|
||||||
|
|
||||||
// clean up and finish
|
// clean up and finish
|
||||||
groupItemTwo.addSubscriber("close", function onClose() {
|
closeGroupItem(groupItemTwo, function() {
|
||||||
groupItemTwo.removeSubscriber("close", onClose);
|
|
||||||
|
|
||||||
gBrowser.removeTab(groupItemOne.getChild(1).tab);
|
gBrowser.removeTab(groupItemOne.getChild(1).tab);
|
||||||
is(contentWindow.GroupItems.groupItems.length, 1, "Has only one group");
|
is(contentWindow.GroupItems.groupItems.length, 1, "Has only one group");
|
||||||
is(groupItemOne.getChildren().length, 1,
|
is(groupItemOne.getChildren().length, 1,
|
||||||
|
@ -87,10 +68,7 @@ function testGroups(groupItemOne, groupItemTwo, contentWindow) {
|
||||||
|
|
||||||
finish();
|
finish();
|
||||||
});
|
});
|
||||||
gBrowser.removeTab(groupItemTwo.getChild(0).tab);
|
});
|
||||||
groupItemTwo.close();
|
|
||||||
}
|
|
||||||
window.addEventListener("tabviewhidden", onTabViewHidden, false);
|
|
||||||
EventUtils.synthesizeKey("t", { accelKey: true });
|
EventUtils.synthesizeKey("t", { accelKey: true });
|
||||||
});
|
});
|
||||||
// close a tab item in group one
|
// close a tab item in group one
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
let originalTab;
|
let originalTab;
|
||||||
let newTabOne;
|
let newTabOne;
|
||||||
|
let groupItemTwoId;
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
waitForExplicitFinish();
|
waitForExplicitFinish();
|
||||||
|
@ -11,10 +12,20 @@ function test() {
|
||||||
// add a tab to the existing group.
|
// add a tab to the existing group.
|
||||||
newTabOne = gBrowser.addTab();
|
newTabOne = gBrowser.addTab();
|
||||||
|
|
||||||
let onTabviewShown = function() {
|
registerCleanupFunction(function() {
|
||||||
window.removeEventListener("tabviewshown", onTabviewShown, false);
|
while (gBrowser.tabs[1])
|
||||||
|
gBrowser.removeTab(gBrowser.tabs[1]);
|
||||||
|
hideTabView(function() {});
|
||||||
|
});
|
||||||
|
|
||||||
let contentWindow = document.getElementById("tab-view").contentWindow;
|
showTabView(function() {
|
||||||
|
let contentWindow = TabView.getContentWindow();
|
||||||
|
|
||||||
|
registerCleanupFunction(function() {
|
||||||
|
let groupItem = contentWindow.GroupItems.groupItem(groupItemTwoId);
|
||||||
|
if (groupItem)
|
||||||
|
closeGroupItem(groupItem, function() {});
|
||||||
|
});
|
||||||
|
|
||||||
is(contentWindow.GroupItems.groupItems.length, 1,
|
is(contentWindow.GroupItems.groupItems.length, 1,
|
||||||
"There is one group item on startup");
|
"There is one group item on startup");
|
||||||
|
@ -25,22 +36,13 @@ function test() {
|
||||||
"The currently selected tab should be the first tab in the groupItemOne");
|
"The currently selected tab should be the first tab in the groupItemOne");
|
||||||
|
|
||||||
// create another group with a tab.
|
// create another group with a tab.
|
||||||
let groupItemTwo = createEmptyGroupItem(contentWindow, 300, 300, 200);
|
let groupItemTwo = createGroupItemWithBlankTabs(window, 300, 300, 200, 1);
|
||||||
|
groupItemTwoId = groupItemTwoId;
|
||||||
let onTabViewHidden = function() {
|
hideTabView(function() {
|
||||||
window.removeEventListener("tabviewhidden", onTabViewHidden, false);
|
|
||||||
// start the test
|
// start the test
|
||||||
testGroupSwitch(contentWindow, groupItemOne, groupItemTwo);
|
testGroupSwitch(contentWindow, groupItemOne, groupItemTwo);
|
||||||
};
|
});
|
||||||
window.addEventListener("tabviewhidden", onTabViewHidden, false);
|
});
|
||||||
|
|
||||||
// click on the + button
|
|
||||||
let newTabButton = groupItemTwo.container.getElementsByClassName("newTabButton");
|
|
||||||
ok(newTabButton[0], "New tab button exists");
|
|
||||||
EventUtils.sendMouseEvent({ type: "click" }, newTabButton[0], contentWindow);
|
|
||||||
};
|
|
||||||
window.addEventListener("tabviewshown", onTabviewShown, false);
|
|
||||||
TabView.toggle();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function testGroupSwitch(contentWindow, groupItemOne, groupItemTwo) {
|
function testGroupSwitch(contentWindow, groupItemOne, groupItemTwo) {
|
||||||
|
|
|
@ -23,75 +23,49 @@ function test() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function testOne() {
|
function testOne() {
|
||||||
whenSearchEnabledAndDisabled(testTwo);
|
hideSearchWhenSearchEnabled(testTwo);
|
||||||
// press cmd/ctrl F
|
// press cmd/ctrl F
|
||||||
EventUtils.synthesizeKey("f", {accelKey: true}, cw);
|
EventUtils.synthesizeKey("f", {accelKey: true}, cw);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testTwo() {
|
function testTwo() {
|
||||||
whenSearchEnabledAndDisabled(testThree);
|
hideSearchWhenSearchEnabled(testThree);
|
||||||
// press /
|
// press /
|
||||||
EventUtils.synthesizeKey("VK_SLASH", {}, cw);
|
EventUtils.synthesizeKey("VK_SLASH", {}, cw);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testThree() {
|
function testThree() {
|
||||||
let onTabViewShown = function () {
|
ok(win.TabView.isVisible(), "Tab View is visible");
|
||||||
is(cw.UI.getActiveTab(), groupItem.getChild(0),
|
// create another group with a tab.
|
||||||
"The active tab is newly created tab item");
|
let groupItem = createGroupItemWithBlankTabs(win, 300, 300, 200, 1);
|
||||||
|
is(cw.UI.getActiveTab(), groupItem.getChild(0),
|
||||||
|
"The active tab is newly created tab item");
|
||||||
|
|
||||||
let onSearchEnabled = function () {
|
whenSearchIsEnabled(function () {
|
||||||
let doc = cw.document;
|
let doc = cw.document;
|
||||||
let searchBox = cw.iQ("#searchbox");
|
let searchBox = cw.iQ("#searchbox");
|
||||||
let hasFocus = doc.hasFocus() && doc.activeElement == searchBox[0];
|
let hasFocus = doc.hasFocus() && doc.activeElement == searchBox[0];
|
||||||
ok(hasFocus, "The search box has focus");
|
ok(hasFocus, "The search box has focus");
|
||||||
|
|
||||||
let tab = win.gBrowser.tabs[1];
|
let tab = win.gBrowser.tabs[1];
|
||||||
searchBox.val(tab._tabViewTabItem.$tabTitle[0].innerHTML);
|
searchBox.val(tab._tabViewTabItem.$tabTitle[0].innerHTML);
|
||||||
|
|
||||||
cw.performSearch();
|
cw.performSearch();
|
||||||
|
|
||||||
whenTabViewIsHidden(function () {
|
whenTabViewIsHidden(function () {
|
||||||
is(tab, win.gBrowser.selectedTab, "The search result tab is shown");
|
is(tab, win.gBrowser.selectedTab, "The search result tab is shown");
|
||||||
waitForFocus(finish);
|
finish()
|
||||||
}, win);
|
}, win);
|
||||||
|
|
||||||
// use the tabview menu (the same as pressing cmd/ctrl + e)
|
// use the tabview menu (the same as pressing cmd/ctrl + e)
|
||||||
win.document.getElementById("menu_tabview").doCommand();
|
win.document.getElementById("menu_tabview").doCommand();
|
||||||
};
|
|
||||||
|
|
||||||
whenSearchEnabled(onSearchEnabled);
|
|
||||||
EventUtils.synthesizeKey("VK_SLASH", {}, cw);
|
|
||||||
};
|
|
||||||
|
|
||||||
whenTabViewIsHidden(function () {
|
|
||||||
showTabView(onTabViewShown, win);
|
|
||||||
}, win);
|
}, win);
|
||||||
|
EventUtils.synthesizeKey("VK_SLASH", {}, cw);
|
||||||
// click on the + button
|
|
||||||
let groupItem = createEmptyGroupItem(cw, 300, 300, 200);
|
|
||||||
let newTabButton = groupItem.container.getElementsByClassName("newTabButton");
|
|
||||||
ok(newTabButton[0], "New tab button exists");
|
|
||||||
|
|
||||||
EventUtils.sendMouseEvent({type: "click"}, newTabButton[0], cw);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function whenSearchEnabledAndDisabled(callback) {
|
function hideSearchWhenSearchEnabled(callback) {
|
||||||
whenSearchEnabled(function () {
|
whenSearchIsEnabled(function() {
|
||||||
whenSearchDisabled(callback);
|
hideSearch(callback, win);
|
||||||
cw.hideSearch();
|
}, win);
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function whenSearchEnabled(callback) {
|
|
||||||
cw.addEventListener("tabviewsearchenabled", function onSearchEnabled() {
|
|
||||||
cw.removeEventListener("tabviewsearchenabled", onSearchEnabled, false);
|
|
||||||
callback();
|
|
||||||
}, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
function whenSearchDisabled(callback) {
|
|
||||||
cw.addEventListener("tabviewsearchdisabled", function onSearchDisabled() {
|
|
||||||
cw.removeEventListener("tabviewsearchdisabled", onSearchDisabled, false);
|
|
||||||
callback();
|
|
||||||
}, false);
|
|
||||||
}
|
|
||||||
|
|
|
@ -71,12 +71,12 @@ function part2(win) {
|
||||||
// switch the selected tab to new tab
|
// switch the selected tab to new tab
|
||||||
win.gBrowser.selectedTab = newTab;
|
win.gBrowser.selectedTab = newTab;
|
||||||
|
|
||||||
win.addEventListener("tabviewhidden", function () {
|
whenTabViewIsHidden(function () {
|
||||||
win.removeEventListener("tabviewhidden", arguments.callee, false);
|
|
||||||
is(win.gBrowser.selectedTab, newTab, "The seleted tab should be the same as before (new tab)");
|
is(win.gBrowser.selectedTab, newTab, "The seleted tab should be the same as before (new tab)");
|
||||||
win.close();
|
win.close();
|
||||||
finish();
|
finish();
|
||||||
}, false);
|
});
|
||||||
|
|
||||||
// show tabview
|
// show tabview
|
||||||
EventUtils.synthesizeKey("e", { accelKey: true, shiftKey: true }, win);
|
EventUtils.synthesizeKey("e", { accelKey: true, shiftKey: true }, win);
|
||||||
// hide tabview
|
// hide tabview
|
||||||
|
|
|
@ -9,8 +9,8 @@ function test() {
|
||||||
|
|
||||||
// open a new window and setup the window state.
|
// open a new window and setup the window state.
|
||||||
newWin = openDialog(getBrowserURL(), "_blank", "chrome,all,dialog=no");
|
newWin = openDialog(getBrowserURL(), "_blank", "chrome,all,dialog=no");
|
||||||
newWin.addEventListener("load", function(event) {
|
newWin.addEventListener("load", function onLoad(event) {
|
||||||
this.removeEventListener("load", arguments.callee, false);
|
this.removeEventListener("load", onLoad, false);
|
||||||
|
|
||||||
let newState = {
|
let newState = {
|
||||||
windows: [{
|
windows: [{
|
||||||
|
|
|
@ -1,41 +1,26 @@
|
||||||
/* Any copyright is dedicated to the Public Domain.
|
/* Any copyright is dedicated to the Public Domain.
|
||||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||||
|
|
||||||
let handleDialog;
|
const TEST_URL = 'data:text/html,<script>window.onbeforeunload=' +
|
||||||
let timer; // keep in outer scope so it's not GC'd before firing
|
'function(e){e.returnValue="?"}</script>';
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
waitForExplicitFinish();
|
waitForExplicitFinish();
|
||||||
|
showTabView(onTabViewShown);
|
||||||
window.addEventListener("tabviewshown", onTabViewWindowLoaded, false);
|
|
||||||
TabView.toggle();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onTabViewWindowLoaded() {
|
function onTabViewShown() {
|
||||||
window.removeEventListener("tabviewshown", onTabViewWindowLoaded, false);
|
let contentWindow = TabView.getContentWindow();
|
||||||
|
|
||||||
let contentWindow = document.getElementById("tab-view").contentWindow;
|
|
||||||
let groupItemOne = contentWindow.GroupItems.getActiveGroupItem();
|
let groupItemOne = contentWindow.GroupItems.getActiveGroupItem();
|
||||||
|
let groupItemTwo = createGroupItemWithTabs(window, 300, 300, 10, [TEST_URL]);
|
||||||
|
|
||||||
// Create a group and make it active
|
afterAllTabsLoaded(function () {
|
||||||
let box = new contentWindow.Rect(10, 10, 300, 300);
|
|
||||||
let groupItemTwo = new contentWindow.GroupItem([], { bounds: box });
|
|
||||||
contentWindow.UI.setActive(groupItemTwo);
|
|
||||||
|
|
||||||
let testTab =
|
|
||||||
gBrowser.addTab(
|
|
||||||
"http://mochi.test:8888/browser/browser/base/content/test/tabview/test_bug599626.html");
|
|
||||||
let browser = gBrowser.getBrowserForTab(testTab);
|
|
||||||
let onLoad = function() {
|
|
||||||
browser.removeEventListener("load", onLoad, true);
|
|
||||||
|
|
||||||
testStayOnPage(contentWindow, groupItemOne, groupItemTwo);
|
testStayOnPage(contentWindow, groupItemOne, groupItemTwo);
|
||||||
}
|
});
|
||||||
browser.addEventListener("load", onLoad, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function testStayOnPage(contentWindow, groupItemOne, groupItemTwo) {
|
function testStayOnPage(contentWindow, groupItemOne, groupItemTwo) {
|
||||||
setupAndRun(contentWindow, groupItemOne, groupItemTwo, function(doc) {
|
whenDialogOpened(function (dialog) {
|
||||||
groupItemTwo.addSubscriber("groupShown", function onShown() {
|
groupItemTwo.addSubscriber("groupShown", function onShown() {
|
||||||
groupItemTwo.removeSubscriber("groupShown", onShown);
|
groupItemTwo.removeSubscriber("groupShown", onShown);
|
||||||
|
|
||||||
|
@ -44,22 +29,21 @@ function testStayOnPage(contentWindow, groupItemOne, groupItemTwo) {
|
||||||
is(contentWindow.TabItems.getItems().length, 2,
|
is(contentWindow.TabItems.getItems().length, 2,
|
||||||
"The total number of tab items is 2 when staying on the page");
|
"The total number of tab items is 2 when staying on the page");
|
||||||
|
|
||||||
let onTabViewShown = function() {
|
showTabView(function () {
|
||||||
window.removeEventListener("tabviewshown", onTabViewShown, false);
|
|
||||||
|
|
||||||
// start the next test
|
// start the next test
|
||||||
testLeavePage(contentWindow, groupItemOne, groupItemTwo);
|
testLeavePage(contentWindow, groupItemOne, groupItemTwo);
|
||||||
};
|
});
|
||||||
window.addEventListener("tabviewshown", onTabViewShown, false);
|
|
||||||
TabView.toggle();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// stay on page
|
// stay on page
|
||||||
doc.documentElement.getButton("cancel").click();
|
dialog.cancelDialog();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
closeGroupItem(groupItemTwo);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testLeavePage(contentWindow, groupItemOne, groupItemTwo) {
|
function testLeavePage(contentWindow, groupItemOne, groupItemTwo) {
|
||||||
setupAndRun(contentWindow, groupItemOne, groupItemTwo, function(doc) {
|
whenDialogOpened(function (dialog) {
|
||||||
// clean up and finish the test
|
// clean up and finish the test
|
||||||
groupItemTwo.addSubscriber("close", function onClose() {
|
groupItemTwo.addSubscriber("close", function onClose() {
|
||||||
groupItemTwo.removeSubscriber("close", onClose);
|
groupItemTwo.removeSubscriber("close", onClose);
|
||||||
|
@ -69,93 +53,35 @@ function testLeavePage(contentWindow, groupItemOne, groupItemTwo) {
|
||||||
is(contentWindow.TabItems.getItems().length, 1,
|
is(contentWindow.TabItems.getItems().length, 1,
|
||||||
"The total number of tab items is 1 after leaving the page");
|
"The total number of tab items is 1 after leaving the page");
|
||||||
|
|
||||||
let endGame = function() {
|
hideTabView(finish);
|
||||||
window.removeEventListener("tabviewhidden", endGame, false);
|
|
||||||
finish();
|
|
||||||
};
|
|
||||||
window.addEventListener("tabviewhidden", endGame, false);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Leave page
|
// Leave page
|
||||||
doc.documentElement.getButton("accept").click();
|
dialog.acceptDialog();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
closeGroupItem(groupItemTwo);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setupAndRun(contentWindow, groupItemOne, groupItemTwo, callback) {
|
// ----------
|
||||||
let closeButton = groupItemTwo.container.getElementsByClassName("close");
|
function whenDialogOpened(callback) {
|
||||||
ok(closeButton[0], "Group close button exists");
|
let listener = {
|
||||||
// click the close button
|
onCloseWindow: function () {},
|
||||||
EventUtils.sendMouseEvent({ type: "click" }, closeButton[0], contentWindow);
|
onWindowTitleChange: function () {},
|
||||||
|
|
||||||
let onTabViewHidden = function() {
|
onOpenWindow: function (xulWin) {
|
||||||
window.removeEventListener("tabviewhidden", onTabViewHidden, false);
|
let domWin = xulWin.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||||
|
.getInterface(Ci.nsIDOMWindow);
|
||||||
|
|
||||||
handleDialog = function(doc) {
|
whenWindowLoaded(domWin, function () {
|
||||||
callback(doc);
|
let dialog = domWin.document.querySelector("dialog");
|
||||||
};
|
if (dialog) {
|
||||||
startCallbackTimer();
|
Services.wm.removeListener(listener);
|
||||||
|
callback(dialog);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
window.addEventListener("tabviewhidden", onTabViewHidden, false);
|
|
||||||
|
|
||||||
let tabItem = groupItemOne.getChild(0);
|
Services.wm.addListener(listener);
|
||||||
tabItem.zoomIn();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Copied from http://mxr.mozilla.org/mozilla-central/source/toolkit/components/places/tests/mochitest/prompt_common.js
|
|
||||||
let observer = {
|
|
||||||
QueryInterface : function (iid) {
|
|
||||||
const interfaces = [Ci.nsIObserver, Ci.nsISupports, Ci.nsISupportsWeakReference];
|
|
||||||
|
|
||||||
if (!interfaces.some( function(v) { return iid.equals(v) } ))
|
|
||||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
|
||||||
return this;
|
|
||||||
},
|
|
||||||
|
|
||||||
observe : function (subject, topic, data) {
|
|
||||||
let doc = getDialogDoc();
|
|
||||||
if (doc)
|
|
||||||
handleDialog(doc);
|
|
||||||
else
|
|
||||||
startCallbackTimer(); // try again in a bit
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
function startCallbackTimer() {
|
|
||||||
// Delay before the callback twiddles the prompt.
|
|
||||||
const dialogDelay = 10;
|
|
||||||
|
|
||||||
// Use a timer to invoke a callback to twiddle the authentication dialog
|
|
||||||
timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
|
|
||||||
timer.init(observer, dialogDelay, Ci.nsITimer.TYPE_ONE_SHOT);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getDialogDoc() {
|
|
||||||
// Find the <browser> which contains notifyWindow, by looking
|
|
||||||
// through all the open windows and all the <browsers> in each.
|
|
||||||
let wm = Cc["@mozilla.org/appshell/window-mediator;1"].
|
|
||||||
getService(Ci.nsIWindowMediator);
|
|
||||||
let enumerator = wm.getXULWindowEnumerator(null);
|
|
||||||
|
|
||||||
while (enumerator.hasMoreElements()) {
|
|
||||||
let win = enumerator.getNext();
|
|
||||||
let windowDocShell = win.QueryInterface(Ci.nsIXULWindow).docShell;
|
|
||||||
|
|
||||||
let containedDocShells = windowDocShell.getDocShellEnumerator(
|
|
||||||
Ci.nsIDocShellTreeItem.typeChrome,
|
|
||||||
Ci.nsIDocShell.ENUMERATE_FORWARDS);
|
|
||||||
while (containedDocShells.hasMoreElements()) {
|
|
||||||
// Get the corresponding document for this docshell
|
|
||||||
let childDocShell = containedDocShells.getNext();
|
|
||||||
// We don't want it if it's not done loading.
|
|
||||||
if (childDocShell.busyFlags != Ci.nsIDocShell.BUSY_FLAGS_NONE)
|
|
||||||
continue;
|
|
||||||
let childDoc = childDocShell.QueryInterface(Ci.nsIDocShell).
|
|
||||||
contentViewer.DOMDocument;
|
|
||||||
|
|
||||||
if (childDoc.location.href == "chrome://global/content/commonDialog.xul")
|
|
||||||
return childDoc;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,8 +55,8 @@ function onTabViewWindowLoaded(win, tab) {
|
||||||
contentWindow.performSearch();
|
contentWindow.performSearch();
|
||||||
|
|
||||||
// prepare to finish when the main window gets focus back
|
// prepare to finish when the main window gets focus back
|
||||||
window.addEventListener('focus', function () {
|
window.addEventListener('focus', function onFocus() {
|
||||||
window.removeEventListener('focus', arguments.callee, true);
|
window.removeEventListener('focus', onFocus, true);
|
||||||
assertSearchIsDisabled();
|
assertSearchIsDisabled();
|
||||||
|
|
||||||
// check that the right tab is active
|
// check that the right tab is active
|
||||||
|
|
|
@ -11,12 +11,10 @@ function onTabViewShown(win) {
|
||||||
let contentWindow = win.TabView.getContentWindow();
|
let contentWindow = win.TabView.getContentWindow();
|
||||||
|
|
||||||
let finishTest = function () {
|
let finishTest = function () {
|
||||||
win.addEventListener('tabviewhidden', function () {
|
hideTabView(function () {
|
||||||
win.removeEventListener('tabviewhidden', arguments.callee, false);
|
|
||||||
win.close();
|
win.close();
|
||||||
finish();
|
finish();
|
||||||
}, false);
|
}, win);
|
||||||
win.TabView.hide();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// do not let the group arrange itself
|
// do not let the group arrange itself
|
||||||
|
|
|
@ -65,11 +65,6 @@ function test() {
|
||||||
simulateDoubleClick(container, 2);
|
simulateDoubleClick(container, 2);
|
||||||
assertNumberOfTabs(1);
|
assertNumberOfTabs(1);
|
||||||
|
|
||||||
// simulate double click with left mouse button
|
|
||||||
let container = groupItem.container;
|
|
||||||
simulateDoubleClick(container);
|
|
||||||
assertNumberOfTabs(1);
|
|
||||||
|
|
||||||
groupItem.close();
|
groupItem.close();
|
||||||
hideTabView(finishTest);
|
hideTabView(finishTest);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,68 @@
|
||||||
|
/* Any copyright is dedicated to the Public Domain.
|
||||||
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||||
|
|
||||||
|
let contentWindow;
|
||||||
|
let groupItem;
|
||||||
|
let groupItemId;
|
||||||
|
|
||||||
|
function test() {
|
||||||
|
waitForExplicitFinish();
|
||||||
|
|
||||||
|
registerCleanupFunction(function() {
|
||||||
|
contentWindow.gPrefBranch.clearUserPref("animate_zoom");
|
||||||
|
let createdGroupItem = contentWindow.GroupItems.groupItem(groupItemId)
|
||||||
|
if (createdGroupItem)
|
||||||
|
closeGroupItem(createdGroupItem, function() {});
|
||||||
|
hideTabView(function() {});
|
||||||
|
});
|
||||||
|
|
||||||
|
showTabView(function() {
|
||||||
|
contentWindow = TabView.getContentWindow();
|
||||||
|
groupItem = createEmptyGroupItem(contentWindow, 300, 300, 200);
|
||||||
|
groupItemId = groupItem.id;
|
||||||
|
testMouseClickOnEmptyGroupItem();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function testMouseClickOnEmptyGroupItem() {
|
||||||
|
whenTabViewIsHidden(function() {
|
||||||
|
is(groupItem.getChildren().length, 1, "The group item contains one tab item now");
|
||||||
|
showTabView(testDraggingWithinGroupItem);
|
||||||
|
});
|
||||||
|
is(groupItem.getChildren().length, 0, "The group item doesn't contain any tab items");
|
||||||
|
EventUtils.sendMouseEvent({ type: "mousedown" }, groupItem.container, contentWindow);
|
||||||
|
EventUtils.sendMouseEvent({ type: "mouseup" }, groupItem.container, contentWindow);
|
||||||
|
}
|
||||||
|
|
||||||
|
function testDraggingWithinGroupItem() {
|
||||||
|
let target = groupItem.container;
|
||||||
|
contentWindow.gPrefBranch.setBoolPref("animate_zoom", false);
|
||||||
|
|
||||||
|
// stimulate drag and drop
|
||||||
|
EventUtils.sendMouseEvent( {type: "mousedown" }, target, contentWindow);
|
||||||
|
EventUtils.synthesizeMouse(target, 10, 10, { type: "mousemove" }, contentWindow);
|
||||||
|
ok(groupItem.isDragging, "The group item is being dragged")
|
||||||
|
|
||||||
|
EventUtils.sendMouseEvent({ type: "mouseup" }, target, contentWindow);
|
||||||
|
ok(!groupItem.isDragging, "The dragging is competely");
|
||||||
|
|
||||||
|
executeSoon(function() {
|
||||||
|
ok(TabView.isVisible(), "The tab view is still visible after dragging");
|
||||||
|
contentWindow.gPrefBranch.clearUserPref("animate_zoom");
|
||||||
|
|
||||||
|
testMouseClickOnGroupItem();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function testMouseClickOnGroupItem() {
|
||||||
|
whenTabViewIsHidden(function() {
|
||||||
|
is(groupItem.getChildren().length, 1, "The group item still contains one tab item");
|
||||||
|
|
||||||
|
closeGroupItem(groupItem, function() {
|
||||||
|
hideTabView(finish);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
EventUtils.sendMouseEvent({ type: "mousedown" }, groupItem.container, contentWindow);
|
||||||
|
EventUtils.sendMouseEvent({ type: "mouseup" }, groupItem.container, contentWindow);
|
||||||
|
}
|
||||||
|
|
|
@ -4,18 +4,16 @@
|
||||||
function test() {
|
function test() {
|
||||||
waitForExplicitFinish();
|
waitForExplicitFinish();
|
||||||
|
|
||||||
window.addEventListener("tabviewshown", onTabViewWindowLoaded, false);
|
showTabView(onTabViewWindowLoaded);
|
||||||
TabView.toggle();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let originalGroupItem = null;
|
let originalGroupItem = null;
|
||||||
let originalTab = null;
|
let originalTab = null;
|
||||||
|
|
||||||
function onTabViewWindowLoaded() {
|
function onTabViewWindowLoaded() {
|
||||||
window.removeEventListener("tabviewshown", onTabViewWindowLoaded, false);
|
|
||||||
ok(TabView.isVisible(), "Tab View is visible");
|
ok(TabView.isVisible(), "Tab View is visible");
|
||||||
|
|
||||||
let contentWindow = document.getElementById("tab-view").contentWindow;
|
let contentWindow = TabView.getContentWindow();
|
||||||
|
|
||||||
is(contentWindow.GroupItems.groupItems.length, 1, "There is one group item on startup");
|
is(contentWindow.GroupItems.groupItems.length, 1, "There is one group item on startup");
|
||||||
originalGroupItem = contentWindow.GroupItems.groupItems[0];
|
originalGroupItem = contentWindow.GroupItems.groupItems[0];
|
||||||
|
@ -58,19 +56,7 @@ function testGroupItemWithTabItem(contentWindow) {
|
||||||
let groupItem = createEmptyGroupItem(contentWindow, 300, 300, 200);
|
let groupItem = createEmptyGroupItem(contentWindow, 300, 300, 200);
|
||||||
let tabItemCount = 0;
|
let tabItemCount = 0;
|
||||||
|
|
||||||
let onTabViewHidden = function() {
|
|
||||||
window.removeEventListener("tabviewhidden", onTabViewHidden, false);
|
|
||||||
|
|
||||||
is(groupItem.getChildren().length, ++tabItemCount,
|
|
||||||
"The number of children in new tab group is increased by 1");
|
|
||||||
|
|
||||||
ok(!TabView.isVisible(), "Tab View is hidden because we just opened a tab");
|
|
||||||
|
|
||||||
TabView.toggle();
|
|
||||||
};
|
|
||||||
let onTabViewShown = function() {
|
let onTabViewShown = function() {
|
||||||
window.removeEventListener("tabviewshown", onTabViewShown, false);
|
|
||||||
|
|
||||||
let tabItem = groupItem.getChild(groupItem.getChildren().length - 1);
|
let tabItem = groupItem.getChild(groupItem.getChildren().length - 1);
|
||||||
ok(tabItem, "Tab item exists");
|
ok(tabItem, "Tab item exists");
|
||||||
|
|
||||||
|
@ -92,13 +78,6 @@ function testGroupItemWithTabItem(contentWindow) {
|
||||||
// and go into that tab.
|
// and go into that tab.
|
||||||
is(gBrowser.tabs.length, 1, "There is only one tab left");
|
is(gBrowser.tabs.length, 1, "There is only one tab left");
|
||||||
|
|
||||||
let endGame = function() {
|
|
||||||
window.removeEventListener("tabviewhidden", endGame, false);
|
|
||||||
ok(!TabView.isVisible(), "Tab View is hidden");
|
|
||||||
finish();
|
|
||||||
};
|
|
||||||
window.addEventListener("tabviewhidden", endGame, false);
|
|
||||||
|
|
||||||
// after the last selected tabitem is closed, there would be not active
|
// after the last selected tabitem is closed, there would be not active
|
||||||
// tabitem on the UI so we set the active tabitem before toggling the
|
// tabitem on the UI so we set the active tabitem before toggling the
|
||||||
// visibility of tabview
|
// visibility of tabview
|
||||||
|
@ -106,7 +85,11 @@ function testGroupItemWithTabItem(contentWindow) {
|
||||||
ok(tabItems[0], "A tab item exists");
|
ok(tabItems[0], "A tab item exists");
|
||||||
contentWindow.UI.setActive(tabItems[0]);
|
contentWindow.UI.setActive(tabItems[0]);
|
||||||
|
|
||||||
TabView.toggle();
|
hideTabView(function() {
|
||||||
|
ok(!TabView.isVisible(), "Tab View is hidden");
|
||||||
|
|
||||||
|
closeGroupItem(groupItem, finish);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// remove the tab item. The code detects mousedown and mouseup so we stimulate here
|
// remove the tab item. The code detects mousedown and mouseup so we stimulate here
|
||||||
|
@ -115,15 +98,14 @@ function testGroupItemWithTabItem(contentWindow) {
|
||||||
|
|
||||||
EventUtils.sendMouseEvent({ type: "mousedown" }, closeButton[0], contentWindow);
|
EventUtils.sendMouseEvent({ type: "mousedown" }, closeButton[0], contentWindow);
|
||||||
EventUtils.sendMouseEvent({ type: "mouseup" }, closeButton[0], contentWindow);
|
EventUtils.sendMouseEvent({ type: "mouseup" }, closeButton[0], contentWindow);
|
||||||
|
|
||||||
TabView.toggle();
|
|
||||||
};
|
};
|
||||||
window.addEventListener("tabviewhidden", onTabViewHidden, false);
|
|
||||||
window.addEventListener("tabviewshown", onTabViewShown, false);
|
|
||||||
|
|
||||||
// click on the + button
|
whenTabViewIsHidden(function() {
|
||||||
let newTabButton = groupItem.container.getElementsByClassName("newTabButton");
|
is(groupItem.getChildren().length, ++tabItemCount,
|
||||||
ok(newTabButton[0], "New tab button exists");
|
"The number of children in new tab group is increased by 1");
|
||||||
|
|
||||||
EventUtils.synthesizeMouse(newTabButton[0], 1, 1, {}, contentWindow);
|
ok(!TabView.isVisible(), "Tab View is hidden because we just opened a tab");
|
||||||
|
showTabView(onTabViewShown);
|
||||||
|
});
|
||||||
|
groupItem.newTab();
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,16 +8,14 @@ function test() {
|
||||||
let windowOne = openDialog(location, "", "chrome,all,dialog=no", "data:text/html,");
|
let windowOne = openDialog(location, "", "chrome,all,dialog=no", "data:text/html,");
|
||||||
let windowTwo;
|
let windowTwo;
|
||||||
|
|
||||||
windowOne.addEventListener("load", function() {
|
whenWindowLoaded(windowOne, function () {
|
||||||
windowOne.removeEventListener("load", arguments.callee, false);
|
windowOne.gBrowser.selectedBrowser.addEventListener("load", function onLoad() {
|
||||||
windowOne.gBrowser.selectedBrowser.addEventListener("load", function() {
|
windowOne.gBrowser.selectedBrowser.removeEventListener("load", onLoad, true);
|
||||||
windowOne.gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
|
|
||||||
|
|
||||||
windowTwo = openDialog(location, "", "chrome,all,dialog=no", "http://mochi.test:8888/");
|
windowTwo = openDialog(location, "", "chrome,all,dialog=no", "http://mochi.test:8888/");
|
||||||
windowTwo.addEventListener("load", function() {
|
whenWindowLoaded(windowTwo, function () {
|
||||||
windowTwo.removeEventListener("load", arguments.callee, false);
|
windowTwo.gBrowser.selectedBrowser.addEventListener("load", function onLoad() {
|
||||||
windowTwo.gBrowser.selectedBrowser.addEventListener("load", function() {
|
windowTwo.gBrowser.selectedBrowser.removeEventListener("load", onLoad, true);
|
||||||
windowTwo.gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
|
|
||||||
|
|
||||||
newWindows = [ windowOne, windowTwo ];
|
newWindows = [ windowOne, windowTwo ];
|
||||||
|
|
||||||
|
@ -26,9 +24,9 @@ function test() {
|
||||||
ok(!TabView.isVisible(), "Tab View is hidden");
|
ok(!TabView.isVisible(), "Tab View is hidden");
|
||||||
TabView.toggle();
|
TabView.toggle();
|
||||||
}, true);
|
}, true);
|
||||||
}, false);
|
});
|
||||||
}, true);
|
}, true);
|
||||||
}, false);
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function onTabViewWindowLoaded() {
|
function onTabViewWindowLoaded() {
|
||||||
|
|
|
@ -31,21 +31,26 @@ function test() {
|
||||||
let transitioned = 0;
|
let transitioned = 0;
|
||||||
|
|
||||||
let initCallback = function() {
|
let initCallback = function() {
|
||||||
tabViewWindow = win.TabView._window;
|
tabViewWindow = win.TabView.getContentWindow();
|
||||||
function onTransitionEnd(event) {
|
function onTransitionEnd(event) {
|
||||||
transitioned++;
|
transitioned++;
|
||||||
info(transitioned);
|
info(transitioned);
|
||||||
}
|
}
|
||||||
tabViewWindow.document.addEventListener("transitionend", onTransitionEnd, false);
|
tabViewWindow.document.addEventListener("transitionend", onTransitionEnd, false);
|
||||||
|
|
||||||
showTabView(function() {
|
// don't use showTabView() here because we only want to check whether
|
||||||
|
// zoom out animation happens. Other animations would happen before
|
||||||
|
// the callback as waitForFocus() was added to showTabView() in head.js
|
||||||
|
let onTabViewShown = function() {
|
||||||
|
tabViewWindow.removeEventListener("tabviewshown", onTabViewShown, false);
|
||||||
|
tabViewWindow.document.removeEventListener("transitionend", onTransitionEnd, false);
|
||||||
|
|
||||||
ok(!transitioned, "There should be no transitions");
|
ok(!transitioned, "There should be no transitions");
|
||||||
|
|
||||||
tabViewWindow.document.removeEventListener(
|
|
||||||
"transitionend", onTransitionEnd, false);
|
|
||||||
|
|
||||||
finish();
|
finish();
|
||||||
}, win);
|
};
|
||||||
|
tabViewWindow.addEventListener("tabviewshown", onTabViewShown, false);
|
||||||
|
win.TabView.toggle();
|
||||||
};
|
};
|
||||||
|
|
||||||
win.TabView._initFrame(initCallback);
|
win.TabView._initFrame(initCallback);
|
||||||
|
|
|
@ -4,45 +4,33 @@
|
||||||
function test() {
|
function test() {
|
||||||
waitForExplicitFinish();
|
waitForExplicitFinish();
|
||||||
|
|
||||||
window.addEventListener("tabviewshown", onTabViewWindowLoaded, false);
|
registerCleanupFunction(function() {
|
||||||
TabView.toggle();
|
while (gBrowser.tabs[1])
|
||||||
|
gBrowser.removeTab(gBrowser.tabs[1]);
|
||||||
|
hideTabView(function() {});
|
||||||
|
});
|
||||||
|
showTabView(onTabViewWindowLoaded);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onTabViewWindowLoaded() {
|
function onTabViewWindowLoaded() {
|
||||||
window.removeEventListener("tabviewshown", onTabViewWindowLoaded, false);
|
|
||||||
ok(TabView.isVisible(), "Tab View is visible");
|
ok(TabView.isVisible(), "Tab View is visible");
|
||||||
|
|
||||||
let contentWindow = document.getElementById("tab-view").contentWindow;
|
let contentWindow = TabView.getContentWindow();
|
||||||
|
|
||||||
|
registerCleanupFunction(function() {
|
||||||
|
let groupItem = contentWindow.GroupItems.groupItem(groupItemId);
|
||||||
|
if (groupItem)
|
||||||
|
closeGroupItem(groupItem, function() {});
|
||||||
|
});
|
||||||
|
|
||||||
// create a group item
|
// create a group item
|
||||||
let box = new contentWindow.Rect(20, 400, 300, 300);
|
let groupItem = createGroupItemWithBlankTabs(window, 300, 300, 400, 1);
|
||||||
let groupItem = new contentWindow.GroupItem([], { bounds: box });
|
groupItemId = groupItem.id;
|
||||||
|
is(groupItem.getChildren().length, 1, "The new group has a tab item");
|
||||||
// create a tab item in the new group
|
// start the tests
|
||||||
let onTabViewHidden = function() {
|
waitForFocus(function() {
|
||||||
window.removeEventListener("tabviewhidden", onTabViewHidden, false);
|
testUndoGroup(contentWindow, groupItem);
|
||||||
|
}, contentWindow);
|
||||||
ok(!TabView.isVisible(), "Tab View is hidden because we just opened a tab");
|
|
||||||
// show tab view
|
|
||||||
TabView.toggle();
|
|
||||||
};
|
|
||||||
let onTabViewShown = function() {
|
|
||||||
window.removeEventListener("tabviewshown", onTabViewShown, false);
|
|
||||||
|
|
||||||
is(groupItem.getChildren().length, 1, "The new group has a tab item");
|
|
||||||
// start the tests
|
|
||||||
waitForFocus(function() {
|
|
||||||
testUndoGroup(contentWindow, groupItem);
|
|
||||||
}, contentWindow);
|
|
||||||
};
|
|
||||||
window.addEventListener("tabviewhidden", onTabViewHidden, false);
|
|
||||||
window.addEventListener("tabviewshown", onTabViewShown, false);
|
|
||||||
|
|
||||||
// click on the + button
|
|
||||||
let newTabButton = groupItem.container.getElementsByClassName("newTabButton");
|
|
||||||
ok(newTabButton[0], "New tab button exists");
|
|
||||||
|
|
||||||
EventUtils.sendMouseEvent({ type: "click" }, newTabButton[0], contentWindow);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function testUndoGroup(contentWindow, groupItem) {
|
function testUndoGroup(contentWindow, groupItem) {
|
||||||
|
@ -113,13 +101,6 @@ function testCloseUndoGroup(contentWindow, groupItem) {
|
||||||
let theGroupItem = contentWindow.GroupItems.groupItem(groupItem.id);
|
let theGroupItem = contentWindow.GroupItems.groupItem(groupItem.id);
|
||||||
ok(!theGroupItem, "The group item doesn't exists");
|
ok(!theGroupItem, "The group item doesn't exists");
|
||||||
|
|
||||||
let endGame = function() {
|
|
||||||
window.removeEventListener("tabviewhidden", endGame, false);
|
|
||||||
ok(!TabView.isVisible(), "Tab View is hidden");
|
|
||||||
finish();
|
|
||||||
};
|
|
||||||
window.addEventListener("tabviewhidden", endGame, false);
|
|
||||||
|
|
||||||
// after the last selected tabitem is closed, there would be not active
|
// after the last selected tabitem is closed, there would be not active
|
||||||
// tabitem on the UI so we set the active tabitem before toggling the
|
// tabitem on the UI so we set the active tabitem before toggling the
|
||||||
// visibility of tabview
|
// visibility of tabview
|
||||||
|
@ -127,7 +108,10 @@ function testCloseUndoGroup(contentWindow, groupItem) {
|
||||||
ok(tabItems[0], "A tab item exists");
|
ok(tabItems[0], "A tab item exists");
|
||||||
contentWindow.UI.setActive(tabItems[0]);
|
contentWindow.UI.setActive(tabItems[0]);
|
||||||
|
|
||||||
TabView.toggle();
|
hideTabView(function() {
|
||||||
|
ok(!TabView.isVisible(), "Tab View is hidden");
|
||||||
|
finish();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
let closeButton = groupItem.container.getElementsByClassName("close");
|
let closeButton = groupItem.container.getElementsByClassName("close");
|
||||||
|
|
|
@ -32,6 +32,9 @@ function createGroupItemWithTabs(win, width, height, padding, urls, animate) {
|
||||||
ok(newItem.container, "Created element "+t+":"+newItem.container);
|
ok(newItem.container, "Created element "+t+":"+newItem.container);
|
||||||
++t;
|
++t;
|
||||||
});
|
});
|
||||||
|
// to set one of tabItem to be active since we load tabs into a group
|
||||||
|
// in a non-standard flow.
|
||||||
|
contentWindow.UI.setActive(groupItem);
|
||||||
return groupItem;
|
return groupItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,11 +136,13 @@ function showTabView(callback, win) {
|
||||||
win = win || window;
|
win = win || window;
|
||||||
|
|
||||||
if (win.TabView.isVisible()) {
|
if (win.TabView.isVisible()) {
|
||||||
callback();
|
waitForFocus(callback, win);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
whenTabViewIsShown(callback, win);
|
whenTabViewIsShown(function() {
|
||||||
|
waitForFocus(callback, win);
|
||||||
|
}, win);
|
||||||
win.TabView.show();
|
win.TabView.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,8 +168,8 @@ function whenTabViewIsHidden(callback, win) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
win.addEventListener('tabviewhidden', function () {
|
win.addEventListener('tabviewhidden', function onHidden() {
|
||||||
win.removeEventListener('tabviewhidden', arguments.callee, false);
|
win.removeEventListener('tabviewhidden', onHidden, false);
|
||||||
callback();
|
callback();
|
||||||
}, false);
|
}, false);
|
||||||
}
|
}
|
||||||
|
@ -178,8 +183,8 @@ function whenTabViewIsShown(callback, win) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
win.addEventListener('tabviewshown', function () {
|
win.addEventListener('tabviewshown', function onShown() {
|
||||||
win.removeEventListener('tabviewshown', arguments.callee, false);
|
win.removeEventListener('tabviewshown', onShown, false);
|
||||||
callback();
|
callback();
|
||||||
}, false);
|
}, false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
<html>
|
|
||||||
<script>
|
|
||||||
window.onbeforeunload = function(event){
|
|
||||||
event.returnValue = 'Confirmation? ';
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<body>
|
|
||||||
Test page
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
function go() {
|
||||||
|
var w = window.open();
|
||||||
|
w.document.open();
|
||||||
|
w.document.write("<html><body>test document</body></html>");
|
||||||
|
w.document.close();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<button id="btn" onclick="go();">test</button>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -327,6 +327,11 @@
|
||||||
gBrowser.loadURIWithFlags(url, flags, null, null, postData);
|
gBrowser.loadURIWithFlags(url, flags, null, null, postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Focus the content area before triggering loads, since if the load
|
||||||
|
// occurs in a new tab, we want focus to be restored to the content
|
||||||
|
// area when the current tab is re-selected.
|
||||||
|
gBrowser.selectedBrowser.focus();
|
||||||
|
|
||||||
if (aTriggeringEvent instanceof MouseEvent) {
|
if (aTriggeringEvent instanceof MouseEvent) {
|
||||||
// We have a mouse event (from the go button), so use the standard
|
// We have a mouse event (from the go button), so use the standard
|
||||||
// UI link behaviors
|
// UI link behaviors
|
||||||
|
@ -335,18 +340,12 @@
|
||||||
loadCurrent();
|
loadCurrent();
|
||||||
} else {
|
} else {
|
||||||
this.handleRevert();
|
this.handleRevert();
|
||||||
content.focus();
|
|
||||||
openUILinkIn(url, where,
|
openUILinkIn(url, where,
|
||||||
{ allowThirdPartyFixup: true, postData: postData });
|
{ allowThirdPartyFixup: true, postData: postData });
|
||||||
}
|
}
|
||||||
return;
|
} else if (aTriggeringEvent && aTriggeringEvent.altKey &&
|
||||||
}
|
!isTabEmpty(gBrowser.selectedTab)) {
|
||||||
|
|
||||||
if (aTriggeringEvent &&
|
|
||||||
aTriggeringEvent.altKey &&
|
|
||||||
!isTabEmpty(gBrowser.selectedTab)) {
|
|
||||||
this.handleRevert();
|
this.handleRevert();
|
||||||
content.focus();
|
|
||||||
gBrowser.loadOneTab(url, {
|
gBrowser.loadOneTab(url, {
|
||||||
postData: postData,
|
postData: postData,
|
||||||
inBackground: false,
|
inBackground: false,
|
||||||
|
@ -356,8 +355,6 @@
|
||||||
} else {
|
} else {
|
||||||
loadCurrent();
|
loadCurrent();
|
||||||
}
|
}
|
||||||
|
|
||||||
gBrowser.selectedBrowser.focus();
|
|
||||||
]]></body>
|
]]></body>
|
||||||
</method>
|
</method>
|
||||||
|
|
||||||
|
@ -513,6 +510,10 @@
|
||||||
return selectedVal;
|
return selectedVal;
|
||||||
|
|
||||||
let uri = gBrowser.currentURI;
|
let uri = gBrowser.currentURI;
|
||||||
|
// Only copy exposable URIs
|
||||||
|
try {
|
||||||
|
uri = Cc["@mozilla.org/docshell/urifixup;1"].getService(Ci.nsIURIFixup).createExposableURI(uri);
|
||||||
|
} catch (ex) {}
|
||||||
|
|
||||||
// If the entire URL is selected, just use the actual loaded URI.
|
// If the entire URL is selected, just use the actual loaded URI.
|
||||||
if (inputVal == selectedVal) {
|
if (inputVal == selectedVal) {
|
||||||
|
|
|
@ -128,6 +128,8 @@ const TAB_EVENTS = ["TabOpen", "TabClose", "TabSelect", "TabShow", "TabHide",
|
||||||
|
|
||||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
Cu.import("resource://gre/modules/Services.jsm");
|
Cu.import("resource://gre/modules/Services.jsm");
|
||||||
|
// debug.js adds NS_ASSERT. cf. bug 669196
|
||||||
|
Cu.import("resource://gre/modules/debug.js");
|
||||||
|
|
||||||
XPCOMUtils.defineLazyGetter(this, "NetUtil", function() {
|
XPCOMUtils.defineLazyGetter(this, "NetUtil", function() {
|
||||||
Cu.import("resource://gre/modules/NetUtil.jsm");
|
Cu.import("resource://gre/modules/NetUtil.jsm");
|
||||||
|
@ -1669,10 +1671,31 @@ SessionStoreService.prototype = {
|
||||||
tabData.index = history.index + 1;
|
tabData.index = history.index + 1;
|
||||||
}
|
}
|
||||||
else if (history && history.count > 0) {
|
else if (history && history.count > 0) {
|
||||||
for (var j = 0; j < history.count; j++) {
|
try {
|
||||||
let entry = this._serializeHistoryEntry(history.getEntryAtIndex(j, false),
|
for (var j = 0; j < history.count; j++) {
|
||||||
aFullData, aTab.pinned);
|
let entry = this._serializeHistoryEntry(history.getEntryAtIndex(j, false),
|
||||||
tabData.entries.push(entry);
|
aFullData, aTab.pinned);
|
||||||
|
tabData.entries.push(entry);
|
||||||
|
}
|
||||||
|
// If we make it through the for loop, then we're ok and we should clear
|
||||||
|
// any indicator of brokenness.
|
||||||
|
delete aTab.__SS_broken_history;
|
||||||
|
}
|
||||||
|
catch (ex) {
|
||||||
|
// In some cases, getEntryAtIndex will throw. This seems to be due to
|
||||||
|
// history.count being higher than it should be. By doing this in a
|
||||||
|
// try-catch, we'll update history to where it breaks, assert for
|
||||||
|
// non-release builds, and still save sessionstore.js. We'll track if
|
||||||
|
// we've shown the assert for this tab so we only show it once.
|
||||||
|
// cf. bug 669196.
|
||||||
|
if (!aTab.__SS_broken_history) {
|
||||||
|
// First Focus the window & tab we're having trouble with.
|
||||||
|
aTab.ownerDocument.defaultView.focus();
|
||||||
|
aTab.ownerDocument.defaultView.gBrowser.selectedTab = aTab;
|
||||||
|
NS_ASSERT(false, "SessionStore failed gathering complete history " +
|
||||||
|
"for the focused window/tab. See bug 669196.");
|
||||||
|
aTab.__SS_broken_history = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
tabData.index = history.index + 1;
|
tabData.index = history.index + 1;
|
||||||
|
|
||||||
|
|
|
@ -992,7 +992,6 @@ xpicleanup@BIN_SUFFIX@
|
||||||
modules/services-sync/type_records/prefs.js
|
modules/services-sync/type_records/prefs.js
|
||||||
modules/services-sync/type_records/tabs.js
|
modules/services-sync/type_records/tabs.js
|
||||||
modules/services-sync/util.js
|
modules/services-sync/util.js
|
||||||
modules/SpatialNavigation.js
|
|
||||||
modules/stylePanel.jsm
|
modules/stylePanel.jsm
|
||||||
modules/tabview/AllTabs.jsm
|
modules/tabview/AllTabs.jsm
|
||||||
modules/tabview/groups.jsm
|
modules/tabview/groups.jsm
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
tabview.groupItem.newTabButton=New tab
|
|
||||||
tabview.groupItem.defaultName=Name this tab group…
|
tabview.groupItem.defaultName=Name this tab group…
|
||||||
tabview.groupItem.undoCloseGroup=Undo Close Group
|
tabview.groupItem.undoCloseGroup=Undo Close Group
|
||||||
tabview.search.otherWindowTabs=Tabs from other windows
|
tabview.search.otherWindowTabs=Tabs from other windows
|
||||||
|
|
|
@ -1959,3 +1959,8 @@ panel[dimmed="true"] {
|
||||||
outline: 1px dashed rgba(255,255,255,0.5);
|
outline: 1px dashed rgba(255,255,255,0.5);
|
||||||
outline-offset: -1px;
|
outline-offset: -1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#highlighter-veil-transparentbox[locked] {
|
||||||
|
box-shadow: 0 0 0 1px black;
|
||||||
|
outline-color: white;
|
||||||
|
}
|
||||||
|
|
|
@ -79,7 +79,6 @@ browser.jar:
|
||||||
skin/classic/browser/tabbrowser/tab-overflow-border.png (tabbrowser/tab-overflow-border.png)
|
skin/classic/browser/tabbrowser/tab-overflow-border.png (tabbrowser/tab-overflow-border.png)
|
||||||
skin/classic/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png)
|
skin/classic/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png)
|
||||||
skin/classic/browser/tabview/edit-light.png (tabview/edit-light.png)
|
skin/classic/browser/tabview/edit-light.png (tabview/edit-light.png)
|
||||||
skin/classic/browser/tabview/new-tab.png (tabview/new-tab.png)
|
|
||||||
skin/classic/browser/tabview/search.png (tabview/search.png)
|
skin/classic/browser/tabview/search.png (tabview/search.png)
|
||||||
skin/classic/browser/tabview/stack-expander.png (tabview/stack-expander.png)
|
skin/classic/browser/tabview/stack-expander.png (tabview/stack-expander.png)
|
||||||
skin/classic/browser/tabview/tabview.png (tabview/tabview.png)
|
skin/classic/browser/tabview/tabview.png (tabview/tabview.png)
|
||||||
|
|
Двоичные данные
browser/themes/gnomestripe/browser/tabview/new-tab.png
Двоичные данные
browser/themes/gnomestripe/browser/tabview/new-tab.png
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 466 B |
|
@ -190,7 +190,7 @@ html[dir=rtl] .stack-trayed .tab-title {
|
||||||
----------------------------------*/
|
----------------------------------*/
|
||||||
|
|
||||||
.groupItem {
|
.groupItem {
|
||||||
cursor: move;
|
cursor: pointer;
|
||||||
border: 1px solid rgba(230,230,230,1);
|
border: 1px solid rgba(230,230,230,1);
|
||||||
background-color: window;
|
background-color: window;
|
||||||
background-image: -moz-linear-gradient(rgba(255,255,255,.3),rgba(255,255,255,.1));
|
background-image: -moz-linear-gradient(rgba(255,255,255,.3),rgba(255,255,255,.1));
|
||||||
|
@ -385,25 +385,6 @@ html[dir=rtl] .guideTrench {
|
||||||
/* Other
|
/* Other
|
||||||
----------------------------------*/
|
----------------------------------*/
|
||||||
|
|
||||||
.newTabButton {
|
|
||||||
width: 16px;
|
|
||||||
height: 15px;
|
|
||||||
bottom: 10px;
|
|
||||||
left: 10px;
|
|
||||||
cursor: pointer;
|
|
||||||
opacity: .3;
|
|
||||||
background-image: url(chrome://browser/skin/tabview/new-tab.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
html[dir=rtl] .newTabButton {
|
|
||||||
left: auto;
|
|
||||||
right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.newTabButton:hover {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.active {
|
.active {
|
||||||
box-shadow: 5px 5px 3px rgba(0,0,0,.5);
|
box-shadow: 5px 5px 3px rgba(0,0,0,.5);
|
||||||
}
|
}
|
||||||
|
@ -421,6 +402,7 @@ html[dir=rtl] .acceptsDrop {
|
||||||
}
|
}
|
||||||
|
|
||||||
.titlebar {
|
.titlebar {
|
||||||
|
cursor: move;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2533,3 +2533,8 @@ panel[dimmed="true"] {
|
||||||
outline: 1px dashed rgba(255,255,255,0.5);
|
outline: 1px dashed rgba(255,255,255,0.5);
|
||||||
outline-offset: -1px;
|
outline-offset: -1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#highlighter-veil-transparentbox[locked] {
|
||||||
|
box-shadow: 0 0 0 1px black;
|
||||||
|
outline-color: white;
|
||||||
|
}
|
||||||
|
|
|
@ -117,7 +117,6 @@ browser.jar:
|
||||||
skin/classic/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png)
|
skin/classic/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png)
|
||||||
skin/classic/browser/tabview/close.png (tabview/close.png)
|
skin/classic/browser/tabview/close.png (tabview/close.png)
|
||||||
skin/classic/browser/tabview/edit-light.png (tabview/edit-light.png)
|
skin/classic/browser/tabview/edit-light.png (tabview/edit-light.png)
|
||||||
skin/classic/browser/tabview/new-tab.png (tabview/new-tab.png)
|
|
||||||
skin/classic/browser/tabview/search.png (tabview/search.png)
|
skin/classic/browser/tabview/search.png (tabview/search.png)
|
||||||
skin/classic/browser/tabview/stack-expander.png (tabview/stack-expander.png)
|
skin/classic/browser/tabview/stack-expander.png (tabview/stack-expander.png)
|
||||||
skin/classic/browser/tabview/tabview.png (tabview/tabview.png)
|
skin/classic/browser/tabview/tabview.png (tabview/tabview.png)
|
||||||
|
|
Двоичные данные
browser/themes/pinstripe/browser/tabview/new-tab.png
Двоичные данные
browser/themes/pinstripe/browser/tabview/new-tab.png
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 466 B |
|
@ -191,7 +191,7 @@ html[dir=rtl] .stack-trayed .tab-title {
|
||||||
----------------------------------*/
|
----------------------------------*/
|
||||||
|
|
||||||
.groupItem {
|
.groupItem {
|
||||||
cursor: move;
|
cursor: pointer;
|
||||||
background-color: rgb(240,240,240);
|
background-color: rgb(240,240,240);
|
||||||
border-radius: 0.4em;
|
border-radius: 0.4em;
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
|
||||||
|
@ -376,25 +376,6 @@ html[dir=rtl] .guideTrench {
|
||||||
/* Other
|
/* Other
|
||||||
----------------------------------*/
|
----------------------------------*/
|
||||||
|
|
||||||
.newTabButton {
|
|
||||||
width: 16px;
|
|
||||||
height: 15px;
|
|
||||||
bottom: 10px;
|
|
||||||
left: 10px;
|
|
||||||
cursor: pointer;
|
|
||||||
opacity: .3;
|
|
||||||
background-image: url(chrome://browser/skin/tabview/new-tab.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
html[dir=rtl] .newTabButton {
|
|
||||||
left: auto;
|
|
||||||
right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.newTabButton:hover {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.active {
|
.active {
|
||||||
box-shadow: 5px 5px 3px rgba(0,0,0,.5);
|
box-shadow: 5px 5px 3px rgba(0,0,0,.5);
|
||||||
}
|
}
|
||||||
|
@ -412,6 +393,7 @@ html[dir=rtl] .acceptsDrop {
|
||||||
}
|
}
|
||||||
|
|
||||||
.titlebar {
|
.titlebar {
|
||||||
|
cursor: move;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
}
|
}
|
||||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 5.0 KiB |
|
@ -13,9 +13,9 @@
|
||||||
|
|
||||||
#appmenu-button {
|
#appmenu-button {
|
||||||
border-width: 2px;
|
border-width: 2px;
|
||||||
-moz-border-left-colors: rgba(255,255,255,.5) rgba(83,42,6,.9);
|
-moz-border-left-colors: @appMenuButtonBorderColor@;
|
||||||
-moz-border-bottom-colors: rgba(255,255,255,.5) rgba(83,42,6,.9);
|
-moz-border-bottom-colors: @appMenuButtonBorderColor@;
|
||||||
-moz-border-right-colors: rgba(255,255,255,.5) rgba(83,42,6,.9);
|
-moz-border-right-colors: @appMenuButtonBorderColor@;
|
||||||
margin-bottom: 1px; /* compensate white outer border */
|
margin-bottom: 1px; /* compensate white outer border */
|
||||||
box-shadow: 0 1px 0 rgba(255,255,255,.25) inset,
|
box-shadow: 0 1px 0 rgba(255,255,255,.25) inset,
|
||||||
0 0 2px 1px rgba(255,255,255,.25) inset;
|
0 0 2px 1px rgba(255,255,255,.25) inset;
|
||||||
|
@ -138,6 +138,13 @@
|
||||||
border-right-style: none !important;
|
border-right-style: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#toolbar-menubar :-moz-any(@primaryToolbarButtons@):not(#alltabs-button):not(#tabview-button):not(#new-tab-button) > .toolbarbutton-icon:not(:-moz-lwtheme),
|
||||||
|
#TabsToolbar[tabsontop=true] :-moz-any(@primaryToolbarButtons@):not(#alltabs-button):not(#tabview-button):not(#new-tab-button) > .toolbarbutton-icon:not(:-moz-lwtheme),
|
||||||
|
#navigator-toolbox[tabsontop=false] > #nav-bar :-moz-any(@primaryToolbarButtons@):not(#alltabs-button):not(#tabview-button):not(#new-tab-button) > .toolbarbutton-icon:not(:-moz-lwtheme),
|
||||||
|
#nav-bar + #customToolbars + #PersonalToolbar[collapsed=true] + #TabsToolbar[tabsontop=false]:last-child :-moz-any(@primaryToolbarButtons@):not(#alltabs-button):not(#tabview-button):not(#new-tab-button) > .toolbarbutton-icon:not(:-moz-lwtheme) {
|
||||||
|
list-style-image: url("chrome://browser/skin/Toolbar-inverted.png");
|
||||||
|
}
|
||||||
|
|
||||||
/* Vertical toolbar border */
|
/* Vertical toolbar border */
|
||||||
#main-window[sizemode=normal] #navigator-toolbox::after,
|
#main-window[sizemode=normal] #navigator-toolbox::after,
|
||||||
#main-window[sizemode=normal] #navigator-toolbox[tabsontop=true] > toolbar:not(#toolbar-menubar):not(#TabsToolbar),
|
#main-window[sizemode=normal] #navigator-toolbox[tabsontop=true] > toolbar:not(#toolbar-menubar):not(#TabsToolbar),
|
||||||
|
|
|
@ -57,6 +57,17 @@
|
||||||
%define bgTabTexture -moz-linear-gradient(transparent, hsla(0,0%,45%,.1) 1px, hsla(0,0%,32%,.2) 80%, hsla(0,0%,0%,.2))
|
%define bgTabTexture -moz-linear-gradient(transparent, hsla(0,0%,45%,.1) 1px, hsla(0,0%,32%,.2) 80%, hsla(0,0%,0%,.2))
|
||||||
%define bgTabTextureHover -moz-linear-gradient(hsla(0,0%,100%,.3) 1px, hsla(0,0%,75%,.2) 80%, hsla(0,0%,60%,.2))
|
%define bgTabTextureHover -moz-linear-gradient(hsla(0,0%,100%,.3) 1px, hsla(0,0%,75%,.2) 80%, hsla(0,0%,60%,.2))
|
||||||
%define navbarTextboxCustomBorder border-color: rgba(0,0,0,.32);
|
%define navbarTextboxCustomBorder border-color: rgba(0,0,0,.32);
|
||||||
|
%define navbarLargeIcons #navigator-toolbox[iconsize=large][mode=icons] > #nav-bar
|
||||||
|
|
||||||
|
%ifdef MOZ_OFFICIAL_BRANDING
|
||||||
|
%define appMenuButtonBorderColor rgba(255,255,255,.5) rgba(83,42,6,.9)
|
||||||
|
%else
|
||||||
|
%if MOZ_UPDATE_CHANNEL == aurora
|
||||||
|
%define appMenuButtonBorderColor hsla(0,0%,100%,.5) hsla(214,89%,21%,.9)
|
||||||
|
%else
|
||||||
|
%define appMenuButtonBorderColor hsla(0,0%,100%,.5) hsla(210,59%,13%,.9)
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
#menubar-items {
|
#menubar-items {
|
||||||
-moz-box-orient: vertical; /* for flex hack */
|
-moz-box-orient: vertical; /* for flex hack */
|
||||||
|
@ -133,13 +144,10 @@
|
||||||
|
|
||||||
#appmenu-button {
|
#appmenu-button {
|
||||||
-moz-appearance: none;
|
-moz-appearance: none;
|
||||||
background: -moz-linear-gradient(rgb(247,182,82), rgb(215,98,10) 95%);
|
|
||||||
background-clip: padding-box;
|
background-clip: padding-box;
|
||||||
border-radius: 0 0 4px 4px;
|
border-radius: 0 0 4px 4px;
|
||||||
border: 1px solid rgba(83,42,6,.9);
|
border: 1px solid;
|
||||||
border-top: none;
|
border-top: none;
|
||||||
box-shadow: 0 1px 0 rgba(255,255,255,.25) inset,
|
|
||||||
0 0 0 1px rgba(255,255,255,.25) inset;
|
|
||||||
color: white;
|
color: white;
|
||||||
text-shadow: 0 0 1px rgba(0,0,0,.7),
|
text-shadow: 0 0 1px rgba(0,0,0,.7),
|
||||||
0 1px 1.5px rgba(0,0,0,.5);
|
0 1px 1.5px rgba(0,0,0,.5);
|
||||||
|
@ -162,20 +170,85 @@
|
||||||
}
|
}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
#main-window[privatebrowsingmode=temporary] #appmenu-button {
|
#appmenu-button:hover:active,
|
||||||
background-image: -moz-linear-gradient(rgb(153,38,211), rgb(105,19,163) 95%);
|
#appmenu-button[open] {
|
||||||
border-color: rgba(43,8,65,.9);
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
%ifdef MOZ_OFFICIAL_BRANDING
|
||||||
|
#appmenu-button {
|
||||||
|
background-image: -moz-linear-gradient(rgb(247,182,82), rgb(215,98,10) 95%);
|
||||||
|
border-color: rgba(83,42,6,.9);
|
||||||
|
box-shadow: 0 1px 0 rgba(255,255,255,.25) inset,
|
||||||
|
0 0 0 1px rgba(255,255,255,.25) inset;
|
||||||
|
}
|
||||||
#appmenu-button:hover:not(:active):not([open]) {
|
#appmenu-button:hover:not(:active):not([open]) {
|
||||||
background-image: -moz-radial-gradient(center bottom, farthest-side, rgba(252,240,89,.5) 10%, rgba(252,240,89,0) 70%),
|
background-image: -moz-radial-gradient(center bottom, farthest-side, rgba(252,240,89,.5) 10%, rgba(252,240,89,0) 70%),
|
||||||
-moz-radial-gradient(center bottom, farthest-side, rgb(236,133,0), rgba(255,229,172,0)),
|
-moz-radial-gradient(center bottom, farthest-side, rgb(236,133,0), rgba(255,229,172,0)),
|
||||||
-moz-linear-gradient(rgb(246,170,69), rgb(209,74,0) 95%);
|
-moz-linear-gradient(rgb(246,170,69), rgb(209,74,0) 95%);
|
||||||
border-color: rgba(83,42,6,.9);
|
border-color: rgba(83,42,6,.9);
|
||||||
box-shadow: 0 1px 0 rgba(255,255,255,.1) inset,
|
box-shadow: 0 1px 0 rgba(255,255,255,.1) inset,
|
||||||
0 0 1.5px 1px rgba(250,234,169,.7) inset,
|
0 0 2px 1px rgba(250,234,169,.7) inset,
|
||||||
0 -1px 0 rgba(250,234,169,.5) inset;
|
0 -1px 0 rgba(250,234,169,.5) inset;
|
||||||
}
|
}
|
||||||
|
#appmenu-button:hover:active,
|
||||||
|
#appmenu-button[open] {
|
||||||
|
background-image: -moz-linear-gradient(rgb(246,170,69), rgb(209,74,0) 95%);
|
||||||
|
box-shadow: 0 2px 3px rgba(0,0,0,.4) inset,
|
||||||
|
0 1px 1px rgba(0,0,0,.2) inset;
|
||||||
|
}
|
||||||
|
%else
|
||||||
|
%if MOZ_UPDATE_CHANNEL == aurora
|
||||||
|
#appmenu-button {
|
||||||
|
background-image: -moz-linear-gradient(hsl(208,99%,37%), hsl(214,90%,23%) 95%);
|
||||||
|
border-color: hsla(214,89%,21%,.9);
|
||||||
|
box-shadow: 0 1px 0 hsla(205,100%,72%,.2) inset,
|
||||||
|
0 0 2px 1px hsla(205,100%,72%,.25) inset;
|
||||||
|
}
|
||||||
|
#appmenu-button:hover:not(:active):not([open]) {
|
||||||
|
background-image: -moz-radial-gradient(center bottom, farthest-side, hsla(202,100%,85%,.5) 10%, hsla(202,100%,85%,0) 70%),
|
||||||
|
-moz-radial-gradient(center bottom, farthest-side, hsla(205,100%,72%,.7), hsla(205,100%,72%,0)),
|
||||||
|
-moz-linear-gradient(hsl(208,98%,34%), hsl(213,87%,20%) 95%);
|
||||||
|
border-color: hsla(214,89%,21%,.9);
|
||||||
|
box-shadow: 0 1px 0 hsla(205,100%,72%,.15) inset,
|
||||||
|
0 0 2px 1px hsla(205,100%,72%,.5) inset,
|
||||||
|
0 -1px 0 hsla(205,100%,72%,.2) inset;
|
||||||
|
}
|
||||||
|
#appmenu-button:hover:active,
|
||||||
|
#appmenu-button[open] {
|
||||||
|
background-image: -moz-linear-gradient(hsl(208,95%,30%), hsl(214,85%,17%) 95%);
|
||||||
|
box-shadow: 0 2px 3px rgba(0,0,0,.4) inset,
|
||||||
|
0 1px 1px rgba(0,0,0,.2) inset;
|
||||||
|
}
|
||||||
|
%else
|
||||||
|
#appmenu-button {
|
||||||
|
background-image: -moz-linear-gradient(hsl(211,33%,32%), hsl(209,53%,10%) 95%);
|
||||||
|
border-color: hsla(210,59%,13%,.9);
|
||||||
|
box-shadow: 0 1px 0 hsla(210,48%,90%,.15) inset,
|
||||||
|
0 0 2px 1px hsla(211,65%,85%,.15) inset;
|
||||||
|
}
|
||||||
|
#appmenu-button:hover:not(:active):not([open]) {
|
||||||
|
background-image: -moz-radial-gradient(center bottom, farthest-side, hsla(210,48%,90%,.5) 10%, hsla(210,48%,90%,0) 70%),
|
||||||
|
-moz-radial-gradient(center bottom, farthest-side, hsla(211,70%,83%,.5), hsla(211,70%,83%,0)),
|
||||||
|
-moz-linear-gradient(hsl(211,33%,32%), hsl(209,53%,10%) 95%);
|
||||||
|
border-color: hsla(210,59%,13%,.9);
|
||||||
|
box-shadow: 0 1px 0 hsla(210,48%,90%,.15) inset,
|
||||||
|
0 0 2px 1px hsla(210,48%,90%,.4) inset,
|
||||||
|
0 -1px 0 hsla(210,48%,90%,.2) inset;
|
||||||
|
}
|
||||||
|
#appmenu-button:hover:active,
|
||||||
|
#appmenu-button[open] {
|
||||||
|
background-image: -moz-linear-gradient(hsl(211,33%,26%), hsl(209,53%,6%) 95%);
|
||||||
|
box-shadow: 0 2px 3px rgba(0,0,0,.4) inset,
|
||||||
|
0 1px 1px rgba(0,0,0,.2) inset;
|
||||||
|
}
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
|
#main-window[privatebrowsingmode=temporary] #appmenu-button {
|
||||||
|
background-image: -moz-linear-gradient(rgb(153,38,211), rgb(105,19,163) 95%);
|
||||||
|
border-color: rgba(43,8,65,.9);
|
||||||
|
}
|
||||||
|
|
||||||
#main-window[privatebrowsingmode=temporary] #appmenu-button:hover:not(:active):not([open]) {
|
#main-window[privatebrowsingmode=temporary] #appmenu-button:hover:not(:active):not([open]) {
|
||||||
background-image: -moz-radial-gradient(center bottom, farthest-side, rgba(240,193,255,.5) 10%, rgba(240,193,255,0) 70%),
|
background-image: -moz-radial-gradient(center bottom, farthest-side, rgba(240,193,255,.5) 10%, rgba(240,193,255,0) 70%),
|
||||||
|
@ -187,14 +260,6 @@
|
||||||
0 -1px 0 rgba(240,193,255,.5) inset;
|
0 -1px 0 rgba(240,193,255,.5) inset;
|
||||||
}
|
}
|
||||||
|
|
||||||
#appmenu-button:hover:active,
|
|
||||||
#appmenu-button[open] {
|
|
||||||
background-image: -moz-linear-gradient(rgb(246,170,69), rgb(209,74,0) 95%);
|
|
||||||
border-radius: 0;
|
|
||||||
box-shadow: 0 2px 3px rgba(0,0,0,.4) inset,
|
|
||||||
0 1px 1px rgba(0,0,0,.2) inset;
|
|
||||||
}
|
|
||||||
|
|
||||||
#main-window[privatebrowsingmode=temporary] #appmenu-button:hover:active,
|
#main-window[privatebrowsingmode=temporary] #appmenu-button:hover:active,
|
||||||
#main-window[privatebrowsingmode=temporary] #appmenu-button[open] {
|
#main-window[privatebrowsingmode=temporary] #appmenu-button[open] {
|
||||||
background-image: -moz-linear-gradient(rgb(144,20,207), rgb(95,0,158) 95%);
|
background-image: -moz-linear-gradient(rgb(144,20,207), rgb(95,0,158) 95%);
|
||||||
|
@ -582,6 +647,10 @@ menuitem.bookmark-item {
|
||||||
list-style-image: url("chrome://browser/skin/Toolbar.png");
|
list-style-image: url("chrome://browser/skin/Toolbar.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.toolbarbutton-1:-moz-lwtheme-brighttext {
|
||||||
|
list-style-image: url("chrome://browser/skin/Toolbar-inverted.png");
|
||||||
|
}
|
||||||
|
|
||||||
.toolbarbutton-1:not([type="menu-button"]) {
|
.toolbarbutton-1:not([type="menu-button"]) {
|
||||||
-moz-box-orient: vertical;
|
-moz-box-orient: vertical;
|
||||||
}
|
}
|
||||||
|
@ -596,19 +665,18 @@ menuitem.bookmark-item {
|
||||||
counter-reset: smallicons;
|
counter-reset: smallicons;
|
||||||
}
|
}
|
||||||
|
|
||||||
#navigator-toolbox[iconsize=small] > #nav-bar {
|
@navbarLargeIcons@ {
|
||||||
padding-top: 1px;
|
|
||||||
padding-bottom: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#navigator-toolbox[iconsize=large][mode=icons] > #nav-bar {
|
|
||||||
-moz-padding-start: 0;
|
-moz-padding-start: 0;
|
||||||
-moz-padding-end: 2px;
|
-moz-padding-end: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button,
|
@navbarLargeIcons@ :-moz-any(@primaryToolbarButtons@):not(#alltabs-button):not(#tabview-button):not(#new-tab-button) > .toolbarbutton-icon {
|
||||||
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker,
|
list-style-image: url("chrome://browser/skin/Toolbar.png") !important;
|
||||||
#nav-bar .toolbarbutton-1 {
|
}
|
||||||
|
|
||||||
|
@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-button,
|
||||||
|
@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker,
|
||||||
|
@navbarLargeIcons@ .toolbarbutton-1 {
|
||||||
-moz-appearance: none;
|
-moz-appearance: none;
|
||||||
padding: 1px 5px;
|
padding: 1px 5px;
|
||||||
background: rgba(151,152,153,.05)
|
background: rgba(151,152,153,.05)
|
||||||
|
@ -624,14 +692,12 @@ menuitem.bookmark-item {
|
||||||
text-shadow: 0 0 2px white;
|
text-shadow: 0 0 2px white;
|
||||||
}
|
}
|
||||||
|
|
||||||
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker,
|
@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
|
||||||
#navigator-toolbox[iconsize="small"][mode="icons"] > #nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button,
|
|
||||||
#navigator-toolbox[iconsize="small"][mode="icons"] > #nav-bar .toolbarbutton-1 {
|
|
||||||
padding-left: 3px;
|
padding-left: 3px;
|
||||||
padding-right: 3px;
|
padding-right: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#nav-bar .toolbarbutton-1[type="menu-button"] {
|
@navbarLargeIcons@ .toolbarbutton-1[type="menu-button"] {
|
||||||
-moz-appearance: none;
|
-moz-appearance: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
background: none !important;
|
background: none !important;
|
||||||
|
@ -639,44 +705,39 @@ menuitem.bookmark-item {
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#nav-bar .toolbarbutton-1 {
|
@navbarLargeIcons@ .toolbarbutton-1 {
|
||||||
margin: 1px 3px;
|
margin: 1px 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#navigator-toolbox[iconsize="small"][mode="icons"] > #nav-bar .toolbarbutton-1 {
|
@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
|
||||||
margin-left: 2px;
|
|
||||||
margin-right: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
|
|
||||||
-moz-border-start-style: none;
|
-moz-border-start-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button:-moz-locale-dir(ltr),
|
@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-button:-moz-locale-dir(ltr),
|
||||||
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:-moz-locale-dir(rtl) {
|
@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:-moz-locale-dir(rtl) {
|
||||||
border-top-right-radius: 0;
|
border-top-right-radius: 0;
|
||||||
border-bottom-right-radius: 0;
|
border-bottom-right-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button:-moz-locale-dir(rtl),
|
@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-button:-moz-locale-dir(rtl),
|
||||||
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:-moz-locale-dir(ltr) {
|
@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:-moz-locale-dir(ltr) {
|
||||||
border-top-left-radius: 0;
|
border-top-left-radius: 0;
|
||||||
border-bottom-left-radius: 0;
|
border-bottom-left-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#nav-bar .toolbarbutton-1[disabled="true"] {
|
@navbarLargeIcons@ .toolbarbutton-1[disabled="true"] {
|
||||||
opacity: .4;
|
opacity: .4;
|
||||||
}
|
}
|
||||||
|
|
||||||
#nav-bar .toolbarbutton-1[disabled="true"] > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
|
@navbarLargeIcons@ .toolbarbutton-1[disabled="true"] > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
|
||||||
#nav-bar .toolbarbutton-1[disabled="true"] > .toolbarbutton-icon {
|
@navbarLargeIcons@ .toolbarbutton-1[disabled="true"] > .toolbarbutton-icon {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled="true"]):not(:active):hover,
|
@navbarLargeIcons@ .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"]),
|
@navbarLargeIcons@ .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,
|
@navbarLargeIcons@ .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 {
|
@navbarLargeIcons@ #back-button:not([disabled="true"]):not([open]):not(:active):hover > .toolbarbutton-icon {
|
||||||
background-color: hsla(190,60%,70%,.5);
|
background-color: hsla(190,60%,70%,.5);
|
||||||
border-color: hsla(190,50%,65%,.8) hsla(190,50%,50%,.8) hsla(190,50%,40%,.8);
|
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,
|
box-shadow: 0 0 0 1px rgba(255,255,255,.3) inset,
|
||||||
|
@ -687,12 +748,12 @@ menuitem.bookmark-item {
|
||||||
box-shadow .3s ease-in;
|
box-shadow .3s ease-in;
|
||||||
}
|
}
|
||||||
|
|
||||||
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled="true"]):hover:active,
|
@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled="true"]):hover:active,
|
||||||
#nav-bar .toolbarbutton-1:hover:active > .toolbarbutton-menubutton-dropmarker:not([disabled="true"]),
|
@navbarLargeIcons@ .toolbarbutton-1:hover:active > .toolbarbutton-menubutton-dropmarker:not([disabled="true"]),
|
||||||
#nav-bar .toolbarbutton-1[open="true"] > .toolbarbutton-menubutton-dropmarker,
|
@navbarLargeIcons@ .toolbarbutton-1[open="true"] > .toolbarbutton-menubutton-dropmarker,
|
||||||
#nav-bar .toolbarbutton-1:not([type="menu-button"]):not([disabled="true"]):hover:active,
|
@navbarLargeIcons@ .toolbarbutton-1:not([type="menu-button"]):not([disabled="true"]):hover:active,
|
||||||
#nav-bar .toolbarbutton-1:not([type="menu-button"])[checked="true"],
|
@navbarLargeIcons@ .toolbarbutton-1:not([type="menu-button"])[checked="true"],
|
||||||
#nav-bar .toolbarbutton-1[open="true"] {
|
@navbarLargeIcons@ .toolbarbutton-1[open="true"] {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border-color: rgba(0,0,0,.65) rgba(0,0,0,.55) rgba(0,0,0,.5);
|
border-color: rgba(0,0,0,.65) rgba(0,0,0,.55) rgba(0,0,0,.5);
|
||||||
box-shadow: 0 0 6.5px rgba(0,0,0,.4) inset,
|
box-shadow: 0 0 6.5px rgba(0,0,0,.4) inset,
|
||||||
|
@ -701,7 +762,7 @@ menuitem.bookmark-item {
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#nav-bar .toolbarbutton-1[checked="true"]:not(:active):hover {
|
@navbarLargeIcons@ .toolbarbutton-1[checked="true"]:not(:active):hover {
|
||||||
background-color: rgba(90%,90%,90%,.4);
|
background-color: rgba(90%,90%,90%,.4);
|
||||||
-moz-transition: background-color .4s;
|
-moz-transition: background-color .4s;
|
||||||
}
|
}
|
||||||
|
@ -711,8 +772,8 @@ menuitem.bookmark-item {
|
||||||
-moz-margin-end: 0;
|
-moz-margin-end: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
|
@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
|
||||||
#nav-bar .toolbarbutton-1:not(:-moz-any(@primaryToolbarButtons@)) > .toolbarbutton-icon {
|
@navbarLargeIcons@ .toolbarbutton-1:not(:-moz-any(@primaryToolbarButtons@)) > .toolbarbutton-icon {
|
||||||
margin: 1px;
|
margin: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -764,37 +825,31 @@ toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
|
||||||
-moz-image-region: rect(0, 36px, 18px, 18px);
|
-moz-image-region: rect(0, 36px, 18px, 18px);
|
||||||
}
|
}
|
||||||
|
|
||||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button {
|
|
||||||
-moz-image-region: rect(18px, 20px, 38px, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
#back-button:-moz-locale-dir(rtl) > .toolbarbutton-icon,
|
#back-button:-moz-locale-dir(rtl) > .toolbarbutton-icon,
|
||||||
#forward-button:-moz-locale-dir(rtl),
|
#forward-button:-moz-locale-dir(rtl),
|
||||||
#forward-button:-moz-locale-dir(rtl) > .toolbarbutton-text {
|
#forward-button:-moz-locale-dir(rtl) > .toolbarbutton-text {
|
||||||
-moz-transform: scaleX(-1);
|
-moz-transform: scaleX(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#nav-bar #back-button {
|
@navbarLargeIcons@ #forward-button {
|
||||||
-moz-margin-end: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#nav-bar #forward-button {
|
|
||||||
border-left-style: none;
|
border-left-style: none;
|
||||||
-moz-margin-start: 0 !important;
|
-moz-margin-start: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#nav-bar #back-button:-moz-locale-dir(ltr) {
|
@navbarLargeIcons@ #back-button:-moz-locale-dir(ltr) {
|
||||||
border-top-right-radius: 0;
|
border-top-right-radius: 0;
|
||||||
border-bottom-right-radius: 0;
|
border-bottom-right-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#nav-bar #back-button:-moz-locale-dir(rtl),
|
@navbarLargeIcons@ #back-button:-moz-locale-dir(rtl),
|
||||||
#nav-bar #forward-button {
|
@navbarLargeIcons@ #forward-button {
|
||||||
border-top-left-radius: 0;
|
border-top-left-radius: 0;
|
||||||
border-bottom-left-radius: 0;
|
border-bottom-left-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button {
|
@navbarLargeIcons@ #back-button {
|
||||||
|
-moz-image-region: rect(18px, 20px, 38px, 0);
|
||||||
|
-moz-margin-end: 0 !important;
|
||||||
margin: -5px 0;
|
margin: -5px 0;
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
|
@ -808,11 +863,11 @@ toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button:-moz-locale-dir(rtl) {
|
@navbarLargeIcons@ #back-button:-moz-locale-dir(rtl) {
|
||||||
border-radius: 10000px 0 0 10000px;
|
border-radius: 10000px 0 0 10000px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button > .toolbarbutton-icon {
|
@navbarLargeIcons@ #back-button > .toolbarbutton-icon {
|
||||||
border-radius: 10000px;
|
border-radius: 10000px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
border: none;
|
border: none;
|
||||||
|
@ -825,7 +880,7 @@ toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
|
||||||
0 1px 1px rgba(0,0,0,.3);
|
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 > .toolbarbutton-icon {
|
@navbarLargeIcons@ #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,
|
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 2px rgba(255,255,255,.1) inset,
|
||||||
0 0 0 1px hsla(190,50%,40%,.3),
|
0 0 0 1px hsla(190,50%,40%,.3),
|
||||||
|
@ -834,16 +889,16 @@ toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
|
||||||
0 0 5px 1px hsl(190,90%,80%);
|
0 0 5px 1px hsl(190,90%,80%);
|
||||||
}
|
}
|
||||||
|
|
||||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button:not([disabled="true"]):hover:active > .toolbarbutton-icon,
|
@navbarLargeIcons@ #back-button:not([disabled="true"]):hover:active > .toolbarbutton-icon,
|
||||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button[open="true"] > .toolbarbutton-icon {
|
@navbarLargeIcons@ #back-button[open="true"] > .toolbarbutton-icon {
|
||||||
box-shadow: 0 0 6.5px rgba(0,0,0,.4) inset,
|
box-shadow: 0 0 6.5px rgba(0,0,0,.4) inset,
|
||||||
0 0 2px rgba(0,0,0,.4) inset,
|
0 0 2px rgba(0,0,0,.4) inset,
|
||||||
0 0 0 1px rgba(0,0,0,.65),
|
0 0 0 1px rgba(0,0,0,.65),
|
||||||
0 2px 0 rgba(255,255,255,.4);
|
0 2px 0 rgba(255,255,255,.4);
|
||||||
}
|
}
|
||||||
|
|
||||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar[currentset*="unified-back-forward-button"],
|
@navbarLargeIcons@[currentset*="unified-back-forward-button"],
|
||||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar:not([currentset]) {
|
@navbarLargeIcons@:not([currentset]) {
|
||||||
padding-top: 3px;
|
padding-top: 3px;
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
@ -853,7 +908,7 @@ toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #forward-button {
|
@navbarLargeIcons@ #forward-button {
|
||||||
/*mask: url(keyhole-forward-mask.svg#mask); XXX: this regresses twinopen */
|
/*mask: url(keyhole-forward-mask.svg#mask); XXX: this regresses twinopen */
|
||||||
mask: url(chrome://browser/content/browser.xul#winstripe-keyhole-forward-mask);
|
mask: url(chrome://browser/content/browser.xul#winstripe-keyhole-forward-mask);
|
||||||
-moz-margin-start: -6px !important;
|
-moz-margin-start: -6px !important;
|
||||||
|
@ -861,7 +916,7 @@ toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
|
||||||
padding-right: 3px;
|
padding-right: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #forward-button:not([disabled="true"]):not(:active):hover {
|
@navbarLargeIcons@ #forward-button:not([disabled="true"]):not(:active):hover {
|
||||||
/*mask: url(keyhole-forward-mask.svg#mask-hover);*/
|
/*mask: url(keyhole-forward-mask.svg#mask-hover);*/
|
||||||
mask: url(chrome://browser/content/browser.xul#winstripe-keyhole-forward-mask-hover);
|
mask: url(chrome://browser/content/browser.xul#winstripe-keyhole-forward-mask-hover);
|
||||||
/* Don't animate the box shadow, as the blur and spread radii affect the mask. */
|
/* Don't animate the box shadow, as the blur and spread radii affect the mask. */
|
||||||
|
@ -895,6 +950,9 @@ toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
|
||||||
#home-button.bookmark-item {
|
#home-button.bookmark-item {
|
||||||
list-style-image: url("chrome://browser/skin/Toolbar.png");
|
list-style-image: url("chrome://browser/skin/Toolbar.png");
|
||||||
}
|
}
|
||||||
|
#home-button.bookmark-item:-moz-lwtheme-brighttext {
|
||||||
|
list-style-image: url("chrome://browser/skin/Toolbar-inverted.png");
|
||||||
|
}
|
||||||
#home-button {
|
#home-button {
|
||||||
-moz-image-region: rect(0, 90px, 18px, 72px);
|
-moz-image-region: rect(0, 90px, 18px, 72px);
|
||||||
}
|
}
|
||||||
|
@ -969,6 +1027,10 @@ toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
|
||||||
list-style-image: url("chrome://browser/skin/Toolbar.png");
|
list-style-image: url("chrome://browser/skin/Toolbar.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#bookmarks-menu-button.bookmark-item:-moz-lwtheme-brighttext {
|
||||||
|
list-style-image: url("chrome://browser/skin/Toolbar-inverted.png");
|
||||||
|
}
|
||||||
|
|
||||||
#bookmarks-menu-button.toolbarbutton-1 {
|
#bookmarks-menu-button.toolbarbutton-1 {
|
||||||
-moz-box-orient: horizontal;
|
-moz-box-orient: horizontal;
|
||||||
}
|
}
|
||||||
|
@ -2458,3 +2520,8 @@ panel[dimmed="true"] {
|
||||||
outline: 1px dashed rgba(255,255,255,0.5);
|
outline: 1px dashed rgba(255,255,255,0.5);
|
||||||
outline-offset: -1px;
|
outline-offset: -1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#highlighter-veil-transparentbox[locked] {
|
||||||
|
box-shadow: 0 0 0 1px black;
|
||||||
|
outline-color: white;
|
||||||
|
}
|
||||||
|
|
|
@ -35,6 +35,7 @@ browser.jar:
|
||||||
skin/classic/browser/reload-stop-go.png
|
skin/classic/browser/reload-stop-go.png
|
||||||
skin/classic/browser/Secure24.png (Secure24.png)
|
skin/classic/browser/Secure24.png (Secure24.png)
|
||||||
skin/classic/browser/Toolbar.png (Toolbar.png)
|
skin/classic/browser/Toolbar.png (Toolbar.png)
|
||||||
|
skin/classic/browser/Toolbar-inverted.png
|
||||||
skin/classic/browser/Go-arrow.png (Go-arrow.png)
|
skin/classic/browser/Go-arrow.png (Go-arrow.png)
|
||||||
* skin/classic/browser/searchbar.css (searchbar.css)
|
* skin/classic/browser/searchbar.css (searchbar.css)
|
||||||
skin/classic/browser/section_collapsed.png
|
skin/classic/browser/section_collapsed.png
|
||||||
|
@ -96,7 +97,6 @@ browser.jar:
|
||||||
skin/classic/browser/tabview/close.png (tabview/close.png)
|
skin/classic/browser/tabview/close.png (tabview/close.png)
|
||||||
skin/classic/browser/tabview/edit-light.png (tabview/edit-light.png)
|
skin/classic/browser/tabview/edit-light.png (tabview/edit-light.png)
|
||||||
skin/classic/browser/tabview/grain.png (tabview/grain.png)
|
skin/classic/browser/tabview/grain.png (tabview/grain.png)
|
||||||
skin/classic/browser/tabview/new-tab.png (tabview/new-tab.png)
|
|
||||||
skin/classic/browser/tabview/search.png (tabview/search.png)
|
skin/classic/browser/tabview/search.png (tabview/search.png)
|
||||||
skin/classic/browser/tabview/stack-expander.png (tabview/stack-expander.png)
|
skin/classic/browser/tabview/stack-expander.png (tabview/stack-expander.png)
|
||||||
skin/classic/browser/tabview/tabview.png (tabview/tabview.png)
|
skin/classic/browser/tabview/tabview.png (tabview/tabview.png)
|
||||||
|
@ -149,6 +149,7 @@ browser.jar:
|
||||||
skin/classic/aero/browser/reload-stop-go.png
|
skin/classic/aero/browser/reload-stop-go.png
|
||||||
skin/classic/aero/browser/Secure24.png (Secure24-aero.png)
|
skin/classic/aero/browser/Secure24.png (Secure24-aero.png)
|
||||||
skin/classic/aero/browser/Toolbar.png
|
skin/classic/aero/browser/Toolbar.png
|
||||||
|
skin/classic/aero/browser/Toolbar-inverted.png
|
||||||
skin/classic/aero/browser/Go-arrow.png (Go-arrow-aero.png)
|
skin/classic/aero/browser/Go-arrow.png (Go-arrow-aero.png)
|
||||||
* skin/classic/aero/browser/searchbar.css (searchbar.css)
|
* skin/classic/aero/browser/searchbar.css (searchbar.css)
|
||||||
skin/classic/aero/browser/section_collapsed.png
|
skin/classic/aero/browser/section_collapsed.png
|
||||||
|
@ -211,7 +212,6 @@ browser.jar:
|
||||||
skin/classic/aero/browser/tabview/close.png (tabview/close.png)
|
skin/classic/aero/browser/tabview/close.png (tabview/close.png)
|
||||||
skin/classic/aero/browser/tabview/edit-light.png (tabview/edit-light.png)
|
skin/classic/aero/browser/tabview/edit-light.png (tabview/edit-light.png)
|
||||||
skin/classic/aero/browser/tabview/grain.png (tabview/grain.png)
|
skin/classic/aero/browser/tabview/grain.png (tabview/grain.png)
|
||||||
skin/classic/aero/browser/tabview/new-tab.png (tabview/new-tab.png)
|
|
||||||
skin/classic/aero/browser/tabview/search.png (tabview/search.png)
|
skin/classic/aero/browser/tabview/search.png (tabview/search.png)
|
||||||
skin/classic/aero/browser/tabview/stack-expander.png (tabview/stack-expander.png)
|
skin/classic/aero/browser/tabview/stack-expander.png (tabview/stack-expander.png)
|
||||||
skin/classic/aero/browser/tabview/tabview.png (tabview/tabview.png)
|
skin/classic/aero/browser/tabview/tabview.png (tabview/tabview.png)
|
||||||
|
|
Двоичные данные
browser/themes/winstripe/browser/tabview/new-tab.png
Двоичные данные
browser/themes/winstripe/browser/tabview/new-tab.png
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 466 B |
|
@ -204,7 +204,7 @@ html[dir=rtl] .tab.focus {
|
||||||
----------------------------------*/
|
----------------------------------*/
|
||||||
|
|
||||||
.groupItem {
|
.groupItem {
|
||||||
cursor: move;
|
cursor: pointer;
|
||||||
background-color: #E0EAF5;
|
background-color: #E0EAF5;
|
||||||
border-radius: 0.4em;
|
border-radius: 0.4em;
|
||||||
box-shadow:
|
box-shadow:
|
||||||
|
@ -398,25 +398,6 @@ html[dir=rtl] .guideTrench {
|
||||||
/* Other
|
/* Other
|
||||||
----------------------------------*/
|
----------------------------------*/
|
||||||
|
|
||||||
.newTabButton {
|
|
||||||
width: 16px;
|
|
||||||
height: 15px;
|
|
||||||
bottom: 10px;
|
|
||||||
left: 10px;
|
|
||||||
cursor: pointer;
|
|
||||||
opacity: .3;
|
|
||||||
background-image: url(chrome://browser/skin/tabview/new-tab.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
html[dir=rtl] .newTabButton {
|
|
||||||
left: auto;
|
|
||||||
right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.newTabButton:hover {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.active {
|
.active {
|
||||||
box-shadow: 5px 5px 3px rgba(0,0,0,.5);
|
box-shadow: 5px 5px 3px rgba(0,0,0,.5);
|
||||||
}
|
}
|
||||||
|
@ -434,6 +415,7 @@ html[dir=rtl] .acceptsDrop {
|
||||||
}
|
}
|
||||||
|
|
||||||
.titlebar {
|
.titlebar {
|
||||||
|
cursor: move;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,6 +102,7 @@ GARBAGE += leaktest.py
|
||||||
libs:: $(_LEAKTEST_FILES)
|
libs:: $(_LEAKTEST_FILES)
|
||||||
$(INSTALL) $^ $(_LEAKTEST_DIR)
|
$(INSTALL) $^ $(_LEAKTEST_DIR)
|
||||||
|
|
||||||
|
ifdef MOZ_VALGRIND
|
||||||
_VALGRIND_DIR = $(DEPTH)/_valgrind
|
_VALGRIND_DIR = $(DEPTH)/_valgrind
|
||||||
GARBAGE_DIRS += $(_VALGRIND_DIR)
|
GARBAGE_DIRS += $(_VALGRIND_DIR)
|
||||||
|
|
||||||
|
@ -112,6 +113,7 @@ _VALGRIND_FILES = \
|
||||||
|
|
||||||
libs:: $(_VALGRIND_FILES)
|
libs:: $(_VALGRIND_FILES)
|
||||||
$(INSTALL) $^ $(_VALGRIND_DIR)
|
$(INSTALL) $^ $(_VALGRIND_DIR)
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef ENABLE_TESTS
|
ifdef ENABLE_TESTS
|
||||||
libs:: $(topsrcdir)/tools/rb/fix_stack_using_bpsyms.py
|
libs:: $(topsrcdir)/tools/rb/fix_stack_using_bpsyms.py
|
||||||
|
|
|
@ -1433,7 +1433,7 @@ case $os in
|
||||||
os=-dicos
|
os=-dicos
|
||||||
;;
|
;;
|
||||||
-android*)
|
-android*)
|
||||||
os=android
|
os=-android
|
||||||
;;
|
;;
|
||||||
-none)
|
-none)
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -96,6 +96,8 @@ class DeviceManagerADB(DeviceManager):
|
||||||
# contains symbolic links, the links are pushed, rather than the linked
|
# contains symbolic links, the links are pushed, rather than the linked
|
||||||
# files; we push file-by-file to get around this limitation
|
# files; we push file-by-file to get around this limitation
|
||||||
try:
|
try:
|
||||||
|
if (not self.dirExists(remoteDir)):
|
||||||
|
self.mkDirs(remoteDir+"/x")
|
||||||
for root, dirs, files in os.walk(localDir):
|
for root, dirs, files in os.walk(localDir):
|
||||||
relRoot = os.path.relpath(root, localDir)
|
relRoot = os.path.relpath(root, localDir)
|
||||||
for file in files:
|
for file in files:
|
||||||
|
|
|
@ -64,24 +64,11 @@ if __name__ == '__main__':
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
automation = Automation()
|
automation = Automation()
|
||||||
|
|
||||||
parser = OptionParser(usage='OBJDIR=path/to/objdir python %prog [NUM_RUNS]')
|
parser = OptionParser()
|
||||||
addCommonOptions(parser)
|
addCommonOptions(parser)
|
||||||
|
|
||||||
options, args = parser.parse_args()
|
options, args = parser.parse_args()
|
||||||
|
|
||||||
if not os.getenv('OBJDIR'):
|
|
||||||
parser.error('Please specify the OBJDIR environment variable.')
|
|
||||||
|
|
||||||
if not args:
|
|
||||||
num_runs = 1
|
|
||||||
else:
|
|
||||||
try:
|
|
||||||
num_runs = int(args[0])
|
|
||||||
except:
|
|
||||||
parser.error('NUM_RUNS argument must be an integer.')
|
|
||||||
if num_runs < 1:
|
|
||||||
parser.error('NUM_RUNS must be greater than zero.')
|
|
||||||
|
|
||||||
debuggerInfo = getDebuggerInfo(".", options.debugger, options.debuggerArgs,
|
debuggerInfo = getDebuggerInfo(".", options.debugger, options.debuggerArgs,
|
||||||
options.debuggerInteractive)
|
options.debuggerInteractive)
|
||||||
|
|
||||||
|
@ -91,21 +78,16 @@ if __name__ == '__main__':
|
||||||
t.start()
|
t.start()
|
||||||
|
|
||||||
automation.setServerInfo("localhost", PORT)
|
automation.setServerInfo("localhost", PORT)
|
||||||
|
automation.initializeProfile(PROFILE_DIRECTORY)
|
||||||
browserEnv = automation.environment()
|
browserEnv = automation.environment()
|
||||||
browserEnv["XPCOM_DEBUG_BREAK"] = "warn"
|
browserEnv["XPCOM_DEBUG_BREAK"] = "warn"
|
||||||
browserEnv["MOZ_JAR_LOG_DIR"] = MOZ_JAR_LOG_DIR
|
browserEnv["MOZ_JAR_LOG_DIR"] = MOZ_JAR_LOG_DIR
|
||||||
|
|
||||||
url = "http://localhost:%d/index.html" % PORT
|
url = "http://localhost:%d/index.html" % PORT
|
||||||
appPath = os.path.join(SCRIPT_DIR, automation.DEFAULT_APP)
|
appPath = os.path.join(SCRIPT_DIR, automation.DEFAULT_APP)
|
||||||
|
status = automation.runApp(url, browserEnv, appPath, PROFILE_DIRECTORY, {},
|
||||||
for i in range(0, num_runs):
|
debuggerInfo=debuggerInfo,
|
||||||
if num_runs != 1:
|
# the profiling HTML doesn't output anything,
|
||||||
print "Starting profiling run %d of %d" % (i + 1, num_runs)
|
# so let's just run this without a timeout
|
||||||
automation.initializeProfile(PROFILE_DIRECTORY)
|
timeout = None)
|
||||||
status = automation.runApp(url, browserEnv, appPath, PROFILE_DIRECTORY, {},
|
sys.exit(status)
|
||||||
debuggerInfo=debuggerInfo,
|
|
||||||
# the profiling HTML doesn't output anything,
|
|
||||||
# so let's just run this without a timeout
|
|
||||||
timeout = None)
|
|
||||||
if status != 0:
|
|
||||||
sys.exit(status)
|
|
||||||
|
|
|
@ -105,9 +105,13 @@ class _MakeContext(object):
|
||||||
makeflags=self.makeflags,
|
makeflags=self.makeflags,
|
||||||
makeoverrides=self.overrides,
|
makeoverrides=self.overrides,
|
||||||
workdir=self.workdir,
|
workdir=self.workdir,
|
||||||
context=self.context, env=self.env, makelevel=self.makelevel,
|
context=self.context,
|
||||||
targets=self.targets, keepgoing=self.options.keepgoing,
|
env=self.env,
|
||||||
silent=self.options.silent)
|
makelevel=self.makelevel,
|
||||||
|
targets=self.targets,
|
||||||
|
keepgoing=self.options.keepgoing,
|
||||||
|
silent=self.options.silent,
|
||||||
|
justprint=self.options.justprint)
|
||||||
|
|
||||||
self.restarts += 1
|
self.restarts += 1
|
||||||
|
|
||||||
|
@ -189,6 +193,9 @@ def main(args, env, cwd, cb):
|
||||||
dest="printdir", default=True)
|
dest="printdir", default=True)
|
||||||
op.add_option('-s', '--silent', action="store_true",
|
op.add_option('-s', '--silent', action="store_true",
|
||||||
dest="silent", default=False)
|
dest="silent", default=False)
|
||||||
|
op.add_option('-n', '--just-print', '--dry-run', '--recon',
|
||||||
|
action="store_true",
|
||||||
|
dest="justprint", default=False)
|
||||||
|
|
||||||
options, arguments1 = op.parse_args(parsemakeflags(env))
|
options, arguments1 = op.parse_args(parsemakeflags(env))
|
||||||
options, arguments2 = op.parse_args(args, values=options)
|
options, arguments2 = op.parse_args(args, values=options)
|
||||||
|
@ -215,6 +222,9 @@ def main(args, env, cwd, cb):
|
||||||
shortflags.append('s')
|
shortflags.append('s')
|
||||||
options.printdir = False
|
options.printdir = False
|
||||||
|
|
||||||
|
if options.justprint:
|
||||||
|
shortflags.append('n')
|
||||||
|
|
||||||
loglevel = logging.WARNING
|
loglevel = logging.WARNING
|
||||||
if options.verbose:
|
if options.verbose:
|
||||||
loglevel = logging.DEBUG
|
loglevel = logging.DEBUG
|
||||||
|
|
|
@ -1212,13 +1212,13 @@ def getcommandsforrule(rule, target, makefile, prerequisites, stem):
|
||||||
cstring = c.resolvestr(makefile, v)
|
cstring = c.resolvestr(makefile, v)
|
||||||
for cline in splitcommand(cstring):
|
for cline in splitcommand(cstring):
|
||||||
cline, isHidden, isRecursive, ignoreErrors, isNative = findmodifiers(cline)
|
cline, isHidden, isRecursive, ignoreErrors, isNative = findmodifiers(cline)
|
||||||
if isHidden or makefile.silent:
|
if (isHidden or makefile.silent) and not makefile.justprint:
|
||||||
echo = None
|
echo = None
|
||||||
else:
|
else:
|
||||||
echo = "%s$ %s" % (c.loc, cline)
|
echo = "%s$ %s" % (c.loc, cline)
|
||||||
if not isNative:
|
if not isNative:
|
||||||
yield _CommandWrapper(cline, ignoreErrors=ignoreErrors, env=env, cwd=makefile.workdir, loc=c.loc, context=makefile.context,
|
yield _CommandWrapper(cline, ignoreErrors=ignoreErrors, env=env, cwd=makefile.workdir, loc=c.loc, context=makefile.context,
|
||||||
echo=echo)
|
echo=echo, justprint=makefile.justprint)
|
||||||
else:
|
else:
|
||||||
f, s, e = v.get("PYCOMMANDPATH", True)
|
f, s, e = v.get("PYCOMMANDPATH", True)
|
||||||
if e:
|
if e:
|
||||||
|
@ -1226,7 +1226,8 @@ def getcommandsforrule(rule, target, makefile, prerequisites, stem):
|
||||||
yield _NativeWrapper(cline, ignoreErrors=ignoreErrors,
|
yield _NativeWrapper(cline, ignoreErrors=ignoreErrors,
|
||||||
env=env, cwd=makefile.workdir,
|
env=env, cwd=makefile.workdir,
|
||||||
loc=c.loc, context=makefile.context,
|
loc=c.loc, context=makefile.context,
|
||||||
echo=echo, pycommandpath=e)
|
echo=echo, justprint=makefile.justprint,
|
||||||
|
pycommandpath=e)
|
||||||
|
|
||||||
class Rule(object):
|
class Rule(object):
|
||||||
"""
|
"""
|
||||||
|
@ -1372,7 +1373,7 @@ class Makefile(object):
|
||||||
def __init__(self, workdir=None, env=None, restarts=0, make=None,
|
def __init__(self, workdir=None, env=None, restarts=0, make=None,
|
||||||
makeflags='', makeoverrides='',
|
makeflags='', makeoverrides='',
|
||||||
makelevel=0, context=None, targets=(), keepgoing=False,
|
makelevel=0, context=None, targets=(), keepgoing=False,
|
||||||
silent=False):
|
silent=False, justprint=False):
|
||||||
self.defaulttarget = None
|
self.defaulttarget = None
|
||||||
|
|
||||||
if env is None:
|
if env is None:
|
||||||
|
@ -1387,6 +1388,7 @@ class Makefile(object):
|
||||||
self._targets = {}
|
self._targets = {}
|
||||||
self.keepgoing = keepgoing
|
self.keepgoing = keepgoing
|
||||||
self.silent = silent
|
self.silent = silent
|
||||||
|
self.justprint = justprint
|
||||||
self._patternvariables = [] # of (pattern, variables)
|
self._patternvariables = [] # of (pattern, variables)
|
||||||
self.implicitrules = []
|
self.implicitrules = []
|
||||||
self.parsingfinished = False
|
self.parsingfinished = False
|
||||||
|
|
|
@ -14,18 +14,20 @@ if sys.platform=='win32':
|
||||||
|
|
||||||
_log = logging.getLogger('pymake.process')
|
_log = logging.getLogger('pymake.process')
|
||||||
|
|
||||||
_blacklist = re.compile(r'[$><;*?[{~`|&]|\\\n')
|
_escapednewlines = re.compile(r'\\\n')
|
||||||
|
_blacklist = re.compile(r'[$><;*?[{~`|&]')
|
||||||
def clinetoargv(cline):
|
def clinetoargv(cline):
|
||||||
"""
|
"""
|
||||||
If this command line can safely skip the shell, return an argv array.
|
If this command line can safely skip the shell, return an argv array.
|
||||||
@returns argv, badchar
|
@returns argv, badchar
|
||||||
"""
|
"""
|
||||||
|
|
||||||
m = _blacklist.search(cline)
|
str = _escapednewlines.sub('', cline)
|
||||||
|
m = _blacklist.search(str)
|
||||||
if m is not None:
|
if m is not None:
|
||||||
return None, m.group(0)
|
return None, m.group(0)
|
||||||
|
|
||||||
args = shlex.split(cline, comments=True)
|
args = shlex.split(str, comments=True)
|
||||||
|
|
||||||
if len(args) and args[0].find('=') != -1:
|
if len(args) and args[0].find('=') != -1:
|
||||||
return None, '='
|
return None, '='
|
||||||
|
@ -40,7 +42,7 @@ shellwords = (':', '.', 'break', 'cd', 'continue', 'exec', 'exit', 'export',
|
||||||
'printf', 'read', 'shopt', 'source', 'type', 'typeset',
|
'printf', 'read', 'shopt', 'source', 'type', 'typeset',
|
||||||
'ulimit', 'unalias', 'set')
|
'ulimit', 'unalias', 'set')
|
||||||
|
|
||||||
def call(cline, env, cwd, loc, cb, context, echo):
|
def call(cline, env, cwd, loc, cb, context, echo, justprint=False):
|
||||||
#TODO: call this once up-front somewhere and save the result?
|
#TODO: call this once up-front somewhere and save the result?
|
||||||
shell, msys = util.checkmsyscompat()
|
shell, msys = util.checkmsyscompat()
|
||||||
|
|
||||||
|
@ -60,7 +62,8 @@ def call(cline, env, cwd, loc, cb, context, echo):
|
||||||
if len(cline) > 3 and cline[1] == ':' and cline[2] == '/':
|
if len(cline) > 3 and cline[1] == ':' and cline[2] == '/':
|
||||||
cline = '/' + cline[0] + cline[2:]
|
cline = '/' + cline[0] + cline[2:]
|
||||||
cline = [shell, "-c", cline]
|
cline = [shell, "-c", cline]
|
||||||
context.call(cline, shell=not msys, env=env, cwd=cwd, cb=cb, echo=echo)
|
context.call(cline, shell=not msys, env=env, cwd=cwd, cb=cb, echo=echo,
|
||||||
|
justprint=justprint)
|
||||||
return
|
return
|
||||||
|
|
||||||
if not len(argv):
|
if not len(argv):
|
||||||
|
@ -81,12 +84,13 @@ def call(cline, env, cwd, loc, cb, context, echo):
|
||||||
else:
|
else:
|
||||||
executable = None
|
executable = None
|
||||||
|
|
||||||
context.call(argv, executable=executable, shell=False, env=env, cwd=cwd, cb=cb, echo=echo)
|
context.call(argv, executable=executable, shell=False, env=env, cwd=cwd, cb=cb,
|
||||||
|
echo=echo, justprint=justprint)
|
||||||
|
|
||||||
def call_native(module, method, argv, env, cwd, loc, cb, context, echo,
|
def call_native(module, method, argv, env, cwd, loc, cb, context, echo, justprint=False,
|
||||||
pycommandpath=None):
|
pycommandpath=None):
|
||||||
context.call_native(module, method, argv, env=env, cwd=cwd, cb=cb,
|
context.call_native(module, method, argv, env=env, cwd=cwd, cb=cb,
|
||||||
echo=echo, pycommandpath=pycommandpath)
|
echo=echo, justprint=justprint, pycommandpath=pycommandpath)
|
||||||
|
|
||||||
def statustoresult(status):
|
def statustoresult(status):
|
||||||
"""
|
"""
|
||||||
|
@ -242,36 +246,32 @@ class ParallelContext(object):
|
||||||
assert self.jcount > 1 or not len(self.pending), "Serial execution error defering %r %r %r: currently pending %r" % (cb, args, kwargs, self.pending)
|
assert self.jcount > 1 or not len(self.pending), "Serial execution error defering %r %r %r: currently pending %r" % (cb, args, kwargs, self.pending)
|
||||||
self.pending.append((cb, args, kwargs))
|
self.pending.append((cb, args, kwargs))
|
||||||
|
|
||||||
def _docall(self, argv, executable, shell, env, cwd, cb, echo):
|
def _docall_generic(self, pool, job, cb, echo, justprint):
|
||||||
if echo is not None:
|
if echo is not None:
|
||||||
print echo
|
print echo
|
||||||
job = PopenJob(argv, executable=executable, shell=shell, env=env, cwd=cwd)
|
processcb = job.get_callback(ParallelContext._condition)
|
||||||
self.threadpool.apply_async(job_runner, args=(job,), callback=job.get_callback(ParallelContext._condition))
|
if justprint:
|
||||||
|
processcb(0)
|
||||||
|
else:
|
||||||
|
pool.apply_async(job_runner, args=(job,), callback=processcb)
|
||||||
self.running.append((job, cb))
|
self.running.append((job, cb))
|
||||||
|
|
||||||
def _docallnative(self, module, method, argv, env, cwd, cb, echo,
|
def call(self, argv, shell, env, cwd, cb, echo, justprint=False, executable=None):
|
||||||
pycommandpath=None):
|
|
||||||
if echo is not None:
|
|
||||||
print echo
|
|
||||||
job = PythonJob(module, method, argv, env, cwd, pycommandpath)
|
|
||||||
self.processpool.apply_async(job_runner, args=(job,), callback=job.get_callback(ParallelContext._condition))
|
|
||||||
self.running.append((job, cb))
|
|
||||||
|
|
||||||
def call(self, argv, shell, env, cwd, cb, echo, executable=None):
|
|
||||||
"""
|
"""
|
||||||
Asynchronously call the process
|
Asynchronously call the process
|
||||||
"""
|
"""
|
||||||
|
|
||||||
self.defer(self._docall, argv, executable, shell, env, cwd, cb, echo)
|
job = PopenJob(argv, executable=executable, shell=shell, env=env, cwd=cwd)
|
||||||
|
self.defer(self._docall_generic, self.threadpool, job, cb, echo, justprint)
|
||||||
|
|
||||||
def call_native(self, module, method, argv, env, cwd, cb,
|
def call_native(self, module, method, argv, env, cwd, cb,
|
||||||
echo, pycommandpath=None):
|
echo, justprint=False, pycommandpath=None):
|
||||||
"""
|
"""
|
||||||
Asynchronously call the native function
|
Asynchronously call the native function
|
||||||
"""
|
"""
|
||||||
|
|
||||||
self.defer(self._docallnative, module, method, argv, env, cwd, cb,
|
job = PythonJob(module, method, argv, env, cwd, pycommandpath)
|
||||||
echo, pycommandpath)
|
self.defer(self._docall_generic, self.processpool, job, cb, echo, justprint)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _waitany(condition):
|
def _waitany(condition):
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
## $(TOUCH) and $(RM) are native commands in pymake.
|
||||||
|
## Test that pymake --just-print just prints them.
|
||||||
|
|
||||||
|
ifndef TOUCH
|
||||||
|
TOUCH = touch
|
||||||
|
endif
|
||||||
|
|
||||||
|
all:
|
||||||
|
$(RM) justprint-native-file1.txt
|
||||||
|
$(TOUCH) justprint-native-file2.txt
|
||||||
|
$(MAKE) --just-print -f $(TESTPATH)/justprint-native.mk justprint_target > justprint.log
|
||||||
|
# make --just-print shouldn't have actually done anything.
|
||||||
|
test ! -f justprint-native-file1.txt
|
||||||
|
test -f justprint-native-file2.txt
|
||||||
|
# but it should have printed each command
|
||||||
|
grep -q 'touch justprint-native-file1.txt' justprint.log
|
||||||
|
grep -q 'rm -f justprint-native-file2.txt' justprint.log
|
||||||
|
grep -q 'this string is "unlikely to appear in the log by chance"' justprint.log
|
||||||
|
# tidy up
|
||||||
|
$(RM) justprint-native-file2.txt
|
||||||
|
@echo TEST-PASS
|
||||||
|
|
||||||
|
justprint_target:
|
||||||
|
$(TOUCH) justprint-native-file1.txt
|
||||||
|
$(RM) justprint-native-file2.txt
|
||||||
|
this string is "unlikely to appear in the log by chance"
|
||||||
|
|
||||||
|
.PHONY: justprint_target
|
|
@ -0,0 +1,5 @@
|
||||||
|
#T commandline: ['-n']
|
||||||
|
|
||||||
|
all:
|
||||||
|
false # without -n, we wouldn't get past this
|
||||||
|
TEST-PASS # heh
|
|
@ -1,4 +1,4 @@
|
||||||
#T returncode: 1
|
#T returncode: 2
|
||||||
all:
|
all:
|
||||||
mkdir newdir/subdir
|
mkdir newdir/subdir
|
||||||
test ! -d newdir/subdir
|
test ! -d newdir/subdir
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
#T gmake skip
|
||||||
|
|
||||||
|
# Test that we handle \\\n properly
|
||||||
|
|
||||||
|
all: dep1 dep2 dep3
|
||||||
|
cat testfile
|
||||||
|
test `cat testfile` = "data";
|
||||||
|
test "$$(cat results)" = "$(EXPECTED)";
|
||||||
|
@echo TEST-PASS
|
||||||
|
|
||||||
|
# Test that something that still needs to go to the shell works
|
||||||
|
testfile:
|
||||||
|
printf "data" \
|
||||||
|
>>$@
|
||||||
|
|
||||||
|
dep1: testfile
|
||||||
|
|
||||||
|
# Test that something that does not need to go to the shell works
|
||||||
|
dep2:
|
||||||
|
$(echo foo) \
|
||||||
|
$(echo bar)
|
||||||
|
|
||||||
|
export EXPECTED := some data
|
||||||
|
|
||||||
|
CMD = %pycmd writeenvtofile
|
||||||
|
PYCOMMANDPATH = $(TESTPATH)
|
||||||
|
|
||||||
|
dep3:
|
||||||
|
$(CMD) \
|
||||||
|
results EXPECTED
|
|
@ -78,12 +78,15 @@ def runTest(makefile, make, logfile, options):
|
||||||
logfd.close()
|
logfd.close()
|
||||||
|
|
||||||
if stdout.find('TEST-FAIL') != -1:
|
if stdout.find('TEST-FAIL') != -1:
|
||||||
|
print stdout
|
||||||
return False, "FAIL (TEST-FAIL printed)"
|
return False, "FAIL (TEST-FAIL printed)"
|
||||||
|
|
||||||
if options['grepfor'] and stdout.find(options['grepfor']) == -1:
|
if options['grepfor'] and stdout.find(options['grepfor']) == -1:
|
||||||
return False, "FAIL (%s not in output)" % options['grepfor']
|
print stdout
|
||||||
|
return False, "FAIL (%s not in output)" % options['grepfor']
|
||||||
|
|
||||||
if options['returncode'] == 0 and stdout.find('TEST-PASS') == -1:
|
if options['returncode'] == 0 and stdout.find('TEST-PASS') == -1:
|
||||||
|
print stdout
|
||||||
return False, 'FAIL (No TEST-PASS printed)'
|
return False, 'FAIL (No TEST-PASS printed)'
|
||||||
|
|
||||||
if options['returncode'] != 0:
|
if options['returncode'] != 0:
|
||||||
|
@ -123,6 +126,7 @@ for makefile in makefiles:
|
||||||
|
|
||||||
mdata = open(makefile)
|
mdata = open(makefile)
|
||||||
for line in mdata:
|
for line in mdata:
|
||||||
|
line = line.strip()
|
||||||
m = tre.search(line)
|
m = tre.search(line)
|
||||||
if m is None:
|
if m is None:
|
||||||
break
|
break
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
VPATH = foo bar
|
||||||
|
|
||||||
|
$(shell \
|
||||||
|
mkdir bar; touch bar/test.source; \
|
||||||
|
sleep 2; \
|
||||||
|
mkdir foo; touch foo/tfile1; \
|
||||||
|
touch bar/tfile2 bar/tfile3 bar/test.objtest; \
|
||||||
|
)
|
||||||
|
|
||||||
|
all: tfile1 tfile2 tfile3 test.objtest test.source
|
||||||
|
test "$^" = "foo/tfile1 bar/tfile2 bar/tfile3 bar/test.objtest bar/test.source"
|
||||||
|
@echo TEST-PASS
|
||||||
|
|
||||||
|
tfile3: test.objtest
|
||||||
|
|
||||||
|
%.objtest: %.source
|
||||||
|
test "$<" = bar/test.source
|
||||||
|
test "$@" = test.objtest
|
|
@ -86,7 +86,11 @@ def main(args=sys.argv[1:]):
|
||||||
parser.add_option('--report-first', dest='report_first',
|
parser.add_option('--report-first', dest='report_first',
|
||||||
default=False, action='store_true',
|
default=False, action='store_true',
|
||||||
help="report the first error only (all tests will still run)")
|
help="report the first error only (all tests will still run)")
|
||||||
|
parser.add_option('-q', '--quiet', dest='quiet',
|
||||||
|
default=False, action='store_true',
|
||||||
|
help="minimize output")
|
||||||
options, args = parser.parse_args(args)
|
options, args = parser.parse_args(args)
|
||||||
|
quiet = options.__dict__.pop('quiet')
|
||||||
|
|
||||||
# run the tests
|
# run the tests
|
||||||
results = run_tests(**options.__dict__)
|
results = run_tests(**options.__dict__)
|
||||||
|
@ -99,6 +103,12 @@ def main(args=sys.argv[1:]):
|
||||||
break
|
break
|
||||||
if failed:
|
if failed:
|
||||||
sys.exit(1) # error
|
sys.exit(1) # error
|
||||||
|
if not quiet:
|
||||||
|
# print results
|
||||||
|
print "manifestparser.py: All tests pass!"
|
||||||
|
for test in sorted(results.keys()):
|
||||||
|
result = results[test]
|
||||||
|
print "%s: failed=%s, attempted=%s" % (test, result[0], result[1])
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
|
@ -0,0 +1,93 @@
|
||||||
|
# ***** 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 mozilla.org
|
||||||
|
#
|
||||||
|
# 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):
|
||||||
|
# Mike Hommey <mh@glandium.org>
|
||||||
|
#
|
||||||
|
# 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 *****
|
||||||
|
|
||||||
|
# This script returns the number of items for the DW_AT_ranges corresponding
|
||||||
|
# to a given compilation unit. This is used as a helper to find a bug in some
|
||||||
|
# versions of GNU ld.
|
||||||
|
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
import re
|
||||||
|
|
||||||
|
def get_range_for(compilation_unit, debug_info):
|
||||||
|
'''Returns the range offset for a given compilation unit
|
||||||
|
in a given debug_info.'''
|
||||||
|
name = ranges = ''
|
||||||
|
search_cu = False
|
||||||
|
for nfo in debug_info.splitlines():
|
||||||
|
if 'DW_TAG_compile_unit' in nfo:
|
||||||
|
search_cu = True
|
||||||
|
elif 'DW_TAG_' in nfo or not nfo.strip():
|
||||||
|
if name == compilation_unit:
|
||||||
|
return int(ranges, 0)
|
||||||
|
name = ranges = ''
|
||||||
|
search_cu = False
|
||||||
|
if search_cu:
|
||||||
|
if 'DW_AT_name' in nfo:
|
||||||
|
name = nfo.rsplit(None, 1)[1]
|
||||||
|
elif 'DW_AT_ranges' in nfo:
|
||||||
|
ranges = nfo.rsplit(None, 1)[1]
|
||||||
|
return None
|
||||||
|
|
||||||
|
def get_range_length(range, debug_ranges):
|
||||||
|
'''Returns the number of items in the range starting at the
|
||||||
|
given offset.'''
|
||||||
|
length = 0
|
||||||
|
for line in debug_ranges.splitlines():
|
||||||
|
m = re.match('\s*([0-9a-fA-F]+)\s+([0-9a-fA-F]+)\s+([0-9a-fA-F]+)', line)
|
||||||
|
if m and int(m.group(1), 0) == range:
|
||||||
|
length += 1
|
||||||
|
return length
|
||||||
|
|
||||||
|
def main(bin, compilation_unit):
|
||||||
|
p = subprocess.Popen(['objdump', '-W', bin], stdout = subprocess.PIPE, stderr = subprocess.PIPE)
|
||||||
|
(out, err) = p.communicate()
|
||||||
|
sections = re.split('\n(Contents of the|The section) ', out)
|
||||||
|
debug_info = [s for s in sections if s.startswith('.debug_info')]
|
||||||
|
debug_ranges = [s for s in sections if s.startswith('.debug_ranges')]
|
||||||
|
if not debug_ranges or not debug_info:
|
||||||
|
return 0
|
||||||
|
|
||||||
|
range = get_range_for(compilation_unit, debug_info[0])
|
||||||
|
if range is not None:
|
||||||
|
return get_range_length(range, debug_ranges[0])
|
||||||
|
|
||||||
|
return -1
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
print main(*sys.argv[1:])
|
|
@ -91,7 +91,6 @@
|
||||||
#include "nsIURIFixup.h"
|
#include "nsIURIFixup.h"
|
||||||
#include "nsCDefaultURIFixup.h"
|
#include "nsCDefaultURIFixup.h"
|
||||||
#include "nsIChromeRegistry.h"
|
#include "nsIChromeRegistry.h"
|
||||||
#include "nsPrintfCString.h"
|
|
||||||
#include "nsIContentSecurityPolicy.h"
|
#include "nsIContentSecurityPolicy.h"
|
||||||
#include "nsIAsyncVerifyRedirectCallback.h"
|
#include "nsIAsyncVerifyRedirectCallback.h"
|
||||||
#include "mozilla/Preferences.h"
|
#include "mozilla/Preferences.h"
|
||||||
|
@ -3325,41 +3324,6 @@ nsScriptSecurityManager::Observe(nsISupports* aObject, const char* aTopic,
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////
|
|
||||||
// Default ObjectPrincipalFinder //
|
|
||||||
///////////////////////////////////
|
|
||||||
|
|
||||||
// The default JSSecurityCallbacks::findObjectPrincipals is necessary since
|
|
||||||
// scripts run (and ask for object principals) during startup before
|
|
||||||
// nsJSRuntime::Init() has been called (which resets findObjectPrincipals).
|
|
||||||
|
|
||||||
// Defined NS_EXPORT for linkage with debug-only assert in xpcshell
|
|
||||||
NS_EXPORT JSPrincipals *
|
|
||||||
NS_DefaultObjectPrincipalFinder(JSContext *cx, JSObject *obj)
|
|
||||||
{
|
|
||||||
nsScriptSecurityManager *ssm = nsScriptSecurityManager::GetScriptSecurityManager();
|
|
||||||
if (!ssm) {
|
|
||||||
return nsnull;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsCOMPtr<nsIPrincipal> principal;
|
|
||||||
nsresult rv = ssm->GetObjectPrincipal(cx, obj, getter_AddRefs(principal));
|
|
||||||
if (NS_FAILED(rv) || !principal) {
|
|
||||||
return nsnull;
|
|
||||||
}
|
|
||||||
|
|
||||||
JSPrincipals *jsPrincipals = nsnull;
|
|
||||||
principal->GetJSPrincipals(cx, &jsPrincipals);
|
|
||||||
|
|
||||||
// nsIPrincipal::GetJSPrincipals() returns a strong reference to the
|
|
||||||
// JS principals, but the caller of this function expects a weak
|
|
||||||
// reference. So we need to release here.
|
|
||||||
|
|
||||||
JSPRINCIPALS_DROP(cx, jsPrincipals);
|
|
||||||
|
|
||||||
return jsPrincipals;
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////
|
/////////////////////////////////////////////
|
||||||
// Constructor, Destructor, Initialization //
|
// Constructor, Destructor, Initialization //
|
||||||
/////////////////////////////////////////////
|
/////////////////////////////////////////////
|
||||||
|
@ -3432,7 +3396,7 @@ nsresult nsScriptSecurityManager::Init()
|
||||||
static JSSecurityCallbacks securityCallbacks = {
|
static JSSecurityCallbacks securityCallbacks = {
|
||||||
CheckObjectAccess,
|
CheckObjectAccess,
|
||||||
NULL,
|
NULL,
|
||||||
NS_DefaultObjectPrincipalFinder,
|
NULL,
|
||||||
ContentSecurityPolicyPermitsJSAction
|
ContentSecurityPolicyPermitsJSAction
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -86,6 +86,8 @@ nsSystemPrincipal::Release()
|
||||||
// Methods implementing nsIPrincipal //
|
// Methods implementing nsIPrincipal //
|
||||||
///////////////////////////////////////
|
///////////////////////////////////////
|
||||||
|
|
||||||
|
#define SYSTEM_PRINCIPAL_SPEC "[System Principal]"
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsSystemPrincipal::GetPreferences(char** aPrefName, char** aID,
|
nsSystemPrincipal::GetPreferences(char** aPrefName, char** aID,
|
||||||
char** aSubjectName,
|
char** aSubjectName,
|
||||||
|
@ -195,7 +197,7 @@ nsSystemPrincipal::GetURI(nsIURI** aURI)
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsSystemPrincipal::GetOrigin(char** aOrigin)
|
nsSystemPrincipal::GetOrigin(char** aOrigin)
|
||||||
{
|
{
|
||||||
*aOrigin = ToNewCString(NS_LITERAL_CSTRING("[System Principal]"));
|
*aOrigin = ToNewCString(NS_LITERAL_CSTRING(SYSTEM_PRINCIPAL_SPEC));
|
||||||
return *aOrigin ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
|
return *aOrigin ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -308,11 +310,6 @@ nsSystemPrincipal::nsSystemPrincipal()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't rename the system principal!
|
|
||||||
// The JS engine (NewCompartment) relies on this name.
|
|
||||||
// XXX: bug 669123 will fix this hack.
|
|
||||||
#define SYSTEM_PRINCIPAL_SPEC "[System Principal]"
|
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsSystemPrincipal::Init(JSPrincipals **jsprin)
|
nsSystemPrincipal::Init(JSPrincipals **jsprin)
|
||||||
{
|
{
|
||||||
|
|
|
@ -56,9 +56,7 @@ else
|
||||||
HOST_CSRCS = nsinstall.c pathsub.c
|
HOST_CSRCS = nsinstall.c pathsub.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
PLSRCS = nfspwd.pl
|
TARGETS = $(HOST_PROGRAM) $(SIMPLE_PROGRAMS)
|
||||||
|
|
||||||
TARGETS = $(HOST_PROGRAM) $(PLSRCS:.pl=) $(SIMPLE_PROGRAMS)
|
|
||||||
|
|
||||||
ifndef CROSS_COMPILE
|
ifndef CROSS_COMPILE
|
||||||
ifdef USE_ELF_DYNSTR_GC
|
ifdef USE_ELF_DYNSTR_GC
|
||||||
|
|
|
@ -163,6 +163,13 @@ MKDIR ?= mkdir
|
||||||
SLEEP ?= sleep
|
SLEEP ?= sleep
|
||||||
TOUCH ?= touch
|
TOUCH ?= touch
|
||||||
|
|
||||||
|
ifndef .PYMAKE
|
||||||
|
PYTHONPATH = $(PYTHON) $(topsrcdir)/config/pythonpath.py
|
||||||
|
else
|
||||||
|
PYCOMMANDPATH += $(topsrcdir)/config
|
||||||
|
PYTHONPATH = %pythonpath main
|
||||||
|
endif
|
||||||
|
|
||||||
# determine debug-related options
|
# determine debug-related options
|
||||||
_DEBUG_CFLAGS :=
|
_DEBUG_CFLAGS :=
|
||||||
_DEBUG_LDFLAGS :=
|
_DEBUG_LDFLAGS :=
|
||||||
|
@ -384,7 +391,6 @@ MY_RULES := $(DEPTH)/config/myrules.mk
|
||||||
# Default command macros; can be overridden in <arch>.mk.
|
# Default command macros; can be overridden in <arch>.mk.
|
||||||
#
|
#
|
||||||
CCC = $(CXX)
|
CCC = $(CXX)
|
||||||
NFSPWD = $(CONFIG_TOOLS)/nfspwd
|
|
||||||
PURIFY = purify $(PURIFYOPTIONS)
|
PURIFY = purify $(PURIFYOPTIONS)
|
||||||
QUANTIFY = quantify $(QUANTIFYOPTIONS)
|
QUANTIFY = quantify $(QUANTIFYOPTIONS)
|
||||||
ifdef CROSS_COMPILE
|
ifdef CROSS_COMPILE
|
||||||
|
@ -677,27 +683,24 @@ endif # NSINSTALL_BIN
|
||||||
ifeq (,$(CROSS_COMPILE)$(filter-out WINNT OS2, $(OS_ARCH)))
|
ifeq (,$(CROSS_COMPILE)$(filter-out WINNT OS2, $(OS_ARCH)))
|
||||||
INSTALL = $(NSINSTALL)
|
INSTALL = $(NSINSTALL)
|
||||||
else
|
else
|
||||||
ifeq ($(NSDISTMODE),copy)
|
|
||||||
# copy files, but preserve source mtime
|
# This isn't laid out as conditional directives so that NSDISTMODE can be
|
||||||
INSTALL = $(NSINSTALL) -t
|
# target-specific.
|
||||||
else
|
INSTALL = $(if $(filter copy, $(NSDISTMODE)), $(NSINSTALL) -t, $(if $(filter absolute_symlink, $(NSDISTMODE)), $(NSINSTALL) -L $(PWD), $(NSINSTALL) -R))
|
||||||
ifeq ($(NSDISTMODE),absolute_symlink)
|
|
||||||
# install using absolute symbolic links
|
|
||||||
ifeq ($(OS_ARCH),Darwin)
|
|
||||||
INSTALL = $(NSINSTALL) -L $(PWD)
|
|
||||||
else
|
|
||||||
INSTALL = $(NSINSTALL) -L `$(NFSPWD)`
|
|
||||||
endif # Darwin
|
|
||||||
else
|
|
||||||
# install using relative symbolic links
|
|
||||||
INSTALL = $(NSINSTALL) -R
|
|
||||||
endif # absolute_symlink
|
|
||||||
endif # copy
|
|
||||||
endif # WINNT/OS2
|
endif # WINNT/OS2
|
||||||
|
|
||||||
# Use nsinstall in copy mode to install files on the system
|
# Use nsinstall in copy mode to install files on the system
|
||||||
SYSINSTALL = $(NSINSTALL) -t
|
SYSINSTALL = $(NSINSTALL) -t
|
||||||
|
|
||||||
|
# Directory nsinstall. Windows and OS/2 nsinstall can't recursively copy
|
||||||
|
# directories.
|
||||||
|
ifneq (,$(filter WINNT os2-emx,$(HOST_OS_ARCH)))
|
||||||
|
DIR_INSTALL = $(PYTHON) $(topsrcdir)/config/nsinstall.py
|
||||||
|
else
|
||||||
|
DIR_INSTALL = $(INSTALL)
|
||||||
|
endif # WINNT/OS2
|
||||||
|
|
||||||
#
|
#
|
||||||
# Localization build automation
|
# Localization build automation
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,66 +0,0 @@
|
||||||
#!perl5
|
|
||||||
#
|
|
||||||
# ***** 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 mozilla.org code.
|
|
||||||
#
|
|
||||||
# The Initial Developer of the Original Code is
|
|
||||||
# Netscape Communications Corporation.
|
|
||||||
# Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
# the Initial Developer. All Rights Reserved.
|
|
||||||
#
|
|
||||||
# Contributor(s):
|
|
||||||
#
|
|
||||||
# Alternatively, the contents of this file may be used under the terms of
|
|
||||||
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
# 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 *****
|
|
||||||
|
|
||||||
sub fastcwd {
|
|
||||||
local($odev, $oino, $cdev, $cino, $tdev, $tino);
|
|
||||||
local(@path, $path);
|
|
||||||
local(*DIR);
|
|
||||||
|
|
||||||
($cdev, $cino) = stat('.');
|
|
||||||
for (;;) {
|
|
||||||
($odev, $oino) = ($cdev, $cino);
|
|
||||||
chdir('..');
|
|
||||||
($cdev, $cino) = stat('.');
|
|
||||||
last if $odev == $cdev && $oino == $cino;
|
|
||||||
opendir(DIR, '.');
|
|
||||||
for (;;) {
|
|
||||||
$_ = readdir(DIR);
|
|
||||||
next if $_ eq '.';
|
|
||||||
next if $_ eq '..';
|
|
||||||
|
|
||||||
last unless $_;
|
|
||||||
($tdev, $tino) = lstat($_);
|
|
||||||
last unless $tdev != $odev || $tino != $oino;
|
|
||||||
}
|
|
||||||
closedir(DIR);
|
|
||||||
unshift(@path, $_);
|
|
||||||
}
|
|
||||||
chdir($path = '/' . join('/', @path));
|
|
||||||
$path;
|
|
||||||
}
|
|
||||||
1;
|
|
|
@ -1,50 +0,0 @@
|
||||||
#! perl
|
|
||||||
#
|
|
||||||
# ***** 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 mozilla.org code.
|
|
||||||
#
|
|
||||||
# The Initial Developer of the Original Code is
|
|
||||||
# Netscape Communications Corporation.
|
|
||||||
# Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
# the Initial Developer. All Rights Reserved.
|
|
||||||
#
|
|
||||||
# Contributor(s):
|
|
||||||
#
|
|
||||||
# Alternatively, the contents of this file may be used under the terms of
|
|
||||||
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
# 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 *****
|
|
||||||
|
|
||||||
require "fastcwd.pl";
|
|
||||||
|
|
||||||
$_ = &fastcwd;
|
|
||||||
if (m@^/[uh]/@o || s@^/tmp_mnt/@/@o) {
|
|
||||||
print("$_\n");
|
|
||||||
} elsif ((($user, $rest) = m@^/usr/people/(\w+)/(.*)@o)
|
|
||||||
&& readlink("/u/$user") eq "/usr/people/$user") {
|
|
||||||
print("/u/$user/$rest\n");
|
|
||||||
} else {
|
|
||||||
chop($host = `hostname`);
|
|
||||||
print("/h/$host$_\n");
|
|
||||||
}
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче