Merge mozilla-central
@ -119,7 +119,7 @@ interface nsIAccessibleRelation : nsISupports
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This object is a transient component related to the target object. When
|
* This object is a transient component related to the target object. When
|
||||||
* this object is activated the target object doesn't loose focus.
|
* this object is activated the target object doesn't lose focus.
|
||||||
*/
|
*/
|
||||||
const unsigned long RELATION_POPUP_FOR = 0x0c;
|
const unsigned long RELATION_POPUP_FOR = 0x0c;
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
#include "nsIAccessible.h"
|
#include "nsIAccessible.h"
|
||||||
#include "nsAccessibilityAtoms.h"
|
#include "nsAccessibilityAtoms.h"
|
||||||
#include "nsHashtable.h"
|
#include "nsHashtable.h"
|
||||||
#include "nsIAccessibilityService.h"
|
#include "nsAccessibilityService.h"
|
||||||
#include "nsIAccessibleDocument.h"
|
#include "nsIAccessibleDocument.h"
|
||||||
#include "nsIDocShell.h"
|
#include "nsIDocShell.h"
|
||||||
#include "nsIDocShellTreeItem.h"
|
#include "nsIDocShellTreeItem.h"
|
||||||
@ -82,27 +82,19 @@ nsIStringBundle *nsAccessNode::gStringBundle = 0;
|
|||||||
nsIStringBundle *nsAccessNode::gKeyStringBundle = 0;
|
nsIStringBundle *nsAccessNode::gKeyStringBundle = 0;
|
||||||
nsITimer *nsAccessNode::gDoCommandTimer = 0;
|
nsITimer *nsAccessNode::gDoCommandTimer = 0;
|
||||||
nsIDOMNode *nsAccessNode::gLastFocusedNode = 0;
|
nsIDOMNode *nsAccessNode::gLastFocusedNode = 0;
|
||||||
|
#ifdef DEBUG
|
||||||
PRBool nsAccessNode::gIsAccessibilityActive = PR_FALSE;
|
PRBool nsAccessNode::gIsAccessibilityActive = PR_FALSE;
|
||||||
PRBool nsAccessNode::gIsShuttingDownApp = PR_FALSE;
|
#endif
|
||||||
PRBool nsAccessNode::gIsCacheDisabled = PR_FALSE;
|
PRBool nsAccessNode::gIsCacheDisabled = PR_FALSE;
|
||||||
PRBool nsAccessNode::gIsFormFillEnabled = PR_FALSE;
|
PRBool nsAccessNode::gIsFormFillEnabled = PR_FALSE;
|
||||||
nsAccessNodeHashtable nsAccessNode::gGlobalDocAccessibleCache;
|
nsAccessNodeHashtable nsAccessNode::gGlobalDocAccessibleCache;
|
||||||
|
|
||||||
nsApplicationAccessibleWrap *nsAccessNode::gApplicationAccessible = nsnull;
|
nsApplicationAccessibleWrap *nsAccessNode::gApplicationAccessible = nsnull;
|
||||||
|
|
||||||
nsIAccessibilityService *nsAccessNode::sAccService = nsnull;
|
nsIAccessibilityService*
|
||||||
nsIAccessibilityService *nsAccessNode::GetAccService()
|
nsAccessNode::GetAccService()
|
||||||
{
|
{
|
||||||
if (!gIsAccessibilityActive)
|
return nsAccessibilityService::GetAccessibilityService();
|
||||||
return nsnull;
|
|
||||||
|
|
||||||
if (!sAccService) {
|
|
||||||
nsresult rv = CallGetService("@mozilla.org/accessibilityService;1",
|
|
||||||
&sAccService);
|
|
||||||
NS_ASSERTION(NS_SUCCEEDED(rv), "No accessibility service");
|
|
||||||
}
|
|
||||||
|
|
||||||
return sAccService;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -245,9 +237,7 @@ NS_IMETHODIMP nsAccessNode::GetOwnerWindow(void **aWindow)
|
|||||||
already_AddRefed<nsApplicationAccessibleWrap>
|
already_AddRefed<nsApplicationAccessibleWrap>
|
||||||
nsAccessNode::GetApplicationAccessible()
|
nsAccessNode::GetApplicationAccessible()
|
||||||
{
|
{
|
||||||
if (!gIsAccessibilityActive) {
|
NS_ASSERTION(gIsAccessibilityActive, "Accessibility wasn't initialized!");
|
||||||
return nsnull;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!gApplicationAccessible) {
|
if (!gApplicationAccessible) {
|
||||||
nsApplicationAccessibleWrap::PreCreate();
|
nsApplicationAccessibleWrap::PreCreate();
|
||||||
@ -273,9 +263,8 @@ nsAccessNode::GetApplicationAccessible()
|
|||||||
|
|
||||||
void nsAccessNode::InitXPAccessibility()
|
void nsAccessNode::InitXPAccessibility()
|
||||||
{
|
{
|
||||||
if (gIsAccessibilityActive) {
|
NS_ASSERTION(!gIsAccessibilityActive,
|
||||||
return;
|
"Accessibility was initialized already!");
|
||||||
}
|
|
||||||
|
|
||||||
nsCOMPtr<nsIStringBundleService> stringBundleService =
|
nsCOMPtr<nsIStringBundleService> stringBundleService =
|
||||||
do_GetService(NS_STRINGBUNDLE_CONTRACTID);
|
do_GetService(NS_STRINGBUNDLE_CONTRACTID);
|
||||||
@ -297,11 +286,13 @@ void nsAccessNode::InitXPAccessibility()
|
|||||||
prefBranch->GetBoolPref("browser.formfill.enable", &gIsFormFillEnabled);
|
prefBranch->GetBoolPref("browser.formfill.enable", &gIsFormFillEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
gIsAccessibilityActive = PR_TRUE;
|
gIsAccessibilityActive = PR_TRUE;
|
||||||
NotifyA11yInitOrShutdown();
|
#endif
|
||||||
|
NotifyA11yInitOrShutdown(PR_TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void nsAccessNode::NotifyA11yInitOrShutdown()
|
void nsAccessNode::NotifyA11yInitOrShutdown(PRBool aIsInit)
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIObserverService> obsService =
|
nsCOMPtr<nsIObserverService> obsService =
|
||||||
do_GetService("@mozilla.org/observer-service;1");
|
do_GetService("@mozilla.org/observer-service;1");
|
||||||
@ -310,7 +301,7 @@ void nsAccessNode::NotifyA11yInitOrShutdown()
|
|||||||
static const PRUnichar kInitIndicator[] = { '1', 0 };
|
static const PRUnichar kInitIndicator[] = { '1', 0 };
|
||||||
static const PRUnichar kShutdownIndicator[] = { '0', 0 };
|
static const PRUnichar kShutdownIndicator[] = { '0', 0 };
|
||||||
obsService->NotifyObservers(nsnull, "a11y-init-or-shutdown",
|
obsService->NotifyObservers(nsnull, "a11y-init-or-shutdown",
|
||||||
gIsAccessibilityActive ? kInitIndicator : kShutdownIndicator);
|
aIsInit ? kInitIndicator : kShutdownIndicator);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -320,16 +311,12 @@ void nsAccessNode::ShutdownXPAccessibility()
|
|||||||
// which happens when xpcom is shutting down
|
// which happens when xpcom is shutting down
|
||||||
// at exit of program
|
// at exit of program
|
||||||
|
|
||||||
if (!gIsAccessibilityActive) {
|
NS_ASSERTION(gIsAccessibilityActive, "Accessibility was shutdown already!");
|
||||||
return;
|
|
||||||
}
|
|
||||||
gIsShuttingDownApp = PR_TRUE;
|
|
||||||
|
|
||||||
NS_IF_RELEASE(gStringBundle);
|
NS_IF_RELEASE(gStringBundle);
|
||||||
NS_IF_RELEASE(gKeyStringBundle);
|
NS_IF_RELEASE(gKeyStringBundle);
|
||||||
NS_IF_RELEASE(gDoCommandTimer);
|
NS_IF_RELEASE(gDoCommandTimer);
|
||||||
NS_IF_RELEASE(gLastFocusedNode);
|
NS_IF_RELEASE(gLastFocusedNode);
|
||||||
NS_IF_RELEASE(sAccService);
|
|
||||||
|
|
||||||
nsApplicationAccessibleWrap::Unload();
|
nsApplicationAccessibleWrap::Unload();
|
||||||
ClearCache(gGlobalDocAccessibleCache);
|
ClearCache(gGlobalDocAccessibleCache);
|
||||||
@ -339,8 +326,10 @@ void nsAccessNode::ShutdownXPAccessibility()
|
|||||||
NS_IF_RELEASE(gApplicationAccessible);
|
NS_IF_RELEASE(gApplicationAccessible);
|
||||||
gApplicationAccessible = nsnull;
|
gApplicationAccessible = nsnull;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
gIsAccessibilityActive = PR_FALSE;
|
gIsAccessibilityActive = PR_FALSE;
|
||||||
NotifyA11yInitOrShutdown();
|
#endif
|
||||||
|
NotifyA11yInitOrShutdown(PR_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
PRBool
|
PRBool
|
||||||
|
@ -174,21 +174,21 @@ protected:
|
|||||||
/**
|
/**
|
||||||
* Notify global nsIObserver's that a11y is getting init'd or shutdown
|
* Notify global nsIObserver's that a11y is getting init'd or shutdown
|
||||||
*/
|
*/
|
||||||
static void NotifyA11yInitOrShutdown();
|
static void NotifyA11yInitOrShutdown(PRBool aIsInit);
|
||||||
|
|
||||||
// Static data, we do our own refcounting for our static data
|
// Static data, we do our own refcounting for our static data
|
||||||
static nsIStringBundle *gStringBundle;
|
static nsIStringBundle *gStringBundle;
|
||||||
static nsIStringBundle *gKeyStringBundle;
|
static nsIStringBundle *gKeyStringBundle;
|
||||||
static nsITimer *gDoCommandTimer;
|
static nsITimer *gDoCommandTimer;
|
||||||
|
#ifdef DEBUG
|
||||||
static PRBool gIsAccessibilityActive;
|
static PRBool gIsAccessibilityActive;
|
||||||
static PRBool gIsShuttingDownApp;
|
#endif
|
||||||
static PRBool gIsCacheDisabled;
|
static PRBool gIsCacheDisabled;
|
||||||
static PRBool gIsFormFillEnabled;
|
static PRBool gIsFormFillEnabled;
|
||||||
|
|
||||||
static nsAccessNodeHashtable gGlobalDocAccessibleCache;
|
static nsAccessNodeHashtable gGlobalDocAccessibleCache;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static nsIAccessibilityService *sAccService;
|
|
||||||
static nsApplicationAccessibleWrap *gApplicationAccessible;
|
static nsApplicationAccessibleWrap *gApplicationAccessible;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -113,6 +113,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
nsAccessibilityService *nsAccessibilityService::gAccessibilityService = nsnull;
|
nsAccessibilityService *nsAccessibilityService::gAccessibilityService = nsnull;
|
||||||
|
PRBool nsAccessibilityService::gIsShutdown = PR_TRUE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nsAccessibilityService
|
* nsAccessibilityService
|
||||||
@ -120,6 +121,7 @@ nsAccessibilityService *nsAccessibilityService::gAccessibilityService = nsnull;
|
|||||||
|
|
||||||
nsAccessibilityService::nsAccessibilityService()
|
nsAccessibilityService::nsAccessibilityService()
|
||||||
{
|
{
|
||||||
|
// Add observers.
|
||||||
nsCOMPtr<nsIObserverService> observerService =
|
nsCOMPtr<nsIObserverService> observerService =
|
||||||
do_GetService("@mozilla.org/observer-service;1");
|
do_GetService("@mozilla.org/observer-service;1");
|
||||||
if (!observerService)
|
if (!observerService)
|
||||||
@ -132,13 +134,15 @@ nsAccessibilityService::nsAccessibilityService()
|
|||||||
nsIWebProgress::NOTIFY_STATE_DOCUMENT |
|
nsIWebProgress::NOTIFY_STATE_DOCUMENT |
|
||||||
nsIWebProgress::NOTIFY_LOCATION);
|
nsIWebProgress::NOTIFY_LOCATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Initialize accessibility.
|
||||||
nsAccessNodeWrap::InitAccessibility();
|
nsAccessNodeWrap::InitAccessibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
nsAccessibilityService::~nsAccessibilityService()
|
nsAccessibilityService::~nsAccessibilityService()
|
||||||
{
|
{
|
||||||
nsAccessibilityService::gAccessibilityService = nsnull;
|
NS_ASSERTION(gIsShutdown, "Accessibility wasn't shutdown!");
|
||||||
nsAccessNodeWrap::ShutdownAccessibility();
|
gAccessibilityService = nsnull;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMPL_THREADSAFE_ISUPPORTS5(nsAccessibilityService, nsIAccessibilityService, nsIAccessibleRetrieval,
|
NS_IMPL_THREADSAFE_ISUPPORTS5(nsAccessibilityService, nsIAccessibilityService, nsIAccessibleRetrieval,
|
||||||
@ -151,6 +155,8 @@ nsAccessibilityService::Observe(nsISupports *aSubject, const char *aTopic,
|
|||||||
const PRUnichar *aData)
|
const PRUnichar *aData)
|
||||||
{
|
{
|
||||||
if (!nsCRT::strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) {
|
if (!nsCRT::strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) {
|
||||||
|
|
||||||
|
// Remove observers.
|
||||||
nsCOMPtr<nsIObserverService> observerService =
|
nsCOMPtr<nsIObserverService> observerService =
|
||||||
do_GetService("@mozilla.org/observer-service;1");
|
do_GetService("@mozilla.org/observer-service;1");
|
||||||
if (observerService) {
|
if (observerService) {
|
||||||
@ -159,8 +165,8 @@ nsAccessibilityService::Observe(nsISupports *aSubject, const char *aTopic,
|
|||||||
nsCOMPtr<nsIWebProgress> progress(do_GetService(NS_DOCUMENTLOADER_SERVICE_CONTRACTID));
|
nsCOMPtr<nsIWebProgress> progress(do_GetService(NS_DOCUMENTLOADER_SERVICE_CONTRACTID));
|
||||||
if (progress)
|
if (progress)
|
||||||
progress->RemoveProgressListener(static_cast<nsIWebProgressListener*>(this));
|
progress->RemoveProgressListener(static_cast<nsIWebProgressListener*>(this));
|
||||||
nsAccessNodeWrap::ShutdownAccessibility();
|
|
||||||
// Cancel and release load timers
|
// Cancel and release load timers.
|
||||||
while (mLoadTimers.Count() > 0 ) {
|
while (mLoadTimers.Count() > 0 ) {
|
||||||
nsCOMPtr<nsITimer> timer = mLoadTimers.ObjectAt(0);
|
nsCOMPtr<nsITimer> timer = mLoadTimers.ObjectAt(0);
|
||||||
void *closure = nsnull;
|
void *closure = nsnull;
|
||||||
@ -172,7 +178,18 @@ nsAccessibilityService::Observe(nsISupports *aSubject, const char *aTopic,
|
|||||||
timer->Cancel();
|
timer->Cancel();
|
||||||
mLoadTimers.RemoveObjectAt(0);
|
mLoadTimers.RemoveObjectAt(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Application is going to be closed, shutdown accessibility and mark
|
||||||
|
// accessibility service as shutdown to prevent calls of its methods.
|
||||||
|
// Don't null accessibility service static member at this point to be safe
|
||||||
|
// if someone will try to operate with it.
|
||||||
|
|
||||||
|
NS_ASSERTION(!gIsShutdown, "Accessibility was shutdown already");
|
||||||
|
|
||||||
|
gIsShutdown = PR_TRUE;
|
||||||
|
nsAccessNodeWrap::ShutdownAccessibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,7 +199,8 @@ NS_IMETHODIMP nsAccessibilityService::OnStateChange(nsIWebProgress *aWebProgress
|
|||||||
{
|
{
|
||||||
NS_ASSERTION(aStateFlags & STATE_IS_DOCUMENT, "Other notifications excluded");
|
NS_ASSERTION(aStateFlags & STATE_IS_DOCUMENT, "Other notifications excluded");
|
||||||
|
|
||||||
if (!aWebProgress || 0 == (aStateFlags & (STATE_START | STATE_STOP))) {
|
if (gIsShutdown || !aWebProgress ||
|
||||||
|
(aStateFlags & (STATE_START | STATE_STOP)) == 0) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -260,23 +278,26 @@ nsAccessibilityService::FireAccessibleEvent(PRUint32 aEvent,
|
|||||||
|
|
||||||
void nsAccessibilityService::StartLoadCallback(nsITimer *aTimer, void *aClosure)
|
void nsAccessibilityService::StartLoadCallback(nsITimer *aTimer, void *aClosure)
|
||||||
{
|
{
|
||||||
nsIAccessibilityService *accService = nsAccessNode::GetAccService();
|
if (gAccessibilityService)
|
||||||
if (accService)
|
gAccessibilityService->
|
||||||
accService->ProcessDocLoadEvent(aTimer, aClosure, nsIAccessibleEvent::EVENT_DOCUMENT_LOAD_START);
|
ProcessDocLoadEvent(aTimer, aClosure,
|
||||||
|
nsIAccessibleEvent::EVENT_DOCUMENT_LOAD_START);
|
||||||
}
|
}
|
||||||
|
|
||||||
void nsAccessibilityService::EndLoadCallback(nsITimer *aTimer, void *aClosure)
|
void nsAccessibilityService::EndLoadCallback(nsITimer *aTimer, void *aClosure)
|
||||||
{
|
{
|
||||||
nsIAccessibilityService *accService = nsAccessNode::GetAccService();
|
if (gAccessibilityService)
|
||||||
if (accService)
|
gAccessibilityService->
|
||||||
accService->ProcessDocLoadEvent(aTimer, aClosure, nsIAccessibleEvent::EVENT_DOCUMENT_LOAD_COMPLETE);
|
ProcessDocLoadEvent(aTimer, aClosure,
|
||||||
|
nsIAccessibleEvent::EVENT_DOCUMENT_LOAD_COMPLETE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void nsAccessibilityService::FailedLoadCallback(nsITimer *aTimer, void *aClosure)
|
void nsAccessibilityService::FailedLoadCallback(nsITimer *aTimer, void *aClosure)
|
||||||
{
|
{
|
||||||
nsIAccessibilityService *accService = nsAccessNode::GetAccService();
|
if (gAccessibilityService)
|
||||||
if (accService)
|
gAccessibilityService->
|
||||||
accService->ProcessDocLoadEvent(aTimer, aClosure, nsIAccessibleEvent::EVENT_DOCUMENT_LOAD_STOPPED);
|
ProcessDocLoadEvent(aTimer, aClosure,
|
||||||
|
nsIAccessibleEvent::EVENT_DOCUMENT_LOAD_STOPPED);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in long aMaxTotalProgress); */
|
/* void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in long aMaxTotalProgress); */
|
||||||
@ -1315,7 +1336,7 @@ NS_IMETHODIMP nsAccessibilityService::GetAccessible(nsIDOMNode *aNode,
|
|||||||
NS_ENSURE_ARG_POINTER(aAccessible);
|
NS_ENSURE_ARG_POINTER(aAccessible);
|
||||||
NS_ENSURE_ARG_POINTER(aFrameHint);
|
NS_ENSURE_ARG_POINTER(aFrameHint);
|
||||||
*aAccessible = nsnull;
|
*aAccessible = nsnull;
|
||||||
if (!aPresShell || !aWeakShell) {
|
if (!aPresShell || !aWeakShell || gIsShutdown) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2056,22 +2077,28 @@ NS_IMETHODIMP nsAccessibilityService::InvalidateSubtreeFor(nsIPresShell *aShell,
|
|||||||
nsresult
|
nsresult
|
||||||
nsAccessibilityService::GetAccessibilityService(nsIAccessibilityService** aResult)
|
nsAccessibilityService::GetAccessibilityService(nsIAccessibilityService** aResult)
|
||||||
{
|
{
|
||||||
NS_PRECONDITION(aResult != nsnull, "null ptr");
|
NS_ENSURE_TRUE(aResult, NS_ERROR_NULL_POINTER);
|
||||||
if (! aResult)
|
|
||||||
return NS_ERROR_NULL_POINTER;
|
|
||||||
|
|
||||||
*aResult = nsnull;
|
*aResult = nsnull;
|
||||||
if (!nsAccessibilityService::gAccessibilityService) {
|
|
||||||
|
if (!gAccessibilityService) {
|
||||||
gAccessibilityService = new nsAccessibilityService();
|
gAccessibilityService = new nsAccessibilityService();
|
||||||
if (!gAccessibilityService ) {
|
NS_ENSURE_TRUE(gAccessibilityService, NS_ERROR_OUT_OF_MEMORY);
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
|
||||||
}
|
gIsShutdown = PR_FALSE;
|
||||||
}
|
}
|
||||||
*aResult = nsAccessibilityService::gAccessibilityService;
|
|
||||||
NS_ADDREF(*aResult);
|
NS_ADDREF(*aResult = gAccessibilityService);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nsIAccessibilityService*
|
||||||
|
nsAccessibilityService::GetAccessibilityService()
|
||||||
|
{
|
||||||
|
NS_ASSERTION(!gIsShutdown,
|
||||||
|
"Going to deal with shutdown accessibility service!");
|
||||||
|
return gAccessibilityService;
|
||||||
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
NS_GetAccessibilityService(nsIAccessibilityService** aResult)
|
NS_GetAccessibilityService(nsIAccessibilityService** aResult)
|
||||||
{
|
{
|
||||||
|
@ -84,6 +84,16 @@ public:
|
|||||||
*/
|
*/
|
||||||
static nsresult GetAccessibilityService(nsIAccessibilityService** aResult);
|
static nsresult GetAccessibilityService(nsIAccessibilityService** aResult);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return cached accessibility service.
|
||||||
|
*/
|
||||||
|
static nsIAccessibilityService* GetAccessibilityService();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates whether accessibility service was shutdown.
|
||||||
|
*/
|
||||||
|
static PRBool gIsShutdown;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* Return presentation shell, DOM node for the given frame.
|
* Return presentation shell, DOM node for the given frame.
|
||||||
|
@ -2495,16 +2495,18 @@ nsAccessible::GetRelationByType(PRUint32 aRelationType,
|
|||||||
return nsRelUtils::AddTarget(aRelationType, aRelation, accTarget);
|
return nsRelUtils::AddTarget(aRelationType, aRelation, accTarget);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If accessible is in its own Window then we should provide NODE_CHILD_OF relation
|
// If accessible is in its own Window, or is the root of a document,
|
||||||
// so that MSAA clients can easily get to true parent instead of getting to oleacc's
|
// then we should provide NODE_CHILD_OF relation so that MSAA clients
|
||||||
// ROLE_WINDOW accessible which will prevent us from going up further (because it is
|
// can easily get to true parent instead of getting to oleacc's
|
||||||
// system generated and has no idea about the hierarchy above it).
|
// ROLE_WINDOW accessible which will prevent us from going up further
|
||||||
|
// (because it is system generated and has no idea about the hierarchy
|
||||||
|
// above it).
|
||||||
nsIFrame *frame = GetFrame();
|
nsIFrame *frame = GetFrame();
|
||||||
if (frame) {
|
if (frame) {
|
||||||
nsIView *view = frame->GetViewExternal();
|
nsIView *view = frame->GetViewExternal();
|
||||||
if (view) {
|
if (view) {
|
||||||
nsIScrollableFrame *scrollFrame = do_QueryFrame(frame);
|
nsIScrollableFrame *scrollFrame = do_QueryFrame(frame);
|
||||||
if (scrollFrame || view->GetWidget()) {
|
if (scrollFrame || view->GetWidget() || !frame->GetParent()) {
|
||||||
nsCOMPtr<nsIAccessible> accTarget;
|
nsCOMPtr<nsIAccessible> accTarget;
|
||||||
GetParent(getter_AddRefs(accTarget));
|
GetParent(getter_AddRefs(accTarget));
|
||||||
return nsRelUtils::AddTarget(aRelationType, aRelation, accTarget);
|
return nsRelUtils::AddTarget(aRelationType, aRelation, accTarget);
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
#include "nsRootAccessible.h"
|
#include "nsRootAccessible.h"
|
||||||
#include "nsAccessibilityAtoms.h"
|
#include "nsAccessibilityAtoms.h"
|
||||||
#include "nsAccessibleEventData.h"
|
#include "nsAccessibleEventData.h"
|
||||||
#include "nsIAccessibilityService.h"
|
#include "nsAccessibilityService.h"
|
||||||
#include "nsIMutableArray.h"
|
#include "nsIMutableArray.h"
|
||||||
#include "nsICommandManager.h"
|
#include "nsICommandManager.h"
|
||||||
#include "nsIDocShell.h"
|
#include "nsIDocShell.h"
|
||||||
@ -106,7 +106,7 @@ nsDocAccessible::nsDocAccessible(nsIDOMNode *aDOMNode, nsIWeakReference* aShell)
|
|||||||
nsIViewManager* vm = shell->GetViewManager();
|
nsIViewManager* vm = shell->GetViewManager();
|
||||||
if (vm) {
|
if (vm) {
|
||||||
nsCOMPtr<nsIWidget> widget;
|
nsCOMPtr<nsIWidget> widget;
|
||||||
vm->GetWidget(getter_AddRefs(widget));
|
vm->GetRootWidget(getter_AddRefs(widget));
|
||||||
if (widget) {
|
if (widget) {
|
||||||
mWnd = widget->GetNativeData(NS_NATIVE_WINDOW);
|
mWnd = widget->GetNativeData(NS_NATIVE_WINDOW);
|
||||||
}
|
}
|
||||||
@ -617,7 +617,17 @@ nsDocAccessible::Init()
|
|||||||
nsCOMPtr<nsIAccessible> parentAccessible; // Ensure outer doc mParent accessible
|
nsCOMPtr<nsIAccessible> parentAccessible; // Ensure outer doc mParent accessible
|
||||||
GetParent(getter_AddRefs(parentAccessible));
|
GetParent(getter_AddRefs(parentAccessible));
|
||||||
|
|
||||||
return nsHyperTextAccessibleWrap::Init();
|
nsresult rv = nsHyperTextAccessibleWrap::Init();
|
||||||
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
|
// Fire reorder event to notify new accessible document has been created and
|
||||||
|
// attached to the tree.
|
||||||
|
nsCOMPtr<nsIAccessibleEvent> reorderEvent =
|
||||||
|
new nsAccReorderEvent(mParent, PR_FALSE, PR_TRUE, mDOMNode);
|
||||||
|
NS_ENSURE_TRUE(reorderEvent, NS_ERROR_OUT_OF_MEMORY);
|
||||||
|
|
||||||
|
FireDelayedAccessibleEvent(reorderEvent);
|
||||||
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
@ -660,7 +670,7 @@ nsDocAccessible::Shutdown()
|
|||||||
// Remove from the cache after other parts of Shutdown(), so that Shutdown() procedures
|
// Remove from the cache after other parts of Shutdown(), so that Shutdown() procedures
|
||||||
// can find the doc or root accessible in the cache if they need it.
|
// can find the doc or root accessible in the cache if they need it.
|
||||||
// We don't do this during ShutdownAccessibility() because that is already clearing the cache
|
// We don't do this during ShutdownAccessibility() because that is already clearing the cache
|
||||||
if (!gIsShuttingDownApp)
|
if (!nsAccessibilityService::gIsShutdown)
|
||||||
gGlobalDocAccessibleCache.Remove(static_cast<void*>(kungFuDeathGripDoc));
|
gGlobalDocAccessibleCache.Remove(static_cast<void*>(kungFuDeathGripDoc));
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
@ -93,7 +93,8 @@ public:
|
|||||||
// nsIScrollPositionListener
|
// nsIScrollPositionListener
|
||||||
NS_IMETHOD ScrollPositionWillChange(nsIScrollableView *aView,
|
NS_IMETHOD ScrollPositionWillChange(nsIScrollableView *aView,
|
||||||
nscoord aX, nscoord aY);
|
nscoord aX, nscoord aY);
|
||||||
virtual void ViewPositionDidChange(nsIScrollableView* aScrollable) {}
|
virtual void ViewPositionDidChange(nsIScrollableView* aScrollable,
|
||||||
|
nsTArray<nsIWidget::Configuration>* aConfigurations) {}
|
||||||
NS_IMETHOD ScrollPositionDidChange(nsIScrollableView *aView,
|
NS_IMETHOD ScrollPositionDidChange(nsIScrollableView *aView,
|
||||||
nscoord aX, nscoord aY);
|
nscoord aX, nscoord aY);
|
||||||
|
|
||||||
|
@ -157,9 +157,12 @@ NS_IMETHODIMP nsRootAccessible::GetParent(nsIAccessible * *aParent)
|
|||||||
NS_ENSURE_ARG_POINTER(aParent);
|
NS_ENSURE_ARG_POINTER(aParent);
|
||||||
*aParent = nsnull;
|
*aParent = nsnull;
|
||||||
|
|
||||||
nsRefPtr<nsApplicationAccessibleWrap> root = GetApplicationAccessible();
|
if (!mParent) {
|
||||||
NS_IF_ADDREF(*aParent = root);
|
nsRefPtr<nsApplicationAccessibleWrap> root = GetApplicationAccessible();
|
||||||
|
mParent = root;
|
||||||
|
}
|
||||||
|
|
||||||
|
NS_IF_ADDREF(*aParent = mParent);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -956,14 +959,12 @@ void nsRootAccessible::FireFocusCallback(nsITimer *aTimer, void *aClosure)
|
|||||||
nsresult
|
nsresult
|
||||||
nsRootAccessible::Init()
|
nsRootAccessible::Init()
|
||||||
{
|
{
|
||||||
nsresult rv = nsDocAccessibleWrap::Init();
|
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
|
|
||||||
nsRefPtr<nsApplicationAccessibleWrap> root = GetApplicationAccessible();
|
nsRefPtr<nsApplicationAccessibleWrap> root = GetApplicationAccessible();
|
||||||
NS_ENSURE_STATE(root);
|
NS_ENSURE_STATE(root);
|
||||||
|
|
||||||
root->AddRootAccessible(this);
|
root->AddRootAccessible(this);
|
||||||
return NS_OK;
|
|
||||||
|
return nsDocAccessibleWrap::Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
|
@ -336,21 +336,33 @@ nsTextEquivUtils::AppendFromValue(nsIAccessible *aAccessible,
|
|||||||
NS_OK : NS_OK_NO_NAME_CLAUSE_HANDLED;
|
NS_OK : NS_OK_NO_NAME_CLAUSE_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsCOMPtr<nsIAccessible> nextSibling;
|
nsRefPtr<nsAccessible> acc = nsAccUtils::QueryAccessible(aAccessible);
|
||||||
aAccessible->GetNextSibling(getter_AddRefs(nextSibling));
|
nsCOMPtr<nsIDOMNode> node;
|
||||||
if (nextSibling) {
|
acc->GetDOMNode(getter_AddRefs(node));
|
||||||
nsCOMPtr<nsIAccessible> parent;
|
NS_ENSURE_STATE(node);
|
||||||
aAccessible->GetParent(getter_AddRefs(parent));
|
|
||||||
if (parent) {
|
|
||||||
nsCOMPtr<nsIAccessible> firstChild;
|
|
||||||
parent->GetFirstChild(getter_AddRefs(firstChild));
|
|
||||||
if (firstChild && firstChild != aAccessible) {
|
|
||||||
nsresult rv = aAccessible->GetValue(text);
|
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
|
|
||||||
return AppendString(aString, text) ?
|
nsCOMPtr<nsIContent> content(do_QueryInterface(node));
|
||||||
NS_OK : NS_OK_NO_NAME_CLAUSE_HANDLED;
|
NS_ENSURE_STATE(content);
|
||||||
|
|
||||||
|
nsCOMPtr<nsIContent> parent = content->GetParent();
|
||||||
|
PRInt32 indexOf = parent->IndexOf(content);
|
||||||
|
|
||||||
|
for (PRInt32 i = indexOf - 1; i >= 0; i--) {
|
||||||
|
// check for preceding text...
|
||||||
|
if (!parent->GetChildAt(i)->TextIsOnlyWhitespace()) {
|
||||||
|
PRUint32 childCount = parent->GetChildCount();
|
||||||
|
for (PRUint32 j = indexOf + 1; j < childCount; j++) {
|
||||||
|
// .. and subsequent text
|
||||||
|
if (!parent->GetChildAt(j)->TextIsOnlyWhitespace()) {
|
||||||
|
nsresult rv = aAccessible->GetValue(text);
|
||||||
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
|
return AppendString(aString, text) ?
|
||||||
|
NS_OK : NS_OK_NO_NAME_CLAUSE_HANDLED;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,9 +115,9 @@ nsHTMLImageAccessible::GetStateInternal(PRUint32 *aState, PRUint32 *aExtraState)
|
|||||||
imageRequest->GetImage(getter_AddRefs(imgContainer));
|
imageRequest->GetImage(getter_AddRefs(imgContainer));
|
||||||
|
|
||||||
if (imgContainer) {
|
if (imgContainer) {
|
||||||
PRUint32 numFrames;
|
PRBool animated;
|
||||||
imgContainer->GetNumFrames(&numFrames);
|
imgContainer->GetAnimated(&animated);
|
||||||
if (numFrames > 1)
|
if (animated)
|
||||||
*aState |= nsIAccessibleStates::STATE_ANIMATED;
|
*aState |= nsIAccessibleStates::STATE_ANIMATED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1023,19 +1023,20 @@ void nsHTMLComboboxAccessible::CacheChildren()
|
|||||||
if (!mListAccessible) {
|
if (!mListAccessible) {
|
||||||
mListAccessible =
|
mListAccessible =
|
||||||
new nsHTMLComboboxListAccessible(mParent, mDOMNode, mWeakShell);
|
new nsHTMLComboboxListAccessible(mParent, mDOMNode, mWeakShell);
|
||||||
|
if (!mListAccessible)
|
||||||
|
return;
|
||||||
|
|
||||||
|
mListAccessible->Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef COMBO_BOX_WITH_THREE_CHILDREN
|
#ifdef COMBO_BOX_WITH_THREE_CHILDREN
|
||||||
buttonAccessible->SetNextSibling(mListAccessible);
|
buttonAccessible->SetNextSibling(mListAccessible);
|
||||||
#else
|
#else
|
||||||
SetFirstChild(mListAccessible);
|
SetFirstChild(mListAccessible);
|
||||||
#endif
|
#endif
|
||||||
if (!mListAccessible) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
mListAccessible->SetParent(this);
|
mListAccessible->SetParent(this);
|
||||||
mListAccessible->SetNextSibling(nsnull);
|
mListAccessible->SetNextSibling(nsnull);
|
||||||
mListAccessible->Init();
|
|
||||||
|
|
||||||
++ mAccChildCount; // List accessible child successfully added
|
++ mAccChildCount; // List accessible child successfully added
|
||||||
}
|
}
|
||||||
|
@ -593,9 +593,8 @@ __try {
|
|||||||
|
|
||||||
void nsAccessNodeWrap::InitAccessibility()
|
void nsAccessNodeWrap::InitAccessibility()
|
||||||
{
|
{
|
||||||
if (gIsAccessibilityActive) {
|
NS_ASSERTION(!gIsAccessibilityActive,
|
||||||
return;
|
"Accessibility was initialized already!");
|
||||||
}
|
|
||||||
|
|
||||||
nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID));
|
nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID));
|
||||||
if (prefBranch) {
|
if (prefBranch) {
|
||||||
@ -623,9 +622,7 @@ void nsAccessNodeWrap::ShutdownAccessibility()
|
|||||||
NS_IF_RELEASE(gTextEvent);
|
NS_IF_RELEASE(gTextEvent);
|
||||||
::DestroyCaret();
|
::DestroyCaret();
|
||||||
|
|
||||||
if (!gIsAccessibilityActive) {
|
NS_ASSERTION(gIsAccessibilityActive, "Accessibility was shutdown already!");
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsAccessNode::ShutdownXPAccessibility();
|
nsAccessNode::ShutdownXPAccessibility();
|
||||||
}
|
}
|
||||||
|
@ -519,15 +519,21 @@ __try {
|
|||||||
nsAutoString roleString;
|
nsAutoString roleString;
|
||||||
if (msaaRole != ROLE_SYSTEM_CLIENT &&
|
if (msaaRole != ROLE_SYSTEM_CLIENT &&
|
||||||
!content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::role, roleString)) {
|
!content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::role, roleString)) {
|
||||||
|
nsIDocument * document = content->GetCurrentDoc();
|
||||||
|
if (!document)
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
nsINodeInfo *nodeInfo = content->NodeInfo();
|
nsINodeInfo *nodeInfo = content->NodeInfo();
|
||||||
nodeInfo->GetName(roleString);
|
nodeInfo->GetName(roleString);
|
||||||
nsAutoString nameSpaceURI;
|
|
||||||
nodeInfo->GetNamespaceURI(nameSpaceURI);
|
// Only append name space if different from that of current document.
|
||||||
if (!nameSpaceURI.IsEmpty()) {
|
if (!nodeInfo->NamespaceEquals(document->GetDefaultNamespaceID())) {
|
||||||
// Only append name space if different from that of current document
|
nsAutoString nameSpaceURI;
|
||||||
|
nodeInfo->GetNamespaceURI(nameSpaceURI);
|
||||||
roleString += NS_LITERAL_STRING(", ") + nameSpaceURI;
|
roleString += NS_LITERAL_STRING(", ") + nameSpaceURI;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!roleString.IsEmpty()) {
|
if (!roleString.IsEmpty()) {
|
||||||
pvarRole->vt = VT_BSTR;
|
pvarRole->vt = VT_BSTR;
|
||||||
pvarRole->bstrVal = ::SysAllocString(roleString.get());
|
pvarRole->bstrVal = ::SysAllocString(roleString.get());
|
||||||
|
@ -93,66 +93,47 @@ STDMETHODIMP nsDocAccessibleWrap::QueryInterface(REFIID iid, void** ppv)
|
|||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void nsDocAccessibleWrap::GetXPAccessibleFor(const VARIANT& aVarChild, nsIAccessible **aXPAccessible)
|
void
|
||||||
|
nsDocAccessibleWrap::GetXPAccessibleFor(const VARIANT& aVarChild,
|
||||||
|
nsIAccessible **aXPAccessible)
|
||||||
{
|
{
|
||||||
*aXPAccessible = nsnull;
|
*aXPAccessible = nsnull;
|
||||||
if (!mWeakShell)
|
|
||||||
return; // This document has been shut down
|
|
||||||
|
|
||||||
if (aVarChild.lVal < 0) {
|
if (IsDefunct())
|
||||||
// Get from hash table
|
|
||||||
void *uniqueID = (void*)(-aVarChild.lVal); // Convert child ID back to unique ID
|
|
||||||
nsCOMPtr<nsIAccessNode> accessNode;
|
|
||||||
GetCachedAccessNode(uniqueID, getter_AddRefs(accessNode));
|
|
||||||
nsCOMPtr<nsIAccessible> accessible(do_QueryInterface(accessNode));
|
|
||||||
NS_IF_ADDREF(*aXPAccessible = accessible);
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
nsDocAccessible::GetXPAccessibleFor(aVarChild, aXPAccessible);
|
// If lVal negative then it is treated as child ID and we should look for
|
||||||
|
// accessible through whole accessible subtree including subdocuments.
|
||||||
|
// Otherwise we treat lVal as index in parent.
|
||||||
|
|
||||||
|
if (aVarChild.lVal < 0)
|
||||||
|
GetXPAccessibleForChildID(aVarChild, aXPAccessible);
|
||||||
|
else
|
||||||
|
nsDocAccessible::GetXPAccessibleFor(aVarChild, aXPAccessible);
|
||||||
}
|
}
|
||||||
|
|
||||||
STDMETHODIMP nsDocAccessibleWrap::get_accChild(
|
STDMETHODIMP
|
||||||
/* [in] */ VARIANT varChild,
|
nsDocAccessibleWrap::get_accChild(VARIANT varChild,
|
||||||
/* [retval][out] */ IDispatch __RPC_FAR *__RPC_FAR *ppdispChild)
|
IDispatch __RPC_FAR *__RPC_FAR *ppdispChild)
|
||||||
{
|
{
|
||||||
__try {
|
__try {
|
||||||
*ppdispChild = NULL;
|
*ppdispChild = NULL;
|
||||||
|
|
||||||
if (varChild.vt == VT_I4 && varChild.lVal < 0) {
|
if (varChild.vt == VT_I4 && varChild.lVal < 0) {
|
||||||
// AccessibleObjectFromEvent() being called
|
// IAccessible::accChild can be used to get an accessible by child ID.
|
||||||
// that's why the lVal < 0
|
// It is used by AccessibleObjectFromEvent() called by AT when AT handles
|
||||||
|
// our MSAA event.
|
||||||
|
|
||||||
nsCOMPtr<nsIAccessible> xpAccessible;
|
nsCOMPtr<nsIAccessible> xpAccessible;
|
||||||
GetXPAccessibleFor(varChild, getter_AddRefs(xpAccessible));
|
GetXPAccessibleForChildID(varChild, getter_AddRefs(xpAccessible));
|
||||||
if (xpAccessible) {
|
if (!xpAccessible)
|
||||||
IAccessible *msaaAccessible;
|
return E_FAIL;
|
||||||
xpAccessible->GetNativeInterface((void**)&msaaAccessible);
|
|
||||||
*ppdispChild = static_cast<IDispatch*>(msaaAccessible);
|
IAccessible *msaaAccessible = NULL;
|
||||||
return S_OK;
|
xpAccessible->GetNativeInterface((void**)&msaaAccessible);
|
||||||
}
|
*ppdispChild = static_cast<IDispatch*>(msaaAccessible);
|
||||||
else if (mDocument) {
|
|
||||||
// If child ID from event can't be found in this window, ask parent.
|
return S_OK;
|
||||||
// This is especially relevant for times when a xul menu item
|
|
||||||
// has focus, but the system thinks the content window has focus.
|
|
||||||
nsIDocument* parentDoc = mDocument->GetParentDocument();
|
|
||||||
if (parentDoc) {
|
|
||||||
nsIPresShell *parentShell = parentDoc->GetPrimaryShell();
|
|
||||||
nsCOMPtr<nsIWeakReference> weakParentShell(do_GetWeakReference(parentShell));
|
|
||||||
if (weakParentShell) {
|
|
||||||
nsCOMPtr<nsIAccessibleDocument> parentDocAccessible =
|
|
||||||
nsAccessNode::GetDocAccessibleFor(weakParentShell);
|
|
||||||
nsCOMPtr<nsIAccessible> accessible(do_QueryInterface(parentDocAccessible));
|
|
||||||
IAccessible *msaaParentDoc;
|
|
||||||
if (accessible) {
|
|
||||||
accessible->GetNativeInterface((void**)&msaaParentDoc);
|
|
||||||
HRESULT rv = msaaParentDoc->get_accChild(varChild, ppdispChild);
|
|
||||||
msaaParentDoc->Release();
|
|
||||||
return rv;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return E_FAIL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise, the normal get_accChild() will do
|
// Otherwise, the normal get_accChild() will do
|
||||||
@ -329,3 +310,53 @@ STDMETHODIMP nsDocAccessibleWrap::get_accValue(
|
|||||||
|
|
||||||
return get_URL(pszValue);
|
return get_URL(pszValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct nsSearchAccessibleInCacheArg
|
||||||
|
{
|
||||||
|
nsCOMPtr<nsIAccessNode> mAccessNode;
|
||||||
|
void *mUniqueID;
|
||||||
|
};
|
||||||
|
|
||||||
|
static PLDHashOperator
|
||||||
|
SearchAccessibleInCache(const void* aKey, nsIAccessNode* aAccessNode,
|
||||||
|
void* aUserArg)
|
||||||
|
{
|
||||||
|
nsCOMPtr<nsIAccessibleDocument> docAccessible(do_QueryInterface(aAccessNode));
|
||||||
|
NS_ASSERTION(docAccessible,
|
||||||
|
"No doc accessible for the object in doc accessible cache!");
|
||||||
|
|
||||||
|
if (docAccessible) {
|
||||||
|
nsSearchAccessibleInCacheArg* arg =
|
||||||
|
static_cast<nsSearchAccessibleInCacheArg*>(aUserArg);
|
||||||
|
nsCOMPtr<nsIAccessNode> accessNode;
|
||||||
|
docAccessible->GetCachedAccessNode(arg->mUniqueID,
|
||||||
|
getter_AddRefs(accessNode));
|
||||||
|
if (accessNode) {
|
||||||
|
arg->mAccessNode = accessNode;
|
||||||
|
return PL_DHASH_STOP;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return PL_DHASH_NEXT;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
nsDocAccessibleWrap::GetXPAccessibleForChildID(const VARIANT& aVarChild,
|
||||||
|
nsIAccessible **aAccessible)
|
||||||
|
{
|
||||||
|
*aAccessible = nsnull;
|
||||||
|
|
||||||
|
NS_PRECONDITION(aVarChild.vt == VT_I4 && aVarChild.lVal < 0,
|
||||||
|
"Variant doesn't point to child ID!");
|
||||||
|
|
||||||
|
// Convert child ID to unique ID.
|
||||||
|
void *uniqueID = reinterpret_cast<void*>(-aVarChild.lVal);
|
||||||
|
|
||||||
|
nsSearchAccessibleInCacheArg arg;
|
||||||
|
arg.mUniqueID = uniqueID;
|
||||||
|
|
||||||
|
gGlobalDocAccessibleCache.EnumerateRead(SearchAccessibleInCache,
|
||||||
|
static_cast<void*>(&arg));
|
||||||
|
if (arg.mAccessNode)
|
||||||
|
CallQueryInterface(arg.mAccessNode, aAccessible);
|
||||||
|
}
|
||||||
|
@ -93,6 +93,17 @@ public:
|
|||||||
/* [retval][out] */ BSTR __RPC_FAR *pszValue);
|
/* [retval][out] */ BSTR __RPC_FAR *pszValue);
|
||||||
|
|
||||||
virtual void FireAnchorJumpEvent();
|
virtual void FireAnchorJumpEvent();
|
||||||
|
|
||||||
|
// nsDocAccessibleWrap
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find an accessible by the given child ID in cached documents.
|
||||||
|
*
|
||||||
|
* @param aVarChild [in] variant pointing to the child ID
|
||||||
|
* @param aAccessible [out] the found accessible
|
||||||
|
*/
|
||||||
|
static void GetXPAccessibleForChildID(const VARIANT& aVarChild,
|
||||||
|
nsIAccessible **aAccessible);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
#include "nsIDOMXULSelectCntrlEl.h"
|
#include "nsIDOMXULSelectCntrlEl.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The basic implemetation of nsIAccessibleSelectable.
|
* The basic implementation of nsIAccessibleSelectable.
|
||||||
*/
|
*/
|
||||||
class nsXULSelectableAccessible : public nsAccessibleWrap
|
class nsXULSelectableAccessible : public nsAccessibleWrap
|
||||||
{
|
{
|
||||||
|
@ -88,6 +88,7 @@ _TEST_FILES =\
|
|||||||
test_elm_table.html \
|
test_elm_table.html \
|
||||||
test_elm_txtcntnr.html \
|
test_elm_txtcntnr.html \
|
||||||
test_events_caretmove.html \
|
test_events_caretmove.html \
|
||||||
|
test_events_doc.html \
|
||||||
test_events_focus.xul \
|
test_events_focus.xul \
|
||||||
test_events_mutation.html \
|
test_events_mutation.html \
|
||||||
test_events_tree.xul \
|
test_events_tree.xul \
|
||||||
|
@ -302,9 +302,50 @@ function testAccessibleTree(aAccOrElmOrID, aAccTree)
|
|||||||
is(children.length, aAccTree.children.length,
|
is(children.length, aAccTree.children.length,
|
||||||
"Different amount of expected children of " + prettyName(acc) + ".");
|
"Different amount of expected children of " + prettyName(acc) + ".");
|
||||||
|
|
||||||
if (aAccTree.children.length == children.length) {
|
if (aAccTree.children.length == children.length) {
|
||||||
|
var childCount = children.length;
|
||||||
|
|
||||||
|
// nsIAccessible::firstChild
|
||||||
|
var expectedFirstChild = childCount > 0 ?
|
||||||
|
children.queryElementAt(0, nsIAccessible) : null;
|
||||||
|
var firstChild = null;
|
||||||
|
try { firstChild = acc.firstChild; } catch (e) {}
|
||||||
|
is(firstChild, expectedFirstChild,
|
||||||
|
"Wrong first child of " + prettyName(acc));
|
||||||
|
|
||||||
|
// nsIAccessible::lastChild
|
||||||
|
var expectedLastChild = childCount > 0 ?
|
||||||
|
children.queryElementAt(childCount - 1, nsIAccessible) : null;
|
||||||
|
var lastChild = null;
|
||||||
|
try { lastChild = acc.lastChild; } catch (e) {}
|
||||||
|
is(lastChild, expectedLastChild,
|
||||||
|
"Wrong last child of " + prettyName(acc));
|
||||||
|
|
||||||
for (var i = 0; i < children.length; i++) {
|
for (var i = 0; i < children.length; i++) {
|
||||||
var child = children.queryElementAt(i, nsIAccessible);
|
var child = children.queryElementAt(i, nsIAccessible);
|
||||||
|
|
||||||
|
// nsIAccessible::parent
|
||||||
|
var parent = null;
|
||||||
|
try { parent = child.parent; } catch (e) {}
|
||||||
|
is(parent, acc, "Wrong parent of " + prettyName(child));
|
||||||
|
|
||||||
|
// nsIAccessible::nextSibling
|
||||||
|
var expectedNextSibling = (i < childCount - 1) ?
|
||||||
|
children.queryElementAt(i + 1, nsIAccessible) : null;
|
||||||
|
var nextSibling = null;
|
||||||
|
try { nextSibling = child.nextSibling; } catch (e) {}
|
||||||
|
is(nextSibling, expectedNextSibling,
|
||||||
|
"Wrong next sibling of " + prettyName(child));
|
||||||
|
|
||||||
|
// nsIAccessible::previousSibling
|
||||||
|
var expectedPrevSibling = (i > 0) ?
|
||||||
|
children.queryElementAt(i - 1, nsIAccessible) : null;
|
||||||
|
var prevSibling = null;
|
||||||
|
try { prevSibling = child.previousSibling; } catch (e) {}
|
||||||
|
is(prevSibling, expectedPrevSibling,
|
||||||
|
"Wrong previous sibling of " + prettyName(child));
|
||||||
|
|
||||||
|
// Go down through subtree
|
||||||
testAccessibleTree(child, aAccTree.children[i]);
|
testAccessibleTree(child, aAccTree.children[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -397,6 +438,9 @@ function getNodePrettyName(aNode)
|
|||||||
if (aNode.nodeType == nsIDOMNode.ELEMENT_NODE && aNode.hasAttribute("id"))
|
if (aNode.nodeType == nsIDOMNode.ELEMENT_NODE && aNode.hasAttribute("id"))
|
||||||
return " '" + aNode.getAttribute("id") + "' ";
|
return " '" + aNode.getAttribute("id") + "' ";
|
||||||
|
|
||||||
|
if (aNode.nodeType == nsIDOMNode.DOCUMENT_NODE)
|
||||||
|
return " 'document node' ";
|
||||||
|
|
||||||
return " '" + aNode.localName + " node' ";
|
return " '" + aNode.localName + " node' ";
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return "no node info";
|
return "no node info";
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Constants
|
// Constants
|
||||||
|
|
||||||
|
const EVENT_DOCUMENT_LOAD_COMPLETE =
|
||||||
|
nsIAccessibleEvent.EVENT_DOCUMENT_LOAD_COMPLETE;
|
||||||
const EVENT_DOM_DESTROY = nsIAccessibleEvent.EVENT_DOM_DESTROY;
|
const EVENT_DOM_DESTROY = nsIAccessibleEvent.EVENT_DOM_DESTROY;
|
||||||
const EVENT_FOCUS = nsIAccessibleEvent.EVENT_FOCUS;
|
const EVENT_FOCUS = nsIAccessibleEvent.EVENT_FOCUS;
|
||||||
const EVENT_NAME_CHANGE = nsIAccessibleEvent.EVENT_NAME_CHANGE;
|
const EVENT_NAME_CHANGE = nsIAccessibleEvent.EVENT_NAME_CHANGE;
|
||||||
@ -86,6 +88,15 @@ function unregisterA11yEventListener(aEventType, aEventHandler)
|
|||||||
*/
|
*/
|
||||||
const INVOKER_ACTION_FAILED = 1;
|
const INVOKER_ACTION_FAILED = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Common invoker checker (see eventSeq of eventQueue).
|
||||||
|
*/
|
||||||
|
function invokerChecker(aEventType, aTarget)
|
||||||
|
{
|
||||||
|
this.type = aEventType;
|
||||||
|
this.target = aTarget;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates event queue for the given event type. The queue consists of invoker
|
* Creates event queue for the given event type. The queue consists of invoker
|
||||||
* objects, each of them generates the event of the event type. When queue is
|
* objects, each of them generates the event of the event type. When queue is
|
||||||
@ -319,7 +330,9 @@ function eventQueue(aEventType)
|
|||||||
this.setEventHandler = function eventQueue_setEventHandler(aInvoker)
|
this.setEventHandler = function eventQueue_setEventHandler(aInvoker)
|
||||||
{
|
{
|
||||||
this.mEventSeq = ("eventSeq" in aInvoker) ?
|
this.mEventSeq = ("eventSeq" in aInvoker) ?
|
||||||
aInvoker.eventSeq : [[this.mDefEventType, aInvoker.DOMNode]];
|
aInvoker.eventSeq :
|
||||||
|
[ new invokerChecker(this.mDefEventType, aInvoker.DOMNode) ];
|
||||||
|
|
||||||
this.mEventSeqIdx = -1;
|
this.mEventSeqIdx = -1;
|
||||||
|
|
||||||
if (this.mEventSeq) {
|
if (this.mEventSeq) {
|
||||||
@ -352,20 +365,12 @@ function eventQueue(aEventType)
|
|||||||
|
|
||||||
this.getEventType = function eventQueue_getEventType(aIdx)
|
this.getEventType = function eventQueue_getEventType(aIdx)
|
||||||
{
|
{
|
||||||
var eventItem = this.mEventSeq[aIdx];
|
return this.mEventSeq[aIdx].type;
|
||||||
if ("type" in eventItem)
|
|
||||||
return eventItem.type;
|
|
||||||
|
|
||||||
return eventItem[0];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getEventTarget = function eventQueue_getEventTarget(aIdx)
|
this.getEventTarget = function eventQueue_getEventTarget(aIdx)
|
||||||
{
|
{
|
||||||
var eventItem = this.mEventSeq[aIdx];
|
return this.mEventSeq[aIdx].target;
|
||||||
if ("target" in eventItem)
|
|
||||||
return eventItem.target;
|
|
||||||
|
|
||||||
return eventItem[1];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.compareEvents = function eventQueue_compareEvents(aIdx, aEvent)
|
this.compareEvents = function eventQueue_compareEvents(aIdx, aEvent)
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
const ROLE_ALERT = nsIAccessibleRole.ROLE_ALERT;
|
const ROLE_ALERT = nsIAccessibleRole.ROLE_ALERT;
|
||||||
const ROLE_APPLICATION = nsIAccessibleRole.ROLE_APPLICATION;
|
const ROLE_APPLICATION = nsIAccessibleRole.ROLE_APPLICATION;
|
||||||
|
const ROLE_APP_ROOT = nsIAccessibleRole.ROLE_APP_ROOT;
|
||||||
const ROLE_CELL = nsIAccessibleRole.ROLE_CELL;
|
const ROLE_CELL = nsIAccessibleRole.ROLE_CELL;
|
||||||
const ROLE_CHROME_WINDOW = nsIAccessibleRole.ROLE_CHROME_WINDOW;
|
const ROLE_CHROME_WINDOW = nsIAccessibleRole.ROLE_CHROME_WINDOW;
|
||||||
const ROLE_COMBOBOX = nsIAccessibleRole.ROLE_COMBOBOX;
|
const ROLE_COMBOBOX = nsIAccessibleRole.ROLE_COMBOBOX;
|
||||||
|
133
accessible/tests/mochitest/test_events_doc.html
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Accessible events testing for document</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="chrome://mochikit/content/a11y/accessible/common.js"></script>
|
||||||
|
<script type="application/javascript"
|
||||||
|
src="chrome://mochikit/content/a11y/accessible/role.js"></script>
|
||||||
|
<script type="application/javascript"
|
||||||
|
src="chrome://mochikit/content/a11y/accessible/events.js"></script>
|
||||||
|
|
||||||
|
<script type="application/javascript">
|
||||||
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Invokers
|
||||||
|
|
||||||
|
function changeIframeSrc(aIdentifier, aURL)
|
||||||
|
{
|
||||||
|
this.DOMNode = getNode(aIdentifier);
|
||||||
|
|
||||||
|
this.eventSeq = [
|
||||||
|
new invokerChecker(EVENT_REORDER, getAccessible(this.DOMNode))
|
||||||
|
];
|
||||||
|
|
||||||
|
this.invoke = function changeIframeSrc_invoke()
|
||||||
|
{
|
||||||
|
this.DOMNode.src = aURL;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.getID = function changeIframeSrc_getID()
|
||||||
|
{
|
||||||
|
return "change iframe src on " + aURL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function openDialogWnd(aURL)
|
||||||
|
{
|
||||||
|
// Get application root accessible.
|
||||||
|
var docAcc = getAccessible(document);
|
||||||
|
while (docAcc) {
|
||||||
|
this.mRootAcc = docAcc;
|
||||||
|
docAcc = docAcc.parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.eventSeq = [
|
||||||
|
new invokerChecker(EVENT_REORDER, this.mRootAcc)
|
||||||
|
];
|
||||||
|
|
||||||
|
this.invoke = function openDialogWnd_invoke()
|
||||||
|
{
|
||||||
|
this.mDialog = window.openDialog(aURL);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.check = function openDialogWnd_check()
|
||||||
|
{
|
||||||
|
var accTree = {
|
||||||
|
role: ROLE_APP_ROOT,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
role: ROLE_CHROME_WINDOW
|
||||||
|
},
|
||||||
|
{
|
||||||
|
role: ROLE_CHROME_WINDOW
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
testAccessibleTree(this.mRootAcc, accTree);
|
||||||
|
|
||||||
|
this.mDialog.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.getID = function openDialogWnd_getID()
|
||||||
|
{
|
||||||
|
return "open dialog '" + aURL + "'";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Do tests
|
||||||
|
|
||||||
|
var gQueue = null;
|
||||||
|
|
||||||
|
// var gA11yEventDumpID = "eventdump"; // debug stuff
|
||||||
|
|
||||||
|
function doTests()
|
||||||
|
{
|
||||||
|
gQueue = new eventQueue();
|
||||||
|
|
||||||
|
gQueue.push(new changeIframeSrc("iframe", "about:"));
|
||||||
|
gQueue.push(new changeIframeSrc("iframe", "about:buildconfig"));
|
||||||
|
gQueue.push(new openDialogWnd("about:"));
|
||||||
|
|
||||||
|
gQueue.invoke(); // Will call SimpleTest.finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
SimpleTest.waitForExplicitFinish();
|
||||||
|
addA11yLoadEvent(doTests);
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<a target="_blank"
|
||||||
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=420845"
|
||||||
|
title="Fire event_reorder on any embedded frames/iframes whos document has just loaded">
|
||||||
|
Mozilla Bug 420845
|
||||||
|
</a>
|
||||||
|
<a target="_blank"
|
||||||
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=506206"
|
||||||
|
title="Fire event_reorder application root accessible">
|
||||||
|
Mozilla Bug 506206
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<p id="display"></p>
|
||||||
|
<div id="content" style="display: none"></div>
|
||||||
|
<pre id="test">
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<div id="testContainer">
|
||||||
|
<iframe id="iframe"></iframe>
|
||||||
|
</div>
|
||||||
|
<div id="eventdump"></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -60,8 +60,8 @@
|
|||||||
{
|
{
|
||||||
var type = this.getA11yEventType(aEventType);
|
var type = this.getA11yEventType(aEventType);
|
||||||
for (var idx = 0; idx < this.eventSeq.length; idx++) {
|
for (var idx = 0; idx < this.eventSeq.length; idx++) {
|
||||||
if (this.eventSeq[idx][0] == type) {
|
if (this.eventSeq[idx].type == type) {
|
||||||
this.eventSeq[idx][1] = aTarget;
|
this.eventSeq[idx].target = aTarget;
|
||||||
return idx;
|
return idx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -76,8 +76,10 @@
|
|||||||
var targetIdx = this.setTarget(aEventType, aTargets[0]);
|
var targetIdx = this.setTarget(aEventType, aTargets[0]);
|
||||||
|
|
||||||
var type = this.getA11yEventType(aEventType);
|
var type = this.getA11yEventType(aEventType);
|
||||||
for (var i = 1; i < aTargets.length; i++)
|
for (var i = 1; i < aTargets.length; i++) {
|
||||||
this.eventSeq.splice(++targetIdx, 0, [type, aTargets[i]]);
|
var checker = new invokerChecker(type, aTargets[i]);
|
||||||
|
this.eventSeq.splice(++targetIdx, 0, checker);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Implementation
|
// Implementation
|
||||||
@ -103,15 +105,23 @@
|
|||||||
|
|
||||||
this.mIsDOMChange = aIsDOMChange;
|
this.mIsDOMChange = aIsDOMChange;
|
||||||
|
|
||||||
if (aEventTypes & kHideEvent)
|
if (aEventTypes & kHideEvent) {
|
||||||
this.eventSeq.push([this.getA11yEventType(kHideEvent), this.DOMNode]);
|
var checker = new invokerChecker(this.getA11yEventType(kHideEvent),
|
||||||
|
this.DOMNode);
|
||||||
|
this.eventSeq.push(checker);
|
||||||
|
}
|
||||||
|
|
||||||
if (aEventTypes & kShowEvent)
|
if (aEventTypes & kShowEvent) {
|
||||||
this.eventSeq.push([this.getA11yEventType(kShowEvent), this.DOMNode]);
|
var checker = new invokerChecker(this.getA11yEventType(kShowEvent),
|
||||||
|
this.DOMNode);
|
||||||
|
this.eventSeq.push(checker);
|
||||||
|
}
|
||||||
|
|
||||||
if (aEventTypes & kReorderEvent)
|
if (aEventTypes & kReorderEvent) {
|
||||||
this.eventSeq.push([this.getA11yEventType(kReorderEvent),
|
var checker = new invokerChecker(this.getA11yEventType(kReorderEvent),
|
||||||
this.DOMNode.parentNode]);
|
this.DOMNode.parentNode);
|
||||||
|
this.eventSeq.push(checker);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -122,7 +122,7 @@
|
|||||||
|
|
||||||
this.getID = function setTreeView_getID() { return "TreeViewChanged"; }
|
this.getID = function setTreeView_getID() { return "TreeViewChanged"; }
|
||||||
|
|
||||||
this.eventSeq = [["TreeViewChanged", gTree]];
|
this.eventSeq = [ new invokerChecker("TreeViewChanged", gTree) ];
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -139,13 +139,13 @@
|
|||||||
|
|
||||||
// textarea's name should have the value, which initially is specified by
|
// textarea's name should have the value, which initially is specified by
|
||||||
// a text child.
|
// a text child.
|
||||||
testName("textareawithchild", "Story: Foo");
|
testName("textareawithchild", "Story Foo is ended.");
|
||||||
|
|
||||||
// new textarea name should reflect the value change.
|
// new textarea name should reflect the value change.
|
||||||
var elem = document.getElementById("textareawithchild");
|
var elem = document.getElementById("textareawithchild");
|
||||||
elem.value = "Bar";
|
elem.value = "Bar";
|
||||||
|
|
||||||
testName("textareawithchild", "Story: Bar");
|
testName("textareawithchild", "Story Bar is ended.");
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
// label with nested combobox (test for 'f' item of name computation guide)
|
// label with nested combobox (test for 'f' item of name computation guide)
|
||||||
@ -153,6 +153,9 @@
|
|||||||
testName("comboinstart", "One day(s).");
|
testName("comboinstart", "One day(s).");
|
||||||
testName("combo3", "day(s).");
|
testName("combo3", "day(s).");
|
||||||
|
|
||||||
|
testName("textboxinstart", "Two days.");
|
||||||
|
testName("textbox1", "days.");
|
||||||
|
|
||||||
testName("comboinmiddle", "Subscribe to ATOM feed.");
|
testName("comboinmiddle", "Subscribe to ATOM feed.");
|
||||||
testName("combo4", "Subscribe to ATOM feed.");
|
testName("combo4", "Subscribe to ATOM feed.");
|
||||||
|
|
||||||
@ -163,6 +166,9 @@
|
|||||||
testName("comboinend", "This day was sunny");
|
testName("comboinend", "This day was sunny");
|
||||||
testName("combo6", "This day was");
|
testName("combo6", "This day was");
|
||||||
|
|
||||||
|
testName("textboxinend", "This day was sunny");
|
||||||
|
testName("textbox2", "This day was");
|
||||||
|
|
||||||
SimpleTest.finish();
|
SimpleTest.finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -345,13 +351,15 @@
|
|||||||
|
|
||||||
<!-- A textarea nested in a label with a text child (bug #453371). -->
|
<!-- A textarea nested in a label with a text child (bug #453371). -->
|
||||||
<form>
|
<form>
|
||||||
<label>Story:
|
<label>Story
|
||||||
<textarea id="textareawithchild" name="name">Foo</textarea>
|
<textarea id="textareawithchild" name="name">Foo</textarea>
|
||||||
|
is ended.
|
||||||
</label>
|
</label>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<!-- a label with a nested control in the start, middle and end -->
|
<!-- a label with a nested control in the start, middle and end -->
|
||||||
<form>
|
<form>
|
||||||
|
<!-- at the start (without and with whitespaces) -->
|
||||||
<label id="comboinstart"><select id="combo3">
|
<label id="comboinstart"><select id="combo3">
|
||||||
<option>One</option>
|
<option>One</option>
|
||||||
<option>Two</option>
|
<option>Two</option>
|
||||||
@ -359,6 +367,12 @@
|
|||||||
day(s).
|
day(s).
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
<label id="textboxinstart">
|
||||||
|
<input id="textbox1" value="Two">
|
||||||
|
days.
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<!-- in the middle -->
|
||||||
<label id="comboinmiddle">
|
<label id="comboinmiddle">
|
||||||
Subscribe to
|
Subscribe to
|
||||||
<select id="combo4" name="occupation">
|
<select id="combo4" name="occupation">
|
||||||
@ -377,12 +391,18 @@
|
|||||||
</label>
|
</label>
|
||||||
<input id="checkbox" type="checkbox" />
|
<input id="checkbox" type="checkbox" />
|
||||||
|
|
||||||
|
<!-- at the end (without and with whitespaces) -->
|
||||||
<label id="comboinend">
|
<label id="comboinend">
|
||||||
This day was
|
This day was
|
||||||
<select id="combo6" name="occupation">
|
<select id="combo6" name="occupation">
|
||||||
<option>sunny</option>
|
<option>sunny</option>
|
||||||
<option>rainy</option>
|
<option>rainy</option>
|
||||||
</select></label>
|
</select></label>
|
||||||
|
|
||||||
|
<label id="textboxinend">
|
||||||
|
This day was
|
||||||
|
<input id="textbox2" value="sunny">
|
||||||
|
</label>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
@ -54,9 +54,6 @@ include $(topsrcdir)/config/rules.mk
|
|||||||
|
|
||||||
ifeq ($(OS_ARCH),WINNT)
|
ifeq ($(OS_ARCH),WINNT)
|
||||||
ifdef MOZ_INSTALLER
|
ifdef MOZ_INSTALLER
|
||||||
ifdef MOZ_BRANDING_DIRECTORY
|
|
||||||
DEFINES += -DOFFICIAL_BRANDING=1
|
|
||||||
endif
|
|
||||||
|
|
||||||
# For Windows build the uninstaller during the application build since the
|
# For Windows build the uninstaller during the application build since the
|
||||||
# uninstaller is included with the application for mar file generation.
|
# uninstaller is included with the application for mar file generation.
|
||||||
|
@ -51,9 +51,6 @@ PREF_JS_EXPORTS = $(srcdir)/profile/firefox.js \
|
|||||||
$(srcdir)/profile/channel-prefs.js \
|
$(srcdir)/profile/channel-prefs.js \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
ifndef MOZ_BRANDING_DIRECTORY
|
|
||||||
PREF_JS_EXPORTS += $(srcdir)/firefox-branding.js
|
|
||||||
endif
|
|
||||||
|
|
||||||
# hardcode en-US for the moment
|
# hardcode en-US for the moment
|
||||||
AB_CD = en-US
|
AB_CD = en-US
|
||||||
@ -226,7 +223,7 @@ endif
|
|||||||
ifdef DEBUG
|
ifdef DEBUG
|
||||||
RCFLAGS += -DDEBUG
|
RCFLAGS += -DDEBUG
|
||||||
endif
|
endif
|
||||||
RCFLAGS += -DFIREFOX_ICO=\"$(DIST)/branding/firefox.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document.ico\"
|
RCFLAGS += -DFIREFOX_ICO=\"$(DIST)/branding/firefox-os2.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document-os2.ico\"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include $(topsrcdir)/config/rules.mk
|
include $(topsrcdir)/config/rules.mk
|
||||||
@ -299,58 +296,23 @@ endif
|
|||||||
|
|
||||||
endif # LIBXUL_SDK
|
endif # LIBXUL_SDK
|
||||||
|
|
||||||
ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT)))
|
|
||||||
|
|
||||||
ICON_FILES = \
|
|
||||||
$(DIST)/branding/mozicon128.png \
|
|
||||||
$(DIST)/branding/document.png \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
libs:: $(ICON_FILES)
|
|
||||||
$(INSTALL) $(IFLAGS1) $^ $(DIST)/bin/icons
|
|
||||||
|
|
||||||
install::
|
|
||||||
$(SYSINSTALL) $(IFLAGS1) $(ICON_FILES) $(DESTDIR)$(mozappdir)/icons
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
||||||
libs::
|
libs::
|
||||||
$(INSTALL) $(IFLAGS1) $(DIST)/branding/default16.png $(DIST)/bin/chrome/icons/default
|
$(INSTALL) $(IFLAGS1) $(DIST)/branding/mozicon128.png $(DIST)/bin/icons
|
||||||
$(INSTALL) $(IFLAGS1) $(DIST)/branding/default32.png $(DIST)/bin/chrome/icons/default
|
$(INSTALL) $(IFLAGS1) $(DIST)/branding/document.png $(DIST)/bin/icons
|
||||||
$(INSTALL) $(IFLAGS1) $(DIST)/branding/default48.png $(DIST)/bin/chrome/icons/default
|
$(INSTALL) $(IFLAGS1) $(DIST)/branding/default16.png $(DIST)/bin/chrome/icons/default
|
||||||
|
$(INSTALL) $(IFLAGS1) $(DIST)/branding/default32.png $(DIST)/bin/chrome/icons/default
|
||||||
|
$(INSTALL) $(IFLAGS1) $(DIST)/branding/default48.png $(DIST)/bin/chrome/icons/default
|
||||||
endif
|
endif
|
||||||
|
|
||||||
export::
|
ifdef MOZ_SPLASHSCREEN
|
||||||
ifndef MOZ_BRANDING_DIRECTORY
|
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
|
||||||
$(NSINSTALL) -D $(DIST)/branding
|
libs::
|
||||||
ifneq (,$(filter WINNT WINCE,$(OS_ARCH)))
|
$(INSTALL) $(IFLAGS1) $(DIST)/branding/splash.bmp $(DIST)/bin
|
||||||
cp $(srcdir)/firefox.ico $(DIST)/branding/firefox.ico
|
|
||||||
cp $(srcdir)/firefox.ico $(DIST)/branding/app.ico
|
|
||||||
cp $(srcdir)/document.ico $(DIST)/branding/document.ico
|
|
||||||
endif
|
|
||||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
|
||||||
cp $(srcdir)/macbuild/firefox.icns $(DIST)/branding/firefox.icns
|
|
||||||
cp $(srcdir)/macbuild/document.icns $(DIST)/branding/document.icns
|
|
||||||
cp $(srcdir)/macbuild/dsstore $(DIST)/branding/dsstore
|
|
||||||
cp $(srcdir)/macbuild/background.png $(DIST)/branding/background.png
|
|
||||||
cp $(srcdir)/macbuild/disk.icns $(DIST)/branding/disk.icns
|
|
||||||
endif
|
|
||||||
ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT)))
|
|
||||||
cp $(srcdir)/mozicon128.png $(DIST)/branding/mozicon128.png
|
|
||||||
cp $(srcdir)/document.png $(DIST)/branding/document.png
|
|
||||||
endif
|
|
||||||
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
|
||||||
cp $(srcdir)/default16.png $(DIST)/branding/default16.png
|
|
||||||
cp $(srcdir)/default32.png $(DIST)/branding/default32.png
|
|
||||||
cp $(srcdir)/default48.png $(DIST)/branding/default48.png
|
|
||||||
endif
|
|
||||||
ifeq ($(OS_ARCH),OS2)
|
|
||||||
cp $(srcdir)/firefox-os2.ico $(DIST)/branding/firefox.ico
|
|
||||||
cp $(srcdir)/firefox-os2.ico $(DIST)/branding/app.ico
|
|
||||||
cp $(srcdir)/document-os2.ico $(DIST)/branding/document.ico
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
libs::
|
libs::
|
||||||
touch $(DIST)/bin/.autoreg
|
touch $(DIST)/bin/.autoreg
|
||||||
|
|
||||||
|
@ -309,7 +309,6 @@ pref("browser.microsummary.updateGenerators", true);
|
|||||||
// enable search suggestions by default
|
// enable search suggestions by default
|
||||||
pref("browser.search.suggest.enabled", true);
|
pref("browser.search.suggest.enabled", true);
|
||||||
|
|
||||||
pref("browser.history.grouping", "day");
|
|
||||||
pref("browser.history.showSessions", false);
|
pref("browser.history.showSessions", false);
|
||||||
pref("browser.sessionhistory.max_entries", 50);
|
pref("browser.sessionhistory.max_entries", 50);
|
||||||
pref("browser.history_expire_days", 180);
|
pref("browser.history_expire_days", 180);
|
||||||
@ -358,7 +357,8 @@ pref("browser.tabs.closeButtons", 1);
|
|||||||
// false return to the adjacent tab (old default)
|
// false return to the adjacent tab (old default)
|
||||||
pref("browser.tabs.selectOwnerOnClose", true);
|
pref("browser.tabs.selectOwnerOnClose", true);
|
||||||
|
|
||||||
pref("browser.ctrlTab.previews", true);
|
pref("browser.allTabs.previews", false);
|
||||||
|
pref("browser.ctrlTab.previews", false);
|
||||||
pref("browser.ctrlTab.recentlyUsedLimit", 7);
|
pref("browser.ctrlTab.recentlyUsedLimit", 7);
|
||||||
|
|
||||||
// Default bookmark sorting
|
// Default bookmark sorting
|
||||||
|
@ -64,10 +64,6 @@ DEFINES += \
|
|||||||
-DPRE_RELEASE_SUFFIX="$(PRE_RELEASE_SUFFIX)" \
|
-DPRE_RELEASE_SUFFIX="$(PRE_RELEASE_SUFFIX)" \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
ifndef MOZ_BRANDING_DIRECTORY
|
|
||||||
DEFINES += -DMOZ_USE_GENERIC_BRANDING
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq (,$(filter windows gtk2 mac cocoa, $(MOZ_WIDGET_TOOLKIT)))
|
ifneq (,$(filter windows gtk2 mac cocoa, $(MOZ_WIDGET_TOOLKIT)))
|
||||||
DEFINES += -DHAVE_SHELL_SERVICE=1
|
DEFINES += -DHAVE_SHELL_SERVICE=1
|
||||||
endif
|
endif
|
||||||
@ -76,16 +72,6 @@ ifdef MOZ_UPDATER
|
|||||||
DEFINES += -DMOZ_UPDATER=1
|
DEFINES += -DMOZ_UPDATER=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef MOZ_BRANDING_DIRECTORY
|
|
||||||
libs locale::
|
|
||||||
$(SYSINSTALL) $(IFLAGS1) $(srcdir)/content/browserconfig.properties $(DIST)/bin
|
|
||||||
$(SYSINSTALL) $(IFLAGS1) $(srcdir)/content/old-homepage-default.properties $(DIST)/bin
|
|
||||||
|
|
||||||
install::
|
|
||||||
$(SYSINSTALL) $(IFLAGS1) $(srcdir)/content/browserconfig.properties $(DESTDIR)$(mozappdir)
|
|
||||||
$(SYSINSTALL) $(IFLAGS1) $(srcdir)/content/old-homepage-default.properties $(DESTDIR)$(mozappdir)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq (,$(filter windows mac cocoa gtk2, $(MOZ_WIDGET_TOOLKIT)))
|
ifneq (,$(filter windows mac cocoa gtk2, $(MOZ_WIDGET_TOOLKIT)))
|
||||||
ifneq ($(OS_ARCH),WINCE)
|
ifneq ($(OS_ARCH),WINCE)
|
||||||
DEFINES += -DCONTEXT_COPY_IMAGE_CONTENTS=1
|
DEFINES += -DCONTEXT_COPY_IMAGE_CONTENTS=1
|
||||||
|
@ -167,13 +167,11 @@
|
|||||||
<menuitem id="context-back"
|
<menuitem id="context-back"
|
||||||
label="&backCmd.label;"
|
label="&backCmd.label;"
|
||||||
accesskey="&backCmd.accesskey;"
|
accesskey="&backCmd.accesskey;"
|
||||||
chromedir="&locale.dir;"
|
|
||||||
command="Browser:BackOrBackDuplicate"
|
command="Browser:BackOrBackDuplicate"
|
||||||
onclick="checkForMiddleClick(this, event);"/>
|
onclick="checkForMiddleClick(this, event);"/>
|
||||||
<menuitem id="context-forward"
|
<menuitem id="context-forward"
|
||||||
label="&forwardCmd.label;"
|
label="&forwardCmd.label;"
|
||||||
accesskey="&forwardCmd.accesskey;"
|
accesskey="&forwardCmd.accesskey;"
|
||||||
chromedir="&locale.dir;"
|
|
||||||
command="Browser:ForwardOrForwardDuplicate"
|
command="Browser:ForwardOrForwardDuplicate"
|
||||||
onclick="checkForMiddleClick(this, event);"/>
|
onclick="checkForMiddleClick(this, event);"/>
|
||||||
<menuitem id="context-reload"
|
<menuitem id="context-reload"
|
||||||
|
@ -3,8 +3,6 @@
|
|||||||
%brandDTD;
|
%brandDTD;
|
||||||
<!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd" >
|
<!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd" >
|
||||||
%browserDTD;
|
%browserDTD;
|
||||||
<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
|
|
||||||
%globalDTD;
|
|
||||||
<!ENTITY % globalRegionDTD SYSTEM "chrome://global-region/locale/region.dtd">
|
<!ENTITY % globalRegionDTD SYSTEM "chrome://global-region/locale/region.dtd">
|
||||||
%globalRegionDTD;
|
%globalRegionDTD;
|
||||||
<!ENTITY % charsetDTD SYSTEM "chrome://global/locale/charsetOverlay.dtd" >
|
<!ENTITY % charsetDTD SYSTEM "chrome://global/locale/charsetOverlay.dtd" >
|
||||||
|
@ -441,6 +441,12 @@
|
|||||||
type="checkbox"
|
type="checkbox"
|
||||||
command="View:FullScreen"/>
|
command="View:FullScreen"/>
|
||||||
#endif
|
#endif
|
||||||
|
<menuitem id="menu_showAllTabs"
|
||||||
|
hidden="true"
|
||||||
|
accesskey="&showAllTabsCmd.accesskey;"
|
||||||
|
label="&showAllTabsCmd.label;"
|
||||||
|
command="Browser:ShowAllTabs"
|
||||||
|
key="key_showAllTabs"/>
|
||||||
<menuseparator hidden="true" id="documentDirection-separator"/>
|
<menuseparator hidden="true" id="documentDirection-separator"/>
|
||||||
<menuitem id="documentDirection-swap"
|
<menuitem id="documentDirection-swap"
|
||||||
hidden="true"
|
hidden="true"
|
||||||
@ -468,7 +474,6 @@
|
|||||||
#else
|
#else
|
||||||
key="goBackKb"
|
key="goBackKb"
|
||||||
#endif
|
#endif
|
||||||
chromedir="&locale.dir;"
|
|
||||||
command="Browser:BackOrBackDuplicate"
|
command="Browser:BackOrBackDuplicate"
|
||||||
onclick="checkForMiddleClick(this, event);"/>
|
onclick="checkForMiddleClick(this, event);"/>
|
||||||
<menuitem id="historyMenuForward"
|
<menuitem id="historyMenuForward"
|
||||||
@ -478,7 +483,6 @@
|
|||||||
#else
|
#else
|
||||||
key="goForwardKb"
|
key="goForwardKb"
|
||||||
#endif
|
#endif
|
||||||
chromedir="&locale.dir;"
|
|
||||||
command="Browser:ForwardOrForwardDuplicate"
|
command="Browser:ForwardOrForwardDuplicate"
|
||||||
onclick="checkForMiddleClick(this, event);"/>
|
onclick="checkForMiddleClick(this, event);"/>
|
||||||
<menuitem id="historyMenuHome"
|
<menuitem id="historyMenuHome"
|
||||||
|
@ -432,9 +432,7 @@ var PlacesCommandHook = {
|
|||||||
if (starIcon && isElementVisible(starIcon)) {
|
if (starIcon && isElementVisible(starIcon)) {
|
||||||
// Make sure the bookmark properties dialog hangs toward the middle of
|
// Make sure the bookmark properties dialog hangs toward the middle of
|
||||||
// the location bar in RTL builds
|
// the location bar in RTL builds
|
||||||
var position = "after_end";
|
var position = (getComputedStyle(gNavToolbox, "").direction == "rtl") ? 'after_start' : 'after_end';
|
||||||
if (gURLBar.getAttribute("chromedir") == "rtl")
|
|
||||||
position = "after_start";
|
|
||||||
if (aShowEditUI)
|
if (aShowEditUI)
|
||||||
StarUI.showEditBookmarkPopup(itemId, starIcon, position);
|
StarUI.showEditBookmarkPopup(itemId, starIcon, position);
|
||||||
#ifdef ADVANCED_STARRING_UI
|
#ifdef ADVANCED_STARRING_UI
|
||||||
@ -524,10 +522,7 @@ var PlacesCommandHook = {
|
|||||||
* A short description of the feed. Optional.
|
* A short description of the feed. Optional.
|
||||||
*/
|
*/
|
||||||
addLiveBookmark: function PCH_addLiveBookmark(url, feedTitle, feedSubtitle) {
|
addLiveBookmark: function PCH_addLiveBookmark(url, feedTitle, feedSubtitle) {
|
||||||
var ios =
|
var feedURI = makeURI(url);
|
||||||
Cc["@mozilla.org/network/io-service;1"].
|
|
||||||
getService(Ci.nsIIOService);
|
|
||||||
var feedURI = ios.newURI(url, null, null);
|
|
||||||
|
|
||||||
var doc = gBrowser.contentDocument;
|
var doc = gBrowser.contentDocument;
|
||||||
var title = (arguments.length > 1) ? feedTitle : doc.title;
|
var title = (arguments.length > 1) ? feedTitle : doc.title;
|
||||||
|
@ -115,6 +115,7 @@
|
|||||||
</command>
|
</command>
|
||||||
<command id="Browser:NextTab" oncommand="gBrowser.mTabContainer.advanceSelectedTab(1, true);"/>
|
<command id="Browser:NextTab" oncommand="gBrowser.mTabContainer.advanceSelectedTab(1, true);"/>
|
||||||
<command id="Browser:PrevTab" oncommand="gBrowser.mTabContainer.advanceSelectedTab(-1, true);"/>
|
<command id="Browser:PrevTab" oncommand="gBrowser.mTabContainer.advanceSelectedTab(-1, true);"/>
|
||||||
|
<command id="Browser:ShowAllTabs" oncommand="allTabs.open();"/>
|
||||||
<command id="cmd_fullZoomReduce" oncommand="FullZoom.reduce()"/>
|
<command id="cmd_fullZoomReduce" oncommand="FullZoom.reduce()"/>
|
||||||
<command id="cmd_fullZoomEnlarge" oncommand="FullZoom.enlarge()"/>
|
<command id="cmd_fullZoomEnlarge" oncommand="FullZoom.enlarge()"/>
|
||||||
<command id="cmd_fullZoomReset" oncommand="FullZoom.reset()"/>
|
<command id="cmd_fullZoomReset" oncommand="FullZoom.reset()"/>
|
||||||
@ -317,7 +318,9 @@
|
|||||||
<key key="&fullZoomEnlargeCmd.commandkey3;" command="cmd_fullZoomEnlarge" modifiers="accel"/>
|
<key key="&fullZoomEnlargeCmd.commandkey3;" command="cmd_fullZoomEnlarge" modifiers="accel"/>
|
||||||
<key id="key_fullZoomReset" key="&fullZoomResetCmd.commandkey;" command="cmd_fullZoomReset" modifiers="accel"/>
|
<key id="key_fullZoomReset" key="&fullZoomResetCmd.commandkey;" command="cmd_fullZoomReset" modifiers="accel"/>
|
||||||
<key key="&fullZoomResetCmd.commandkey2;" command="cmd_fullZoomReset" modifiers="accel"/>
|
<key key="&fullZoomResetCmd.commandkey2;" command="cmd_fullZoomReset" modifiers="accel"/>
|
||||||
|
|
||||||
|
<key id="key_showAllTabs" command="Browser:ShowAllTabs" keycode="VK_TAB" modifiers="control,shift"/>
|
||||||
|
|
||||||
<key id="key_switchTextDirection" key="&bidiSwitchTextDirectionItem.commandkey;" command="cmd_switchTextDirection" modifiers="accel,shift" />
|
<key id="key_switchTextDirection" key="&bidiSwitchTextDirectionItem.commandkey;" command="cmd_switchTextDirection" modifiers="accel,shift" />
|
||||||
|
|
||||||
<key id="key_privatebrowsing" command="Tools:PrivateBrowsing" key="&privateBrowsingCmd.commandkey;" modifiers="accel,shift"/>
|
<key id="key_privatebrowsing" command="Tools:PrivateBrowsing" key="&privateBrowsingCmd.commandkey;" modifiers="accel,shift"/>
|
||||||
|
@ -41,21 +41,49 @@
|
|||||||
xmlns="http://www.mozilla.org/xbl"
|
xmlns="http://www.mozilla.org/xbl"
|
||||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||||
<binding id="ctrlTab-thumbnail">
|
<binding id="ctrlTab-preview" extends="chrome://global/content/bindings/button.xml#button-base">
|
||||||
<content align="center">
|
<content pack="center">
|
||||||
<children/>
|
<xul:stack>
|
||||||
<xul:label xbl:inherits="value=label,crop"/>
|
<xul:vbox class="ctrlTab-preview-inner" align="center" pack="center"
|
||||||
|
xbl:inherits="width=canvaswidth">
|
||||||
|
<xul:hbox class="tabPreview-canvas" xbl:inherits="style=canvasstyle">
|
||||||
|
<children/>
|
||||||
|
</xul:hbox>
|
||||||
|
<xul:label xbl:inherits="value=label,crop" class="plain"/>
|
||||||
|
</xul:vbox>
|
||||||
|
<xul:hbox class="ctrlTab-favicon-container" xbl:inherits="hidden=noicon">
|
||||||
|
<xul:image class="ctrlTab-favicon" xbl:inherits="src=image"/>
|
||||||
|
</xul:hbox>
|
||||||
|
</xul:stack>
|
||||||
</content>
|
</content>
|
||||||
<handlers>
|
<handlers>
|
||||||
<handler event="click" button="0" action="ctrlTab.selectThumbnail(this);"/>
|
<handler event="mouseover" action="ctrlTab._mouseOverFocus(this);"/>
|
||||||
<handler event="click" button="1" action="gBrowser.removeTab(this._tab);"/>
|
<handler event="command" action="ctrlTab.pick(this);"/>
|
||||||
|
<handler event="click" button="1" action="ctrlTab.remove(this);"/>
|
||||||
#ifdef XP_MACOSX
|
#ifdef XP_MACOSX
|
||||||
# Control+click is a right click on OS X
|
# Control+click is a right click on OS X
|
||||||
<handler event="click" button="2"><![CDATA[
|
<handler event="click" button="2" action="ctrlTab.pick(this);"/>
|
||||||
if (!ctrlTab.sticky)
|
|
||||||
ctrlTab.selectThumbnail(this);
|
|
||||||
]]></handler>
|
|
||||||
#endif
|
#endif
|
||||||
</handlers>
|
</handlers>
|
||||||
</binding>
|
</binding>
|
||||||
|
|
||||||
|
<binding id="allTabs-preview" extends="chrome://global/content/bindings/button.xml#button-base">
|
||||||
|
<content pack="center" align="center">
|
||||||
|
<xul:stack>
|
||||||
|
<xul:vbox class="allTabs-preview-inner" align="center" pack="center">
|
||||||
|
<xul:hbox class="tabPreview-canvas" xbl:inherits="style=canvasstyle">
|
||||||
|
<children/>
|
||||||
|
</xul:hbox>
|
||||||
|
<xul:label flex="1" xbl:inherits="value=label,crop" class="allTabs-preview-label plain"/>
|
||||||
|
</xul:vbox>
|
||||||
|
<xul:hbox class="allTabs-favicon-container">
|
||||||
|
<xul:image class="allTabs-favicon" xbl:inherits="src=image"/>
|
||||||
|
</xul:hbox>
|
||||||
|
</xul:stack>
|
||||||
|
</content>
|
||||||
|
<handlers>
|
||||||
|
<handler event="command" action="allTabs.pick(this);"/>
|
||||||
|
<handler event="click" button="1" action="gBrowser.removeTab(this._tab);"/>
|
||||||
|
</handlers>
|
||||||
|
</binding>
|
||||||
</bindings>
|
</bindings>
|
||||||
|
@ -45,6 +45,10 @@ toolbarpaletteitem[place="palette"] > toolbaritem > hbox[type="places"] {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#feed-menu:-moz-locale-dir(rtl) > menuitem {
|
||||||
|
direction: rtl;
|
||||||
|
}
|
||||||
|
|
||||||
#urlbar[pageproxystate="invalid"] > #urlbar-icons > :not(#go-button) ,
|
#urlbar[pageproxystate="invalid"] > #urlbar-icons > :not(#go-button) ,
|
||||||
#urlbar[pageproxystate="valid"] > #urlbar-icons > #go-button ,
|
#urlbar[pageproxystate="valid"] > #urlbar-icons > #go-button ,
|
||||||
#urlbar[isempty="true"] > #urlbar-icons > #go-button {
|
#urlbar[isempty="true"] > #urlbar-icons > #go-button {
|
||||||
@ -123,24 +127,50 @@ window[chromehidden~="toolbar"] toolbar:not(.toolbar-primary):not(.chromeclass-m
|
|||||||
display: -moz-box;
|
display: -moz-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tab Previews */
|
/* ::::: Keyboard UI Panel ::::: */
|
||||||
#ctrlTab-panel {
|
.KUI-panel-closebutton {
|
||||||
-moz-user-focus: normal;
|
-moz-binding: url("chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton-image");
|
||||||
}
|
}
|
||||||
|
|
||||||
.ctrlTab-thumbnail {
|
.ctrlTab-preview > html|canvas,
|
||||||
-moz-binding: url("chrome://browser/content/browser-tabPreviews.xml#ctrlTab-thumbnail");
|
.allTabs-preview > html|canvas {
|
||||||
|
min-width: inherit;
|
||||||
|
max-width: inherit;
|
||||||
|
min-height: inherit;
|
||||||
|
max-height: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ctrlTab-thumbnail:not([valid]) {
|
.ctrlTab-favicon-container,
|
||||||
visibility: hidden;
|
.allTabs-favicon-container {
|
||||||
|
-moz-box-align: start;
|
||||||
|
%ifdef XP_MACOSX
|
||||||
|
-moz-box-pack: end;
|
||||||
|
%else
|
||||||
|
-moz-box-pack: start;
|
||||||
|
%endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ctrlTab-pages {
|
.ctrlTab-favicon,
|
||||||
|
.allTabs-favicon {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ::::: Ctrl-Tab Panel ::::: */
|
||||||
|
.ctrlTab-preview {
|
||||||
|
-moz-binding: url("chrome://browser/content/browser-tabPreviews.xml#ctrlTab-preview");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ::::: All Tabs Panel ::::: */
|
||||||
|
.allTabs-preview {
|
||||||
|
-moz-binding: url("chrome://browser/content/browser-tabPreviews.xml#allTabs-preview");
|
||||||
|
}
|
||||||
|
|
||||||
|
#allTabs-tab-close-button {
|
||||||
|
-moz-binding: url("chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton-image");
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#allTabs-container {
|
||||||
display: block;
|
display: block;
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ctrlTab-pagePointer {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
}
|
||||||
|
@ -1058,6 +1058,8 @@ function BrowserStartup() {
|
|||||||
gURLBar.setAttribute("enablehistory", "false");
|
gURLBar.setAttribute("enablehistory", "false");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
allTabs.readPref();
|
||||||
|
|
||||||
setTimeout(delayedStartup, 0, isLoadingBlank, mustLoadSidebar);
|
setTimeout(delayedStartup, 0, isLoadingBlank, mustLoadSidebar);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1318,7 +1320,9 @@ function delayedStartup(isLoadingBlank, mustLoadSidebar) {
|
|||||||
gBrowser.addEventListener("command", BrowserOnCommand, false);
|
gBrowser.addEventListener("command", BrowserOnCommand, false);
|
||||||
|
|
||||||
tabPreviews.init();
|
tabPreviews.init();
|
||||||
ctrlTab.init();
|
ctrlTab.readPref();
|
||||||
|
gPrefService.addObserver(ctrlTab.prefName, ctrlTab, false);
|
||||||
|
gPrefService.addObserver(allTabs.prefName, allTabs, false);
|
||||||
|
|
||||||
// Initialize the microsummary service by retrieving it, prompting its factory
|
// Initialize the microsummary service by retrieving it, prompting its factory
|
||||||
// to create its singleton, whose constructor initializes the service.
|
// to create its singleton, whose constructor initializes the service.
|
||||||
@ -1371,6 +1375,7 @@ function BrowserShutdown()
|
|||||||
{
|
{
|
||||||
tabPreviews.uninit();
|
tabPreviews.uninit();
|
||||||
ctrlTab.uninit();
|
ctrlTab.uninit();
|
||||||
|
allTabs.uninit();
|
||||||
|
|
||||||
gGestureSupport.init(false);
|
gGestureSupport.init(false);
|
||||||
|
|
||||||
@ -2655,10 +2660,9 @@ var browserDragAndDrop = {
|
|||||||
var file = dt.mozGetDataAt("application/x-moz-file", 0);
|
var file = dt.mozGetDataAt("application/x-moz-file", 0);
|
||||||
if (file) {
|
if (file) {
|
||||||
var name = file instanceof Ci.nsIFile ? file.leafName : "";
|
var name = file instanceof Ci.nsIFile ? file.leafName : "";
|
||||||
var ioService = Cc["@mozilla.org/network/io-service;1"]
|
var fileHandler = ContentAreaUtils.ioService
|
||||||
.getService(Ci.nsIIOService);
|
.getProtocolHandler("file")
|
||||||
var fileHandler = ioService.getProtocolHandler("file")
|
.QueryInterface(Ci.nsIFileProtocolHandler);
|
||||||
.QueryInterface(Ci.nsIFileProtocolHandler);
|
|
||||||
return [fileHandler.getURLSpecFromFile(file), name];
|
return [fileHandler.getURLSpecFromFile(file), name];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2884,9 +2888,7 @@ const DOMLinkHandler = {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
var targetDoc = link.ownerDocument;
|
var targetDoc = link.ownerDocument;
|
||||||
var ios = Cc["@mozilla.org/network/io-service;1"].
|
var uri = makeURI(link.href, targetDoc.characterSet);
|
||||||
getService(Ci.nsIIOService);
|
|
||||||
var uri = ios.newURI(link.href, targetDoc.characterSet, null);
|
|
||||||
|
|
||||||
if (gBrowser.isFailedIcon(uri))
|
if (gBrowser.isFailedIcon(uri))
|
||||||
break;
|
break;
|
||||||
@ -4417,10 +4419,7 @@ nsBrowserAccess.prototype =
|
|||||||
if (aURI) {
|
if (aURI) {
|
||||||
if (aOpener) {
|
if (aOpener) {
|
||||||
location = aOpener.location;
|
location = aOpener.location;
|
||||||
referrer =
|
referrer = makeURI(location);
|
||||||
Components.classes["@mozilla.org/network/io-service;1"]
|
|
||||||
.getService(Components.interfaces.nsIIOService)
|
|
||||||
.newURI(location, null, null);
|
|
||||||
}
|
}
|
||||||
newWindow.QueryInterface(Ci.nsIInterfaceRequestor)
|
newWindow.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||||
.getInterface(Ci.nsIWebNavigation)
|
.getInterface(Ci.nsIWebNavigation)
|
||||||
@ -4437,10 +4436,7 @@ nsBrowserAccess.prototype =
|
|||||||
newWindow = aOpener.top;
|
newWindow = aOpener.top;
|
||||||
if (aURI) {
|
if (aURI) {
|
||||||
location = aOpener.location;
|
location = aOpener.location;
|
||||||
referrer =
|
referrer = makeURI(location);
|
||||||
Components.classes["@mozilla.org/network/io-service;1"]
|
|
||||||
.getService(Components.interfaces.nsIIOService)
|
|
||||||
.newURI(location, null, null);
|
|
||||||
|
|
||||||
newWindow.QueryInterface(Ci.nsIInterfaceRequestor)
|
newWindow.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||||
.getInterface(nsIWebNavigation)
|
.getInterface(nsIWebNavigation)
|
||||||
@ -4970,20 +4966,20 @@ function middleMousePaste(event)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
var contentAreaDNDObserver = {
|
var contentAreaDNDObserver = {
|
||||||
onDragOver: function (aEvent)
|
|
||||||
{
|
|
||||||
var types = aEvent.dataTransfer.types;
|
|
||||||
if (types.contains("application/x-moz-file") ||
|
|
||||||
types.contains("text/x-moz-url") ||
|
|
||||||
types.contains("text/uri-list") ||
|
|
||||||
types.contains("text/plain"))
|
|
||||||
aEvent.preventDefault();
|
|
||||||
},
|
|
||||||
onDrop: function (aEvent)
|
onDrop: function (aEvent)
|
||||||
{
|
{
|
||||||
if (aEvent.getPreventDefault())
|
if (aEvent.getPreventDefault())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
var types = aEvent.dataTransfer.types;
|
||||||
|
if (!types.contains("application/x-moz-file") &&
|
||||||
|
!types.contains("text/x-moz-url") &&
|
||||||
|
!types.contains("text/uri-list") &&
|
||||||
|
!types.contains("text/plain")) {
|
||||||
|
aEvent.preventDefault();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let [url, name] = browserDragAndDrop.getDragURLFromDataTransfer(aEvent.dataTransfer);
|
let [url, name] = browserDragAndDrop.getDragURLFromDataTransfer(aEvent.dataTransfer);
|
||||||
|
|
||||||
// valid urls don't contain spaces ' '; if we have a space it
|
// valid urls don't contain spaces ' '; if we have a space it
|
||||||
@ -5413,11 +5409,8 @@ var OfflineApps = {
|
|||||||
if (!attr) return null;
|
if (!attr) return null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var ios = Cc["@mozilla.org/network/io-service;1"].
|
var contentURI = makeURI(aWindow.location.href, null, null);
|
||||||
getService(Ci.nsIIOService);
|
return makeURI(attr, aWindow.document.characterSet, contentURI);
|
||||||
|
|
||||||
var contentURI = ios.newURI(aWindow.location.href, null, null);
|
|
||||||
return ios.newURI(attr, aWindow.document.characterSet, contentURI);
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -5618,11 +5611,8 @@ var OfflineApps = {
|
|||||||
if (!manifest)
|
if (!manifest)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var ios = Cc["@mozilla.org/network/io-service;1"].
|
var manifestURI = makeURI(manifest, aDocument.characterSet,
|
||||||
getService(Ci.nsIIOService);
|
aDocument.documentURIObject);
|
||||||
|
|
||||||
var manifestURI = ios.newURI(manifest, aDocument.characterSet,
|
|
||||||
aDocument.documentURIObject);
|
|
||||||
|
|
||||||
var updateService = Cc["@mozilla.org/offlinecacheupdate-service;1"].
|
var updateService = Cc["@mozilla.org/offlinecacheupdate-service;1"].
|
||||||
getService(Ci.nsIOfflineCacheUpdateService);
|
getService(Ci.nsIOfflineCacheUpdateService);
|
||||||
@ -5635,9 +5625,7 @@ var OfflineApps = {
|
|||||||
{
|
{
|
||||||
if (aTopic == "dom-storage-warn-quota-exceeded") {
|
if (aTopic == "dom-storage-warn-quota-exceeded") {
|
||||||
if (aSubject) {
|
if (aSubject) {
|
||||||
var uri = Cc["@mozilla.org/network/io-service;1"].
|
var uri = makeURI(aSubject.location.href);
|
||||||
getService(Ci.nsIIOService).
|
|
||||||
newURI(aSubject.location.href, null, null);
|
|
||||||
|
|
||||||
if (OfflineApps._checkUsage(uri)) {
|
if (OfflineApps._checkUsage(uri)) {
|
||||||
var browserWindow =
|
var browserWindow =
|
||||||
@ -5698,9 +5686,7 @@ var MailIntegration = {
|
|||||||
mailtoUrl += "&subject=" + encodeURIComponent(aSubject);
|
mailtoUrl += "&subject=" + encodeURIComponent(aSubject);
|
||||||
}
|
}
|
||||||
|
|
||||||
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
|
var uri = makeURI(mailtoUrl);
|
||||||
.getService(Components.interfaces.nsIIOService);
|
|
||||||
var uri = ioService.newURI(mailtoUrl, null, null);
|
|
||||||
|
|
||||||
// now pass this uri to the operating system
|
// now pass this uri to the operating system
|
||||||
this._launchExternalUrl(uri);
|
this._launchExternalUrl(uri);
|
||||||
@ -6642,9 +6628,7 @@ var gIdentityHandler = {
|
|||||||
|
|
||||||
// Make sure the identity popup hangs toward the middle of the location bar
|
// Make sure the identity popup hangs toward the middle of the location bar
|
||||||
// in RTL builds
|
// in RTL builds
|
||||||
var position = 'after_start';
|
var position = (getComputedStyle(gNavToolbox, "").direction == "rtl") ? 'after_end' : 'after_start';
|
||||||
if (gURLBar.getAttribute("chromedir") == "rtl")
|
|
||||||
position = 'after_end';
|
|
||||||
|
|
||||||
// Add the "open" attribute to the identity box for styling
|
// Add the "open" attribute to the identity box for styling
|
||||||
this._identityBox.setAttribute("open", "true");
|
this._identityBox.setAttribute("open", "true");
|
||||||
|
@ -104,17 +104,16 @@
|
|||||||
|
|
||||||
<popupset id="mainPopupSet">
|
<popupset id="mainPopupSet">
|
||||||
<menupopup id="backForwardMenu"
|
<menupopup id="backForwardMenu"
|
||||||
chromedir="&locale.dir;"
|
|
||||||
onpopupshowing="return FillHistoryMenu(event.target);"
|
onpopupshowing="return FillHistoryMenu(event.target);"
|
||||||
oncommand="gotoHistoryIndex(event);"
|
oncommand="gotoHistoryIndex(event);"
|
||||||
onclick="checkForMiddleClick(this, event);"/>
|
onclick="checkForMiddleClick(this, event);"/>
|
||||||
<tooltip id="aHTMLTooltip" onpopupshowing="return FillInHTMLTooltip(document.tooltipNode);"/>
|
<tooltip id="aHTMLTooltip" onpopupshowing="return FillInHTMLTooltip(document.tooltipNode);"/>
|
||||||
|
|
||||||
<!-- for search and content formfill/pw manager -->
|
<!-- for search and content formfill/pw manager -->
|
||||||
<panel type="autocomplete" chromedir="&locale.dir;" id="PopupAutoComplete" noautofocus="true" hidden="true"/>
|
<panel type="autocomplete" id="PopupAutoComplete" noautofocus="true" hidden="true"/>
|
||||||
|
|
||||||
<!-- for url bar autocomplete -->
|
<!-- for url bar autocomplete -->
|
||||||
<panel type="autocomplete-richlistbox" chromedir="&locale.dir;" id="PopupAutoCompleteRichResult" noautofocus="true" hidden="true"/>
|
<panel type="autocomplete-richlistbox" id="PopupAutoCompleteRichResult" noautofocus="true" hidden="true"/>
|
||||||
|
|
||||||
<panel id="editBookmarkPanel"
|
<panel id="editBookmarkPanel"
|
||||||
orient="vertical"
|
orient="vertical"
|
||||||
@ -205,8 +204,7 @@
|
|||||||
<!-- Popup for site identity information -->
|
<!-- Popup for site identity information -->
|
||||||
<panel id="identity-popup" position="after_start" hidden="true" noautofocus="true"
|
<panel id="identity-popup" position="after_start" hidden="true" noautofocus="true"
|
||||||
onpopupshown="document.getElementById('identity-popup-more-info-button').focus();"
|
onpopupshown="document.getElementById('identity-popup-more-info-button').focus();"
|
||||||
level="top"
|
level="top">
|
||||||
chromedir="&locale.dir;">
|
|
||||||
<hbox id="identity-popup-container" align="top">
|
<hbox id="identity-popup-container" align="top">
|
||||||
<image id="identity-popup-icon"/>
|
<image id="identity-popup-icon"/>
|
||||||
<vbox id="identity-popup-content-box">
|
<vbox id="identity-popup-content-box">
|
||||||
@ -242,30 +240,44 @@
|
|||||||
<label crop="center" flex="1" class="tooltip-label"/>
|
<label crop="center" flex="1" class="tooltip-label"/>
|
||||||
</tooltip>
|
</tooltip>
|
||||||
|
|
||||||
<panel id="ctrlTab-panel" class="KUI-panel" hidden="true" norestorefocus="true" ignorekeys="true">
|
<panel id="ctrlTab-panel" class="KUI-panel" hidden="true" norestorefocus="true" level="top">
|
||||||
|
<hbox>
|
||||||
|
<button class="ctrlTab-preview" flex="1"/>
|
||||||
|
<button class="ctrlTab-preview" flex="1"/>
|
||||||
|
<button class="ctrlTab-preview" flex="1"/>
|
||||||
|
<button class="ctrlTab-preview" flex="1"/>
|
||||||
|
<button class="ctrlTab-preview" flex="1"/>
|
||||||
|
<button class="ctrlTab-preview" flex="1"/>
|
||||||
|
</hbox>
|
||||||
<hbox pack="center">
|
<hbox pack="center">
|
||||||
<textbox id="ctrlTab-search"
|
<button id="ctrlTab-showAll" class="ctrlTab-preview" noicon="true"/>
|
||||||
|
</hbox>
|
||||||
|
</panel>
|
||||||
|
|
||||||
|
<panel id="allTabs-panel" hidden="true" norestorefocus="true" ignorekeys="true"
|
||||||
|
# XXX: KUI style disabled, because the transparent background slows down
|
||||||
|
# interacting with the panel, esp. the search field.
|
||||||
|
# class="KUI-panel"
|
||||||
|
onmouseover="allTabs._updateTabCloseButton(event);">
|
||||||
|
<hbox id="allTabs-meta" align="center">
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<textbox id="allTabs-filter"
|
||||||
|
tooltiptext="&allTabs.filter.emptyText;"
|
||||||
type="search"
|
type="search"
|
||||||
emptytext="&ctrlTab.search.emptyText;"
|
oncommand="allTabs.filter();"/>
|
||||||
oncommand="ctrlTab.search();"
|
<spacer flex="1"/>
|
||||||
onfocus="ctrlTab.sticky = true;"/>
|
<toolbarbutton class="KUI-panel-closebutton"
|
||||||
|
oncommand="allTabs.close()"
|
||||||
|
tooltiptext="&closeCmd.label;"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
<hbox class="ctrlTab-row">
|
<stack id="allTabs-stack">
|
||||||
<hbox flex="1" pack="center"><vbox class="ctrlTab-thumbnail"/></hbox>
|
<box id="allTabs-container"/>
|
||||||
<vbox class="ctrlTab-thumbnail"/>
|
<toolbarbutton id="allTabs-tab-close-button"
|
||||||
<hbox flex="1" pack="center"><vbox class="ctrlTab-thumbnail"/></hbox>
|
class="tab-close-button"
|
||||||
</hbox>
|
oncommand="allTabs.closeTab(event);"
|
||||||
<hbox class="ctrlTab-row">
|
tooltiptext="&closeCmd.label;"
|
||||||
<hbox flex="1" pack="center"><vbox class="ctrlTab-thumbnail"/></hbox>
|
style="visibility:hidden"/>
|
||||||
<vbox class="ctrlTab-thumbnail"/>
|
</stack>
|
||||||
<hbox flex="1" pack="center"><vbox class="ctrlTab-thumbnail"/></hbox>
|
|
||||||
</hbox>
|
|
||||||
<hbox class="ctrlTab-row">
|
|
||||||
<hbox flex="1" pack="center"><vbox class="ctrlTab-thumbnail"/></hbox>
|
|
||||||
<vbox class="ctrlTab-thumbnail"/>
|
|
||||||
<hbox flex="1" pack="center"><vbox class="ctrlTab-thumbnail"/></hbox>
|
|
||||||
</hbox>
|
|
||||||
<hbox id="ctrlTab-pages"/>
|
|
||||||
</panel>
|
</panel>
|
||||||
</popupset>
|
</popupset>
|
||||||
|
|
||||||
@ -304,18 +316,16 @@
|
|||||||
<toolbaritem id="unified-back-forward-button" class="chromeclass-toolbar-additional"
|
<toolbaritem id="unified-back-forward-button" class="chromeclass-toolbar-additional"
|
||||||
context="backForwardMenu">
|
context="backForwardMenu">
|
||||||
<toolbarbutton id="back-button" class="toolbarbutton-1"
|
<toolbarbutton id="back-button" class="toolbarbutton-1"
|
||||||
chromedir="&locale.dir;"
|
|
||||||
label="&backCmd.label;"
|
label="&backCmd.label;"
|
||||||
command="Browser:BackOrBackDuplicate"
|
command="Browser:BackOrBackDuplicate"
|
||||||
onclick="checkForMiddleClick(this, event);"
|
onclick="checkForMiddleClick(this, event);"
|
||||||
tooltiptext="&backButton.tooltip;"/>
|
tooltiptext="&backButton.tooltip;"/>
|
||||||
<toolbarbutton id="forward-button" class="toolbarbutton-1"
|
<toolbarbutton id="forward-button" class="toolbarbutton-1"
|
||||||
chromedir="&locale.dir;"
|
|
||||||
label="&forwardCmd.label;"
|
label="&forwardCmd.label;"
|
||||||
command="Browser:ForwardOrForwardDuplicate"
|
command="Browser:ForwardOrForwardDuplicate"
|
||||||
onclick="checkForMiddleClick(this, event);"
|
onclick="checkForMiddleClick(this, event);"
|
||||||
tooltiptext="&forwardButton.tooltip;"/>
|
tooltiptext="&forwardButton.tooltip;"/>
|
||||||
<toolbarbutton id="back-forward-dropmarker" type="menu" chromedir="&locale.dir;"
|
<toolbarbutton id="back-forward-dropmarker" type="menu"
|
||||||
disabled="true" tooltiptext="&backForwardMenu.tooltip;"
|
disabled="true" tooltiptext="&backForwardMenu.tooltip;"
|
||||||
onbroadcast="if (this.disabled) this.disabled =
|
onbroadcast="if (this.disabled) this.disabled =
|
||||||
document.getElementById('Browser:Back').hasAttribute('disabled') &&
|
document.getElementById('Browser:Back').hasAttribute('disabled') &&
|
||||||
@ -323,7 +333,6 @@
|
|||||||
<!-- bug 415444: event.stopPropagation is here for the cloned version of
|
<!-- bug 415444: event.stopPropagation is here for the cloned version of
|
||||||
this menupopup -->
|
this menupopup -->
|
||||||
<menupopup context=""
|
<menupopup context=""
|
||||||
chromedir="&locale.dir;"
|
|
||||||
position="after_start"
|
position="after_start"
|
||||||
onpopupshowing="return FillHistoryMenu(event.target);"
|
onpopupshowing="return FillHistoryMenu(event.target);"
|
||||||
oncommand="gotoHistoryIndex(event); event.stopPropagation();"
|
oncommand="gotoHistoryIndex(event); event.stopPropagation();"
|
||||||
@ -360,7 +369,6 @@
|
|||||||
bookmarkemptytext="&urlbar.bookmark.emptyText;"
|
bookmarkemptytext="&urlbar.bookmark.emptyText;"
|
||||||
historyemptytext="&urlbar.history.emptyText;"
|
historyemptytext="&urlbar.history.emptyText;"
|
||||||
noneemptytext="&urlbar.none.emptyText;"
|
noneemptytext="&urlbar.none.emptyText;"
|
||||||
chromedir="&locale.dir;"
|
|
||||||
type="autocomplete"
|
type="autocomplete"
|
||||||
autocompletesearch="history"
|
autocompletesearch="history"
|
||||||
autocompletepopup="PopupAutoCompleteRichResult"
|
autocompletepopup="PopupAutoCompleteRichResult"
|
||||||
@ -370,6 +378,7 @@
|
|||||||
showimagecolumn="true"
|
showimagecolumn="true"
|
||||||
enablehistory="true"
|
enablehistory="true"
|
||||||
maxrows="6"
|
maxrows="6"
|
||||||
|
timeout="75"
|
||||||
newlines="stripsurroundingwhitespace"
|
newlines="stripsurroundingwhitespace"
|
||||||
oninput="gBrowser.userTypedValue = this.value;"
|
oninput="gBrowser.userTypedValue = this.value;"
|
||||||
ontextentered="this.handleCommand(param);"
|
ontextentered="this.handleCommand(param);"
|
||||||
@ -384,7 +393,6 @@
|
|||||||
We only add the identity-box button to the tab order when the location bar
|
We only add the identity-box button to the tab order when the location bar
|
||||||
has focus, otherwise pressing F6 focuses it instead of the location bar -->
|
has focus, otherwise pressing F6 focuses it instead of the location bar -->
|
||||||
<box id="identity-box" role="button"
|
<box id="identity-box" role="button"
|
||||||
chromedir="&locale.dir;"
|
|
||||||
onclick="gIdentityHandler.handleIdentityButtonEvent(event);"
|
onclick="gIdentityHandler.handleIdentityButtonEvent(event);"
|
||||||
onkeypress="gIdentityHandler.handleIdentityButtonEvent(event);">
|
onkeypress="gIdentityHandler.handleIdentityButtonEvent(event);">
|
||||||
<hbox align="center">
|
<hbox align="center">
|
||||||
@ -404,11 +412,11 @@
|
|||||||
style="-moz-user-focus: none"
|
style="-moz-user-focus: none"
|
||||||
class="plain urlbar-icon"
|
class="plain urlbar-icon"
|
||||||
id="feed-button"
|
id="feed-button"
|
||||||
chromedir="&locale.dir;"
|
|
||||||
collapsed="true"
|
collapsed="true"
|
||||||
tooltiptext="&feedButton.tooltip;"
|
tooltiptext="&feedButton.tooltip;"
|
||||||
onclick="return FeedHandler.onFeedButtonClick(event);">
|
onclick="return FeedHandler.onFeedButtonClick(event);">
|
||||||
<menupopup position="after_end"
|
<menupopup position="after_end"
|
||||||
|
id="feed-menu"
|
||||||
onpopupshowing="return FeedHandler.buildFeedList(this);"
|
onpopupshowing="return FeedHandler.buildFeedList(this);"
|
||||||
oncommand="return FeedHandler.subscribeToFeed(null, event);"
|
oncommand="return FeedHandler.subscribeToFeed(null, event);"
|
||||||
onclick="checkForMiddleClick(this, event);"/>
|
onclick="checkForMiddleClick(this, event);"/>
|
||||||
@ -417,7 +425,6 @@
|
|||||||
class="urlbar-icon"
|
class="urlbar-icon"
|
||||||
onclick="PlacesStarButton.onClick(event);"/>
|
onclick="PlacesStarButton.onClick(event);"/>
|
||||||
<image id="go-button"
|
<image id="go-button"
|
||||||
chromedir="&locale.dir;"
|
|
||||||
class="urlbar-icon"
|
class="urlbar-icon"
|
||||||
tooltiptext="&goEndCap.tooltip;"
|
tooltiptext="&goEndCap.tooltip;"
|
||||||
onclick="gURLBar.handleCommand(event);"/>
|
onclick="gURLBar.handleCommand(event);"/>
|
||||||
@ -428,7 +435,7 @@
|
|||||||
<toolbaritem id="search-container" title="&searchItem.title;"
|
<toolbaritem id="search-container" title="&searchItem.title;"
|
||||||
align="center" class="chromeclass-toolbar-additional"
|
align="center" class="chromeclass-toolbar-additional"
|
||||||
flex="100" persist="width">
|
flex="100" persist="width">
|
||||||
<searchbar id="searchbar" flex="1" chromedir="&locale.dir;"/>
|
<searchbar id="searchbar" flex="1"/>
|
||||||
</toolbaritem>
|
</toolbaritem>
|
||||||
|
|
||||||
<toolbarbutton id="print-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
|
<toolbarbutton id="print-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||||
|
@ -1182,10 +1182,8 @@ nsContextMenu.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getLinkURI: function() {
|
getLinkURI: function() {
|
||||||
var ioService = Cc["@mozilla.org/network/io-service;1"].
|
|
||||||
getService(Ci.nsIIOService);
|
|
||||||
try {
|
try {
|
||||||
return ioService.newURI(this.linkURL, null, null);
|
return makeURI(this.linkURL);
|
||||||
}
|
}
|
||||||
catch (ex) {
|
catch (ex) {
|
||||||
// e.g. empty URL string
|
// e.g. empty URL string
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
# Do NOT localize or otherwise change these values
|
|
||||||
browser.startup.homepage=http://www.mozilla.org/projects/bonecho/
|
|
@ -596,11 +596,14 @@ function addImage(url, type, alt, elem, isBg)
|
|||||||
|
|
||||||
function grabAll(elem)
|
function grabAll(elem)
|
||||||
{
|
{
|
||||||
// check for background images, any node may have one
|
// check for background images, any node may have multiple
|
||||||
var ComputedStyle = elem.ownerDocument.defaultView.getComputedStyle(elem, "");
|
var computedStyle = elem.ownerDocument.defaultView.getComputedStyle(elem, "");
|
||||||
var url = ComputedStyle && ComputedStyle.getPropertyCSSValue("background-image");
|
if (computedStyle) {
|
||||||
if (url && url.primitiveType == CSSPrimitiveValue.CSS_URI)
|
Array.forEach(computedStyle.getPropertyCSSValue("background-image"), function (url) {
|
||||||
addImage(url.getStringValue(), gStrings.mediaBGImg, gStrings.notSet, elem, true);
|
if (url.primitiveType == CSSPrimitiveValue.CSS_URI)
|
||||||
|
addImage(url.getStringValue(), gStrings.mediaBGImg, gStrings.notSet, elem, true);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// one swi^H^H^Hif-else to rule them all
|
// one swi^H^H^Hif-else to rule them all
|
||||||
if (elem instanceof HTMLImageElement)
|
if (elem instanceof HTMLImageElement)
|
||||||
|
@ -48,8 +48,6 @@
|
|||||||
<!DOCTYPE window [
|
<!DOCTYPE window [
|
||||||
<!ENTITY % pageInfoDTD SYSTEM "chrome://browser/locale/pageInfo.dtd">
|
<!ENTITY % pageInfoDTD SYSTEM "chrome://browser/locale/pageInfo.dtd">
|
||||||
%pageInfoDTD;
|
%pageInfoDTD;
|
||||||
<!ENTITY % global SYSTEM "chrome://global/locale/global.dtd">
|
|
||||||
%global;
|
|
||||||
]>
|
]>
|
||||||
|
|
||||||
#ifdef XP_MACOSX
|
#ifdef XP_MACOSX
|
||||||
@ -117,8 +115,7 @@
|
|||||||
</menupopup>
|
</menupopup>
|
||||||
|
|
||||||
<windowdragbox id="topBar" class="viewGroupWrapper">
|
<windowdragbox id="topBar" class="viewGroupWrapper">
|
||||||
<radiogroup id="viewGroup" class="chromeclass-toolbar" orient="horizontal"
|
<radiogroup id="viewGroup" class="chromeclass-toolbar" orient="horizontal">
|
||||||
chromedir="&locale.dir;">
|
|
||||||
<radio id="generalTab" label="&generalTab;" accesskey="&generalTab.accesskey;"
|
<radio id="generalTab" label="&generalTab;" accesskey="&generalTab.accesskey;"
|
||||||
oncommand="showTab('general');"/>
|
oncommand="showTab('general');"/>
|
||||||
<radio id="mediaTab" label="&mediaTab;" accesskey="&mediaTab.accesskey;"
|
<radio id="mediaTab" label="&mediaTab;" accesskey="&mediaTab.accesskey;"
|
||||||
|
@ -42,7 +42,6 @@
|
|||||||
# ***** END LICENSE BLOCK *****
|
# ***** END LICENSE BLOCK *****
|
||||||
|
|
||||||
<?xml-stylesheet href="chrome://global/skin/"?>
|
<?xml-stylesheet href="chrome://global/skin/"?>
|
||||||
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css" type="text/css"?>
|
|
||||||
<?xml-stylesheet href="chrome://browser/skin/sanitizeDialog.css"?>
|
<?xml-stylesheet href="chrome://browser/skin/sanitizeDialog.css"?>
|
||||||
|
|
||||||
#ifdef CRH_DIALOG_TREE_VIEW
|
#ifdef CRH_DIALOG_TREE_VIEW
|
||||||
@ -88,11 +87,9 @@
|
|||||||
<preferences id="sanitizePreferences">
|
<preferences id="sanitizePreferences">
|
||||||
<preference id="privacy.cpd.history" name="privacy.cpd.history" type="bool"/>
|
<preference id="privacy.cpd.history" name="privacy.cpd.history" type="bool"/>
|
||||||
<preference id="privacy.cpd.formdata" name="privacy.cpd.formdata" type="bool"/>
|
<preference id="privacy.cpd.formdata" name="privacy.cpd.formdata" type="bool"/>
|
||||||
<preference id="privacy.cpd.passwords" name="privacy.cpd.passwords" type="bool"/>
|
|
||||||
<preference id="privacy.cpd.downloads" name="privacy.cpd.downloads" type="bool" disabled="true"/>
|
<preference id="privacy.cpd.downloads" name="privacy.cpd.downloads" type="bool" disabled="true"/>
|
||||||
<preference id="privacy.cpd.cookies" name="privacy.cpd.cookies" type="bool"/>
|
<preference id="privacy.cpd.cookies" name="privacy.cpd.cookies" type="bool"/>
|
||||||
<preference id="privacy.cpd.cache" name="privacy.cpd.cache" type="bool"/>
|
<preference id="privacy.cpd.cache" name="privacy.cpd.cache" type="bool"/>
|
||||||
<preference id="privacy.cpd.offlineApps" name="privacy.cpd.offlineApps" type="bool"/>
|
|
||||||
<preference id="privacy.cpd.sessions" name="privacy.cpd.sessions" type="bool"/>
|
<preference id="privacy.cpd.sessions" name="privacy.cpd.sessions" type="bool"/>
|
||||||
<preference id="privacy.cpd.siteSettings" name="privacy.cpd.siteSettings" type="bool"/>
|
<preference id="privacy.cpd.siteSettings" name="privacy.cpd.siteSettings" type="bool"/>
|
||||||
</preferences>
|
</preferences>
|
||||||
|
@ -50,8 +50,6 @@
|
|||||||
<!DOCTYPE bindings [
|
<!DOCTYPE bindings [
|
||||||
<!ENTITY % tabBrowserDTD SYSTEM "chrome://browser/locale/tabbrowser.dtd" >
|
<!ENTITY % tabBrowserDTD SYSTEM "chrome://browser/locale/tabbrowser.dtd" >
|
||||||
%tabBrowserDTD;
|
%tabBrowserDTD;
|
||||||
<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
|
|
||||||
%globalDTD;
|
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<bindings id="tabBrowserBindings"
|
<bindings id="tabBrowserBindings"
|
||||||
@ -68,7 +66,7 @@
|
|||||||
<xul:stringbundle anonid="tbstringbundle" src="chrome://browser/locale/tabbrowser.properties"/>
|
<xul:stringbundle anonid="tbstringbundle" src="chrome://browser/locale/tabbrowser.properties"/>
|
||||||
<xul:tabbox anonid="tabbox" flex="1" eventnode="document" xbl:inherits="handleCtrlPageUpDown"
|
<xul:tabbox anonid="tabbox" flex="1" eventnode="document" xbl:inherits="handleCtrlPageUpDown"
|
||||||
onselect="if (!('updateCurrentBrowser' in this.parentNode) || event.target.localName != 'tabpanels') return; this.parentNode.updateCurrentBrowser();">
|
onselect="if (!('updateCurrentBrowser' in this.parentNode) || event.target.localName != 'tabpanels') return; this.parentNode.updateCurrentBrowser();">
|
||||||
<xul:hbox class="tab-drop-indicator-bar" collapsed="true" chromedir="&locale.dir;"
|
<xul:hbox class="tab-drop-indicator-bar" collapsed="true"
|
||||||
ondragover="this.parentNode.parentNode._onDragOver(event);"
|
ondragover="this.parentNode.parentNode._onDragOver(event);"
|
||||||
ondragleave="this.parentNode.parentNode._onDragLeave(event);"
|
ondragleave="this.parentNode.parentNode._onDragLeave(event);"
|
||||||
ondrop="this.parentNode.parentNode._onDrop(event);">
|
ondrop="this.parentNode.parentNode._onDrop(event);">
|
||||||
@ -622,17 +620,13 @@
|
|||||||
<body>
|
<body>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
var browser = this.getBrowserForTab(aTab);
|
var browser = this.getBrowserForTab(aTab);
|
||||||
browser.mIconURL = aURI;
|
browser.mIconURL = aURI instanceof Ci.nsIURI ? aURI.spec : aURI;
|
||||||
|
|
||||||
if (aURI) {
|
if (aURI && this.mFaviconService) {
|
||||||
if (!(aURI instanceof Components.interfaces.nsIURI)) {
|
if (!(aURI instanceof Ci.nsIURI))
|
||||||
var ios = Components.classes["@mozilla.org/network/io-service;1"]
|
aURI = makeURI(aURI);
|
||||||
.getService(Components.interfaces.nsIIOService);
|
this.mFaviconService.setAndLoadFaviconForPage(browser.currentURI,
|
||||||
aURI = ios.newURI(aURI, null, null);
|
aURI, false);
|
||||||
}
|
|
||||||
if (this.mFaviconService)
|
|
||||||
this.mFaviconService.setAndLoadFaviconForPage(browser.currentURI,
|
|
||||||
aURI, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateIcon(aTab);
|
this.updateIcon(aTab);
|
||||||
@ -706,7 +700,7 @@
|
|||||||
req.image.height > sz)
|
req.image.height > sz)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.setIcon(aTab, browser.currentURI.spec);
|
this.setIcon(aTab, browser.currentURI);
|
||||||
} catch (e) { }
|
} catch (e) { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -725,14 +719,11 @@
|
|||||||
<parameter name="aURI"/>
|
<parameter name="aURI"/>
|
||||||
<body>
|
<body>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
if (!(aURI instanceof Components.interfaces.nsIURI)) {
|
if (this.mFaviconService) {
|
||||||
var ios = Components.classes["@mozilla.org/network/io-service;1"]
|
if (!(aURI instanceof Ci.nsIURI))
|
||||||
.getService(Components.interfaces.nsIIOService);
|
aURI = makeURI(aURI);
|
||||||
aURI = ios.newURI(aURI, null, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.mFaviconService)
|
|
||||||
return this.mFaviconService.isFailedFavicon(aURI);
|
return this.mFaviconService.isFailedFavicon(aURI);
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
]]>
|
]]>
|
||||||
</body>
|
</body>
|
||||||
@ -2819,8 +2810,7 @@
|
|||||||
onmousedown="_startScroll(-1);"
|
onmousedown="_startScroll(-1);"
|
||||||
onmouseover="_continueScroll(-1);"
|
onmouseover="_continueScroll(-1);"
|
||||||
onmouseup="_stopScroll();"
|
onmouseup="_stopScroll();"
|
||||||
onmouseout="_pauseScroll();"
|
onmouseout="_pauseScroll();"/>
|
||||||
chromedir="&locale.dir;"/>
|
|
||||||
<xul:scrollbox xbl:inherits="orient,align,pack,dir" flex="1" anonid="scrollbox">
|
<xul:scrollbox xbl:inherits="orient,align,pack,dir" flex="1" anonid="scrollbox">
|
||||||
<children/>
|
<children/>
|
||||||
</xul:scrollbox>
|
</xul:scrollbox>
|
||||||
@ -2836,8 +2826,7 @@
|
|||||||
onmousedown="_startScroll(1);"
|
onmousedown="_startScroll(1);"
|
||||||
onmouseover="_continueScroll(1);"
|
onmouseover="_continueScroll(1);"
|
||||||
onmouseup="_stopScroll();"
|
onmouseup="_stopScroll();"
|
||||||
onmouseout="_pauseScroll();"
|
onmouseout="_pauseScroll();"/>
|
||||||
chromedir="&locale.dir;"/>
|
|
||||||
</xul:stack>
|
</xul:stack>
|
||||||
</content>
|
</content>
|
||||||
#endif
|
#endif
|
||||||
@ -2858,7 +2847,7 @@
|
|||||||
</xul:stack>
|
</xul:stack>
|
||||||
#endif
|
#endif
|
||||||
<xul:arrowscrollbox anonid="arrowscrollbox" orient="horizontal" flex="1"
|
<xul:arrowscrollbox anonid="arrowscrollbox" orient="horizontal" flex="1"
|
||||||
style="min-width: 1px;" chromedir="&locale.dir;"
|
style="min-width: 1px;"
|
||||||
#ifndef XP_MACOSX
|
#ifndef XP_MACOSX
|
||||||
clicktoscroll="true"
|
clicktoscroll="true"
|
||||||
#endif
|
#endif
|
||||||
@ -2870,20 +2859,23 @@
|
|||||||
# button, necessary due to the previous hack.
|
# button, necessary due to the previous hack.
|
||||||
<children/>
|
<children/>
|
||||||
<xul:toolbarbutton class="tabs-newtab-button"
|
<xul:toolbarbutton class="tabs-newtab-button"
|
||||||
command="cmd_newNavigatorTab" chromedir="&locale.dir;"
|
command="cmd_newNavigatorTab"
|
||||||
tooltiptext="&newTabButton.tooltip;"/>
|
tooltiptext="&newTabButton.tooltip;"/>
|
||||||
</xul:arrowscrollbox>
|
</xul:arrowscrollbox>
|
||||||
<xul:toolbarbutton class="tabs-newtab-button" anonid="newtab-button"
|
<xul:toolbarbutton class="tabs-newtab-button" anonid="newtab-button"
|
||||||
command="cmd_newNavigatorTab" chromedir="&locale.dir;"
|
command="cmd_newNavigatorTab"
|
||||||
tooltiptext="&newTabButton.tooltip;"/>
|
tooltiptext="&newTabButton.tooltip;"/>
|
||||||
<xul:stack align="center" pack="end" chromedir="&locale.dir;">
|
<xul:stack align="center" pack="end">
|
||||||
<xul:hbox flex="1" class="tabs-alltabs-box-animate" anonid="alltabs-box-animate"/>
|
<xul:hbox flex="1" class="tabs-alltabs-box-animate" anonid="alltabs-box-animate"/>
|
||||||
<xul:toolbarbutton class="tabs-alltabs-button" anonid="alltabs-button"
|
<xul:toolbarbutton class="tabs-alltabs-button" anonid="alltabs-button"
|
||||||
tooltiptext="&listAllTabs.label;"
|
type="menu"
|
||||||
oncommand="ctrlTab.open(true);"/>
|
tooltiptext="&listAllTabs.label;">
|
||||||
|
<xul:menupopup class="tabs-alltabs-popup" anonid="alltabs-popup"
|
||||||
|
position="after_end"/>
|
||||||
|
</xul:toolbarbutton>
|
||||||
</xul:stack>
|
</xul:stack>
|
||||||
<xul:toolbarbutton anonid="tabs-closebutton"
|
<xul:toolbarbutton anonid="tabs-closebutton"
|
||||||
class="close-button tabs-closebutton" chromedir="&locale.dir;"/>
|
class="close-button tabs-closebutton"/>
|
||||||
</xul:hbox>
|
</xul:hbox>
|
||||||
</xul:stack>
|
</xul:stack>
|
||||||
</content>
|
</content>
|
||||||
@ -3239,8 +3231,7 @@
|
|||||||
|
|
||||||
<binding id="tabbrowser-tab" display="xul:hbox"
|
<binding id="tabbrowser-tab" display="xul:hbox"
|
||||||
extends="chrome://global/content/bindings/tabbox.xml#tab">
|
extends="chrome://global/content/bindings/tabbox.xml#tab">
|
||||||
<content chromedir="&locale.dir;"
|
<content closetabtext="&closeTab.label;">
|
||||||
closetabtext="&closeTab.label;">
|
|
||||||
<xul:image xbl:inherits="validate,src=image" class="tab-icon-image"/>
|
<xul:image xbl:inherits="validate,src=image" class="tab-icon-image"/>
|
||||||
<xul:label flex="1" xbl:inherits="value=label,crop,accesskey" class="tab-text"/>
|
<xul:label flex="1" xbl:inherits="value=label,crop,accesskey" class="tab-text"/>
|
||||||
<xul:toolbarbutton anonid="close-button" tabindex="-1" class="tab-close-button"/>
|
<xul:toolbarbutton anonid="close-button" tabindex="-1" class="tab-close-button"/>
|
||||||
@ -3293,25 +3284,6 @@
|
|||||||
<binding id="tabbrowser-alltabs-popup"
|
<binding id="tabbrowser-alltabs-popup"
|
||||||
extends="chrome://global/content/bindings/popup.xml#popup">
|
extends="chrome://global/content/bindings/popup.xml#popup">
|
||||||
<implementation implements="nsIDOMEventListener">
|
<implementation implements="nsIDOMEventListener">
|
||||||
<field name="_xulWindow">
|
|
||||||
null
|
|
||||||
</field>
|
|
||||||
|
|
||||||
<constructor><![CDATA[
|
|
||||||
// We cannot cache the XULBrowserWindow object itself since it might
|
|
||||||
// be set after this binding is constructed.
|
|
||||||
try {
|
|
||||||
this._xulWindow =
|
|
||||||
window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
|
|
||||||
.getInterface(Components.interfaces.nsIWebNavigation)
|
|
||||||
.QueryInterface(Components.interfaces.nsIDocShellTreeItem)
|
|
||||||
.treeOwner
|
|
||||||
.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
|
|
||||||
.getInterface(Components.interfaces.nsIXULWindow);
|
|
||||||
}
|
|
||||||
catch(ex) { }
|
|
||||||
]]></constructor>
|
|
||||||
|
|
||||||
<method name="_menuItemOnCommand">
|
<method name="_menuItemOnCommand">
|
||||||
<parameter name="aEvent"/>
|
<parameter name="aEvent"/>
|
||||||
|
|
||||||
@ -3471,9 +3443,6 @@
|
|||||||
|
|
||||||
<handler event="DOMMenuItemActive">
|
<handler event="DOMMenuItemActive">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
if (!this._xulWindow || !this._xulWindow.XULBrowserWindow)
|
|
||||||
return;
|
|
||||||
|
|
||||||
var tab = event.target.tab;
|
var tab = event.target.tab;
|
||||||
if (tab) {
|
if (tab) {
|
||||||
var statusText = tab.linkedBrowser.currentURI.spec;
|
var statusText = tab.linkedBrowser.currentURI.spec;
|
||||||
@ -3484,16 +3453,13 @@
|
|||||||
statusText = " ";
|
statusText = " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
this._xulWindow.XULBrowserWindow.setOverLink(statusText, null);
|
XULBrowserWindow.setOverLink(statusText, null);
|
||||||
}
|
}
|
||||||
]]></handler>
|
]]></handler>
|
||||||
|
|
||||||
<handler event="DOMMenuItemInactive">
|
<handler event="DOMMenuItemInactive">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
if (!this._xulWindow || !this._xulWindow.XULBrowserWindow)
|
XULBrowserWindow.setOverLink("", null);
|
||||||
return;
|
|
||||||
|
|
||||||
this._xulWindow.XULBrowserWindow.setOverLink("", null);
|
|
||||||
]]></handler>
|
]]></handler>
|
||||||
|
|
||||||
</handlers>
|
</handlers>
|
||||||
|
@ -1,12 +1,8 @@
|
|||||||
// Bug 356571 - loadOneOrMoreURIs gives up if one of the URLs has an unknown protocol
|
// Bug 356571 - loadOneOrMoreURIs gives up if one of the URLs has an unknown protocol
|
||||||
|
|
||||||
const Cc = Components.classes;
|
|
||||||
const Ci = Components.interfaces;
|
|
||||||
const Cr = Components.results;
|
const Cr = Components.results;
|
||||||
const Cm = Components.manager;
|
const Cm = Components.manager;
|
||||||
|
|
||||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
|
||||||
|
|
||||||
// Set to true when docShell alerts for unknown protocol error
|
// Set to true when docShell alerts for unknown protocol error
|
||||||
var didFail = false;
|
var didFail = false;
|
||||||
|
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
function test() {
|
function test() {
|
||||||
var ioserv = Components.classes["@mozilla.org/network/io-service;1"].
|
var exampleUri = makeURI("http://example.com/");
|
||||||
getService(Components.interfaces.nsIIOService);
|
var secman = Cc["@mozilla.org/scriptsecuritymanager;1"].getService(Ci.nsIScriptSecurityManager);
|
||||||
var exampleUri = ioserv.newURI("http://example.com/", null, null);
|
|
||||||
var secman = Components.classes["@mozilla.org/scriptsecuritymanager;1"].
|
|
||||||
getService(Components.interfaces.nsIScriptSecurityManager);
|
|
||||||
var principal = secman.getCodebasePrincipal(exampleUri);
|
var principal = secman.getCodebasePrincipal(exampleUri);
|
||||||
|
|
||||||
function testIsFeed(aTitle, aHref, aType, aKnown) {
|
function testIsFeed(aTitle, aHref, aType, aKnown) {
|
||||||
|
@ -30,16 +30,16 @@ function invokeUsingStarButton(phase) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var testURL = "data:text/plain,Content";
|
||||||
|
|
||||||
// test bug 432599
|
// test bug 432599
|
||||||
function test() {
|
function test() {
|
||||||
waitForExplicitFinish();
|
waitForExplicitFinish();
|
||||||
|
|
||||||
let testTab = gBrowser.addTab();
|
gBrowser.selectedTab = gBrowser.addTab();
|
||||||
gBrowser.selectedTab = testTab;
|
gBrowser.selectedBrowser.addEventListener("load", initTest, true);
|
||||||
let testBrowser = gBrowser.getBrowserForTab(testTab);
|
|
||||||
testBrowser.addEventListener("load", initTest, true);
|
|
||||||
|
|
||||||
testBrowser.contentWindow.location = "data:text/plain,Content";
|
content.location = testURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
let invokers = [invokeUsingStarButton, invokeUsingCtrlD];
|
let invokers = [invokeUsingStarButton, invokeUsingCtrlD];
|
||||||
@ -47,12 +47,7 @@ let currentInvoker = 0;
|
|||||||
|
|
||||||
function initTest() {
|
function initTest() {
|
||||||
// first, bookmark the page
|
// first, bookmark the page
|
||||||
let app = Components.classes["@mozilla.org/fuel/application;1"]
|
Application.bookmarks.toolbar.addBookmark("Bug 432599 Test", makeURI(testURL));
|
||||||
.getService(Components.interfaces.fuelIApplication);
|
|
||||||
let ios = Components.classes["@mozilla.org/network/io-service;1"]
|
|
||||||
.getService(Ci.nsIIOService);
|
|
||||||
app.bookmarks.toolbar.addBookmark("Bug 432599 Test",
|
|
||||||
ios.newURI("data:text/plain,Content", null, null));
|
|
||||||
|
|
||||||
checkBookmarksPanel(invokers[currentInvoker], 1);
|
checkBookmarksPanel(invokers[currentInvoker], 1);
|
||||||
}
|
}
|
||||||
@ -77,7 +72,7 @@ function checkBookmarksPanel(invoker, phase)
|
|||||||
if (phase < 4) {
|
if (phase < 4) {
|
||||||
checkBookmarksPanel(invoker, phase + 1);
|
checkBookmarksPanel(invoker, phase + 1);
|
||||||
} else {
|
} else {
|
||||||
++ currentInvoker;
|
++currentInvoker;
|
||||||
if (currentInvoker < invokers.length) {
|
if (currentInvoker < invokers.length) {
|
||||||
checkBookmarksPanel(invokers[currentInvoker], 1);
|
checkBookmarksPanel(invokers[currentInvoker], 1);
|
||||||
} else {
|
} else {
|
||||||
|
@ -35,8 +35,6 @@
|
|||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Test the fix for bug 441778 to ensure site-specific page zoom doesn't get
|
* Test the fix for bug 441778 to ensure site-specific page zoom doesn't get
|
||||||
* modified by sub-document loads of content from a different domain.
|
* modified by sub-document loads of content from a different domain.
|
||||||
@ -53,9 +51,8 @@ function test() {
|
|||||||
let zoomLevel;
|
let zoomLevel;
|
||||||
|
|
||||||
// Prepare the test tab
|
// Prepare the test tab
|
||||||
let testTab = gBrowser.addTab();
|
gBrowser.selectedTab = gBrowser.addTab();
|
||||||
gBrowser.selectedTab = testTab;
|
let testBrowser = gBrowser.selectedBrowser;
|
||||||
let testBrowser = gBrowser.getBrowserForTab(testTab);
|
|
||||||
|
|
||||||
let finishTest = function() {
|
let finishTest = function() {
|
||||||
testBrowser.removeProgressListener(progressListener);
|
testBrowser.removeProgressListener(progressListener);
|
||||||
|
@ -1,6 +1,18 @@
|
|||||||
function test() {
|
function test() {
|
||||||
waitForExplicitFinish();
|
waitForExplicitFinish();
|
||||||
|
|
||||||
|
if (Cc["@mozilla.org/focus-manager;1"].getService(Ci.nsIFocusManager).activeWindow !=
|
||||||
|
window) {
|
||||||
|
window.addEventListener("focus", function () {
|
||||||
|
window.removeEventListener("focus", arguments.callee, false);
|
||||||
|
test();
|
||||||
|
}, false);
|
||||||
|
window.focus();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
gPrefService.setBoolPref("browser.ctrlTab.previews", true);
|
||||||
|
|
||||||
gBrowser.addTab();
|
gBrowser.addTab();
|
||||||
gBrowser.addTab();
|
gBrowser.addTab();
|
||||||
gBrowser.addTab();
|
gBrowser.addTab();
|
||||||
@ -9,7 +21,7 @@ function test() {
|
|||||||
|
|
||||||
ctrlTabTest([2] , 1, 0);
|
ctrlTabTest([2] , 1, 0);
|
||||||
ctrlTabTest([2, 3, 1], 2, 2);
|
ctrlTabTest([2, 3, 1], 2, 2);
|
||||||
ctrlTabTest([] , 4, 2);
|
ctrlTabTest([] , 5, 2);
|
||||||
|
|
||||||
{
|
{
|
||||||
let selectedIndex = gBrowser.tabContainer.selectedIndex;
|
let selectedIndex = gBrowser.tabContainer.selectedIndex;
|
||||||
@ -27,9 +39,12 @@ function test() {
|
|||||||
is(gBrowser.mTabs.length, tabs - 1, "Ctrl+Tab -> Ctrl+W removes one tab");
|
is(gBrowser.mTabs.length, tabs - 1, "Ctrl+Tab -> Ctrl+W removes one tab");
|
||||||
releaseCtrl();
|
releaseCtrl();
|
||||||
}
|
}
|
||||||
assertTabs(3);
|
|
||||||
|
|
||||||
ctrlTabTest([2, 1, 0], 7, 1);
|
assertTabs(3);
|
||||||
|
ctrlTabTest([2, 1, 0], 9, 1);
|
||||||
|
|
||||||
|
gBrowser.addTab();
|
||||||
|
assertTabs(4);
|
||||||
|
|
||||||
{ // test for bug 445369
|
{ // test for bug 445369
|
||||||
selectTabs([1, 2, 0]);
|
selectTabs([1, 2, 0]);
|
||||||
@ -49,12 +64,12 @@ function test() {
|
|||||||
ok(gBrowser.selectedTab == selectedTab,
|
ok(gBrowser.selectedTab == selectedTab,
|
||||||
"Ctrl+Tab*2 -> Ctrl+W -> Ctrl+Shift+Tab*2 keeps the selected tab");
|
"Ctrl+Tab*2 -> Ctrl+W -> Ctrl+Shift+Tab*2 keeps the selected tab");
|
||||||
}
|
}
|
||||||
|
gBrowser.removeTab(gBrowser.tabContainer.lastChild);
|
||||||
assertTabs(2);
|
assertTabs(2);
|
||||||
|
|
||||||
ctrlTabTest([1], 1, 0);
|
ctrlTabTest([1], 1, 0);
|
||||||
|
|
||||||
gBrowser.removeTab(gBrowser.tabContainer.lastChild);
|
gBrowser.removeTab(gBrowser.tabContainer.lastChild);
|
||||||
|
|
||||||
assertTabs(1);
|
assertTabs(1);
|
||||||
|
|
||||||
{ // test for bug 445768
|
{ // test for bug 445768
|
||||||
@ -71,65 +86,10 @@ function test() {
|
|||||||
"Ctrl+Tab doesn't change focus if one tab is open");
|
"Ctrl+Tab doesn't change focus if one tab is open");
|
||||||
}
|
}
|
||||||
|
|
||||||
gBrowser.addTab();
|
// cleanup
|
||||||
gBrowser.addTab();
|
gPrefService.clearUserPref("browser.ctrlTab.previews");
|
||||||
gBrowser.addTab();
|
|
||||||
|
|
||||||
assertTabs(4);
|
|
||||||
selectTabs([0, 1, 2, 3]);
|
|
||||||
pressCtrlTab();
|
|
||||||
ctrlTab.panel.addEventListener("popupshown", stickyTests, false);
|
|
||||||
|
|
||||||
function stickyTests() {
|
|
||||||
ctrlTab.panel.removeEventListener("popupshown", stickyTests, false);
|
|
||||||
|
|
||||||
EventUtils.synthesizeKey("f", { ctrlKey: true });
|
|
||||||
is(document.activeElement, ctrlTab.searchField.inputField,
|
|
||||||
"Ctrl+Tab -> Ctrl+F focuses the panel's search field");
|
|
||||||
|
|
||||||
releaseCtrl();
|
|
||||||
ok(isOpen(),
|
|
||||||
"panel is sticky after focusing the search field and releasing the Ctrl key");
|
|
||||||
|
|
||||||
EventUtils.synthesizeKey("f", {});
|
|
||||||
EventUtils.synthesizeKey("o", {});
|
|
||||||
EventUtils.synthesizeKey("o", {});
|
|
||||||
is(ctrlTab.searchField.value, "foo",
|
|
||||||
"text entered into search field");
|
|
||||||
|
|
||||||
EventUtils.synthesizeKey("VK_RETURN", {});
|
|
||||||
ok(isOpen(),
|
|
||||||
"Enter key kicks pending search off; the panel stays open as there's no match");
|
|
||||||
is(ctrlTab.searchField.value, "foo",
|
|
||||||
"search field value persists after Enter pressed");
|
|
||||||
|
|
||||||
EventUtils.synthesizeKey("VK_ESCAPE", {});
|
|
||||||
is(ctrlTab.searchField.value, "",
|
|
||||||
"ESC key clears the search field");
|
|
||||||
ok(isOpen(),
|
|
||||||
"Clearing the search field with ESC keeps the panel open");
|
|
||||||
|
|
||||||
// blur the search field
|
|
||||||
EventUtils.synthesizeKey("VK_TAB", {});
|
|
||||||
isnot(document.activeElement, ctrlTab.searchField.inputField,
|
|
||||||
"Tab key blurs the panel's search field");
|
|
||||||
|
|
||||||
// advance selection and close panel
|
|
||||||
EventUtils.synthesizeKey("VK_TAB", {});
|
|
||||||
EventUtils.synthesizeKey("VK_TAB", {});
|
|
||||||
EventUtils.synthesizeKey("VK_RETURN", {});
|
|
||||||
ok(!isOpen(),
|
|
||||||
"Enter key closes the panel");
|
|
||||||
is(gBrowser.tabContainer.selectedIndex, 1,
|
|
||||||
"Tab key advances the selection while the panel is sticky");
|
|
||||||
|
|
||||||
gBrowser.removeCurrentTab();
|
|
||||||
gBrowser.removeCurrentTab();
|
|
||||||
gBrowser.removeCurrentTab();
|
|
||||||
assertTabs(1);
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
finish();
|
||||||
|
|
||||||
/* private utility functions */
|
/* private utility functions */
|
||||||
|
|
||||||
@ -140,7 +100,7 @@ function test() {
|
|||||||
EventUtils.synthesizeKey("VK_CONTROL", { type: "keyup" });
|
EventUtils.synthesizeKey("VK_CONTROL", { type: "keyup" });
|
||||||
|
|
||||||
function isOpen()
|
function isOpen()
|
||||||
ctrlTab.panel.state == "showing" || ctrlTab.panel.state == "open";
|
ctrlTab.isOpen;
|
||||||
|
|
||||||
function assertTabs(aTabs) {
|
function assertTabs(aTabs) {
|
||||||
var tabs = gBrowser.mTabs.length;
|
var tabs = gBrowser.mTabs.length;
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
function url(spec) {
|
|
||||||
var ios = Components.classes["@mozilla.org/network/io-service;1"]
|
|
||||||
.getService(Components.interfaces.nsIIOService);
|
|
||||||
return ios.newURI(spec, null, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
var gTestPage = null;
|
|
||||||
var gBrowserHandler;
|
var gBrowserHandler;
|
||||||
|
var browser;
|
||||||
|
|
||||||
|
function doc() browser.contentDocument;
|
||||||
|
|
||||||
function setHandlerFunc(aResultFunc) {
|
function setHandlerFunc(aResultFunc) {
|
||||||
DOMLinkHandler.handleEvent = function (event) {
|
DOMLinkHandler.handleEvent = function (event) {
|
||||||
@ -19,10 +15,14 @@ function test() {
|
|||||||
ok(gBrowserHandler, "found browser handler");
|
ok(gBrowserHandler, "found browser handler");
|
||||||
|
|
||||||
waitForExplicitFinish();
|
waitForExplicitFinish();
|
||||||
var activeWin = Application.activeWindow;
|
|
||||||
gTestPage = activeWin.open(url("chrome://mochikit/content/browser/browser/base/content/test/discovery.html"));
|
gBrowser.selectedTab = gBrowser.addTab();
|
||||||
gTestPage.focus();
|
browser = gBrowser.selectedBrowser;
|
||||||
setTimeout(iconDiscovery, 1000);
|
browser.addEventListener("load", function (event) {
|
||||||
|
event.currentTarget.removeEventListener("load", arguments.callee, true);
|
||||||
|
iconDiscovery();
|
||||||
|
}, true);
|
||||||
|
content.location = "chrome://mochikit/content/browser/browser/base/content/test/discovery.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
var iconDiscoveryTests = [
|
var iconDiscoveryTests = [
|
||||||
@ -38,7 +38,7 @@ var iconDiscoveryTests = [
|
|||||||
|
|
||||||
function runIconDiscoveryTest() {
|
function runIconDiscoveryTest() {
|
||||||
var test = iconDiscoveryTests[0];
|
var test = iconDiscoveryTests[0];
|
||||||
var head = gTestPage.document.getElementById("linkparent");
|
var head = doc().getElementById("linkparent");
|
||||||
var hasSrc = gProxyFavIcon.hasAttribute("src");
|
var hasSrc = gProxyFavIcon.hasAttribute("src");
|
||||||
if (test.pass)
|
if (test.pass)
|
||||||
ok(hasSrc, test.text);
|
ok(hasSrc, test.text);
|
||||||
@ -56,8 +56,8 @@ function iconDiscovery() {
|
|||||||
gProxyFavIcon.removeAttribute("src");
|
gProxyFavIcon.removeAttribute("src");
|
||||||
|
|
||||||
var test = iconDiscoveryTests[0];
|
var test = iconDiscoveryTests[0];
|
||||||
var head = gTestPage.document.getElementById("linkparent");
|
var head = doc().getElementById("linkparent");
|
||||||
var link = gTestPage.document.createElement("link");
|
var link = doc().createElement("link");
|
||||||
|
|
||||||
var rel = test.rel || "icon";
|
var rel = test.rel || "icon";
|
||||||
var href = test.href || "chrome://mochikit/content/browser/browser/base/content/test/moz.png";
|
var href = test.href || "chrome://mochikit/content/browser/browser/base/content/test/moz.png";
|
||||||
@ -91,7 +91,6 @@ var searchDiscoveryTests = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
function runSearchDiscoveryTest() {
|
function runSearchDiscoveryTest() {
|
||||||
var browser = gBrowser.getBrowserForDocument(gTestPage.document);
|
|
||||||
var test = searchDiscoveryTests[0];
|
var test = searchDiscoveryTests[0];
|
||||||
var title = test.title || searchDiscoveryTests.length;
|
var title = test.title || searchDiscoveryTests.length;
|
||||||
if (browser.engines) {
|
if (browser.engines) {
|
||||||
@ -116,12 +115,11 @@ function runMultipleEnginesTestAndFinalize() {
|
|||||||
ranOnce = true;
|
ranOnce = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var browser = gBrowser.getBrowserForDocument(gTestPage.document);
|
|
||||||
ok(browser.engines, "has engines");
|
ok(browser.engines, "has engines");
|
||||||
is(browser.engines.length, 1, "only one engine");
|
is(browser.engines.length, 1, "only one engine");
|
||||||
is(browser.engines[0].uri, "http://first.mozilla.com/search.xml", "first engine wins");
|
is(browser.engines[0].uri, "http://first.mozilla.com/search.xml", "first engine wins");
|
||||||
|
|
||||||
gTestPage.close();
|
gBrowser.removeCurrentTab();
|
||||||
|
|
||||||
// Reset the default link handler
|
// Reset the default link handler
|
||||||
DOMLinkHandler.handleEvent = gBrowserHandler;
|
DOMLinkHandler.handleEvent = gBrowserHandler;
|
||||||
@ -130,13 +128,12 @@ function runMultipleEnginesTestAndFinalize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function searchDiscovery() {
|
function searchDiscovery() {
|
||||||
var head = gTestPage.document.getElementById("linkparent");
|
var head = doc().getElementById("linkparent");
|
||||||
var browser = gBrowser.getBrowserForDocument(gTestPage.document);
|
|
||||||
|
|
||||||
if (searchDiscoveryTests.length) {
|
if (searchDiscoveryTests.length) {
|
||||||
setHandlerFunc(runSearchDiscoveryTest);
|
setHandlerFunc(runSearchDiscoveryTest);
|
||||||
var test = searchDiscoveryTests[0];
|
var test = searchDiscoveryTests[0];
|
||||||
var link = gTestPage.document.createElement("link");
|
var link = doc().createElement("link");
|
||||||
|
|
||||||
var rel = test.rel || "search";
|
var rel = test.rel || "search";
|
||||||
var href = test.href || "http://so.not.here.mozilla.com/search.xml";
|
var href = test.href || "http://so.not.here.mozilla.com/search.xml";
|
||||||
@ -153,7 +150,7 @@ function searchDiscovery() {
|
|||||||
} else {
|
} else {
|
||||||
setHandlerFunc(runMultipleEnginesTestAndFinalize);
|
setHandlerFunc(runMultipleEnginesTestAndFinalize);
|
||||||
// Test multiple engines with the same title
|
// Test multiple engines with the same title
|
||||||
var link = gTestPage.document.createElement("link");
|
var link = doc().createElement("link");
|
||||||
link.rel = "search";
|
link.rel = "search";
|
||||||
link.href = "http://first.mozilla.com/search.xml";
|
link.href = "http://first.mozilla.com/search.xml";
|
||||||
link.type = "application/opensearchdescription+xml";
|
link.type = "application/opensearchdescription+xml";
|
||||||
|
@ -1,9 +1,3 @@
|
|||||||
function makeURI(aURL, aOriginCharset, aBaseURI) {
|
|
||||||
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
|
|
||||||
.getService(Components.interfaces.nsIIOService);
|
|
||||||
return ioService.newURI(aURL, aOriginCharset, aBaseURI);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getPostDataString(aIS) {
|
function getPostDataString(aIS) {
|
||||||
if (!aIS)
|
if (!aIS)
|
||||||
return null;
|
return null;
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
// Bug 474792 - Clear "Never remember passwords for this site" when
|
// Bug 474792 - Clear "Never remember passwords for this site" when
|
||||||
// clearing site-specific settings in Clear Recent History dialog
|
// clearing site-specific settings in Clear Recent History dialog
|
||||||
|
|
||||||
Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader)
|
Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Ci.mozIJSSubScriptLoader)
|
||||||
.loadSubScript("chrome://browser/content/sanitize.js");
|
.loadSubScript("chrome://browser/content/sanitize.js");
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
|
|
||||||
var pwmgr = Components.classes["@mozilla.org/login-manager;1"]
|
var pwmgr = Cc["@mozilla.org/login-manager;1"].getService(Ci.nsILoginManager);
|
||||||
.getService(Components.interfaces.nsILoginManager);
|
|
||||||
|
|
||||||
// Add a disabled host
|
// Add a disabled host
|
||||||
pwmgr.setLoginSavingEnabled("http://example.com", false);
|
pwmgr.setLoginSavingEnabled("http://example.com", false);
|
||||||
@ -20,9 +19,7 @@ function test() {
|
|||||||
let s = new Sanitizer();
|
let s = new Sanitizer();
|
||||||
s.ignoreTimespan = false;
|
s.ignoreTimespan = false;
|
||||||
s.prefDomain = "privacy.cpd.";
|
s.prefDomain = "privacy.cpd.";
|
||||||
var itemPrefs = Cc["@mozilla.org/preferences-service;1"]
|
var itemPrefs = gPrefService.getBranch(s.prefDomain);
|
||||||
.getService(Components.interfaces.nsIPrefService)
|
|
||||||
.getBranch(s.prefDomain);
|
|
||||||
itemPrefs.setBoolPref("history", false);
|
itemPrefs.setBoolPref("history", false);
|
||||||
itemPrefs.setBoolPref("downloads", false);
|
itemPrefs.setBoolPref("downloads", false);
|
||||||
itemPrefs.setBoolPref("cache", false);
|
itemPrefs.setBoolPref("cache", false);
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
// Bug 380852 - Delete permission manager entries in Clear Recent History
|
// Bug 380852 - Delete permission manager entries in Clear Recent History
|
||||||
|
|
||||||
Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader)
|
Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Ci.mozIJSSubScriptLoader)
|
||||||
.loadSubScript("chrome://browser/content/sanitize.js");
|
.loadSubScript("chrome://browser/content/sanitize.js");
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
|
|
||||||
// Add a permission entry
|
// Add a permission entry
|
||||||
var pm = Components.classes["@mozilla.org/permissionmanager;1"]
|
var pm = Cc["@mozilla.org/permissionmanager;1"]
|
||||||
.getService(Components.interfaces.nsIPermissionManager);
|
.getService(Ci.nsIPermissionManager);
|
||||||
pm.add(uri("http://example.com"), "testing", Ci.nsIPermissionManager.ALLOW_ACTION);
|
pm.add(makeURI("http://example.com"), "testing", pm.ALLOW_ACTION);
|
||||||
|
|
||||||
// Sanity check
|
// Sanity check
|
||||||
ok(pm.enumerator.hasMoreElements(), "Permission manager should have elements, since we just added one");
|
ok(pm.enumerator.hasMoreElements(), "Permission manager should have elements, since we just added one");
|
||||||
@ -17,9 +17,7 @@ function test() {
|
|||||||
let s = new Sanitizer();
|
let s = new Sanitizer();
|
||||||
s.ignoreTimespan = false;
|
s.ignoreTimespan = false;
|
||||||
s.prefDomain = "privacy.cpd.";
|
s.prefDomain = "privacy.cpd.";
|
||||||
var itemPrefs = Cc["@mozilla.org/preferences-service;1"]
|
var itemPrefs = gPrefService.getBranch(s.prefDomain);
|
||||||
.getService(Components.interfaces.nsIPrefService)
|
|
||||||
.getBranch(s.prefDomain);
|
|
||||||
itemPrefs.setBoolPref("history", false);
|
itemPrefs.setBoolPref("history", false);
|
||||||
itemPrefs.setBoolPref("downloads", false);
|
itemPrefs.setBoolPref("downloads", false);
|
||||||
itemPrefs.setBoolPref("cache", false);
|
itemPrefs.setBoolPref("cache", false);
|
||||||
@ -36,8 +34,3 @@ function test() {
|
|||||||
// Make sure it's gone
|
// Make sure it's gone
|
||||||
ok(!pm.enumerator.hasMoreElements(), "Permission manager shouldn't have entries after Sanitizing");
|
ok(!pm.enumerator.hasMoreElements(), "Permission manager shouldn't have entries after Sanitizing");
|
||||||
}
|
}
|
||||||
|
|
||||||
function uri(spec) {
|
|
||||||
return Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService)
|
|
||||||
.newURI(spec, null, null);
|
|
||||||
}
|
|
||||||
|
@ -3,10 +3,9 @@ var now_uSec = Date.now() * 1000;
|
|||||||
|
|
||||||
const dm = Cc["@mozilla.org/download-manager;1"].getService(Ci.nsIDownloadManager);
|
const dm = Cc["@mozilla.org/download-manager;1"].getService(Ci.nsIDownloadManager);
|
||||||
const bhist = Cc["@mozilla.org/browser/global-history;2"].getService(Ci.nsIBrowserHistory);
|
const bhist = Cc["@mozilla.org/browser/global-history;2"].getService(Ci.nsIBrowserHistory);
|
||||||
const iosvc = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
|
|
||||||
const formhist = Cc["@mozilla.org/satchel/form-history;1"].getService(Ci.nsIFormHistory2);
|
const formhist = Cc["@mozilla.org/satchel/form-history;1"].getService(Ci.nsIFormHistory2);
|
||||||
|
|
||||||
Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader)
|
Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Ci.mozIJSSubScriptLoader)
|
||||||
.loadSubScript("chrome://browser/content/sanitize.js");
|
.loadSubScript("chrome://browser/content/sanitize.js");
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
@ -24,9 +23,7 @@ function test() {
|
|||||||
let s = new Sanitizer();
|
let s = new Sanitizer();
|
||||||
s.ignoreTimespan = false;
|
s.ignoreTimespan = false;
|
||||||
s.prefDomain = "privacy.cpd.";
|
s.prefDomain = "privacy.cpd.";
|
||||||
var itemPrefs = Cc["@mozilla.org/preferences-service;1"]
|
var itemPrefs = gPrefService.getBranch(s.prefDomain);
|
||||||
.getService(Components.interfaces.nsIPrefService)
|
|
||||||
.getBranch(s.prefDomain);
|
|
||||||
itemPrefs.setBoolPref("history", true);
|
itemPrefs.setBoolPref("history", true);
|
||||||
itemPrefs.setBoolPref("downloads", true);
|
itemPrefs.setBoolPref("downloads", true);
|
||||||
itemPrefs.setBoolPref("cache", false);
|
itemPrefs.setBoolPref("cache", false);
|
||||||
@ -42,17 +39,17 @@ function test() {
|
|||||||
s.sanitize();
|
s.sanitize();
|
||||||
s.range = null;
|
s.range = null;
|
||||||
|
|
||||||
ok(!bhist.isVisited(uri("http://10minutes.com")), "10minutes.com should now be deleted");
|
ok(!bhist.isVisited(makeURI("http://10minutes.com")), "10minutes.com should now be deleted");
|
||||||
ok(bhist.isVisited(uri("http://1hour.com")), "Pretend visit to 1hour.com should still exist");
|
ok(bhist.isVisited(makeURI("http://1hour.com")), "Pretend visit to 1hour.com should still exist");
|
||||||
ok(bhist.isVisited(uri("http://1hour10minutes.com/")), "Pretend visit to 1hour10minutes.com should still exist");
|
ok(bhist.isVisited(makeURI("http://1hour10minutes.com/")), "Pretend visit to 1hour10minutes.com should still exist");
|
||||||
ok(bhist.isVisited(uri("http://2hour.com")), "Pretend visit to 2hour.com should still exist");
|
ok(bhist.isVisited(makeURI("http://2hour.com")), "Pretend visit to 2hour.com should still exist");
|
||||||
ok(bhist.isVisited(uri("http://2hour10minutes.com/")), "Pretend visit to 2hour10minutes.com should still exist");
|
ok(bhist.isVisited(makeURI("http://2hour10minutes.com/")), "Pretend visit to 2hour10minutes.com should still exist");
|
||||||
ok(bhist.isVisited(uri("http://4hour.com")), "Pretend visit to 4hour.com should still exist");
|
ok(bhist.isVisited(makeURI("http://4hour.com")), "Pretend visit to 4hour.com should still exist");
|
||||||
ok(bhist.isVisited(uri("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should still exist");
|
ok(bhist.isVisited(makeURI("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should still exist");
|
||||||
|
|
||||||
if(minutesSinceMidnight > 10)
|
if(minutesSinceMidnight > 10)
|
||||||
ok(bhist.isVisited(uri("http://today.com")), "Pretend visit to today.com should still exist");
|
ok(bhist.isVisited(makeURI("http://today.com")), "Pretend visit to today.com should still exist");
|
||||||
ok(bhist.isVisited(uri("http://before-today.com")), "Pretend visit to before-today.com should still exist");
|
ok(bhist.isVisited(makeURI("http://before-today.com")), "Pretend visit to before-today.com should still exist");
|
||||||
|
|
||||||
ok(!formhist.nameExists("10minutes"), "10minutes form entry should be deleted");
|
ok(!formhist.nameExists("10minutes"), "10minutes form entry should be deleted");
|
||||||
ok(formhist.nameExists("1hour"), "1hour form entry should still exist");
|
ok(formhist.nameExists("1hour"), "1hour form entry should still exist");
|
||||||
@ -81,16 +78,16 @@ function test() {
|
|||||||
Sanitizer.prefs.setIntPref("timeSpan", 1);
|
Sanitizer.prefs.setIntPref("timeSpan", 1);
|
||||||
s.sanitize();
|
s.sanitize();
|
||||||
|
|
||||||
ok(!bhist.isVisited(uri("http://1hour.com")), "1hour.com should now be deleted");
|
ok(!bhist.isVisited(makeURI("http://1hour.com")), "1hour.com should now be deleted");
|
||||||
ok(bhist.isVisited(uri("http://1hour10minutes.com/")), "Pretend visit to 1hour10minutes.com should still exist");
|
ok(bhist.isVisited(makeURI("http://1hour10minutes.com/")), "Pretend visit to 1hour10minutes.com should still exist");
|
||||||
ok(bhist.isVisited(uri("http://2hour.com")), "Pretend visit to 2hour.com should still exist");
|
ok(bhist.isVisited(makeURI("http://2hour.com")), "Pretend visit to 2hour.com should still exist");
|
||||||
ok(bhist.isVisited(uri("http://2hour10minutes.com/")), "Pretend visit to 2hour10minutes.com should still exist");
|
ok(bhist.isVisited(makeURI("http://2hour10minutes.com/")), "Pretend visit to 2hour10minutes.com should still exist");
|
||||||
ok(bhist.isVisited(uri("http://4hour.com")), "Pretend visit to 4hour.com should still exist");
|
ok(bhist.isVisited(makeURI("http://4hour.com")), "Pretend visit to 4hour.com should still exist");
|
||||||
ok(bhist.isVisited(uri("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should still exist");
|
ok(bhist.isVisited(makeURI("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should still exist");
|
||||||
|
|
||||||
if(hoursSinceMidnight > 1)
|
if(hoursSinceMidnight > 1)
|
||||||
ok(bhist.isVisited(uri("http://today.com")), "Pretend visit to today.com should still exist");
|
ok(bhist.isVisited(makeURI("http://today.com")), "Pretend visit to today.com should still exist");
|
||||||
ok(bhist.isVisited(uri("http://before-today.com")), "Pretend visit to before-today.com should still exist");
|
ok(bhist.isVisited(makeURI("http://before-today.com")), "Pretend visit to before-today.com should still exist");
|
||||||
|
|
||||||
ok(!formhist.nameExists("1hour"), "1hour form entry should be deleted");
|
ok(!formhist.nameExists("1hour"), "1hour form entry should be deleted");
|
||||||
ok(formhist.nameExists("1hour10minutes"), "1hour10minutes form entry should still exist");
|
ok(formhist.nameExists("1hour10minutes"), "1hour10minutes form entry should still exist");
|
||||||
@ -118,14 +115,14 @@ function test() {
|
|||||||
s.sanitize();
|
s.sanitize();
|
||||||
s.range = null;
|
s.range = null;
|
||||||
|
|
||||||
ok(!bhist.isVisited(uri("http://1hour10minutes.com")), "Pretend visit to 1hour10minutes.com should now be deleted");
|
ok(!bhist.isVisited(makeURI("http://1hour10minutes.com")), "Pretend visit to 1hour10minutes.com should now be deleted");
|
||||||
ok(bhist.isVisited(uri("http://2hour.com")), "Pretend visit to 2hour.com should still exist");
|
ok(bhist.isVisited(makeURI("http://2hour.com")), "Pretend visit to 2hour.com should still exist");
|
||||||
ok(bhist.isVisited(uri("http://2hour10minutes.com/")), "Pretend visit to 2hour10minutes.com should still exist");
|
ok(bhist.isVisited(makeURI("http://2hour10minutes.com/")), "Pretend visit to 2hour10minutes.com should still exist");
|
||||||
ok(bhist.isVisited(uri("http://4hour.com")), "Pretend visit to 4hour.com should still exist");
|
ok(bhist.isVisited(makeURI("http://4hour.com")), "Pretend visit to 4hour.com should still exist");
|
||||||
ok(bhist.isVisited(uri("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should still exist");
|
ok(bhist.isVisited(makeURI("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should still exist");
|
||||||
if(minutesSinceMidnight > 70)
|
if(minutesSinceMidnight > 70)
|
||||||
ok(bhist.isVisited(uri("http://today.com")), "Pretend visit to today.com should still exist");
|
ok(bhist.isVisited(makeURI("http://today.com")), "Pretend visit to today.com should still exist");
|
||||||
ok(bhist.isVisited(uri("http://before-today.com")), "Pretend visit to before-today.com should still exist");
|
ok(bhist.isVisited(makeURI("http://before-today.com")), "Pretend visit to before-today.com should still exist");
|
||||||
|
|
||||||
ok(!formhist.nameExists("1hour10minutes"), "1hour10minutes form entry should be deleted");
|
ok(!formhist.nameExists("1hour10minutes"), "1hour10minutes form entry should be deleted");
|
||||||
ok(formhist.nameExists("2hour"), "2hour form entry should still exist");
|
ok(formhist.nameExists("2hour"), "2hour form entry should still exist");
|
||||||
@ -149,13 +146,13 @@ function test() {
|
|||||||
Sanitizer.prefs.setIntPref("timeSpan", 2);
|
Sanitizer.prefs.setIntPref("timeSpan", 2);
|
||||||
s.sanitize();
|
s.sanitize();
|
||||||
|
|
||||||
ok(!bhist.isVisited(uri("http://2hour.com")), "Pretend visit to 2hour.com should now be deleted");
|
ok(!bhist.isVisited(makeURI("http://2hour.com")), "Pretend visit to 2hour.com should now be deleted");
|
||||||
ok(bhist.isVisited(uri("http://2hour10minutes.com/")), "Pretend visit to 2hour10minutes.com should still exist");
|
ok(bhist.isVisited(makeURI("http://2hour10minutes.com/")), "Pretend visit to 2hour10minutes.com should still exist");
|
||||||
ok(bhist.isVisited(uri("http://4hour.com")), "Pretend visit to 4hour.com should still exist");
|
ok(bhist.isVisited(makeURI("http://4hour.com")), "Pretend visit to 4hour.com should still exist");
|
||||||
ok(bhist.isVisited(uri("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should still exist");
|
ok(bhist.isVisited(makeURI("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should still exist");
|
||||||
if(hoursSinceMidnight > 2)
|
if(hoursSinceMidnight > 2)
|
||||||
ok(bhist.isVisited(uri("http://today.com")), "Pretend visit to today.com should still exist");
|
ok(bhist.isVisited(makeURI("http://today.com")), "Pretend visit to today.com should still exist");
|
||||||
ok(bhist.isVisited(uri("http://before-today.com")), "Pretend visit to before-today.com should still exist");
|
ok(bhist.isVisited(makeURI("http://before-today.com")), "Pretend visit to before-today.com should still exist");
|
||||||
|
|
||||||
ok(!formhist.nameExists("2hour"), "2hour form entry should be deleted");
|
ok(!formhist.nameExists("2hour"), "2hour form entry should be deleted");
|
||||||
ok(formhist.nameExists("2hour10minutes"), "2hour10minutes form entry should still exist");
|
ok(formhist.nameExists("2hour10minutes"), "2hour10minutes form entry should still exist");
|
||||||
@ -179,12 +176,12 @@ function test() {
|
|||||||
s.sanitize();
|
s.sanitize();
|
||||||
s.range = null;
|
s.range = null;
|
||||||
|
|
||||||
ok(!bhist.isVisited(uri("http://2hour10minutes.com")), "Pretend visit to 2hour10minutes.com should now be deleted");
|
ok(!bhist.isVisited(makeURI("http://2hour10minutes.com")), "Pretend visit to 2hour10minutes.com should now be deleted");
|
||||||
ok(bhist.isVisited(uri("http://4hour.com")), "Pretend visit to 4hour.com should still exist");
|
ok(bhist.isVisited(makeURI("http://4hour.com")), "Pretend visit to 4hour.com should still exist");
|
||||||
ok(bhist.isVisited(uri("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should still exist");
|
ok(bhist.isVisited(makeURI("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should still exist");
|
||||||
if(minutesSinceMidnight > 130)
|
if(minutesSinceMidnight > 130)
|
||||||
ok(bhist.isVisited(uri("http://today.com")), "Pretend visit to today.com should still exist");
|
ok(bhist.isVisited(makeURI("http://today.com")), "Pretend visit to today.com should still exist");
|
||||||
ok(bhist.isVisited(uri("http://before-today.com")), "Pretend visit to before-today.com should still exist");
|
ok(bhist.isVisited(makeURI("http://before-today.com")), "Pretend visit to before-today.com should still exist");
|
||||||
|
|
||||||
ok(!formhist.nameExists("2hour10minutes"), "2hour10minutes form entry should be deleted");
|
ok(!formhist.nameExists("2hour10minutes"), "2hour10minutes form entry should be deleted");
|
||||||
ok(formhist.nameExists("4hour"), "4hour form entry should still exist");
|
ok(formhist.nameExists("4hour"), "4hour form entry should still exist");
|
||||||
@ -204,11 +201,11 @@ function test() {
|
|||||||
Sanitizer.prefs.setIntPref("timeSpan", 3);
|
Sanitizer.prefs.setIntPref("timeSpan", 3);
|
||||||
s.sanitize();
|
s.sanitize();
|
||||||
|
|
||||||
ok(!bhist.isVisited(uri("http://4hour.com")), "Pretend visit to 4hour.com should now be deleted");
|
ok(!bhist.isVisited(makeURI("http://4hour.com")), "Pretend visit to 4hour.com should now be deleted");
|
||||||
ok(bhist.isVisited(uri("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should still exist");
|
ok(bhist.isVisited(makeURI("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should still exist");
|
||||||
if(hoursSinceMidnight > 4)
|
if(hoursSinceMidnight > 4)
|
||||||
ok(bhist.isVisited(uri("http://today.com")), "Pretend visit to today.com should still exist");
|
ok(bhist.isVisited(makeURI("http://today.com")), "Pretend visit to today.com should still exist");
|
||||||
ok(bhist.isVisited(uri("http://before-today.com")), "Pretend visit to before-today.com should still exist");
|
ok(bhist.isVisited(makeURI("http://before-today.com")), "Pretend visit to before-today.com should still exist");
|
||||||
|
|
||||||
ok(!formhist.nameExists("4hour"), "4hour form entry should be deleted");
|
ok(!formhist.nameExists("4hour"), "4hour form entry should be deleted");
|
||||||
ok(formhist.nameExists("4hour10minutes"), "4hour10minutes form entry should still exist");
|
ok(formhist.nameExists("4hour10minutes"), "4hour10minutes form entry should still exist");
|
||||||
@ -227,10 +224,10 @@ function test() {
|
|||||||
s.sanitize();
|
s.sanitize();
|
||||||
s.range = null;
|
s.range = null;
|
||||||
|
|
||||||
ok(!bhist.isVisited(uri("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should now be deleted");
|
ok(!bhist.isVisited(makeURI("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should now be deleted");
|
||||||
if(minutesSinceMidnight > 250)
|
if(minutesSinceMidnight > 250)
|
||||||
ok(bhist.isVisited(uri("http://today.com")), "Pretend visit to today.com should still exist");
|
ok(bhist.isVisited(makeURI("http://today.com")), "Pretend visit to today.com should still exist");
|
||||||
ok(bhist.isVisited(uri("http://before-today.com")), "Pretend visit to before-today.com should still exist");
|
ok(bhist.isVisited(makeURI("http://before-today.com")), "Pretend visit to before-today.com should still exist");
|
||||||
|
|
||||||
ok(!formhist.nameExists("4hour10minutes"), "4hour10minutes form entry should be deleted");
|
ok(!formhist.nameExists("4hour10minutes"), "4hour10minutes form entry should be deleted");
|
||||||
if(minutesSinceMidnight > 250)
|
if(minutesSinceMidnight > 250)
|
||||||
@ -246,8 +243,8 @@ function test() {
|
|||||||
Sanitizer.prefs.setIntPref("timeSpan", 4);
|
Sanitizer.prefs.setIntPref("timeSpan", 4);
|
||||||
s.sanitize();
|
s.sanitize();
|
||||||
|
|
||||||
ok(!bhist.isVisited(uri("http://today.com")), "Pretend visit to today.com should now be deleted");
|
ok(!bhist.isVisited(makeURI("http://today.com")), "Pretend visit to today.com should now be deleted");
|
||||||
ok(bhist.isVisited(uri("http://before-today.com")), "Pretend visit to before-today.com should still exist");
|
ok(bhist.isVisited(makeURI("http://before-today.com")), "Pretend visit to before-today.com should still exist");
|
||||||
|
|
||||||
ok(!formhist.nameExists("today"), "today form entry should be deleted");
|
ok(!formhist.nameExists("today"), "today form entry should be deleted");
|
||||||
ok(formhist.nameExists("b4today"), "b4today form entry should still exist");
|
ok(formhist.nameExists("b4today"), "b4today form entry should still exist");
|
||||||
@ -259,7 +256,7 @@ function test() {
|
|||||||
Sanitizer.prefs.setIntPref("timeSpan", 0);
|
Sanitizer.prefs.setIntPref("timeSpan", 0);
|
||||||
s.sanitize();
|
s.sanitize();
|
||||||
|
|
||||||
ok(!bhist.isVisited(uri("http://before-today.com")), "Pretend visit to before-today.com should now be deleted");
|
ok(!bhist.isVisited(makeURI("http://before-today.com")), "Pretend visit to before-today.com should now be deleted");
|
||||||
|
|
||||||
ok(!formhist.nameExists("b4today"), "b4today form entry should be deleted");
|
ok(!formhist.nameExists("b4today"), "b4today form entry should be deleted");
|
||||||
|
|
||||||
@ -268,34 +265,34 @@ function test() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setupHistory() {
|
function setupHistory() {
|
||||||
bhist.addPageWithDetails(uri("http://10minutes.com/"), "10 minutes ago", now_uSec - 10*60*1000000);
|
bhist.addPageWithDetails(makeURI("http://10minutes.com/"), "10 minutes ago", now_uSec - 10*60*1000000);
|
||||||
bhist.addPageWithDetails(uri("http://1hour.com/"), "Less than 1 hour ago", now_uSec - 45*60*1000000);
|
bhist.addPageWithDetails(makeURI("http://1hour.com/"), "Less than 1 hour ago", now_uSec - 45*60*1000000);
|
||||||
bhist.addPageWithDetails(uri("http://1hour10minutes.com/"), "1 hour 10 minutes ago", now_uSec - 70*60*1000000);
|
bhist.addPageWithDetails(makeURI("http://1hour10minutes.com/"), "1 hour 10 minutes ago", now_uSec - 70*60*1000000);
|
||||||
bhist.addPageWithDetails(uri("http://2hour.com/"), "Less than 2 hours ago", now_uSec - 90*60*1000000);
|
bhist.addPageWithDetails(makeURI("http://2hour.com/"), "Less than 2 hours ago", now_uSec - 90*60*1000000);
|
||||||
bhist.addPageWithDetails(uri("http://2hour10minutes.com/"), "2 hours 10 minutes ago", now_uSec - 130*60*1000000);
|
bhist.addPageWithDetails(makeURI("http://2hour10minutes.com/"), "2 hours 10 minutes ago", now_uSec - 130*60*1000000);
|
||||||
bhist.addPageWithDetails(uri("http://4hour.com/"), "Less than 4 hours ago", now_uSec - 180*60*1000000);
|
bhist.addPageWithDetails(makeURI("http://4hour.com/"), "Less than 4 hours ago", now_uSec - 180*60*1000000);
|
||||||
bhist.addPageWithDetails(uri("http://4hour10minutes.com/"), "4 hours 10 minutesago", now_uSec - 250*60*1000000);
|
bhist.addPageWithDetails(makeURI("http://4hour10minutes.com/"), "4 hours 10 minutesago", now_uSec - 250*60*1000000);
|
||||||
|
|
||||||
let today = new Date();
|
let today = new Date();
|
||||||
today.setHours(0);
|
today.setHours(0);
|
||||||
today.setMinutes(0);
|
today.setMinutes(0);
|
||||||
today.setSeconds(30);
|
today.setSeconds(30);
|
||||||
bhist.addPageWithDetails(uri("http://today.com/"), "Today", today.valueOf() * 1000);
|
bhist.addPageWithDetails(makeURI("http://today.com/"), "Today", today.valueOf() * 1000);
|
||||||
|
|
||||||
let lastYear = new Date();
|
let lastYear = new Date();
|
||||||
lastYear.setFullYear(lastYear.getFullYear() - 1);
|
lastYear.setFullYear(lastYear.getFullYear() - 1);
|
||||||
bhist.addPageWithDetails(uri("http://before-today.com/"), "Before Today", lastYear.valueOf() * 1000);
|
bhist.addPageWithDetails(makeURI("http://before-today.com/"), "Before Today", lastYear.valueOf() * 1000);
|
||||||
|
|
||||||
// Confirm everything worked
|
// Confirm everything worked
|
||||||
ok(bhist.isVisited(uri("http://10minutes.com/")), "Pretend visit to 10minutes.com should exist");
|
ok(bhist.isVisited(makeURI("http://10minutes.com/")), "Pretend visit to 10minutes.com should exist");
|
||||||
ok(bhist.isVisited(uri("http://1hour.com")), "Pretend visit to 1hour.com should exist");
|
ok(bhist.isVisited(makeURI("http://1hour.com")), "Pretend visit to 1hour.com should exist");
|
||||||
ok(bhist.isVisited(uri("http://1hour10minutes.com/")), "Pretend visit to 1hour10minutes.com should exist");
|
ok(bhist.isVisited(makeURI("http://1hour10minutes.com/")), "Pretend visit to 1hour10minutes.com should exist");
|
||||||
ok(bhist.isVisited(uri("http://2hour.com")), "Pretend visit to 2hour.com should exist");
|
ok(bhist.isVisited(makeURI("http://2hour.com")), "Pretend visit to 2hour.com should exist");
|
||||||
ok(bhist.isVisited(uri("http://2hour10minutes.com/")), "Pretend visit to 2hour10minutes.com should exist");
|
ok(bhist.isVisited(makeURI("http://2hour10minutes.com/")), "Pretend visit to 2hour10minutes.com should exist");
|
||||||
ok(bhist.isVisited(uri("http://4hour.com")), "Pretend visit to 4hour.com should exist");
|
ok(bhist.isVisited(makeURI("http://4hour.com")), "Pretend visit to 4hour.com should exist");
|
||||||
ok(bhist.isVisited(uri("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should exist");
|
ok(bhist.isVisited(makeURI("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should exist");
|
||||||
ok(bhist.isVisited(uri("http://today.com")), "Pretend visit to today.com should exist");
|
ok(bhist.isVisited(makeURI("http://today.com")), "Pretend visit to today.com should exist");
|
||||||
ok(bhist.isVisited(uri("http://before-today.com")), "Pretend visit to before-today.com should exist");
|
ok(bhist.isVisited(makeURI("http://before-today.com")), "Pretend visit to before-today.com should exist");
|
||||||
}
|
}
|
||||||
|
|
||||||
function setupFormHistory() {
|
function setupFormHistory() {
|
||||||
@ -598,7 +595,3 @@ function downloadExists(aID)
|
|||||||
stmt.finalize();
|
stmt.finalize();
|
||||||
return rows;
|
return rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
function uri(spec) {
|
|
||||||
return iosvc.newURI(spec, null, null);
|
|
||||||
}
|
|
||||||
|
@ -63,8 +63,6 @@ const dm = Cc["@mozilla.org/download-manager;1"].
|
|||||||
getService(Ci.nsIDownloadManager);
|
getService(Ci.nsIDownloadManager);
|
||||||
const bhist = Cc["@mozilla.org/browser/global-history;2"].
|
const bhist = Cc["@mozilla.org/browser/global-history;2"].
|
||||||
getService(Ci.nsIBrowserHistory);
|
getService(Ci.nsIBrowserHistory);
|
||||||
const iosvc = Cc["@mozilla.org/network/io-service;1"].
|
|
||||||
getService(Ci.nsIIOService);
|
|
||||||
const formhist = Cc["@mozilla.org/satchel/form-history;1"].
|
const formhist = Cc["@mozilla.org/satchel/form-history;1"].
|
||||||
getService(Ci.nsIFormHistory2);
|
getService(Ci.nsIFormHistory2);
|
||||||
|
|
||||||
@ -608,7 +606,7 @@ function addFormEntryWithMinutesAgo(aMinutesAgo) {
|
|||||||
* The visit will be visited this many minutes ago
|
* The visit will be visited this many minutes ago
|
||||||
*/
|
*/
|
||||||
function addHistoryWithMinutesAgo(aMinutesAgo) {
|
function addHistoryWithMinutesAgo(aMinutesAgo) {
|
||||||
let pURI = uri("http://" + aMinutesAgo + "-minutes-ago.com/");
|
let pURI = makeURI("http://" + aMinutesAgo + "-minutes-ago.com/");
|
||||||
bhist.addPageWithDetails(pURI,
|
bhist.addPageWithDetails(pURI,
|
||||||
aMinutesAgo + " minutes ago",
|
aMinutesAgo + " minutes ago",
|
||||||
now_uSec - (aMinutesAgo * 60 * 1000 * 1000));
|
now_uSec - (aMinutesAgo * 60 * 1000 * 1000));
|
||||||
@ -638,10 +636,7 @@ function blankSlate() {
|
|||||||
* Passed to is()
|
* Passed to is()
|
||||||
*/
|
*/
|
||||||
function boolPrefIs(aPrefName, aExpectedVal, aMsg) {
|
function boolPrefIs(aPrefName, aExpectedVal, aMsg) {
|
||||||
let prefs = Cc["@mozilla.org/preferences-service;1"].
|
is(gPrefService.getBoolPref("privacy." + aPrefName), aExpectedVal, aMsg);
|
||||||
getService(Ci.nsIPrefService).
|
|
||||||
getBranch("privacy.");
|
|
||||||
is(prefs.getBoolPref(aPrefName), aExpectedVal, aMsg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -740,17 +735,7 @@ function ensureHistoryClearedState(aURIs, aShouldBeCleared) {
|
|||||||
* Passed to is()
|
* Passed to is()
|
||||||
*/
|
*/
|
||||||
function intPrefIs(aPrefName, aExpectedVal, aMsg) {
|
function intPrefIs(aPrefName, aExpectedVal, aMsg) {
|
||||||
let prefs = Cc["@mozilla.org/preferences-service;1"].
|
is(gPrefService.getIntPref("privacy." + aPrefName), aExpectedVal, aMsg);
|
||||||
getService(Ci.nsIPrefService).
|
|
||||||
getBranch("privacy.");
|
|
||||||
is(prefs.getIntPref(aPrefName), aExpectedVal, aMsg);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return A new nsIURI from aSpec.
|
|
||||||
*/
|
|
||||||
function uri(aSpec) {
|
|
||||||
return iosvc.newURI(aSpec, null, null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -63,8 +63,6 @@ const dm = Cc["@mozilla.org/download-manager;1"].
|
|||||||
getService(Ci.nsIDownloadManager);
|
getService(Ci.nsIDownloadManager);
|
||||||
const bhist = Cc["@mozilla.org/browser/global-history;2"].
|
const bhist = Cc["@mozilla.org/browser/global-history;2"].
|
||||||
getService(Ci.nsIBrowserHistory);
|
getService(Ci.nsIBrowserHistory);
|
||||||
const iosvc = Cc["@mozilla.org/network/io-service;1"].
|
|
||||||
getService(Ci.nsIIOService);
|
|
||||||
const formhist = Cc["@mozilla.org/satchel/form-history;1"].
|
const formhist = Cc["@mozilla.org/satchel/form-history;1"].
|
||||||
getService(Ci.nsIFormHistory2);
|
getService(Ci.nsIFormHistory2);
|
||||||
|
|
||||||
@ -509,7 +507,7 @@ function addFormEntryWithMinutesAgo(aMinutesAgo) {
|
|||||||
* The visit will be visited this many minutes ago
|
* The visit will be visited this many minutes ago
|
||||||
*/
|
*/
|
||||||
function addHistoryWithMinutesAgo(aMinutesAgo) {
|
function addHistoryWithMinutesAgo(aMinutesAgo) {
|
||||||
let pURI = uri("http://" + aMinutesAgo + "-minutes-ago.com/");
|
let pURI = makeURI("http://" + aMinutesAgo + "-minutes-ago.com/");
|
||||||
bhist.addPageWithDetails(pURI,
|
bhist.addPageWithDetails(pURI,
|
||||||
aMinutesAgo + " minutes ago",
|
aMinutesAgo + " minutes ago",
|
||||||
now_uSec - (aMinutesAgo * 60 * 1000 * 1000));
|
now_uSec - (aMinutesAgo * 60 * 1000 * 1000));
|
||||||
@ -652,13 +650,6 @@ function openWindow(aOnloadCallback) {
|
|||||||
null);
|
null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return A new nsIURI from aSpec.
|
|
||||||
*/
|
|
||||||
function uri(aSpec) {
|
|
||||||
return iosvc.newURI(aSpec, null, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
|
@ -4,13 +4,17 @@
|
|||||||
|
|
||||||
let testPage1 = "data:text/html,<html id='tab1'><body><button id='button1'>Tab 1</button></body></html>";
|
let testPage1 = "data:text/html,<html id='tab1'><body><button id='button1'>Tab 1</button></body></html>";
|
||||||
let testPage2 = "data:text/html,<html id='tab2'><body><button id='button2'>Tab 2</button></body></html>";
|
let testPage2 = "data:text/html,<html id='tab2'><body><button id='button2'>Tab 2</button></body></html>";
|
||||||
|
let testPage3 = "data:text/html,<html id='tab3'><body><button id='button3'>Tab 3</button></body></html>";
|
||||||
|
|
||||||
|
var browser1;
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
waitForExplicitFinish();
|
waitForExplicitFinish();
|
||||||
|
|
||||||
var tab1 = gBrowser.addTab();
|
var tab1 = gBrowser.addTab();
|
||||||
|
browser1 = gBrowser.getBrowserForTab(tab1);
|
||||||
|
|
||||||
var tab2 = gBrowser.addTab();
|
var tab2 = gBrowser.addTab();
|
||||||
var browser1 = gBrowser.getBrowserForTab(tab1);
|
|
||||||
var browser2 = gBrowser.getBrowserForTab(tab2);
|
var browser2 = gBrowser.getBrowserForTab(tab2);
|
||||||
|
|
||||||
gURLBar.focus();
|
gURLBar.focus();
|
||||||
@ -119,10 +123,15 @@ function test() {
|
|||||||
expectFocusShift(function () gBrowser.selectedTab = tab1,
|
expectFocusShift(function () gBrowser.selectedTab = tab1,
|
||||||
browser1.contentWindow, null, true,
|
browser1.contentWindow, null, true,
|
||||||
"focusedWindow after tab switch from no focus to no focus");
|
"focusedWindow after tab switch from no focus to no focus");
|
||||||
|
|
||||||
gBrowser.removeCurrentTab();
|
window.addEventListener("focus", _browser_tabfocus_test_eventOccured, true);
|
||||||
gBrowser.removeCurrentTab();
|
window.addEventListener("blur", _browser_tabfocus_test_eventOccured, true);
|
||||||
finish();
|
|
||||||
|
// next, check whether navigating forward, focusing the urlbar and then
|
||||||
|
// navigating back maintains the focus in the urlbar.
|
||||||
|
browser1.addEventListener("pageshow", _browser_tabfocus_navigation_test_eventOccured, true);
|
||||||
|
button1.focus();
|
||||||
|
browser1.contentWindow.location = testPage3;
|
||||||
}
|
}
|
||||||
|
|
||||||
browser1.addEventListener("load", check, true);
|
browser1.addEventListener("load", check, true);
|
||||||
@ -152,6 +161,24 @@ function _browser_tabfocus_test_eventOccured(event)
|
|||||||
_browser_tabfocus_test_events += event.type + ": " + id;
|
_browser_tabfocus_test_events += event.type + ": " + id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _browser_tabfocus_navigation_test_eventOccured(event)
|
||||||
|
{
|
||||||
|
if (event.target instanceof Document) {
|
||||||
|
var contentwin = event.target.defaultView;
|
||||||
|
if (contentwin.location.toString().indexOf("3") > 0) {
|
||||||
|
// just moved forward, so focus the urlbar and go back
|
||||||
|
gURLBar.focus();
|
||||||
|
setTimeout(function () contentwin.history.back(), 0);
|
||||||
|
}
|
||||||
|
else if (contentwin.location.toString().indexOf("2") > 0) {
|
||||||
|
is(window.document.activeElement, gURLBar.inputField, "urlbar still focused after navigating back");
|
||||||
|
gBrowser.removeCurrentTab();
|
||||||
|
gBrowser.removeCurrentTab();
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function getId(element)
|
function getId(element)
|
||||||
{
|
{
|
||||||
return (element.localName == "input") ? "urlbar" : element.id;
|
return (element.localName == "input") ? "urlbar" : element.id;
|
||||||
|
@ -283,10 +283,8 @@
|
|||||||
if (val == this.value &&
|
if (val == this.value &&
|
||||||
this.getAttribute("pageproxystate") == "valid") {
|
this.getAttribute("pageproxystate") == "valid") {
|
||||||
let uri;
|
let uri;
|
||||||
let ioService = Cc["@mozilla.org/network/io-service;1"]
|
|
||||||
.getService(Ci.nsIIOService);
|
|
||||||
try {
|
try {
|
||||||
uri = ioService.newURI(val, null, null);
|
uri = makeURI(val);
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
|
|
||||||
if (uri && !uri.schemeIs("javascript") && !uri.schemeIs("data")) {
|
if (uri && !uri.schemeIs("javascript") && !uri.schemeIs("data")) {
|
||||||
@ -387,10 +385,7 @@
|
|||||||
<setter>
|
<setter>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
try {
|
try {
|
||||||
let uri = Cc["@mozilla.org/network/io-service;1"].
|
val = losslessDecodeURI(makeURI(val));
|
||||||
getService(Ci.nsIIOService).
|
|
||||||
newURI(val, null, null);
|
|
||||||
val = losslessDecodeURI(uri);
|
|
||||||
} catch (ex) { }
|
} catch (ex) { }
|
||||||
this.value = val;
|
this.value = val;
|
||||||
|
|
||||||
|
@ -47,8 +47,6 @@
|
|||||||
%browserDTD;
|
%browserDTD;
|
||||||
<!ENTITY % textcontextDTD SYSTEM "chrome://global/locale/textcontext.dtd">
|
<!ENTITY % textcontextDTD SYSTEM "chrome://global/locale/textcontext.dtd">
|
||||||
%textcontextDTD;
|
%textcontextDTD;
|
||||||
<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
|
|
||||||
%globalDTD;
|
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<page id="webpanels-window"
|
<page id="webpanels-window"
|
||||||
|
@ -60,14 +60,6 @@ browser.jar:
|
|||||||
* content/browser/softwareUpdateOverlay.xul (content/softwareUpdateOverlay.xul)
|
* content/browser/softwareUpdateOverlay.xul (content/softwareUpdateOverlay.xul)
|
||||||
#endif
|
#endif
|
||||||
* content/browser/viewSourceOverlay.xul (content/viewSourceOverlay.xul)
|
* content/browser/viewSourceOverlay.xul (content/viewSourceOverlay.xul)
|
||||||
#ifdef MOZ_USE_GENERIC_BRANDING
|
|
||||||
% content branding %content/branding/ xpcnativewrappers=yes
|
|
||||||
content/branding/about.png (branding/about.png)
|
|
||||||
content/branding/aboutCredits.png (branding/aboutCredits.png)
|
|
||||||
content/branding/aboutFooter.png (branding/aboutFooter.png)
|
|
||||||
content/branding/icon48.png (branding/icon48.png)
|
|
||||||
content/branding/icon64.png (branding/icon64.png)
|
|
||||||
#endif
|
|
||||||
# the following files are browser-specific overrides
|
# the following files are browser-specific overrides
|
||||||
* content/browser/license.html (/toolkit/content/license.html)
|
* content/browser/license.html (/toolkit/content/license.html)
|
||||||
% override chrome://global/content/license.html chrome://browser/content/license.html
|
% override chrome://global/content/license.html chrome://browser/content/license.html
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
#
|
|
||||||
# ***** BEGIN LICENSE BLOCK *****
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
#
|
#
|
||||||
@ -14,12 +13,12 @@
|
|||||||
#
|
#
|
||||||
# The Original Code is mozilla.org code.
|
# The Original Code is mozilla.org code.
|
||||||
#
|
#
|
||||||
# The Initial Developer of the Original Code is
|
# The Initial Developer of the Original Code is Mozilla Corporation.
|
||||||
# Netscape Communications, Inc.
|
# Portions created by the Initial Developer are Copyright (C) 2009
|
||||||
# Portions created by the Initial Developer are Copyright (C) 2001
|
|
||||||
# the Initial Developer. All Rights Reserved.
|
# the Initial Developer. All Rights Reserved.
|
||||||
#
|
#
|
||||||
# Contributor(s):
|
# Contributor(s):
|
||||||
|
# Justin Dolske <dolske@mozilla.com> (original author)
|
||||||
#
|
#
|
||||||
# Alternatively, the contents of this file may be used under the terms of
|
# 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
|
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
@ -35,58 +34,68 @@
|
|||||||
#
|
#
|
||||||
# ***** END LICENSE BLOCK *****
|
# ***** END LICENSE BLOCK *****
|
||||||
|
|
||||||
DEPTH = ../../../..
|
DEPTH = ../../..
|
||||||
topsrcdir = @top_srcdir@
|
topsrcdir = @top_srcdir@
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
|
|
||||||
include $(DEPTH)/config/autoconf.mk
|
include $(DEPTH)/config/autoconf.mk
|
||||||
|
|
||||||
MODULE = mozEmbed
|
DIRS = \
|
||||||
PROGRAM = mozEmbed$(BIN_SUFFIX)
|
content \
|
||||||
RESFILE = $(MODULE).res
|
locales \
|
||||||
MOZILLA_INTERNAL_API = 1
|
$(NULL)
|
||||||
|
|
||||||
REQUIRES = xpcom \
|
PREF_JS_EXPORTS = $(srcdir)/pref/firefox-branding.js
|
||||||
string \
|
|
||||||
embed_base \
|
|
||||||
webbrwsr \
|
|
||||||
webshell \
|
|
||||||
windowwatcher \
|
|
||||||
profile \
|
|
||||||
necko \
|
|
||||||
docshell \
|
|
||||||
dom \
|
|
||||||
widget \
|
|
||||||
uriloader \
|
|
||||||
shistory \
|
|
||||||
webbrowserpersist \
|
|
||||||
gfx \
|
|
||||||
mozEmbed \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
|
|
||||||
CPPSRCS = nsQABrowserView.cpp \
|
|
||||||
nsQABrowserChrome.cpp \
|
|
||||||
nsQABrowserModule.cpp \
|
|
||||||
nsQAWindowCreator.cpp \
|
|
||||||
mozEmbed.cpp \
|
|
||||||
StdAfx.cpp \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
EXTRA_DSO_LIBS = embed_base_s gkgfx
|
|
||||||
|
|
||||||
LIBS = \
|
|
||||||
$(EXTRA_DSO_LIBS) \
|
|
||||||
$(XPCOM_LIBS) \
|
|
||||||
$(NSPR_LIBS) \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
OS_LIBS += \
|
|
||||||
ole32.lib \
|
|
||||||
comdlg32.lib \
|
|
||||||
shell32.lib \
|
|
||||||
version.lib \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
include $(topsrcdir)/config/rules.mk
|
include $(topsrcdir)/config/rules.mk
|
||||||
|
|
||||||
|
WINDOWS_BRANDING_FILES = \
|
||||||
|
firefox.ico \
|
||||||
|
document.ico \
|
||||||
|
branding.nsi \
|
||||||
|
wizHeader.bmp \
|
||||||
|
wizHeaderRTL.bmp \
|
||||||
|
wizWatermark.bmp \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
ifdef MOZ_SPLASHSCREEN
|
||||||
|
WINDOWS_BRANDING_FILES += splash.bmp
|
||||||
|
endif
|
||||||
|
|
||||||
|
OSX_BRANDING_FILES = \
|
||||||
|
background.png \
|
||||||
|
firefox.icns \
|
||||||
|
disk.icns \
|
||||||
|
document.icns \
|
||||||
|
dsstore \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
LINUX_BRANDING_FILES = \
|
||||||
|
default16.png \
|
||||||
|
default32.png \
|
||||||
|
default48.png \
|
||||||
|
document.png \
|
||||||
|
mozicon128.png \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
OS2_BRANDING_FILES = \
|
||||||
|
firefox-os2.ico \
|
||||||
|
document-os2.ico \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
export::
|
||||||
|
$(NSINSTALL) -D $(DIST)/branding
|
||||||
|
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
|
||||||
|
cp $(addprefix $(srcdir)/, $(WINDOWS_BRANDING_FILES)) $(DIST)/branding/
|
||||||
|
endif
|
||||||
|
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
|
||||||
|
cp $(addprefix $(srcdir)/, $(OSX_BRANDING_FILES)) $(DIST)/branding/
|
||||||
|
endif
|
||||||
|
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
||||||
|
cp $(addprefix $(srcdir)/, $(LINUX_BRANDING_FILES)) $(DIST)/branding/
|
||||||
|
$(NSINSTALL) -D $(DIST)/install
|
||||||
|
endif
|
||||||
|
ifeq ($(OS_ARCH),OS2)
|
||||||
|
cp $(addprefix $(srcdir)/, $(OS2_BRANDING_FILES)) $(DIST)/branding/
|
||||||
|
endif
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
0
browser/branding/nightly/configure.sh
Executable file → Normal file
11
browser/branding/nightly/content/Makefile.in
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# Branding Makefile
|
||||||
|
# - jars chrome artwork
|
||||||
|
|
||||||
|
DEPTH = ../../../..
|
||||||
|
topsrcdir = @top_srcdir@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
VPATH = @srcdir@
|
||||||
|
|
||||||
|
include $(DEPTH)/config/autoconf.mk
|
||||||
|
|
||||||
|
include $(topsrcdir)/config/rules.mk
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 227 B After Width: | Height: | Size: 227 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
7
browser/branding/nightly/content/jar.mn
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
browser.jar:
|
||||||
|
% content branding %content/branding/ xpcnativewrappers=yes
|
||||||
|
content/branding/about.png (about.png)
|
||||||
|
content/branding/aboutCredits.png (aboutCredits.png)
|
||||||
|
content/branding/aboutFooter.png (aboutFooter.png)
|
||||||
|
content/branding/icon48.png (icon48.png)
|
||||||
|
content/branding/icon64.png (icon64.png)
|
Before Width: | Height: | Size: 722 B After Width: | Height: | Size: 722 B |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
0
browser/app/macbuild/dsstore → browser/branding/nightly/dsstore
Executable file → Normal file
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
@ -11,10 +11,10 @@
|
|||||||
# for the specific language governing rights and limitations under the
|
# for the specific language governing rights and limitations under the
|
||||||
# License.
|
# License.
|
||||||
#
|
#
|
||||||
# The Original Code is Mozilla QA Tests.
|
# The Original Code is the Mozilla Browser code.
|
||||||
#
|
#
|
||||||
# The Initial Developer of the Original Code is
|
# The Initial Developer of the Original Code is
|
||||||
# Josh Soref.
|
# Benjamin Smedberg <benjamin@smedbergs.us>
|
||||||
# Portions created by the Initial Developer are Copyright (C) 2004
|
# Portions created by the Initial Developer are Copyright (C) 2004
|
||||||
# the Initial Developer. All Rights Reserved.
|
# the Initial Developer. All Rights Reserved.
|
||||||
#
|
#
|
||||||
@ -34,13 +34,22 @@
|
|||||||
#
|
#
|
||||||
# ***** END LICENSE BLOCK *****
|
# ***** END LICENSE BLOCK *****
|
||||||
|
|
||||||
DEPTH = ../..
|
DEPTH = ../../../..
|
||||||
topsrcdir = @top_srcdir@
|
topsrcdir = @top_srcdir@
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
|
relativesrcdir = browser/branding/nightly/locales
|
||||||
|
|
||||||
include $(DEPTH)/config/autoconf.mk
|
include $(DEPTH)/config/autoconf.mk
|
||||||
|
|
||||||
DIRS=mozembed testembed/components testembed
|
DEFINES += -DAB_CD=$(AB_CD) -DMOZ_DISTRIBUTION_ID_UNQUOTED=$(MOZ_DISTRIBUTION_ID)
|
||||||
|
|
||||||
include $(topsrcdir)/config/rules.mk
|
include $(topsrcdir)/config/rules.mk
|
||||||
|
|
||||||
|
libs::
|
||||||
|
@$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) \
|
||||||
|
$(srcdir)/browserconfig.properties > $(FINAL_TARGET)/browserconfig.properties
|
||||||
|
|
||||||
|
install::
|
||||||
|
@$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) \
|
||||||
|
$(srcdir)/browserconfig.properties > $(DESTDIR)$(mozappdir)/browserconfig.properties
|
6
browser/branding/nightly/locales/jar.mn
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#filter substitution
|
||||||
|
|
||||||
|
@AB_CD@.jar:
|
||||||
|
% locale branding @AB_CD@ %locale/branding/
|
||||||
|
locale/branding/brand.dtd (%brand.dtd)
|
||||||
|
* locale/branding/brand.properties (%brand.properties)
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
BIN
browser/branding/nightly/splash.bmp
Normal file
After Width: | Height: | Size: 250 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 151 KiB |
@ -1,7 +1,38 @@
|
|||||||
# Branding Makefile
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
# - jars chrome artwork
|
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
# - copies artwork to appropriate places in objdir for bundling into app
|
#
|
||||||
# resources
|
# 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 Mozilla Corporation.
|
||||||
|
# Portions created by the Initial Developer are Copyright (C) 2009
|
||||||
|
# the Initial Developer. All Rights Reserved.
|
||||||
|
#
|
||||||
|
# Contributor(s):
|
||||||
|
# Justin Dolske <dolske@mozilla.com> (original author)
|
||||||
|
#
|
||||||
|
# Alternatively, the contents of this file may be used under the terms of
|
||||||
|
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
|
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
|
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||||
|
# of those above. If you wish to allow use of your version of this file only
|
||||||
|
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||||
|
# use your version of this file under the terms of the MPL, indicate your
|
||||||
|
# decision by deleting the provisions above and replace them with the notice
|
||||||
|
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||||
|
# the provisions above, a recipient may use your version of this file under
|
||||||
|
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||||
|
#
|
||||||
|
# ***** END LICENSE BLOCK *****
|
||||||
|
|
||||||
DEPTH = ../../..
|
DEPTH = ../../..
|
||||||
topsrcdir = @top_srcdir@
|
topsrcdir = @top_srcdir@
|
||||||
@ -19,40 +50,52 @@ PREF_JS_EXPORTS = $(srcdir)/pref/firefox-branding.js
|
|||||||
|
|
||||||
include $(topsrcdir)/config/rules.mk
|
include $(topsrcdir)/config/rules.mk
|
||||||
|
|
||||||
BROWSER_APP_FILES = \
|
WINDOWS_BRANDING_FILES = \
|
||||||
|
firefox.ico \
|
||||||
|
document.ico \
|
||||||
|
branding.nsi \
|
||||||
|
wizHeader.bmp \
|
||||||
|
wizHeaderRTL.bmp \
|
||||||
|
wizWatermark.bmp \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
ifdef MOZ_SPLASHSCREEN
|
||||||
|
WINDOWS_BRANDING_FILES += splash.bmp
|
||||||
|
endif
|
||||||
|
|
||||||
|
OSX_BRANDING_FILES = \
|
||||||
|
background.png \
|
||||||
|
firefox.icns \
|
||||||
|
disk.icns \
|
||||||
|
document.icns \
|
||||||
|
dsstore \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
LINUX_BRANDING_FILES = \
|
||||||
default16.png \
|
default16.png \
|
||||||
default32.png \
|
default32.png \
|
||||||
default48.png \
|
default48.png \
|
||||||
|
document.png \
|
||||||
mozicon128.png \
|
mozicon128.png \
|
||||||
firefox.ico \
|
$(NULL)
|
||||||
document.ico \
|
|
||||||
|
OS2_BRANDING_FILES = \
|
||||||
|
firefox-os2.ico \
|
||||||
|
document-os2.ico \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
export::
|
export::
|
||||||
$(NSINSTALL) -D $(DIST)/branding
|
$(NSINSTALL) -D $(DIST)/branding
|
||||||
cp $(addprefix $(srcdir)/, $(BROWSER_APP_FILES)) $(DIST)/branding/
|
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
|
||||||
ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT)))
|
cp $(addprefix $(srcdir)/, $(WINDOWS_BRANDING_FILES)) $(DIST)/branding/
|
||||||
cp $(srcdir)/document.png $(DIST)/branding/document.png
|
endif
|
||||||
|
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
|
||||||
|
cp $(addprefix $(srcdir)/, $(OSX_BRANDING_FILES)) $(DIST)/branding/
|
||||||
|
endif
|
||||||
|
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
||||||
|
cp $(addprefix $(srcdir)/, $(LINUX_BRANDING_FILES)) $(DIST)/branding/
|
||||||
$(NSINSTALL) -D $(DIST)/install
|
$(NSINSTALL) -D $(DIST)/install
|
||||||
endif
|
endif
|
||||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
|
||||||
cp $(srcdir)/firefox.icns $(DIST)/branding/firefox.icns
|
|
||||||
cp $(srcdir)/document.icns $(DIST)/branding/document.icns
|
|
||||||
cp $(srcdir)/dsstore $(DIST)/branding/dsstore
|
|
||||||
cp $(srcdir)/background.png $(DIST)/branding/background.png
|
|
||||||
cp $(srcdir)/disk.icns $(DIST)/branding/disk.icns
|
|
||||||
endif
|
|
||||||
ifneq (,$(filter WINNT WINCE,$(OS_ARCH)))
|
|
||||||
cp $(srcdir)/firefox.ico $(DIST)/branding/app.ico
|
|
||||||
endif
|
|
||||||
ifeq ($(OS_ARCH),WINNT)
|
|
||||||
cp $(srcdir)/branding.nsi $(DIST)/branding/branding.nsi
|
|
||||||
cp $(srcdir)/wizHeader.bmp $(DIST)/branding/wizHeader.bmp
|
|
||||||
cp $(srcdir)/wizHeaderRTL.bmp $(DIST)/branding/wizHeaderRTL.bmp
|
|
||||||
cp $(srcdir)/wizWatermark.bmp $(DIST)/branding/wizWatermark.bmp
|
|
||||||
endif
|
|
||||||
ifeq ($(OS_ARCH),OS2)
|
ifeq ($(OS_ARCH),OS2)
|
||||||
cp $(srcdir)/firefox-os2.ico $(DIST)/branding/firefox.ico
|
cp $(addprefix $(srcdir)/, $(OS2_BRANDING_FILES)) $(DIST)/branding/
|
||||||
cp $(srcdir)/firefox-os2.ico $(DIST)/branding/app.ico
|
|
||||||
cp $(srcdir)/document-os2.ico $(DIST)/branding/document.ico
|
|
||||||
endif
|
endif
|
||||||
|
0
browser/branding/unofficial/configure.sh
Executable file → Normal file
0
browser/branding/unofficial/dsstore
Executable file → Normal file
@ -2,6 +2,5 @@
|
|||||||
|
|
||||||
@AB_CD@.jar:
|
@AB_CD@.jar:
|
||||||
% locale branding @AB_CD@ %locale/branding/
|
% locale branding @AB_CD@ %locale/branding/
|
||||||
# Unofficial branding only exists in en-US
|
locale/branding/brand.dtd (%brand.dtd)
|
||||||
locale/branding/brand.dtd (en-US/brand.dtd)
|
* locale/branding/brand.properties (%brand.properties)
|
||||||
* locale/branding/brand.properties (en-US/brand.properties)
|
|
||||||
|
BIN
browser/branding/unofficial/splash.bmp
Normal file
After Width: | Height: | Size: 250 KiB |