зеркало из https://github.com/mozilla/pjs.git
Merge mozilla-central into Places
This commit is contained in:
Коммит
b6067336ca
|
@ -781,10 +781,16 @@ interface nsIAccessibleRole : nsISupports
|
|||
*/
|
||||
const unsigned long ROLE_EMBEDDED_OBJECT = 122;
|
||||
|
||||
/**
|
||||
* A note. Originally intended to be hidden until activated, but now also used
|
||||
* for things like html 'aside'.
|
||||
*/
|
||||
const unsigned long ROLE_NOTE = 123;
|
||||
|
||||
/**
|
||||
* It's not role actually. This constant is important to help ensure
|
||||
* nsRoleMap's are synchronized.
|
||||
*/
|
||||
const unsigned long ROLE_LAST_ENTRY = 123;
|
||||
const unsigned long ROLE_LAST_ENTRY = 124;
|
||||
};
|
||||
|
||||
|
|
|
@ -169,6 +169,7 @@ static const PRUint32 atkRoleMap[] = {
|
|||
ATK_ROLE_UNKNOWN, // nsIAccessibleRole::ROLE_FLAT_EQUATION 120
|
||||
ATK_ROLE_TABLE_CELL, // nsIAccessibleRole::ROLE_GRID_CELL 121
|
||||
ATK_ROLE_PANEL, // nsIAccessibleRole::ROLE_EMBEDDED_OBJECT 122
|
||||
ATK_ROLE_SECTION, // nsIAccessibleRole::ROLE_NOTE 123
|
||||
kROLE_ATK_LAST_ENTRY // nsIAccessibleRole::ROLE_LAST_ENTRY
|
||||
};
|
||||
|
||||
|
|
|
@ -456,28 +456,29 @@ nsAccDocManager::CreateDocOrRootAccessible(nsIDocument *aDocument)
|
|||
// We only create root accessibles for the true root, otherwise create a
|
||||
// doc accessible.
|
||||
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(presShell));
|
||||
nsDocAccessible *docAcc = isRootDoc ?
|
||||
nsRefPtr<nsDocAccessible> docAcc = isRootDoc ?
|
||||
new nsRootAccessibleWrap(aDocument, rootElm, weakShell) :
|
||||
new nsDocAccessibleWrap(aDocument, rootElm, weakShell);
|
||||
|
||||
if (!docAcc)
|
||||
// Cache the document accessible into document cache.
|
||||
if (!docAcc || !mDocAccessibleCache.Put(aDocument, docAcc))
|
||||
return nsnull;
|
||||
|
||||
// Cache and addref document accessible.
|
||||
if (!mDocAccessibleCache.Put(aDocument, docAcc)) {
|
||||
delete docAcc;
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
// XXX: ideally we should initialize an accessible and then put it into tree,
|
||||
// we can't since document accessible fires reorder event on its container
|
||||
// while initialized.
|
||||
if (!outerDocAcc->AppendChild(docAcc) ||
|
||||
!GetAccService()->InitAccessible(docAcc, nsAccUtils::GetRoleMapEntry(aDocument))) {
|
||||
// Bind the document accessible into tree.
|
||||
if (!outerDocAcc->AppendChild(docAcc)) {
|
||||
mDocAccessibleCache.Remove(aDocument);
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
// Initialize the document accessible. Note, Init() should be called after
|
||||
// the document accessible is bound to the tree.
|
||||
if (!docAcc->Init()) {
|
||||
docAcc->Shutdown();
|
||||
mDocAccessibleCache.Remove(aDocument);
|
||||
return nsnull;
|
||||
}
|
||||
docAcc->SetRoleMapEntry(nsAccUtils::GetRoleMapEntry(aDocument));
|
||||
|
||||
NS_LOG_ACCDOCCREATE("document creation finished", aDocument)
|
||||
|
||||
AddListeners(aDocument, isRootDoc);
|
||||
|
|
|
@ -113,16 +113,16 @@ nsAccTreeWalker::GetNextChildInternal(PRBool aNoWalkUp)
|
|||
nsIContent* childNode = mState->childList->GetNodeAt(mState->childIdx);
|
||||
mState->childIdx++;
|
||||
|
||||
PRBool isHidden = PR_FALSE;
|
||||
bool isSubtreeHidden = false;
|
||||
nsRefPtr<nsAccessible> accessible =
|
||||
GetAccService()->GetOrCreateAccessible(childNode, presShell, mWeakShell,
|
||||
&isHidden);
|
||||
&isSubtreeHidden);
|
||||
|
||||
if (accessible)
|
||||
return accessible.forget();
|
||||
|
||||
// Walk down into subtree to find accessibles.
|
||||
if (!isHidden) {
|
||||
if (!isSubtreeHidden) {
|
||||
if (!PushState(childNode))
|
||||
break;
|
||||
|
||||
|
|
|
@ -101,6 +101,7 @@ ACCESSIBILITY_ATOM(abbr, "abbr")
|
|||
ACCESSIBILITY_ATOM(acronym, "acronym")
|
||||
ACCESSIBILITY_ATOM(area, "area")
|
||||
ACCESSIBILITY_ATOM(article, "article") // HTML landmark
|
||||
ACCESSIBILITY_ATOM(aside, "aside") // HTML landmark
|
||||
ACCESSIBILITY_ATOM(autocomplete, "autocomplete")
|
||||
ACCESSIBILITY_ATOM(blockquote, "blockquote")
|
||||
ACCESSIBILITY_ATOM(br, "br")
|
||||
|
|
|
@ -837,28 +837,6 @@ nsAccessibilityService::GetCachedAccessibleOrContainer(nsINode* aNode)
|
|||
return accessible;
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsAccessibilityService::InitAccessible(nsAccessible *aAccessible,
|
||||
nsRoleMapEntry *aRoleMapEntry)
|
||||
{
|
||||
if (!aAccessible)
|
||||
return PR_FALSE;
|
||||
|
||||
// Add to cache an accessible, etc.
|
||||
if (!aAccessible->Init()) {
|
||||
NS_ERROR("Failed to initialize an accessible!");
|
||||
|
||||
aAccessible->Shutdown();
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
NS_ASSERTION(aAccessible->IsInCache(),
|
||||
"Initialized accessible not in the cache!");
|
||||
|
||||
aAccessible->SetRoleMapEntry(aRoleMapEntry);
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
static PRBool HasRelatedContent(nsIContent *aContent)
|
||||
{
|
||||
nsAutoString id;
|
||||
|
@ -891,13 +869,13 @@ already_AddRefed<nsAccessible>
|
|||
nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
|
||||
nsIPresShell* aPresShell,
|
||||
nsIWeakReference* aWeakShell,
|
||||
PRBool* aIsHidden)
|
||||
bool* aIsSubtreeHidden)
|
||||
{
|
||||
if (!aPresShell || !aWeakShell || !aNode || gIsShutdown)
|
||||
return nsnull;
|
||||
|
||||
if (aIsHidden)
|
||||
*aIsHidden = PR_FALSE;
|
||||
if (aIsSubtreeHidden)
|
||||
*aIsSubtreeHidden = false;
|
||||
|
||||
// Check to see if we already have an accessible for this node in the cache.
|
||||
nsAccessible *cachedAccessible = GetCachedAccessible(aNode, aWeakShell);
|
||||
|
@ -938,10 +916,11 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
|
|||
// methods on a dead frame pointer.
|
||||
nsWeakFrame weakFrame = content->GetPrimaryFrame();
|
||||
|
||||
// Check frame to see if it is hidden.
|
||||
if (!weakFrame.GetFrame()) {
|
||||
if (aIsHidden)
|
||||
*aIsHidden = PR_TRUE;
|
||||
// Check frame and its visibility. Note, hidden frame allows visible
|
||||
// elements in subtree.
|
||||
if (!weakFrame.GetFrame() || !weakFrame->GetStyleVisibility()->IsVisible()) {
|
||||
if (aIsSubtreeHidden && !weakFrame.GetFrame())
|
||||
*aIsSubtreeHidden = true;
|
||||
|
||||
return nsnull;
|
||||
}
|
||||
|
@ -958,6 +937,13 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
|
|||
return areaAcc;
|
||||
}
|
||||
|
||||
nsDocAccessible* docAcc =
|
||||
GetAccService()->GetDocAccessible(aNode->GetOwnerDoc());
|
||||
if (!docAcc) {
|
||||
NS_NOTREACHED("No document for accessible being created!");
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
// Attempt to create an accessible based on what we know.
|
||||
nsRefPtr<nsAccessible> newAcc;
|
||||
if (content->IsNodeOfType(nsINode::eTEXT)) {
|
||||
|
@ -968,15 +954,15 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
|
|||
f->GetRenderedText(&renderedWhitespace, nsnull, nsnull, 0, 1);
|
||||
if (renderedWhitespace.IsEmpty()) {
|
||||
// Really empty -- nothing is rendered
|
||||
if (aIsHidden)
|
||||
*aIsHidden = PR_TRUE;
|
||||
if (aIsSubtreeHidden)
|
||||
*aIsSubtreeHidden = true;
|
||||
|
||||
return nsnull;
|
||||
}
|
||||
}
|
||||
if (weakFrame.IsAlive()) {
|
||||
newAcc = weakFrame.GetFrame()->CreateAccessible();
|
||||
if (InitAccessible(newAcc, nsnull))
|
||||
if (docAcc->BindToDocument(newAcc, nsnull))
|
||||
return newAcc.forget();
|
||||
return nsnull;
|
||||
}
|
||||
|
@ -997,14 +983,14 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
|
|||
nsAutoString name;
|
||||
content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::name, name);
|
||||
if (!name.IsEmpty()) {
|
||||
if (aIsHidden)
|
||||
*aIsHidden = PR_TRUE;
|
||||
if (aIsSubtreeHidden)
|
||||
*aIsSubtreeHidden = true;
|
||||
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
newAcc = new nsHyperTextAccessibleWrap(content, aWeakShell);
|
||||
if (InitAccessible(newAcc, nsAccUtils::GetRoleMapEntry(aNode)))
|
||||
if (docAcc->BindToDocument(newAcc, nsAccUtils::GetRoleMapEntry(aNode)))
|
||||
return newAcc.forget();
|
||||
return nsnull;
|
||||
}
|
||||
|
@ -1122,8 +1108,8 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
|
|||
// captions. This could not be done in
|
||||
// nsTableCaptionFrame::GetAccessible() because the descendants of
|
||||
// the table caption would still be created. By setting
|
||||
// *aIsHidden = PR_TRUE we ensure that no descendant accessibles are
|
||||
// created.
|
||||
// *aIsSubtreeHidden = true we ensure that no descendant accessibles
|
||||
// are created.
|
||||
nsIFrame* f = weakFrame.GetFrame();
|
||||
if (!f) {
|
||||
f = aPresShell->GetRealPrimaryFrameFor(content);
|
||||
|
@ -1132,8 +1118,8 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
|
|||
f->GetRect().IsEmpty()) {
|
||||
// XXX This is not the ideal place for this code, but right now there
|
||||
// is no better place:
|
||||
if (aIsHidden)
|
||||
*aIsHidden = PR_TRUE;
|
||||
if (aIsSubtreeHidden)
|
||||
*aIsSubtreeHidden = true;
|
||||
|
||||
return nsnull;
|
||||
}
|
||||
|
@ -1191,7 +1177,7 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
|
|||
}
|
||||
}
|
||||
|
||||
if (InitAccessible(newAcc, roleMapEntry))
|
||||
if (docAcc->BindToDocument(newAcc, roleMapEntry))
|
||||
return newAcc.forget();
|
||||
return nsnull;
|
||||
}
|
||||
|
@ -1348,22 +1334,29 @@ nsAccessibilityService::GetAreaAccessible(nsIFrame* aImageFrame,
|
|||
|
||||
// Try to get image map accessible from the global cache or create it
|
||||
// if failed.
|
||||
nsRefPtr<nsAccessible> imageAcc =
|
||||
GetCachedAccessible(aImageFrame->GetContent(), aWeakShell);
|
||||
if (!imageAcc) {
|
||||
imageAcc = CreateHTMLImageAccessible(aImageFrame->GetContent(),
|
||||
aImageFrame->PresContext()->PresShell());
|
||||
nsRefPtr<nsAccessible> image = GetCachedAccessible(aImageFrame->GetContent(),
|
||||
aWeakShell);
|
||||
if (!image) {
|
||||
image = CreateHTMLImageAccessible(aImageFrame->GetContent(),
|
||||
aImageFrame->PresContext()->PresShell());
|
||||
|
||||
if (!InitAccessible(imageAcc, nsnull))
|
||||
nsDocAccessible* document =
|
||||
GetAccService()->GetDocAccessible(aAreaNode->GetOwnerDoc());
|
||||
if (!document) {
|
||||
NS_NOTREACHED("No document for accessible being created!");
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
if (!document->BindToDocument(image, nsnull))
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
if (aImageAccessible)
|
||||
*aImageAccessible = imageAcc;
|
||||
*aImageAccessible = image;
|
||||
|
||||
// Make sure <area> accessible children of the image map are cached so
|
||||
// that they should be available in global cache.
|
||||
imageAcc->EnsureChildren();
|
||||
image->EnsureChildren();
|
||||
|
||||
return GetCachedAccessible(aAreaNode, aWeakShell);
|
||||
}
|
||||
|
@ -1771,7 +1764,7 @@ nsAccessibilityService::AddNativeRootAccessible(void* aAtkAccessible)
|
|||
if (!applicationAcc)
|
||||
return nsnull;
|
||||
|
||||
nsNativeRootAccessibleWrap* nativeRootAcc =
|
||||
nsRefPtr<nsNativeRootAccessibleWrap> nativeRootAcc =
|
||||
new nsNativeRootAccessibleWrap((AtkObject*)aAtkAccessible);
|
||||
if (!nativeRootAcc)
|
||||
return nsnull;
|
||||
|
|
|
@ -111,9 +111,9 @@ public:
|
|||
virtual void RemoveNativeRootAccessible(nsAccessible* aRootAccessible);
|
||||
|
||||
virtual void ContentRangeInserted(nsIPresShell* aPresShell,
|
||||
nsIContent* aContainer,
|
||||
nsIContent* aStartChild,
|
||||
nsIContent* aEndChild);
|
||||
nsIContent* aContainer,
|
||||
nsIContent* aStartChild,
|
||||
nsIContent* aEndChild);
|
||||
|
||||
virtual void ContentRemoved(nsIPresShell* aPresShell, nsIContent* aContainer,
|
||||
nsIContent* aChild);
|
||||
|
@ -138,16 +138,16 @@ public:
|
|||
* Return an accessible for the given DOM node from the cache or create new
|
||||
* one.
|
||||
*
|
||||
* @param aNode [in] the given node
|
||||
* @param aPresShell [in] the pres shell of the node
|
||||
* @param aWeakShell [in] the weak shell for the pres shell
|
||||
* @param aIsHidden [out, optional] indicates whether the node's frame is
|
||||
* hidden
|
||||
* @param aNode [in] the given node
|
||||
* @param aPresShell [in] the pres shell of the node
|
||||
* @param aWeakShell [in] the weak shell for the pres shell
|
||||
* @param aIsSubtreeHidden [out, optional] indicates whether the node's
|
||||
* frame and its subtree is hidden
|
||||
*/
|
||||
already_AddRefed<nsAccessible>
|
||||
GetOrCreateAccessible(nsINode* aNode, nsIPresShell* aPresShell,
|
||||
nsIWeakReference* aWeakShell,
|
||||
PRBool* aIsHidden = nsnull);
|
||||
bool* aIsSubtreeHidden = nsnull);
|
||||
|
||||
/**
|
||||
* Return an accessible for the given DOM node.
|
||||
|
@ -202,19 +202,6 @@ public:
|
|||
GetCachedAccessibleOrContainer(aNode->GetNodeParent()) : nsnull;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize an accessible and cache it. The method should be called for
|
||||
* every created accessible.
|
||||
*
|
||||
* @param aAccessible [in] accessible to initialize.
|
||||
* @param aRoleMapEntry [in] the role map entry role the ARIA role or nsnull
|
||||
* if none
|
||||
*
|
||||
* @return true if the accessible was initialized, otherwise false
|
||||
*/
|
||||
PRBool InitAccessible(nsAccessible *aAccessible,
|
||||
nsRoleMapEntry *aRoleMapEntry);
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Return an accessible for the DOM node in the given presentation shell if
|
||||
|
|
|
@ -2621,19 +2621,6 @@ nsAccessible::AppendTextTo(nsAString& aText, PRUint32 aStartOffset, PRUint32 aLe
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsAccessNode public methods
|
||||
|
||||
PRBool
|
||||
nsAccessible::Init()
|
||||
{
|
||||
if (!nsAccessNodeWrap::Init())
|
||||
return PR_FALSE;
|
||||
|
||||
nsDocAccessible* document =
|
||||
GetAccService()->GetDocAccessible(mContent->GetOwnerDoc());
|
||||
NS_ASSERTION(document, "Cannot cache new nsAccessible!");
|
||||
|
||||
return document ? document->CacheAccessible(this) : PR_FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
nsAccessible::Shutdown()
|
||||
{
|
||||
|
@ -2912,20 +2899,6 @@ nsAccessible::GetIndexOfEmbeddedChild(nsAccessible* aChild)
|
|||
return GetIndexOf(aChild);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
PRBool
|
||||
nsAccessible::IsInCache()
|
||||
{
|
||||
nsDocAccessible *docAccessible =
|
||||
GetAccService()->GetDocAccessible(mContent->GetOwnerDoc());
|
||||
if (docAccessible)
|
||||
return docAccessible->GetCachedAccessibleByUniqueID(UniqueID()) ? PR_TRUE : PR_FALSE;
|
||||
|
||||
return PR_FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// HyperLinkAccessible methods
|
||||
|
||||
|
|
|
@ -113,7 +113,6 @@ public:
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
// nsAccessNode
|
||||
|
||||
virtual PRBool Init();
|
||||
virtual void Shutdown();
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -298,13 +297,6 @@ public:
|
|||
PRBool AreChildrenCached() const { return mChildrenFlags != eChildrenUninitialized; }
|
||||
bool IsBoundToParent() const { return mParent; }
|
||||
|
||||
#ifdef DEBUG
|
||||
/**
|
||||
* Return true if the access node is cached.
|
||||
*/
|
||||
PRBool IsInCache();
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Miscellaneous methods
|
||||
|
||||
|
@ -441,7 +433,7 @@ protected:
|
|||
/**
|
||||
* Set accessible parent and index in parent.
|
||||
*/
|
||||
void BindToParent(nsAccessible* aParent, PRUint32 aIndexInParent);
|
||||
virtual void BindToParent(nsAccessible* aParent, PRUint32 aIndexInParent);
|
||||
void UnbindFromParent();
|
||||
|
||||
/**
|
||||
|
|
|
@ -207,13 +207,6 @@ nsLinkableAccessible::GetKeyboardShortcut(nsAString& aKeyboardShortcut)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsLinkableAccessible. nsAccessNode
|
||||
|
||||
PRBool
|
||||
nsLinkableAccessible::Init()
|
||||
{
|
||||
CacheActionContent();
|
||||
return nsAccessibleWrap::Init();
|
||||
}
|
||||
|
||||
void
|
||||
nsLinkableAccessible::Shutdown()
|
||||
{
|
||||
|
@ -242,11 +235,19 @@ nsLinkableAccessible::GetAnchorURI(PRUint32 aAnchorIndex)
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsLinkableAccessible
|
||||
// nsLinkableAccessible: nsAccessible protected
|
||||
|
||||
void
|
||||
nsLinkableAccessible::CacheActionContent()
|
||||
nsLinkableAccessible::BindToParent(nsAccessible* aParent,
|
||||
PRUint32 aIndexInParent)
|
||||
{
|
||||
nsAccessibleWrap::BindToParent(aParent, aIndexInParent);
|
||||
|
||||
// Cache action content.
|
||||
mActionContent = nsnull;
|
||||
mIsLink = PR_FALSE;
|
||||
mIsOnclick = PR_FALSE;
|
||||
|
||||
nsIContent* walkUpContent = mContent;
|
||||
PRBool isOnclick = nsCoreUtils::HasClickListener(walkUpContent);
|
||||
|
||||
|
@ -276,6 +277,9 @@ nsLinkableAccessible::CacheActionContent()
|
|||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsLinkableAccessible: protected
|
||||
|
||||
nsAccessible *
|
||||
nsLinkableAccessible::GetActionAccessible() const
|
||||
{
|
||||
|
|
|
@ -97,7 +97,6 @@ public:
|
|||
NS_IMETHOD GetKeyboardShortcut(nsAString& _retval);
|
||||
|
||||
// nsAccessNode
|
||||
virtual PRBool Init();
|
||||
virtual void Shutdown();
|
||||
|
||||
// nsAccessible
|
||||
|
@ -107,16 +106,16 @@ public:
|
|||
virtual already_AddRefed<nsIURI> GetAnchorURI(PRUint32 aAnchorIndex);
|
||||
|
||||
protected:
|
||||
// nsAccessible
|
||||
virtual void BindToParent(nsAccessible* aParent, PRUint32 aIndexInParent);
|
||||
|
||||
// nsLinkableAccessible
|
||||
|
||||
/**
|
||||
* Return an accessible for cached action node.
|
||||
*/
|
||||
nsAccessible *GetActionAccessible() const;
|
||||
|
||||
/**
|
||||
* Cache action node.
|
||||
*/
|
||||
virtual void CacheActionContent();
|
||||
|
||||
nsCOMPtr<nsIContent> mActionContent;
|
||||
PRPackedBool mIsLink;
|
||||
PRPackedBool mIsOnclick;
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
#include "nsIDOM3Node.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDOMDocumentView.h"
|
||||
#include "nsIDOMDocumentXBL.h"
|
||||
#include "nsIDOMHTMLDocument.h"
|
||||
#include "nsIDOMHTMLElement.h"
|
||||
#include "nsIDOMNodeList.h"
|
||||
|
@ -805,67 +804,6 @@ nsCoreUtils::GetLanguageFor(nsIContent *aContent, nsIContent *aRootContent,
|
|||
walkUp = walkUp->GetParent();
|
||||
}
|
||||
|
||||
void
|
||||
nsCoreUtils::GetElementsByIDRefsAttr(nsIContent *aContent, nsIAtom *aAttr,
|
||||
nsIArray **aRefElements)
|
||||
{
|
||||
*aRefElements = nsnull;
|
||||
|
||||
nsAutoString ids;
|
||||
if (!aContent->GetAttr(kNameSpaceID_None, aAttr, ids))
|
||||
return;
|
||||
|
||||
ids.CompressWhitespace(PR_TRUE, PR_TRUE);
|
||||
|
||||
nsCOMPtr<nsIDOMDocument> document = do_QueryInterface(aContent->GetOwnerDoc());
|
||||
NS_ASSERTION(document, "The given node is not in document!");
|
||||
if (!document)
|
||||
return;
|
||||
|
||||
nsCOMPtr<nsIDOMDocumentXBL> xblDocument;
|
||||
if (aContent->IsInAnonymousSubtree())
|
||||
xblDocument = do_QueryInterface(document);
|
||||
|
||||
nsCOMPtr<nsIMutableArray> refElms = do_CreateInstance(NS_ARRAY_CONTRACTID);
|
||||
|
||||
while (!ids.IsEmpty()) {
|
||||
nsAutoString id;
|
||||
PRInt32 idLength = ids.FindChar(' ');
|
||||
NS_ASSERTION(idLength != 0,
|
||||
"Should not be 0 because of CompressWhitespace() call above");
|
||||
|
||||
if (idLength == kNotFound) {
|
||||
id = ids;
|
||||
ids.Truncate();
|
||||
} else {
|
||||
id = Substring(ids, 0, idLength);
|
||||
ids.Cut(0, idLength + 1);
|
||||
}
|
||||
|
||||
// If content is anonymous subtree then use "anonid" attribute to get
|
||||
// elements, otherwise search elements in DOM by ID attribute.
|
||||
nsCOMPtr<nsIDOMElement> refElement;
|
||||
if (xblDocument) {
|
||||
nsCOMPtr<nsIDOMElement> elm =
|
||||
do_QueryInterface(aContent->GetBindingParent());
|
||||
xblDocument->GetAnonymousElementByAttribute(elm,
|
||||
NS_LITERAL_STRING("anonid"),
|
||||
id,
|
||||
getter_AddRefs(refElement));
|
||||
} else {
|
||||
document->GetElementById(id, getter_AddRefs(refElement));
|
||||
}
|
||||
|
||||
if (!refElement)
|
||||
continue;
|
||||
|
||||
refElms->AppendElement(refElement, PR_FALSE);
|
||||
}
|
||||
|
||||
NS_ADDREF(*aRefElements = refElms);
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
nsCoreUtils::GetElementsHavingIDRefsAttr(nsIContent *aRootContent,
|
||||
nsIContent *aContent,
|
||||
|
@ -1165,3 +1103,74 @@ nsAccessibleDOMStringList::Contains(const nsAString& aString, PRBool *aResult)
|
|||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// IDRefsIterator
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
IDRefsIterator::IDRefsIterator(nsIContent* aContent, nsIAtom* aIDRefsAttr) :
|
||||
mCurrIdx(0)
|
||||
{
|
||||
if (!aContent->IsInDoc() ||
|
||||
!aContent->GetAttr(kNameSpaceID_None, aIDRefsAttr, mIDs))
|
||||
return;
|
||||
|
||||
if (aContent->IsInAnonymousSubtree()) {
|
||||
mXBLDocument = do_QueryInterface(aContent->GetOwnerDoc());
|
||||
mBindingParent = do_QueryInterface(aContent->GetBindingParent());
|
||||
} else {
|
||||
mDocument = aContent->GetOwnerDoc();
|
||||
}
|
||||
}
|
||||
|
||||
const nsDependentSubstring
|
||||
IDRefsIterator::NextID()
|
||||
{
|
||||
for (; mCurrIdx < mIDs.Length(); mCurrIdx++) {
|
||||
if (!NS_IsAsciiWhitespace(mIDs[mCurrIdx]))
|
||||
break;
|
||||
}
|
||||
|
||||
if (mCurrIdx >= mIDs.Length())
|
||||
return nsDependentSubstring();
|
||||
|
||||
nsAString::index_type idStartIdx = mCurrIdx;
|
||||
while (++mCurrIdx < mIDs.Length()) {
|
||||
if (NS_IsAsciiWhitespace(mIDs[mCurrIdx]))
|
||||
break;
|
||||
}
|
||||
|
||||
return Substring(mIDs, idStartIdx, mCurrIdx++ - idStartIdx);
|
||||
}
|
||||
|
||||
nsIContent*
|
||||
IDRefsIterator::NextElem()
|
||||
{
|
||||
while (true) {
|
||||
const nsDependentSubstring id = NextID();
|
||||
if (id.IsEmpty())
|
||||
break;
|
||||
|
||||
if (mXBLDocument) {
|
||||
// If content is anonymous subtree then use "anonid" attribute to get
|
||||
// elements, otherwise search elements in DOM by ID attribute.
|
||||
|
||||
nsCOMPtr<nsIDOMElement> refElm;
|
||||
mXBLDocument->GetAnonymousElementByAttribute(mBindingParent,
|
||||
NS_LITERAL_STRING("anonid"),
|
||||
id,
|
||||
getter_AddRefs(refElm));
|
||||
nsCOMPtr<nsIContent> refContent = do_QueryInterface(refElm);
|
||||
if (refContent)
|
||||
return refContent;
|
||||
|
||||
} else {
|
||||
nsIContent* refContent = mDocument->GetElementById(id);
|
||||
if (refContent)
|
||||
return refContent;
|
||||
}
|
||||
}
|
||||
|
||||
return nsnull;
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
|
||||
#include "nsAccessibilityAtoms.h"
|
||||
|
||||
#include "nsIDOMDocumentXBL.h"
|
||||
#include "nsIDOMNode.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIBoxObject.h"
|
||||
|
@ -304,17 +305,6 @@ public:
|
|||
static void GetLanguageFor(nsIContent *aContent, nsIContent *aRootContent,
|
||||
nsAString& aLanguage);
|
||||
|
||||
/**
|
||||
* Return the array of elements the given node is referred to by its
|
||||
* IDRefs attribute.
|
||||
*
|
||||
* @param aContent [in] the given node
|
||||
* @param aAttr [in] IDRefs attribute on the given node
|
||||
* @param aRefElements [out] result array of elements
|
||||
*/
|
||||
static void GetElementsByIDRefsAttr(nsIContent *aContent, nsIAtom *aAttr,
|
||||
nsIArray **aRefElements);
|
||||
|
||||
/**
|
||||
* Return the array of elements having IDRefs that points to the given node.
|
||||
*
|
||||
|
@ -515,5 +505,34 @@ private:
|
|||
nsTArray<nsString> mNames;
|
||||
};
|
||||
|
||||
/**
|
||||
* Used to iterate through IDs or elements pointed by IDRefs attribute. Note,
|
||||
* any method used to iterate through IDs or elements moves iterator to next
|
||||
* position.
|
||||
*/
|
||||
class IDRefsIterator
|
||||
{
|
||||
public:
|
||||
IDRefsIterator(nsIContent* aContent, nsIAtom* aIDRefsAttr);
|
||||
|
||||
/**
|
||||
* Return next ID.
|
||||
*/
|
||||
const nsDependentSubstring NextID();
|
||||
|
||||
/**
|
||||
* Return next element.
|
||||
*/
|
||||
nsIContent* NextElem();
|
||||
|
||||
private:
|
||||
nsString mIDs;
|
||||
nsAString::index_type mCurrIdx;
|
||||
|
||||
nsIDocument* mDocument;
|
||||
nsCOMPtr<nsIDOMDocumentXBL> mXBLDocument;
|
||||
nsCOMPtr<nsIDOMElement> mBindingParent;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -599,31 +599,6 @@ nsDocAccessible::GetCachedAccessible(nsINode *aNode)
|
|||
return accessible;
|
||||
}
|
||||
|
||||
// nsDocAccessible public method
|
||||
PRBool
|
||||
nsDocAccessible::CacheAccessible(nsAccessible* aAccessible)
|
||||
{
|
||||
if (aAccessible->IsPrimaryForNode() &&
|
||||
!mNodeToAccessibleMap.Put(aAccessible->GetNode(), aAccessible))
|
||||
return PR_FALSE;
|
||||
|
||||
return mAccessibleCache.Put(aAccessible->UniqueID(), aAccessible);
|
||||
}
|
||||
|
||||
// nsDocAccessible public method
|
||||
void
|
||||
nsDocAccessible::ShutdownAccessible(nsAccessible *aAccessible)
|
||||
{
|
||||
// Remove an accessible from node to accessible map if it is presented there.
|
||||
if (aAccessible->IsPrimaryForNode() &&
|
||||
mNodeToAccessibleMap.Get(aAccessible->GetNode()) == aAccessible)
|
||||
mNodeToAccessibleMap.Remove(aAccessible->GetNode());
|
||||
|
||||
void* uniqueID = aAccessible->UniqueID();
|
||||
aAccessible->Shutdown();
|
||||
mAccessibleCache.Remove(uniqueID);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsAccessNode
|
||||
|
||||
|
@ -1049,8 +1024,21 @@ nsDocAccessible::AttributeChangedImpl(nsIContent* aContent, PRInt32 aNameSpaceID
|
|||
}
|
||||
}
|
||||
|
||||
if (aAttribute == nsAccessibilityAtoms::role ||
|
||||
aAttribute == nsAccessibilityAtoms::href ||
|
||||
if (aAttribute == nsAccessibilityAtoms::role) {
|
||||
if (mContent == aContent) {
|
||||
// It is common for js libraries to set the role of the body element after
|
||||
// the doc has loaded. In this case we just update the role map entry.
|
||||
SetRoleMapEntry(nsAccUtils::GetRoleMapEntry(aContent));
|
||||
}
|
||||
else {
|
||||
// Recreate the accessible when role is changed because we might require a
|
||||
// different accessible class for the new role or the accessible may
|
||||
// expose a different sets of interfaces (COM restriction).
|
||||
RecreateAccessible(aContent);
|
||||
}
|
||||
}
|
||||
|
||||
if (aAttribute == nsAccessibilityAtoms::href ||
|
||||
aAttribute == nsAccessibilityAtoms::onclick) {
|
||||
// Not worth the expense to ensure which namespace these are in
|
||||
// It doesn't kill use to recreate the accessible even if the attribute was used
|
||||
|
@ -1345,6 +1333,56 @@ nsDocAccessible::GetCachedAccessibleByUniqueIDInSubtree(void* aUniqueID)
|
|||
return nsnull;
|
||||
}
|
||||
|
||||
bool
|
||||
nsDocAccessible::BindToDocument(nsAccessible* aAccessible,
|
||||
nsRoleMapEntry* aRoleMapEntry)
|
||||
{
|
||||
if (!aAccessible)
|
||||
return false;
|
||||
|
||||
// Put into DOM node cache.
|
||||
if (aAccessible->IsPrimaryForNode() &&
|
||||
!mNodeToAccessibleMap.Put(aAccessible->GetNode(), aAccessible))
|
||||
return false;
|
||||
|
||||
// Put into unique ID cache.
|
||||
if (!mAccessibleCache.Put(aAccessible->UniqueID(), aAccessible)) {
|
||||
if (aAccessible->IsPrimaryForNode())
|
||||
mNodeToAccessibleMap.Remove(aAccessible->GetNode());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Initialize the accessible.
|
||||
if (!aAccessible->Init()) {
|
||||
NS_ERROR("Failed to initialize an accessible!");
|
||||
|
||||
UnbindFromDocument(aAccessible);
|
||||
return false;
|
||||
}
|
||||
|
||||
aAccessible->SetRoleMapEntry(aRoleMapEntry);
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
nsDocAccessible::UnbindFromDocument(nsAccessible* aAccessible)
|
||||
{
|
||||
// Remove an accessible from node-to-accessible map if it exists there.
|
||||
if (aAccessible->IsPrimaryForNode() &&
|
||||
mNodeToAccessibleMap.Get(aAccessible->GetNode()) == aAccessible)
|
||||
mNodeToAccessibleMap.Remove(aAccessible->GetNode());
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_ASSERTION(mAccessibleCache.GetWeak(aAccessible->UniqueID()),
|
||||
"Unbinding the unbound accessible!");
|
||||
#endif
|
||||
|
||||
void* uniqueID = aAccessible->UniqueID();
|
||||
aAccessible->Shutdown();
|
||||
mAccessibleCache.Remove(uniqueID);
|
||||
}
|
||||
|
||||
void
|
||||
nsDocAccessible::UpdateTree(nsIContent* aContainerNode,
|
||||
nsIContent* aStartNode,
|
||||
|
@ -1761,10 +1799,6 @@ nsDocAccessible::UncacheChildrenInSubtree(nsAccessible* aRoot)
|
|||
void
|
||||
nsDocAccessible::ShutdownChildrenInSubtree(nsAccessible* aAccessible)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
nsAccessible* incache = mAccessibleCache.GetWeak(aAccessible->UniqueID());
|
||||
#endif
|
||||
|
||||
// Traverse through children and shutdown them before this accessible. When
|
||||
// child gets shutdown then it removes itself from children array of its
|
||||
//parent. Use jdx index to process the cases if child is not attached to the
|
||||
|
@ -1780,6 +1814,6 @@ nsDocAccessible::ShutdownChildrenInSubtree(nsAccessible* aAccessible)
|
|||
ShutdownChildrenInSubtree(child);
|
||||
}
|
||||
|
||||
ShutdownAccessible(aAccessible);
|
||||
UnbindFromDocument(aAccessible);
|
||||
}
|
||||
|
||||
|
|
|
@ -211,18 +211,18 @@ public:
|
|||
nsAccessible* GetCachedAccessibleByUniqueIDInSubtree(void* aUniqueID);
|
||||
|
||||
/**
|
||||
* Cache the accessible.
|
||||
* Initialize the newly created accessible and put it into document caches.
|
||||
*
|
||||
* @param aAccessible [in] accessible to cache
|
||||
*
|
||||
* @return true if accessible being cached, otherwise false
|
||||
* @param aAccessible [in] created accessible
|
||||
* @param aRoleMapEntry [in] the role map entry role the ARIA role or nsnull
|
||||
* if none
|
||||
*/
|
||||
PRBool CacheAccessible(nsAccessible *aAccessible);
|
||||
bool BindToDocument(nsAccessible* aAccessible, nsRoleMapEntry* aRoleMapEntry);
|
||||
|
||||
/**
|
||||
* Shutdown the accessible and remove it from document cache.
|
||||
* Remove from document and shutdown the given accessible.
|
||||
*/
|
||||
void ShutdownAccessible(nsAccessible *aAccessible);
|
||||
void UnbindFromDocument(nsAccessible* aAccessible);
|
||||
|
||||
/**
|
||||
* Process the event when the queue of pending events is untwisted. Fire
|
||||
|
|
|
@ -134,27 +134,16 @@ nsRelUtils::AddTargetFromIDRefsAttr(PRUint32 aRelationType,
|
|||
nsIAccessibleRelation **aRelation,
|
||||
nsIContent *aContent, nsIAtom *aAttr)
|
||||
{
|
||||
nsCOMPtr<nsIArray> refElms;
|
||||
nsCoreUtils::GetElementsByIDRefsAttr(aContent, aAttr, getter_AddRefs(refElms));
|
||||
nsresult rv = NS_OK_NO_RELATION_TARGET;
|
||||
|
||||
if (!refElms)
|
||||
return NS_OK_NO_RELATION_TARGET;
|
||||
|
||||
PRUint32 count = 0;
|
||||
nsresult rv = refElms->GetLength(&count);
|
||||
if (NS_FAILED(rv) || count == 0)
|
||||
return NS_OK_NO_RELATION_TARGET;
|
||||
|
||||
nsCOMPtr<nsIContent> content;
|
||||
for (PRUint32 idx = 0; idx < count; idx++) {
|
||||
content = do_QueryElementAt(refElms, idx, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = AddTargetFromContent(aRelationType, aRelation, content);
|
||||
nsIContent* refElm = nsnull;
|
||||
IDRefsIterator iter(aContent, aAttr);
|
||||
while ((refElm = iter.NextElem())) {
|
||||
rv = AddTargetFromContent(aRelationType, aRelation, refElm);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
|
|
@ -92,26 +92,14 @@ nsTextEquivUtils::GetTextEquivFromIDRefs(nsAccessible *aAccessible,
|
|||
if (!content)
|
||||
return NS_OK;
|
||||
|
||||
nsCOMPtr<nsIArray> refElms;
|
||||
nsCoreUtils::GetElementsByIDRefsAttr(content, aIDRefsAttr,
|
||||
getter_AddRefs(refElms));
|
||||
|
||||
if (!refElms)
|
||||
return NS_OK;
|
||||
|
||||
PRUint32 count = 0;
|
||||
nsresult rv = refElms->GetLength(&count);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIContent> refContent;
|
||||
for (PRUint32 idx = 0; idx < count; idx++) {
|
||||
refContent = do_QueryElementAt(refElms, idx, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsIContent* refContent = nsnull;
|
||||
IDRefsIterator iter(content, aIDRefsAttr);
|
||||
while ((refContent = iter.NextElem())) {
|
||||
if (!aTextEquiv.IsEmpty())
|
||||
aTextEquiv += ' ';
|
||||
|
||||
rv = AppendTextEquivFromContent(aAccessible, refContent, &aTextEquiv);
|
||||
nsresult rv = AppendTextEquivFromContent(aAccessible, refContent,
|
||||
&aTextEquiv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
|
@ -237,11 +225,6 @@ nsresult
|
|||
nsTextEquivUtils::AppendFromAccessible(nsAccessible *aAccessible,
|
||||
nsAString *aString)
|
||||
{
|
||||
// Ignore hidden accessible for name computation.
|
||||
nsIFrame* frame = aAccessible->GetFrame();
|
||||
if (!frame || !frame->GetStyleVisibility()->IsVisible())
|
||||
return NS_OK;
|
||||
|
||||
//XXX: is it necessary to care the accessible is not a document?
|
||||
if (aAccessible->IsContent()) {
|
||||
nsresult rv = AppendTextEquivFromTextContent(aAccessible->GetContent(),
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "nsHTMLImageMapAccessible.h"
|
||||
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsDocAccessible.h"
|
||||
|
||||
#include "nsIDOMHTMLCollection.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
@ -114,6 +115,8 @@ nsHTMLImageMapAccessible::CacheChildren()
|
|||
if (!mapAreas)
|
||||
return;
|
||||
|
||||
nsDocAccessible* document = GetDocAccessible();
|
||||
|
||||
PRUint32 areaCount = 0;
|
||||
mapAreas->GetLength(&areaCount);
|
||||
|
||||
|
@ -124,21 +127,13 @@ nsHTMLImageMapAccessible::CacheChildren()
|
|||
return;
|
||||
|
||||
nsCOMPtr<nsIContent> areaContent(do_QueryInterface(areaNode));
|
||||
nsRefPtr<nsAccessible> areaAcc =
|
||||
nsRefPtr<nsAccessible> area =
|
||||
new nsHTMLAreaAccessible(areaContent, mWeakShell);
|
||||
if (!areaAcc)
|
||||
return;
|
||||
|
||||
if (!areaAcc->Init()) {
|
||||
areaAcc->Shutdown();
|
||||
if (!document->BindToDocument(area, nsAccUtils::GetRoleMapEntry(areaContent)) ||
|
||||
!AppendChild(area)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// We must respect ARIA on area elements (for the canvas map technique)
|
||||
areaAcc->SetRoleMapEntry(nsAccUtils::GetRoleMapEntry(areaContent));
|
||||
|
||||
if (!AppendChild(areaAcc))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -692,21 +692,17 @@ nsHTMLComboboxAccessible::CacheChildren()
|
|||
if (!mListAccessible) {
|
||||
mListAccessible =
|
||||
new nsHTMLComboboxListAccessible(mParent, mContent, mWeakShell);
|
||||
if (!mListAccessible)
|
||||
return;
|
||||
|
||||
// Initialize and put into cache.
|
||||
if (!mListAccessible->Init()) {
|
||||
mListAccessible->Shutdown();
|
||||
if (!GetDocAccessible()->BindToDocument(mListAccessible, nsnull))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
AppendChild(mListAccessible);
|
||||
|
||||
// Cache combobox option accessibles so that we build complete accessible tree
|
||||
// for combobox.
|
||||
mListAccessible->EnsureChildren();
|
||||
if (AppendChild(mListAccessible)) {
|
||||
// Cache combobox option accessibles so that we build complete accessible
|
||||
// tree for combobox.
|
||||
mListAccessible->EnsureChildren();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -308,34 +308,27 @@ nsHTMLTableCellAccessible::GetHeaderCells(PRInt32 aRowOrColumnHeaderCell,
|
|||
nsIArray **aHeaderCells)
|
||||
{
|
||||
// Get header cells from @header attribute.
|
||||
nsCOMPtr<nsIArray> headerCellElms;
|
||||
nsCoreUtils::GetElementsByIDRefsAttr(mContent, nsAccessibilityAtoms::headers,
|
||||
getter_AddRefs(headerCellElms));
|
||||
|
||||
if (headerCellElms) {
|
||||
IDRefsIterator iter(mContent, nsAccessibilityAtoms::headers);
|
||||
nsIContent* headerCellElm = iter.NextElem();
|
||||
if (headerCellElm) {
|
||||
nsresult rv = NS_OK;
|
||||
nsCOMPtr<nsIMutableArray> headerCells =
|
||||
do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRUint32 count = 0;
|
||||
rv = headerCellElms->GetLength(&count);
|
||||
if (NS_SUCCEEDED(rv) && count > 0) {
|
||||
nsCOMPtr<nsIContent> headerCellContent;
|
||||
for (PRUint32 idx = 0; idx < count; idx++) {
|
||||
headerCellContent = do_QueryElementAt(headerCellElms, idx, &rv);
|
||||
nsAccessible *headerCell =
|
||||
GetAccService()->GetAccessibleInWeakShell(headerCellContent, mWeakShell);
|
||||
do {
|
||||
nsAccessible* headerCell =
|
||||
GetAccService()->GetAccessibleInWeakShell(headerCellElm, mWeakShell);
|
||||
|
||||
if (headerCell &&
|
||||
(aRowOrColumnHeaderCell == nsAccUtils::eRowHeaderCells &&
|
||||
headerCell->Role() == nsIAccessibleRole::ROLE_ROWHEADER ||
|
||||
aRowOrColumnHeaderCell == nsAccUtils::eColumnHeaderCells &&
|
||||
headerCell->Role() == nsIAccessibleRole::ROLE_COLUMNHEADER))
|
||||
headerCells->AppendElement(static_cast<nsIAccessible*>(headerCell),
|
||||
PR_FALSE);
|
||||
if (headerCell &&
|
||||
(aRowOrColumnHeaderCell == nsAccUtils::eRowHeaderCells &&
|
||||
headerCell->Role() == nsIAccessibleRole::ROLE_ROWHEADER ||
|
||||
aRowOrColumnHeaderCell == nsAccUtils::eColumnHeaderCells &&
|
||||
headerCell->Role() == nsIAccessibleRole::ROLE_COLUMNHEADER)) {
|
||||
headerCells->AppendElement(static_cast<nsIAccessible*>(headerCell),
|
||||
PR_FALSE);
|
||||
}
|
||||
}
|
||||
} while ((headerCellElm = iter.NextElem()));
|
||||
|
||||
NS_ADDREF(*aHeaderCells = headerCells);
|
||||
return NS_OK;
|
||||
|
|
|
@ -259,8 +259,7 @@ nsHTMLLIAccessible::
|
|||
nsBlockFrame* blockFrame = do_QueryFrame(GetFrame());
|
||||
if (blockFrame && !blockFrame->BulletIsEmptyExternal()) {
|
||||
mBulletAccessible = new nsHTMLListBulletAccessible(mContent, mWeakShell);
|
||||
if (mBulletAccessible)
|
||||
mBulletAccessible->Init();
|
||||
GetDocAccessible()->BindToDocument(mBulletAccessible, nsnull);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -155,6 +155,9 @@ nsHyperTextAccessible::NativeRole()
|
|||
if (tag == nsAccessibilityAtoms::footer)
|
||||
return nsIAccessibleRole::ROLE_FOOTER;
|
||||
|
||||
if (tag == nsAccessibilityAtoms::aside)
|
||||
return nsIAccessibleRole::ROLE_NOTE;
|
||||
|
||||
// Treat block frames as paragraphs
|
||||
nsIFrame *frame = GetFrame();
|
||||
if (frame && frame->GetType() == nsAccessibilityAtoms::blockFrame &&
|
||||
|
@ -1221,6 +1224,9 @@ nsHyperTextAccessible::GetAttributesInternal(nsIPersistentProperties *aAttribute
|
|||
else if (mContent->Tag() == nsAccessibilityAtoms::article)
|
||||
nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::xmlroles,
|
||||
NS_LITERAL_STRING("main"));
|
||||
else if (mContent->Tag() == nsAccessibilityAtoms::aside)
|
||||
nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::xmlroles,
|
||||
NS_LITERAL_STRING("note"));
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -165,5 +165,6 @@ static const NSString* AXRoles [] = {
|
|||
NSAccessibilityUnknownRole, // ROLE_FLAT_EQUATION
|
||||
NSAccessibilityGroupRole, // ROLE_GRID_CELL
|
||||
NSAccessibilityGroupRole, // ROLE_EMBEDDED_OBJECT
|
||||
NSAccessibilityGroupRole, // ROLE_NOTE
|
||||
@"ROLE_LAST_ENTRY" // ROLE_LAST_ENTRY. bogus role that will never be shown (just marks the end of this array)!
|
||||
};
|
||||
|
|
|
@ -443,6 +443,9 @@ static const WindowsRoleMapItem gWindowsRoleMap[] = {
|
|||
// nsIAccessibleRole::ROLE_EMBEDDED_OBJECT
|
||||
{ USE_ROLE_STRING, IA2_ROLE_EMBEDDED_OBJECT },
|
||||
|
||||
// nsIAccessibleRole::ROLE_NOTE
|
||||
{ USE_ROLE_STRING, IA2_ROLE_NOTE },
|
||||
|
||||
// nsIAccessibleRole::ROLE_LAST_ENTRY
|
||||
{ ROLE_WINDOWS_LAST_ENTRY, ROLE_WINDOWS_LAST_ENTRY }
|
||||
};
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include "nsAccUtils.h"
|
||||
#include "nsAccTreeWalker.h"
|
||||
#include "nsCoreUtils.h"
|
||||
#include "nsDocAccessible.h"
|
||||
|
||||
#include "nsIDOMElement.h"
|
||||
|
||||
|
@ -171,5 +172,8 @@ nsXULColorPickerAccessible::CacheChildren()
|
|||
AppendChild(child);
|
||||
return;
|
||||
}
|
||||
|
||||
// Unbind rejected accessibles from the document.
|
||||
GetDocAccessible()->UnbindFromDocument(child);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "nsAccUtils.h"
|
||||
#include "nsAccTreeWalker.h"
|
||||
#include "nsCoreUtils.h"
|
||||
#include "nsDocAccessible.h"
|
||||
#include "nsRelUtils.h"
|
||||
|
||||
// NOTE: alphabetically ordered
|
||||
|
@ -222,6 +223,10 @@ nsXULButtonAccessible::CacheChildren()
|
|||
// for it. Ignore dropmarker button what is placed as a last child.
|
||||
buttonAccessible.swap(child);
|
||||
break;
|
||||
|
||||
} else {
|
||||
// Unbind rejected accessible from document.
|
||||
GetDocAccessible()->UnbindFromDocument(child);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -472,23 +472,21 @@ nsXULTreeAccessible::GetTreeItemAccessible(PRInt32 aRow)
|
|||
return nsnull;
|
||||
|
||||
void *key = reinterpret_cast<void*>(aRow);
|
||||
nsRefPtr<nsAccessible> accessible = mAccessibleCache.GetWeak(key);
|
||||
nsAccessible* cachedTreeItem = mAccessibleCache.GetWeak(key);
|
||||
if (cachedTreeItem)
|
||||
return cachedTreeItem;
|
||||
|
||||
if (!accessible) {
|
||||
accessible = CreateTreeItemAccessible(aRow);
|
||||
if (!accessible)
|
||||
return nsnull;
|
||||
nsRefPtr<nsAccessible> treeItem = CreateTreeItemAccessible(aRow);
|
||||
if (treeItem) {
|
||||
if (mAccessibleCache.Put(key, treeItem)) {
|
||||
if (GetDocAccessible()->BindToDocument(treeItem, nsnull))
|
||||
return treeItem;
|
||||
|
||||
if (!accessible->Init()) {
|
||||
accessible->Shutdown();
|
||||
return nsnull;
|
||||
mAccessibleCache.Remove(key);
|
||||
}
|
||||
|
||||
if (!mAccessibleCache.Put(key, accessible))
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
return accessible;
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -501,22 +499,21 @@ nsXULTreeAccessible::InvalidateCache(PRInt32 aRow, PRInt32 aCount)
|
|||
if (aCount > 0)
|
||||
return;
|
||||
|
||||
nsDocAccessible* document = GetDocAccessible();
|
||||
|
||||
// Fire destroy event for removed tree items and delete them from caches.
|
||||
for (PRInt32 rowIdx = aRow; rowIdx < aRow - aCount; rowIdx++) {
|
||||
|
||||
void* key = reinterpret_cast<void*>(rowIdx);
|
||||
nsAccessible *accessible = mAccessibleCache.GetWeak(key);
|
||||
nsAccessible* treeItem = mAccessibleCache.GetWeak(key);
|
||||
|
||||
if (accessible) {
|
||||
if (treeItem) {
|
||||
nsRefPtr<AccEvent> event =
|
||||
new AccEvent(nsIAccessibleEvent::EVENT_HIDE, accessible);
|
||||
new AccEvent(nsIAccessibleEvent::EVENT_HIDE, treeItem);
|
||||
nsEventShell::FireEvent(event);
|
||||
|
||||
// Shutdown and remove accessible from document cache and tree cache.
|
||||
nsDocAccessible *docAccessible = GetDocAccessible();
|
||||
if (docAccessible)
|
||||
docAccessible->ShutdownAccessible(accessible);
|
||||
|
||||
// Unbind from document, shutdown and remove from tree cache.
|
||||
document->UnbindFromDocument(treeItem);
|
||||
mAccessibleCache.Remove(key);
|
||||
}
|
||||
}
|
||||
|
@ -534,14 +531,11 @@ nsXULTreeAccessible::InvalidateCache(PRInt32 aRow, PRInt32 aCount)
|
|||
for (PRInt32 rowIdx = newRowCount; rowIdx < oldRowCount; ++rowIdx) {
|
||||
|
||||
void *key = reinterpret_cast<void*>(rowIdx);
|
||||
nsAccessible *accessible = mAccessibleCache.GetWeak(key);
|
||||
|
||||
if (accessible) {
|
||||
// Shutdown and remove accessible from document cache and tree cache.
|
||||
nsDocAccessible *docAccessible = GetDocAccessible();
|
||||
if (docAccessible)
|
||||
docAccessible->ShutdownAccessible(accessible);
|
||||
nsAccessible* treeItem = mAccessibleCache.GetWeak(key);
|
||||
|
||||
if (treeItem) {
|
||||
// Unbind from document, shutdown and remove from tree cache.
|
||||
document->UnbindFromDocument(treeItem);
|
||||
mAccessibleCache.Remove(key);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include "nsAccCache.h"
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsDocAccessible.h"
|
||||
#include "nsEventShell.h"
|
||||
|
||||
#include "nsITreeSelection.h"
|
||||
|
@ -729,25 +730,23 @@ nsXULTreeGridRowAccessible::GetCellAccessible(nsITreeColumn* aColumn)
|
|||
NS_PRECONDITION(aColumn, "No tree column!");
|
||||
|
||||
void* key = static_cast<void*>(aColumn);
|
||||
nsRefPtr<nsAccessible> accessible = mAccessibleCache.GetWeak(key);
|
||||
nsAccessible* cachedCell = mAccessibleCache.GetWeak(key);
|
||||
if (cachedCell)
|
||||
return cachedCell;
|
||||
|
||||
if (!accessible) {
|
||||
accessible =
|
||||
new nsXULTreeGridCellAccessibleWrap(mContent, mWeakShell, this, mTree,
|
||||
mTreeView, mRow, aColumn);
|
||||
if (!accessible)
|
||||
return nsnull;
|
||||
nsRefPtr<nsAccessible> cell =
|
||||
new nsXULTreeGridCellAccessibleWrap(mContent, mWeakShell, this, mTree,
|
||||
mTreeView, mRow, aColumn);
|
||||
if (cell) {
|
||||
if (mAccessibleCache.Put(key, cell)) {
|
||||
if (GetDocAccessible()->BindToDocument(cell, nsnull))
|
||||
return cell;
|
||||
|
||||
if (!accessible->Init()) {
|
||||
accessible->Shutdown();
|
||||
return nsnull;
|
||||
mAccessibleCache.Remove(key);
|
||||
}
|
||||
|
||||
if (!mAccessibleCache.Put(key, accessible))
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
return accessible;
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -51,6 +51,7 @@ DIRS = \
|
|||
selectable \
|
||||
states \
|
||||
table \
|
||||
text \
|
||||
tree \
|
||||
treeupdate \
|
||||
$(null)
|
||||
|
@ -121,6 +122,7 @@ _TEST_FILES =\
|
|||
test_value.html \
|
||||
test_value.xul \
|
||||
testTextboxes.js \
|
||||
text.js \
|
||||
treeview.css \
|
||||
treeview.js \
|
||||
$(NULL)
|
||||
|
|
|
@ -320,27 +320,41 @@ function testAccessibleTree(aAccOrElmOrID, aAccTree)
|
|||
if (!acc)
|
||||
return;
|
||||
|
||||
for (var prop in aAccTree) {
|
||||
var accTree = aAccTree;
|
||||
|
||||
// Support of simplified accessible tree object.
|
||||
var key = Object.keys(accTree)[0];
|
||||
var roleName = "ROLE_" + key;
|
||||
if (roleName in nsIAccessibleRole) {
|
||||
accTree = {
|
||||
role: nsIAccessibleRole[roleName],
|
||||
children: accTree[key]
|
||||
};
|
||||
}
|
||||
|
||||
// Test accessible properties.
|
||||
for (var prop in accTree) {
|
||||
var msg = "Wrong value of property '" + prop + "' for " + prettyName(acc) + ".";
|
||||
if (prop == "role") {
|
||||
is(roleToString(acc[prop]), roleToString(aAccTree[prop]), msg);
|
||||
is(roleToString(acc[prop]), roleToString(accTree[prop]), msg);
|
||||
|
||||
} else if (prop == "states") {
|
||||
var statesObj = aAccTree[prop];
|
||||
var statesObj = accTree[prop];
|
||||
testStates(acc, statesObj.states, statesObj.extraStates,
|
||||
statesObj.absentStates, statesObj.absentExtraStates);
|
||||
|
||||
} else if (prop != "children") {
|
||||
is(acc[prop], aAccTree[prop], msg);
|
||||
is(acc[prop], accTree[prop], msg);
|
||||
}
|
||||
}
|
||||
|
||||
if ("children" in aAccTree && aAccTree["children"] instanceof Array) {
|
||||
// Test children.
|
||||
if ("children" in accTree && accTree["children"] instanceof Array) {
|
||||
var children = acc.children;
|
||||
is(children.length, aAccTree.children.length,
|
||||
is(children.length, accTree.children.length,
|
||||
"Different amount of expected children of " + prettyName(acc) + ".");
|
||||
|
||||
if (aAccTree.children.length == children.length) {
|
||||
if (accTree.children.length == children.length) {
|
||||
var childCount = children.length;
|
||||
|
||||
// nsIAccessible::firstChild
|
||||
|
@ -390,7 +404,7 @@ function testAccessibleTree(aAccOrElmOrID, aAccTree)
|
|||
"Wrong previous sibling of " + prettyName(child));
|
||||
|
||||
// Go down through subtree
|
||||
testAccessibleTree(child, aAccTree.children[i]);
|
||||
testAccessibleTree(child, accTree.children[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -293,6 +293,13 @@
|
|||
gQueue.push(new changeStyle(id, "display", "none", kHideEvents));
|
||||
gQueue.push(new changeStyle(id, "display", "inline", kShowEvents));
|
||||
|
||||
// Show/hide events by changing of visibility style of accessible DOM node
|
||||
// from 'visible' to 'hidden', 'hidden' to 'visible'.
|
||||
var id = "link2";
|
||||
getAccessible(id);
|
||||
gQueue.push(new changeStyle(id, "visibility", "hidden", kHideEvents));
|
||||
gQueue.push(new changeStyle(id, "visibility", "visible", kShowEvents));
|
||||
|
||||
// Show/hide events by changing of display style of accessible DOM node
|
||||
// from 'inline' to 'block', 'block' to 'inline'.
|
||||
var id = "link3";
|
||||
|
@ -300,6 +307,12 @@
|
|||
gQueue.push(new changeStyle(id, "display", "block", kHideAndShowEvents));
|
||||
gQueue.push(new changeStyle(id, "display", "inline", kHideAndShowEvents));
|
||||
|
||||
// Show/hide events by changing of visibility style of accessible DOM node
|
||||
// from 'collapse' to 'visible', 'visible' to 'collapse'.
|
||||
var id = "link4";
|
||||
gQueue.push(new changeStyle(id, "visibility", "visible", kShowEvents));
|
||||
gQueue.push(new changeStyle(id, "visibility", "collapse", kHideEvents));
|
||||
|
||||
// Show/hide events by adding new accessible DOM node and removing old one.
|
||||
var id = "link5";
|
||||
gQueue.push(new cloneAndAppendToDOM(id));
|
||||
|
@ -343,6 +356,10 @@
|
|||
gQueue.push(new changeClass("container2", "link7", "displayNone",
|
||||
kHideEvents));
|
||||
|
||||
gQueue.push(new changeClass("container3", "link8", "", kShowEvents));
|
||||
gQueue.push(new changeClass("container3", "link8", "visibilityHidden",
|
||||
kHideEvents));
|
||||
|
||||
gQueue.invoke(); // Will call SimpleTest.finish();
|
||||
}
|
||||
|
||||
|
@ -367,6 +384,11 @@
|
|||
title="Rework accessible tree update code"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id=570275">
|
||||
Mozilla Bug 570275
|
||||
</a><br>
|
||||
<a target="_blank"
|
||||
title="Develop a way to handle visibility style"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id=606125">
|
||||
Mozilla Bug 606125
|
||||
</a>
|
||||
|
||||
<p id="display"></p>
|
||||
|
|
|
@ -37,6 +37,7 @@ const ROLE_LISTITEM = nsIAccessibleRole.ROLE_LISTITEM;
|
|||
const ROLE_MENUITEM = nsIAccessibleRole.ROLE_MENUITEM;
|
||||
const ROLE_MENUPOPUP = nsIAccessibleRole.ROLE_MENUPOPUP;
|
||||
const ROLE_NOTHING = nsIAccessibleRole.ROLE_NOTHING;
|
||||
const ROLE_NOTE = nsIAccessibleRole.ROLE_NOTE;
|
||||
const ROLE_OPTION = nsIAccessibleRole.ROLE_OPTION;
|
||||
const ROLE_OUTLINE = nsIAccessibleRole.ROLE_OUTLINE;
|
||||
const ROLE_OUTLINEITEM = nsIAccessibleRole.ROLE_OUTLINEITEM;
|
||||
|
|
|
@ -71,6 +71,12 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=529289
|
|||
testRole("scrollbar", ROLE_SCROLLBAR);
|
||||
testRole("dir", ROLE_LIST);
|
||||
|
||||
// test document role map update
|
||||
var testDoc = getAccessible(document, [nsIAccessibleDocument]);
|
||||
testRole(testDoc, ROLE_DOCUMENT);
|
||||
document.body.setAttribute("role", "application");
|
||||
testRole(testDoc, ROLE_APPLICATION);
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
|
@ -84,6 +90,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=529289
|
|||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=469688">Mozilla Bug 469688</a>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=469688">Mozilla Bug 520188</a>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=529289">Mozilla Bug 529289</a>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=529289">Mozilla Bug 607219</a>
|
||||
</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none"></div>
|
||||
|
|
|
@ -25,12 +25,14 @@
|
|||
testRole("header", ROLE_HEADER);
|
||||
testRole("footer", ROLE_FOOTER);
|
||||
testRole("article", ROLE_SECTION);
|
||||
testRole("aside", ROLE_NOTE);
|
||||
|
||||
// Some AT may look for this
|
||||
testAttrs("nav", {"xml-roles" : "navigation"}, true);
|
||||
testAttrs("header", {"xml-roles" : "banner"}, true);
|
||||
testAttrs("footer", {"xml-roles" : "contentinfo"}, true);
|
||||
testAttrs("article", {"xml-roles" : "main"}, true);
|
||||
testAttrs("aside", {"xml-roles" : "note"}, true);
|
||||
testAttrs("document", {"xml-roles" : "document"}, true); // ARIA override
|
||||
|
||||
// And some AT may look for this
|
||||
|
@ -38,6 +40,7 @@
|
|||
testAttrs("header", {"tag" : "HEADER"}, true);
|
||||
testAttrs("footer", {"tag" : "FOOTER"}, true);
|
||||
testAttrs("article", {"tag" : "ARTICLE"}, true);
|
||||
testAttrs("aside", {"tag" : "ASIDE"}, true);
|
||||
testAttrs("document", {"tag" : "ARTICLE"}, true); // no override expected
|
||||
|
||||
SimpleTest.finish();
|
||||
|
@ -61,6 +64,7 @@
|
|||
<header id="header">a header</header>
|
||||
<footer id="footer">a footer</footer>
|
||||
<article id="article">an article</article>
|
||||
<aside id="aside">by the way I am an aside</aside>
|
||||
|
||||
<article id="document" role="document">a document</article>
|
||||
|
||||
|
|
|
@ -0,0 +1,180 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Public
|
||||
|
||||
const BOUNDARY_CHAR = nsIAccessibleText.BOUNDARY_CHAR;
|
||||
const BOUNDARY_WORD_START = nsIAccessibleText.BOUNDARY_WORD_START;
|
||||
const BOUNDARY_WORD_END = nsIAccessibleText.BOUNDARY_WORD_END;
|
||||
const BOUNDARY_LINE_START = nsIAccessibleText.BOUNDARY_LINE_START;
|
||||
const BOUNDARY_LINE_END = nsIAccessibleText.BOUNDARY_LINE_END;
|
||||
const BOUNDARY_ATTRIBUTE_RANGE = nsIAccessibleText.BOUNDARY_ATTRIBUTE_RANGE;
|
||||
|
||||
const kTodo = 1;
|
||||
const kOk = 2;
|
||||
|
||||
function testText(aIDs, aStartOffset, aEndOffset, aText)
|
||||
{
|
||||
for (var i = 0; i < aIDs.length; i++)
|
||||
{
|
||||
var acc = getAccessible(aIDs[i], nsIAccessibleText);
|
||||
try {
|
||||
is(acc.getText(aStartOffset, aEndOffset), aText,
|
||||
"getText: wrong text between start and end offsets '" + aStartOffset +
|
||||
"', '" + aEndOffset + " for '" + prettyName(aIDs[i]) + "'");
|
||||
} catch (e) {
|
||||
ok(false,
|
||||
"getText fails between start and end offsets '" + aStartOffset +
|
||||
"', '" + aEndOffset + " for '" + prettyName(aIDs[i]) + "'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test getTextAtOffset function over different elements
|
||||
*
|
||||
* @param aOffset [in] the offset to get the text at
|
||||
* @param aBoundaryType [in] Boundary type for text to be retrieved
|
||||
* @param aText [in] expected return text for getTextAtOffset
|
||||
* @param aStartOffset [in] expected return start offset for getTextAtOffset
|
||||
* @param aEndOffset [in] expected return end offset for getTextAtOffset
|
||||
* @param ... [in] list of tuples made of:
|
||||
* element identifier
|
||||
* kTodo or kOk for returned text
|
||||
* kTodo or kOk for returned start offset
|
||||
* kTodo or kOk for returned offset result
|
||||
*
|
||||
*/
|
||||
function testTextAtOffset(aOffset, aBoundaryType, aText,
|
||||
aStartOffset, aEndOffset)
|
||||
{
|
||||
for (var i = 5; i < arguments.length; i = i + 4) {
|
||||
var ID = arguments[i];
|
||||
var acc = getAccessible(ID, nsIAccessibleText);
|
||||
var toDoFlag1 = arguments[i + 1];
|
||||
var toDoFlag2 = arguments[i + 2];
|
||||
var toDoFlag3 = arguments[i + 3];
|
||||
|
||||
testTextHelper(ID, aOffset, aBoundaryType,
|
||||
aText, aStartOffset, aEndOffset,
|
||||
toDoFlag1, toDoFlag2, toDoFlag3,
|
||||
acc.getTextAtOffset, "getTextAtOffset ");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test getTextAfterOffset function over different elements
|
||||
*
|
||||
* @param aOffset [in] the offset to get the text after
|
||||
* @param aBoundaryType [in] Boundary type for text to be retrieved
|
||||
* @param aText [in] expected return text for getTextAfterOffset
|
||||
* @param aStartOffset [in] expected return start offset for getTextAfterOffset
|
||||
* @param aEndOffset [in] expected return end offset for getTextAfterOffset
|
||||
* @param ... [in] list of tuples made of:
|
||||
* element identifier
|
||||
* kTodo or kOk for returned text
|
||||
* kTodo or kOk for returned start offset
|
||||
* kTodo or kOk for returned offset result
|
||||
*
|
||||
*/
|
||||
function testTextAfterOffset(aOffset, aBoundaryType,
|
||||
aText, aStartOffset, aEndOffset)
|
||||
{
|
||||
for (var i = 5; i < arguments.length; i = i + 4) {
|
||||
var ID = arguments[i];
|
||||
var acc = getAccessible(ID, nsIAccessibleText);
|
||||
var toDoFlag1 = arguments[i + 1];
|
||||
var toDoFlag2 = arguments[i + 2];
|
||||
var toDoFlag3 = arguments[i + 3];
|
||||
|
||||
testTextHelper(ID, aOffset, aBoundaryType,
|
||||
aText, aStartOffset, aEndOffset,
|
||||
toDoFlag1, toDoFlag2, toDoFlag3,
|
||||
acc.getTextAfterOffset, "getTextAfterOffset ");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test getTextBeforeOffset function over different elements
|
||||
*
|
||||
* @param aOffset [in] the offset to get the text before
|
||||
* @param aBoundaryType [in] Boundary type for text to be retrieved
|
||||
* @param aText [in] expected return text for getTextBeforeOffset
|
||||
* @param aStartOffset [in] expected return start offset for getTextBeforeOffset
|
||||
* @param aEndOffset [in] expected return end offset for getTextBeforeOffset
|
||||
* @param ... [in] list of tuples made of:
|
||||
* element identifier
|
||||
* kTodo or kOk for returned text
|
||||
* kTodo or kOk for returned start offset
|
||||
* kTodo or kOk for returned offset result
|
||||
*
|
||||
*/
|
||||
function testTextBeforeOffset(aOffset, aBoundaryType,
|
||||
aText, aStartOffset, aEndOffset)
|
||||
{
|
||||
for (var i = 5; i < arguments.length; i = i + 4) {
|
||||
var ID = arguments[i];
|
||||
var acc = getAccessible(ID, nsIAccessibleText);
|
||||
var toDoFlag1 = arguments[i + 1];
|
||||
var toDoFlag2 = arguments[i + 2];
|
||||
var toDoFlag3 = arguments[i + 3];
|
||||
|
||||
testTextHelper(ID, aOffset, aBoundaryType,
|
||||
aText, aStartOffset, aEndOffset,
|
||||
toDoFlag1, toDoFlag2, toDoFlag3,
|
||||
acc.getTextBeforeOffset, "getTextBeforeOffset ");
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Private
|
||||
|
||||
function testTextHelper(aID, aOffset, aBoundaryType,
|
||||
aText, aStartOffset, aEndOffset,
|
||||
aToDoFlag1, aToDoFlag2, aToDoFlag3,
|
||||
aTextFunc, aTextFuncName)
|
||||
{
|
||||
var exceptionFlag = aToDoFlag1 == undefined ||
|
||||
aToDoFlag2 == undefined ||
|
||||
aToDoFlag3 == undefined;
|
||||
try {
|
||||
var startOffsetObj = {}, endOffsetObj = {};
|
||||
var text = aTextFunc(aOffset, aBoundaryType,
|
||||
startOffsetObj, endOffsetObj);
|
||||
|
||||
var isFunc1 = (aToDoFlag1 == kTodo) ? todo_is : is;
|
||||
var isFunc2 = (aToDoFlag2 == kTodo) ? todo_is : is;
|
||||
var isFunc3 = (aToDoFlag3 == kTodo) ? todo_is : is;
|
||||
|
||||
var startMsg = aTextFuncName + "(" + boundaryToString(aBoundaryType) + "): ";
|
||||
|
||||
var endMsg = ", id: '" + prettyName(aID) + "';";
|
||||
|
||||
isFunc1(text, aText,
|
||||
startMsg + "wrong text, offset: " + aOffset + endMsg);
|
||||
isFunc2(startOffsetObj.value, aStartOffset,
|
||||
startMsg + "wrong start offset, offset: " + aOffset + endMsg);
|
||||
isFunc3(endOffsetObj.value, aEndOffset,
|
||||
startMsg + "wrong end offset, offset: " + aOffset + endMsg);
|
||||
|
||||
} catch (e) {
|
||||
var okFunc = exceptionFlag ? todo : ok;
|
||||
okFunc(false, startMsg + "failed at offset " + aOffset + endMsg);
|
||||
}
|
||||
}
|
||||
|
||||
function boundaryToString(aBoundaryType)
|
||||
{
|
||||
switch (aBoundaryType) {
|
||||
case BOUNDARY_CHAR:
|
||||
return "char";
|
||||
case BOUNDARY_WORD_START:
|
||||
return "word start";
|
||||
case BOUNDARY_WORD_END:
|
||||
return "word end";
|
||||
case BOUNDARY_LINE_START:
|
||||
return "line start";
|
||||
case BOUNDARY_LINE_END:
|
||||
return "line end";
|
||||
case BOUNDARY_ATTRIBUTE_RANGE:
|
||||
return "attr range";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Mozilla Foundation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2010
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Fernando Herrera <fherrera@onirica.com> (original author)
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
relativesrcdir = accessible/text
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
_TEST_FILES = \
|
||||
test_singleline.html \
|
||||
$(NULL)
|
||||
|
||||
libs:: $(_TEST_FILES)
|
||||
$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/a11y/$(relativesrcdir)
|
|
@ -0,0 +1,574 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>nsIAccessibleText getText related function tests for html:input,html:div and html:textarea</title>
|
||||
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
||||
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="../common.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="../text.js"></script>
|
||||
<script type="application/javascript">
|
||||
|
||||
function doTest()
|
||||
{
|
||||
var IDs = ["input", "div", "textarea"];
|
||||
|
||||
// __h__e__l__l__o__ __m__y__ __f__r__i__e__n__d__
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// getText
|
||||
|
||||
testText(IDs, 0, 1, "h");
|
||||
testText(IDs, 1, 3, "el");
|
||||
testText(IDs, 14, 15, "d");
|
||||
testText(IDs, 0, 15, "hello my friend");
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// getTextAfterOffset
|
||||
|
||||
// BOUNDARY_CHAR
|
||||
testTextAfterOffset(0, BOUNDARY_CHAR, "e", 1, 2,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
testTextAfterOffset(1, BOUNDARY_CHAR, "l", 2, 3,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
testTextAfterOffset(14, BOUNDARY_CHAR, "", 15, 15,
|
||||
"input", kTodo, kTodo, kOk,
|
||||
"div", kTodo, kTodo, kOk,
|
||||
"editable", kTodo, kTodo, kOk,
|
||||
"textarea", kTodo, kTodo, kOk);
|
||||
testTextAfterOffset(15, BOUNDARY_CHAR, "", 15, 15,
|
||||
"input", kOk, kTodo, kTodo,
|
||||
"div", kOk, kTodo, kTodo,
|
||||
"editable", kOk, kTodo, kTodo,
|
||||
"textarea", kTodo, kOk, kTodo);
|
||||
|
||||
// BOUNDARY_WORD_START
|
||||
testTextAfterOffset(0, BOUNDARY_WORD_START, "my ", 6, 9,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
testTextAfterOffset(1, BOUNDARY_WORD_START, "my ", 6, 9,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
testTextAfterOffset(5, BOUNDARY_WORD_START, "my ", 6, 9,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
testTextAfterOffset(6, BOUNDARY_WORD_START, "friend", 9, 15,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
testTextAfterOffset(7, BOUNDARY_WORD_START, "friend", 9, 15,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
testTextAfterOffset(8, BOUNDARY_WORD_START, "friend", 9, 15,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
testTextAfterOffset(9, BOUNDARY_WORD_START, "", 15, 15,
|
||||
"input", kTodo, kTodo, kOk,
|
||||
"div", kTodo, kTodo, kOk,
|
||||
"editable", kTodo, kTodo, kOk,
|
||||
"textarea", kTodo, kTodo, kOk);
|
||||
testTextAfterOffset(11, BOUNDARY_WORD_START, "", 15, 15,
|
||||
"input", kTodo, kTodo, kOk,
|
||||
"div", kTodo, kTodo, kOk,
|
||||
"editable", kTodo, kTodo, kOk,
|
||||
"textarea", kTodo, kTodo, kOk);
|
||||
testTextAfterOffset(14, BOUNDARY_WORD_START, "", 15, 15,
|
||||
"input", kTodo, kTodo, kOk,
|
||||
"div", kTodo, kTodo, kOk,
|
||||
"editable", kTodo, kTodo, kOk,
|
||||
"textarea", kTodo, kTodo, kOk);
|
||||
testTextAfterOffset(15, BOUNDARY_WORD_START, "", 15, 15,
|
||||
"input", kOk, kTodo, kTodo,
|
||||
"div", kOk, kTodo, kTodo,
|
||||
"editable", kOk, kTodo, kTodo,
|
||||
"textarea", kTodo, kOk, kTodo);
|
||||
|
||||
// BOUNDARY_WORD_END
|
||||
testTextAfterOffset(0, BOUNDARY_WORD_END, " my", 5, 8,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
testTextAfterOffset(1, BOUNDARY_WORD_END, " my", 5, 8,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
testTextAfterOffset(5, BOUNDARY_WORD_END, " my", 5, 8,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kOk, kOk, kOk);
|
||||
testTextAfterOffset(6, BOUNDARY_WORD_END, " friend", 8, 15,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
testTextAfterOffset(7, BOUNDARY_WORD_END, " friend", 8, 15,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
testTextAfterOffset(8, BOUNDARY_WORD_END, " friend", 8, 15,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kOk, kOk, kOk);
|
||||
testTextAfterOffset(9, BOUNDARY_WORD_END, "", 15, 15,
|
||||
"input", kTodo, kTodo, kOk,
|
||||
"div", kTodo, kTodo, kOk,
|
||||
"editable", kTodo, kTodo, kOk,
|
||||
"textarea", kTodo, kTodo, kOk);
|
||||
testTextAfterOffset(11, BOUNDARY_WORD_END, "", 15, 15,
|
||||
"input", kTodo, kTodo, kOk,
|
||||
"div", kTodo, kTodo, kOk,
|
||||
"editable", kTodo, kTodo, kOk,
|
||||
"textarea", kTodo, kTodo, kOk);
|
||||
testTextAfterOffset(14, BOUNDARY_WORD_END, "", 15, 15,
|
||||
"input", kTodo, kTodo, kOk,
|
||||
"div", kTodo, kTodo, kOk,
|
||||
"editable", kTodo, kTodo, kOk,
|
||||
"textarea", kTodo, kTodo, kOk);
|
||||
testTextAfterOffset(15, BOUNDARY_WORD_END, "", 15, 15,
|
||||
"input", kOk, kTodo, kTodo,
|
||||
"div", kOk, kTodo, kTodo,
|
||||
"editable", kOk, kTodo, kTodo,
|
||||
"textarea", kTodo, kOk, kTodo);
|
||||
|
||||
// BOUNDARY_LINE_START
|
||||
testTextAfterOffset(0, BOUNDARY_LINE_START, "", 15, 15,
|
||||
"input", kTodo, kTodo, kOk,
|
||||
"div", kTodo, kTodo, kOk,
|
||||
"editable", kTodo, kTodo, kOk,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
testTextAfterOffset(1, BOUNDARY_LINE_START, "", 15, 15,
|
||||
"input", kTodo, kTodo, kOk,
|
||||
"div", kTodo, kTodo, kOk,
|
||||
"editable", kTodo, kTodo, kOk,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
testTextAfterOffset(14, BOUNDARY_LINE_START, "", 15, 15,
|
||||
"input", kTodo, kTodo, kOk,
|
||||
"div", kTodo, kTodo, kOk,
|
||||
"editable", kTodo, kTodo, kOk,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
testTextAfterOffset(15, BOUNDARY_LINE_START, "", 15, 15,
|
||||
"input", undefined, undefined, undefined,
|
||||
"div", undefined, undefined, undefined,
|
||||
"editable", undefined, undefined, undefined,
|
||||
"textarea", kTodo, undefined, kTodo);
|
||||
|
||||
// BOUNDARY_LINE_END
|
||||
testTextAfterOffset(0, BOUNDARY_LINE_END, "", 15, 15,
|
||||
"input", kTodo, kTodo, kOk,
|
||||
"div", kTodo, kTodo, kOk,
|
||||
"editable", kTodo, kTodo, kOk,
|
||||
"textarea", kTodo, kTodo, kOk);
|
||||
testTextAfterOffset(1, BOUNDARY_LINE_END, "", 15, 15,
|
||||
"input", kTodo, kTodo, kOk,
|
||||
"div", kTodo, kTodo, kOk,
|
||||
"editable", kTodo, kTodo, kOk,
|
||||
"textarea", kTodo, kTodo, kOk);
|
||||
testTextAfterOffset(14, BOUNDARY_LINE_END, "", 15, 15,
|
||||
"input", kOk, kTodo, kTodo,
|
||||
"div", kOk, kTodo, kTodo,
|
||||
"editable", kOk, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kOk);
|
||||
testTextAfterOffset(15, BOUNDARY_LINE_END, "", 15, 15,
|
||||
"input", kOk, kTodo, kTodo,
|
||||
"div", kOk, kTodo, kTodo,
|
||||
"editable", kOk, kTodo, kTodo,
|
||||
"textarea", kOk, kTodo, kTodo);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// getTextBeforeOffset
|
||||
|
||||
// BOUNDARY_CHAR
|
||||
testTextBeforeOffset(0, BOUNDARY_CHAR, "", 0, 0,
|
||||
"input", kTodo, kOk, kTodo,
|
||||
"div", kTodo, kOk, kTodo,
|
||||
"editable", kTodo, kOk, kTodo,
|
||||
"textarea", kTodo, kOk, kTodo);
|
||||
testTextBeforeOffset(1, BOUNDARY_CHAR, "h", 0, 1,
|
||||
"input", kTodo, kOk, kTodo,
|
||||
"div", kTodo, kOk, kTodo,
|
||||
"editable", kTodo, kOk, kTodo,
|
||||
"textarea", kTodo, kOk, kTodo);
|
||||
testTextBeforeOffset(14, BOUNDARY_CHAR, "n", 13, 14,
|
||||
"input", kTodo, kOk, kTodo,
|
||||
"div", kTodo, kOk, kTodo,
|
||||
"editable", kTodo, kOk, kTodo,
|
||||
"textarea", kTodo, kOk, kTodo);
|
||||
testTextBeforeOffset(15, BOUNDARY_CHAR, "d", 14, 15,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kOk, kTodo);
|
||||
|
||||
// BOUNDARY_WORD_START
|
||||
testTextBeforeOffset(0, BOUNDARY_WORD_START, "", 0, 0,
|
||||
"input", kTodo, kOk, kTodo,
|
||||
"div", kTodo, kOk, kTodo,
|
||||
"editable", kTodo, kOk, kTodo,
|
||||
"textarea", kTodo, kOk, kTodo);
|
||||
testTextBeforeOffset(1, BOUNDARY_WORD_START, "", 0, 0,
|
||||
"input", kTodo, kOk, kTodo,
|
||||
"div", kTodo, kOk, kTodo,
|
||||
"editable", kTodo, kOk, kTodo,
|
||||
"textarea", kTodo, kOk, kTodo);
|
||||
testTextBeforeOffset(5, BOUNDARY_WORD_START, "", 0, 0,
|
||||
"input", kTodo, kOk, kTodo,
|
||||
"div", kTodo, kOk, kTodo,
|
||||
"editable", kTodo, kOk, kTodo,
|
||||
"textarea", kTodo, kOk, kTodo);
|
||||
testTextBeforeOffset(6, BOUNDARY_WORD_START, "hello ", 0, 6,
|
||||
"input", kTodo, kOk, kTodo,
|
||||
"div", kTodo, kOk, kTodo,
|
||||
"editable", kTodo, kOk, kTodo,
|
||||
"textarea", kTodo, kOk, kTodo);
|
||||
testTextBeforeOffset(7, BOUNDARY_WORD_START, "hello ", 0, 6,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
testTextBeforeOffset(8, BOUNDARY_WORD_START, "hello ", 0, 6,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
testTextBeforeOffset(9, BOUNDARY_WORD_START, "my ", 6, 9,
|
||||
"input", kTodo, kOk, kTodo,
|
||||
"div", kTodo, kOk, kTodo,
|
||||
"editable", kTodo, kOk, kTodo,
|
||||
"textarea", kTodo, kOk, kTodo);
|
||||
testTextBeforeOffset(10, BOUNDARY_WORD_START, "my ", 6, 9,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
testTextBeforeOffset(14, BOUNDARY_WORD_START, "my ", 6, 9,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
testTextBeforeOffset(15, BOUNDARY_WORD_START, "my ", 6, 9,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
|
||||
// BOUNDARY_WORD_END
|
||||
testTextBeforeOffset(0, BOUNDARY_WORD_END, "", 0, 0,
|
||||
"input", kTodo, kOk, kTodo,
|
||||
"div", kTodo, kOk, kTodo,
|
||||
"editable", kTodo, kOk, kTodo,
|
||||
"textarea", kTodo, kOk, kTodo);
|
||||
testTextBeforeOffset(1, BOUNDARY_WORD_END, "", 0, 0,
|
||||
"input", kTodo, kOk, kTodo,
|
||||
"div", kTodo, kOk, kTodo,
|
||||
"editable", kTodo, kOk, kTodo,
|
||||
"textarea", kTodo, kOk, kTodo);
|
||||
testTextBeforeOffset(5, BOUNDARY_WORD_END, "", 0, 0,
|
||||
"input", kTodo, kOk, kTodo,
|
||||
"div", kTodo, kOk, kTodo,
|
||||
"editable", kTodo, kOk, kTodo,
|
||||
"textarea", kTodo, kOk, kTodo);
|
||||
testTextBeforeOffset(6, BOUNDARY_WORD_END, "hello ", 0, 6,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
testTextBeforeOffset(7, BOUNDARY_WORD_END, "hello ", 0, 6,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
testTextBeforeOffset(8, BOUNDARY_WORD_END, "hello ", 0, 6,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
testTextBeforeOffset(9, BOUNDARY_WORD_END, " my", 5, 8,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
testTextBeforeOffset(10, BOUNDARY_WORD_END, " my", 5, 8,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
testTextBeforeOffset(14, BOUNDARY_WORD_END, " my", 5, 8,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
testTextBeforeOffset(15, BOUNDARY_WORD_END, " my", 5, 8,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
|
||||
// BOUNDARY_LINE_START
|
||||
testTextBeforeOffset(0, BOUNDARY_LINE_START, "", 0, 0,
|
||||
"input", kTodo, kOk, kTodo,
|
||||
"div", kTodo, kOk, kTodo,
|
||||
"editable", kTodo, kOk, kTodo,
|
||||
"textarea", kTodo, kOk, kTodo);
|
||||
testTextBeforeOffset(1, BOUNDARY_LINE_START, "", 0, 0,
|
||||
"input", kTodo, kOk, kTodo,
|
||||
"div", kTodo, kOk, kTodo,
|
||||
"editable", kTodo, kOk, kTodo,
|
||||
"textarea", kTodo, kOk, kTodo);
|
||||
testTextBeforeOffset(14, BOUNDARY_LINE_START, "", 0, 0,
|
||||
"input", kTodo, kOk, kTodo,
|
||||
"div", kTodo, kOk, kTodo,
|
||||
"editable", kTodo, kOk, kTodo,
|
||||
"textarea", kTodo, kOk, kTodo);
|
||||
testTextBeforeOffset(15, BOUNDARY_LINE_START, "", 0, 0,
|
||||
"input", kTodo, kOk, kTodo,
|
||||
"div", kTodo, kOk, kTodo,
|
||||
"editable", kTodo, kOk, kTodo,
|
||||
"textarea", kTodo, kOk, kTodo);
|
||||
|
||||
// BOUNDARY_LINE_END
|
||||
testTextBeforeOffset(0, BOUNDARY_LINE_END, "", 0, 0,
|
||||
"input", kTodo, kOk, kTodo,
|
||||
"div", kTodo, kOk, kTodo,
|
||||
"editable", kTodo, kOk, kTodo,
|
||||
"textarea", kTodo, kOk, kTodo);
|
||||
testTextBeforeOffset(1, BOUNDARY_LINE_END, "", 0, 0,
|
||||
"input", kTodo, kOk, kTodo,
|
||||
"div", kTodo, kOk, kTodo,
|
||||
"editable", kTodo, kOk, kTodo,
|
||||
"textarea", kTodo, kOk, kTodo);
|
||||
testTextBeforeOffset(14, BOUNDARY_LINE_END, "", 0, 0,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kTodo, kOk, kTodo);
|
||||
testTextBeforeOffset(15, BOUNDARY_LINE_END, "", 0, 0,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kOk, kOk, kOk);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// getTextAtOffset
|
||||
|
||||
// BOUNDARY_CHAR
|
||||
testTextAtOffset(0, BOUNDARY_CHAR, "h", 0, 1,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kOk, kOk, kOk);
|
||||
testTextAtOffset(1, BOUNDARY_CHAR, "e", 1, 2,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kOk, kOk, kOk);
|
||||
testTextAtOffset(14, BOUNDARY_CHAR, "d", 14, 15,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kOk, kOk, kOk);
|
||||
testTextAtOffset(15, BOUNDARY_CHAR, "", 15, 15,
|
||||
"input", kOk, kTodo, kTodo,
|
||||
"div", kOk, kTodo, kTodo,
|
||||
"editable", kOk, kTodo, kTodo,
|
||||
"textarea", kTodo, kOk, kTodo);
|
||||
|
||||
// BOUNDARY_WORD_START
|
||||
testTextAtOffset(0, BOUNDARY_WORD_START, "hello ", 0, 6,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kOk, kOk, kOk);
|
||||
testTextAtOffset(1, BOUNDARY_WORD_START, "hello ", 0, 6,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kOk, kOk, kOk);
|
||||
testTextAtOffset(5, BOUNDARY_WORD_START, "hello ", 0, 6,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kOk, kOk, kOk);
|
||||
testTextAtOffset(6, BOUNDARY_WORD_START, "my ", 6, 9,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kOk, kOk, kOk);
|
||||
testTextAtOffset(7, BOUNDARY_WORD_START, "my ", 6, 9,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kOk, kOk, kOk);
|
||||
testTextAtOffset(8, BOUNDARY_WORD_START, "my ", 6, 9,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kOk, kOk, kOk);
|
||||
testTextAtOffset(9, BOUNDARY_WORD_START, "friend", 9, 15,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kOk, kOk, kOk);
|
||||
testTextAtOffset(10, BOUNDARY_WORD_START, "friend", 9, 15,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kOk, kOk, kOk);
|
||||
testTextAtOffset(14, BOUNDARY_WORD_START, "friend", 9, 15,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kOk, kOk, kOk);
|
||||
testTextAtOffset(15, BOUNDARY_WORD_START, "friend", 9, 15,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
|
||||
// BOUNDARY_WORD_END
|
||||
testTextAtOffset(0, BOUNDARY_WORD_END, "hello", 0, 5,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kOk, kOk, kOk);
|
||||
testTextAtOffset(1, BOUNDARY_WORD_END, "hello", 0, 5,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kOk, kOk, kOk);
|
||||
testTextAtOffset(5, BOUNDARY_WORD_END, "hello", 0, 5,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
testTextAtOffset(6, BOUNDARY_WORD_END, " my", 5, 8,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kOk, kOk, kOk);
|
||||
testTextAtOffset(7, BOUNDARY_WORD_END, " my", 5, 8,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kOk, kOk, kOk);
|
||||
testTextAtOffset(8, BOUNDARY_WORD_END, " my", 5, 8,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
testTextAtOffset(9, BOUNDARY_WORD_END, " friend", 8, 15,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kOk, kOk, kOk);
|
||||
testTextAtOffset(10, BOUNDARY_WORD_END, " friend", 8, 15,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kOk, kOk, kOk);
|
||||
testTextAtOffset(14, BOUNDARY_WORD_END, " friend", 8, 15,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kOk, kOk, kOk);
|
||||
testTextAtOffset(15, BOUNDARY_WORD_END, " friend", 8, 15,
|
||||
"input", kTodo, kTodo, kTodo,
|
||||
"div", kTodo, kTodo, kTodo,
|
||||
"editable", kTodo, kTodo, kTodo,
|
||||
"textarea", kTodo, kTodo, kTodo);
|
||||
|
||||
// BOUNDARY_LINE_START
|
||||
testTextAtOffset(0, BOUNDARY_LINE_START, "hello my friend", 0, 15,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kTodo, kOk, kTodo);
|
||||
testTextAtOffset(1, BOUNDARY_LINE_START, "hello my friend", 0, 15,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kTodo, kOk, kTodo);
|
||||
testTextAtOffset(14, BOUNDARY_LINE_START, "hello my friend", 0, 15,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kTodo, kOk, kTodo);
|
||||
testTextAtOffset(15, BOUNDARY_LINE_START, "hello my friend", 0, 15,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kTodo, kOk, kTodo);
|
||||
|
||||
// BOUNDARY_LINE_END
|
||||
testTextAtOffset(0, BOUNDARY_LINE_END, "hello my friend", 0, 15,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kOk, kOk, kOk);
|
||||
testTextAtOffset(1, BOUNDARY_LINE_END, "hello my friend", 0, 15,
|
||||
"input", kOk, kOk, kOk,
|
||||
"div", kOk, kOk, kOk,
|
||||
"editable", kOk, kOk, kOk,
|
||||
"textarea", kOk, kOk, kOk);
|
||||
testTextAtOffset(14, BOUNDARY_LINE_END, "hello my friend", 0, 15,
|
||||
"input", kTodo, kOk, kTodo,
|
||||
"div", kTodo, kOk, kTodo,
|
||||
"editable", kTodo, kOk, kTodo,
|
||||
"textarea", kOk, kOk, kOk);
|
||||
testTextAtOffset(15, BOUNDARY_LINE_END, "hello my friend", 0, 15,
|
||||
"input", kTodo, kOk, kTodo,
|
||||
"div", kTodo, kOk, kTodo,
|
||||
"editable", kTodo, kOk, kTodo,
|
||||
"textarea", kTodo, kOk, kTodo);
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a target="_blank"
|
||||
title="nsIAccessibleText getText related function tests for html:input,html:div and html:textarea"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id=452769">Mozilla Bug 452769</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none"></div>
|
||||
<pre id="test">
|
||||
</pre>
|
||||
|
||||
<input id="input" value="hello my friend"/>
|
||||
<div id="div">hello my friend</div>
|
||||
<div id="editable" contenteditable="true">hello my friend</div>
|
||||
<textarea id="textarea">hello my friend</textarea>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -70,9 +70,6 @@
|
|||
var tabsAccTree = {
|
||||
role: ROLE_PAGETABLIST,
|
||||
children: [
|
||||
{
|
||||
role: ROLE_PUSHBUTTON // tab scroll up button
|
||||
},
|
||||
{
|
||||
role: ROLE_PAGETAB,
|
||||
children: [
|
||||
|
@ -91,9 +88,6 @@
|
|||
},
|
||||
{
|
||||
role: ROLE_PUSHBUTTON
|
||||
},
|
||||
{
|
||||
role: ROLE_PUSHBUTTON // tab scroll down button
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
@ -46,11 +46,13 @@ include $(DEPTH)/config/autoconf.mk
|
|||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
_TEST_FILES =\
|
||||
test_ariadialog.html \
|
||||
test_doc.html \
|
||||
test_list_editabledoc.html \
|
||||
test_list.html \
|
||||
test_recreation.html \
|
||||
test_tableinsubtree.html \
|
||||
test_textleaf.html \
|
||||
test_visibility.html \
|
||||
$(NULL)
|
||||
|
||||
libs:: $(_TEST_FILES)
|
||||
|
|
|
@ -34,9 +34,10 @@
|
|||
|
||||
this.invoke = function showARIADialog_invoke()
|
||||
{
|
||||
this.node.style.display = "block";
|
||||
getNode("dialog").style.display = "block";
|
||||
getNode("table").style.visibility = "visible";
|
||||
getNode("a").textContent = "link";
|
||||
getNode("input").value = "hello";
|
||||
getNode("cell").textContent = "cell1";
|
||||
getNode("input").focus();
|
||||
}
|
||||
|
||||
|
@ -46,22 +47,11 @@
|
|||
role: ROLE_DIALOG,
|
||||
children: [
|
||||
{
|
||||
role: ROLE_TABLE,
|
||||
children: [
|
||||
{
|
||||
role: ROLE_ROW,
|
||||
children: [
|
||||
{
|
||||
role: ROLE_CELL,
|
||||
children: [ { role: ROLE_TEXT_LEAF } ]
|
||||
},
|
||||
{
|
||||
role: ROLE_CELL,
|
||||
children: [ { role: ROLE_ENTRY } ]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
role: ROLE_PUSHBUTTON,
|
||||
children: [ { role: ROLE_TEXT_LEAF } ]
|
||||
},
|
||||
{
|
||||
role: ROLE_ENTRY
|
||||
}
|
||||
]
|
||||
};
|
||||
|
@ -110,8 +100,18 @@
|
|||
</pre>
|
||||
|
||||
<div id="dialog" role="dialog" style="display: none;">
|
||||
<table>
|
||||
<tr><td id="cell"></td><td><input id="input"></td>
|
||||
<table id="table" role="presentation"
|
||||
style="display: block; position: fixed; top: 88px; left: 312.5px; z-index: 10010; visibility: hidden;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td role="presentation">
|
||||
<div role="presentation">
|
||||
<a id="a" role="button">text</a>
|
||||
</div>
|
||||
<input id="input">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,138 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Test accessible recreation</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
||||
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
|
||||
<script type="application/javascript"
|
||||
src="../common.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="../role.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="../events.js"></script>
|
||||
|
||||
<script type="application/javascript">
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Invokers
|
||||
|
||||
function textLeafUpdate(aID, aIsTextLeafLinkable)
|
||||
{
|
||||
this.node = getNode(aID);
|
||||
|
||||
this.eventSeq = [
|
||||
new invokerChecker(EVENT_REORDER, this.node.parentNode)
|
||||
];
|
||||
|
||||
this.finalCheck = function textLeafUpdate_finalCheck()
|
||||
{
|
||||
var textLeaf = getAccessible(this.node).firstChild;
|
||||
is(textLeaf.numActions, (aIsTextLeafLinkable ? 1 : 0),
|
||||
"Wrong action numbers!");
|
||||
}
|
||||
}
|
||||
|
||||
function setOnClickAttr(aID)
|
||||
{
|
||||
this.__proto__ = new textLeafUpdate(aID, true);
|
||||
|
||||
this.invoke = function setOnClickAttr_invoke()
|
||||
{
|
||||
this.node.setAttribute("onclick", "alert(3);");
|
||||
}
|
||||
|
||||
this.getID = function setOnClickAttr_getID()
|
||||
{
|
||||
return "make " + prettyName(aID) + " linkable";
|
||||
}
|
||||
}
|
||||
|
||||
function removeOnClickAttr(aID)
|
||||
{
|
||||
this.__proto__ = new textLeafUpdate(aID, false);
|
||||
|
||||
this.invoke = function removeOnClickAttr_invoke()
|
||||
{
|
||||
this.node.removeAttribute("onclick");
|
||||
}
|
||||
|
||||
this.getID = function removeOnClickAttr_getID()
|
||||
{
|
||||
return "unmake " + prettyName(aID) + " linkable";
|
||||
}
|
||||
}
|
||||
|
||||
function setOnClickNRoleAttrs(aID)
|
||||
{
|
||||
this.__proto__ = new textLeafUpdate(aID, true);
|
||||
|
||||
this.invoke = function setOnClickAttr_invoke()
|
||||
{
|
||||
this.node.setAttribute("role", "link");
|
||||
this.node.setAttribute("onclick", "alert(3);");
|
||||
}
|
||||
|
||||
this.getID = function setOnClickAttr_getID()
|
||||
{
|
||||
return "make " + prettyName(aID) + " linkable";
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Test
|
||||
|
||||
//gA11yEventDumpID = "eventdump"; // debug stuff
|
||||
//gA11yEventDumpToConsole = true;
|
||||
|
||||
var gQueue = null;
|
||||
|
||||
function doTest()
|
||||
{
|
||||
gQueue = new eventQueue();
|
||||
|
||||
// adds onclick on element, text leaf should inherit its action
|
||||
gQueue.push(new setOnClickAttr("div"));
|
||||
|
||||
// remove onclick attribute, text leaf shouldn't have any action
|
||||
gQueue.push(new removeOnClickAttr("div"));
|
||||
|
||||
// set onclick attribute making span accessible, it's inserted into tree
|
||||
// and adopts text leaf accessible, text leaf should have an action
|
||||
gQueue.push(new setOnClickNRoleAttrs("span"));
|
||||
|
||||
gQueue.invoke(); // SimpleTest.finish() will be called in the end
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a target="_blank"
|
||||
title="Clean up the code of accessible initialization and binding to the tree"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id=545465">
|
||||
Mozilla Bug 545465
|
||||
</a>
|
||||
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none"></div>
|
||||
<pre id="test">
|
||||
</pre>
|
||||
|
||||
<div id="container">
|
||||
<div id="div">div</div>
|
||||
<span id="span">span</span>
|
||||
</div>
|
||||
|
||||
<div id="eventdump"></div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,439 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Style visibility tree update test</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
||||
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
|
||||
<script type="application/javascript"
|
||||
src="../common.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="../role.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="../events.js"></script>
|
||||
|
||||
<script type="application/javascript">
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Invokers
|
||||
|
||||
/**
|
||||
* Hide parent while child stays visible.
|
||||
*/
|
||||
function test1(aContainerID, aParentID, aChildID)
|
||||
{
|
||||
this.eventSeq = [
|
||||
new invokerChecker(EVENT_HIDE, getNode(aParentID)),
|
||||
new invokerChecker(EVENT_SHOW, getNode(aChildID)),
|
||||
new invokerChecker(EVENT_REORDER, getNode(aContainerID))
|
||||
];
|
||||
|
||||
this.invoke = function invoke()
|
||||
{
|
||||
var tree =
|
||||
{ SECTION: [
|
||||
{ SECTION: [
|
||||
{ SECTION: [
|
||||
{ TEXT_LEAF: [] }
|
||||
] }
|
||||
] }
|
||||
] };
|
||||
testAccessibleTree(aContainerID, tree);
|
||||
|
||||
getNode(aParentID).style.visibility = "hidden";
|
||||
}
|
||||
|
||||
this.finalCheck = function finalCheck()
|
||||
{
|
||||
var tree =
|
||||
{ SECTION: [
|
||||
{ SECTION: [
|
||||
{ TEXT_LEAF: [] }
|
||||
] }
|
||||
] };
|
||||
testAccessibleTree(aContainerID, tree);
|
||||
}
|
||||
|
||||
this.getID = function getID()
|
||||
{
|
||||
return "hide parent while child stays visible";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide grand parent while its children stay visible.
|
||||
*/
|
||||
function test2(aContainerID, aGrandParentID, aChildID, aChild2ID)
|
||||
{
|
||||
this.eventSeq = [
|
||||
new invokerChecker(EVENT_HIDE, getNode(aGrandParentID)),
|
||||
new invokerChecker(EVENT_SHOW, getNode(aChildID)),
|
||||
new invokerChecker(EVENT_SHOW, getNode(aChild2ID)),
|
||||
new invokerChecker(EVENT_REORDER, getNode(aContainerID))
|
||||
];
|
||||
|
||||
this.invoke = function invoke()
|
||||
{
|
||||
var tree =
|
||||
{ SECTION: [ // container
|
||||
{ SECTION: [ // grand parent
|
||||
{ SECTION: [
|
||||
{ SECTION: [ // child
|
||||
{ TEXT_LEAF: [] }
|
||||
] },
|
||||
{ SECTION: [ // child2
|
||||
{ TEXT_LEAF: [] }
|
||||
] }
|
||||
] }
|
||||
] }
|
||||
] };
|
||||
testAccessibleTree(aContainerID, tree);
|
||||
|
||||
getNode(aGrandParentID).style.visibility = "hidden";
|
||||
}
|
||||
|
||||
this.finalCheck = function finalCheck()
|
||||
{
|
||||
var tree =
|
||||
{ SECTION: [ // container
|
||||
{ SECTION: [ // child
|
||||
{ TEXT_LEAF: [] }
|
||||
] },
|
||||
{ SECTION: [ // child2
|
||||
{ TEXT_LEAF: [] }
|
||||
] }
|
||||
] };
|
||||
testAccessibleTree(aContainerID, tree);
|
||||
}
|
||||
|
||||
this.getID = function getID()
|
||||
{
|
||||
return "hide grand parent while its children stay visible";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Change container style, hide parents while their children stay visible.
|
||||
*/
|
||||
function test3(aContainerID, aParentID, aParent2ID, aChildID, aChild2ID)
|
||||
{
|
||||
this.eventSeq = [
|
||||
new invokerChecker(EVENT_HIDE, getNode(aParentID)),
|
||||
new invokerChecker(EVENT_SHOW, getNode(aChildID)),
|
||||
new invokerChecker(EVENT_HIDE, getNode(aParent2ID)),
|
||||
new invokerChecker(EVENT_SHOW, getNode(aChild2ID)),
|
||||
new invokerChecker(EVENT_REORDER, getNode(aContainerID))
|
||||
];
|
||||
|
||||
this.invoke = function invoke()
|
||||
{
|
||||
var tree =
|
||||
{ SECTION: [ // container
|
||||
{ SECTION: [ // parent
|
||||
{ SECTION: [ // child
|
||||
{ TEXT_LEAF: [] }
|
||||
] }
|
||||
] },
|
||||
{ SECTION: [ // parent2
|
||||
{ SECTION: [ // child2
|
||||
{ TEXT_LEAF: [] }
|
||||
] },
|
||||
] }
|
||||
] };
|
||||
testAccessibleTree(aContainerID, tree);
|
||||
|
||||
getNode(aContainerID).style.color = "red";
|
||||
getNode(aParentID).style.visibility = "hidden";
|
||||
getNode(aParent2ID).style.visibility = "hidden";
|
||||
}
|
||||
|
||||
this.finalCheck = function finalCheck()
|
||||
{
|
||||
var tree =
|
||||
{ SECTION: [ // container
|
||||
{ SECTION: [ // child
|
||||
{ TEXT_LEAF: [] }
|
||||
] },
|
||||
{ SECTION: [ // child2
|
||||
{ TEXT_LEAF: [] }
|
||||
] }
|
||||
] };
|
||||
testAccessibleTree(aContainerID, tree);
|
||||
}
|
||||
|
||||
this.getID = function getID()
|
||||
{
|
||||
return "change container style, hide parents while their children stay visible";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Change container style and make visible child inside the table.
|
||||
*/
|
||||
function test4(aContainerID, aChildID)
|
||||
{
|
||||
this.eventSeq = [
|
||||
new invokerChecker(EVENT_SHOW, getNode(aChildID)),
|
||||
new invokerChecker(EVENT_REORDER, getNode(aChildID).parentNode)
|
||||
];
|
||||
|
||||
this.invoke = function invoke()
|
||||
{
|
||||
var tree =
|
||||
{ SECTION: [
|
||||
{ TABLE: [
|
||||
{ ROW: [
|
||||
{ CELL: [ ] }
|
||||
] }
|
||||
] }
|
||||
] };
|
||||
testAccessibleTree(aContainerID, tree);
|
||||
|
||||
getNode(aContainerID).style.color = "red";
|
||||
getNode(aChildID).style.visibility = "visible";
|
||||
}
|
||||
|
||||
this.finalCheck = function finalCheck()
|
||||
{
|
||||
var tree =
|
||||
{ SECTION: [
|
||||
{ TABLE: [
|
||||
{ ROW: [
|
||||
{ CELL: [
|
||||
{ SECTION: [
|
||||
{ TEXT_LEAF: [] }
|
||||
] }
|
||||
] }
|
||||
] }
|
||||
] }
|
||||
] };
|
||||
testAccessibleTree(aContainerID, tree);
|
||||
}
|
||||
|
||||
this.getID = function getID()
|
||||
{
|
||||
return "change container style, make visible child insdie the table";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide subcontainer while child inside the table stays visible.
|
||||
*/
|
||||
function test5(aContainerID, aSubContainerID, aChildID)
|
||||
{
|
||||
this.eventSeq = [
|
||||
new invokerChecker(EVENT_HIDE, getNode(aSubContainerID)),
|
||||
new invokerChecker(EVENT_SHOW, getNode(aChildID)),
|
||||
new invokerChecker(EVENT_REORDER, getNode(aContainerID))
|
||||
];
|
||||
|
||||
this.invoke = function invoke()
|
||||
{
|
||||
var tree =
|
||||
{ SECTION: [ // container
|
||||
{ SECTION: [ // subcontainer
|
||||
{ TABLE: [
|
||||
{ ROW: [
|
||||
{ CELL: [
|
||||
{ SECTION: [ // child
|
||||
{ TEXT_LEAF: [] }
|
||||
] }
|
||||
] }
|
||||
] }
|
||||
] }
|
||||
] }
|
||||
] };
|
||||
testAccessibleTree(aContainerID, tree);
|
||||
|
||||
getNode(aSubContainerID).style.visibility = "hidden";
|
||||
}
|
||||
|
||||
this.finalCheck = function finalCheck()
|
||||
{
|
||||
var tree =
|
||||
{ SECTION: [ // container
|
||||
{ SECTION: [ // child
|
||||
{ TEXT_LEAF: [] }
|
||||
] }
|
||||
] };
|
||||
testAccessibleTree(aContainerID, tree);
|
||||
}
|
||||
|
||||
this.getID = function getID()
|
||||
{
|
||||
return "hide subcontainer while child inside the table stays visible";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide subcontainer while its child and child inside the nested table stays visible.
|
||||
*/
|
||||
function test6(aContainerID, aSubContainerID, aChildID, aChild2ID)
|
||||
{
|
||||
this.eventSeq = [
|
||||
new invokerChecker(EVENT_HIDE, getNode(aSubContainerID)),
|
||||
new invokerChecker(EVENT_SHOW, getNode(aChildID)),
|
||||
new invokerChecker(EVENT_SHOW, getNode(aChild2ID)),
|
||||
new invokerChecker(EVENT_REORDER, getNode(aContainerID))
|
||||
];
|
||||
|
||||
this.invoke = function invoke()
|
||||
{
|
||||
var tree =
|
||||
{ SECTION: [ // container
|
||||
{ SECTION: [ // subcontainer
|
||||
{ TABLE: [
|
||||
{ ROW: [
|
||||
{ CELL: [
|
||||
{ TABLE: [ // nested table
|
||||
{ ROW: [
|
||||
{ CELL: [
|
||||
{ SECTION: [ // child
|
||||
{ TEXT_LEAF: [] } ]} ]} ]} ]} ]} ]} ]},
|
||||
{ SECTION: [ // child2
|
||||
{ TEXT_LEAF: [] } ]} ]} ]};
|
||||
|
||||
testAccessibleTree(aContainerID, tree);
|
||||
|
||||
// invoke
|
||||
getNode(aSubContainerID).style.visibility = "hidden";
|
||||
}
|
||||
|
||||
this.finalCheck = function finalCheck()
|
||||
{
|
||||
var tree =
|
||||
{ SECTION: [ // container
|
||||
{ SECTION: [ // child
|
||||
{ TEXT_LEAF: [] } ]},
|
||||
{ SECTION: [ // child2
|
||||
{ TEXT_LEAF: [] } ]} ]};
|
||||
|
||||
testAccessibleTree(aContainerID, tree);
|
||||
}
|
||||
|
||||
this.getID = function getID()
|
||||
{
|
||||
return "hide subcontainer while its child and child inside the nested table stays visible";
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Test
|
||||
|
||||
//gA11yEventDumpID = "eventdump"; // debug stuff
|
||||
//gA11yEventDumpToConsole = true;
|
||||
|
||||
var gQueue = null;
|
||||
|
||||
function doTest()
|
||||
{
|
||||
gQueue = new eventQueue();
|
||||
|
||||
gQueue.push(new test1("t1_container", "t1_parent", "t1_child"));
|
||||
gQueue.push(new test2("t2_container", "t2_grandparent", "t2_child", "t2_child2"));
|
||||
gQueue.push(new test3("t3_container", "t3_parent", "t3_parent2", "t3_child", "t3_child2"));
|
||||
gQueue.push(new test4("t4_container", "t4_child"));
|
||||
gQueue.push(new test5("t5_container", "t5_subcontainer", "t5_child"));
|
||||
gQueue.push(new test6("t6_container", "t6_subcontainer", "t6_child", "t6_child2"));
|
||||
|
||||
gQueue.invoke(); // SimpleTest.finish() will be called in the end
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a target="_blank"
|
||||
title="Develop a way to handle visibility style"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id=606125">
|
||||
Mozilla Bug 606125
|
||||
</a>
|
||||
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none"></div>
|
||||
<pre id="test">
|
||||
</pre>
|
||||
|
||||
<!-- hide parent while child stays visible -->
|
||||
<div id="t1_container">
|
||||
<div id="t1_parent">
|
||||
<div id="t1_child" style="visibility: visible">text</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- hide grandparent while its children stay visible -->
|
||||
<div id="t2_container">
|
||||
<div id="t2_grandparent">
|
||||
<div>
|
||||
<div id="t2_child" style="visibility: visible">text</div>
|
||||
<div id="t2_child2" style="visibility: visible">text</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- change container style, hide parents while their children stay visible -->
|
||||
<div id="t3_container">
|
||||
<div id="t3_parent">
|
||||
<div id="t3_child" style="visibility: visible">text</div>
|
||||
</div>
|
||||
<div id="t3_parent2">
|
||||
<div id="t3_child2" style="visibility: visible">text</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- change container style, show child inside the table -->
|
||||
<div id="t4_container">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="t4_child" style="visibility: hidden;">text</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- hide subcontainer while child inside the table stays visible -->
|
||||
<div id="t5_container">
|
||||
<div id="t5_subcontainer">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="t5_child" style="visibility: visible;">text</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- hide subcontainer while its child and child inside the nested table stays visible -->
|
||||
<div id="t6_container">
|
||||
<div id="t6_subcontainer">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="t6_child" style="visibility: visible;">text</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="t6_child2" style="visibility: visible">text</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="eventdump"></div>
|
||||
</body>
|
||||
</html>
|
|
@ -93,6 +93,7 @@ endif
|
|||
CPPSRCS = nsBrowserApp.cpp
|
||||
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
|
||||
|
||||
ifdef BUILD_STATIC_LIBS
|
||||
ifdef _MSC_VER
|
||||
|
|
|
@ -475,21 +475,6 @@ pref("privacy.sanitize.migrateFx3Prefs", false);
|
|||
|
||||
pref("network.proxy.share_proxy_settings", false); // use the same proxy settings for all protocols
|
||||
|
||||
// l12n and i18n
|
||||
pref("intl.accept_languages", "chrome://global/locale/intl.properties");
|
||||
pref("intl.charsetmenu.browser.static", "chrome://global/locale/intl.properties");
|
||||
pref("intl.charsetmenu.browser.more1", "chrome://global/locale/intl.properties");
|
||||
pref("intl.charsetmenu.browser.more2", "chrome://global/locale/intl.properties");
|
||||
pref("intl.charsetmenu.browser.more3", "chrome://global/locale/intl.properties");
|
||||
pref("intl.charsetmenu.browser.more4", "chrome://global/locale/intl.properties");
|
||||
pref("intl.charsetmenu.browser.more5", "chrome://global/locale/intl.properties");
|
||||
pref("intl.charsetmenu.browser.unicode", "UTF-8, UTF-16LE, UTF-16BE, UTF-32, UTF-32LE, UTF-32BE");
|
||||
pref("intl.charset.detector", "chrome://global/locale/intl.properties");
|
||||
pref("intl.charset.default", "chrome://global-platform/locale/intl.properties");
|
||||
pref("font.language.group", "chrome://global/locale/intl.properties");
|
||||
pref("intl.menuitems.alwaysappendaccesskeys","chrome://global/locale/intl.properties");
|
||||
pref("intl.menuitems.insertseparatorbeforeaccesskeys","chrome://global/locale/intl.properties");
|
||||
|
||||
// simple gestures support
|
||||
pref("browser.gesture.swipe.left", "Browser:BackOrBackDuplicate");
|
||||
pref("browser.gesture.swipe.right", "Browser:ForwardOrForwardDuplicate");
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
%browserDTD;
|
||||
<!ENTITY % baseMenuDTD SYSTEM "chrome://browser/locale/baseMenuOverlay.dtd" >
|
||||
%baseMenuDTD;
|
||||
<!ENTITY % globalRegionDTD SYSTEM "chrome://global-region/locale/region.dtd">
|
||||
%globalRegionDTD;
|
||||
<!ENTITY % charsetDTD SYSTEM "chrome://global/locale/charsetOverlay.dtd" >
|
||||
%charsetDTD;
|
||||
<!ENTITY % textcontextDTD SYSTEM "chrome://global/locale/textcontext.dtd" >
|
||||
|
|
|
@ -40,7 +40,7 @@ let TabView = {
|
|||
_window: null,
|
||||
_sessionstore: null,
|
||||
_visibilityID: "tabview-visibility",
|
||||
|
||||
|
||||
// ----------
|
||||
get windowTitle() {
|
||||
delete this.windowTitle;
|
||||
|
@ -51,7 +51,7 @@ let TabView = {
|
|||
},
|
||||
|
||||
// ----------
|
||||
init: function TabView_init() {
|
||||
init: function TabView_init() {
|
||||
// ___ keys
|
||||
this._setBrowserKeyHandlers();
|
||||
|
||||
|
@ -61,8 +61,21 @@ let TabView = {
|
|||
getService(Ci.nsISessionStore);
|
||||
|
||||
let data = this._sessionstore.getWindowValue(window, this._visibilityID);
|
||||
if (data && data == "true")
|
||||
if (data && data == "true") {
|
||||
this.show();
|
||||
} else {
|
||||
let self = this;
|
||||
// if a tab is changed from hidden to unhidden and the iframe is not
|
||||
// initialized, load the iframe and setup the tab.
|
||||
this._tabShowEventListener = function (event) {
|
||||
if (!self._window)
|
||||
self._initFrame(function() {
|
||||
self._window.UI.onTabSelect(gBrowser.selectedTab);
|
||||
});
|
||||
};
|
||||
gBrowser.tabContainer.addEventListener(
|
||||
"TabShow", this._tabShowEventListener, true);
|
||||
}
|
||||
},
|
||||
|
||||
// ----------
|
||||
|
@ -75,16 +88,16 @@ let TabView = {
|
|||
} else {
|
||||
// ___ find the deck
|
||||
this._deck = document.getElementById("tab-view-deck");
|
||||
|
||||
|
||||
// ___ create the frame
|
||||
let iframe = document.createElement("iframe");
|
||||
iframe.id = "tab-view";
|
||||
iframe.setAttribute("transparent", "true");
|
||||
iframe.flex = 1;
|
||||
|
||||
|
||||
if (typeof callback == "function")
|
||||
iframe.addEventListener("DOMContentLoaded", callback, false);
|
||||
|
||||
|
||||
iframe.setAttribute("src", "chrome://browser/content/tabview.html");
|
||||
this._deck.appendChild(iframe);
|
||||
this._window = iframe.contentWindow;
|
||||
|
@ -97,11 +110,15 @@ let TabView = {
|
|||
self._sessionstore.setWindowValue(window, self._visibilityID, data);
|
||||
}
|
||||
}
|
||||
|
||||
Services.obs.addObserver(observer, "quit-application-requested", false);
|
||||
|
||||
if (this._tabShowEventListener) {
|
||||
gBrowser.tabContainer.removeEventListener(
|
||||
"TabShow", this._tabShowEventListener, true);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// ----------
|
||||
getContentWindow: function TabView_getContentWindow() {
|
||||
return this._window;
|
||||
|
|
|
@ -167,14 +167,14 @@ html|*.urlbar-input {
|
|||
/* over-link in location bar */
|
||||
|
||||
.urlbar-over-link-layer[overlinkstate="fade-in"],
|
||||
.urlbar-textbox-container:not([overlinkstate]) {
|
||||
.urlbar-textbox-container[overlinkstate="fade-out"] {
|
||||
-moz-transition-property: color;
|
||||
-moz-transition-duration: 150ms;
|
||||
-moz-transition-timing-function: cubic-bezier(0.0, 0.6, 1.0, 1.0);
|
||||
}
|
||||
|
||||
.urlbar-textbox-container[overlinkstate="fade-in"],
|
||||
.urlbar-over-link-layer:not([overlinkstate]) {
|
||||
.urlbar-over-link-layer[overlinkstate="fade-out"] {
|
||||
-moz-transition-property: color;
|
||||
-moz-transition-duration: 150ms;
|
||||
-moz-transition-timing-function: linear;
|
||||
|
@ -182,14 +182,14 @@ html|*.urlbar-input {
|
|||
}
|
||||
|
||||
.urlbar-over-link-box[overlinkstate="fade-in"],
|
||||
.urlbar-textbox-container-children:not([overlinkstate]) {
|
||||
.urlbar-textbox-container-children[overlinkstate="fade-out"] {
|
||||
-moz-transition-property: opacity;
|
||||
-moz-transition-duration: 150ms;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.urlbar-textbox-container-children[overlinkstate="fade-in"],
|
||||
.urlbar-over-link-box:not([overlinkstate]) {
|
||||
.urlbar-over-link-box[overlinkstate="fade-out"] {
|
||||
-moz-transition-property: opacity;
|
||||
-moz-transition-duration: 150ms;
|
||||
opacity: 0;
|
||||
|
@ -207,6 +207,14 @@ html|*.urlbar-input {
|
|||
opacity: 0;
|
||||
}
|
||||
|
||||
.urlbar-over-link-layer:not([overlinkstate]) {
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
.urlbar-over-link-box:not([overlinkstate]) {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
/* For results that are actions, their description text is shown instead of
|
||||
the URL - this needs to follow the locale's direction, unlike URLs. */
|
||||
richlistitem[type~="action"]:-moz-locale-dir(rtl) > .ac-url-box {
|
||||
|
|
|
@ -1378,6 +1378,7 @@ function delayedStartup(isLoadingBlank, mustLoadSidebar) {
|
|||
OfflineApps.init();
|
||||
IndexedDBPromptHelper.init();
|
||||
gFormSubmitObserver.init();
|
||||
AddonManager.addAddonListener(AddonsMgrListener);
|
||||
|
||||
gBrowser.addEventListener("pageshow", function(evt) { setTimeout(pageShowEventHandlers, 0, evt); }, true);
|
||||
|
||||
|
@ -1641,6 +1642,7 @@ function BrowserShutdown()
|
|||
OfflineApps.uninit();
|
||||
gPrivateBrowsingUI.uninit();
|
||||
IndexedDBPromptHelper.uninit();
|
||||
AddonManager.removeAddonListener(AddonsMgrListener);
|
||||
|
||||
var enumerator = Services.wm.getEnumerator(null);
|
||||
enumerator.getNext();
|
||||
|
@ -2806,12 +2808,13 @@ function FillInHTMLTooltip(tipElement)
|
|||
#endif // MOZ_SVG
|
||||
var direction = tipElement.ownerDocument.dir;
|
||||
|
||||
// If the element is invalid per HTML5 Forms specifications,
|
||||
// show the constraint validation error message instead of @tooltip.
|
||||
if (tipElement instanceof HTMLInputElement ||
|
||||
tipElement instanceof HTMLTextAreaElement ||
|
||||
tipElement instanceof HTMLSelectElement ||
|
||||
tipElement instanceof HTMLButtonElement) {
|
||||
// If the element is invalid per HTML5 Forms specifications and has no title,
|
||||
// show the constraint validation error message.
|
||||
if ((tipElement instanceof HTMLInputElement ||
|
||||
tipElement instanceof HTMLTextAreaElement ||
|
||||
tipElement instanceof HTMLSelectElement ||
|
||||
tipElement instanceof HTMLButtonElement) &&
|
||||
!tipElement.hasAttribute('title')) {
|
||||
// If the element is barred from constraint validation or valid,
|
||||
// the validation message will be the empty string.
|
||||
titleText = tipElement.validationMessage;
|
||||
|
@ -3431,6 +3434,12 @@ function BrowserCustomizeToolbar()
|
|||
PlacesToolbarHelper.customizeStart();
|
||||
BookmarksMenuButton.customizeStart();
|
||||
|
||||
let addonBar = document.getElementById("addon-bar");
|
||||
if (addonBar.collapsed) {
|
||||
addonBar.wasCollapsed = addonBar.collapsed;
|
||||
addonBar.collapsed = false;
|
||||
}
|
||||
|
||||
var customizeURL = "chrome://global/content/customizeToolbar.xul";
|
||||
gCustomizeSheet = getBoolPref("toolbar.customization.usesheet", false);
|
||||
|
||||
|
@ -3489,6 +3498,12 @@ function BrowserToolboxCustomizeDone(aToolboxChanged) {
|
|||
PlacesToolbarHelper.customizeDone();
|
||||
BookmarksMenuButton.customizeDone();
|
||||
|
||||
let addonBar = document.getElementById("addon-bar");
|
||||
if (addonBar.wasCollapsed === true) {
|
||||
addonBar.collapsed = true;
|
||||
delete addonBar.wasCollapsed;
|
||||
}
|
||||
|
||||
// The url bar splitter state is dependent on whether stop/reload
|
||||
// and the location bar are combined, so we need this ordering
|
||||
CombinedStopReload.init();
|
||||
|
@ -3979,14 +3994,16 @@ var XULBrowserWindow = {
|
|||
this.defaultStatus = status;
|
||||
},
|
||||
|
||||
setOverLink: function (link) {
|
||||
// Encode bidirectional formatting characters.
|
||||
// (RFC 3987 sections 3.2 and 4.1 paragraph 6)
|
||||
link = link.replace(/[\u200e\u200f\u202a\u202b\u202c\u202d\u202e]/g,
|
||||
setOverLink: function (url, anchorElt) {
|
||||
if (gURLBar) {
|
||||
// Encode bidirectional formatting characters.
|
||||
// (RFC 3987 sections 3.2 and 4.1 paragraph 6)
|
||||
url = url.replace(/[\u200e\u200f\u202a\u202b\u202c\u202d\u202e]/g,
|
||||
encodeURIComponent);
|
||||
gURLBar.setOverLink(link);
|
||||
gURLBar.setOverLink(url);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// Called before links are navigated to to allow us to retarget them if needed.
|
||||
onBeforeLinkTraversal: function(originalTarget, linkURI, linkNode, isAppTab) {
|
||||
// Don't modify non-default targets or targets that aren't in top-level app
|
||||
|
@ -4183,7 +4200,9 @@ var XULBrowserWindow = {
|
|||
else
|
||||
this.isImage.setAttribute('disabled', 'true');
|
||||
|
||||
this.hideOverLinkImmediately = true;
|
||||
this.setOverLink("", null);
|
||||
this.hideOverLinkImmediately = false;
|
||||
|
||||
// We should probably not do this if the value has changed since the user
|
||||
// searched
|
||||
|
@ -5167,7 +5186,15 @@ function handleLinkClick(event, href, linkNode) {
|
|||
}
|
||||
|
||||
function middleMousePaste(event) {
|
||||
var url = getShortcutOrURI(readFromClipboard());
|
||||
let clipboard = readFromClipboard();
|
||||
if (!clipboard)
|
||||
return;
|
||||
|
||||
// Strip embedded newlines and surrounding whitespace, to match the URL
|
||||
// bar's behavior (stripsurroundingwhitespace)
|
||||
clipboard.replace(/\s*\n\s*/g, "");
|
||||
|
||||
let url = getShortcutOrURI(clipboard);
|
||||
try {
|
||||
makeURI(url);
|
||||
} catch (ex) {
|
||||
|
@ -6594,10 +6621,15 @@ var FeedHandler = {
|
|||
onFeedButtonClick: function(event) {
|
||||
event.stopPropagation();
|
||||
|
||||
if (event.target.hasAttribute("feed") &&
|
||||
event.eventPhase == Event.AT_TARGET &&
|
||||
let feeds = gBrowser.selectedBrowser.feeds || [];
|
||||
// If there are multiple feeds, the menu will open, so no need to do
|
||||
// anything. If there are no feeds, nothing to do either.
|
||||
if (feeds.length != 1)
|
||||
return;
|
||||
|
||||
if (event.eventPhase == Event.AT_TARGET &&
|
||||
(event.button == 0 || event.button == 1)) {
|
||||
this.subscribeToFeed(null, event);
|
||||
this.subscribeToFeed(feeds[0].href, event);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -6626,12 +6658,8 @@ var FeedHandler = {
|
|||
while (menuPopup.firstChild)
|
||||
menuPopup.removeChild(menuPopup.firstChild);
|
||||
|
||||
if (feeds.length == 1) {
|
||||
var feedButton = document.getElementById("feed-button");
|
||||
if (feedButton)
|
||||
feedButton.setAttribute("feed", feeds[0].href);
|
||||
if (feeds.length <= 1)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Build the menu showing the available feed choices for viewing.
|
||||
for (var i = 0; i < feeds.length; ++i) {
|
||||
|
@ -6704,35 +6732,30 @@ var FeedHandler = {
|
|||
* a page is loaded or the user switches tabs to a page that has feeds.
|
||||
*/
|
||||
updateFeeds: function() {
|
||||
var feedButton = document.getElementById("feed-button");
|
||||
clearTimeout(this._updateFeedTimeout);
|
||||
|
||||
var feeds = gBrowser.selectedBrowser.feeds;
|
||||
if (!feeds || feeds.length == 0) {
|
||||
if (feedButton) {
|
||||
feedButton.disabled = true;
|
||||
feedButton.removeAttribute("feed");
|
||||
}
|
||||
var haveFeeds = feeds && feeds.length > 0;
|
||||
|
||||
var feedButton = document.getElementById("feed-button");
|
||||
if (feedButton)
|
||||
feedButton.disabled = !haveFeeds;
|
||||
|
||||
if (!haveFeeds) {
|
||||
this._feedMenuitem.setAttribute("disabled", "true");
|
||||
this._feedMenupopup.setAttribute("hidden", "true");
|
||||
this._feedMenuitem.removeAttribute("hidden");
|
||||
this._feedMenupopup.setAttribute("hidden", "true");
|
||||
return;
|
||||
}
|
||||
|
||||
if (feeds.length > 1) {
|
||||
this._feedMenuitem.setAttribute("hidden", "true");
|
||||
this._feedMenupopup.removeAttribute("hidden");
|
||||
} else {
|
||||
if (feedButton)
|
||||
feedButton.disabled = false;
|
||||
|
||||
if (feeds.length > 1) {
|
||||
this._feedMenuitem.setAttribute("hidden", "true");
|
||||
this._feedMenupopup.removeAttribute("hidden");
|
||||
if (feedButton)
|
||||
feedButton.removeAttribute("feed");
|
||||
} else {
|
||||
if (feedButton)
|
||||
feedButton.setAttribute("feed", feeds[0].href);
|
||||
|
||||
this._feedMenuitem.setAttribute("feed", feeds[0].href);
|
||||
this._feedMenuitem.removeAttribute("disabled");
|
||||
this._feedMenuitem.removeAttribute("hidden");
|
||||
this._feedMenupopup.setAttribute("hidden", "true");
|
||||
}
|
||||
this._feedMenuitem.setAttribute("feed", feeds[0].href);
|
||||
this._feedMenuitem.removeAttribute("disabled");
|
||||
this._feedMenuitem.removeAttribute("hidden");
|
||||
this._feedMenupopup.setAttribute("hidden", "true");
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -6749,10 +6772,13 @@ var FeedHandler = {
|
|||
|
||||
browserForLink.feeds.push({ href: link.href, title: link.title });
|
||||
|
||||
// If this addition was for the current browser, update the UI. For
|
||||
// background browsers, we'll update on tab switch.
|
||||
if (browserForLink == gBrowser.selectedBrowser) {
|
||||
var feedButton = document.getElementById("feed-button");
|
||||
if (feedButton)
|
||||
feedButton.collapsed = false;
|
||||
// Batch updates to avoid updating the UI for multiple onLinkAdded events
|
||||
// fired within 100ms of each other.
|
||||
clearTimeout(this._updateFeedTimeout);
|
||||
this._updateFeedTimeout = setTimeout(this.updateFeeds.bind(this), 100);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -8030,3 +8056,33 @@ function duplicateTabIn(aTab, where, historyIndex) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* When addons are installed/uninstalled, check and see if the number of items
|
||||
* on the add-on bar changed:
|
||||
* - If an add-on was installed, incrementing the count, show the bar.
|
||||
* - If an add-on was uninstalled, and no more items are left, hide the bar.
|
||||
*/
|
||||
let AddonsMgrListener = {
|
||||
get addonBar() document.getElementById("addon-bar"),
|
||||
get statusBar() document.getElementById("status-bar"),
|
||||
getAddonBarItemCount: function() {
|
||||
// Take into account the contents of the status bar shim for the count.
|
||||
return this.addonBar.childNodes.length - 1 +
|
||||
this.statusBar.childNodes.length;
|
||||
},
|
||||
onInstalling: function(aAddon) {
|
||||
this.lastAddonBarCount = this.getAddonBarItemCount();
|
||||
},
|
||||
onInstalled: function(aAddon) {
|
||||
if (this.getAddonBarItemCount() > this.lastAddonBarCount)
|
||||
setToolbarVisibility(this.addonBar, true);
|
||||
},
|
||||
onUninstalling: function(aAddon) {
|
||||
this.lastAddonBarCount = this.getAddonBarItemCount();
|
||||
},
|
||||
onUninstalled: function(aAddon) {
|
||||
if (this.lastAddonBarCount > 0 && this.getAddonBarItemCount() == 0)
|
||||
setToolbarVisibility(this.addonBar, false);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
# Rob Campbell <rcampbell@mozilla.com>
|
||||
# Patrick Walton <pcwalton@mozilla.com>
|
||||
# David Dahl <ddahl@mozilla.com>
|
||||
# Frank Yan <fyan@mozilla.com>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
|
@ -53,6 +54,7 @@
|
|||
|
||||
<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/webConsole.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
|
||||
|
||||
<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
|
||||
|
@ -113,9 +115,6 @@
|
|||
onpopuphidden="if (event.target == this) TabContextMenu.contextTab = null;">
|
||||
<menuitem id="context_reloadTab" label="&reloadTab.label;" accesskey="&reloadTab.accesskey;"
|
||||
oncommand="gBrowser.reloadTab(TabContextMenu.contextTab);"/>
|
||||
<menuitem id="context_reloadAllTabs" label="&reloadAllTabs.label;" accesskey="&reloadAllTabs.accesskey;"
|
||||
tbattr="tabbrowser-multiple"
|
||||
oncommand="gBrowser.reloadAllTabs();"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="context_pinTab" label="&pinAppTab.label;"
|
||||
accesskey="&pinAppTab.accesskey;"
|
||||
|
@ -137,13 +136,16 @@
|
|||
tbattr="tabbrowser-multiple"
|
||||
oncommand="gBrowser.replaceTabWithWindow(TabContextMenu.contextTab);"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="context_reloadAllTabs" label="&reloadAllTabs.label;" accesskey="&reloadAllTabs.accesskey;"
|
||||
tbattr="tabbrowser-multiple"
|
||||
oncommand="gBrowser.reloadAllTabs();"/>
|
||||
<menuitem id="context_bookmarkAllTabs"
|
||||
label="&bookmarkAllTabs.label;"
|
||||
accesskey="&bookmarkAllTabs.accesskey;"
|
||||
command="Browser:BookmarkAllTabs"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="context_closeOtherTabs" label="&closeOtherTabs.label;" accesskey="&closeOtherTabs.accesskey;"
|
||||
oncommand="gBrowser.removeAllTabsBut(TabContextMenu.contextTab);"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="context_undoCloseTab"
|
||||
label="&undoCloseTab.label;"
|
||||
accesskey="&undoCloseTab.accesskey;"
|
||||
|
@ -331,7 +333,8 @@
|
|||
|
||||
<menupopup id="placesContext"/>
|
||||
|
||||
<panel id="notification-popup" type="arrow" position="after_start" noautofocus="true" hidden="true"/>
|
||||
<panel id="notification-popup" type="arrow" position="after_start"
|
||||
noautofocus="true" hidden="true" orient="vertical"/>
|
||||
|
||||
<!-- Popup for site identity information -->
|
||||
<panel id="identity-popup" position="after_start" hidden="true" noautofocus="true"
|
||||
|
@ -432,7 +435,7 @@
|
|||
#ifdef CAN_DRAW_IN_TITLEBAR
|
||||
<vbox id="titlebar">
|
||||
<hbox id="titlebar-content">
|
||||
<hbox id="appmenu-button-container" align="start">
|
||||
<hbox id="appmenu-button-container">
|
||||
<button id="appmenu-button"
|
||||
type="menu"
|
||||
label="&brandShortName;"
|
||||
|
@ -441,7 +444,7 @@
|
|||
</button>
|
||||
</hbox>
|
||||
<spacer id="titlebar-spacer" flex="1"/>
|
||||
<hbox id="titlebar-buttonbox">
|
||||
<hbox id="titlebar-buttonbox" align="start">
|
||||
<toolbarbutton class="titlebar-button" id="titlebar-min" oncommand="window.minimize();"/>
|
||||
<toolbarbutton class="titlebar-button" id="titlebar-max" oncommand="onTitlebarMaxClick();"/>
|
||||
<toolbarbutton class="titlebar-button" id="titlebar-close" command="cmd_closeWindow"/>
|
||||
|
|
|
@ -762,55 +762,68 @@ var gSyncSetup = {
|
|||
if (this._case1Setup)
|
||||
break;
|
||||
|
||||
// history
|
||||
let db = Weave.Svc.History.DBConnection;
|
||||
let places_db = Weave.Svc.History.DBConnection;
|
||||
if (Weave.Engines.get("history").enabled) {
|
||||
let daysOfHistory = 0;
|
||||
let stm = places_db.createStatement(
|
||||
"SELECT ROUND(( " +
|
||||
"strftime('%s','now','localtime','utc') - " +
|
||||
"( " +
|
||||
"SELECT visit_date FROM moz_historyvisits " +
|
||||
"UNION ALL " +
|
||||
"SELECT visit_date FROM moz_historyvisits_temp " +
|
||||
"ORDER BY visit_date ASC LIMIT 1 " +
|
||||
")/1000000 " +
|
||||
")/86400) AS daysOfHistory ");
|
||||
|
||||
let daysOfHistory = 0;
|
||||
let stm = db.createStatement(
|
||||
"SELECT ROUND(( " +
|
||||
"strftime('%s','now','localtime','utc') - " +
|
||||
"( " +
|
||||
"SELECT visit_date FROM moz_historyvisits " +
|
||||
"UNION ALL " +
|
||||
"SELECT visit_date FROM moz_historyvisits_temp " +
|
||||
"ORDER BY visit_date ASC LIMIT 1 " +
|
||||
")/1000000 " +
|
||||
")/86400) AS daysOfHistory ");
|
||||
if (stm.step())
|
||||
daysOfHistory = stm.getInt32(0);
|
||||
// Support %S for historical reasons (see bug 600141)
|
||||
document.getElementById("historyCount").value =
|
||||
PluralForm.get(daysOfHistory,
|
||||
this._stringBundle.GetStringFromName("historyDaysCount.label"))
|
||||
.replace("%S", daysOfHistory)
|
||||
.replace("#1", daysOfHistory);
|
||||
} else {
|
||||
document.getElementById("historyCount").hidden = true;
|
||||
}
|
||||
|
||||
if (stm.step())
|
||||
daysOfHistory = stm.getInt32(0);
|
||||
// Support %S for historical reasons (see bug 600141)
|
||||
document.getElementById("historyCount").value =
|
||||
PluralForm.get(daysOfHistory,
|
||||
this._stringBundle.GetStringFromName("historyDaysCount.label"))
|
||||
.replace("%S", daysOfHistory)
|
||||
.replace("#1", daysOfHistory);
|
||||
if (Weave.Engines.get("bookmarks").enabled) {
|
||||
let bookmarks = 0;
|
||||
let stm = places_db.createStatement(
|
||||
"SELECT count(*) AS bookmarks " +
|
||||
"FROM moz_bookmarks b " +
|
||||
"LEFT JOIN moz_bookmarks t ON " +
|
||||
"b.parent = t.id WHERE b.type = 1 AND t.parent <> :tag");
|
||||
stm.params.tag = Weave.Svc.Bookmark.tagsFolder;
|
||||
if (stm.executeStep())
|
||||
bookmarks = stm.row.bookmarks;
|
||||
// Support %S for historical reasons (see bug 600141)
|
||||
document.getElementById("bookmarkCount").value =
|
||||
PluralForm.get(bookmarks,
|
||||
this._stringBundle.GetStringFromName("bookmarksCount.label"))
|
||||
.replace("%S", bookmarks)
|
||||
.replace("#1", bookmarks);
|
||||
} else {
|
||||
document.getElementById("bookmarkCount").hidden = true;
|
||||
}
|
||||
|
||||
// bookmarks
|
||||
let bookmarks = 0;
|
||||
stm = db.createStatement(
|
||||
"SELECT count(*) AS bookmarks " +
|
||||
"FROM moz_bookmarks b " +
|
||||
"LEFT JOIN moz_bookmarks t ON " +
|
||||
"b.parent = t.id WHERE b.type = 1 AND t.parent <> :tag");
|
||||
stm.params.tag = Weave.Svc.Bookmark.tagsFolder;
|
||||
if (stm.executeStep())
|
||||
bookmarks = stm.row.bookmarks;
|
||||
// Support %S for historical reasons (see bug 600141)
|
||||
document.getElementById("bookmarkCount").value =
|
||||
PluralForm.get(bookmarks,
|
||||
this._stringBundle.GetStringFromName("bookmarksCount.label"))
|
||||
.replace("%S", bookmarks)
|
||||
.replace("#1", bookmarks);
|
||||
if (Weave.Engines.get("passwords").enabled) {
|
||||
let logins = Weave.Svc.Login.getAllLogins({});
|
||||
// Support %S for historical reasons (see bug 600141)
|
||||
document.getElementById("passwordCount").value =
|
||||
PluralForm.get(logins.length,
|
||||
this._stringBundle.GetStringFromName("passwordsCount.label"))
|
||||
.replace("%S", logins.length)
|
||||
.replace("#1", logins.length);
|
||||
} else {
|
||||
document.getElementById("passwordCount").hidden = true;
|
||||
}
|
||||
|
||||
if (!Weave.Engines.get("prefs").enabled) {
|
||||
document.getElementById("prefsWipe").hidden = true;
|
||||
}
|
||||
|
||||
// passwords
|
||||
let logins = Weave.Svc.Login.getAllLogins({});
|
||||
// Support %S for historical reasons (see bug 600141)
|
||||
document.getElementById("passwordCount").value =
|
||||
PluralForm.get(logins.length,
|
||||
this._stringBundle.GetStringFromName("passwordsCount.label"))
|
||||
.replace("%S", logins.length)
|
||||
.replace("#1", logins.length);
|
||||
this._case1Setup = true;
|
||||
break;
|
||||
case 2:
|
||||
|
|
|
@ -480,34 +480,28 @@
|
|||
</vbox>
|
||||
<vbox id="chosenActionWipeClient" class="confirm">
|
||||
<description class="normal">
|
||||
&confirm.client.label;
|
||||
&confirm.client2.label;
|
||||
</description>
|
||||
<separator class="thin"/>
|
||||
<vbox id="dataList">
|
||||
<label class="data indent" id="bookmarkCount"/>
|
||||
<label class="data indent" id="historyCount"/>
|
||||
<label class="data indent" id="passwordCount"/>
|
||||
<label class="data indent" id="prefsWipe"
|
||||
value="&engine.prefs.label;"/>
|
||||
</vbox>
|
||||
<separator class="thin"/>
|
||||
<description class="normal">
|
||||
&confirm.client.moreinfo.label;
|
||||
</description>
|
||||
<separator class="thin"/>
|
||||
<description class="warning">
|
||||
&confirm.client.warning.label;
|
||||
</description>
|
||||
</vbox>
|
||||
<vbox id="chosenActionWipeServer" class="confirm">
|
||||
<description class="normal">
|
||||
&confirm.server.label;
|
||||
&confirm.server2.label;
|
||||
</description>
|
||||
<separator class="thin"/>
|
||||
<vbox id="clientList">
|
||||
</vbox>
|
||||
<separator class="thin"/>
|
||||
<description class="warning">
|
||||
&confirm.server.warning.label;
|
||||
</description>
|
||||
</vbox>
|
||||
</deck>
|
||||
</wizardpage>
|
||||
|
|
|
@ -2745,6 +2745,8 @@
|
|||
<body><![CDATA[
|
||||
switch (aEvent.type) {
|
||||
case "resize":
|
||||
if (aEvent.target != window)
|
||||
break;
|
||||
var width = this.mTabstrip.boxObject.width;
|
||||
if (width != this.mTabstripWidth) {
|
||||
this.adjustTabstrip();
|
||||
|
|
|
@ -101,7 +101,8 @@ Drag.prototype = {
|
|||
//
|
||||
// Parameters:
|
||||
// bounds - (<Rect>) bounds
|
||||
// stationaryCorner - which corner is stationary? by default, the top left.
|
||||
// stationaryCorner - which corner is stationary? by default, the top left in LTR mode,
|
||||
// and top right in RTL mode.
|
||||
// "topleft", "bottomleft", "topright", "bottomright"
|
||||
// assumeConstantSize - (boolean) whether the bounds' dimensions are sacred or not.
|
||||
// keepProportional - (boolean) if assumeConstantSize is false, whether we should resize
|
||||
|
@ -109,7 +110,7 @@ Drag.prototype = {
|
|||
// checkItemStatus - (boolean) make sure this is a valid item which should be snapped
|
||||
snapBounds: function Drag_snapBounds(bounds, stationaryCorner, assumeConstantSize, keepProportional, checkItemStatus) {
|
||||
if (!stationaryCorner)
|
||||
stationaryCorner = 'topleft';
|
||||
stationaryCorner = UI.rtl ? 'topright' : 'topleft';
|
||||
var update = false; // need to update
|
||||
var updateX = false;
|
||||
var updateY = false;
|
||||
|
@ -164,7 +165,8 @@ Drag.prototype = {
|
|||
// trenches that it snapped to.
|
||||
//
|
||||
// Parameters:
|
||||
// stationaryCorner - which corner is stationary? by default, the top left.
|
||||
// stationaryCorner - which corner is stationary? by default, the top left in LTR mode,
|
||||
// and top right in RTL mode.
|
||||
// "topleft", "bottomleft", "topright", "bottomright"
|
||||
// assumeConstantSize - (boolean) whether the bounds' dimensions are sacred or not.
|
||||
// keepProportional - (boolean) if assumeConstantSize is false, whether we should resize
|
||||
|
@ -187,7 +189,8 @@ Drag.prototype = {
|
|||
//
|
||||
// Parameters:
|
||||
// rect - (<Rect>) current bounds of the object
|
||||
// stationaryCorner - which corner is stationary? by default, the top left.
|
||||
// stationaryCorner - which corner is stationary? by default, the top left in LTR mode,
|
||||
// and top right in RTL mode.
|
||||
// "topleft", "bottomleft", "topright", "bottomright"
|
||||
// assumeConstantSize - (boolean) whether the rect's dimensions are sacred or not
|
||||
// keepProportional - (boolean) if we are allowed to change the rect's size, whether the
|
||||
|
@ -202,7 +205,7 @@ Drag.prototype = {
|
|||
|
||||
var snapRadius = (Keys.meta ? 0 : Trenches.defaultRadius);
|
||||
if (rect.left < swb.left + snapRadius ) {
|
||||
if (stationaryCorner.indexOf('right') > -1)
|
||||
if (stationaryCorner.indexOf('right') > -1 && !assumeConstantSize)
|
||||
rect.width = rect.right - swb.left;
|
||||
rect.left = swb.left;
|
||||
update = true;
|
||||
|
@ -225,7 +228,7 @@ Drag.prototype = {
|
|||
delete snappedTrenches.left;
|
||||
}
|
||||
if (rect.top < swb.top + snapRadius) {
|
||||
if (stationaryCorner.indexOf('bottom') > -1)
|
||||
if (stationaryCorner.indexOf('bottom') > -1 && !assumeConstantSize)
|
||||
rect.height = rect.bottom - swb.top;
|
||||
rect.top = swb.top;
|
||||
update = true;
|
||||
|
@ -258,7 +261,7 @@ Drag.prototype = {
|
|||
// Function: drag
|
||||
// Called in response to an <Item> draggable "drag" event.
|
||||
drag: function Drag_drag(event) {
|
||||
this.snap('topleft', true);
|
||||
this.snap(UI.rtl ? 'topright' : 'topleft', true);
|
||||
|
||||
if (this.parent && this.parent.expanded) {
|
||||
var distance = this.startPosition.distance(new Point(event.clientX, event.clientY));
|
||||
|
|
|
@ -175,16 +175,17 @@ function GroupItem(listOfEls, options) {
|
|||
if (!self.getTitle()) {
|
||||
self.$title
|
||||
.addClass("defaultName")
|
||||
.val(self.defaultName);
|
||||
.val(self.defaultName)
|
||||
.css({"background-image":null, "-moz-padding-start":null});
|
||||
} else {
|
||||
self.$title.css({"background":"none"});
|
||||
self.$title.css({"background-image":"none"});
|
||||
if (immediately) {
|
||||
self.$title.css({
|
||||
"padding-left": "1px"
|
||||
"-moz-padding-start": "1px"
|
||||
});
|
||||
} else {
|
||||
self.$title.animate({
|
||||
"padding-left": "1px"
|
||||
"-moz-padding-start": "1px"
|
||||
}, {
|
||||
duration: 200,
|
||||
easing: "tabviewBounce"
|
||||
|
@ -408,7 +409,8 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
|
|||
adjustTitleSize: function GroupItem_adjustTitleSize() {
|
||||
Utils.assert(this.bounds, 'bounds needs to have been set');
|
||||
let closeButton = iQ('.close', this.container);
|
||||
var w = Math.min(this.bounds.width - parseInt(closeButton.width()) - parseInt(closeButton.css('right')),
|
||||
var dimension = UI.rtl ? 'left' : 'right';
|
||||
var w = Math.min(this.bounds.width - parseInt(closeButton.width()) - parseInt(closeButton.css(dimension)),
|
||||
Math.max(150, this.getTitle().length * 6));
|
||||
// The * 6 multiplier calculation is assuming that characters in the title
|
||||
// are approximately 6 pixels wide. Bug 586545
|
||||
|
@ -1086,13 +1088,16 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
|
|||
// tab) / (the total available content width)
|
||||
|
||||
// first, find the right of the rightmost tab! luckily, they're in order.
|
||||
// TODO: does this change for rtl?
|
||||
var rightMostRight = 0;
|
||||
for each (var rect in rects) {
|
||||
if (rect.right > rightMostRight)
|
||||
rightMostRight = rect.right;
|
||||
else
|
||||
break;
|
||||
if (UI.rtl) {
|
||||
rightMostRight = rects[0].right;
|
||||
} else {
|
||||
for each (var rect in rects) {
|
||||
if (rect.right > rightMostRight)
|
||||
rightMostRight = rect.right;
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.xDensity = (rightMostRight - bb.left) / (bb.width);
|
||||
|
||||
|
@ -1177,7 +1182,7 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
|
|||
|
||||
child.addClass("stacked");
|
||||
child.setBounds(box, !animate);
|
||||
child.setRotation(self._randRotate(maxRotation, index));
|
||||
child.setRotation((UI.rtl ? -1 : 1) * self._randRotate(maxRotation, index));
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -1371,8 +1376,8 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
|
|||
// Function: setResizable
|
||||
// Sets whether the groupItem is resizable and updates the UI accordingly.
|
||||
setResizable: function GroupItem_setResizable(value, immediately) {
|
||||
this.resizeOptions.minWidth = 90;
|
||||
this.resizeOptions.minHeight = 90;
|
||||
this.resizeOptions.minWidth = 110;
|
||||
this.resizeOptions.minHeight = 125;
|
||||
|
||||
if (value) {
|
||||
immediately ? this.$resizer.show() : this.$resizer.fadeIn();
|
||||
|
|
|
@ -227,8 +227,7 @@ Item.prototype = {
|
|||
resizeInfo = new Drag(this, e, true); // true = isResizing
|
||||
},
|
||||
resize: function(e,ui) {
|
||||
// TODO: maybe the stationaryCorner should be topright for rtl langs?
|
||||
resizeInfo.snap('topleft', false, self.keepProportional);
|
||||
resizeInfo.snap(UI.rtl ? 'topright' : 'topleft', false, self.keepProportional);
|
||||
},
|
||||
stop: function() {
|
||||
self.setUserSize();
|
||||
|
@ -769,7 +768,16 @@ Item.prototype = {
|
|||
var handleMouseMove = function(e) {
|
||||
var mouse = new Point(e.pageX, e.pageY);
|
||||
var box = self.getBounds();
|
||||
box.width = Math.max(self.resizeOptions.minWidth || 0, startSize.x + (mouse.x - startMouse.x));
|
||||
if (UI.rtl) {
|
||||
var minWidth = (self.resizeOptions.minWidth || 0);
|
||||
var oldWidth = box.width;
|
||||
if (minWidth != oldWidth || mouse.x < startMouse.x) {
|
||||
box.width = Math.max(minWidth, startSize.x - (mouse.x - startMouse.x));
|
||||
box.left -= box.width - oldWidth;
|
||||
}
|
||||
} else {
|
||||
box.width = Math.max(self.resizeOptions.minWidth || 0, startSize.x + (mouse.x - startMouse.x));
|
||||
}
|
||||
box.height = Math.max(self.resizeOptions.minHeight || 0, startSize.y + (mouse.y - startMouse.y));
|
||||
|
||||
if (self.resizeOptions.aspectRatio) {
|
||||
|
@ -960,7 +968,12 @@ let Items = {
|
|||
if (options.return == 'widthAndColumns')
|
||||
return {childWidth: tabWidth, columns: columns};
|
||||
|
||||
var box = new Rect(bounds.left, bounds.top, tabWidth, tabHeight);
|
||||
let initialOffset = 0;
|
||||
if (UI.rtl) {
|
||||
initialOffset = bounds.width - tabWidth - padding;
|
||||
}
|
||||
var box = new Rect(bounds.left + initialOffset, bounds.top, tabWidth, tabHeight);
|
||||
|
||||
var column = 0;
|
||||
|
||||
for (let a = 0; a < count; a++) {
|
||||
|
@ -975,10 +988,10 @@ let Items = {
|
|||
}
|
||||
}
|
||||
|
||||
box.left += box.width + padding;
|
||||
box.left += (UI.rtl ? -1 : 1) * (box.width + padding);
|
||||
column++;
|
||||
if (column == columns) {
|
||||
box.left = bounds.left;
|
||||
box.left = bounds.left + initialOffset;
|
||||
box.top += (box.height * yScale) + padding;
|
||||
column = 0;
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ let AllTabs = {
|
|||
*
|
||||
* @param eventName
|
||||
* Name of the corresponding Tab* Event; one of "attrModified",
|
||||
* "close", "move", "open", "select".
|
||||
* "close", "move", "open", "select", "pinned", "unpinned".
|
||||
* @param callback
|
||||
* Callback that gets called with the tab as the first argument and
|
||||
* the event as the second argument.
|
||||
|
@ -79,7 +79,7 @@ let AllTabs = {
|
|||
*
|
||||
* @param eventName
|
||||
* Name of the corresponding Tab* Event; one of "attrModified",
|
||||
* "close", "move", "open", "select".
|
||||
* "close", "move", "open", "select", "pinned", "unpinned".
|
||||
* @param callback
|
||||
* The callback given for the original AllTabs.register call.
|
||||
* @usage AllTabs.unregister("close", handleClose);
|
||||
|
@ -107,7 +107,7 @@ __defineGetter__("browserWindows", function browserWindows() {
|
|||
return browserWindows;
|
||||
});
|
||||
|
||||
let events = ["attrModified", "close", "move", "open", "select"];
|
||||
let events = ["attrModified", "close", "move", "open", "select", "pinned", "unpinned"];
|
||||
let eventListeners = {};
|
||||
|
||||
function registerBrowserWindow(browserWindow) {
|
||||
|
|
|
@ -382,11 +382,19 @@ TabItem.prototype = Utils.extend(new Item(), new Subscribable(), {
|
|||
let widthRange, proportion;
|
||||
|
||||
if (this.inStack()) {
|
||||
$fav.css({top:0, left:0});
|
||||
if (UI.rtl) {
|
||||
$fav.css({top:0, right:0});
|
||||
} else {
|
||||
$fav.css({top:0, left:0});
|
||||
}
|
||||
widthRange = new Range(70, 90);
|
||||
proportion = widthRange.proportion(css.width); // between 0 and 1
|
||||
} else {
|
||||
$fav.css({top:4,left:4});
|
||||
if (UI.rtl) {
|
||||
$fav.css({top:4, right:2});
|
||||
} else {
|
||||
$fav.css({top:4, left:4});
|
||||
}
|
||||
widthRange = new Range(40, 45);
|
||||
proportion = widthRange.proportion(css.width); // between 0 and 1
|
||||
}
|
||||
|
@ -399,8 +407,8 @@ TabItem.prototype = Utils.extend(new Item(), new Subscribable(), {
|
|||
var pad = 1 + 5 * proportion;
|
||||
var alphaRange = new Range(0.1,0.2);
|
||||
$fav.css({
|
||||
"padding-left": pad + "px",
|
||||
"padding-right": pad + 2 + "px",
|
||||
"-moz-padding-start": pad + "px",
|
||||
"-moz-padding-end": pad + 2 + "px",
|
||||
"padding-top": pad + "px",
|
||||
"padding-bottom": pad + "px",
|
||||
"border-color": "rgba(0,0,0,"+ alphaRange.scale(proportion) +")",
|
||||
|
|
|
@ -207,6 +207,11 @@ body {
|
|||
z-index: 1000;
|
||||
}
|
||||
|
||||
html[dir=rtl] #search {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#searchbox{
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
|
@ -214,6 +219,11 @@ body {
|
|||
z-index: 1050;
|
||||
}
|
||||
|
||||
html[dir=rtl] #searchbox {
|
||||
right: auto;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
#actions{
|
||||
position: absolute;
|
||||
top: 100px;
|
||||
|
@ -221,12 +231,22 @@ body {
|
|||
z-index:10;
|
||||
}
|
||||
|
||||
html[dir=rtl] #actions {
|
||||
right: auto;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
#actions #searchbutton{
|
||||
position: relative;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
html[dir=rtl] #actions #searchbutton {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#otherresults{
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
|
|
|
@ -477,7 +477,7 @@ var Trenches = {
|
|||
// preferTop - (boolean) prefer snapping to the top to the bottom
|
||||
// preferLeft - (boolean) prefer snapping to the left to the right
|
||||
preferTop: true,
|
||||
preferLeft: true,
|
||||
get preferLeft() { return !UI.rtl; },
|
||||
|
||||
trenches: [],
|
||||
|
||||
|
|
|
@ -106,6 +106,9 @@ let UI = {
|
|||
try {
|
||||
let self = this;
|
||||
|
||||
// initialize the direction of the page
|
||||
this._initPageDirection();
|
||||
|
||||
// ___ storage
|
||||
Storage.init();
|
||||
let data = Storage.readUIData(gWindow);
|
||||
|
@ -244,7 +247,11 @@ let UI = {
|
|||
this._reorderTabsOnHide = null;
|
||||
this._frameInitialized = false;
|
||||
},
|
||||
|
||||
|
||||
// Property: rtl
|
||||
// Returns true if we are in RTL mode, false otherwise
|
||||
rtl: false,
|
||||
|
||||
// Function: reset
|
||||
// Resets the Panorama view to have just one group with all tabs
|
||||
// and, if firstTime == true, add the welcome video/tab
|
||||
|
@ -255,14 +262,20 @@ let UI = {
|
|||
pageBounds.inset(padding, padding);
|
||||
|
||||
let $actions = iQ("#actions");
|
||||
if ($actions)
|
||||
if ($actions) {
|
||||
pageBounds.width -= $actions.width();
|
||||
if (UI.rtl)
|
||||
pageBounds.left += $actions.width() - padding;
|
||||
}
|
||||
|
||||
// ___ make a fresh groupItem
|
||||
let box = new Rect(pageBounds);
|
||||
box.width = Math.min(box.width * 0.667,
|
||||
pageBounds.width - (welcomeWidth + padding));
|
||||
box.height = box.height * 0.667;
|
||||
if (UI.rtl) {
|
||||
box.left = pageBounds.left + welcomeWidth + 2 * padding;
|
||||
}
|
||||
|
||||
GroupItems.groupItems.forEach(function(group) {
|
||||
group.close();
|
||||
|
@ -291,7 +304,7 @@ let UI = {
|
|||
|
||||
newTabItem.parent.remove(newTabItem);
|
||||
let aspect = TabItems.tabHeight / TabItems.tabWidth;
|
||||
let welcomeBounds = new Rect(box.right + padding, box.top,
|
||||
let welcomeBounds = new Rect(UI.rtl ? pageBounds.left : box.right, box.top,
|
||||
welcomeWidth, welcomeWidth * aspect);
|
||||
newTabItem.setBounds(welcomeBounds, true);
|
||||
GroupItems.setActiveGroupItem(groupItem);
|
||||
|
@ -351,6 +364,17 @@ let UI = {
|
|||
return gTabViewDeck.selectedIndex == 1;
|
||||
},
|
||||
|
||||
// ---------
|
||||
// Function: _initPageDirection
|
||||
// Initializes the page base direction
|
||||
_initPageDirection: function UI__initPageDirection() {
|
||||
let chromeReg = Cc["@mozilla.org/chrome/chrome-registry;1"].
|
||||
getService(Ci.nsIXULChromeRegistry);
|
||||
let dir = chromeReg.isLocaleRTL("global");
|
||||
document.documentElement.setAttribute("dir", dir ? "rtl" : "ltr");
|
||||
this.rtl = dir;
|
||||
},
|
||||
|
||||
// ----------
|
||||
// Function: showTabView
|
||||
// Shows TabView and hides the main browser UI.
|
||||
|
@ -360,6 +384,9 @@ let UI = {
|
|||
if (this._isTabViewVisible())
|
||||
return;
|
||||
|
||||
// initialize the direction of the page
|
||||
this._initPageDirection();
|
||||
|
||||
var self = this;
|
||||
var currentTab = this._currentTab;
|
||||
var item = null;
|
||||
|
@ -619,31 +646,27 @@ let UI = {
|
|||
self.onTabSelect(tab);
|
||||
};
|
||||
|
||||
// TabPinned
|
||||
this._eventListeners.pinned = function(tab) {
|
||||
if (tab.ownerDocument.defaultView != gWindow)
|
||||
return;
|
||||
|
||||
TabItems.handleTabPin(tab);
|
||||
GroupItems.addAppTab(tab);
|
||||
};
|
||||
|
||||
// TabUnpinned
|
||||
this._eventListeners.unpinned = function(tab) {
|
||||
if (tab.ownerDocument.defaultView != gWindow)
|
||||
return;
|
||||
|
||||
TabItems.handleTabUnpin(tab);
|
||||
GroupItems.removeAppTab(tab);
|
||||
};
|
||||
|
||||
// Actually register the above handlers
|
||||
for (let name in this._eventListeners)
|
||||
AllTabs.register(name, this._eventListeners[name]);
|
||||
|
||||
// Start watching for tab pin events, and set up our uninit for same.
|
||||
function handleTabPin(event) {
|
||||
TabItems.handleTabPin(event.originalTarget);
|
||||
GroupItems.addAppTab(event.originalTarget);
|
||||
}
|
||||
|
||||
gBrowser.tabContainer.addEventListener("TabPinned", handleTabPin, false);
|
||||
this._cleanupFunctions.push(function() {
|
||||
gBrowser.tabContainer.removeEventListener("TabPinned", handleTabPin, false);
|
||||
});
|
||||
|
||||
// Start watching for tab unpin events, and set up our uninit for same.
|
||||
function handleTabUnpin(event) {
|
||||
TabItems.handleTabUnpin(event.originalTarget);
|
||||
GroupItems.removeAppTab(event.originalTarget);
|
||||
}
|
||||
|
||||
gBrowser.tabContainer.addEventListener("TabUnpinned", handleTabUnpin, false);
|
||||
this._cleanupFunctions.push(function() {
|
||||
gBrowser.tabContainer.removeEventListener("TabUnpinned", handleTabUnpin, false);
|
||||
});
|
||||
},
|
||||
|
||||
// ----------
|
||||
|
@ -1076,7 +1099,7 @@ let UI = {
|
|||
return;
|
||||
|
||||
var bounds = item.getBounds();
|
||||
bounds.left += newPageBounds.left - self._pageBounds.left;
|
||||
bounds.left += (UI.rtl ? -1 : 1) * (newPageBounds.left - self._pageBounds.left);
|
||||
bounds.left *= scale;
|
||||
bounds.width *= scale;
|
||||
|
||||
|
|
|
@ -160,6 +160,8 @@ _BROWSER_FILES = \
|
|||
browser_bug595507.js \
|
||||
browser_bug596687.js \
|
||||
browser_bug597218.js \
|
||||
browser_bug598923.js \
|
||||
browser_bug599325.js \
|
||||
browser_bug609700.js \
|
||||
browser_contextSearchTabPosition.js \
|
||||
browser_ctrlTab.js \
|
||||
|
|
|
@ -22,6 +22,10 @@ function check(aElementName, aBarred, aType) {
|
|||
"A tooltip should be shown when the element isn't valid");
|
||||
}
|
||||
|
||||
e.setAttribute('title', '');
|
||||
ok (!FillInHTMLTooltip(e),
|
||||
"No tooltip should be shown if the title attribute is set");
|
||||
|
||||
content.removeChild(e);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
// Test:
|
||||
// * if add-on is installed to the add-on bar, the bar is made visible.
|
||||
// * if add-on is uninstalled from the add-on bar, and no more add-ons there,
|
||||
// the bar is hidden.
|
||||
|
||||
function test() {
|
||||
let aml = AddonsMgrListener;
|
||||
ok(aml, "AddonsMgrListener exists");
|
||||
// check is hidden
|
||||
is(aml.addonBar.collapsed, true, "aob is hidden");
|
||||
// aob gets the count
|
||||
AddonsMgrListener.onInstalling();
|
||||
// add an item
|
||||
let element = document.createElement("toolbaritem");
|
||||
aml.addonBar.appendChild(element);
|
||||
// aob checks the count, makes visible
|
||||
AddonsMgrListener.onInstalled();
|
||||
// check is visible
|
||||
is(aml.addonBar.collapsed, false, "aob is visible");
|
||||
// aob gets the count
|
||||
AddonsMgrListener.onUninstalling();
|
||||
// remove an item
|
||||
aml.addonBar.removeChild(element);
|
||||
// aob checks the count, makes hidden
|
||||
AddonsMgrListener.onUninstalled();
|
||||
// check is hidden
|
||||
is(aml.addonBar.collapsed, true, "aob is hidden");
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
function test() {
|
||||
waitForExplicitFinish();
|
||||
|
||||
// test the main (normal) browser window
|
||||
testCustomize(window, testChromeless);
|
||||
}
|
||||
|
||||
function testChromeless() {
|
||||
// test a chromeless window
|
||||
var newWin = openDialog("chrome://browser/content/", "_blank",
|
||||
"chrome,dialog=no,toolbar=no", "about:blank");
|
||||
ok(newWin, "got new window");
|
||||
|
||||
function runWindowTest() {
|
||||
function finalize() {
|
||||
newWin.removeEventListener("load", runWindowTest, false);
|
||||
newWin.close();
|
||||
finish();
|
||||
}
|
||||
testCustomize(newWin, finalize);
|
||||
}
|
||||
|
||||
newWin.addEventListener("load", runWindowTest, false);
|
||||
}
|
||||
|
||||
function testCustomize(aWindow, aCallback) {
|
||||
var addonBar = aWindow.document.getElementById("addon-bar");
|
||||
ok(addonBar, "got addon bar");
|
||||
is(addonBar.collapsed, true, "addon bar initially disabled");
|
||||
|
||||
// Launch toolbar customization
|
||||
// ctEl is either iframe that contains the customize sheet, or the dialog
|
||||
var ctEl = aWindow.BrowserCustomizeToolbar();
|
||||
|
||||
is(addonBar.collapsed, false,
|
||||
"file menu is not collapsed during toolbar customization");
|
||||
|
||||
aWindow.gNavToolbox.addEventListener("beforecustomization", function () {
|
||||
aWindow.gNavToolbox.removeEventListener("beforecustomization", arguments.callee, false);
|
||||
executeSoon(ctInit);
|
||||
}, false);
|
||||
|
||||
function ctInit() {
|
||||
// Close toolbar customization
|
||||
closeToolbarCustomization(aWindow, ctEl);
|
||||
|
||||
is(addonBar.getAttribute("collapsed"), "true",
|
||||
"addon bar is collapsed after toolbar customization");
|
||||
|
||||
if (aCallback)
|
||||
aCallback();
|
||||
}
|
||||
}
|
||||
|
||||
function closeToolbarCustomization(aWindow, aCTWindow) {
|
||||
// Force the cleanup code to be run now instead of onunload.
|
||||
// This also hides the sheet on Mac.
|
||||
aCTWindow.finishToolbarCustomization();
|
||||
|
||||
// On windows and linux, need to explicitly close the window.
|
||||
if (!gCustomizeSheet)
|
||||
aCTWindow.close();
|
||||
}
|
|
@ -60,6 +60,13 @@ function test() {
|
|||
gBrowser.selectedTab = testTab;
|
||||
gBrowser.showOnlyTheseTabs([testTab]);
|
||||
|
||||
// if the tabview frame is initialized, we need to move the orignal tab to
|
||||
// another group; otherwise, selecting a tab would make all three tabs in
|
||||
// the same group to display.
|
||||
let tabViewWindow = TabView.getContentWindow();
|
||||
if (tabViewWindow)
|
||||
tabViewWindow.GroupItems.moveTabToGroupItem(origTab, null);
|
||||
|
||||
visible = gBrowser.visibleTabs;
|
||||
is(visible.length, 2, "2 tabs should be visible including the pinned");
|
||||
is(visible[0], pinned, "first is pinned");
|
||||
|
|
|
@ -44,10 +44,12 @@ include $(DEPTH)/config/autoconf.mk
|
|||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
_BROWSER_FILES = \
|
||||
browser_tabview_alltabs.js \
|
||||
browser_tabview_apptabs.js \
|
||||
browser_tabview_bug580412.js \
|
||||
browser_tabview_bug587043.js \
|
||||
browser_tabview_bug587990.js \
|
||||
browser_tabview_bug589324.js \
|
||||
browser_tabview_bug590606.js \
|
||||
browser_tabview_bug591706.js \
|
||||
browser_tabview_bug594176.js \
|
||||
|
@ -64,11 +66,13 @@ _BROWSER_FILES = \
|
|||
browser_tabview_launch.js \
|
||||
browser_tabview_orphaned_tabs.js \
|
||||
browser_tabview_privatebrowsing.js \
|
||||
browser_tabview_rtl.js \
|
||||
browser_tabview_search.js \
|
||||
browser_tabview_snapping.js \
|
||||
browser_tabview_startup_transitions.js \
|
||||
browser_tabview_undo_group.js \
|
||||
browser_tabview_firstrun_pref.js \
|
||||
dummy_page.html \
|
||||
head.js \
|
||||
search1.html \
|
||||
search2.html \
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* vim:set ts=2 sw=2 sts=2 et: */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
|
@ -12,17 +11,15 @@
|
|||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is DevTools test code.
|
||||
* The Original Code is a test for bug 595395.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Mozilla Foundation.
|
||||
* The Initial Developer of the Original Code is
|
||||
* Mozilla Foundation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2010
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* David Dahl <ddahl@mozilla.com>
|
||||
* Patrick Walton <pcwalton@mozilla.com>
|
||||
* Julian Viereck <jviereck@mozilla.com>
|
||||
* Mihai Sucan <mihai.sucan@gmail.com>
|
||||
* Raymond Lee <raymond@appcoast.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
|
@ -38,23 +35,38 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
// Tests the HUDService.getDisplayByURISpec() method.
|
||||
|
||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
|
||||
Cu.import("resource:///modules/tabview/AllTabs.jsm");
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
||||
browser.addEventListener("DOMContentLoaded", testGetDisplayByURISpec,
|
||||
false);
|
||||
}
|
||||
|
||||
function testGetDisplayByURISpec() {
|
||||
browser.removeEventListener("DOMContentLoaded", testGetDisplayByURISpec,
|
||||
false);
|
||||
openConsole();
|
||||
outputNode = HUDService.getDisplayByURISpec(TEST_URI);
|
||||
hudId = outputNode.getAttribute("id");
|
||||
ok(hudId == HUDService.displaysIndex()[0], "outputNode fetched by URIspec");
|
||||
finishTest();
|
||||
waitForExplicitFinish();
|
||||
|
||||
let newTab = gBrowser.addTab();
|
||||
|
||||
// TabPinned
|
||||
let pinned = function(tab) {
|
||||
is(tab, newTab, "The tabs are the same after the tab is pinned");
|
||||
ok(tab.pinned, "The tab gets pinned");
|
||||
|
||||
gBrowser.unpinTab(tab);
|
||||
};
|
||||
|
||||
// TabUnpinned
|
||||
let unpinned = function(tab) {
|
||||
AllTabs.unregister("pinned", pinned);
|
||||
AllTabs.unregister("unpinned", unpinned);
|
||||
|
||||
is(tab, newTab, "The tabs are the same after the tab is unpinned");
|
||||
ok(!tab.pinned, "The tab gets unpinned");
|
||||
|
||||
// clean up and finish
|
||||
gBrowser.removeTab(tab);
|
||||
finish();
|
||||
};
|
||||
|
||||
AllTabs.register("pinned", pinned);
|
||||
AllTabs.register("unpinned", unpinned);
|
||||
|
||||
ok(!newTab.pinned, "The tab is not pinned");
|
||||
gBrowser.pinTab(newTab);
|
||||
}
|
||||
|
|
@ -59,6 +59,7 @@ function onTabViewWindowLoaded() {
|
|||
// "There's currently 40 px between the first group and second group");
|
||||
|
||||
let endGame = function() {
|
||||
contentWindow.UI.reset();
|
||||
let onTabViewHidden = function() {
|
||||
window.removeEventListener("tabviewhidden", onTabViewHidden, false);
|
||||
ok(!TabView.isVisible(), "TabView is shown");
|
||||
|
@ -73,7 +74,6 @@ function onTabViewWindowLoaded() {
|
|||
}
|
||||
|
||||
let part1 = function() {
|
||||
// contentWindow.UI.reset();
|
||||
// move down 20 so we're far enough away from the top.
|
||||
checkSnap(currentActiveGroup, 0, 20, contentWindow, function(snapped){
|
||||
ok(!snapped,"Move away from the edge");
|
||||
|
@ -93,7 +93,9 @@ function onTabViewWindowLoaded() {
|
|||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
currentActiveGroup.setPosition(40, 40, true);
|
||||
currentActiveGroup.arrange({animate: false});
|
||||
part1();
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,127 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is bug 589324 test.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Mozilla Foundation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2010
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Raymond Lee <raymond@appcoast.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
function test() {
|
||||
const DUMMY_PAGE_URL = "http://mochi.test:8888/browser/browser/base/content/test/tabview/dummy_page.html";
|
||||
const DUMMY_PAGE_URL_2 = "http://mochi.test:8888/";
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
|
||||
waitForExplicitFinish();
|
||||
|
||||
// open a new window and setup the window state.
|
||||
let newWin = openDialog(getBrowserURL(), "_blank", "chrome,all,dialog=no");
|
||||
newWin.addEventListener("load", function(event) {
|
||||
this.removeEventListener("load", arguments.callee, false);
|
||||
|
||||
let newState = {
|
||||
windows: [{
|
||||
tabs: [{
|
||||
entries: [{ url: DUMMY_PAGE_URL }],
|
||||
hidden: true,
|
||||
attributes: {},
|
||||
extData: {
|
||||
"tabview-tab":
|
||||
'{"bounds":{"left":21,"top":29,"width":204,"height":153},' +
|
||||
'"userSize":null,"url":"' + DUMMY_PAGE_URL + '","groupID":1,' +
|
||||
'"imageData":null,"title":null}'
|
||||
}
|
||||
},{
|
||||
entries: [{ url: DUMMY_PAGE_URL_2 }],
|
||||
hidden: false,
|
||||
attributes: {},
|
||||
extData: {
|
||||
"tabview-tab":
|
||||
'{"bounds":{"left":315,"top":29,"width":111,"height":84},' +
|
||||
'"userSize":null,"url":"' + DUMMY_PAGE_URL_2 + '","groupID":2,' +
|
||||
'"imageData":null,"title":null}'
|
||||
},
|
||||
}],
|
||||
selected:2,
|
||||
_closedTabs: [],
|
||||
extData: {
|
||||
"tabview-groups": '{"nextID":3,"activeGroupId":2}',
|
||||
"tabview-group":
|
||||
'{"1":{"bounds":{"left":15,"top":5,"width":280,"height":232},' +
|
||||
'"userSize":null,"locked":{},"title":"","id":1},' +
|
||||
'"2":{"bounds":{"left":309,"top":5,"width":267,"height":226},' +
|
||||
'"userSize":null,"locked":{},"title":"","id":2}}',
|
||||
"tabview-ui": '{"pageBounds":{"left":0,"top":0,"width":788,"height":548}}'
|
||||
}, sizemode:"normal"
|
||||
}]
|
||||
};
|
||||
ss.setWindowState(newWin, JSON.stringify(newState), true);
|
||||
|
||||
let firstTab = newWin.gBrowser.tabs[0];
|
||||
let secondTab = newWin.gBrowser.tabs[1];
|
||||
|
||||
// wait until the first tab is fully loaded
|
||||
let browser = newWin.gBrowser.getBrowserForTab(firstTab);
|
||||
let onLoad = function() {
|
||||
browser.removeEventListener("load", onLoad, true);
|
||||
|
||||
is(browser.currentURI.spec, DUMMY_PAGE_URL,
|
||||
"The url of first tab url is dummy_page.html");
|
||||
|
||||
// check the hidden state of both tabs.
|
||||
ok(firstTab.hidden, "The first tab is hidden");
|
||||
ok(!secondTab.hidden, "The second tab is not hidden");
|
||||
is(secondTab, newWin.gBrowser.selectedTab, "The second tab is selected");
|
||||
|
||||
// when the second tab is hidden, the iframe should be initialized and
|
||||
// the first tab should be visible.
|
||||
let onTabHide = function() {
|
||||
newWin.gBrowser.tabContainer.addEventListener("TabHide", onTabHide, true);
|
||||
|
||||
ok(newWin.TabView.getContentWindow(), "");
|
||||
|
||||
ok(!firstTab.hidden, "The first tab is not hidden");
|
||||
is(firstTab, newWin.gBrowser.selectedTab, "The first tab is selected");
|
||||
ok(secondTab.hidden, "The second tab is hidden");
|
||||
|
||||
// clean up and finish
|
||||
newWin.close();
|
||||
|
||||
finish();
|
||||
};
|
||||
newWin.gBrowser.tabContainer.addEventListener("TabHide", onTabHide, true);
|
||||
|
||||
// switch to another tab
|
||||
newWin.switchToTabHavingURI(DUMMY_PAGE_URL);
|
||||
}
|
||||
browser.addEventListener("load", onLoad, true);
|
||||
}, false);
|
||||
}
|
|
@ -0,0 +1,96 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is tabview RTL support test.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Mozilla Foundation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2010
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Ehsan Akhgari <ehsan@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 ***** */
|
||||
|
||||
let tabViewShownCount = 0;
|
||||
|
||||
// ----------
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
|
||||
// verify initial state
|
||||
ok(!TabView.isVisible(), "Tab View starts hidden");
|
||||
|
||||
// use the Tab View button to launch it for the first time
|
||||
window.addEventListener("tabviewshown", onTabViewLoadedAndShown("ltr"), false);
|
||||
toggleTabView();
|
||||
}
|
||||
|
||||
function toggleTabView() {
|
||||
let button = document.getElementById("tabview-button");
|
||||
ok(button, "Tab View button exists");
|
||||
button.doCommand();
|
||||
}
|
||||
|
||||
// ----------
|
||||
function onTabViewLoadedAndShown(dir) {
|
||||
return function() {
|
||||
window.removeEventListener("tabviewshown", arguments.callee, false);
|
||||
ok(TabView.isVisible(), "Tab View is visible.");
|
||||
|
||||
let contentWindow = document.getElementById("tab-view").contentWindow;
|
||||
let contentDocument = contentWindow.document;
|
||||
is(contentDocument.documentElement.getAttribute("dir"), dir,
|
||||
"The direction should be set to " + dir.toUpperCase());
|
||||
|
||||
// kick off the series
|
||||
window.addEventListener("tabviewhidden", onTabViewHidden(dir), false);
|
||||
TabView.toggle();
|
||||
};
|
||||
}
|
||||
|
||||
// ----------
|
||||
function onTabViewHidden(dir) {
|
||||
return function() {
|
||||
window.removeEventListener("tabviewhidden", arguments.callee, false);
|
||||
ok(!TabView.isVisible(), "Tab View is hidden.");
|
||||
|
||||
if (dir == "ltr") {
|
||||
// Switch to RTL mode
|
||||
Services.prefs.setCharPref("intl.uidirection.en-US", "rtl");
|
||||
|
||||
// use the Tab View button to launch it for the second time
|
||||
window.addEventListener("tabviewshown", onTabViewLoadedAndShown("rtl"), false);
|
||||
toggleTabView();
|
||||
} else {
|
||||
// Switch to LTR mode
|
||||
Services.prefs.clearUserPref("intl.uidirection.en-US");
|
||||
|
||||
finish();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>This is a dummy test page</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>This is a dummy test page</p>
|
||||
</body>
|
||||
</html>
|
|
@ -200,6 +200,7 @@
|
|||
<method name="onBeforeValueSet">
|
||||
<parameter name="aValue"/>
|
||||
<body><![CDATA[
|
||||
this._hideOverLink();
|
||||
this._value = aValue;
|
||||
var returnValue = aValue;
|
||||
var action = this._parseActionUrl(aValue);
|
||||
|
@ -642,19 +643,21 @@
|
|||
<method name="setOverLink">
|
||||
<parameter name="aURL"/>
|
||||
<body><![CDATA[
|
||||
// If the over-link is already scheduled to appear or hide, cancel it.
|
||||
if (this._overLinkDelayTimer) {
|
||||
clearTimeout(this._overLinkDelayTimer);
|
||||
this._overLinkDelayTimer = null;
|
||||
this._cancelOverLinkDelayTimer();
|
||||
|
||||
// Hide the over-link immediately if necessary.
|
||||
if (!aURL && (XULBrowserWindow.hideOverLinkImmediately ||
|
||||
this._hideOverLinkImmediately)) {
|
||||
this._setOverLinkState(null);
|
||||
return;
|
||||
}
|
||||
|
||||
// Hide the over-link if aURL is falsey or if the URL bar is focused.
|
||||
if (!aURL || this.focused) {
|
||||
// If aURL is falsey, fade it out after a delay. This happens on
|
||||
// mouseout for example.
|
||||
if (!aURL) {
|
||||
this._overLinkDelayTimer = setTimeout(function overLinkOut(self) {
|
||||
self._overLinkDelayTimer = null;
|
||||
let style = window.getComputedStyle(self._overLinkBox, null);
|
||||
self._overLinkTransitioning = style.opacity != 0;
|
||||
self.removeAttribute("overlinkstate");
|
||||
self._setOverLinkState("fade-out");
|
||||
}, this._overLinkOutDelay, this);
|
||||
return;
|
||||
}
|
||||
|
@ -662,8 +665,7 @@
|
|||
// If it's in transition, update and show it immediately.
|
||||
if (this._overLinkTransitioning) {
|
||||
this._updateOverLink(aURL);
|
||||
this._overLinkTransitioning = false;
|
||||
this.setAttribute("overlinkstate", "showing");
|
||||
this._setOverLinkState("showing");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -673,13 +675,54 @@
|
|||
this._overLinkDelayTimer = setTimeout(function overLinkIn(self) {
|
||||
self._overLinkDelayTimer = null;
|
||||
self._updateOverLink(aURL);
|
||||
let style = window.getComputedStyle(self._overLinkBox, null);
|
||||
self._overLinkTransitioning = style.opacity != 1;
|
||||
self.setAttribute("overlinkstate", "fade-in");
|
||||
self._setOverLinkState("fade-in");
|
||||
}, this._overLinkInDelay, this);
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="_hideOverLink">
|
||||
<body><![CDATA[
|
||||
this._hideOverLinkImmediately = true;
|
||||
this.setOverLink("");
|
||||
this._hideOverLinkImmediately = false;
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="_cancelOverLinkDelayTimer">
|
||||
<body><![CDATA[
|
||||
if (this._overLinkDelayTimer) {
|
||||
clearTimeout(this._overLinkDelayTimer);
|
||||
this._overLinkDelayTimer = null;
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="_setOverLinkState">
|
||||
<parameter name="aVal"/>
|
||||
<body><![CDATA[
|
||||
switch (aVal) {
|
||||
case "fade-in":
|
||||
var style = window.getComputedStyle(this._overLinkBox);
|
||||
this._overLinkTransitioning = style.opacity != 1;
|
||||
this.setAttribute("overlinkstate", aVal);
|
||||
break;
|
||||
case "fade-out":
|
||||
style = window.getComputedStyle(this._overLinkBox);
|
||||
this._overLinkTransitioning = style.opacity != 0;
|
||||
this.setAttribute("overlinkstate", aVal);
|
||||
break;
|
||||
case "showing":
|
||||
this._overLinkTransitioning = false;
|
||||
this.setAttribute("overlinkstate", aVal);
|
||||
break;
|
||||
default:
|
||||
this._overLinkTransitioning = false;
|
||||
this.removeAttribute("overlinkstate");
|
||||
break;
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="_updateOverLink">
|
||||
<parameter name="aURL"/>
|
||||
<body><![CDATA[
|
||||
|
@ -761,8 +804,8 @@
|
|||
]]></handler>
|
||||
|
||||
<handler event="focus" phase="capturing"><![CDATA[
|
||||
this._hideOverLink();
|
||||
this._hideURLTooltip();
|
||||
this.setOverLink(null);
|
||||
]]></handler>
|
||||
|
||||
<handler event="dragover" phase="capturing" action="this.onDragOver(event, this);"/>
|
||||
|
|
|
@ -14,8 +14,9 @@ pref("app.update.url.manual", "http://nightly.mozilla.org/");
|
|||
// supplied in the "An update is available" page of the update wizard.
|
||||
pref("app.update.url.details", "http://www.mozilla.org/projects/%APP%/");
|
||||
|
||||
// Release notes URL
|
||||
// Release notes and vendor URLs
|
||||
pref("app.releaseNotesURL", "http://www.mozilla.org/projects/%APP%/%VERSION%/releasenotes/");
|
||||
pref("app.vendorURL", "http://www.mozilla.org/projects/%APP%/");
|
||||
|
||||
// Search codes belong only in builds with official branding
|
||||
pref("browser.search.param.yahoo-fr", "");
|
||||
|
|
|
@ -14,8 +14,9 @@ pref("app.update.url.manual", "http://www.mozilla.org/products/%APP%/");
|
|||
// supplied in the "An update is available" page of the update wizard.
|
||||
pref("app.update.url.details", "http://www.mozilla.org/projects/%APP%/");
|
||||
|
||||
// Release notes URL
|
||||
// Release notes and vendor URLs
|
||||
pref("app.releaseNotesURL", "http://www.mozilla.org/projects/%APP%/%VERSION%/releasenotes/");
|
||||
pref("app.vendorURL", "http://www.mozilla.org/projects/%APP%/");
|
||||
|
||||
// Search codes belong only in builds with official branding
|
||||
pref("browser.search.param.yahoo-fr", "");
|
||||
|
|
|
@ -567,6 +567,7 @@ PlacesViewBase.prototype = {
|
|||
nodeLastModifiedChanged: function() { },
|
||||
nodeKeywordChanged: function() { },
|
||||
sortingChanged: function() { },
|
||||
batching: function() { },
|
||||
// Replaced by containerStateChanged.
|
||||
containerOpened: function() { },
|
||||
containerClosed: function() { },
|
||||
|
@ -658,8 +659,9 @@ PlacesViewBase.prototype = {
|
|||
if ("_isRTL" in this)
|
||||
return this._isRTL;
|
||||
|
||||
return this._isRTL = document.defaultView.getComputedStyle(this, "")
|
||||
.direction == "rtl"
|
||||
return this._isRTL = document.defaultView
|
||||
.getComputedStyle(this.viewElt, "")
|
||||
.direction == "rtl";
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -1035,7 +1037,7 @@ PlacesToolbar.prototype = {
|
|||
|
||||
// XXX (bug 508816) Scrollbox does not handle correctly RTL mode.
|
||||
// This workarounds the issue scrolling the box to the right.
|
||||
if (this._isRTL)
|
||||
if (this.isRTL)
|
||||
this._rootElt.scrollLeft = this._rootElt.scrollWidth;
|
||||
|
||||
// Update the chevron on a timer. This will avoid repeated work when
|
||||
|
@ -1054,8 +1056,9 @@ PlacesToolbar.prototype = {
|
|||
// Once a child overflows, all the next ones will.
|
||||
if (!childOverflowed) {
|
||||
let childRect = child.getBoundingClientRect();
|
||||
childOverflowed = this._isRTL ? (childRect.left < scrollRect.left)
|
||||
: (childRect.right > scrollRect.right);
|
||||
childOverflowed = this.isRTL ? (childRect.left < scrollRect.left)
|
||||
: (childRect.right > scrollRect.right);
|
||||
|
||||
}
|
||||
child.style.visibility = childOverflowed ? "hidden" : "visible";
|
||||
}
|
||||
|
@ -1260,16 +1263,16 @@ PlacesToolbar.prototype = {
|
|||
// If we are in the middle of it, drop inside it.
|
||||
// Otherwise, drop before it, with regards to RTL mode.
|
||||
let threshold = eltRect.width * 0.25;
|
||||
if (this._isRTL ? (aEvent.clientX > eltRect.right - threshold)
|
||||
: (aEvent.clientX < eltRect.left + threshold)) {
|
||||
if (this.isRTL ? (aEvent.clientX > eltRect.right - threshold)
|
||||
: (aEvent.clientX < eltRect.left + threshold)) {
|
||||
// Drop before this folder.
|
||||
dropPoint.ip =
|
||||
new InsertionPoint(PlacesUtils.getConcreteItemId(this._resultNode),
|
||||
eltIndex, Ci.nsITreeView.DROP_BEFORE);
|
||||
dropPoint.beforeIndex = eltIndex;
|
||||
}
|
||||
else if (this._isRTL ? (aEvent.clientX > eltRect.left + threshold)
|
||||
: (aEvent.clientX < eltRect.right - threshold)) {
|
||||
else if (this.isRTL ? (aEvent.clientX > eltRect.left + threshold)
|
||||
: (aEvent.clientX < eltRect.right - threshold)) {
|
||||
// Drop inside this folder.
|
||||
dropPoint.ip =
|
||||
new InsertionPoint(PlacesUtils.getConcreteItemId(elt._placesNode),
|
||||
|
@ -1294,8 +1297,8 @@ PlacesToolbar.prototype = {
|
|||
// This is a non-folder node or a read-only folder.
|
||||
// Drop before it with regards to RTL mode.
|
||||
let threshold = eltRect.width * 0.5;
|
||||
if (this._isRTL ? (aEvent.clientX > eltRect.left + threshold)
|
||||
: (aEvent.clientX < eltRect.left + threshold)) {
|
||||
if (this.isRTL ? (aEvent.clientX > eltRect.left + threshold)
|
||||
: (aEvent.clientX < eltRect.left + threshold)) {
|
||||
// Drop before this bookmark.
|
||||
dropPoint.ip =
|
||||
new InsertionPoint(PlacesUtils.getConcreteItemId(this._resultNode),
|
||||
|
@ -1479,7 +1482,7 @@ PlacesToolbar.prototype = {
|
|||
let ind = this._dropIndicator;
|
||||
let halfInd = ind.clientWidth / 2;
|
||||
let translateX;
|
||||
if (this._isRTL) {
|
||||
if (this.isRTL) {
|
||||
halfInd = Math.ceil(halfInd);
|
||||
translateX = 0 - this._rootElt.getBoundingClientRect().right - halfInd;
|
||||
if (this._rootElt.firstChild) {
|
||||
|
|
|
@ -1012,6 +1012,24 @@ PlacesTreeView.prototype = {
|
|||
}
|
||||
},
|
||||
|
||||
_inBatchMode: false,
|
||||
batching: function PTV__batching(aToggleMode) {
|
||||
if (aToggleMode) {
|
||||
this._inBatchMode = true;
|
||||
if (this.selection) {
|
||||
this.selection.selectEventsSuppressed = true;
|
||||
}
|
||||
this._tree.beginUpdateBatch();
|
||||
}
|
||||
else if (this._inBatchMode){
|
||||
this._inBatchMode = false;
|
||||
if (this.selection) {
|
||||
this.selection.selectEventsSuppressed = false;
|
||||
}
|
||||
this._tree.endUpdateBatch();
|
||||
}
|
||||
},
|
||||
|
||||
get result() this._result,
|
||||
set result(val) {
|
||||
if (this._result) {
|
||||
|
|
|
@ -57,7 +57,7 @@ _BROWSER_TEST_FILES = \
|
|||
browser_library_search.js \
|
||||
browser_history_sidebar_search.js \
|
||||
browser_bookmarksProperties.js \
|
||||
browser_forgetthissite_single.js \
|
||||
$(warning browser_forgetthissite_single.js temporarily disabled because of very frequent oranges, see bug 551540) \
|
||||
browser_library_left_pane_commands.js \
|
||||
browser_drag_bookmarks_on_toolbar.js \
|
||||
browser_library_middleclick.js \
|
||||
|
|
|
@ -254,7 +254,7 @@ var bookmarksObserver = {
|
|||
break;
|
||||
}
|
||||
// Fallback to separator case if this is not a query.
|
||||
case type == PlacesUtils.bookmarks.TYPE_SEPARATOR:
|
||||
case PlacesUtils.bookmarks.TYPE_SEPARATOR:
|
||||
is(node, null, "New Places node not added in left pane");
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -94,6 +94,9 @@ function PrivateBrowsingService() {
|
|||
this._obs.addObserver(this, "private-browsing", true);
|
||||
this._obs.addObserver(this, "command-line-startup", true);
|
||||
this._obs.addObserver(this, "sessionstore-browser-state-restored", true);
|
||||
|
||||
// List of nsIXULWindows we are going to be closing during the transition
|
||||
this._windowsToClose = [];
|
||||
}
|
||||
|
||||
PrivateBrowsingService.prototype = {
|
||||
|
@ -126,9 +129,6 @@ PrivateBrowsingService.prototype = {
|
|||
// List of view source window URIs for restoring later
|
||||
_viewSrcURLs: [],
|
||||
|
||||
// List of nsIXULWindows we are going to be closing during the transition
|
||||
_windowsToClose: [],
|
||||
|
||||
// Whether private browsing has been turned on from the command line
|
||||
_lastChangedByCommandLine: false,
|
||||
|
||||
|
|
|
@ -1459,13 +1459,6 @@ SessionStoreService.prototype = {
|
|||
tabData.pinned = true;
|
||||
else
|
||||
delete tabData.pinned;
|
||||
if (browser.userTypedValue) {
|
||||
tabData.userTypedValue = browser.userTypedValue;
|
||||
tabData.userTypedClear = browser.userTypedClear;
|
||||
} else {
|
||||
delete tabData.userTypedValue;
|
||||
delete tabData.userTypedClear;
|
||||
}
|
||||
return tabData;
|
||||
}
|
||||
|
||||
|
|
|
@ -39,28 +39,24 @@ function test() {
|
|||
let tab2 = gBrowser.addTab("about:credits");
|
||||
tab1.addEventListener("load", mainPart, true);
|
||||
waitForExplicitFinish();
|
||||
|
||||
|
||||
function mainPart() {
|
||||
// Tell the session storer that the tab is pinned
|
||||
// and that userTypedValue is "Hello World!"
|
||||
let newTabState = '{"entries":[{"url":"about:robots"}],"pinned":true,"userTypedValue":"Hello World!"}';
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"]
|
||||
.getService(Ci.nsISessionStore);
|
||||
ss.setTabState(tab1, newTabState);
|
||||
|
||||
// Undo pinning and userTypedValue
|
||||
// Undo pinning
|
||||
gBrowser.unpinTab(tab1);
|
||||
tab1.linkedBrowser.userTypedValue = null;
|
||||
|
||||
is(tab1.linkedBrowser.__SS_data._tabStillLoading, true,
|
||||
"_tabStillLoading should be true.");
|
||||
|
||||
|
||||
// Close and restore tab
|
||||
gBrowser.removeTab(tab1);
|
||||
let savedState = JSON.parse(ss.getClosedTabData(window))[0].state;
|
||||
isnot(savedState.pinned, true, "Pinned should not be true");
|
||||
isnot(savedState.userTypedValue, "Hello World!",
|
||||
"userTypedValue should not be Hello World!");
|
||||
tab1 = ss.undoCloseTab(window, 0);
|
||||
|
||||
isnot(tab1.pinned, true, "Should not be pinned");
|
||||
|
|
|
@ -69,10 +69,20 @@ function runNextTest() {
|
|||
|
||||
// set an empty state & run the next test, or finish
|
||||
if (tests.length) {
|
||||
// Enumerate windows and close everything but our primary window. We can't
|
||||
// use waitForFocus() because apparently it's buggy. See bug 599253.
|
||||
var windowsEnum = Services.wm.getEnumerator("navigator:browser");
|
||||
while (windowsEnum.hasMoreElements()) {
|
||||
var currentWindow = windowsEnum.getNext();
|
||||
if (currentWindow != window) {
|
||||
currentWindow.close();
|
||||
}
|
||||
}
|
||||
|
||||
ss.setBrowserState(JSON.stringify({ windows: [{ tabs: [{ url: 'about:blank' }] }] }));
|
||||
let test = tests.shift();
|
||||
info("running " + test.name);
|
||||
executeSoon(test);
|
||||
let currentTest = tests.shift();
|
||||
info("running " + currentTest.name);
|
||||
executeSoon(currentTest);
|
||||
}
|
||||
else {
|
||||
ss.setBrowserState(stateBackup);
|
||||
|
|
|
@ -129,6 +129,46 @@ function test()
|
|||
testDefaultArgs();
|
||||
}
|
||||
|
||||
var gWindowCatcher = {
|
||||
windowsOpen: 0,
|
||||
finishCalled: false,
|
||||
start: function() {
|
||||
Services.ww.registerNotification(this);
|
||||
},
|
||||
|
||||
finish: function(aFunc) {
|
||||
Services.ww.unregisterNotification(this);
|
||||
this.finishFunc = aFunc;
|
||||
if (this.windowsOpen > 0)
|
||||
return;
|
||||
|
||||
this.finishFunc();
|
||||
},
|
||||
|
||||
closeWindow: function (win) {
|
||||
info("window catcher closing window: " + win.document.documentURI);
|
||||
win.close();
|
||||
this.windowsOpen--;
|
||||
if (this.finishFunc) {
|
||||
this.finish(this.finishFunc);
|
||||
}
|
||||
},
|
||||
|
||||
windowLoad: function (win) {
|
||||
executeSoon(this.closeWindow.bind(this, win));
|
||||
},
|
||||
|
||||
observe: function(subject, topic, data) {
|
||||
if (topic != "domwindowopened")
|
||||
return;
|
||||
|
||||
this.windowsOpen++;
|
||||
let win = subject.QueryInterface(Ci.nsIDOMWindow);
|
||||
info("window catcher caught window opening: " + win.document.documentURI);
|
||||
win.addEventListener("load", this.windowLoad.bind(this, win), false);
|
||||
}
|
||||
};
|
||||
|
||||
function finish_test()
|
||||
{
|
||||
// Reset browser.startup.homepage_override.mstone to the original value or
|
||||
|
@ -259,6 +299,10 @@ function testShowNotification()
|
|||
let gTestBrowser = gBrowser.selectedBrowser;
|
||||
let notifyBox = gBrowser.getNotificationBox(gTestBrowser);
|
||||
|
||||
// Catches any windows opened by these tests (e.g. alert windows) and closes
|
||||
// them
|
||||
gWindowCatcher.start();
|
||||
|
||||
for (let i = 0; i < BG_NOTIFY_TESTS.length; i++) {
|
||||
let test = BG_NOTIFY_TESTS[i];
|
||||
ok(true, "Test showNotification " + (i + 1) + ": " + test.description);
|
||||
|
@ -310,14 +354,18 @@ function testShowNotification()
|
|||
// The last test opens an url and verifies the url from the updates.xml
|
||||
// is correct.
|
||||
if (i == (BG_NOTIFY_TESTS.length - 1)) {
|
||||
button.click();
|
||||
gBrowser.selectedBrowser.addEventListener("load", testNotificationURL, true);
|
||||
// Wait for any windows caught by the windowcatcher to close
|
||||
gWindowCatcher.finish(function () {
|
||||
button.click();
|
||||
gBrowser.selectedBrowser.addEventListener("load", testNotificationURL, true);
|
||||
});
|
||||
} else {
|
||||
notifyBox.removeAllNotifications(true);
|
||||
}
|
||||
} else if (i == (BG_NOTIFY_TESTS.length - 1)) {
|
||||
// If updateBox is null the test has already reported errors so bail
|
||||
finish_test();
|
||||
}
|
||||
notifyBox.removeAllNotifications(true);
|
||||
} else {
|
||||
ok(!updateBox, "Update notification box should not have been displayed");
|
||||
}
|
||||
|
|
|
@ -271,6 +271,8 @@
|
|||
@BINPATH@/components/zipwriter.xpt
|
||||
|
||||
; JavaScript components
|
||||
@BINPATH@/components/ConsoleAPI.manifest
|
||||
@BINPATH@/components/ConsoleAPI.js
|
||||
@BINPATH@/components/FeedProcessor.manifest
|
||||
@BINPATH@/components/FeedProcessor.js
|
||||
@BINPATH@/components/BrowserFeeds.manifest
|
||||
|
|
|
@ -369,6 +369,8 @@ Section "-Application" APP_IDX
|
|||
|
||||
StrCpy $0 "Software\Microsoft\MediaPlayer\ShimInclusionList\$R9"
|
||||
${CreateRegKey} "$TmpVal" "$0" 0
|
||||
StrCpy $0 "Software\Microsoft\MediaPlayer\ShimInclusionList\plugin-container.exe"
|
||||
${CreateRegKey} "$TmpVal" "$0" 0
|
||||
|
||||
${If} $TmpVal == "HKLM"
|
||||
; Set the permitted LSP Categories for WinVista and above
|
||||
|
|
|
@ -298,6 +298,9 @@ Section "Uninstall"
|
|||
StrCpy $0 "Software\Microsoft\MediaPlayer\ShimInclusionList\${FileMainEXE}"
|
||||
DeleteRegKey HKLM "$0"
|
||||
DeleteRegKey HKCU "$0"
|
||||
StrCpy $0 "Software\Microsoft\MediaPlayer\ShimInclusionList\plugin-container.exe"
|
||||
DeleteRegKey HKLM "$0"
|
||||
DeleteRegKey HKCU "$0"
|
||||
StrCpy $0 "Software\Classes\MIME\Database\Content Type\application/x-xpinstall;app=firefox"
|
||||
DeleteRegKey HKLM "$0"
|
||||
DeleteRegKey HKCU "$0"
|
||||
|
|
|
@ -92,11 +92,9 @@
|
|||
<!-- Confirm Merge Options -->
|
||||
<!ENTITY setup.optionsConfirmPage.title "Confirm">
|
||||
<!ENTITY confirm.merge.label "&syncBrand.fullName.label; will now merge all this computer's browser data into your Sync account.">
|
||||
<!ENTITY confirm.client.label "All &brandShortName; data on this computer will be deleted, including the following:">
|
||||
<!ENTITY confirm.client2.label "Warning: The following &brandShortName; data on this computer will be deleted:">
|
||||
<!ENTITY confirm.client.moreinfo.label "&brandShortName; will then copy your &syncBrand.fullName.label; data to this computer.">
|
||||
<!ENTITY confirm.client.warning.label "WARNING: This will result in all &brandShortName; data on this computer being replaced!">
|
||||
<!ENTITY confirm.server.label "The following devices will be overwritten with your local data:">
|
||||
<!ENTITY confirm.server.warning.label "WARNING: Your local data will replace all &brandShortName; data on these devices!">
|
||||
<!ENTITY confirm.server2.label "Warning: The following devices will be overwritten with your local data:">
|
||||
|
||||
<!-- New & Existing Account: Setup Complete -->
|
||||
<!ENTITY setup.successPage.title "Setup Complete">
|
||||
|
|
|
@ -13,7 +13,10 @@ body {
|
|||
----------------------------------*/
|
||||
|
||||
.tab {
|
||||
padding: 4px 6px 6px 4px;
|
||||
padding-top: 4px;
|
||||
-moz-padding-end: 6px;
|
||||
padding-bottom: 6px;
|
||||
-moz-padding-start: 4px;
|
||||
background-color: #D7D7D7;
|
||||
border-radius: 0.4em;
|
||||
box-shadow: 0 1px 0 #FFFFFF inset,
|
||||
|
@ -25,6 +28,14 @@ body {
|
|||
margin: 4px;
|
||||
}
|
||||
|
||||
html[dir=rtl] .tab {
|
||||
box-shadow: 0 1px 0 #FFFFFF inset,
|
||||
0 -1px 1px rgba(255, 255, 255, 0.4) inset,
|
||||
-1px 0 1px rgba(255, 255, 255, 0.4) inset,
|
||||
1px 0 1px rgba(255, 255, 255, 0.4) inset,
|
||||
0 1px 1.5px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
.tab canvas,
|
||||
.cached-thumb {
|
||||
border: 1px solid rgba(0,0,0,0.2);
|
||||
|
@ -35,21 +46,40 @@ body {
|
|||
background-color: white;
|
||||
}
|
||||
|
||||
html[dir=rtl] .thumb {
|
||||
box-shadow: -1px 2px 0 rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.favicon {
|
||||
background-color: #D7D7D7;
|
||||
border-bottom-right-radius: 0.4em;
|
||||
box-shadow:
|
||||
0 -1px 0 rgba(225, 225, 225, 0.8) inset,
|
||||
-1px 0 0 rgba(225, 225, 225, 0.8) inset;
|
||||
padding: 4px 6px 6px 4px;
|
||||
padding-top: 4px;
|
||||
-moz-padding-end: 6px;
|
||||
padding-bottom: 6px;
|
||||
-moz-padding-start: 4px;
|
||||
top: 4px;
|
||||
left: 4px;
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.3);
|
||||
-moz-border-end: 1px solid rgba(0, 0, 0, 0.3);
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.3);
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
html[dir=ltr] .favicon {
|
||||
border-bottom-right-radius: 0.4em;
|
||||
}
|
||||
|
||||
html[dir=rtl] .favicon {
|
||||
border-bottom-left-radius: 0.4em;
|
||||
box-shadow:
|
||||
0 -1px 0 rgba(225, 225, 225, 0.8) inset,
|
||||
1px 0 0 rgba(225, 225, 225, 0.8) inset;
|
||||
left: auto;
|
||||
right: 2px;
|
||||
}
|
||||
|
||||
.favicon img {
|
||||
border: none;
|
||||
width: 16px;
|
||||
|
@ -65,6 +95,11 @@ body {
|
|||
background: url("moz-icon://stock/gtk-close?size=menu") no-repeat;
|
||||
}
|
||||
|
||||
html[dir=rtl] .close {
|
||||
right: auto;
|
||||
left: 6px;
|
||||
}
|
||||
|
||||
.close:hover {
|
||||
opacity: 1.0;
|
||||
}
|
||||
|
@ -78,6 +113,12 @@ body {
|
|||
opacity: 0.2;
|
||||
}
|
||||
|
||||
html[dir=rtl] .expander {
|
||||
right: auto;
|
||||
left: 6px;
|
||||
-moz-transform: scaleX(-1);
|
||||
}
|
||||
|
||||
.expander:hover {
|
||||
opacity: 1.0;
|
||||
}
|
||||
|
@ -112,12 +153,20 @@ body {
|
|||
box-shadow: rgba(0,0,0,.2) 1px 1px 4px;
|
||||
}
|
||||
|
||||
html[dir=rtl] .stacked .thumb {
|
||||
box-shadow: rgba(0,0,0,.2) -1px 1px 4px;
|
||||
}
|
||||
|
||||
.stack-trayed .tab-title {
|
||||
text-shadow: rgba(0,0,0,1) 1px 1px 1.5px;
|
||||
color: #EEE;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
html[dir=rtl] .stack-trayed .tab-title {
|
||||
text-shadow: rgba(0,0,0,1) -1px 1px 1.5px;
|
||||
}
|
||||
|
||||
.stack-trayed .thumb {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
@ -159,11 +208,22 @@ body {
|
|||
rgba(0,0,0,0.2) 1px 1px 3px;
|
||||
}
|
||||
|
||||
html[dir=rtl] .groupItem {
|
||||
box-shadow:
|
||||
inset rgba(255, 255, 255, 0.6) 0 0 0 2px,
|
||||
rgba(0,0,0,0.2) -1px 1px 3px;
|
||||
}
|
||||
|
||||
.groupItem.activeGroupItem {
|
||||
box-shadow:
|
||||
rgba(0,0,0,0.6) 1px 1px 5.5px;
|
||||
}
|
||||
|
||||
html[dir=rtl] .groupItem.activeGroupItem {
|
||||
box-shadow:
|
||||
rgba(0,0,0,0.6) -1px 1px 5.5px;
|
||||
}
|
||||
|
||||
.phantom {
|
||||
border: 1px solid rgba(190,190,190,1);
|
||||
}
|
||||
|
@ -172,12 +232,10 @@ body {
|
|||
background-color: rgba(0,0,0,.7) !important;
|
||||
box-shadow: 3px 3px 5.5px rgba(0,0,0,.5);
|
||||
border-radius: 0.4em;
|
||||
/*
|
||||
border: 1px solid rgba(230,230,230,1);
|
||||
background-color: rgba(248,248,248,1);
|
||||
box-shadow:
|
||||
rgba(0,0,0, .3) 2px 2px 5.5px,
|
||||
inset rgba(255, 255, 255, 0.6) 0 0 0 2px; */
|
||||
}
|
||||
|
||||
html[dir=rtl] .overlay {
|
||||
box-shadow: -3px 3px 5.5px rgba(0,0,0,.5);
|
||||
}
|
||||
|
||||
.appTabTray {
|
||||
|
@ -185,6 +243,11 @@ body {
|
|||
right: 1px;
|
||||
}
|
||||
|
||||
html[dir=rtl] .appTabTray {
|
||||
right: auto;
|
||||
left: 1px;
|
||||
}
|
||||
|
||||
.appTabIcon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
|
@ -215,6 +278,11 @@ body {
|
|||
opacity: 0.5;
|
||||
}
|
||||
|
||||
html[dir=rtl] .undo .close {
|
||||
left: auto;
|
||||
right: 4px;
|
||||
}
|
||||
|
||||
.undo .close:hover{
|
||||
opacity: 1.0;
|
||||
}
|
||||
|
@ -233,6 +301,12 @@ body {
|
|||
rgba(0,0,0, .2) 1px 1px 3px;
|
||||
}
|
||||
|
||||
html[dir=rtl] .info-item {
|
||||
box-shadow:
|
||||
inset rgba(255, 255, 255, 0.6) 0 0 0 2px,
|
||||
rgba(0,0,0, .2) -1px 1px 3px;
|
||||
}
|
||||
|
||||
.intro {
|
||||
margin: 10px;
|
||||
}
|
||||
|
@ -244,7 +318,11 @@ body {
|
|||
opacity: 0.9;
|
||||
border: 1px dashed rgba(0,0,0,.12);
|
||||
border-bottom: none;
|
||||
border-right: none;
|
||||
-moz-border-end: none;
|
||||
box-shadow: 1px 1px 0 rgba(255,255,255,.15);
|
||||
}
|
||||
|
||||
html[dir=rtl] .guideTrench {
|
||||
box-shadow: 1px 1px 0 rgba(255,255,255,.15);
|
||||
}
|
||||
|
||||
|
@ -283,6 +361,11 @@ body {
|
|||
background-image: url(chrome://browser/skin/tabview/new-tab.png);
|
||||
}
|
||||
|
||||
html[dir=rtl] .newTabButton {
|
||||
left: auto;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
.newTabButton:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
@ -291,10 +374,18 @@ body {
|
|||
box-shadow: 5px 5px 3px rgba(0,0,0,.5);
|
||||
}
|
||||
|
||||
html[dir=rtl] .active {
|
||||
box-shadow: -5px 5px 3px rgba(0,0,0,.5);
|
||||
}
|
||||
|
||||
.acceptsDrop {
|
||||
box-shadow: 2px 2px 7px -1px rgba(0,0,0,.6);
|
||||
}
|
||||
|
||||
html[dir=rtl] .acceptsDrop {
|
||||
box-shadow: -2px 2px 7px -1px rgba(0,0,0,.6);
|
||||
}
|
||||
|
||||
.titlebar {
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
|
@ -305,10 +396,17 @@ input.name {
|
|||
background: transparent;
|
||||
border: 1px solid transparent;
|
||||
color: #999;
|
||||
margin: 3px 0px 0px 3px;
|
||||
margin-top: 3px;
|
||||
-moz-margin-end: 0;
|
||||
margin-bottom: 0;
|
||||
-moz-margin-start: 3px;
|
||||
padding: 1px;
|
||||
background-image: url(chrome://browser/skin/tabview/edit-light.png);
|
||||
padding-left: 20px;
|
||||
-moz-padding-start: 20px;
|
||||
}
|
||||
|
||||
html[dir=rtl] input.name {
|
||||
background-position: right top;
|
||||
}
|
||||
|
||||
.title-container:hover input.name {
|
||||
|
@ -339,7 +437,10 @@ input.defaultName {
|
|||
}
|
||||
|
||||
.title-shield {
|
||||
margin: 3px 0px 0px 3px;
|
||||
margin-top: 3px;
|
||||
-moz-margin-end: 0;
|
||||
margin-bottom: 0;
|
||||
-moz-margin-start: 3px;
|
||||
padding: 1px;
|
||||
left: 0;
|
||||
top: 0;
|
||||
|
@ -347,6 +448,11 @@ input.defaultName {
|
|||
height: 100%;
|
||||
}
|
||||
|
||||
html[dir=rtl] .title-shield {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.transparentBorder {
|
||||
border: 1px solid transparent !important;
|
||||
}
|
||||
|
@ -374,6 +480,12 @@ input.defaultName {
|
|||
opacity: .2;
|
||||
}
|
||||
|
||||
html[dir=rtl] .resizer {
|
||||
right: auto;
|
||||
left: 0;
|
||||
-moz-transform: scaleX(-1);
|
||||
}
|
||||
|
||||
.iq-resizable-handle {
|
||||
font-size: 0.1px;
|
||||
}
|
||||
|
@ -386,6 +498,12 @@ input.defaultName {
|
|||
bottom: 1px;
|
||||
}
|
||||
|
||||
html[dir=rtl] .iq-resizable-se {
|
||||
cursor: sw-resize;
|
||||
right: auto;
|
||||
left: 1px;
|
||||
}
|
||||
|
||||
/* Exit button
|
||||
+----------------------------------*/
|
||||
#exit-button {
|
||||
|
@ -396,11 +514,17 @@ input.defaultName {
|
|||
height: 27px;
|
||||
background: -moz-image-rect(url(chrome://browser/skin/tabview/tabview.png), 0, 16, 16, 0) no-repeat scroll 7px 7px #b7b7b7;
|
||||
border-bottom: 1px solid #909090;
|
||||
border-left: 1px solid #B7B7B7;
|
||||
-moz-border-start: 1px solid #B7B7B7;
|
||||
border-top: 1px solid #CFCFCF;
|
||||
border-radius: 3px 0 0 3px;
|
||||
}
|
||||
|
||||
html[dir=rtl] #exit-button {
|
||||
right: auto;
|
||||
left: 0;
|
||||
border-radius: 0 3px 3px 0;
|
||||
}
|
||||
|
||||
/* Search
|
||||
----------------------------------*/
|
||||
|
||||
|
@ -418,7 +542,8 @@ input.defaultName {
|
|||
border: none;
|
||||
background-color: #272727;
|
||||
border-radius: 0.4em;
|
||||
padding-left:5px; padding-right: 5px;
|
||||
-moz-padding-start: 5px;
|
||||
-moz-padding-end: 5px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
|
@ -427,13 +552,22 @@ input.defaultName {
|
|||
height: 30px;
|
||||
background-color: #666;
|
||||
border: none;
|
||||
border-bottom-left-radius: 0.4em;
|
||||
border-top-left-radius: 0.4em;
|
||||
box-shadow: 0px 1px 0px rgba(255,255,255,.5), 0px -1px 0px rgba(0,0,0,.8), inset 6px 6px 9px rgba(0,0,0,.56);
|
||||
opacity: .64;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
html[dir=ltr] #actions {
|
||||
border-bottom-left-radius: 0.4em;
|
||||
border-top-left-radius: 0.4em;
|
||||
}
|
||||
|
||||
html[dir=rtl] #actions {
|
||||
border-bottom-right-radius: 0.4em;
|
||||
border-top-right-radius: 0.4em;
|
||||
box-shadow: 0px 1px 0px rgba(255,255,255,.5), 0px -1px 0px rgba(0,0,0,.8), inset -6px 6px 9px rgba(0,0,0,.56);
|
||||
}
|
||||
|
||||
#actions #searchbutton{
|
||||
background: transparent url(chrome://browser/skin/tabview/search.png) no-repeat;
|
||||
border: none;
|
||||
|
@ -460,11 +594,16 @@ input.defaultName {
|
|||
box-shadow: 0px -1px 0px rgba(255,255,255,.1), inset 0px 2px 5px rgba(0,0,0,.3);
|
||||
}
|
||||
|
||||
html[dir=rtl] #otherresults {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#otherresults .label {
|
||||
color: #999;
|
||||
line-height: 30px;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
-moz-margin-start: 5px;
|
||||
-moz-margin-end: 5px;
|
||||
}
|
||||
|
||||
.inlineMatch {
|
||||
|
@ -472,10 +611,10 @@ input.defaultName {
|
|||
border-radius: 0.4em;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
|
||||
border: 1px solid rgba(255, 255, 255, 0.5);
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
-moz-padding-start: 3px;
|
||||
-moz-padding-end: 3px;
|
||||
height: 20px;
|
||||
margin-right: 5px;
|
||||
-moz-margin-end: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
@ -484,7 +623,7 @@ input.defaultName {
|
|||
}
|
||||
|
||||
.inlineMatch > img {
|
||||
margin-right: 5px;
|
||||
-moz-margin-end: 5px;
|
||||
position: relative;
|
||||
top: 2px;
|
||||
}
|
||||
|
|
|
@ -14,7 +14,10 @@ body {
|
|||
----------------------------------*/
|
||||
|
||||
.tab {
|
||||
padding: 4px 6px 6px 4px;
|
||||
padding-top: 4px;
|
||||
-moz-padding-end: 6px;
|
||||
padding-bottom: 6px;
|
||||
-moz-padding-start: 4px;
|
||||
background-color: #D7D7D7;
|
||||
border-radius: 0.4em;
|
||||
box-shadow: 0 1px 1.5px rgba(0, 0, 0, 0.4);
|
||||
|
@ -33,21 +36,40 @@ body {
|
|||
background-color: white;
|
||||
}
|
||||
|
||||
html[dir=rtl] .thumb {
|
||||
box-shadow: -1px 2px 0 rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.favicon {
|
||||
background-color: #D7D7D7;
|
||||
border-bottom-right-radius: 0.4em;
|
||||
box-shadow:
|
||||
0 -1px 0 rgba(225, 225, 225, 0.8) inset,
|
||||
-1px 0 0 rgba(225, 225, 225, 0.8) inset;
|
||||
padding: 4px 6px 6px 4px;
|
||||
padding-top: 4px;
|
||||
-moz-padding-end: 6px;
|
||||
padding-bottom: 6px;
|
||||
-moz-padding-start: 4px;
|
||||
top: 4px;
|
||||
left: 4px;
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.3);
|
||||
-moz-border-end: 1px solid rgba(0, 0, 0, 0.3);
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.3);
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
html[dir=ltr] .favicon {
|
||||
border-bottom-right-radius: 0.4em;
|
||||
}
|
||||
|
||||
html[dir=rtl] .favicon {
|
||||
border-bottom-left-radius: 0.4em;
|
||||
box-shadow:
|
||||
0 -1px 0 rgba(225, 225, 225, 0.8) inset,
|
||||
1px 0 0 rgba(225, 225, 225, 0.8) inset;
|
||||
left: auto;
|
||||
right: 2px;
|
||||
}
|
||||
|
||||
.favicon img {
|
||||
border: none;
|
||||
width: 16px;
|
||||
|
@ -66,6 +88,11 @@ body {
|
|||
opacity: 0.2;
|
||||
}
|
||||
|
||||
html[dir=rtl] .close {
|
||||
right: auto;
|
||||
left: 6px;
|
||||
}
|
||||
|
||||
.expander {
|
||||
bottom: 8px;
|
||||
right: 6px;
|
||||
|
@ -78,6 +105,12 @@ body {
|
|||
opacity: 0.2;
|
||||
}
|
||||
|
||||
html[dir=rtl] .expander {
|
||||
right: auto;
|
||||
left: 6px;
|
||||
-moz-transform: scaleX(-1);
|
||||
}
|
||||
|
||||
.close:hover,
|
||||
.expander:hover {
|
||||
-moz-transition-property: opacity;
|
||||
|
@ -110,12 +143,20 @@ body {
|
|||
box-shadow: rgba(0,0,0,.2) 1px 1px 4px;
|
||||
}
|
||||
|
||||
html[dir=rtl] .stacked .thumb {
|
||||
box-shadow: rgba(0,0,0,.2) -1px 1px 4px;
|
||||
}
|
||||
|
||||
.stack-trayed .tab-title {
|
||||
text-shadow: rgba(0,0,0,1) 1px 1px 1.5px;
|
||||
color: #EEE;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
html[dir=rtl] .stack-trayed .tab-title {
|
||||
text-shadow: rgba(0,0,0,1) -1px 1px 1.5px;
|
||||
}
|
||||
|
||||
.stack-trayed .thumb {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
@ -171,6 +212,11 @@ body {
|
|||
rgba(0,0,0,0.6) 1px 1px 5.5px;
|
||||
}
|
||||
|
||||
html[dir=rtl] .groupItem.activeGroupItem {
|
||||
box-shadow:
|
||||
rgba(0,0,0,0.6) -1px 1px 5.5px;
|
||||
}
|
||||
|
||||
.phantom {
|
||||
border: 1px solid rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
@ -179,12 +225,10 @@ body {
|
|||
background-color: rgba(0,0,0,.7) !important;
|
||||
box-shadow: 3px 3px 5.5px rgba(0,0,0,.5);
|
||||
border-radius: 0.4em;
|
||||
/*
|
||||
border: 1px solid rgba(230,230,230,1);
|
||||
background-color: rgba(248,248,248,1);
|
||||
box-shadow:
|
||||
rgba(0,0,0, .3) 2px 2px 5.5px,
|
||||
inset rgba(255, 255, 255, 0.6) 0 0 0 2px; */
|
||||
}
|
||||
|
||||
html[dir=rtl] .overlay {
|
||||
box-shadow: -3px 3px 5.5px rgba(0,0,0,.5);
|
||||
}
|
||||
|
||||
.appTabTray {
|
||||
|
@ -192,6 +236,11 @@ body {
|
|||
right: 1px;
|
||||
}
|
||||
|
||||
html[dir=rtl] .appTabTray {
|
||||
right: auto;
|
||||
left: 1px;
|
||||
}
|
||||
|
||||
.appTabIcon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
|
@ -222,6 +271,11 @@ body {
|
|||
opacity: 0.5;
|
||||
}
|
||||
|
||||
html[dir=rtl] .undo .close {
|
||||
left: auto;
|
||||
right: 4px;
|
||||
}
|
||||
|
||||
.undo .close:hover{
|
||||
opacity: 1.0;
|
||||
}
|
||||
|
@ -239,6 +293,12 @@ body {
|
|||
rgba(0,0,0, .2) 1px 1px 3px;
|
||||
}
|
||||
|
||||
html[dir=rtl] .info-item {
|
||||
box-shadow:
|
||||
inset rgba(255, 255, 255, 0.6) 0 0 0 2px,
|
||||
rgba(0,0,0, .2) -1px 1px 3px;
|
||||
}
|
||||
|
||||
.intro {
|
||||
margin: 10px;
|
||||
}
|
||||
|
@ -250,10 +310,14 @@ body {
|
|||
opacity: 0.9;
|
||||
border: 1px dashed rgba(0,0,0,.12);
|
||||
border-bottom: none;
|
||||
border-right: none;
|
||||
-moz-border-end: none;
|
||||
box-shadow: 1px 1px 0 rgba(255,255,255,.15);
|
||||
}
|
||||
|
||||
html[dir=rtl] .guideTrench {
|
||||
box-shadow: -1px 1px 0 rgba(255,255,255,.15);
|
||||
}
|
||||
|
||||
.visibleTrench {
|
||||
opacity: 0.05;
|
||||
}
|
||||
|
@ -289,6 +353,11 @@ body {
|
|||
background-image: url(chrome://browser/skin/tabview/new-tab.png);
|
||||
}
|
||||
|
||||
html[dir=rtl] .newTabButton {
|
||||
left: auto;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
.newTabButton:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
@ -297,10 +366,18 @@ body {
|
|||
box-shadow: 5px 5px 3px rgba(0,0,0,.5);
|
||||
}
|
||||
|
||||
html[dir=rtl] .active {
|
||||
box-shadow: -5px 5px 3px rgba(0,0,0,.5);
|
||||
}
|
||||
|
||||
.acceptsDrop {
|
||||
box-shadow: 2px 2px 7px -1px rgba(0,0,0,.6);
|
||||
}
|
||||
|
||||
html[dir=rtl] .acceptsDrop {
|
||||
box-shadow: -2px 2px 7px -1px rgba(0,0,0,.6);
|
||||
}
|
||||
|
||||
.titlebar {
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
|
@ -311,10 +388,17 @@ input.name {
|
|||
background: transparent;
|
||||
border: 1px solid transparent;
|
||||
color: #999;
|
||||
margin: 3px 0px 0px 3px;
|
||||
margin-top: 3px;
|
||||
-moz-margin-end: 0;
|
||||
margin-bottom: 0;
|
||||
-moz-margin-begin: 3px;
|
||||
padding: 1px;
|
||||
background-image: url(chrome://browser/skin/tabview/edit-light.png);
|
||||
padding-left: 20px;
|
||||
-moz-padding-start: 20px;
|
||||
}
|
||||
|
||||
html[dir=rtl] input.name {
|
||||
background-position: right top;
|
||||
}
|
||||
|
||||
.title-container:hover input.name {
|
||||
|
@ -345,7 +429,10 @@ input.defaultName {
|
|||
}
|
||||
|
||||
.title-shield {
|
||||
margin: 3px 0px 0px 3px;
|
||||
margin-top: 3px;
|
||||
-moz-margin-end: 0;
|
||||
margin-bottom: 0;
|
||||
-moz-margin-begin: 3px;
|
||||
padding: 1px;
|
||||
left: 0;
|
||||
top: 0;
|
||||
|
@ -353,6 +440,11 @@ input.defaultName {
|
|||
height: 100%;
|
||||
}
|
||||
|
||||
html[dir=rtl] .title-shield {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.transparentBorder {
|
||||
border: 1px solid transparent !important;
|
||||
}
|
||||
|
@ -380,6 +472,12 @@ input.defaultName {
|
|||
opacity: .2;
|
||||
}
|
||||
|
||||
html[dir=rtl] .resizer {
|
||||
right: auto;
|
||||
left: 0;
|
||||
-moz-transform: scaleX(-1);
|
||||
}
|
||||
|
||||
.iq-resizable-handle {
|
||||
font-size: 0.1px;
|
||||
}
|
||||
|
@ -392,6 +490,12 @@ input.defaultName {
|
|||
bottom: 1px;
|
||||
}
|
||||
|
||||
html[dir=rtl] .iq-resizable-se {
|
||||
cursor: sw-resize;
|
||||
right: auto;
|
||||
left: 1px;
|
||||
}
|
||||
|
||||
/* Exit button
|
||||
+----------------------------------*/
|
||||
#exit-button {
|
||||
|
@ -402,11 +506,17 @@ input.defaultName {
|
|||
height: 27px;
|
||||
background: -moz-image-rect(url(chrome://browser/skin/tabview/tabview.png), 0, 20, 20, 0) no-repeat scroll 4px 4px #b7b7b7;
|
||||
border-bottom: 1px solid #909090;
|
||||
border-left: 1px solid #B7B7B7;
|
||||
-moz-border-start: 1px solid #B7B7B7;
|
||||
border-top: 1px solid #CFCFCF;
|
||||
border-radius: 3px 0 0 3px;
|
||||
}
|
||||
|
||||
html[dir=rtl] #exit-button {
|
||||
right: auto;
|
||||
left: 0;
|
||||
border-radius: 0 3px 3px 0;
|
||||
}
|
||||
|
||||
/* Search
|
||||
----------------------------------*/
|
||||
|
||||
|
@ -424,7 +534,8 @@ input.defaultName {
|
|||
border: none;
|
||||
background-color: #272727;
|
||||
border-radius: 0.4em;
|
||||
padding-left: 5px; padding-right: 5px;
|
||||
-moz-padding-start: 5px;
|
||||
-moz-padding-end: 5px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
|
@ -433,13 +544,22 @@ input.defaultName {
|
|||
height: 30px;
|
||||
background-color: #666;
|
||||
border: none;
|
||||
border-bottom-left-radius: 0.4em;
|
||||
border-top-left-radius: 0.4em;
|
||||
box-shadow: 0px 1px 0px rgba(255,255,255,.5), 0px -1px 0px rgba(0,0,0,.8), inset 6px 6px 13px rgba(0,0,0,.56);
|
||||
opacity: .64;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
html[dir=ltr] #actions {
|
||||
border-bottom-left-radius: 0.4em;
|
||||
border-top-left-radius: 0.4em;
|
||||
}
|
||||
|
||||
html[dir=rtl] #actions {
|
||||
border-bottom-right-radius: 0.4em;
|
||||
border-top-right-radius: 0.4em;
|
||||
box-shadow: 0px 1px 0px rgba(255,255,255,.5), 0px -1px 0px rgba(0,0,0,.8), inset -6px 6px 13px rgba(0,0,0,.56);
|
||||
}
|
||||
|
||||
#actions #searchbutton {
|
||||
background: transparent url(chrome://browser/skin/tabview/search.png) no-repeat;
|
||||
border: none;
|
||||
|
@ -466,11 +586,16 @@ input.defaultName {
|
|||
box-shadow: 0 -1px 0 rgba(255,255,255,.1), inset 0 2px 5px rgba(0,0,0,.3);
|
||||
}
|
||||
|
||||
html[dir=rtl] #otherresults {
|
||||
left: auto;
|
||||
right: 0px;
|
||||
}
|
||||
|
||||
#otherresults .label {
|
||||
color: #999;
|
||||
line-height: 30px;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
-moz-margin-start: 5px;
|
||||
-moz-margin-end: 5px;
|
||||
}
|
||||
|
||||
.inlineMatch {
|
||||
|
@ -478,10 +603,10 @@ input.defaultName {
|
|||
border-radius: 0.4em;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
|
||||
border: 1px solid rgba(255, 255, 255, 0.5);
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
-moz-padding-start: 3px;
|
||||
-moz-padding-end: 3px;
|
||||
height: 20px;
|
||||
margin-right: 5px;
|
||||
-moz-margin-end: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
@ -490,7 +615,7 @@ input.defaultName {
|
|||
}
|
||||
|
||||
.inlineMatch > img {
|
||||
margin-right: 5px;
|
||||
-moz-margin-end: 5px;
|
||||
position: relative;
|
||||
top: 2px;
|
||||
}
|
||||
|
@ -509,11 +634,16 @@ input.defaultName {
|
|||
box-shadow: 0 -1px 0 rgba(255,255,255,.1), inset 0 2px 5px rgba(0,0,0,.3);
|
||||
}
|
||||
|
||||
html[dir=rtl] #otherresults {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#otherresults .label {
|
||||
color: #999;
|
||||
line-height:30px;
|
||||
margin-left:5px;
|
||||
margin-right: 5px;
|
||||
-moz-margin-start: 5px;
|
||||
-moz-margin-end: 5px;
|
||||
}
|
||||
|
||||
.inlineMatch {
|
||||
|
@ -521,10 +651,10 @@ input.defaultName {
|
|||
border-radius: 0.4em;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
|
||||
border: 1px solid rgba(255, 255, 255, 0.5);
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
-moz-padding-start: 3px;
|
||||
-moz-padding-end: 3px;
|
||||
height: 20px;
|
||||
margin-right: 5px;
|
||||
-moz-margin-end: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
@ -533,7 +663,7 @@ input.defaultName {
|
|||
}
|
||||
|
||||
.inlineMatch > img {
|
||||
margin-right: 5px;
|
||||
-moz-margin-end: 5px;
|
||||
position: relative;
|
||||
top: 2px;
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
-moz-border-left-colors: rgba(255,255,255,.5) rgba(83,42,6,.9);
|
||||
-moz-border-bottom-colors: rgba(255,255,255,.5) rgba(83,42,6,.9);
|
||||
-moz-border-right-colors: rgba(255,255,255,.5) rgba(83,42,6,.9);
|
||||
margin-bottom: -1px; /* compensate white outer border */
|
||||
box-shadow: 0 1px 0 rgba(255,255,255,.25) inset,
|
||||
0 0 2px 1px rgba(255,255,255,.25) inset;
|
||||
}
|
||||
|
@ -39,6 +40,11 @@
|
|||
-moz-border-right-colors: rgba(255,255,255,.5) rgba(43,8,65,.9);
|
||||
}
|
||||
|
||||
#appmenu-popup {
|
||||
margin-top: -1px;
|
||||
-moz-margin-start: 1px;
|
||||
}
|
||||
|
||||
/* Bug 413060, comment 16: Vista Aero is a special case where we use a
|
||||
tooltip appearance for the address bar popup panels */
|
||||
#identity-popup,
|
||||
|
@ -68,7 +74,6 @@
|
|||
|
||||
@media all and (-moz-windows-compositor) {
|
||||
/* these should be hidden w/glass enabled. windows draws it's own buttons. */
|
||||
#titlebar-buttonbox:not(:-moz-lwtheme),
|
||||
.titlebar-button {
|
||||
display: none;
|
||||
}
|
||||
|
@ -129,10 +134,12 @@
|
|||
|
||||
#main-window[sizemode="normal"]:not([inFullscreen="true"]) #navigator-toolbox[tabsontop="true"] > #nav-bar:not(:-moz-lwtheme),
|
||||
#main-window[sizemode="normal"]:not([inFullscreen="true"]) #navigator-toolbox[tabsontop="true"]:not([customizing]) > #nav-bar[collapsed="true"] + toolbar:not(:-moz-lwtheme),
|
||||
#main-window[sizemode="normal"]:not([inFullscreen="true"]) #navigator-toolbox[tabsontop="true"]:not([customizing]) > #nav-bar[collapsed="true"] + #customToolbars + #PersonalToolbar:not(:-moz-lwtheme) {
|
||||
#main-window[sizemode="normal"]:not([inFullscreen="true"]) #navigator-toolbox[tabsontop="true"]:not([customizing]) > #nav-bar[collapsed="true"] + #customToolbars + #PersonalToolbar:not(:-moz-lwtheme),
|
||||
#main-window[sizemode="normal"]:not([inFullscreen="true"]) #navigator-toolbox:not([tabsontop="true"]) > #PersonalToolbar:not(:-moz-lwtheme) {
|
||||
border-top-left-radius: 3.5px;
|
||||
border-top-right-radius: 3.5px;
|
||||
}
|
||||
|
||||
#main-window[sizemode="normal"]:not([inFullscreen="true"]) #TabsToolbar[tabsontop="true"]:not(:-moz-lwtheme) {
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
|
|
|
@ -122,7 +122,7 @@
|
|||
text-shadow: 0 0 1px rgba(0,0,0,.7),
|
||||
0 1px 1.5px rgba(0,0,0,.5);
|
||||
font-weight: bold;
|
||||
padding: .1em 1.5em .15em;
|
||||
padding: 0 1.5em .05em;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
@ -178,15 +178,6 @@
|
|||
-moz-margin-start: .5em;
|
||||
}
|
||||
|
||||
/* menupopup > menu[_moz-menuactive="true"] etc. from menu.css doesn't match these nodes */
|
||||
.split-menuitem-item[_moz-menuactive="true"]:not([disabled]),
|
||||
.split-menuitem-menu[_moz-menuactive="true"]:not([disabled]),
|
||||
:-moz-any(#appmenuPrimaryPane, #appmenuSecondaryPane) > menu[_moz-menuactive="true"]:not([disabled]),
|
||||
:-moz-any(#appmenuPrimaryPane, #appmenuSecondaryPane) > menuitem[_moz-menuactive="true"]:not([disabled]) {
|
||||
background-color: -moz-menuhover;
|
||||
color: -moz-menuhovertext;
|
||||
}
|
||||
|
||||
.split-menuitem-menu {
|
||||
-moz-box-pack: end;
|
||||
}
|
||||
|
@ -210,19 +201,21 @@
|
|||
border: 1px solid rgba(0,0,0,.5);
|
||||
}
|
||||
#appmenuPrimaryPane {
|
||||
margin-right: -1px;
|
||||
-moz-margin-end: -1px;
|
||||
background-color: rgba(255,255,255,0.5);
|
||||
border-right: 1px solid #c4c4c5;
|
||||
padding-left: 2px;
|
||||
-moz-border-end: 1px solid #c4c4c5;
|
||||
-moz-padding-start: 2px;
|
||||
}
|
||||
#appmenuSecondaryPane {
|
||||
-moz-appearance: none;
|
||||
background-color: #f1f5fb;
|
||||
box-shadow: 1px 0 2px rgb(204,214,234) inset;
|
||||
border: 0;
|
||||
padding-top: 5px;
|
||||
font-family: "Segoe UI Semibold", "Segoe UI", sans-serif;
|
||||
}
|
||||
#appmenuSecondaryPane:-moz-locale-dir(rtl) {
|
||||
box-shadow: -1px 0 2px rgb(204,214,234) inset;
|
||||
}
|
||||
|
||||
.appmenu-menuseparator {
|
||||
-moz-appearance: none;
|
||||
|
@ -320,7 +313,6 @@
|
|||
#titlebar-content {
|
||||
margin-left: 15px;
|
||||
margin-right: 15px;
|
||||
-moz-box-align: start;
|
||||
}
|
||||
|
||||
@media all and (-moz-windows-classic) {
|
||||
|
|
|
@ -14,7 +14,10 @@ body {
|
|||
----------------------------------*/
|
||||
|
||||
.tab {
|
||||
padding: 4px 6px 6px 4px;
|
||||
padding-top: 4px;
|
||||
-moz-padding-end: 6px;
|
||||
padding-bottom: 6px;
|
||||
-moz-padding-start: 4px;
|
||||
background-color: #E0EAF5;
|
||||
border-radius: 0.4em;
|
||||
box-shadow:
|
||||
|
@ -27,6 +30,15 @@ body {
|
|||
margin: 4px;
|
||||
}
|
||||
|
||||
html[dir=rtl] .tab {
|
||||
box-shadow:
|
||||
0 1px 0 #FFFFFF inset,
|
||||
0 -1px 1px rgba(255, 255, 255, 0.8) inset,
|
||||
-1px 0 1px rgba(255, 255, 255, 0.8) inset,
|
||||
1px 0 1px rgba(255, 255, 255, 0.8) inset,
|
||||
0 1px 1.5px rgba(4, 38, 60, 0.4);
|
||||
}
|
||||
|
||||
.tab canvas,
|
||||
.cached-thumb {
|
||||
border: 1px solid rgba(73, 99, 119, 0.3);
|
||||
|
@ -37,18 +49,34 @@ body {
|
|||
background-color: white;
|
||||
}
|
||||
|
||||
html[dir=rtl] .thumb {
|
||||
box-shadow: -1px 2px 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.favicon {
|
||||
background-color: #E0EAF5;
|
||||
border-bottom-right-radius: 0.4em;
|
||||
padding: 4px 6px 6px 4px;
|
||||
padding-top: 4px;
|
||||
-moz-padding-end: 6px;
|
||||
padding-bottom: 6px;
|
||||
-moz-padding-start: 4px;
|
||||
top: 4px;
|
||||
left: 4px;
|
||||
border-right: 1px solid rgba(73, 99, 119, 0.3);
|
||||
-moz-border-end: 1px solid rgba(73, 99, 119, 0.3);
|
||||
border-bottom: 1px solid rgba(73, 99, 119, 0.3);
|
||||
height: 17px;
|
||||
width: 17px;
|
||||
}
|
||||
|
||||
html[dir=ltr] .favicon {
|
||||
border-bottom-right-radius: 0.4em;
|
||||
}
|
||||
|
||||
html[dir=rtl] .favicon {
|
||||
border-bottom-left-radius: 0.4em;
|
||||
left: auto;
|
||||
right: 2px;
|
||||
}
|
||||
|
||||
.favicon img {
|
||||
border: none;
|
||||
width: 16px;
|
||||
|
@ -67,6 +95,11 @@ body {
|
|||
opacity: 0.2;
|
||||
}
|
||||
|
||||
html[dir=rtl] .close {
|
||||
right: auto;
|
||||
left: 6px;
|
||||
}
|
||||
|
||||
.expander {
|
||||
bottom: 6px;
|
||||
right: 6px;
|
||||
|
@ -79,6 +112,12 @@ body {
|
|||
opacity: 0.2;
|
||||
}
|
||||
|
||||
html[dir=rtl] .expander {
|
||||
right: auto;
|
||||
left: 6px;
|
||||
-moz-transform: scaleX(-1);
|
||||
}
|
||||
|
||||
.close:hover,
|
||||
.expander:hover {
|
||||
-moz-transition-property: opacity;
|
||||
|
@ -111,12 +150,20 @@ body {
|
|||
box-shadow: rgba(0,0,0,.2) 1px 1px 4px;
|
||||
}
|
||||
|
||||
html[dir=rtl] .stacked .thumb {
|
||||
box-shadow: rgba(0,0,0,.2) -1px 1px 4px;
|
||||
}
|
||||
|
||||
.stack-trayed .tab-title {
|
||||
text-shadow: rgba(0,0,0,1) 1px 1px 1.5px;
|
||||
color: #EEE;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
html[dir=rtl] .stack-trayed .tab-title {
|
||||
text-shadow: rgba(0,0,0,1) -1px 1px 1.5px;
|
||||
}
|
||||
|
||||
.stack-trayed .thumb {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
@ -130,6 +177,15 @@ body {
|
|||
0 0 5.5px #007ECE;
|
||||
}
|
||||
|
||||
html[dir=rtl] .tab.focus {
|
||||
box-shadow:
|
||||
0 1px 0 #FFFFFF inset,
|
||||
0 -1px 1px #FFFFFF inset,
|
||||
-1px 0 1px #FFFFFF inset,
|
||||
1px 0 1px #FFFFFF inset,
|
||||
0 0 5.5px #007ECE;
|
||||
}
|
||||
|
||||
/* Tab: Zooming
|
||||
----------------------------------*/
|
||||
|
||||
|
@ -173,24 +229,33 @@ body {
|
|||
0 1px 3px rgba(4, 38, 60, 0.6);
|
||||
}
|
||||
|
||||
html[dir=rtl] .groupItem {
|
||||
box-shadow:
|
||||
0 1px 0 #FFFFFF inset,
|
||||
0 -1px 1px rgba(255, 255, 255, 0.8) inset,
|
||||
-1px 0 1px rgba(255, 255, 255, 0.8) inset,
|
||||
1px 0 1px rgba(255, 255, 255, 0.8) inset,
|
||||
0 1px 3px rgba(4, 38, 60, 0.6);
|
||||
}
|
||||
|
||||
.groupItem.activeGroupItem {
|
||||
box-shadow:
|
||||
rgba(0,0,0,0.6) 1px 1px 5.5px;
|
||||
}
|
||||
|
||||
.phantom {
|
||||
html[dir=rtl] .groupItem.activeGroupItem {
|
||||
box-shadow:
|
||||
rgba(0,0,0,0.6) -1px 1px 5.5px;
|
||||
}
|
||||
|
||||
.overlay {
|
||||
background-color: rgba(0,0,0,.7) !important;
|
||||
box-shadow: 3px 3px 5.5px rgba(0,0,0,.5);
|
||||
border-radius: 0.4em;
|
||||
/*
|
||||
border: 1px solid rgba(230,230,230,1);
|
||||
background-color: rgba(248,248,248,1);
|
||||
box-shadow:
|
||||
rgba(0,0,0, .3) 2px 2px 5.5px,
|
||||
inset rgba(255, 255, 255, 0.6) 0 0 0 2px; */
|
||||
}
|
||||
|
||||
html[dir=rtl] .overlay {
|
||||
box-shadow: -3px 3px 5.5px rgba(0,0,0,.5);
|
||||
}
|
||||
|
||||
.appTabTray {
|
||||
|
@ -198,6 +263,11 @@ body {
|
|||
right: 1px;
|
||||
}
|
||||
|
||||
html[dir=rtl] .appTabTray {
|
||||
right: auto;
|
||||
left: 1px;
|
||||
}
|
||||
|
||||
.appTabIcon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
|
@ -228,6 +298,11 @@ body {
|
|||
opacity: 0.5;
|
||||
}
|
||||
|
||||
html[dir=rtl] .undo .close {
|
||||
left: auto;
|
||||
right: 4px;
|
||||
}
|
||||
|
||||
.undo .close:hover{
|
||||
opacity: 1.0;
|
||||
}
|
||||
|
@ -245,6 +320,12 @@ body {
|
|||
rgba(0,0,0, .2) 1px 1px 3px;
|
||||
}
|
||||
|
||||
.info-item {
|
||||
box-shadow:
|
||||
inset rgba(255, 255, 255, 0.6) 0 0 0 2px,
|
||||
rgba(0,0,0, .2) -1px 1px 3px;
|
||||
}
|
||||
|
||||
.intro {
|
||||
margin: 10px;
|
||||
}
|
||||
|
@ -256,10 +337,14 @@ body {
|
|||
opacity: 0.9;
|
||||
border: 1px dashed rgba(0,0,0,.12);
|
||||
border-bottom: none;
|
||||
border-right: none;
|
||||
-moz-border-end: none;
|
||||
box-shadow: 1px 1px 0 rgba(255,255,255,.15);
|
||||
}
|
||||
|
||||
html[dir=rtl] .guideTrench {
|
||||
box-shadow: -1px 1px 0 rgba(255,255,255,.15);
|
||||
}
|
||||
|
||||
.visibleTrench {
|
||||
opacity: 0.05;
|
||||
}
|
||||
|
@ -295,6 +380,11 @@ body {
|
|||
background-image: url(chrome://browser/skin/tabview/new-tab.png);
|
||||
}
|
||||
|
||||
html[dir=rtl] .newTabButton {
|
||||
left: auto;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
.newTabButton:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
@ -303,10 +393,18 @@ body {
|
|||
box-shadow: 5px 5px 3px rgba(0,0,0,.5);
|
||||
}
|
||||
|
||||
html[dir=rtl] .active {
|
||||
box-shadow: -5px 5px 3px rgba(0,0,0,.5);
|
||||
}
|
||||
|
||||
.acceptsDrop {
|
||||
box-shadow: 2px 2px 7px -1px rgba(0,0,0,.6);
|
||||
}
|
||||
|
||||
html[dir=rtl] .acceptsDrop {
|
||||
box-shadow: -2px 2px 7px -1px rgba(0,0,0,.6);
|
||||
}
|
||||
|
||||
.titlebar {
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
|
@ -317,10 +415,17 @@ input.name {
|
|||
background: transparent;
|
||||
border: 1px solid transparent;
|
||||
color: #999;
|
||||
margin: 3px 0px 0px 3px;
|
||||
margin-top: 3px;
|
||||
-moz-margin-end: 0;
|
||||
margin-bottom: 0;
|
||||
-moz-margin-start: 3px;
|
||||
padding: 1px;
|
||||
background-image: url(chrome://browser/skin/tabview/edit-light.png);
|
||||
padding-left: 20px;
|
||||
-moz-padding-start: 20px;
|
||||
}
|
||||
|
||||
html[dir=rtl] input.name {
|
||||
background-position: right top;
|
||||
}
|
||||
|
||||
.title-container:hover input.name {
|
||||
|
@ -351,7 +456,10 @@ input.defaultName {
|
|||
}
|
||||
|
||||
.title-shield {
|
||||
margin: 3px 0px 0px 3px;
|
||||
margin-top: 3px;
|
||||
-moz-margin-end: 0;
|
||||
margin-bottom: 0;
|
||||
-moz-margin-start: 3px;
|
||||
padding: 1px;
|
||||
left: 0;
|
||||
top: 0;
|
||||
|
@ -359,6 +467,11 @@ input.defaultName {
|
|||
height: 100%;
|
||||
}
|
||||
|
||||
html[dir=rtl] .title-shield {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.transparentBorder {
|
||||
border: 1px solid transparent !important;
|
||||
}
|
||||
|
@ -386,6 +499,12 @@ input.defaultName {
|
|||
opacity: .2;
|
||||
}
|
||||
|
||||
html[dir=rtl] .resizer {
|
||||
right: auto;
|
||||
left: 0;
|
||||
-moz-transform: scaleX(-1);
|
||||
}
|
||||
|
||||
.iq-resizable-handle {
|
||||
font-size: 0.1px;
|
||||
}
|
||||
|
@ -398,6 +517,12 @@ input.defaultName {
|
|||
bottom: 1px;
|
||||
}
|
||||
|
||||
html[dir=rtl] .iq-resizable-se {
|
||||
cursor: sw-resize;
|
||||
right: auto;
|
||||
left: 1px;
|
||||
}
|
||||
|
||||
/* Exit button
|
||||
+----------------------------------*/
|
||||
#exit-button {
|
||||
|
@ -408,11 +533,17 @@ input.defaultName {
|
|||
height: 27px;
|
||||
background: -moz-image-rect(url(chrome://browser/skin/tabview/tabview.png), 0, 18, 18, 0) no-repeat scroll 4px 4px #b7b7b7;
|
||||
border-bottom: 1px solid #909090;
|
||||
border-left: 1px solid #B7B7B7;
|
||||
-moz-border-start: 1px solid #B7B7B7;
|
||||
border-top: 1px solid #CFCFCF;
|
||||
border-radius: 3px 0 0 3px;
|
||||
}
|
||||
|
||||
html[dir=rtl] #exit-button {
|
||||
right: auto;
|
||||
left: 0;
|
||||
border-radius: 0 3px 3px 0;
|
||||
}
|
||||
|
||||
/* Search
|
||||
----------------------------------*/
|
||||
|
||||
|
@ -430,7 +561,8 @@ input.defaultName {
|
|||
border: none;
|
||||
background-color: #272727;
|
||||
border-radius: 0.4em;
|
||||
padding-left:5px; padding-right: 5px;
|
||||
-moz-padding-start: 5px;
|
||||
-moz-padding-end: 5px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
|
@ -439,13 +571,22 @@ input.defaultName {
|
|||
height: 30px;
|
||||
background-color: #CFDBE8;
|
||||
border: none;
|
||||
border-bottom-left-radius: 0.4em;
|
||||
border-top-left-radius: 0.4em;
|
||||
box-shadow: 0px 1px 0px rgba(255,255,255,.5), 0px -1px 0px rgba(0,0,0,.8), inset 6px 6px 9px rgba(0,0,0,.56);
|
||||
opacity: .64;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
html[dir=ltr] #actions {
|
||||
border-bottom-left-radius: 0.4em;
|
||||
border-top-left-radius: 0.4em;
|
||||
}
|
||||
|
||||
html[dir=rtl] #actions {
|
||||
border-bottom-right-radius: 0.4em;
|
||||
border-top-right-radius: 0.4em;
|
||||
box-shadow: 0px 1px 0px rgba(255,255,255,.5), 0px -1px 0px rgba(0,0,0,.8), inset -6px 6px 9px rgba(0,0,0,.56);
|
||||
}
|
||||
|
||||
#actions #searchbutton{
|
||||
background: transparent url(chrome://browser/skin/tabview/search.png) no-repeat;
|
||||
border: none;
|
||||
|
@ -472,11 +613,16 @@ input.defaultName {
|
|||
box-shadow: 0px -1px 0px rgba(255,255,255,.1), inset 0px 2px 5px rgba(0,0,0,.3);
|
||||
}
|
||||
|
||||
html[dir=rtl] #otherresults {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#otherresults .label {
|
||||
color: #999;
|
||||
line-height: 30px;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
-moz-margin-start: 5px;
|
||||
-moz-margin-end: 5px;
|
||||
}
|
||||
|
||||
.inlineMatch {
|
||||
|
@ -484,10 +630,10 @@ input.defaultName {
|
|||
border-radius: 0.4em;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
|
||||
border: 1px solid rgba(255, 255, 255, 0.5);
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
-moz-padding-start: 3px;
|
||||
-moz-padding-end: 3px;
|
||||
height: 20px;
|
||||
margin-right: 5px;
|
||||
-moz-margin-end: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
@ -496,7 +642,7 @@ input.defaultName {
|
|||
}
|
||||
|
||||
.inlineMatch > img {
|
||||
margin-right: 5px;
|
||||
-moz-margin-end: 5px;
|
||||
position: relative;
|
||||
top: 2px;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
global:
|
||||
_malloc_postfork;
|
||||
_malloc_prefork;
|
||||
jemalloc_stats;
|
||||
malloc_usable_size;
|
||||
posix_memalign;
|
||||
free;
|
||||
realloc;
|
||||
calloc;
|
||||
malloc;
|
||||
memalign;
|
||||
valloc;
|
||||
__free_hook;
|
||||
__malloc_hook;
|
||||
__realloc_hook;
|
||||
__memalign_hook;
|
||||
local: *;
|
||||
};
|
|
@ -171,6 +171,7 @@ VPX_ASM_SUFFIX = @VPX_ASM_SUFFIX@
|
|||
VPX_X86_ASM = @VPX_X86_ASM@
|
||||
VPX_ARM_ASM = @VPX_ARM_ASM@
|
||||
NS_PRINTING = @NS_PRINTING@
|
||||
MOZ_PDF_PRINTING = @MOZ_PDF_PRINTING@
|
||||
MOZ_CRASHREPORTER = @MOZ_CRASHREPORTER@
|
||||
MOZ_HELP_VIEWER = @MOZ_HELP_VIEWER@
|
||||
MOC= @MOC@
|
||||
|
@ -195,6 +196,7 @@ RM = rm -f
|
|||
MOZ_UI_LOCALE = @MOZ_UI_LOCALE@
|
||||
|
||||
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS = @MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS@
|
||||
MOZ_JEMALLOC_STANDALONE_GLUE_LDOPTS = @MOZ_JEMALLOC_STANDALONE_GLUE_LDOPTS@
|
||||
MOZ_COMPONENT_NSPR_LIBS=@MOZ_COMPONENT_NSPR_LIBS@
|
||||
|
||||
MOZ_FIX_LINK_PATHS=@MOZ_FIX_LINK_PATHS@
|
||||
|
|
|
@ -162,6 +162,11 @@ MOZ_WIDGET_SUPPORT_LIBS = $(DIST)/lib/$(LIB_PREFIX)widgetsupport_s.$(LIB_SUFF
|
|||
ifdef MOZ_MEMORY
|
||||
ifneq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
|
||||
JEMALLOC_LIBS = $(MKSHLIB_FORCE_ALL) $(call EXPAND_MOZLIBNAME,jemalloc) $(MKSHLIB_UNFORCE_ALL)
|
||||
# If we are linking jemalloc into a program, we want the jemalloc symbols
|
||||
# to be exported
|
||||
ifneq (,$(SIMPLE_PROGRAMS)$(PROGRAM))
|
||||
JEMALLOC_LIBS += $(MOZ_JEMALLOC_STANDALONE_GLUE_LDOPTS)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
|
|
@ -552,9 +552,7 @@ OSUtils.h
|
|||
Packages.h
|
||||
Palettes.h
|
||||
PALM_CMN.H
|
||||
pango-engine.h
|
||||
pango-glyph.h
|
||||
pango-modules.h
|
||||
pango/pango-modules.h
|
||||
pango/pangocairo.h
|
||||
pango/pangofc-decoder.h
|
||||
pango/pangofc-font.h
|
||||
|
@ -564,7 +562,6 @@ pango/pango-fontmap.h
|
|||
pango/pango.h
|
||||
pango/pangoxft.h
|
||||
pango/pango-utils.h
|
||||
pango-types.h
|
||||
pascal.h
|
||||
Patches.h
|
||||
Path.h
|
||||
|
|
49
configure.in
49
configure.in
|
@ -2893,11 +2893,13 @@ esac
|
|||
AC_SUBST(NO_LD_ARCHIVE_FLAGS)
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Flags to strip unused symbols from .so components
|
||||
dnl = Flags to strip unused symbols from .so components and
|
||||
dnl = to export jemalloc symbols when linking a program
|
||||
dnl ========================================================
|
||||
case "$target" in
|
||||
*-linux*|*-kfreebsd*-gnu|*-gnu*)
|
||||
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script'
|
||||
MOZ_JEMALLOC_STANDALONE_GLUE_LDOPTS='-rdynamic -Wl,--version-script -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/jemalloc-standalone-linkage-version-script'
|
||||
;;
|
||||
*-solaris*)
|
||||
if test -z "$GNU_CC"; then
|
||||
|
@ -4992,6 +4994,7 @@ MOZ_XTF=1
|
|||
MOZ_XUL=1
|
||||
MOZ_ZIPWRITER=1
|
||||
NS_PRINTING=1
|
||||
MOZ_PDF_PRINTING=
|
||||
MOZ_DISABLE_DOMCRYPTO=
|
||||
NSS_DISABLE_DBM=
|
||||
NECKO_WIFI=1
|
||||
|
@ -5031,7 +5034,6 @@ case "${target}" in
|
|||
NSS_DISABLE_DBM=1
|
||||
USE_ARM_KUSER=1
|
||||
MOZ_INSTALLER=
|
||||
NS_PRINTING=
|
||||
NECKO_WIFI=
|
||||
MOZ_THUMB2=1
|
||||
MOZ_THEME_FASTSTRIPE=1
|
||||
|
@ -5187,6 +5189,7 @@ cairo-windows)
|
|||
NS_PRINTING=
|
||||
;;
|
||||
esac
|
||||
MOZ_PDF_PRINTING=1
|
||||
;;
|
||||
|
||||
cairo-gtk2|cairo-gtk2-x11)
|
||||
|
@ -5203,6 +5206,7 @@ cairo-gtk2|cairo-gtk2-x11)
|
|||
TK_CFLAGS='$(MOZ_GTK2_CFLAGS)'
|
||||
TK_LIBS='$(MOZ_GTK2_LIBS)'
|
||||
AC_DEFINE(MOZ_WIDGET_GTK2)
|
||||
MOZ_PDF_PRINTING=1
|
||||
;;
|
||||
|
||||
cairo-gtk2-dfb)
|
||||
|
@ -5220,6 +5224,7 @@ cairo-gtk2-dfb)
|
|||
AC_MSG_WARN([Disabling X when DirectFB is specified.])
|
||||
no_x=yes
|
||||
fi
|
||||
MOZ_PDF_PRINTING=1
|
||||
;;
|
||||
|
||||
cairo-qt)
|
||||
|
@ -5237,6 +5242,7 @@ cairo-qt)
|
|||
TK_CFLAGS='$(MOZ_QT_CFLAGS)'
|
||||
TK_LIBS='$(MOZ_QT_LIBS)'
|
||||
AC_DEFINE(MOZ_WIDGET_QT)
|
||||
MOZ_PDF_PRINTING=1
|
||||
;;
|
||||
|
||||
cairo-beos)
|
||||
|
@ -5251,6 +5257,7 @@ cairo-os2)
|
|||
USE_FC_FREETYPE=1
|
||||
TK_CFLAGS='$(MOZ_CAIRO_CFLAGS)'
|
||||
TK_LIBS='$(MOZ_CAIRO_LIBS)'
|
||||
MOZ_PDF_PRINTING=1
|
||||
;;
|
||||
|
||||
cairo-cocoa)
|
||||
|
@ -5271,11 +5278,20 @@ cairo-cocoa)
|
|||
cairo-android)
|
||||
AC_DEFINE(MOZ_WIDGET_ANDROID)
|
||||
MOZ_WIDGET_TOOLKIT=android
|
||||
TK_CFLAGS='$(MOZ_CAIRO_CFLAGS)'
|
||||
TK_LIBS='$(MOZ_CAIRO_LIBS)'
|
||||
MOZ_WEBGL=1
|
||||
MOZ_PDF_PRINTING=1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
AC_SUBST(MOZ_PDF_PRINTING)
|
||||
if test "$MOZ_PDF_PRINTING"; then
|
||||
PDF_SURFACE_FEATURE="#define CAIRO_HAS_PDF_SURFACE 1"
|
||||
AC_DEFINE(MOZ_PDF_PRINTING)
|
||||
fi
|
||||
|
||||
if test "$MOZ_ENABLE_XREMOTE"; then
|
||||
AC_DEFINE(MOZ_ENABLE_XREMOTE)
|
||||
fi
|
||||
|
@ -5494,7 +5510,7 @@ then
|
|||
|
||||
PKG_CHECK_MODULES(_PANGOCHK, pango >= $PANGO_VERSION)
|
||||
|
||||
PKG_CHECK_MODULES(MOZ_PANGO, pango >= $PANGO_VERSION pangoft2 >= $PANGO_VERSION)
|
||||
PKG_CHECK_MODULES(MOZ_PANGO, pango >= $PANGO_VERSION pangoft2 >= $PANGO_VERSION pangocairo >= $PANGO_VERSION)
|
||||
AC_SUBST(MOZ_PANGO_CFLAGS)
|
||||
AC_SUBST(MOZ_PANGO_LIBS)
|
||||
if test "$MOZ_PANGO"
|
||||
|
@ -5511,7 +5527,7 @@ if test "$MOZ_ENABLE_QT"
|
|||
then
|
||||
if test "$MOZ_PANGO"
|
||||
then
|
||||
PKG_CHECK_MODULES(MOZ_PANGO, [pango >= $PANGO_VERSION pangoft2 >= $PANGO_VERSION],
|
||||
PKG_CHECK_MODULES(MOZ_PANGO, [pango >= $PANGO_VERSION pangoft2 >= $PANGO_VERSION pangocairo >= $PANGO_VERSION],
|
||||
[
|
||||
AC_SUBST(MOZ_PANGO_CFLAGS)
|
||||
AC_SUBST(MOZ_PANGO_LIBS)
|
||||
|
@ -6105,7 +6121,7 @@ if test -n "$MOZ_WEBM" -a -z "$MOZ_NATIVE_LIBVPX"; then
|
|||
dnl opcodes; actual arch detection is done at runtime.
|
||||
VPX_ASFLAGS="-march=armv7-a -mfpu=neon"
|
||||
VPX_DASH_C_FLAG="-c"
|
||||
VPX_AS_CONVERSION="$PERL ${srcdir}/media/libvpx/build/make/ads2gas.pl"
|
||||
VPX_AS_CONVERSION='$(PERL) $(topsrcdir)/media/libvpx/build/make/ads2gas.pl'
|
||||
VPX_ASM_SUFFIX="$ASM_SUFFIX"
|
||||
VPX_ARM_ASM=1
|
||||
fi
|
||||
|
@ -6514,14 +6530,17 @@ MOZ_ARG_ENABLE_BOOL(tree-freetype,
|
|||
MOZ_TREE_FREETYPE=1,
|
||||
MOZ_TREE_FREETYPE= )
|
||||
if test -n "$MOZ_TREE_FREETYPE"; then
|
||||
if test -n "$_WIN32_MSVC"; then
|
||||
AC_ERROR("building with in-tree freetype is not supported on MSVC")
|
||||
fi
|
||||
AC_DEFINE(MOZ_TREE_FREETYPE)
|
||||
AC_SUBST(MOZ_TREE_FREETYPE)
|
||||
MOZ_ENABLE_CAIRO_FT=1
|
||||
FT_FONT_FEATURE="#define CAIRO_HAS_FT_FONT 1"
|
||||
FT2_CFLAGS='-I$(topsrcdir)/modules/freetype2/include'
|
||||
CAIRO_FT_CFLAGS='-I$(topsrcdir)/modules/freetype2/include'
|
||||
FT2_LIBS='$(call EXPAND_LIBNAME_PATH,freetype2,$(LIBXUL_DIST)/lib)'
|
||||
CAIRO_FT_LIBS='$(call EXPAND_LIBNAME_PATH,freetype2,$(LIBXUL_DIST)/lib)'
|
||||
FT2_LIBS='$(call EXPAND_LIBNAME_PATH,freetype,$(DEPTH)/modules/freetype2/.libs)'
|
||||
CAIRO_FT_LIBS='$(call EXPAND_LIBNAME_PATH,freetype,$(DEPTH)/modules/freetype2/.libs)'
|
||||
AC_DEFINE(HAVE_FT_BITMAP_SIZE_Y_PPEM)
|
||||
AC_DEFINE(HAVE_FT_GLYPHSLOT_EMBOLDEN)
|
||||
AC_DEFINE(HAVE_FT_LOAD_SFNT_TABLE)
|
||||
|
@ -8496,7 +8515,6 @@ if test "$MOZ_TREE_CAIRO"; then
|
|||
XLIB_SURFACE_FEATURE="#define CAIRO_HAS_XLIB_SURFACE 1"
|
||||
XLIB_XRENDER_SURFACE_FEATURE="#define CAIRO_HAS_XLIB_XRENDER_SURFACE 1"
|
||||
PS_SURFACE_FEATURE="#define CAIRO_HAS_PS_SURFACE 1"
|
||||
PDF_SURFACE_FEATURE="#define CAIRO_HAS_PDF_SURFACE 1"
|
||||
FT_FONT_FEATURE="#define CAIRO_HAS_FT_FONT 1"
|
||||
MOZ_ENABLE_CAIRO_FT=1
|
||||
CAIRO_FT_CFLAGS="$FT2_CFLAGS"
|
||||
|
@ -8535,12 +8553,10 @@ if test "$MOZ_TREE_CAIRO"; then
|
|||
AC_CHECK_HEADER(d3d10.h, MOZ_ENABLE_D3D10_LAYER=1)
|
||||
fi
|
||||
|
||||
PDF_SURFACE_FEATURE="#define CAIRO_HAS_PDF_SURFACE 1"
|
||||
fi
|
||||
if test "$MOZ_WIDGET_TOOLKIT" = "os2"; then
|
||||
OS2_SURFACE_FEATURE="#define CAIRO_HAS_OS2_SURFACE 1"
|
||||
FT_FONT_FEATURE="#define CAIRO_HAS_FT_FONT 1"
|
||||
PDF_SURFACE_FEATURE="#define CAIRO_HAS_PDF_SURFACE 1"
|
||||
MOZ_ENABLE_CAIRO_FT=1
|
||||
CAIRO_FT_CFLAGS="-I${MZFTCFGFT2}/include"
|
||||
CAIRO_FT_LIBS="-L${MZFTCFGFT2}/lib -lmozft -lmzfntcfg"
|
||||
|
@ -8921,6 +8937,7 @@ AC_SUBST(PKG_SKIP_STRIP)
|
|||
AC_SUBST(USE_ELF_DYNSTR_GC)
|
||||
AC_SUBST(INCREMENTAL_LINKER)
|
||||
AC_SUBST(MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS)
|
||||
AC_SUBST(MOZ_JEMALLOC_STANDALONE_GLUE_LDOPTS)
|
||||
AC_SUBST(MOZ_COMPONENT_NSPR_LIBS)
|
||||
|
||||
AC_SUBST(MOZ_FIX_LINK_PATHS)
|
||||
|
@ -9368,6 +9385,18 @@ if test "$CAIRO_FEATURES_H"; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# Run freetype configure script
|
||||
|
||||
if test "$MOZ_TREE_FREETYPE"; then
|
||||
export CFLAGS="$CFLAGS -std=c99"
|
||||
export CPPFLAGS="$CPPFLAGS"
|
||||
export CXXFLAGS="$CXXFLAGS"
|
||||
export LDFLAGS="$LDFLAGS"
|
||||
export CONFIG_FILES="unix-cc.mk:unix-cc.in unix-def.mk:unix-def.in freetype-config freetype2.pc:freetype2.in"
|
||||
ac_configure_args="$ac_configure_args --host=$target --disable-shared --with-pic=yes"
|
||||
AC_OUTPUT_SUBDIRS(modules/freetype2)
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Setup a nice relatively clean build environment for
|
||||
dnl = sub-configures.
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
#include "nsWeakPtr.h"
|
||||
#include "nsIParser.h"
|
||||
#include "nsContentCreatorFunctions.h"
|
||||
#include "nsIDOMHTMLScriptElement.h"
|
||||
|
||||
#define NS_ISCRIPTELEMENT_IID \
|
||||
{ 0x6d625b30, 0xfac4, 0x11de, \
|
||||
|
@ -62,7 +63,10 @@ public:
|
|||
: mLineNumber(0),
|
||||
mAlreadyStarted(PR_FALSE),
|
||||
mMalformed(PR_FALSE),
|
||||
mDoneAddingChildren(PR_TRUE),
|
||||
mDoneAddingChildren(aFromParser == mozilla::dom::NOT_FROM_PARSER ||
|
||||
aFromParser == mozilla::dom::FROM_PARSER_FRAGMENT),
|
||||
mForceAsync(aFromParser == mozilla::dom::NOT_FROM_PARSER ||
|
||||
aFromParser == mozilla::dom::FROM_PARSER_FRAGMENT),
|
||||
mFrozen(PR_FALSE),
|
||||
mDefer(PR_FALSE),
|
||||
mAsync(PR_FALSE),
|
||||
|
@ -159,6 +163,12 @@ public:
|
|||
mUri = nsnull;
|
||||
mCreatorParser = nsnull;
|
||||
mParserCreated = mozilla::dom::NOT_FROM_PARSER;
|
||||
PRBool async = PR_FALSE;
|
||||
nsCOMPtr<nsIDOMHTMLScriptElement> htmlScript = do_QueryInterface(this);
|
||||
if (htmlScript) {
|
||||
htmlScript->GetAsync(&async);
|
||||
}
|
||||
mForceAsync = !async;
|
||||
}
|
||||
|
||||
void SetCreatorParser(nsIParser* aParser)
|
||||
|
@ -218,6 +228,12 @@ protected:
|
|||
*/
|
||||
PRPackedBool mDoneAddingChildren;
|
||||
|
||||
/**
|
||||
* If true, the .async property returns true instead of reflecting the
|
||||
* content attribute.
|
||||
*/
|
||||
PRPackedBool mForceAsync;
|
||||
|
||||
/**
|
||||
* Whether src, defer and async are frozen.
|
||||
*/
|
||||
|
|
|
@ -1073,11 +1073,7 @@ nsAttrValue::ParseSpecialIntValue(const nsAString& aString,
|
|||
PRInt32 val = NS_MAX(originalVal, 0);
|
||||
|
||||
// % (percent)
|
||||
// XXX RFindChar means that 5%x will be parsed!
|
||||
if (aCanBePercent && (isPercent || tmp.RFindChar('%') >= 0)) {
|
||||
if (val > 100) {
|
||||
val = 100;
|
||||
}
|
||||
isPercent = PR_TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -231,6 +231,8 @@ public:
|
|||
* @param aString the string to parse
|
||||
* @param aCanBePercent PR_TRUE if it can be a percent value (%)
|
||||
* @return whether the value could be parsed
|
||||
*
|
||||
* @see http://www.whatwg.org/html/#rules-for-parsing-dimension-values
|
||||
*/
|
||||
PRBool ParseSpecialIntValue(const nsAString& aString,
|
||||
PRBool aCanBePercent);
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче