зеркало из https://github.com/mozilla/gecko-dev.git
Merge from cvs-trunk-mirror to mozilla-central.
--HG-- rename : js/src/js.c => js/src/js.cpp rename : js/src/jsapi.c => js/src/jsapi.cpp rename : js/src/jsarray.c => js/src/jsarray.cpp rename : js/src/jscntxt.c => js/src/jscntxt.cpp rename : js/src/jsdate.c => js/src/jsdate.cpp rename : js/src/jsdbgapi.c => js/src/jsdbgapi.cpp rename : js/src/jsemit.c => js/src/jsemit.cpp rename : js/src/jsexn.c => js/src/jsexn.cpp rename : js/src/jsfun.c => js/src/jsfun.cpp rename : js/src/jsgc.c => js/src/jsgc.cpp rename : js/src/jsinterp.c => js/src/jsinterp.cpp rename : js/src/jsiter.c => js/src/jsiter.cpp rename : js/src/jslock.c => js/src/jslock.cpp rename : js/src/jsobj.c => js/src/jsobj.cpp rename : js/src/jsopcode.c => js/src/jsopcode.cpp rename : js/src/jsparse.c => js/src/jsparse.cpp rename : js/src/jsregexp.c => js/src/jsregexp.cpp rename : js/src/jsscope.c => js/src/jsscope.cpp rename : js/src/jsscript.c => js/src/jsscript.cpp rename : js/src/jsxml.c => js/src/jsxml.cpp
This commit is contained in:
Коммит
0fa05c1636
|
@ -43,19 +43,73 @@
|
|||
interface nsIURI;
|
||||
interface nsIAccessible;
|
||||
|
||||
[scriptable, uuid(a492c7d6-1dd1-11b2-9bc0-80614884799a)]
|
||||
/**
|
||||
* A cross-platform interface that supports hyperlink-specific properties and
|
||||
* methods. Anchors, image maps, xul:labels with class="text-link" implement this interface.
|
||||
*/
|
||||
[scriptable, uuid(fe1dd8c0-d50a-4634-b51d-2b20bfb1e231)]
|
||||
interface nsIAccessibleHyperLink : nsISupports
|
||||
{
|
||||
readonly attribute long anchors;
|
||||
/**
|
||||
* Returns the offset of the link within the parent accessible.
|
||||
*/
|
||||
readonly attribute long startIndex;
|
||||
|
||||
/**
|
||||
* Returns the end index of the link within the parent accessible.
|
||||
*
|
||||
* @note The link itself is represented by one embedded character within the
|
||||
* parent text, so the endIndex should be startIndex + 1.
|
||||
*/
|
||||
readonly attribute long endIndex;
|
||||
|
||||
nsIURI getURI (in long i);
|
||||
/**
|
||||
* Determines whether the link is valid (e. g. points to a valid URL).
|
||||
*
|
||||
* @note XXX Currently only used with ARIA links, and the author has to
|
||||
* specify that the link is invalid via the aria-invalid="true" attribute.
|
||||
* In all other cases, TRUE is returned.
|
||||
*/
|
||||
readonly attribute boolean valid;
|
||||
|
||||
nsIAccessible getObject (in long i);
|
||||
/**
|
||||
* Determines whether the element currently has the focus, e. g. after
|
||||
* returning from the destination page.
|
||||
*
|
||||
* @note ARIA links can only be focused if they have the tabindex
|
||||
* attribute set. Also, state_focused should then be set on the accessible
|
||||
* for this link.
|
||||
*/
|
||||
readonly attribute boolean selected;
|
||||
|
||||
boolean isValid ();
|
||||
boolean isSelected ();
|
||||
/**
|
||||
* The numbber of anchors within this Hyperlink. Is normally 1 for anchors.
|
||||
* This anchor is, for example, the visible output of the html:a tag.
|
||||
* With an Image Map, reflects the actual areas within the map.
|
||||
*/
|
||||
readonly attribute long anchorsCount;
|
||||
|
||||
/**
|
||||
* Returns the URI at the given index.
|
||||
*
|
||||
* @note ARIA hyperlinks do not have an URI to point to, since clicks are
|
||||
* processed via JavaScript. Therefore this property does not work on ARIA
|
||||
* links.
|
||||
*
|
||||
* @param index The 0-based index of the URI to be returned.
|
||||
*
|
||||
* @return the nsIURI object containing the specifications for the URI.
|
||||
*/
|
||||
nsIURI getURI (in long index);
|
||||
|
||||
/**
|
||||
* Returns a reference to the object at the given index.
|
||||
*
|
||||
* @param index The 0-based index whose object is to be returned.
|
||||
*
|
||||
* @return the nsIAccessible object at the desired index.
|
||||
*/
|
||||
nsIAccessible getAnchor (in long index);
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -69,7 +69,6 @@ struct MaiAtkHyperlink
|
|||
* hyperlink instance.
|
||||
*/
|
||||
MaiHyperlink *maiHyperlink;
|
||||
gchar *uri;
|
||||
};
|
||||
|
||||
struct MaiAtkHyperlinkClass
|
||||
|
@ -175,7 +174,6 @@ MaiHyperlink::Initialize(AtkHyperlink *aObj, MaiHyperlink *aHyperlink)
|
|||
|
||||
/* initialize hyperlink */
|
||||
MAI_ATK_HYPERLINK(aObj)->maiHyperlink = aHyperlink;
|
||||
MAI_ATK_HYPERLINK(aObj)->uri = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -206,8 +204,6 @@ finalizeCB(GObject *aObj)
|
|||
return;
|
||||
|
||||
MaiAtkHyperlink *maiAtkHyperlink = MAI_ATK_HYPERLINK(aObj);
|
||||
if (maiAtkHyperlink->uri)
|
||||
g_free(maiAtkHyperlink->uri);
|
||||
maiAtkHyperlink->maiHyperlink = nsnull;
|
||||
|
||||
/* call parent finalize function */
|
||||
|
@ -222,8 +218,6 @@ getUriCB(AtkHyperlink *aLink, gint aLinkIndex)
|
|||
NS_ENSURE_TRUE(accHyperlink, nsnull);
|
||||
|
||||
MaiAtkHyperlink *maiAtkHyperlink = MAI_ATK_HYPERLINK(aLink);
|
||||
if (maiAtkHyperlink->uri)
|
||||
return g_strdup(maiAtkHyperlink->uri);
|
||||
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
nsresult rv = accHyperlink->GetURI(aLinkIndex,getter_AddRefs(uri));
|
||||
|
@ -232,8 +226,7 @@ getUriCB(AtkHyperlink *aLink, gint aLinkIndex)
|
|||
nsCAutoString cautoStr;
|
||||
rv = uri->GetSpec(cautoStr);
|
||||
|
||||
maiAtkHyperlink->uri = ToNewCString(cautoStr);
|
||||
return g_strdup(maiAtkHyperlink->uri);
|
||||
return g_strdup(cautoStr.get());
|
||||
}
|
||||
|
||||
AtkObject *
|
||||
|
@ -243,7 +236,7 @@ getObjectCB(AtkHyperlink *aLink, gint aLinkIndex)
|
|||
NS_ENSURE_TRUE(accHyperlink, nsnull);
|
||||
|
||||
nsCOMPtr<nsIAccessible> accObj;
|
||||
accHyperlink->GetObject(aLinkIndex, getter_AddRefs(accObj));
|
||||
accHyperlink->GetAnchor(aLinkIndex, getter_AddRefs(accObj));
|
||||
NS_ENSURE_TRUE(accObj, nsnull);
|
||||
|
||||
AtkObject *atkObj = nsAccessibleWrap::GetAtkObject(accObj);
|
||||
|
@ -282,7 +275,7 @@ isValidCB(AtkHyperlink *aLink)
|
|||
NS_ENSURE_TRUE(accHyperlink, FALSE);
|
||||
|
||||
PRBool isValid = PR_FALSE;
|
||||
nsresult rv = accHyperlink->IsValid(&isValid);
|
||||
nsresult rv = accHyperlink->GetValid(&isValid);
|
||||
return (NS_FAILED(rv)) ? FALSE : static_cast<gboolean>(isValid);
|
||||
}
|
||||
|
||||
|
@ -293,7 +286,7 @@ getAnchorCountCB(AtkHyperlink *aLink)
|
|||
NS_ENSURE_TRUE(accHyperlink, -1);
|
||||
|
||||
PRInt32 count = -1;
|
||||
nsresult rv = accHyperlink->GetAnchors(&count);
|
||||
nsresult rv = accHyperlink->GetAnchorsCount(&count);
|
||||
return (NS_FAILED(rv)) ? -1 : static_cast<gint>(count);
|
||||
}
|
||||
|
||||
|
|
|
@ -446,7 +446,8 @@ nsAccessNode::GetInnerHTML(nsAString& aInnerHTML)
|
|||
NS_IMETHODIMP
|
||||
nsAccessNode::ScrollTo(PRUint32 aScrollType)
|
||||
{
|
||||
NS_ENSURE_TRUE(mDOMNode, NS_ERROR_FAILURE);
|
||||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIPresShell> shell(GetPresShell());
|
||||
NS_ENSURE_TRUE(shell, NS_ERROR_FAILURE);
|
||||
|
|
|
@ -165,7 +165,7 @@ ACCESSIBILITY_ATOM(droppable, "droppable") // XUL combo box
|
|||
ACCESSIBILITY_ATOM(editable, "editable")
|
||||
ACCESSIBILITY_ATOM(_for, "for")
|
||||
ACCESSIBILITY_ATOM(hidden, "hidden") // XUL tree columns
|
||||
ACCESSIBILITY_ATOM(href, "href")
|
||||
ACCESSIBILITY_ATOM(href, "href") // XUL, XLink
|
||||
ACCESSIBILITY_ATOM(increment, "increment") // XUL
|
||||
ACCESSIBILITY_ATOM(lang, "lang")
|
||||
ACCESSIBILITY_ATOM(linkedPanel, "linkedpanel") // XUL
|
||||
|
@ -175,6 +175,7 @@ ACCESSIBILITY_ATOM(multiline, "multiline") // XUL
|
|||
ACCESSIBILITY_ATOM(name, "name")
|
||||
ACCESSIBILITY_ATOM(onclick, "onclick")
|
||||
ACCESSIBILITY_ATOM(readonly, "readonly")
|
||||
ACCESSIBILITY_ATOM(simple, "simple") // XLink
|
||||
ACCESSIBILITY_ATOM(src, "src")
|
||||
ACCESSIBILITY_ATOM(selected, "selected")
|
||||
ACCESSIBILITY_ATOM(summary, "summary")
|
||||
|
|
|
@ -1284,9 +1284,8 @@ static PRBool HasRelatedContent(nsIContent *aContent)
|
|||
}
|
||||
|
||||
nsIContent *ancestorContent = aContent;
|
||||
nsAutoString activeID;
|
||||
while ((ancestorContent = ancestorContent->GetParent()) != nsnull) {
|
||||
if (ancestorContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_activedescendant, activeID)) {
|
||||
if (ancestorContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_activedescendant)) {
|
||||
// ancestor has activedescendant property, this content could be active
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
@ -1489,6 +1488,8 @@ NS_IMETHODIMP nsAccessibilityService::GetAccessible(nsIDOMNode *aNode,
|
|||
nsIAccessibleRole::ROLE_EQUATION);
|
||||
}
|
||||
} else if (!newAcc) { // HTML accessibles
|
||||
PRBool tryTagNameOrFrame = PR_TRUE;
|
||||
|
||||
nsIAtom *frameType = frame->GetType();
|
||||
if (!roleMapEntry &&
|
||||
(frameType == nsAccessibilityAtoms::tableCaptionFrame ||
|
||||
|
@ -1528,38 +1529,41 @@ NS_IMETHODIMP nsAccessibilityService::GetAccessible(nsIDOMNode *aNode,
|
|||
else if (tableFrame->GetType() == nsAccessibilityAtoms::tableCellFrame) {
|
||||
// Stop before we are fooled by any additional table ancestors
|
||||
// This table cell frameis part of a separate ancestor table.
|
||||
NS_ASSERTION(!roleMapEntry, "Should not be changing ARIA role, just overriding impl class role");
|
||||
// Not in table: override role (roleMap entry was null).
|
||||
roleMapEntry = &nsARIAMap::gEmptyRoleMap;
|
||||
tryTagNameOrFrame = PR_FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!tableContent)
|
||||
tryTagNameOrFrame = PR_FALSE;
|
||||
}
|
||||
|
||||
// Prefer to use markup (mostly tag name, perhaps attributes) to
|
||||
// decide if and what kind of accessible to create.
|
||||
// The method creates accessibles for table related content too therefore
|
||||
// we do not call it if accessibles for table related content are
|
||||
// prevented above.
|
||||
rv = CreateHTMLAccessibleByMarkup(frame, aWeakShell, aNode,
|
||||
getter_AddRefs(newAcc));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (tryTagNameOrFrame) {
|
||||
// Prefer to use markup (mostly tag name, perhaps attributes) to
|
||||
// decide if and what kind of accessible to create.
|
||||
// The method creates accessibles for table related content too therefore
|
||||
// we do not call it if accessibles for table related content are
|
||||
// prevented above.
|
||||
rv = CreateHTMLAccessibleByMarkup(frame, aWeakShell, aNode,
|
||||
getter_AddRefs(newAcc));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (!newAcc) {
|
||||
// Do not create accessible object subtrees for non-rendered table
|
||||
// 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.
|
||||
if (frame->GetType() == nsAccessibilityAtoms::tableCaptionFrame &&
|
||||
frame->GetRect().IsEmpty()) {
|
||||
// XXX This is not the ideal place for this code, but right now there
|
||||
// is no better place:
|
||||
*aIsHidden = PR_TRUE;
|
||||
return NS_OK;
|
||||
if (!newAcc) {
|
||||
// Do not create accessible object subtrees for non-rendered table
|
||||
// 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.
|
||||
if (frame->GetType() == nsAccessibilityAtoms::tableCaptionFrame &&
|
||||
frame->GetRect().IsEmpty()) {
|
||||
// XXX This is not the ideal place for this code, but right now there
|
||||
// is no better place:
|
||||
*aIsHidden = PR_TRUE;
|
||||
return NS_OK;
|
||||
}
|
||||
frame->GetAccessible(getter_AddRefs(newAcc)); // Try using frame to do it
|
||||
}
|
||||
frame->GetAccessible(getter_AddRefs(newAcc)); // Try using frame to do it
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1575,7 +1579,7 @@ NS_IMETHODIMP nsAccessibilityService::GetAccessible(nsIDOMNode *aNode,
|
|||
(content->IsFocusable() ||
|
||||
(isHTML && nsAccUtils::HasListener(content, NS_LITERAL_STRING("click"))) ||
|
||||
HasUniversalAriaProperty(content, aWeakShell) || roleMapEntry ||
|
||||
HasRelatedContent(content))) {
|
||||
HasRelatedContent(content) || nsAccUtils::IsXLink(content))) {
|
||||
// This content is focusable or has an interesting dynamic content accessibility property.
|
||||
// If it's interesting we need it in the accessibility hierarchy so that events or
|
||||
// other accessibles can point to it, or so that it can hold a state, etc.
|
||||
|
|
|
@ -722,6 +722,17 @@ nsAccUtils::GetID(nsIContent *aContent, nsAString& aID)
|
|||
return idAttribute ? aContent->GetAttr(kNameSpaceID_None, idAttribute, aID) : PR_FALSE;
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsAccUtils::IsXLink(nsIContent *aContent)
|
||||
{
|
||||
if (!aContent)
|
||||
return PR_FALSE;
|
||||
|
||||
return aContent->AttrValueIs(kNameSpaceID_XLink, nsAccessibilityAtoms::type,
|
||||
nsAccessibilityAtoms::simple, eCaseMatters) &&
|
||||
aContent->HasAttr(kNameSpaceID_XLink, nsAccessibilityAtoms::href);
|
||||
}
|
||||
|
||||
nsIContent*
|
||||
nsAccUtils::FindNeighbourPointingToNode(nsIContent *aForNode,
|
||||
nsIAtom *aRelationAttr,
|
||||
|
|
|
@ -294,6 +294,14 @@ public:
|
|||
*/
|
||||
static PRBool GetID(nsIContent *aContent, nsAString& aID);
|
||||
|
||||
/**
|
||||
* Check if the given element is XLink.
|
||||
*
|
||||
* @param aContent the given element
|
||||
* @return PR_TRUE if the given element is XLink
|
||||
*/
|
||||
static PRBool IsXLink(nsIContent *aContent);
|
||||
|
||||
/**
|
||||
* Get the role map entry for a given DOM node. This will use the first
|
||||
* ARIA role if the role attribute provides a space delimited list of roles.
|
||||
|
|
|
@ -88,6 +88,7 @@
|
|||
#include "nsIServiceManager.h"
|
||||
#include "nsWhitespaceTokenizer.h"
|
||||
#include "nsAttrName.h"
|
||||
#include "nsNetUtil.h"
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
#include "nsIFrameDebug.h"
|
||||
|
@ -1053,6 +1054,10 @@ nsAccessible::GetState(PRUint32 *aState, PRUint32 *aExtraState)
|
|||
if (frame && (frame->GetStateBits() & NS_FRAME_OUT_OF_FLOW))
|
||||
*aState |= nsIAccessibleStates::STATE_FLOATING;
|
||||
|
||||
// Add 'linked' state for simple xlink.
|
||||
if (nsAccUtils::IsXLink(content))
|
||||
*aState |= nsIAccessibleStates::STATE_LINKED;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -2419,7 +2424,6 @@ nsAccessible::GetARIAState(PRUint32 *aState)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
PRUint32 ariaState = 0;
|
||||
PRUint32 index = 0;
|
||||
while (MappedAttrState(content, aState, &nsARIAMap::gWAIUnivStateMap[index])) {
|
||||
++ index;
|
||||
|
@ -2429,9 +2433,21 @@ nsAccessible::GetARIAState(PRUint32 *aState)
|
|||
return NS_OK;
|
||||
|
||||
// Once DHTML role is used, we're only readonly if DHTML readonly used
|
||||
ariaState &= ~nsIAccessibleStates::STATE_READONLY;
|
||||
*aState &= ~nsIAccessibleStates::STATE_READONLY;
|
||||
|
||||
ariaState |= mRoleMapEntry->state;
|
||||
if (content->HasAttr(kNameSpaceID_None, content->GetIDAttributeName())) {
|
||||
// If has a role & ID and aria-activedescendant on the container, assume focusable
|
||||
nsIContent *ancestorContent = content;
|
||||
while ((ancestorContent = ancestorContent->GetParent()) != nsnull) {
|
||||
if (ancestorContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_activedescendant)) {
|
||||
// ancestor has activedescendant property, this content could be active
|
||||
*aState |= nsIAccessibleStates::STATE_FOCUSABLE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*aState |= mRoleMapEntry->state;
|
||||
if (MappedAttrState(content, aState, &mRoleMapEntry->attributeMap1) &&
|
||||
MappedAttrState(content, aState, &mRoleMapEntry->attributeMap2) &&
|
||||
MappedAttrState(content, aState, &mRoleMapEntry->attributeMap3) &&
|
||||
|
@ -2448,23 +2464,38 @@ nsAccessible::GetARIAState(PRUint32 *aState)
|
|||
// Not implemented by this class
|
||||
|
||||
/* DOMString getValue (); */
|
||||
NS_IMETHODIMP nsAccessible::GetValue(nsAString& aValue)
|
||||
NS_IMETHODIMP
|
||||
nsAccessible::GetValue(nsAString& aValue)
|
||||
{
|
||||
if (!mDOMNode) {
|
||||
return NS_ERROR_FAILURE; // Node already shut down
|
||||
}
|
||||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
|
||||
if (!content)
|
||||
return NS_OK;
|
||||
|
||||
if (mRoleMapEntry) {
|
||||
if (mRoleMapEntry->valueRule == eNoValue) {
|
||||
return NS_OK;
|
||||
}
|
||||
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
|
||||
NS_ENSURE_STATE(content);
|
||||
|
||||
// aria-valuenow is a number, and aria-valuetext is the optional text equivalent
|
||||
// For the string value, we will try the optional text equivalent first
|
||||
if (!content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_valuetext, aValue)) {
|
||||
content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_valuenow, aValue);
|
||||
}
|
||||
}
|
||||
|
||||
if (!aValue.IsEmpty())
|
||||
return NS_OK;
|
||||
|
||||
// Check if it's an simple xlink.
|
||||
if (nsAccUtils::IsXLink(content)) {
|
||||
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mWeakShell));
|
||||
if (presShell)
|
||||
return presShell->GetLinkLocation(mDOMNode, aValue);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -2568,6 +2599,14 @@ NS_IMETHODIMP nsAccessible::GetRole(PRUint32 *aRole)
|
|||
{
|
||||
NS_ENSURE_ARG_POINTER(aRole);
|
||||
*aRole = nsIAccessibleRole::ROLE_NOTHING;
|
||||
|
||||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
|
||||
if (nsAccUtils::IsXLink(content))
|
||||
*aRole = nsIAccessibleRole::ROLE_LINK;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -2581,7 +2620,14 @@ nsAccessible::GetNumActions(PRUint8 *aNumActions)
|
|||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
// Check if it's an simple xlink.
|
||||
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
|
||||
if (nsAccUtils::IsXLink(content)) {
|
||||
*aNumActions = 1;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Has registered 'click' event handler.
|
||||
PRBool isOnclick = nsAccUtils::HasListener(content,
|
||||
NS_LITERAL_STRING("click"));
|
||||
|
||||
|
@ -2603,7 +2649,14 @@ nsAccessible::GetActionName(PRUint8 aIndex, nsAString& aName)
|
|||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
// Check if it's simple xlink.
|
||||
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
|
||||
if (nsAccUtils::IsXLink(content)) {
|
||||
aName.AssignLiteral("jump");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Has registered 'click' event handler.
|
||||
PRBool isOnclick = nsAccUtils::HasListener(content,
|
||||
NS_LITERAL_STRING("click"));
|
||||
|
||||
|
@ -2637,11 +2690,18 @@ nsAccessible::DoAction(PRUint8 aIndex)
|
|||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
PRBool doAction = PR_FALSE;
|
||||
|
||||
// Check if it's simple xlink.
|
||||
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
|
||||
PRBool isOnclick = nsAccUtils::HasListener(content,
|
||||
NS_LITERAL_STRING("click"));
|
||||
if (nsAccUtils::IsXLink(content))
|
||||
doAction = PR_TRUE;
|
||||
|
||||
// Has registered 'click' event handler.
|
||||
if (!doAction)
|
||||
doAction = nsAccUtils::HasListener(content, NS_LITERAL_STRING("click"));
|
||||
|
||||
if (isOnclick)
|
||||
if (doAction)
|
||||
return DoCommand(content);
|
||||
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
@ -2912,10 +2972,15 @@ nsAccessible::GetRelation(PRUint32 aIndex, nsIAccessibleRelation **aRelation)
|
|||
nsCOMPtr<nsIAccessibleRelation> relation;
|
||||
rv = relations->QueryElementAt(aIndex, NS_GET_IID(nsIAccessibleRelation),
|
||||
getter_AddRefs(relation));
|
||||
|
||||
// nsIArray::QueryElementAt() returns NS_ERROR_ILLEGAL_VALUE on invalid index.
|
||||
if (rv == NS_ERROR_ILLEGAL_VALUE)
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
NS_IF_ADDREF(*aRelation = relation);
|
||||
return rv;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -3194,59 +3259,96 @@ NS_IMETHODIMP nsAccessible::SelectAllSelection(PRBool *_retval)
|
|||
// nsIAccessibleHyperLink, which helps determine where it is located
|
||||
// within containing text
|
||||
|
||||
NS_IMETHODIMP nsAccessible::GetAnchors(PRInt32 *aAnchors)
|
||||
// readonly attribute long nsIAccessibleHyperLink::anchorsCount
|
||||
NS_IMETHODIMP
|
||||
nsAccessible::GetAnchorsCount(PRInt32 *aAnchorsCount)
|
||||
{
|
||||
*aAnchors = 1;
|
||||
NS_ENSURE_ARG_POINTER(aAnchorsCount);
|
||||
*aAnchorsCount = 1;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAccessible::GetStartIndex(PRInt32 *aStartIndex)
|
||||
// readonly attribute long nsIAccessibleHyperLink::startIndex
|
||||
NS_IMETHODIMP
|
||||
nsAccessible::GetStartIndex(PRInt32 *aStartIndex)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aStartIndex);
|
||||
*aStartIndex = 0;
|
||||
PRInt32 endIndex;
|
||||
return GetLinkOffset(aStartIndex, &endIndex);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAccessible::GetEndIndex(PRInt32 *aEndIndex)
|
||||
// readonly attribute long nsIAccessibleHyperLink::endIndex
|
||||
NS_IMETHODIMP
|
||||
nsAccessible::GetEndIndex(PRInt32 *aEndIndex)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aEndIndex);
|
||||
*aEndIndex = 0;
|
||||
PRInt32 startIndex;
|
||||
return GetLinkOffset(&startIndex, aEndIndex);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAccessible::GetURI(PRInt32 i, nsIURI **aURI)
|
||||
NS_IMETHODIMP
|
||||
nsAccessible::GetURI(PRInt32 aIndex, nsIURI **aURI)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aURI);
|
||||
*aURI = nsnull;
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
if (aIndex != 0)
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
// Check if it's simple xlink.
|
||||
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
|
||||
if (nsAccUtils::IsXLink(content)) {
|
||||
nsAutoString href;
|
||||
content->GetAttr(kNameSpaceID_XLink, nsAccessibilityAtoms::href, href);
|
||||
|
||||
nsCOMPtr<nsIURI> baseURI = content->GetBaseURI();
|
||||
nsCOMPtr<nsIDocument> document = content->GetOwnerDoc();
|
||||
return NS_NewURI(aURI, href,
|
||||
document ? document->GetDocumentCharacterSet().get() : nsnull,
|
||||
baseURI);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAccessible::GetObject(PRInt32 aIndex,
|
||||
nsIAccessible **aAccessible)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAccessible::GetAnchor(PRInt32 aIndex,
|
||||
nsIAccessible **aAccessible)
|
||||
{
|
||||
if (aIndex != 0) {
|
||||
*aAccessible = nsnull;
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
NS_ENSURE_ARG_POINTER(aAccessible);
|
||||
*aAccessible = nsnull;
|
||||
|
||||
if (aIndex != 0)
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
*aAccessible = this;
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// nsIAccessibleHyperLink::IsValid()
|
||||
NS_IMETHODIMP nsAccessible::IsValid(PRBool *aIsValid)
|
||||
// readonly attribute boolean nsIAccessibleHyperLink::valid
|
||||
NS_IMETHODIMP
|
||||
nsAccessible::GetValid(PRBool *aValid)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aValid);
|
||||
PRUint32 state = State(this);
|
||||
*aIsValid = (0 == (state & nsIAccessibleStates::STATE_INVALID));
|
||||
*aValid = (0 == (state & nsIAccessibleStates::STATE_INVALID));
|
||||
// XXX In order to implement this we would need to follow every link
|
||||
// Perhaps we can get information about invalid links from the cache
|
||||
// In the mean time authors can use role="link" aria_invalid="true"
|
||||
// In the mean time authors can use role="link" aria-invalid="true"
|
||||
// to force it for links they internally know to be invalid
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAccessible::IsSelected(PRBool *aIsSelected)
|
||||
// readonly attribute boolean nsIAccessibleHyperLink::selected
|
||||
NS_IMETHODIMP
|
||||
nsAccessible::GetSelected(PRBool *aSelected)
|
||||
{
|
||||
*aIsSelected = (gLastFocusedNode == mDOMNode);
|
||||
NS_ENSURE_ARG_POINTER(aSelected);
|
||||
*aSelected = (gLastFocusedNode == mDOMNode);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -74,6 +74,9 @@ nsAccessibleRelation::GetTarget(PRUint32 aIndex, nsIAccessible **aTarget)
|
|||
{
|
||||
NS_ENSURE_ARG_POINTER(aTarget);
|
||||
|
||||
if (aIndex != 0)
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
NS_IF_ADDREF(*aTarget = mTarget);
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -180,6 +180,15 @@ nsApplicationAccessible::GetPreviousSibling(nsIAccessible **aPreviousSibling)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsApplicationAccessible::GetIndexInParent(PRInt32 *aIndexInParent)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aIndexInParent);
|
||||
|
||||
*aIndexInParent = -1;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
nsApplicationAccessible::CacheChildren()
|
||||
{
|
||||
|
|
|
@ -76,6 +76,7 @@ public:
|
|||
NS_IMETHOD GetParent(nsIAccessible * *aParent);
|
||||
NS_IMETHOD GetNextSibling(nsIAccessible * *aNextSibling);
|
||||
NS_IMETHOD GetPreviousSibling(nsIAccessible **aPreviousSibling);
|
||||
NS_IMETHOD GetIndexInParent(PRInt32 *aIndexInParent);
|
||||
NS_IMETHOD GetChildAt(PRInt32 aChildNum, nsIAccessible **aChild);
|
||||
|
||||
// nsApplicationAccessible
|
||||
|
|
|
@ -660,16 +660,9 @@ nsresult nsRootAccessible::HandleEventWithTarget(nsIDOMEvent* aEvent,
|
|||
// inside of a combo box that closes. The real focus is on the combo box.
|
||||
// It's also the case when a popup gets focus in ATK -- when it closes
|
||||
// we need to fire an event to restore focus to where it was
|
||||
if (!gLastFocusedNode) {
|
||||
return NS_OK;
|
||||
}
|
||||
if (gLastFocusedNode != aTargetNode) {
|
||||
// Was not focused on popup
|
||||
nsCOMPtr<nsIDOMNode> parentOfFocus;
|
||||
gLastFocusedNode->GetParentNode(getter_AddRefs(parentOfFocus));
|
||||
if (parentOfFocus != aTargetNode) {
|
||||
return NS_OK; // And was not focused on an item inside the popup
|
||||
}
|
||||
if (!gLastFocusedNode ||
|
||||
!nsAccUtils::IsAncestorOf(aTargetNode, gLastFocusedNode)) {
|
||||
return NS_OK; // And was not focused on an item inside the popup
|
||||
}
|
||||
// Focus was on or inside of a popup that's being hidden
|
||||
FireCurrentFocusEvent();
|
||||
|
|
|
@ -226,12 +226,12 @@ NS_IMETHODIMP nsHTMLImageAccessible::DoAction(PRUint8 index)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsIAccessibleHyperLink
|
||||
NS_IMETHODIMP
|
||||
nsHTMLImageAccessible::GetAnchors(PRInt32 *aAnchors)
|
||||
nsHTMLImageAccessible::GetAnchorsCount(PRInt32 *aAnchors)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aAnchors);
|
||||
|
||||
if (!mMapElement)
|
||||
return nsLinkableAccessible::GetAnchors(aAnchors);
|
||||
return nsLinkableAccessible::GetAnchorsCount(aAnchors);
|
||||
|
||||
return GetChildCount(aAnchors);
|
||||
}
|
||||
|
@ -262,19 +262,22 @@ nsHTMLImageAccessible::GetURI(PRInt32 aIndex, nsIURI **aURI)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLImageAccessible::GetObject(PRInt32 aIndex, nsIAccessible **aAccessible)
|
||||
nsHTMLImageAccessible::GetAnchor(PRInt32 aIndex, nsIAccessible **aAccessible)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aAccessible);
|
||||
*aAccessible = nsnull;
|
||||
|
||||
if (!mMapElement)
|
||||
return nsLinkableAccessible::GetObject(aIndex, aAccessible);
|
||||
return nsLinkableAccessible::GetAnchor(aIndex, aAccessible);
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLCollection> mapAreas = GetAreaCollection();
|
||||
if (mapAreas) {
|
||||
nsCOMPtr<nsIAccessible> accessible;
|
||||
accessible = GetAreaAccessible(mapAreas, aIndex);
|
||||
NS_IF_ADDREF(*aAccessible = accessible);
|
||||
if (!accessible)
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
NS_ADDREF(*aAccessible = accessible);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
|
|
@ -67,9 +67,9 @@ public:
|
|||
NS_IMETHOD DoAction(PRUint8 index);
|
||||
|
||||
// nsIAccessibleHyperLink
|
||||
NS_IMETHOD GetAnchors(PRInt32 *aAnchors);
|
||||
NS_IMETHOD GetAnchorsCount(PRInt32 *aAnchors);
|
||||
NS_IMETHOD GetURI(PRInt32 aIndex, nsIURI **aURI);
|
||||
NS_IMETHOD GetObject(PRInt32 aIndex, nsIAccessible **aAccessible);
|
||||
NS_IMETHOD GetAnchor(PRInt32 aIndex, nsIAccessible **aAccessible);
|
||||
|
||||
// nsPIAccessNode
|
||||
NS_IMETHOD Shutdown();
|
||||
|
|
|
@ -1289,22 +1289,22 @@ NS_IMETHODIMP nsHyperTextAccessible::GetLinks(PRInt32 *aLinks)
|
|||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP nsHyperTextAccessible::GetLink(PRInt32 aIndex, nsIAccessibleHyperLink **aLink)
|
||||
NS_IMETHODIMP
|
||||
nsHyperTextAccessible::GetLink(PRInt32 aIndex, nsIAccessibleHyperLink **aLink)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aLink);
|
||||
*aLink = nsnull;
|
||||
if (!mDOMNode) {
|
||||
|
||||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIAccessible> accessible;
|
||||
|
||||
while (NextChild(accessible)) {
|
||||
if (IsEmbeddedObject(accessible) && aIndex-- == 0) {
|
||||
CallQueryInterface(accessible, aLink);
|
||||
return NS_OK;
|
||||
}
|
||||
if (IsEmbeddedObject(accessible) && aIndex-- == 0)
|
||||
return CallQueryInterface(accessible, aLink);
|
||||
}
|
||||
return NS_OK;
|
||||
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHyperTextAccessible::GetLinkIndex(PRInt32 aCharIndex, PRInt32 *aLinkIndex)
|
||||
|
|
|
@ -70,18 +70,21 @@ STDMETHODIMP
|
|||
CAccessibleAction::nActions(long *aNumActions)
|
||||
{
|
||||
__try {
|
||||
*aNumActions = 0;
|
||||
|
||||
nsCOMPtr<nsIAccessible> acc(do_QueryInterface(this));
|
||||
if (!acc)
|
||||
return E_FAIL;
|
||||
|
||||
PRUint8 count = 0;
|
||||
nsresult rv = acc->GetNumActions(&count);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aNumActions = count;
|
||||
return S_OK;
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return NS_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -94,10 +97,10 @@ __try {
|
|||
return E_FAIL;
|
||||
|
||||
PRUint8 index = static_cast<PRUint8>(aActionIndex);
|
||||
if (NS_SUCCEEDED(acc->DoAction(index)))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
nsresult rv = acc->DoAction(index);
|
||||
return GetHRESULT(rv);
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -113,26 +116,25 @@ __try {
|
|||
|
||||
nsAutoString description;
|
||||
PRUint8 index = static_cast<PRUint8>(aActionIndex);
|
||||
if (NS_FAILED(acc->GetActionDescription(index, description)))
|
||||
return E_FAIL;
|
||||
nsresult rv = acc->GetActionDescription(index, description);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
if (description.IsVoid())
|
||||
return S_FALSE;
|
||||
|
||||
*aDescription = ::SysAllocStringLen(description.get(),
|
||||
description.Length());
|
||||
if (!*aDescription)
|
||||
return E_OUTOFMEMORY;
|
||||
return *aDescription ? S_OK : E_OUTOFMEMORY;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return S_OK;
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
CAccessibleAction::get_keyBinding(long aActionIndex, long aNumMaxBinding,
|
||||
BSTR **aKeyBinding,
|
||||
long *aNumBinding)
|
||||
BSTR **aKeyBinding,
|
||||
long *aNumBinding)
|
||||
{
|
||||
__try {
|
||||
*aKeyBinding = NULL;
|
||||
|
@ -146,15 +148,14 @@ __try {
|
|||
PRUint8 index = static_cast<PRUint8>(aActionIndex);
|
||||
nsresult rv = acc->GetKeyBindings(index, getter_AddRefs(keys));
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
PRUint32 length = 0;
|
||||
keys->GetLength(&length);
|
||||
|
||||
PRBool aUseNumMaxBinding = length > static_cast<PRUint32>(aNumMaxBinding);
|
||||
if (length == 0)
|
||||
return S_FALSE;
|
||||
|
||||
PRUint32 maxBinding = static_cast<PRUint32>(aNumMaxBinding);
|
||||
|
||||
PRUint32 numBinding = length > maxBinding ? maxBinding : length;
|
||||
*aNumBinding = numBinding;
|
||||
|
||||
|
@ -184,9 +185,10 @@ __try {
|
|||
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
@ -201,19 +203,18 @@ __try {
|
|||
|
||||
nsAutoString name;
|
||||
PRUint8 index = static_cast<PRUint8>(aActionIndex);
|
||||
if (NS_FAILED(acc->GetActionName(index, name)))
|
||||
return E_FAIL;
|
||||
nsresult rv = acc->GetActionName(index, name);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
if (name.IsEmpty())
|
||||
return S_FALSE;
|
||||
|
||||
*aName = ::SysAllocStringLen(name.get(), name.Length());
|
||||
if (!*aName)
|
||||
return E_OUTOFMEMORY;
|
||||
return *aName ? S_OK : E_OUTOFMEMORY;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return S_OK;
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
|
|
@ -93,7 +93,7 @@ __try {
|
|||
PRUint32 states = 0;
|
||||
nsresult rv = acc->GetFinalState(&states, nsnull);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
if (states & nsIAccessibleStates::STATE_INVISIBLE)
|
||||
return S_OK;
|
||||
|
@ -101,12 +101,12 @@ __try {
|
|||
PRInt32 x = 0, y = 0, width = 0, height = 0;
|
||||
rv = acc->GetBounds(&x, &y, &width, &height);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
nsCOMPtr<nsIAccessible> parentAcc;
|
||||
rv = acc->GetParent(getter_AddRefs(parentAcc));
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
// The coordinates of the returned position are relative to this object's
|
||||
// parent or relative to the screen on which this object is rendered if it
|
||||
|
@ -114,7 +114,7 @@ __try {
|
|||
if (!parentAcc) {
|
||||
*aX = x;
|
||||
*aY = y;
|
||||
return NS_OK;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
// The coordinates of the bounding box are given relative to the parent's
|
||||
|
@ -122,13 +122,14 @@ __try {
|
|||
PRInt32 parentx = 0, parenty = 0;
|
||||
rv = acc->GetBounds(&parentx, &parenty, &width, &height);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aX = x - parentx;
|
||||
*aY = y - parenty;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
@ -167,68 +168,69 @@ __try {
|
|||
nsresult rv = acc->GetComputedStyleCSSValue(EmptyString(), aPropName,
|
||||
getter_AddRefs(cssValue));
|
||||
if (NS_FAILED(rv) || !cssValue)
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
nsCOMPtr<nsIDOMRGBColor> rgbColor;
|
||||
rv = cssValue->GetRGBColorValue(getter_AddRefs(rgbColor));
|
||||
if (NS_FAILED(rv) || !rgbColor)
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
nsCOMPtr<nsIDOMNSRGBAColor> rgbaColor(do_QueryInterface(rgbColor));
|
||||
if (!rgbaColor)
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
// get alpha
|
||||
nsCOMPtr<nsIDOMCSSPrimitiveValue> alphaValue;
|
||||
rv = rgbaColor->GetAlpha(getter_AddRefs(alphaValue));
|
||||
if (NS_FAILED(rv) || !alphaValue)
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
float alpha = 0.0;
|
||||
rv = alphaValue->GetFloatValue(nsIDOMCSSPrimitiveValue::CSS_NUMBER, &alpha);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
// get red
|
||||
nsCOMPtr<nsIDOMCSSPrimitiveValue> redValue;
|
||||
rv = rgbaColor->GetRed(getter_AddRefs(redValue));
|
||||
if (NS_FAILED(rv) || !redValue)
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
float red = 0.0;
|
||||
rv = redValue->GetFloatValue(nsIDOMCSSPrimitiveValue::CSS_NUMBER, &red);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
// get green
|
||||
nsCOMPtr<nsIDOMCSSPrimitiveValue> greenValue;
|
||||
rv = rgbaColor->GetGreen(getter_AddRefs(greenValue));
|
||||
if (NS_FAILED(rv) || !greenValue)
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
float green = 0.0;
|
||||
rv = greenValue->GetFloatValue(nsIDOMCSSPrimitiveValue::CSS_NUMBER, &green);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
// get blue
|
||||
nsCOMPtr<nsIDOMCSSPrimitiveValue> blueValue;
|
||||
rv = rgbaColor->GetBlue(getter_AddRefs(blueValue));
|
||||
if (NS_FAILED(rv) || !blueValue)
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
float blue = 0.0;
|
||||
rv = blueValue->GetFloatValue(nsIDOMCSSPrimitiveValue::CSS_NUMBER, &blue);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
// compose ARGB value
|
||||
*aColorValue = (((IA2Color) blue) << IA2BlueShift) |
|
||||
(((IA2Color) green) << IA2GreenShift) |
|
||||
(((IA2Color) red) << IA2RedShift) |
|
||||
(((IA2Color) (alpha * 0xff)) << IA2AlphaShift);
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
|
|
@ -82,10 +82,9 @@ __try {
|
|||
GET_NSIACCESSIBLEEDITABLETEXT
|
||||
|
||||
nsresult rv = textAcc->CopyText(aStartOffset, aEndOffset);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return GetHRESULT(rv);
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -96,10 +95,9 @@ __try {
|
|||
GET_NSIACCESSIBLEEDITABLETEXT
|
||||
|
||||
nsresult rv = textAcc->DeleteText(aStartOffset, aEndOffset);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return GetHRESULT(rv);
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -113,10 +111,9 @@ __try {
|
|||
nsAutoString text(*aText, length);
|
||||
|
||||
nsresult rv = textAcc->InsertText(text, aOffset);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return GetHRESULT(rv);
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -127,10 +124,9 @@ __try {
|
|||
GET_NSIACCESSIBLEEDITABLETEXT
|
||||
|
||||
nsresult rv = textAcc->CutText(aStartOffset, aEndOffset);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return GetHRESULT(rv);
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -141,10 +137,9 @@ __try {
|
|||
GET_NSIACCESSIBLEEDITABLETEXT
|
||||
|
||||
nsresult rv = textAcc->PasteText(aOffset);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return GetHRESULT(rv);
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -157,16 +152,15 @@ __try {
|
|||
|
||||
nsresult rv = textAcc->DeleteText(aStartOffset, aEndOffset);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
PRUint32 length = ::SysStringLen(*aText);
|
||||
nsAutoString text(*aText, length);
|
||||
|
||||
rv = textAcc->InsertText(text, aStartOffset);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return GetHRESULT(rv);
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -174,5 +168,8 @@ STDMETHODIMP
|
|||
CAccessibleEditableText::setAttributes(long aStartOffset, long aEndOffset,
|
||||
BSTR *aAttributes)
|
||||
{
|
||||
__try {
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
|
|
@ -87,26 +87,26 @@ __try {
|
|||
return E_FAIL;
|
||||
|
||||
nsCOMPtr<nsIAccessible> anchor;
|
||||
acc->GetObject(aIndex, getter_AddRefs(anchor));
|
||||
if (!anchor)
|
||||
return E_FAIL;
|
||||
nsresult rv = acc->GetAnchor(aIndex, getter_AddRefs(anchor));
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
nsCOMPtr<nsIWinAccessNode> winAccessNode(do_QueryInterface(anchor));
|
||||
if (!winAccessNode)
|
||||
return E_FAIL;
|
||||
|
||||
void *instancePtr = NULL;
|
||||
nsresult rv = winAccessNode->QueryNativeInterface(IID_IUnknown,
|
||||
&instancePtr);
|
||||
rv = winAccessNode->QueryNativeInterface(IID_IUnknown, &instancePtr);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
|
||||
IUnknown *unknownPtr = static_cast<IUnknown*>(instancePtr);
|
||||
aAnchor->ppunkVal = &unknownPtr;
|
||||
aAnchor->vt = VT_UNKNOWN;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
@ -122,17 +122,17 @@ __try {
|
|||
nsCOMPtr<nsIURI> uri;
|
||||
nsresult rv = acc->GetURI(aIndex, getter_AddRefs(uri));
|
||||
if (NS_FAILED(rv) || !uri)
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
nsCAutoString prePath;
|
||||
rv = uri->GetPrePath(prePath);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
nsCAutoString path;
|
||||
rv = uri->GetPath(path);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
nsAutoString stringURI;
|
||||
AppendUTF8toUTF16(prePath, stringURI);
|
||||
|
@ -141,12 +141,10 @@ __try {
|
|||
aAnchorTarget->vt = VT_BSTR;
|
||||
aAnchorTarget->bstrVal = ::SysAllocStringLen(stringURI.get(),
|
||||
stringURI.Length());
|
||||
if (!aAnchorTarget->bstrVal)
|
||||
return E_OUTOFMEMORY;
|
||||
return aAnchorTarget->bstrVal ? S_OK : E_OUTOFMEMORY;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return S_OK;
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
@ -161,11 +159,13 @@ __try {
|
|||
|
||||
PRInt32 index = 0;
|
||||
nsresult rv = acc->GetStartIndex(&index);
|
||||
*aIndex = index;
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aIndex = index;
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -181,12 +181,13 @@ __try {
|
|||
|
||||
PRInt32 index = 0;
|
||||
nsresult rv = acc->GetEndIndex(&index);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aIndex = index;
|
||||
return S_OK;
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -194,17 +195,21 @@ STDMETHODIMP
|
|||
CAccessibleHyperlink::get_valid(boolean *aValid)
|
||||
{
|
||||
__try {
|
||||
*aValid = false;
|
||||
|
||||
nsCOMPtr<nsIAccessibleHyperLink> acc(do_QueryInterface(this));
|
||||
if (!acc)
|
||||
return E_FAIL;
|
||||
|
||||
PRBool isValid = PR_FALSE;
|
||||
nsresult rv = acc->IsValid(&isValid);
|
||||
*aValid = isValid;
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
nsresult rv = acc->GetValid(&isValid);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aValid = isValid;
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
|
|
@ -81,10 +81,12 @@ __try {
|
|||
|
||||
PRInt32 count = 0;
|
||||
nsresult rv = hyperAcc->GetLinks(&count);
|
||||
*aHyperlinkCount = count;
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aHyperlinkCount = count;
|
||||
return S_OK;
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
@ -101,22 +103,24 @@ __try {
|
|||
return E_FAIL;
|
||||
|
||||
nsCOMPtr<nsIAccessibleHyperLink> hyperLink;
|
||||
hyperAcc->GetLink(aIndex, getter_AddRefs(hyperLink));
|
||||
if (!hyperLink)
|
||||
return E_FAIL;
|
||||
nsresult rv = hyperAcc->GetLink(aIndex, getter_AddRefs(hyperLink));
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
nsCOMPtr<nsIWinAccessNode> winAccessNode(do_QueryInterface(hyperLink));
|
||||
if (!winAccessNode)
|
||||
return E_FAIL;
|
||||
|
||||
void *instancePtr = NULL;
|
||||
nsresult rv = winAccessNode->QueryNativeInterface(IID_IAccessibleHyperlink,
|
||||
&instancePtr);
|
||||
*aHyperlink = static_cast<IAccessibleHyperlink*>(instancePtr);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
rv = winAccessNode->QueryNativeInterface(IID_IAccessibleHyperlink,
|
||||
&instancePtr);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
|
||||
*aHyperlink = static_cast<IAccessibleHyperlink*>(instancePtr);
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -132,11 +136,13 @@ __try {
|
|||
|
||||
PRInt32 index = 0;
|
||||
nsresult rv = hyperAcc->GetLinkIndex(aCharIndex, &index);
|
||||
*aHyperlinkIndex = index;
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aHyperlinkIndex = index;
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
|
|
@ -85,18 +85,16 @@ __try {
|
|||
nsAutoString description;
|
||||
nsresult rv = acc->GetName(description);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
if (description.IsEmpty())
|
||||
return S_FALSE;
|
||||
|
||||
*aDescription = ::SysAllocStringLen(description.get(), description.Length());
|
||||
if (!*aDescription)
|
||||
return E_OUTOFMEMORY;
|
||||
return *aDescription ? S_OK : E_OUTOFMEMORY;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return S_OK;
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
@ -119,13 +117,15 @@ __try {
|
|||
PRInt32 x = 0, y = 0;
|
||||
nsresult rv = imageAcc->GetImagePosition(geckoCoordType, &x, &y);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aX = x;
|
||||
*aY = y;
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return S_OK;
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
@ -142,12 +142,13 @@ __try {
|
|||
PRInt32 x = 0, y = 0, width = 0, height = 0;
|
||||
nsresult rv = imageAcc->GetImageSize(&width, &height);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aHeight = width;
|
||||
*aWidth = height;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
|
|
@ -85,22 +85,24 @@ __try {
|
|||
return E_FAIL;
|
||||
|
||||
nsCOMPtr<nsIAccessible> cell;
|
||||
tableAcc->CellRefAt(aRow, aColumn, getter_AddRefs(cell));
|
||||
nsresult rv = tableAcc->CellRefAt(aRow, aColumn, getter_AddRefs(cell));
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
nsCOMPtr<nsIWinAccessNode> winAccessNode(do_QueryInterface(cell));
|
||||
if (!winAccessNode)
|
||||
return E_FAIL;
|
||||
|
||||
void *instancePtr = NULL;
|
||||
nsresult rv = winAccessNode->QueryNativeInterface(IID_IAccessible2,
|
||||
&instancePtr);
|
||||
rv = winAccessNode->QueryNativeInterface(IID_IAccessible2, &instancePtr);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
|
||||
*aAccessible = static_cast<IUnknown*>(instancePtr);
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
@ -115,22 +117,27 @@ __try {
|
|||
return E_FAIL;
|
||||
|
||||
nsCOMPtr<nsIAccessible> caption;
|
||||
tableAcc->GetCaption(getter_AddRefs(caption));
|
||||
nsresult rv = tableAcc->GetCaption(getter_AddRefs(caption));
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
if (!caption)
|
||||
return S_FALSE;
|
||||
|
||||
nsCOMPtr<nsIWinAccessNode> winAccessNode(do_QueryInterface(caption));
|
||||
if (!winAccessNode)
|
||||
return E_FAIL;
|
||||
|
||||
void *instancePtr = NULL;
|
||||
nsresult rv = winAccessNode->QueryNativeInterface(IID_IAccessible2,
|
||||
&instancePtr);
|
||||
rv = winAccessNode->QueryNativeInterface(IID_IAccessible2, &instancePtr);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
|
||||
*aAccessible = static_cast<IUnknown*>(instancePtr);
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
@ -147,12 +154,13 @@ __try {
|
|||
|
||||
PRInt32 childIndex = 0;
|
||||
nsresult rv = tableAcc->GetIndexAt(aRowIndex, aColumnIndex, &childIndex);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aChildIndex = childIndex;
|
||||
return S_OK;
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -170,17 +178,16 @@ __try {
|
|||
nsAutoString descr;
|
||||
nsresult rv = tableAcc->GetColumnDescription (aColumn, descr);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
if (descr.IsEmpty())
|
||||
return S_FALSE;
|
||||
|
||||
*aDescription = ::SysAllocStringLen(descr.get(), descr.Length());
|
||||
if (!*aDescription)
|
||||
return E_OUTOFMEMORY;
|
||||
return *aDescription ? S_OK : E_OUTOFMEMORY;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return S_OK;
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
@ -197,12 +204,13 @@ __try {
|
|||
|
||||
PRInt32 columnsSpanned = 0;
|
||||
nsresult rv = tableAcc->GetColumnExtentAt(aRow, aColumn, &columnsSpanned);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*nColumnsSpanned = columnsSpanned;
|
||||
return S_OK;
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -224,7 +232,10 @@ __try {
|
|||
nsCOMPtr<nsIAccessibleTable> header;
|
||||
nsresult rv = tableAcc->GetColumnHeader(getter_AddRefs(header));
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
if (!header)
|
||||
return S_FALSE;
|
||||
|
||||
nsCOMPtr<nsIWinAccessNode> winAccessNode(do_QueryInterface(header));
|
||||
if (!winAccessNode)
|
||||
|
@ -233,12 +244,13 @@ __try {
|
|||
void *instancePtr = NULL;
|
||||
rv = winAccessNode->QueryNativeInterface(IID_IAccessibleTable, &instancePtr);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aAccessibleTable = static_cast<IAccessibleTable*>(instancePtr);
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
@ -254,11 +266,13 @@ __try {
|
|||
|
||||
PRInt32 columnIndex = 0;
|
||||
nsresult rv = tableAcc->GetColumnAtIndex(aChildIndex, &columnIndex);
|
||||
*aColumnIndex = columnIndex;
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aColumnIndex = columnIndex;
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -275,12 +289,13 @@ __try {
|
|||
|
||||
PRInt32 columnCount = 0;
|
||||
nsresult rv = tableAcc->GetColumns(&columnCount);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aColumnCount = columnCount;
|
||||
return S_OK;
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -297,12 +312,13 @@ __try {
|
|||
|
||||
PRInt32 rowCount = 0;
|
||||
nsresult rv = tableAcc->GetRows(&rowCount);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aRowCount = rowCount;
|
||||
return S_OK;
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -319,12 +335,13 @@ __try {
|
|||
|
||||
PRUint32 count = 0;
|
||||
nsresult rv = tableAcc->GetSelectedCellsCount(&count);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aChildCount = count;
|
||||
return S_OK;
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -341,12 +358,13 @@ __try {
|
|||
|
||||
PRUint32 count = 0;
|
||||
nsresult rv = tableAcc->GetSelectedColumnsCount(&count);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aColumnCount = count;
|
||||
return S_OK;
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -363,12 +381,13 @@ __try {
|
|||
|
||||
PRUint32 count = 0;
|
||||
nsresult rv = tableAcc->GetSelectedRowsCount(&count);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aRowCount = count;
|
||||
return S_OK;
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -386,17 +405,16 @@ __try {
|
|||
nsAutoString descr;
|
||||
nsresult rv = tableAcc->GetRowDescription (aRow, descr);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
if (descr.IsEmpty())
|
||||
return S_FALSE;
|
||||
|
||||
*aDescription = ::SysAllocStringLen(descr.get(), descr.Length());
|
||||
if (!*aDescription)
|
||||
return E_OUTOFMEMORY;
|
||||
return *aDescription ? S_OK : E_OUTOFMEMORY;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return S_OK;
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
@ -412,12 +430,13 @@ __try {
|
|||
|
||||
PRInt32 rowsSpanned = 0;
|
||||
nsresult rv = tableAcc->GetRowExtentAt(aRow, aColumn, &rowsSpanned);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aNRowsSpanned = rowsSpanned;
|
||||
return S_OK;
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -439,7 +458,10 @@ __try {
|
|||
nsCOMPtr<nsIAccessibleTable> header;
|
||||
nsresult rv = tableAcc->GetRowHeader(getter_AddRefs(header));
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
if (!header)
|
||||
return S_FALSE;
|
||||
|
||||
nsCOMPtr<nsIWinAccessNode> winAccessNode(do_QueryInterface(header));
|
||||
if (!winAccessNode)
|
||||
|
@ -449,12 +471,13 @@ __try {
|
|||
rv = winAccessNode->QueryNativeInterface(IID_IAccessibleTable,
|
||||
&instancePtr);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aAccessibleTable = static_cast<IAccessibleTable*>(instancePtr);
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
@ -470,12 +493,13 @@ __try {
|
|||
|
||||
PRInt32 rowIndex = 0;
|
||||
nsresult rv = tableAcc->GetRowAtIndex(aChildIndex, &rowIndex);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aRowIndex = rowIndex;
|
||||
return S_OK;
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -511,19 +535,24 @@ __try {
|
|||
STDMETHODIMP
|
||||
CAccessibleTable::get_summary(IUnknown **aAccessible)
|
||||
{
|
||||
__try {
|
||||
*aAccessible = NULL;
|
||||
|
||||
// Neither html:table nor xul:tree nor ARIA grid/tree have an ability to
|
||||
// link an accessible object to specify a summary. There is closes method
|
||||
// in nsIAccessibleTable::summary to get a summary as a string which is not
|
||||
// mapped directly to IAccessible2.
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
CAccessibleTable::get_isColumnSelected(long aColumn, boolean *aIsSelected)
|
||||
{
|
||||
__try {
|
||||
*aIsSelected = false;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryInterface(this));
|
||||
NS_ASSERTION(tableAcc, CANT_QUERY_ASSERTION_MSG);
|
||||
if (!tableAcc)
|
||||
|
@ -531,12 +560,13 @@ __try {
|
|||
|
||||
PRBool isSelected = PR_FALSE;
|
||||
nsresult rv = tableAcc->IsColumnSelected(aColumn, &isSelected);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aIsSelected = isSelected;
|
||||
return S_OK;
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -544,6 +574,8 @@ STDMETHODIMP
|
|||
CAccessibleTable::get_isRowSelected(long aRow, boolean *aIsSelected)
|
||||
{
|
||||
__try {
|
||||
*aIsSelected = false;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryInterface(this));
|
||||
NS_ASSERTION(tableAcc, CANT_QUERY_ASSERTION_MSG);
|
||||
if (!tableAcc)
|
||||
|
@ -551,12 +583,13 @@ __try {
|
|||
|
||||
PRBool isSelected = PR_FALSE;
|
||||
nsresult rv = tableAcc->IsRowSelected(aRow, &isSelected);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aIsSelected = isSelected;
|
||||
return S_OK;
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -564,6 +597,8 @@ STDMETHODIMP
|
|||
CAccessibleTable::get_isSelected(long aRow, long aColumn, boolean *aIsSelected)
|
||||
{
|
||||
__try {
|
||||
*aIsSelected = false;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryInterface(this));
|
||||
NS_ASSERTION(tableAcc, CANT_QUERY_ASSERTION_MSG);
|
||||
if (!tableAcc)
|
||||
|
@ -571,12 +606,13 @@ __try {
|
|||
|
||||
PRBool isSelected = PR_FALSE;
|
||||
nsresult rv = tableAcc->IsCellSelected(aRow, aColumn, &isSelected);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aIsSelected = isSelected;
|
||||
return S_OK;
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -590,10 +626,9 @@ __try {
|
|||
return E_FAIL;
|
||||
|
||||
nsresult rv = tableAcc->SelectRow(aRow);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return GetHRESULT(rv);
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -607,10 +642,9 @@ __try {
|
|||
return E_FAIL;
|
||||
|
||||
nsresult rv = tableAcc->SelectColumn(aColumn);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return GetHRESULT(rv);
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -624,10 +658,9 @@ __try {
|
|||
return E_FAIL;
|
||||
|
||||
nsresult rv = tableAcc->UnselectRow(aRow);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return GetHRESULT(rv);
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -641,10 +674,9 @@ __try {
|
|||
return E_FAIL;
|
||||
|
||||
nsresult rv = tableAcc->UnselectColumn(aColumn);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return GetHRESULT(rv);
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -670,42 +702,45 @@ __try {
|
|||
PRInt32 row = -1;
|
||||
nsresult rv = tableAcc->GetRowAtIndex(aIndex, &row);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
PRInt32 column = -1;
|
||||
rv = tableAcc->GetColumnAtIndex(aIndex, &column);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
PRInt32 rowExtents = 0;
|
||||
rv = tableAcc->GetRowExtentAt(row, column, &rowExtents);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
PRInt32 columnExtents = 0;
|
||||
rv = tableAcc->GetColumnExtentAt(row, column, &columnExtents);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
PRBool isSelected = PR_FALSE;
|
||||
rv = tableAcc->IsCellSelected(row, column, &isSelected);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aRow = row;
|
||||
*aColumn = column;
|
||||
*aRowExtents = rowExtents;
|
||||
*aColumnExtents = columnExtents;
|
||||
*aIsSelected = isSelected;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
CAccessibleTable::get_modelChange(IA2TableModelChange *aModelChange)
|
||||
{
|
||||
aModelChange = NULL;
|
||||
__try {
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -723,7 +758,7 @@ CAccessibleTable::GetSelectedItems(long aMaxItems, long **aItems,
|
|||
return E_FAIL;
|
||||
|
||||
PRUint32 size = 0;
|
||||
PRInt32 *items = NULL;
|
||||
PRInt32 *items = nsnull;
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
switch (aType) {
|
||||
|
@ -741,10 +776,10 @@ CAccessibleTable::GetSelectedItems(long aMaxItems, long **aItems,
|
|||
}
|
||||
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
if (size == 0 || !items)
|
||||
return S_OK;
|
||||
return S_FALSE;
|
||||
|
||||
PRUint32 maxSize = size < static_cast<PRUint32>(aMaxItems) ? size : aMaxItems;
|
||||
*aItemsCount = maxSize;
|
||||
|
|
|
@ -88,10 +88,9 @@ __try {
|
|||
GET_NSIACCESSIBLETEXT
|
||||
|
||||
nsresult rv = textAcc->AddSelection(aStartOffset, aEndOffset);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return GetHRESULT(rv);
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -100,6 +99,8 @@ CAccessibleText::get_attributes(long aOffset, long *aStartOffset,
|
|||
long *aEndOffset, BSTR *aTextAttributes)
|
||||
{
|
||||
__try {
|
||||
*aStartOffset = 0;
|
||||
*aEndOffset = 0;
|
||||
*aTextAttributes = NULL;
|
||||
|
||||
GET_NSIACCESSIBLETEXT
|
||||
|
@ -127,23 +128,28 @@ __try {
|
|||
*aStartOffset = startOffset;
|
||||
*aEndOffset = endOffset;
|
||||
return hr;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
CAccessibleText::get_caretOffset(long *aOffset)
|
||||
{
|
||||
__try {
|
||||
*aOffset = -1;
|
||||
|
||||
GET_NSIACCESSIBLETEXT
|
||||
|
||||
PRInt32 offset = 0;
|
||||
nsresult rv = textAcc->GetCaretOffset(&offset);
|
||||
*aOffset = offset;
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aOffset = offset;
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -154,6 +160,11 @@ CAccessibleText::get_characterExtents(long aOffset,
|
|||
long *aWidth, long *aHeight)
|
||||
{
|
||||
__try {
|
||||
*aX = 0;
|
||||
*aY = 0;
|
||||
*aWidth = 0;
|
||||
*aHeight = 0;
|
||||
|
||||
GET_NSIACCESSIBLETEXT
|
||||
|
||||
PRUint32 geckoCoordType = (aCoordType == IA2_COORDTYPE_SCREEN_RELATIVE) ?
|
||||
|
@ -163,15 +174,16 @@ __try {
|
|||
PRInt32 x = 0, y =0, width = 0, height = 0;
|
||||
nsresult rv = textAcc->GetCharacterExtents (aOffset, &x, &y, &width, &height,
|
||||
geckoCoordType);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aX = x;
|
||||
*aY = y;
|
||||
*aWidth = width;
|
||||
*aHeight = height;
|
||||
return S_OK;
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -179,16 +191,19 @@ STDMETHODIMP
|
|||
CAccessibleText::get_nSelections(long *aNSelections)
|
||||
{
|
||||
__try {
|
||||
*aNSelections = 0;
|
||||
|
||||
GET_NSIACCESSIBLETEXT
|
||||
|
||||
PRInt32 selCount = 0;
|
||||
nsresult rv = textAcc->GetSelectionCount(&selCount);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aNSelections = selCount;
|
||||
return S_OK;
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -198,6 +213,8 @@ CAccessibleText::get_offsetAtPoint(long aX, long aY,
|
|||
long *aOffset)
|
||||
{
|
||||
__try {
|
||||
*aOffset = 0;
|
||||
|
||||
GET_NSIACCESSIBLETEXT
|
||||
|
||||
PRUint32 geckoCoordType = (aCoordType == IA2_COORDTYPE_SCREEN_RELATIVE) ?
|
||||
|
@ -206,12 +223,13 @@ __try {
|
|||
|
||||
PRInt32 offset = 0;
|
||||
nsresult rv = textAcc->GetOffsetAtPoint(aX, aY, geckoCoordType, &offset);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aOffset = offset;
|
||||
return S_OK;
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -220,18 +238,22 @@ CAccessibleText::get_selection(long aSelectionIndex, long *aStartOffset,
|
|||
long *aEndOffset)
|
||||
{
|
||||
__try {
|
||||
*aStartOffset = 0;
|
||||
*aEndOffset = 0;
|
||||
|
||||
GET_NSIACCESSIBLETEXT
|
||||
|
||||
PRInt32 startOffset = 0, endOffset = 0;
|
||||
nsresult rv = textAcc->GetSelectionBounds(aSelectionIndex,
|
||||
&startOffset, &endOffset);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aStartOffset = startOffset;
|
||||
*aEndOffset = endOffset;
|
||||
return S_OK;
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -246,18 +268,16 @@ __try {
|
|||
nsAutoString text;
|
||||
nsresult rv = textAcc->GetText(aStartOffset, aEndOffset, text);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
if (text.IsEmpty())
|
||||
return S_FALSE;
|
||||
|
||||
*aText = ::SysAllocStringLen(text.get(), text.Length());
|
||||
if (!*aText)
|
||||
return E_OUTOFMEMORY;
|
||||
return *aText ? S_OK : E_OUTOFMEMORY;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return S_OK;
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
@ -267,6 +287,8 @@ CAccessibleText::get_textBeforeOffset(long aOffset,
|
|||
BSTR *aText)
|
||||
{
|
||||
__try {
|
||||
*aStartOffset = 0;
|
||||
*aEndOffset = 0;
|
||||
*aText = NULL;
|
||||
|
||||
GET_NSIACCESSIBLETEXT
|
||||
|
@ -288,7 +310,7 @@ __try {
|
|||
}
|
||||
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aStartOffset = startOffset;
|
||||
*aEndOffset = endOffset;
|
||||
|
@ -297,12 +319,10 @@ __try {
|
|||
return S_FALSE;
|
||||
|
||||
*aText = ::SysAllocStringLen(text.get(), text.Length());
|
||||
if (!*aText)
|
||||
return E_OUTOFMEMORY;
|
||||
return *aText ? S_OK : E_OUTOFMEMORY;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return S_OK;
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
@ -312,6 +332,8 @@ CAccessibleText::get_textAfterOffset(long aOffset,
|
|||
BSTR *aText)
|
||||
{
|
||||
__try {
|
||||
*aStartOffset = 0;
|
||||
*aEndOffset = 0;
|
||||
*aText = NULL;
|
||||
|
||||
GET_NSIACCESSIBLETEXT
|
||||
|
@ -333,7 +355,7 @@ __try {
|
|||
}
|
||||
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aStartOffset = startOffset;
|
||||
*aEndOffset = endOffset;
|
||||
|
@ -342,12 +364,10 @@ __try {
|
|||
return S_FALSE;
|
||||
|
||||
*aText = ::SysAllocStringLen(text.get(), text.Length());
|
||||
if (!*aText)
|
||||
return E_OUTOFMEMORY;
|
||||
return *aText ? S_OK : E_OUTOFMEMORY;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return S_OK;
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
@ -357,6 +377,10 @@ CAccessibleText::get_textAtOffset(long aOffset,
|
|||
BSTR *aText)
|
||||
{
|
||||
__try {
|
||||
*aStartOffset = 0;
|
||||
*aEndOffset = 0;
|
||||
*aText = NULL;
|
||||
|
||||
GET_NSIACCESSIBLETEXT
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
|
@ -376,7 +400,7 @@ __try {
|
|||
}
|
||||
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aStartOffset = startOffset;
|
||||
*aEndOffset = endOffset;
|
||||
|
@ -385,12 +409,10 @@ __try {
|
|||
return S_FALSE;
|
||||
|
||||
*aText = ::SysAllocStringLen(text.get(), text.Length());
|
||||
if (!*aText)
|
||||
return E_OUTOFMEMORY;
|
||||
return *aText ? S_OK : E_OUTOFMEMORY;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return S_OK;
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
@ -400,10 +422,9 @@ __try {
|
|||
GET_NSIACCESSIBLETEXT
|
||||
|
||||
nsresult rv = textAcc->RemoveSelection(aSelectionIndex);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return GetHRESULT(rv);
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -414,10 +435,9 @@ __try {
|
|||
GET_NSIACCESSIBLETEXT
|
||||
|
||||
nsresult rv = textAcc->SetCaretOffset(aOffset);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return GetHRESULT(rv);
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -430,10 +450,9 @@ __try {
|
|||
|
||||
nsresult rv = textAcc->SetSelectionBounds(aSelectionIndex,
|
||||
aStartOffset, aEndOffset);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return GetHRESULT(rv);
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -441,16 +460,19 @@ STDMETHODIMP
|
|||
CAccessibleText::get_nCharacters(long *aNCharacters)
|
||||
{
|
||||
__try {
|
||||
*aNCharacters = 0;
|
||||
|
||||
GET_NSIACCESSIBLETEXT
|
||||
|
||||
PRInt32 charCount = 0;
|
||||
nsresult rv = textAcc->GetCharacterCount(&charCount);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aNCharacters = charCount;
|
||||
return S_OK;
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -462,10 +484,9 @@ __try {
|
|||
GET_NSIACCESSIBLETEXT
|
||||
|
||||
nsresult rv = textAcc->ScrollSubstringTo(aStartIndex, aEndIndex, aScrollType);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return GetHRESULT(rv);
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -483,10 +504,9 @@ __try {
|
|||
|
||||
nsresult rv = textAcc->ScrollSubstringToPoint(aStartIndex, aEndIndex,
|
||||
geckoCoordType, aX, aY);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return GetHRESULT(rv);
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -495,6 +515,7 @@ CAccessibleText::get_newText(IA2TextSegment *aNewText)
|
|||
{
|
||||
__try {
|
||||
return GetModifiedText(PR_TRUE, aNewText);
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
@ -504,6 +525,7 @@ CAccessibleText::get_oldText(IA2TextSegment *aOldText)
|
|||
{
|
||||
__try {
|
||||
return GetModifiedText(PR_FALSE, aOldText);
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
@ -520,13 +542,16 @@ CAccessibleText::GetModifiedText(PRBool aGetInsertedText,
|
|||
nsresult rv = GetModifiedText(aGetInsertedText, text,
|
||||
&startOffset, &endOffset);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
aText->start = startOffset;
|
||||
aText->end = endOffset;
|
||||
|
||||
if (text.IsEmpty())
|
||||
return S_FALSE;
|
||||
|
||||
aText->text = ::SysAllocStringLen(text.get(), text.Length());
|
||||
return aText->text ? NS_OK : E_OUTOFMEMORY;
|
||||
return aText->text ? S_OK : E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
nsAccessibleTextBoundary
|
||||
|
|
|
@ -83,13 +83,14 @@ __try {
|
|||
double currentValue = 0;
|
||||
nsresult rv = valueAcc->GetCurrentValue(¤tValue);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
aCurrentValue->vt = VT_R8;
|
||||
aCurrentValue->dblVal = currentValue;
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return NS_OK;
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
@ -103,10 +104,10 @@ __try {
|
|||
if (aValue.vt != VT_R8)
|
||||
return E_INVALIDARG;
|
||||
|
||||
if (NS_SUCCEEDED(valueAcc->SetCurrentValue(aValue.dblVal)))
|
||||
return S_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
nsresult rv = valueAcc->SetCurrentValue(aValue.dblVal);
|
||||
return GetHRESULT(rv);
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -123,13 +124,14 @@ __try {
|
|||
double maximumValue = 0;
|
||||
nsresult rv = valueAcc->GetMaximumValue(&maximumValue);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
aMaximumValue->vt = VT_R8;
|
||||
aMaximumValue->dblVal = maximumValue;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return S_OK;
|
||||
|
||||
return NS_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
@ -145,12 +147,13 @@ __try {
|
|||
double minimumValue = 0;
|
||||
nsresult rv = valueAcc->GetMinimumValue(&minimumValue);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
aMinimumValue->vt = VT_R8;
|
||||
aMinimumValue->dblVal = minimumValue;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return S_OK;
|
||||
|
||||
return NS_OK;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
|
|
@ -633,3 +633,25 @@ int nsAccessNodeWrap::FilterA11yExceptions(unsigned int aCode, EXCEPTION_POINTER
|
|||
}
|
||||
return EXCEPTION_CONTINUE_SEARCH;
|
||||
}
|
||||
|
||||
HRESULT
|
||||
GetHRESULT(nsresult aResult)
|
||||
{
|
||||
switch (aResult) {
|
||||
case NS_OK:
|
||||
return S_OK;
|
||||
|
||||
case NS_ERROR_INVALID_ARG: case NS_ERROR_INVALID_POINTER:
|
||||
return E_INVALIDARG;
|
||||
|
||||
case NS_ERROR_OUT_OF_MEMORY:
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
case NS_ERROR_NOT_IMPLEMENTED:
|
||||
return E_NOTIMPL;
|
||||
|
||||
default:
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -171,5 +171,10 @@ class nsAccessNodeWrap : public nsAccessNode,
|
|||
static nsIAccessibleTextChangeEvent *gTextEvent;
|
||||
};
|
||||
|
||||
/**
|
||||
* Converts nsresult to HRESULT.
|
||||
*/
|
||||
HRESULT GetHRESULT(nsresult aResult);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -91,9 +91,8 @@ __try {
|
|||
PRUint32 type = 0;
|
||||
nsresult rv = GetRelationType(&type);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
INT res;
|
||||
switch (type) {
|
||||
case RELATION_CONTROLLED_BY:
|
||||
*aRelationType = ::SysAllocString(IA2_RELATION_CONTROLLED_BY);
|
||||
|
@ -144,18 +143,19 @@ __try {
|
|||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (!res)
|
||||
return E_OUTOFMEMORY;
|
||||
return *aRelationType ? S_OK : E_OUTOFMEMORY;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return S_OK;
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
nsAccessibleRelationWrap::get_localizedRelationType(BSTR *aLocalizedRelationType)
|
||||
{
|
||||
::SysFreeString(*aLocalizedRelationType);
|
||||
__try {
|
||||
*aLocalizedRelationType = NULL;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -163,14 +163,18 @@ STDMETHODIMP
|
|||
nsAccessibleRelationWrap::get_nTargets(long *aNTargets)
|
||||
{
|
||||
__try {
|
||||
*aNTargets = 0;
|
||||
|
||||
PRUint32 count = 0;
|
||||
nsresult rv = GetTargetsCount(&count);
|
||||
*aNTargets = count;
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aNTargets = count;
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
@ -179,6 +183,8 @@ nsAccessibleRelationWrap::get_target(long aTargetIndex, IUnknown **aTarget)
|
|||
__try {
|
||||
nsCOMPtr<nsIAccessible> accessible;
|
||||
nsresult rv = GetTarget(aTargetIndex, getter_AddRefs(accessible));
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
nsCOMPtr<nsIWinAccessNode> winAccessNode(do_QueryInterface(accessible));
|
||||
if (!winAccessNode)
|
||||
|
@ -187,12 +193,13 @@ __try {
|
|||
void *instancePtr = NULL;
|
||||
rv = winAccessNode->QueryNativeInterface(IID_IUnknown, &instancePtr);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aTarget = static_cast<IUnknown*>(instancePtr);
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
@ -205,19 +212,23 @@ __try {
|
|||
nsCOMPtr<nsIArray> targets;
|
||||
nsresult rv = GetTargets(getter_AddRefs(targets));
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
PRUint32 length = 0;
|
||||
rv = targets->GetLength(&length);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
if (length == 0)
|
||||
return S_FALSE;
|
||||
|
||||
PRUint32 count = length < PRUint32(aMaxTargets) ? length : aMaxTargets;
|
||||
|
||||
PRUint32 index = 0;
|
||||
for (; index < count; index++) {
|
||||
nsCOMPtr<nsIWinAccessNode> winAccessNode(do_QueryElementAt(targets, index, &rv));
|
||||
if (NS_FAILED(rv) || !winAccessNode)
|
||||
nsCOMPtr<nsIWinAccessNode> winAccessNode =
|
||||
do_QueryElementAt(targets, index, &rv);
|
||||
if (NS_FAILED(rv))
|
||||
break;
|
||||
|
||||
void *instancePtr = NULL;
|
||||
|
@ -234,12 +245,13 @@ __try {
|
|||
aTarget[index2]->Release();
|
||||
aTarget[index2] = NULL;
|
||||
}
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
}
|
||||
|
||||
*aNTargets = count;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
|
|
@ -323,9 +323,6 @@ __try {
|
|||
if (NS_FAILED(xpAccessible->GetValue(value)))
|
||||
return E_FAIL;
|
||||
|
||||
if (value.IsEmpty())
|
||||
return S_FALSE;
|
||||
|
||||
*pszValue = ::SysAllocStringLen(value.get(), value.Length());
|
||||
if (!*pszValue)
|
||||
return E_OUTOFMEMORY;
|
||||
|
@ -436,9 +433,6 @@ __try {
|
|||
description = NS_LITERAL_STRING("Description: ") + description;
|
||||
}
|
||||
|
||||
if (description.IsEmpty())
|
||||
return S_FALSE;
|
||||
|
||||
*pszDescription = ::SysAllocStringLen(description.get(),
|
||||
description.Length());
|
||||
return *pszDescription ? S_OK : E_OUTOFMEMORY;
|
||||
|
@ -581,9 +575,6 @@ __try {
|
|||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
|
||||
if (shortcut.IsEmpty())
|
||||
return S_FALSE;
|
||||
|
||||
*pszKeyboardShortcut = ::SysAllocStringLen(shortcut.get(),
|
||||
shortcut.Length());
|
||||
return *pszKeyboardShortcut ? S_OK : E_OUTOFMEMORY;
|
||||
|
@ -815,9 +806,6 @@ __try {
|
|||
if (NS_FAILED(xpAccessible->GetActionName(0, defaultAction)))
|
||||
return E_FAIL;
|
||||
|
||||
if (defaultAction.IsEmpty())
|
||||
return S_FALSE;
|
||||
|
||||
*pszDefaultAction = ::SysAllocStringLen(defaultAction.get(),
|
||||
defaultAction.Length());
|
||||
return *pszDefaultAction ? S_OK : E_OUTOFMEMORY;
|
||||
|
@ -1165,10 +1153,10 @@ __try {
|
|||
nsresult rv = GetRelationsCount(&count);
|
||||
*aNRelations = count;
|
||||
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return S_OK;
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
@ -1176,10 +1164,12 @@ nsAccessibleWrap::get_relation(long aRelationIndex,
|
|||
IAccessibleRelation **aRelation)
|
||||
{
|
||||
__try {
|
||||
*aRelation = NULL;
|
||||
|
||||
nsCOMPtr<nsIAccessibleRelation> relation;
|
||||
nsresult rv = GetRelation(aRelationIndex, getter_AddRefs(relation));
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
nsCOMPtr<nsIWinAccessNode> winAccessNode(do_QueryInterface(relation));
|
||||
if (!winAccessNode)
|
||||
|
@ -1189,11 +1179,13 @@ __try {
|
|||
rv = winAccessNode->QueryNativeInterface(IID_IAccessibleRelation,
|
||||
&instancePtr);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*aRelation = static_cast<IAccessibleRelation*>(instancePtr);
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
@ -1202,24 +1194,29 @@ nsAccessibleWrap::get_relations(long aMaxRelations,
|
|||
long *aNRelations)
|
||||
{
|
||||
__try {
|
||||
*aRelation = NULL;
|
||||
*aNRelations = 0;
|
||||
|
||||
nsCOMPtr<nsIArray> relations;
|
||||
nsresult rv = GetRelations(getter_AddRefs(relations));
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
PRUint32 length = 0;
|
||||
rv = relations->GetLength(&length);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
if (length == 0)
|
||||
return S_FALSE;
|
||||
|
||||
PRUint32 count = length < (PRUint32)aMaxRelations ? length : aMaxRelations;
|
||||
|
||||
PRUint32 index = 0;
|
||||
for (; index < count; index++) {
|
||||
nsCOMPtr<nsIWinAccessNode> winAccessNode(do_QueryElementAt(relations, index, &rv));
|
||||
if (NS_FAILED(rv) || !winAccessNode)
|
||||
nsCOMPtr<nsIWinAccessNode> winAccessNode =
|
||||
do_QueryElementAt(relations, index, &rv);
|
||||
if (NS_FAILED(rv))
|
||||
break;
|
||||
|
||||
void *instancePtr = NULL;
|
||||
|
@ -1236,36 +1233,44 @@ __try {
|
|||
aRelation[index2]->Release();
|
||||
aRelation[index2] = NULL;
|
||||
}
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
}
|
||||
|
||||
*aNRelations = count;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
nsAccessibleWrap::role(long *role)
|
||||
nsAccessibleWrap::role(long *aRole)
|
||||
{
|
||||
__try {
|
||||
*aRole = 0;
|
||||
|
||||
PRUint32 xpRole = 0;
|
||||
if (NS_FAILED(GetFinalRole(&xpRole)))
|
||||
return E_FAIL;
|
||||
nsresult rv = GetFinalRole(&xpRole);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
NS_ASSERTION(gWindowsRoleMap[nsIAccessibleRole::ROLE_LAST_ENTRY].ia2Role == ROLE_WINDOWS_LAST_ENTRY,
|
||||
"MSAA role map skewed");
|
||||
|
||||
*role = gWindowsRoleMap[xpRole].ia2Role;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
*aRole = gWindowsRoleMap[xpRole].ia2Role;
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
nsAccessibleWrap::scrollTo(enum IA2ScrollType aScrollType)
|
||||
{
|
||||
__try {
|
||||
if (NS_SUCCEEDED(ScrollTo(aScrollType)))
|
||||
return S_OK;
|
||||
nsresult rv = ScrollTo(aScrollType);
|
||||
return GetHRESULT(rv);
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
@ -1279,10 +1284,11 @@ __try {
|
|||
nsIAccessibleCoordinateType::COORDTYPE_SCREEN_RELATIVE :
|
||||
nsIAccessibleCoordinateType::COORDTYPE_PARENT_RELATIVE;
|
||||
|
||||
return NS_SUCCEEDED(ScrollToPoint(geckoCoordType, aX, aY)) ?
|
||||
S_OK : E_FAIL;
|
||||
nsresult rv = ScrollToPoint(geckoCoordType, aX, aY);
|
||||
return GetHRESULT(rv);
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return S_OK;
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
@ -1297,12 +1303,16 @@ __try {
|
|||
nsresult rv = GroupPosition(&groupLevel, &similarItemsInGroup,
|
||||
&positionInGroup);
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
*aGroupLevel = groupLevel;
|
||||
*aSimilarItemsInGroup = similarItemsInGroup;
|
||||
*aPositionInGroup = positionInGroup;
|
||||
return S_OK;
|
||||
}
|
||||
*aGroupLevel = groupLevel;
|
||||
*aSimilarItemsInGroup = similarItemsInGroup;
|
||||
*aPositionInGroup = positionInGroup;
|
||||
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
if (groupLevel ==0 && similarItemsInGroup == 0 && positionInGroup == 0)
|
||||
return S_FALSE;
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
|
@ -1319,7 +1329,7 @@ __try {
|
|||
PRUint32 states = 0, extraStates = 0;
|
||||
nsresult rv = GetFinalState(&states, &extraStates);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
if (states & nsIAccessibleStates::STATE_INVALID)
|
||||
*aStates |= IA2_STATE_INVALID_ENTRY;
|
||||
|
@ -1359,8 +1369,10 @@ __try {
|
|||
if (extraStates & nsIAccessibleStates::EXT_STATE_VERTICAL)
|
||||
*aStates |= IA2_STATE_VERTICAL;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
@ -1379,7 +1391,7 @@ nsAccessibleWrap::get_localizedExtendedRole(BSTR *aLocalizedExtendedRole)
|
|||
__try {
|
||||
*aLocalizedExtendedRole = NULL;
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -1424,40 +1436,55 @@ nsAccessibleWrap::get_uniqueID(long *uniqueID)
|
|||
{
|
||||
__try {
|
||||
void *id = nsnull;
|
||||
if (NS_SUCCEEDED(GetUniqueID(&id))) {
|
||||
*uniqueID = - reinterpret_cast<long>(id);
|
||||
return S_OK;
|
||||
}
|
||||
nsresult rv = GetUniqueID(&id);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*uniqueID = - reinterpret_cast<long>(id);
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
nsAccessibleWrap::get_windowHandle(HWND *windowHandle)
|
||||
nsAccessibleWrap::get_windowHandle(HWND *aWindowHandle)
|
||||
{
|
||||
__try {
|
||||
*windowHandle = 0;
|
||||
*aWindowHandle = 0;
|
||||
|
||||
if (!mDOMNode)
|
||||
return E_FAIL;
|
||||
|
||||
void *handle = nsnull;
|
||||
nsresult rv = GetOwnerWindow(&handle);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
*windowHandle = reinterpret_cast<HWND>(handle);
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
*aWindowHandle = reinterpret_cast<HWND>(handle);
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
nsAccessibleWrap::get_indexInParent(long *indexInParent)
|
||||
nsAccessibleWrap::get_indexInParent(long *aIndexInParent)
|
||||
{
|
||||
__try {
|
||||
PRInt32 index;
|
||||
if (NS_SUCCEEDED(GetIndexInParent(&index))) {
|
||||
*indexInParent = index;
|
||||
return S_OK;
|
||||
}
|
||||
*aIndexInParent = -1;
|
||||
|
||||
PRInt32 index = -1;
|
||||
nsresult rv = GetIndexInParent(&index);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
if (index == -1)
|
||||
return S_FALSE;
|
||||
|
||||
*aIndexInParent = index;
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
@ -1474,7 +1501,7 @@ __try {
|
|||
nsAutoString lang;
|
||||
nsresult rv = GetLanguage(lang);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
// If primary code consists from two letters then expose it as language.
|
||||
PRInt32 offset = lang.FindChar('-', 0);
|
||||
|
@ -1502,8 +1529,10 @@ __try {
|
|||
// Expose as a string if primary code or subcode cannot point to language or
|
||||
// country abbreviations or if there are more than one subcode.
|
||||
aLocale->variant = ::SysAllocString(lang.get());
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return S_OK;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
@ -1515,8 +1544,9 @@ __try {
|
|||
*aAttributes = NULL;
|
||||
|
||||
nsCOMPtr<nsIPersistentProperties> attributes;
|
||||
if (NS_FAILED(GetAttributes(getter_AddRefs(attributes))))
|
||||
return E_FAIL;
|
||||
nsresult rv = GetAttributes(getter_AddRefs(attributes));
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
if (!attributes)
|
||||
return S_FALSE;
|
||||
|
@ -1540,8 +1570,9 @@ __try {
|
|||
return E_FAIL;
|
||||
|
||||
nsCAutoString name;
|
||||
if (NS_FAILED(propElem->GetKey(name)))
|
||||
return E_FAIL;
|
||||
rv = propElem->GetKey(name);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
PRUint32 offset = 0;
|
||||
while ((offset = name.FindCharInSet(kCharsToEscape, offset)) != kNotFound) {
|
||||
|
@ -1550,7 +1581,8 @@ __try {
|
|||
}
|
||||
|
||||
nsAutoString value;
|
||||
if (NS_FAILED(propElem->GetValue(value)))
|
||||
rv = propElem->GetValue(value);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
|
||||
offset = 0;
|
||||
|
@ -1565,12 +1597,14 @@ __try {
|
|||
strAttrs.Append(';');
|
||||
}
|
||||
|
||||
*aAttributes = ::SysAllocStringLen(strAttrs.get(), strAttrs.Length());
|
||||
if (!*aAttributes)
|
||||
return E_OUTOFMEMORY;
|
||||
if (strAttrs.IsEmpty())
|
||||
return S_FALSE;
|
||||
|
||||
*aAttributes = ::SysAllocStringLen(strAttrs.get(), strAttrs.Length());
|
||||
return *aAttributes ? S_OK : E_OUTOFMEMORY;
|
||||
|
||||
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return S_OK;
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
|
|
@ -80,19 +80,17 @@ __try {
|
|||
nsCAutoString cname;
|
||||
nsresult rv = sAppInfo->GetName(cname);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
if (cname.IsEmpty())
|
||||
return S_FALSE;
|
||||
|
||||
NS_ConvertUTF8toUTF16 name(cname);
|
||||
*aName = ::SysAllocStringLen(name.get(), name.Length());
|
||||
if (!*aName)
|
||||
return E_OUTOFMEMORY;
|
||||
return *aName ? S_OK : E_OUTOFMEMORY;
|
||||
|
||||
} __except(FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
return S_OK;
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
@ -107,18 +105,17 @@ __try {
|
|||
nsCAutoString cversion;
|
||||
nsresult rv = sAppInfo->GetVersion(cversion);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
if (cversion.IsEmpty())
|
||||
return S_FALSE;
|
||||
|
||||
NS_ConvertUTF8toUTF16 version(cversion);
|
||||
*aVersion = ::SysAllocStringLen(version.get(), version.Length());
|
||||
if (!*aVersion)
|
||||
return E_OUTOFMEMORY;
|
||||
return *aVersion ? S_OK : E_OUTOFMEMORY;
|
||||
|
||||
} __except(FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return S_OK;
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
|
@ -127,8 +124,8 @@ nsApplicationAccessibleWrap::get_toolkitName(BSTR *aName)
|
|||
__try {
|
||||
*aName = ::SysAllocString(L"Gecko");
|
||||
return *aName ? S_OK : E_OUTOFMEMORY;
|
||||
} __except(FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
|
||||
} __except(FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -144,7 +141,7 @@ __try {
|
|||
nsCAutoString cversion;
|
||||
nsresult rv = sAppInfo->GetPlatformVersion(cversion);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
return GetHRESULT(rv);
|
||||
|
||||
if (cversion.IsEmpty())
|
||||
return S_FALSE;
|
||||
|
|
|
@ -148,6 +148,10 @@ nsXULLinkAccessible::
|
|||
{
|
||||
}
|
||||
|
||||
// Expose nsIAccessibleHyperLink unconditionally
|
||||
NS_IMPL_ISUPPORTS_INHERITED1(nsXULLinkAccessible, nsHyperTextAccessibleWrap,
|
||||
nsIAccessibleHyperLink)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsXULLinkAccessible. nsIAccessible
|
||||
|
||||
|
@ -250,7 +254,9 @@ nsXULLinkAccessible::GetURI(PRInt32 aIndex, nsIURI **aURI)
|
|||
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
|
||||
content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::href, href);
|
||||
|
||||
nsCOMPtr<nsIURI> baseURI = content->GetBaseURI();
|
||||
nsCOMPtr<nsIDocument> document = content->GetOwnerDoc();
|
||||
return NS_NewURI(aURI, href,
|
||||
document ? document->GetDocumentCharacterSet().get() : nsnull);
|
||||
document ? document->GetDocumentCharacterSet().get() : nsnull,
|
||||
baseURI);
|
||||
}
|
||||
|
|
|
@ -74,6 +74,8 @@ class nsXULLinkAccessible : public nsHyperTextAccessibleWrap
|
|||
public:
|
||||
nsXULLinkAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetName(nsAString& aName);
|
||||
NS_IMETHOD GetRole(PRUint32 *aRole);
|
||||
|
|
|
@ -53,7 +53,9 @@ _TEST_FILES =\
|
|||
test_nsIAccessibleTable_1.html \
|
||||
test_nsIAccessibleTable_2.html \
|
||||
test_nsIAccessibleTable_3.html \
|
||||
test_nsIAccessibleTable_4.html \
|
||||
test_nsIAccessibleTable_listboxes.xul \
|
||||
test_nsIAccessibleHyperLink.html \
|
||||
$(NULL)
|
||||
|
||||
libs:: $(_TEST_FILES)
|
||||
|
|
|
@ -0,0 +1,303 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=418368
|
||||
-->
|
||||
<head>
|
||||
<title>nsIHyperLinkAccessible chrome tests</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">
|
||||
function testThis(aID, aAcc, aRole, aAnchors, aName, aValid, aStartIndex,
|
||||
aEndIndex)
|
||||
{
|
||||
is(aAcc.finalRole, aRole, "Wrong role for ID " + aID + "!");
|
||||
is(aAcc.anchorsCount, aAnchors, "Wrong number of anchors for ID "
|
||||
+ aID + "!");
|
||||
is(aAcc.getAnchor(0).name, aName, "Wrong name for ID "
|
||||
+ aID + "!");
|
||||
is(aAcc.valid, aValid, "No correct valid state for ID "
|
||||
+ aID + "!");
|
||||
is(aAcc.startIndex, aStartIndex, "Wrong startIndex value for ID "
|
||||
+ aID + "!");
|
||||
is(aAcc.endIndex, aEndIndex, "Wrong endIndex value for ID "
|
||||
+ aID + "!");
|
||||
}
|
||||
|
||||
function testFocus(aID, aAcc, aSelectedBefore, aSelectedAfter)
|
||||
{
|
||||
is(aAcc.selected, aSelectedBefore,
|
||||
"Wrong selected state before focus for ID " + aID + "!");
|
||||
document.getElementById(aID).focus();
|
||||
is(aAcc.selected, aSelectedAfter,
|
||||
"Wrong seleccted state after focus for ID " + aID + "!");
|
||||
}
|
||||
|
||||
function testStates(aID, aAcc, aState, aExtraState, aAbsentState)
|
||||
{
|
||||
var state = {}, extraState = {};
|
||||
aAcc.getFinalState(state, extraState);
|
||||
is(state.value & aState, aState, "Wrong state bits for ID " + aID + "!");
|
||||
is(extraState.value & aExtraState, aExtraState,
|
||||
"Wrong extra state bits for ID " + aID + "!");
|
||||
if (aAbsentState != 0)
|
||||
is(state.value & aAbsentState, 0, "state bits should not be present in ID "
|
||||
+ aID + "!");
|
||||
}
|
||||
|
||||
function doTest()
|
||||
{
|
||||
// Mapping needed state flags for easier handling.
|
||||
const state_focusable =
|
||||
Components.interfaces.nsIAccessibleStates.STATE_FOCUSABLE;
|
||||
const state_focused =
|
||||
Components.interfaces.nsIAccessibleStates.STATE_FOCUSED;
|
||||
const state_selectable =
|
||||
Components.interfaces.nsIAccessibleStates.STATE_SELECTABLE;
|
||||
const state_linked =
|
||||
Components.interfaces.nsIAccessibleStates.STATE_LINKED;
|
||||
const state_traversed =
|
||||
Components.interfaces.nsIAccessibleStates.STATE_TRAVERSED;
|
||||
|
||||
const ext_state_multi_line =
|
||||
Components.interfaces.nsIAccessibleStates.EXT_STATE_MULTI_LINE;
|
||||
const ext_state_horizontal =
|
||||
Components.interfaces.nsIAccessibleStates.EXT_STATE_HORIZONTAL;
|
||||
const ext_state_required =
|
||||
Components.interfaces.nsIAccessibleStates.STATE_REQUIRED;
|
||||
const ext_state_invalid =
|
||||
Components.interfaces.nsIAccessibleStates.STATE_INVALID;
|
||||
|
||||
var accService = Components.classes["@mozilla.org/accessibleRetrieval;1"].
|
||||
getService(Components.interfaces.nsIAccessibleRetrieval);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// normal hyperlink
|
||||
var normalHyperlinkElement = document.getElementById("NormalHyperlink");
|
||||
var normalHyperlinkAcc;
|
||||
try {
|
||||
normalHyperlinkAcc = accService.getAccessibleFor(normalHyperlinkElement).
|
||||
QueryInterface(Components.interfaces.nsIAccessibleHyperLink);
|
||||
} catch(e) {
|
||||
ok(normalHyperlinkAcc, "no interface for normal hyperlink!");
|
||||
}
|
||||
testThis("NormalHyperlink", normalHyperlinkAcc,
|
||||
Components.interfaces.nsIAccessibleRole.ROLE_LINK, 1,
|
||||
"Mozilla Foundation", true, 18, 19);
|
||||
is(normalHyperlinkAcc.getURI(0).spec, "http://www.mozilla.org/",
|
||||
"URI wrong for normalHyperlinkElement!");
|
||||
testStates("NormalHyperlink", normalHyperlinkAcc,
|
||||
(state_focusable | state_linked),
|
||||
(ext_state_horizontal), (0));
|
||||
testFocus("NormalHyperlink", normalHyperlinkAcc, false, true);
|
||||
testStates("NormalHyperlink", normalHyperlinkAcc,
|
||||
(state_focusable | state_focused | state_linked),
|
||||
(ext_state_horizontal), (0));
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// ARIA hyperlink
|
||||
var ariaHyperlinkElement = document.getElementById("AriaHyperlink");
|
||||
var ariaHyperlinkAcc;
|
||||
try {
|
||||
ariaHyperlinkAcc = accService.getAccessibleFor(ariaHyperlinkElement).
|
||||
QueryInterface(Components.interfaces.nsIAccessibleHyperLink);
|
||||
} catch(e) {
|
||||
ok(ariaHyperlinkAcc, "no interface for ARIA Hyperlink!");
|
||||
}
|
||||
testThis("AriaHyperlink", ariaHyperlinkAcc,
|
||||
Components.interfaces.nsIAccessibleRole.ROLE_LINK, 1,
|
||||
"Mozilla Foundation Home", true, 32, 33);
|
||||
testStates("AriaHyperlink", ariaHyperlinkAcc,
|
||||
(state_focusable | state_linked),
|
||||
(ext_state_horizontal), (0));
|
||||
testFocus("AriaHyperlink", ariaHyperlinkAcc, false, true);
|
||||
testStates("AriaHyperlink", ariaHyperlinkAcc,
|
||||
(state_focusable | state_focused | state_linked),
|
||||
(ext_state_horizontal), (0));
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// ARIA hyperlink with status invalid
|
||||
var invalidAriaHyperlinkElement =
|
||||
document.getElementById("InvalidAriaHyperlink");
|
||||
var invalidAriaHyperlinkAcc;
|
||||
try {
|
||||
invalidAriaHyperlinkAcc =
|
||||
accService.getAccessibleFor(invalidAriaHyperlinkElement).
|
||||
QueryInterface(Components.interfaces.nsIAccessibleHyperLink);
|
||||
} catch(e) {
|
||||
ok(invalidAriaHyperlinkAcc, "no interface for invalid ARIA hyperlink!");
|
||||
}
|
||||
is(invalidAriaHyperlinkAcc.valid, false, "Should not be valid!");
|
||||
testStates("InvalidAriaHyperlink", invalidAriaHyperlinkAcc,
|
||||
(state_linked),
|
||||
(ext_state_horizontal), (state_focusable));
|
||||
testFocus("InvalidAriaHyperlink", invalidAriaHyperlinkAcc,
|
||||
false, false);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// image map and its link children
|
||||
var imageMapHyperlinkElement =
|
||||
document.getElementById("imgmap");
|
||||
var imageMapHyperlinkAcc;
|
||||
try {
|
||||
imageMapHyperlinkAcc =
|
||||
accService.getAccessibleFor(imageMapHyperlinkElement).
|
||||
QueryInterface(Components.interfaces.nsIAccessibleHyperLink);
|
||||
} catch(e) {
|
||||
ok(imageMapHyperlinkAcc, "no Image Map interface!");
|
||||
}
|
||||
testThis("imgmap", imageMapHyperlinkAcc,
|
||||
Components.interfaces.nsIAccessibleRole.ROLE_IMAGE_MAP, 2,
|
||||
"b", true, 83, 84);
|
||||
is(imageMapHyperlinkAcc.getURI(0).spec,
|
||||
"http://www.bbc.co.uk/radio4/atoz/index.shtml#b", "URI wrong!");
|
||||
is(imageMapHyperlinkAcc.getURI(1).spec,
|
||||
"http://www.bbc.co.uk/radio4/atoz/index.shtml#a", "URI wrong!");
|
||||
testStates("imgmap", imageMapHyperlinkAcc,
|
||||
(0),
|
||||
(ext_state_horizontal), (0));
|
||||
|
||||
var area1 = imageMapHyperlinkAcc.firstChild;
|
||||
ok(area1, "no children in image map acc!");
|
||||
var area1HL;
|
||||
try {
|
||||
area1HL =
|
||||
area1.QueryInterface(Components.interfaces.nsIAccessibleHyperLink);
|
||||
} catch (e) {
|
||||
ok(area1HL, "no interface for first child of Image Map!");
|
||||
}
|
||||
testThis("Area1", area1HL,
|
||||
Components.interfaces.nsIAccessibleRole.ROLE_LINK, 1,
|
||||
"b", true, 0, 1);
|
||||
is(area1HL.getURI(0).spec,
|
||||
"http://www.bbc.co.uk/radio4/atoz/index.shtml#b", "URI wrong!");
|
||||
testStates("Area1", area1HL,
|
||||
(state_linked),
|
||||
(0), (0));
|
||||
|
||||
var area2 = area1.nextSibling;
|
||||
ok(area2, "no next sibling!");
|
||||
var area2HL;
|
||||
try {
|
||||
area2HL =
|
||||
area2.QueryInterface(Components.interfaces.nsIAccessibleHyperLink);
|
||||
} catch (e) {
|
||||
ok(area2HL, "no interface for second child of Image Map!");
|
||||
}
|
||||
testThis("Area2", area2HL,
|
||||
Components.interfaces.nsIAccessibleRole.ROLE_LINK, 1,
|
||||
"a", true, 1, 2);
|
||||
is(area2HL.getURI(0).spec,
|
||||
"http://www.bbc.co.uk/radio4/atoz/index.shtml#a", "URI wrong!");
|
||||
testStates("Area2", area2HL,
|
||||
(state_linked),
|
||||
(0), (0));
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// empty hyperlink
|
||||
var emptyLinkElement = document.getElementById("emptyLink");
|
||||
var EmptyHLAcc;
|
||||
try {
|
||||
EmptyHLAcc =
|
||||
accService.getAccessibleFor(emptyLinkElement).
|
||||
QueryInterface(Components.interfaces.nsIAccessibleHyperLink);
|
||||
} catch (e) {
|
||||
ok(EmptyHLAcc, "no interface for empty link!");
|
||||
}
|
||||
testThis("emptyLink", EmptyHLAcc,
|
||||
Components.interfaces.nsIAccessibleRole.ROLE_LINK, 1,
|
||||
"", true, 98, 99);
|
||||
testStates("emptyLink", EmptyHLAcc,
|
||||
(state_focusable | state_linked),
|
||||
(ext_state_horizontal), (0));
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// normal hyperlink with embedded span
|
||||
var hyperlinkElementWithSpan = document.getElementById("LinkWithSpan");
|
||||
var hyperlinkWithSpanAcc;
|
||||
try {
|
||||
hyperlinkWithSpanAcc =
|
||||
accService.getAccessibleFor(hyperlinkElementWithSpan).
|
||||
QueryInterface(Components.interfaces.nsIAccessibleHyperLink);
|
||||
} catch(e) {
|
||||
ok(hyperlinkWithSpanAcc, "no interface for hyperlink with span!");
|
||||
}
|
||||
testThis("LinkWithSpan", hyperlinkWithSpanAcc,
|
||||
Components.interfaces.nsIAccessibleRole.ROLE_LINK, 1,
|
||||
"Heise Online", true, 124, 125);
|
||||
is(hyperlinkWithSpanAcc.getURI(0).spec, "http://www.heise.de/",
|
||||
"URI wrong for hyperlinkElementWithSpan!");
|
||||
testStates("LinkWithSpan", hyperlinkWithSpanAcc,
|
||||
(state_focusable | state_linked),
|
||||
(ext_state_horizontal), (0));
|
||||
testFocus("LinkWithSpan", hyperlinkWithSpanAcc, false, true);
|
||||
testStates("LinkWithSpan", hyperlinkWithSpanAcc,
|
||||
(state_focusable | state_focused | state_linked),
|
||||
(ext_state_horizontal), (0));
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Named anchor, should never have state_linked
|
||||
var namedAnchorElement = document.getElementById("namedAnchor");
|
||||
var namedAnchorAcc;
|
||||
try {
|
||||
namedAnchorAcc = accService.getAccessibleFor(namedAnchorElement).
|
||||
QueryInterface(Components.interfaces.nsIAccessibleHyperLink);
|
||||
} catch(e) {
|
||||
ok(namedAnchorAcc, "no interface for named anchor!");
|
||||
}
|
||||
testThis("namedAnchor", namedAnchorAcc,
|
||||
Components.interfaces.nsIAccessibleRole.ROLE_LINK, 1,
|
||||
"This should never be of state_linked", true, 202, 203);
|
||||
testStates("namedAnchor", namedAnchorAcc,
|
||||
(state_selectable),
|
||||
(ext_state_horizontal), (state_focusable | state_linked));
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=418368">Mozilla Bug 418368</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none"></div>
|
||||
<pre id="test">
|
||||
</pre>
|
||||
<br>Simple link:<br>
|
||||
<a id="NormalHyperlink" href="http://www.mozilla.org">Mozilla Foundation</a>
|
||||
<br>ARIA link:<br>
|
||||
<span id="AriaHyperlink" role="link"
|
||||
onclick="window.open('http://www.mozilla.org/');"
|
||||
tabindex="0">Mozilla Foundation Home</span>
|
||||
<br>Invalid, non-focusable hyperlink:<br>
|
||||
<span id="InvalidAriaHyperlink" role="link" aria-invalid="true"
|
||||
onclick="window.open('http:/www.mozilla.org/');">Invalid link</span>
|
||||
<br>Image map:<br>
|
||||
<map name="atoz_map">
|
||||
<area href="http://www.bbc.co.uk/radio4/atoz/index.shtml#b"
|
||||
coords="17,0,30,14"
|
||||
alt="b"
|
||||
shape="rect"></area>
|
||||
<area href="http://www.bbc.co.uk/radio4/atoz/index.shtml#a"
|
||||
coords="0,0,13,14"
|
||||
alt="a"
|
||||
shape="rect"></area>
|
||||
</map>
|
||||
<img width="447" id="imgmap"
|
||||
height="15"
|
||||
usemap="#atoz_map"
|
||||
src="http://www.bbc.co.uk/radio4/images/letters.gif"></img>
|
||||
<br>Empty link:<br>
|
||||
<a id="emptyLink" href=""><img src=""></img></a>
|
||||
<br>Link with embedded span<br>
|
||||
<a id="LinkWithSpan" href="http://www.heise.de/"><span lang="de">Heise Online</span></a>
|
||||
<br>Named anchor, must not have "linked" state for it to be exposed correctly:<br>
|
||||
<a id="namedAnchor" name="named_anchor">This should never be of state_linked</a>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,155 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0 transitional//en">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<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="text/javascript">
|
||||
|
||||
function doTest()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var accService = Components.classes["@mozilla.org/accessibleRetrieval;1"].
|
||||
getService(Components.interfaces.nsIAccessibleRetrieval);
|
||||
var Ci = Components.interfaces;
|
||||
|
||||
// Test table with display:inline. We shouldn't create table accessible and
|
||||
// table cell accessible in this case
|
||||
var table1 = document.getElementById("table1");
|
||||
var accNotCreated = false;
|
||||
try {
|
||||
var accTable1 = accService.getAccessibleFor(table1);
|
||||
} catch (e) {
|
||||
accNotCreated = true;
|
||||
}
|
||||
ok(accNotCreated, "wrongly created table accessible");
|
||||
|
||||
if (accNotCreated) {
|
||||
var div = document.getElementById("div");
|
||||
var accDiv = accService.getAccessibleFor(div);
|
||||
is(accDiv.firstChild.name, "cell", "wrongly created table cell accessible");
|
||||
}
|
||||
|
||||
// Test table with display:inline and have an another outside table
|
||||
var table2 = document.getElementById("table2");
|
||||
accNotCreated = false;
|
||||
try {
|
||||
var accTable2 = accService.getAccessibleFor(table2);
|
||||
} catch (e) {
|
||||
accNotCreated = true;
|
||||
}
|
||||
ok(accNotCreated, "wrongly created table accessible");
|
||||
|
||||
var cell = document.getElementById("cell");
|
||||
accNotCreated = false;
|
||||
try {
|
||||
var accCell = accService.getAccessibleFor(cell);
|
||||
} catch (e) {
|
||||
accNotCreated = true;
|
||||
}
|
||||
ok(accNotCreated, "wrongly created table cell accessible");
|
||||
|
||||
// Test table with role=alert.
|
||||
var table3 = document.getElementById("table3");
|
||||
var accTable3;
|
||||
var tableInterfaceExposed = true;
|
||||
try {
|
||||
accTable3 = accService.getAccessibleFor(table3).
|
||||
QueryInterface(Components.interfaces.nsIAccessibleTable);
|
||||
} catch (e) {
|
||||
tableInterfaceExposed = false;
|
||||
}
|
||||
ok(tableInterfaceExposed, "table interface is not exposed");
|
||||
|
||||
if (tableInterfaceExposed) {
|
||||
is(accTable3.finalRole, Ci.nsIAccessibleRole.ROLE_ALERT, "wrong role");
|
||||
|
||||
is(accTable3.cellRefAt(0,0).firstChild.name, "cell0", "wrong cell");
|
||||
is(accTable3.cellRefAt(0,1).firstChild.name, "cell1", "wrong cell");
|
||||
}
|
||||
|
||||
// Test table with role=log and aria property in tr. We create accessible for
|
||||
// tr in this case.
|
||||
var table4 = document.getElementById("table4");
|
||||
var accTable4;
|
||||
tableInterfaceExposed = true;
|
||||
try {
|
||||
accTable4 = accService.getAccessibleFor(table4).
|
||||
QueryInterface(Components.interfaces.nsIAccessibleTable);
|
||||
} catch (e) {
|
||||
tableInterfaceExposed = false;
|
||||
}
|
||||
ok(tableInterfaceExposed, "table interface is not exposed");
|
||||
|
||||
if (tableInterfaceExposed) {
|
||||
var tr = document.getElementById("tr");
|
||||
accNotCreated = false;
|
||||
try {
|
||||
var accTr = accService.getAccessibleFor(tr);
|
||||
} catch (e) {
|
||||
accNotCreated = true;
|
||||
}
|
||||
ok(!accNotCreated, "missed tr accessible");
|
||||
|
||||
is(accTable4.role, Ci.nsIAccessibleRole.ROLE_TABLE, "wrong role");
|
||||
|
||||
is(accTable4.cellRefAt(0,0).firstChild.name, "cell0", "wrong cell");
|
||||
is(accTable4.cellRefAt(0,1).firstChild.name, "cell1", "wrong cell");
|
||||
is(accTable4.cellRefAt(1,0).firstChild.name, "cell2", "wrong cell");
|
||||
is(accTable4.cellRefAt(1,1).firstChild.name, "cell3", "wrong cell");
|
||||
}
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body >
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=419811">Mozilla Bug 419811</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none"></div>
|
||||
<pre id="test">
|
||||
</pre>
|
||||
|
||||
<!-- Test Table -->
|
||||
<br><br><b> Testing Table:</b><br><br>
|
||||
<center>
|
||||
<div id="div">
|
||||
<table id="table1" border="1" style="display:inline">
|
||||
<tr>
|
||||
<td>cell</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<table><tr><td>
|
||||
<table id="table2" border="1" style="display:inline">
|
||||
<tr>
|
||||
<td id="cell">cell</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr></table>
|
||||
|
||||
<table id="table3" border="1" role="alert">
|
||||
<tr>
|
||||
<td>cell0</td>
|
||||
<td>cell1</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table id="table4" border="1" role="log">
|
||||
<tr aria-live="polite" id="tr">
|
||||
<td>cell0</td>
|
||||
<td>cell1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>cell2</td>
|
||||
<td>cell3</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
|
@ -257,23 +257,19 @@
|
|||
type="checkbox"
|
||||
accesskey="&spellCheckEnable.accesskey;"
|
||||
oncommand="InlineSpellCheckerUI.toggleEnabled();"/>
|
||||
#ifndef MOZ_WIDGET_COCOA
|
||||
<menuitem id="spell-add-dictionaries-main"
|
||||
label="&spellAddDictionaries.label;"
|
||||
accesskey="&spellAddDictionaries.accesskey;"
|
||||
oncommand="gContextMenu.addDictionaries();"/>
|
||||
#endif
|
||||
<menu id="spell-dictionaries"
|
||||
label="&spellDictionaries.label;"
|
||||
accesskey="&spellDictionaries.accesskey;">
|
||||
<menupopup id="spell-dictionaries-menu">
|
||||
#ifndef MOZ_WIDGET_COCOA
|
||||
<menuseparator id="spell-language-separator"/>
|
||||
<menuitem id="spell-add-dictionaries"
|
||||
label="&spellAddDictionaries.label;"
|
||||
accesskey="&spellAddDictionaries.accesskey;"
|
||||
oncommand="gContextMenu.addDictionaries();"/>
|
||||
#endif
|
||||
</menupopup>
|
||||
</menu>
|
||||
<menuseparator hidden="true" id="context-sep-bidi"/>
|
||||
|
|
|
@ -426,7 +426,7 @@
|
|||
command="Browser:BookmarkAllTabs" key="bookmarkAllTabsKb"/>
|
||||
<menuseparator id="organizeBookmarksSeparator"/>
|
||||
<menuitem id="bookmarksShowAll"
|
||||
label="&showAllBookmarksCmd2.label;"
|
||||
label="&organizeBookmarks.label;"
|
||||
command="Browser:ShowAllBookmarks"
|
||||
key="manBookmarkKb"/>
|
||||
<menu id="bookmarksToolbarFolderMenu"
|
||||
|
|
|
@ -233,18 +233,20 @@ function SetClickAndHoldHandlers()
|
|||
|
||||
// Bug 414797: Clone the dropmarker's menu into both the back and
|
||||
// the forward buttons.
|
||||
if (document.getElementById("unified-back-forward-button")) {
|
||||
var unifiedButton = document.getElementById("unified-back-forward-button");
|
||||
if (unifiedButton && !unifiedButton._clickHandlersAttached) {
|
||||
var popup = document.getElementById("back-forward-dropmarker")
|
||||
.firstChild.cloneNode(true);
|
||||
var backButton = document.getElementById("back-button");
|
||||
backButton.setAttribute("type", "menu");
|
||||
backButton.setAttribute("type", "menu-button");
|
||||
backButton.appendChild(popup);
|
||||
_addClickAndHoldListenersOnElement(backButton);
|
||||
var forwardButton = document.getElementById("forward-button");
|
||||
popup = popup.cloneNode(true);
|
||||
forwardButton.setAttribute("type", "menu");
|
||||
forwardButton.setAttribute("type", "menu-button");
|
||||
forwardButton.appendChild(popup);
|
||||
_addClickAndHoldListenersOnElement(forwardButton);
|
||||
unifiedButton._clickHandlersAttached = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -1211,6 +1213,9 @@ function nonBrowserWindowDelayedStartup()
|
|||
|
||||
// Set up Sanitize Item
|
||||
gSanitizeListener = new SanitizeListener();
|
||||
|
||||
// "Bookmarks Toolbar" menu
|
||||
initBookmarksToolbar();
|
||||
}
|
||||
|
||||
function nonBrowserWindowShutdown()
|
||||
|
@ -4195,7 +4200,21 @@ nsBrowserStatusHandler.prototype =
|
|||
this.securityButton.removeAttribute("label");
|
||||
|
||||
this.securityButton.setAttribute("tooltiptext", this._tooltipText);
|
||||
getIdentityHandler().checkIdentity(this._state, gBrowser.contentWindow.location);
|
||||
|
||||
// Don't pass in the actual location object, since it can cause us to
|
||||
// hold on to the window object too long. Just pass in the fields we
|
||||
// care about. (bug 424829)
|
||||
var location = gBrowser.contentWindow.location;
|
||||
var locationObj = {};
|
||||
try {
|
||||
locationObj.host = location.host;
|
||||
locationObj.hostname = location.hostname
|
||||
} catch (ex) {
|
||||
// Can sometimes throw if the URL being visited has no host/hostname,
|
||||
// e.g. about:blank. The _state for these pages means we won't need these
|
||||
// properties anyways, though.
|
||||
}
|
||||
getIdentityHandler().checkIdentity(this._state, locationObj);
|
||||
},
|
||||
|
||||
// simulate all change notifications after switching tabs
|
||||
|
@ -5476,6 +5495,24 @@ var OfflineApps = {
|
|||
Ci.nsIOfflineCacheUpdateService.ALLOW_NO_WARN);
|
||||
},
|
||||
|
||||
// XXX: duplicated in preferences/advanced.js
|
||||
_getOfflineAppUsage: function (host)
|
||||
{
|
||||
var cacheService = Components.classes["@mozilla.org/network/cache-service;1"].
|
||||
getService(Components.interfaces.nsICacheService);
|
||||
var cacheSession = cacheService.createSession("HTTP-offline",
|
||||
Components.interfaces.nsICache.STORE_OFFLINE,
|
||||
true).
|
||||
QueryInterface(Components.interfaces.nsIOfflineCacheSession);
|
||||
var usage = cacheSession.getDomainUsage(host);
|
||||
|
||||
var storageManager = Components.classes["@mozilla.org/dom/storagemanager;1"].
|
||||
getService(Components.interfaces.nsIDOMStorageManager);
|
||||
usage += storageManager.getUsage(host);
|
||||
|
||||
return usage;
|
||||
},
|
||||
|
||||
_checkUsage: function(aURI) {
|
||||
var pm = Cc["@mozilla.org/permissionmanager;1"].
|
||||
getService(Ci.nsIPermissionManager);
|
||||
|
@ -5483,7 +5520,7 @@ var OfflineApps = {
|
|||
// if the user has already allowed excessive usage, don't bother checking
|
||||
if (pm.testExactPermission(aURI, "offline-app") !=
|
||||
Ci.nsIOfflineCacheUpdateService.ALLOW_NO_WARN) {
|
||||
var usage = getOfflineAppUsage(aURI.asciiHost);
|
||||
var usage = this._getOfflineAppUsage(aURI.asciiHost);
|
||||
var warnQuota = gPrefService.getIntPref("offline-apps.quota.warn");
|
||||
if (usage >= warnQuota * 1024) {
|
||||
return true;
|
||||
|
@ -6405,7 +6442,8 @@ IdentityHandler.prototype = {
|
|||
* be called by onSecurityChange
|
||||
*
|
||||
* @param PRUint32 state
|
||||
* @param Location location
|
||||
* @param JS Object location that mirrors an nsLocation (i.e. has .host and
|
||||
* .hostname)
|
||||
*/
|
||||
checkIdentity : function(state, location) {
|
||||
var currentStatus = gBrowser.securityUI
|
||||
|
|
|
@ -279,7 +279,7 @@
|
|||
<observes element="Browser:Forward" attribute="disabled"/>
|
||||
</toolbarbutton>
|
||||
<toolbarbutton id="back-forward-dropmarker" type="menu" chromedir="&locale.dir;"
|
||||
disabled="true">
|
||||
disabled="true" tooltiptext="&backForwardMenu.tooltip;">
|
||||
<!-- bug 415444: event.stopPropagation is here for the cloned version of
|
||||
this menupopup -->
|
||||
<menupopup context=""
|
||||
|
@ -502,7 +502,7 @@
|
|||
<image id="sidebar-throbber"/>
|
||||
<toolbarbutton class="tabs-closebutton" tooltiptext="&sidebarCloseButton.tooltip;" oncommand="toggleSidebar();"/>
|
||||
</sidebarheader>
|
||||
<browser id="sidebar" flex="1" autoscroll="false"
|
||||
<browser id="sidebar" flex="1" autoscroll="false" disablehistory="true"
|
||||
style="min-width: 14em; width: 18em; max-width: 36em;"/>
|
||||
</vbox>
|
||||
|
||||
|
|
|
@ -68,13 +68,15 @@ var security = {
|
|||
return null;
|
||||
|
||||
var isBroken =
|
||||
(ui.state == Components.interfaces.nsIWebProgressListener.STATE_IS_BROKEN);
|
||||
(ui.state & Components.interfaces.nsIWebProgressListener.STATE_IS_BROKEN);
|
||||
var isInsecure =
|
||||
(ui.state & Components.interfaces.nsIWebProgressListener.STATE_IS_INSECURE);
|
||||
var isEV =
|
||||
(ui.state & Components.interfaces.nsIWebProgressListener.STATE_IDENTITY_EV_TOPLEVEL);
|
||||
ui.QueryInterface(nsISSLStatusProvider);
|
||||
var status = ui.SSLStatus;
|
||||
|
||||
if (status) {
|
||||
if (!isInsecure && status) {
|
||||
status.QueryInterface(nsISSLStatus);
|
||||
var cert = status.serverCert;
|
||||
var issuerName =
|
||||
|
|
|
@ -2329,13 +2329,28 @@
|
|||
return;
|
||||
}
|
||||
|
||||
if (('shiftKey' in aEvent && aEvent.shiftKey) ||
|
||||
('altKey' in aEvent && aEvent.altKey))
|
||||
if ('altKey' in aEvent && aEvent.altKey)
|
||||
return;
|
||||
#ifdef XP_MACOSX
|
||||
if ('metaKey' in aEvent && aEvent.metaKey) {
|
||||
var offset = 1;
|
||||
switch (aEvent.charCode) {
|
||||
case '}'.charCodeAt(0):
|
||||
offset *= -1;
|
||||
case '{'.charCodeAt(0):
|
||||
if (window.getComputedStyle(this.tabbrowser, null).direction == "ltr")
|
||||
offset *= -1;
|
||||
|
||||
this.tabbrowser.mTabContainer.advanceSelectedTab(offset, true);
|
||||
aEvent.stopPropagation();
|
||||
aEvent.preventDefault();
|
||||
return;
|
||||
}
|
||||
if ('shiftKey' in aEvent && aEvent.shiftKey)
|
||||
return;
|
||||
#else
|
||||
if (('ctrlKey' in aEvent && aEvent.ctrlKey) &&
|
||||
!('shiftKey' in aEvent && aEvent.shiftKey) &&
|
||||
!('metaKey' in aEvent && aEvent.metaKey)) {
|
||||
if (aEvent.keyCode == KeyEvent.DOM_VK_F4 &&
|
||||
this.tabbrowser.mTabBox.handleCtrlPageUpDown) {
|
||||
|
|
|
@ -656,23 +656,6 @@ function isValidFeed(aData, aPrincipal, aIsFeed)
|
|||
return aIsFeed;
|
||||
}
|
||||
|
||||
function getOfflineAppUsage(host)
|
||||
{
|
||||
var cacheService = Components.classes["@mozilla.org/network/cache-service;1"].
|
||||
getService(Components.interfaces.nsICacheService);
|
||||
var cacheSession = cacheService.createSession("HTTP-offline",
|
||||
Components.interfaces.nsICache.STORE_OFFLINE,
|
||||
true).
|
||||
QueryInterface(Components.interfaces.nsIOfflineCacheSession);
|
||||
var usage = cacheSession.getDomainUsage(host);
|
||||
|
||||
var storageManager = Components.classes["@mozilla.org/dom/storagemanager;1"].
|
||||
getService(Components.interfaces.nsIDOMStorageManager);
|
||||
usage += storageManager.getUsage(host);
|
||||
|
||||
return usage;
|
||||
}
|
||||
|
||||
// aCalledFromModal is optional
|
||||
function openHelpLink(aHelpTopic, aCalledFromModal) {
|
||||
var url = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"]
|
||||
|
|
|
@ -1022,15 +1022,16 @@ nsSafariProfileMigrator::ParseBookmarksFolder(CFArrayRef aChildren,
|
|||
// Encountered a Bookmark, so add it to the current folder...
|
||||
CFDictionaryRef URIDictionary = (CFDictionaryRef)
|
||||
::CFDictionaryGetValue(entry, CFSTR("URIDictionary"));
|
||||
nsCAutoString title, url;
|
||||
if (GetDictionaryCStringValue(URIDictionary, CFSTR("title"), title, kCFStringEncodingUTF8) &&
|
||||
nsAutoString title;
|
||||
nsCAutoString url;
|
||||
if (GetDictionaryStringValue(URIDictionary, CFSTR("title"), title) &&
|
||||
GetDictionaryCStringValue(entry, CFSTR("URLString"), url, kCFStringEncodingUTF8)) {
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
PRInt64 id;
|
||||
rv |= NS_NewURI(getter_AddRefs(uri), url);
|
||||
PRInt64 id;
|
||||
rv |= aBookmarksService->InsertBookmark(aParentFolder, uri,
|
||||
nsINavBookmarksService::DEFAULT_INDEX,
|
||||
title, &id);
|
||||
NS_ConvertUTF16toUTF8(title), &id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -517,7 +517,7 @@ var nsBrowserContentHandler = {
|
|||
var startPage = "";
|
||||
try {
|
||||
var choice = prefb.getIntPref("browser.startup.page");
|
||||
if (choice == 1)
|
||||
if (choice == 1 || choice == 3)
|
||||
startPage = this.startPage;
|
||||
|
||||
if (choice == 2)
|
||||
|
|
|
@ -383,6 +383,13 @@ BrowserGlue.prototype = {
|
|||
/**
|
||||
* Initialize Places
|
||||
* - imports the bookmarks html file if bookmarks datastore is empty
|
||||
*
|
||||
* These prefs are set by the backend services upon creation (or recreation)
|
||||
* of the Places db:
|
||||
* - browser.places.importBookmarksHTML
|
||||
* Set to false by the history service to indicate we need to re-import.
|
||||
* - browser.places.createdSmartBookmarks
|
||||
* Set during HTML import to indicate that the queries were created.
|
||||
*/
|
||||
_initPlaces: function bg__initPlaces() {
|
||||
// we need to instantiate the history service before we check the
|
||||
|
@ -401,14 +408,6 @@ BrowserGlue.prototype = {
|
|||
} catch(ex) {}
|
||||
|
||||
if (!importBookmarks) {
|
||||
+ /**
|
||||
+ * These prefs are set by the backend services upon creation (or recreation)
|
||||
+ * of the Places db:
|
||||
+ * - browser.places.importBookmarksHTML
|
||||
+ * Set to false by the history service to indicate we need to re-import.
|
||||
+ * - browser.places.createdSmartBookmarks
|
||||
+ * Set during HTML import to indicate that the queries were created.
|
||||
+ */
|
||||
// Call it here for Fx3 profiles created before the Places folder
|
||||
// has been added, otherwise it's called during import.
|
||||
this.ensurePlacesDefaultQueriesInitialized();
|
||||
|
|
|
@ -524,7 +524,7 @@ var gEditItemOverlay = {
|
|||
|
||||
onDescriptionFieldBlur: function EIO_onDescriptionFieldInput() {
|
||||
var description = this._element("descriptionField").value;
|
||||
if (description != PlacesUtils.getItemDescription(this._itemId)) {
|
||||
if (description != PlacesUIUtils.getItemDescription(this._itemId)) {
|
||||
var txn = PlacesUIUtils.ptm
|
||||
.editItemDescription(this._itemId, description);
|
||||
PlacesUIUtils.ptm.doTransaction(txn);
|
||||
|
@ -777,7 +777,8 @@ var gEditItemOverlay = {
|
|||
var ip = this._folderTree.insertionPoint;
|
||||
|
||||
// default to the bookmarks menu folder
|
||||
if (ip.itemId == PlacesUIUtils.allBookmarksFolderId ||
|
||||
if (!ip ||
|
||||
ip.itemId == PlacesUIUtils.allBookmarksFolderId ||
|
||||
ip.itemId == PlacesUIUtils.unfiledBookmarksFolderId) {
|
||||
ip.itemId = PlacesUtils.bookmarksMenuFolderId;
|
||||
ip.index = -1;
|
||||
|
@ -819,8 +820,22 @@ var gEditItemOverlay = {
|
|||
// nsINavBookmarkObserver
|
||||
onItemChanged: function EIO_onItemChanged(aItemId, aProperty,
|
||||
aIsAnnotationProperty, aValue) {
|
||||
if (this._itemId != aItemId)
|
||||
if (this._itemId != aItemId) {
|
||||
if (aProperty == "title") {
|
||||
// If the title of a folder which is listed within the folders
|
||||
// menulist has been changed, we need to update the label of its
|
||||
// representing element.
|
||||
var menupopup = this._folderMenuList.menupopup;
|
||||
for (var i=0; i < menupopup.childNodes.length; i++) {
|
||||
if (menupopup.childNodes[i].folderId == aItemId) {
|
||||
menupopup.childNodes[i].label = aValue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
switch (aProperty) {
|
||||
case "title":
|
||||
|
@ -862,7 +877,7 @@ var gEditItemOverlay = {
|
|||
break;
|
||||
case DESCRIPTION_ANNO:
|
||||
this._initTextField("descriptionField",
|
||||
PlacesUtils.getItemDescription(this._itemId));
|
||||
PlacesUIUtils.getItemDescription(this._itemId));
|
||||
break;
|
||||
case LOAD_IN_SIDEBAR_ANNO:
|
||||
this._element("loadInSidebarCheckbox").checked =
|
||||
|
|
|
@ -78,8 +78,10 @@ var PlacesOrganizer = {
|
|||
// Set up the search UI.
|
||||
PlacesSearchBox.init();
|
||||
|
||||
#ifdef PLACES_QUERY_BUILDER
|
||||
// Set up the advanced query builder UI
|
||||
PlacesQueryBuilder.init();
|
||||
#endif
|
||||
|
||||
window.addEventListener("AppCommand", this, true);
|
||||
#ifdef XP_MACOSX
|
||||
|
@ -346,17 +348,9 @@ var PlacesOrganizer = {
|
|||
while (restorePopup.childNodes.length > 1)
|
||||
restorePopup.removeChild(restorePopup.firstChild);
|
||||
|
||||
// get bookmarks backup dir
|
||||
var dirSvc = Cc["@mozilla.org/file/directory_service;1"].
|
||||
getService(Ci.nsIProperties);
|
||||
var bookmarksBackupDir = dirSvc.get("ProfD", Ci.nsIFile);
|
||||
bookmarksBackupDir.append("bookmarkbackups");
|
||||
if (!bookmarksBackupDir.exists())
|
||||
return; // no backup files
|
||||
|
||||
// get list of files
|
||||
var fileList = [];
|
||||
var files = bookmarksBackupDir.directoryEntries;
|
||||
var files = this.bookmarksBackupDir.directoryEntries;
|
||||
while (files.hasMoreElements()) {
|
||||
var f = files.getNext().QueryInterface(Ci.nsIFile);
|
||||
if (!f.isHidden() && f.leafName.match(/^bookmarks-.+(html|json)?$/))
|
||||
|
@ -463,8 +457,29 @@ var PlacesOrganizer = {
|
|||
fp.defaultString = PlacesUtils.getFormattedString("bookmarksBackupFilename",
|
||||
[date]);
|
||||
|
||||
if (fp.show() != Ci.nsIFilePicker.returnCancel)
|
||||
if (fp.show() != Ci.nsIFilePicker.returnCancel) {
|
||||
PlacesUtils.backupBookmarksToFile(fp.file);
|
||||
|
||||
// copy new backup to /backups dir (bug 424389)
|
||||
var latestBackup = PlacesUtils.getMostRecentBackup();
|
||||
if (latestBackup != fp.file) {
|
||||
var date = new Date().toLocaleFormat("%Y-%m-%d");
|
||||
var name = PlacesUtils.getFormattedString("bookmarksArchiveFilename",
|
||||
[date]);
|
||||
fp.file.copyTo(this.bookmarksBackupDir, name);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
get bookmarksBackupDir() {
|
||||
delete this.bookmarksBackupDir;
|
||||
var dirSvc = Cc["@mozilla.org/file/directory_service;1"].
|
||||
getService(Ci.nsIProperties);
|
||||
var bookmarksBackupDir = dirSvc.get("ProfD", Ci.nsIFile);
|
||||
bookmarksBackupDir.append("bookmarkbackups");
|
||||
if (!bookmarksBackupDir.exists())
|
||||
bookmarksBackupDir.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0600);
|
||||
return this.bookmarksBackupDir = bookmarksBackupDir;
|
||||
},
|
||||
|
||||
_paneDisabled: false,
|
||||
|
@ -632,25 +647,15 @@ var PlacesOrganizer = {
|
|||
saveSearch: function PO_saveSearch() {
|
||||
// Get the place: uri for the query.
|
||||
// If the advanced query builder is showing, use that.
|
||||
var queries = [];
|
||||
var queries = PlacesQueryBuilder.queries;
|
||||
var options = this.getCurrentOptions();
|
||||
options.excludeQueries = true;
|
||||
// unset expandQueries=false, which is set by the left pane
|
||||
options.expandQueries = true;
|
||||
var searchUI = document.getElementById("searchModifiers");
|
||||
if (!searchUI.hidden)
|
||||
queries = PlacesQueryBuilder.queries;
|
||||
else if (PlacesSearchBox.value && PlacesSearchBox.value.length > 0) {
|
||||
// If not, use the value of the search box.
|
||||
var query = PlacesUtils.history.getNewQuery();
|
||||
query.searchTerms = PlacesSearchBox.value;
|
||||
queries.push(query);
|
||||
}
|
||||
else {
|
||||
// if there is no query, do nothing.
|
||||
// XXX should probably have a dialog here to explain that the user needs to search first.
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef PLACES_QUERY_BUILDER
|
||||
var query = PlacesUtils.history.getNewQuery();
|
||||
query.searchTerms = PlacesSearchBox.value;
|
||||
queries.push(query);
|
||||
#endif
|
||||
|
||||
var placeSpec = PlacesUtils.history.queriesToQueryString(queries,
|
||||
queries.length,
|
||||
options);
|
||||
|
@ -843,9 +848,11 @@ var PlacesSearchBox = {
|
|||
var searchModifiers = document.getElementById("searchModifiers");
|
||||
searchModifiers.hidden = false;
|
||||
|
||||
#ifdef PLACES_QUERY_BUILDER
|
||||
// if new search, open builder with pre-populated text row
|
||||
if (PlacesQueryBuilder.numRows == 0)
|
||||
document.getElementById("OrganizerCommand_search:moreCriteria").doCommand();
|
||||
#endif
|
||||
},
|
||||
|
||||
hideSearchUI: function PSB_hideSearchUI() {
|
||||
|
@ -862,6 +869,7 @@ var PlacesQueryBuilder = {
|
|||
queries: [],
|
||||
queryOptions: null,
|
||||
|
||||
#ifdef PLACES_QUERY_BUILDER
|
||||
numRows: 0,
|
||||
|
||||
/**
|
||||
|
@ -904,6 +912,7 @@ var PlacesQueryBuilder = {
|
|||
_nextSearch: null,
|
||||
_queryBuilders: null,
|
||||
|
||||
|
||||
init: function PQB_init() {
|
||||
// Initialize advanced search
|
||||
this._nextSearch = {
|
||||
|
@ -1319,6 +1328,7 @@ var PlacesQueryBuilder = {
|
|||
// XXXben - find some public way of doing this!
|
||||
PlacesOrganizer._content.load(this.queries, this.options);
|
||||
},
|
||||
#endif
|
||||
|
||||
onScopeSelected: function PQB_onScopeSelected(aButton) {
|
||||
var id = aButton.getAttribute("id");
|
||||
|
|
|
@ -90,6 +90,7 @@
|
|||
</handlers>
|
||||
</binding>
|
||||
|
||||
#ifdef PLACES_QUERY_BUILDER
|
||||
<binding id="calendar">
|
||||
<content>
|
||||
<xul:vbox class="calendar-box">
|
||||
|
@ -505,6 +506,6 @@
|
|||
|
||||
</implementation>
|
||||
</binding> <!-- end calendar -->
|
||||
|
||||
#endif
|
||||
|
||||
</bindings>
|
||||
|
|
|
@ -435,6 +435,7 @@
|
|||
<button id="saveSearch" class="small"
|
||||
label="&saveSearch.label;" accesskey="&saveSearch.accesskey;"
|
||||
command="OrganizerCommand_search:save"/>
|
||||
#ifdef PLACES_QUERY_BUILDER
|
||||
<button id="organizerScopeBarExpander"
|
||||
class="expander-down"
|
||||
tooltiptext="&search.scopeBarExpanderDown.tooltip;"
|
||||
|
@ -443,6 +444,9 @@
|
|||
oncommand="PlacesQueryBuilder.toggleVisibility();"/>
|
||||
</toolbar>
|
||||
#include advancedSearch.inc
|
||||
#else
|
||||
</toolbar>
|
||||
#endif
|
||||
</vbox>
|
||||
<vbox flex="1">
|
||||
<tree id="placeContent" class="placesTree" context="placesContext"
|
||||
|
|
|
@ -4,7 +4,7 @@ browser.jar:
|
|||
* content/browser/places/bookmarkProperties2.xul (content/bookmarkProperties.xul)
|
||||
* content/browser/places/places.xul (content/places.xul)
|
||||
* content/browser/places/places.js (content/places.js)
|
||||
content/browser/places/places.xml (content/places.xml)
|
||||
* content/browser/places/places.xml (content/places.xml)
|
||||
content/browser/places/places.css (content/places.css)
|
||||
content/browser/places/organizer.css (content/organizer.css)
|
||||
* content/browser/places/bookmarkProperties.xul (content/bookmarkProperties.xul)
|
||||
|
|
|
@ -110,6 +110,7 @@ static NS_DEFINE_CID(kParserCID, NS_PARSER_CID);
|
|||
|
||||
#define KEY_TOOLBARFOLDER_LOWER "personal_toolbar_folder"
|
||||
#define KEY_BOOKMARKSMENU_LOWER "bookmarks_menu"
|
||||
#define KEY_UNFILEDFOLDER_LOWER "unfiled_bookmarks_folder"
|
||||
#define KEY_PLACESROOT_LOWER "places_root"
|
||||
#define KEY_HREF_LOWER "href"
|
||||
#define KEY_FEEDURL_LOWER "feedurl"
|
||||
|
@ -164,7 +165,8 @@ public:
|
|||
enum ContainerType { Container_Normal,
|
||||
Container_Places,
|
||||
Container_Menu,
|
||||
Container_Toolbar };
|
||||
Container_Toolbar,
|
||||
Container_Unfiled};
|
||||
|
||||
PRInt64 mContainerID;
|
||||
|
||||
|
@ -756,6 +758,10 @@ BookmarkContentSink::HandleHeadBegin(const nsIParserNode& node)
|
|||
if (mIsImportDefaults)
|
||||
frame.mLastContainerType = BookmarkImportFrame::Container_Menu;
|
||||
break;
|
||||
} else if (node.GetKeyAt(i).LowerCaseEqualsLiteral(KEY_UNFILEDFOLDER_LOWER)) {
|
||||
if (mIsImportDefaults)
|
||||
frame.mLastContainerType = BookmarkImportFrame::Container_Unfiled;
|
||||
break;
|
||||
} else if (node.GetKeyAt(i).LowerCaseEqualsLiteral(KEY_PLACESROOT_LOWER)) {
|
||||
if (mIsImportDefaults)
|
||||
frame.mLastContainerType = BookmarkImportFrame::Container_Places;
|
||||
|
@ -1167,12 +1173,19 @@ BookmarkContentSink::NewFrame()
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
break;
|
||||
case BookmarkImportFrame::Container_Menu:
|
||||
// menu root
|
||||
// menu folder
|
||||
rv = mBookmarksService->GetBookmarksMenuFolder(&ourID);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (mAllowRootChanges)
|
||||
updateFolder = PR_TRUE;
|
||||
break;
|
||||
case BookmarkImportFrame::Container_Unfiled:
|
||||
// unfiled bookmarks folder
|
||||
rv = mBookmarksService->GetUnfiledBookmarksFolder(&ourID);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (mAllowRootChanges)
|
||||
updateFolder = PR_TRUE;
|
||||
break;
|
||||
case BookmarkImportFrame::Container_Toolbar:
|
||||
// get toolbar folder
|
||||
rv = mBookmarksService->GetToolbarFolder(&ourID);
|
||||
|
@ -1438,6 +1451,7 @@ static const char kDescriptionClose[] = NS_LINEBREAK;
|
|||
static const char kPlacesRootAttribute[] = " PLACES_ROOT=\"true\"";
|
||||
static const char kBookmarksRootAttribute[] = " BOOKMARKS_MENU=\"true\"";
|
||||
static const char kToolbarFolderAttribute[] = " PERSONAL_TOOLBAR_FOLDER=\"true\"";
|
||||
static const char kUnfiledBookmarksFolderAttribute[] = " UNFILED_BOOKMARKS_FOLDER=\"true\"";
|
||||
static const char kIconAttribute[] = " ICON=\"";
|
||||
static const char kIconURIAttribute[] = " ICON_URI=\"";
|
||||
static const char kHrefAttribute[] = " HREF=\"";
|
||||
|
@ -1681,6 +1695,10 @@ nsPlacesImportExportService::WriteContainerHeader(nsINavHistoryResultNode* aFold
|
|||
rv = mBookmarksService->GetToolbarFolder(&toolbarFolder);
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
|
||||
PRInt64 unfiledBookmarksFolder;
|
||||
rv = mBookmarksService->GetUnfiledBookmarksFolder(&unfiledBookmarksFolder);
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
|
||||
// " PERSONAL_TOOLBAR_FOLDER="true"", etc.
|
||||
if (folderId == placesRoot) {
|
||||
rv = aOutput->Write(kPlacesRootAttribute, sizeof(kPlacesRootAttribute)-1, &dummy);
|
||||
|
@ -1688,6 +1706,9 @@ nsPlacesImportExportService::WriteContainerHeader(nsINavHistoryResultNode* aFold
|
|||
} else if (folderId == bookmarksMenuFolder) {
|
||||
rv = aOutput->Write(kBookmarksRootAttribute, sizeof(kBookmarksRootAttribute)-1, &dummy);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
} else if (folderId == unfiledBookmarksFolder) {
|
||||
rv = aOutput->Write(kUnfiledBookmarksFolderAttribute, sizeof(kUnfiledBookmarksFolderAttribute)-1, &dummy);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
} else if (folderId == toolbarFolder) {
|
||||
rv = aOutput->Write(kToolbarFolderAttribute, sizeof(kToolbarFolderAttribute)-1, &dummy);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
@ -2273,6 +2294,13 @@ nsPlacesImportExportService::RunBatched(nsISupports* aUserData)
|
|||
rv = mBookmarksService->RemoveFolderChildren(toolbarFolder);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRInt64 unfiledBookmarksFolder;
|
||||
rv = mBookmarksService->GetUnfiledBookmarksFolder(&unfiledBookmarksFolder);
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
|
||||
rv = mBookmarksService->RemoveFolderChildren(unfiledBookmarksFolder);
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
|
||||
// add the "Places" folder
|
||||
nsCOMPtr<nsIBrowserGlue> glue(do_GetService("@mozilla.org/browser/browserglue;1", &rv));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
@ -2366,6 +2394,10 @@ nsPlacesImportExportService::ExportHTMLToFile(nsILocalFile* aBookmarksFile)
|
|||
rv = mBookmarksService->GetToolbarFolder(&toolbarFolder);
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
|
||||
PRInt64 unfiledBookmarksFolder;
|
||||
rv = mBookmarksService->GetUnfiledBookmarksFolder(&unfiledBookmarksFolder);
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
|
||||
// file header
|
||||
PRUint32 dummy;
|
||||
rv = strm->Write(kFileIntro, sizeof(kFileIntro)-1, &dummy);
|
||||
|
@ -2419,8 +2451,8 @@ nsPlacesImportExportService::ExportHTMLToFile(nsILocalFile* aBookmarksFile)
|
|||
rv = WriteContainerContents(rootNode, EmptyCString(), strm);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// write out the toolbar folder contents as a folder under the bookmarks-menu
|
||||
// for backwards compatibility
|
||||
// write out the toolbar folder and unfiled-bookmarks folder (if not empty)
|
||||
// under the bookmarks-menu for backwards compatibility
|
||||
rv = query->SetFolders(&toolbarFolder, 1);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -2434,6 +2466,29 @@ nsPlacesImportExportService::ExportHTMLToFile(nsILocalFile* aBookmarksFile)
|
|||
rv = WriteContainer(rootNode, nsDependentCString(kIndent), strm);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// unfiled bookmarks
|
||||
rv = query->SetFolders(&unfiledBookmarksFolder, 1);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = mHistoryService->ExecuteQuery(query, options, getter_AddRefs(result));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// get root (folder) node
|
||||
rv = result->GetRoot(getter_AddRefs(rootNode));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = rootNode->SetContainerOpen(PR_TRUE);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRUint32 childCount = 0;
|
||||
rv = rootNode->GetChildCount(&childCount);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (childCount > 0) {
|
||||
rv = WriteContainer(rootNode, nsDependentCString(kIndent), strm);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
// epilogue
|
||||
rv = WriteContainerEpilogue(EmptyCString(), strm);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
|
|
@ -26,6 +26,10 @@
|
|||
<DD>test microsummary
|
||||
-->
|
||||
</DL>
|
||||
<DT><H3 UNFILED_BOOKMARKS_FOLDER="true">Unsorted Bookmarks</H3>
|
||||
<DL><p>
|
||||
<DT><A HREF="http://example.tld">Example.tld</A>
|
||||
</DL><p>
|
||||
<DT><H3 LAST_MODIFIED="1177541040" PERSONAL_TOOLBAR_FOLDER="true" ID="rdf:#$FvPhC3">Bookmarks Toolbar Folder</H3>
|
||||
<DD>Add bookmarks to this folder to see them displayed on the Bookmarks Toolbar
|
||||
<DL><p>
|
||||
|
|
|
@ -284,12 +284,13 @@ function testUnfiledBookmarks() {
|
|||
var result = PlacesUtils.history.executeQuery(query, PlacesUtils.history.getNewQueryOptions());
|
||||
var rootNode = result.root;
|
||||
rootNode.containerOpen = true;
|
||||
do_check_eq(rootNode.childCount, bookmarkData.length);
|
||||
for (var i = 0; i < rootNode.childCount; i++) {
|
||||
// child count (add 1 for pre-existing item)
|
||||
do_check_eq(rootNode.childCount, bookmarkData.length + 1);
|
||||
for (var i = 1; i < rootNode.childCount; i++) {
|
||||
var child = rootNode.getChild(i);
|
||||
dump(bookmarkData[i].uri.spec + " == " + child.uri + "?\n");
|
||||
do_check_true(bookmarkData[i].uri.equals(uri(child.uri)));
|
||||
do_check_eq(child.title, bookmarkData[i].title);
|
||||
dump(bookmarkData[i - 1].uri.spec + " == " + child.uri + "?\n");
|
||||
do_check_true(bookmarkData[i - 1].uri.equals(uri(child.uri)));
|
||||
do_check_eq(child.title, bookmarkData[i - 1].title);
|
||||
/* WTF
|
||||
if (child.tags)
|
||||
do_check_eq(child.tags, bookmarkData[i].title);
|
||||
|
|
|
@ -127,7 +127,8 @@ function run_test() {
|
|||
try {
|
||||
importer.importHTMLFromFile(bookmarksFileNew, true);
|
||||
} catch(ex) { do_throw("couldn't import the exported file: " + ex); }
|
||||
testCanonicalBookmarks(bmsvc.bookmarksMenuFolder);
|
||||
testCanonicalBookmarks(bmsvc.bookmarksMenuFolder);
|
||||
|
||||
/*
|
||||
// XXX import-to-folder tests disabled due to bug 363634
|
||||
// Test importing a pre-Places canonical bookmarks file to a specific folder.
|
||||
|
@ -194,8 +195,8 @@ function testCanonicalBookmarks(aFolder) {
|
|||
var rootNode = result.root;
|
||||
rootNode.containerOpen = true;
|
||||
|
||||
// 6-2: the toolbar contents are imported to the places-toolbar folder,
|
||||
// the separator above it is removed.
|
||||
// 6-2: the toolbar folder and unfiled bookmarks folder imported to the
|
||||
// corresponding places folders
|
||||
do_check_eq(rootNode.childCount, 4);
|
||||
|
||||
// get test folder
|
||||
|
@ -299,4 +300,12 @@ function testCanonicalBookmarks(aFolder) {
|
|||
livemarksvc.getFeedURI(livemark.itemId).spec);
|
||||
|
||||
toolbar.containerOpen = false;
|
||||
|
||||
// unfiled bookmarks
|
||||
query.setFolders([bmsvc.unfiledBookmarksFolder], 1);
|
||||
result = histsvc.executeQuery(query, histsvc.getNewQueryOptions());
|
||||
var unfiledBookmarks = result.root;
|
||||
unfiledBookmarks.containerOpen = true;
|
||||
do_check_eq(unfiledBookmarks.childCount, 1);
|
||||
unfiledBookmarks.containerOpen = false;
|
||||
}
|
||||
|
|
|
@ -207,6 +207,24 @@ var gAdvancedPane = {
|
|||
"", params);
|
||||
},
|
||||
|
||||
// XXX: duplicated in browser.js
|
||||
_getOfflineAppUsage: function (host)
|
||||
{
|
||||
var cacheService = Components.classes["@mozilla.org/network/cache-service;1"].
|
||||
getService(Components.interfaces.nsICacheService);
|
||||
var cacheSession = cacheService.createSession("HTTP-offline",
|
||||
Components.interfaces.nsICache.STORE_OFFLINE,
|
||||
true).
|
||||
QueryInterface(Components.interfaces.nsIOfflineCacheSession);
|
||||
var usage = cacheSession.getDomainUsage(host);
|
||||
|
||||
var storageManager = Components.classes["@mozilla.org/dom/storagemanager;1"].
|
||||
getService(Components.interfaces.nsIDOMStorageManager);
|
||||
usage += storageManager.getUsage(host);
|
||||
|
||||
return usage;
|
||||
},
|
||||
|
||||
/**
|
||||
* Updates the list of offline applications
|
||||
*/
|
||||
|
@ -233,7 +251,7 @@ var gAdvancedPane = {
|
|||
row.className = "offlineapp";
|
||||
row.setAttribute("host", perm.host);
|
||||
var converted = DownloadUtils.
|
||||
convertByteUnits(getOfflineAppUsage(perm.host));
|
||||
convertByteUnits(this._getOfflineAppUsage(perm.host));
|
||||
row.setAttribute("usage",
|
||||
bundle.getFormattedString("offlineAppUsage",
|
||||
converted));
|
||||
|
|
|
@ -467,20 +467,24 @@
|
|||
var textBox = this._textbox;
|
||||
var textValue = textBox.value;
|
||||
|
||||
var where = "current";
|
||||
if (aEvent && aEvent.originalTarget.getAttribute("anonid") == "search-go-button") {
|
||||
if (aEvent.button == 2)
|
||||
return;
|
||||
where = whereToOpenLink(aEvent, false, true);
|
||||
}
|
||||
else {
|
||||
var newTabPref = textBox._prefBranch.getBoolPref("browser.search.openintab");
|
||||
if ((aEvent && aEvent.altKey) ^ newTabPref)
|
||||
where = "tab";
|
||||
}
|
||||
|
||||
// Save the current value in the form history
|
||||
if (textValue) {
|
||||
textBox._formHistSvc.addEntry(textBox.getAttribute("autocompletesearchparam"),
|
||||
textValue);
|
||||
}
|
||||
|
||||
var where = "current";
|
||||
if (aEvent && aEvent.originalTarget.getAttribute("anonid") == "search-go-button")
|
||||
where = whereToOpenLink(aEvent, false, true);
|
||||
else {
|
||||
var newTabPref = textBox._prefBranch.getBoolPref("browser.search.openintab");
|
||||
if ((aEvent && aEvent.altKey) ^ newTabPref)
|
||||
where = "tab";
|
||||
}
|
||||
this.doSearch(textValue, where);
|
||||
]]></body>
|
||||
</method>
|
||||
|
@ -642,9 +646,14 @@
|
|||
var innerRect = this.inputField.getBoundingClientRect();
|
||||
var width = outerRect.right - innerRect.left;
|
||||
popup.setAttribute("width", width > 100 ? width : 100);
|
||||
popup.openPopup(null, "", innerRect.left, outerRect.bottom, false, false);
|
||||
|
||||
popup.popupBoxObject.setConsumeRollupEvent(this.consumeRollupEvent);
|
||||
// setConsumeRollupEvent() before we call openPopup(),
|
||||
// see bug #404438 for more details
|
||||
popup.popupBoxObject.setConsumeRollupEvent(
|
||||
this.consumeRollupEvent ?
|
||||
Ci.nsIPopupBoxObject.ROLLUP_CONSUME :
|
||||
Ci.nsIPopupBoxObject.ROLLUP_NO_CONSUME);
|
||||
popup.openPopup(null, "", innerRect.left, outerRect.bottom, false, false);
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
<!ENTITY subscribeToPageMenupopup.label "Subscribe to This Page">
|
||||
<!ENTITY subscribeToPageMenuitem.label "Subscribe to This Page…">
|
||||
<!ENTITY addCurPagesCmd.label "Bookmark All Tabs…">
|
||||
<!ENTITY showAllBookmarksCmd2.label "Organize Bookmarks">
|
||||
<!ENTITY organizeBookmarks.label "Organize Bookmarks…">
|
||||
<!ENTITY bookmarkAllCmd.label "Bookmark All Tabs…">
|
||||
|
||||
<!ENTITY backCmd.label "Back">
|
||||
|
@ -73,6 +73,7 @@
|
|||
<!ENTITY forwardCmd.label "Forward">
|
||||
<!ENTITY forwardCmd.accesskey "F">
|
||||
<!ENTITY forwardButton.tooltip "Go forward one page">
|
||||
<!ENTITY backForwardMenu.tooltip "Recent pages">
|
||||
<!ENTITY reloadCmd.label "Reload">
|
||||
<!ENTITY reloadCmd.accesskey "R">
|
||||
<!ENTITY reloadButton.tooltip "Reload current page">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
|
||||
<ShortName>Wikipedia (English)</ShortName>
|
||||
<ShortName>Wikipedia (en)</ShortName>
|
||||
<Description>Wikipedia, the free encyclopedia</Description>
|
||||
<InputEncoding>UTF-8</InputEncoding>
|
||||
<Image width="16" height="16">data:image/x-icon;base64,AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAEAgQAhIOEAMjHyABIR0gA6ejpAGlqaQCpqKkAKCgoAPz9%2FAAZGBkAmJiYANjZ2ABXWFcAent6ALm6uQA8OjwAiIiIiIiIiIiIiI4oiL6IiIiIgzuIV4iIiIhndo53KIiIiB%2FWvXoYiIiIfEZfWBSIiIEGi%2FfoqoiIgzuL84i9iIjpGIoMiEHoiMkos3FojmiLlUipYliEWIF%2BiDe0GoRa7D6GPbjcu1yIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA</Image>
|
||||
|
|
|
@ -33,13 +33,14 @@ classic.jar:
|
|||
* skin/classic/browser/places/bookmarkProperties.css (places/bookmarkProperties.css)
|
||||
skin/classic/browser/places/bookmarksMenu.png (places/bookmarksMenu.png)
|
||||
skin/classic/browser/places/bookmarksToolbar.png (places/bookmarksToolbar.png)
|
||||
skin/classic/browser/places/calendar.png (places/calendar.png)
|
||||
* skin/classic/browser/places/editBookmarkOverlay.css (places/editBookmarkOverlay.css)
|
||||
skin/classic/browser/places/livemark-item.png (places/livemark-item.png)
|
||||
skin/classic/browser/places/pageStarred.png (places/pageStarred.png)
|
||||
skin/classic/browser/places/starred48.png (places/starred48.png)
|
||||
skin/classic/browser/places/unstarred48.png (places/unstarred48.png)
|
||||
skin/classic/browser/places/places.css (places/places.css)
|
||||
skin/classic/browser/places/organizer.css (places/organizer.css)
|
||||
* skin/classic/browser/places/organizer.css (places/organizer.css)
|
||||
* skin/classic/browser/places/organizer.xml (places/organizer.xml)
|
||||
skin/classic/browser/places/query.png (places/query.png)
|
||||
skin/classic/browser/places/starPage.png (places/starPage.png)
|
||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 670 B |
|
@ -140,29 +140,7 @@
|
|||
padding: 2px 2px 3px 4px;
|
||||
}
|
||||
|
||||
.filterList {
|
||||
-moz-appearance: none;
|
||||
background-color: transparent;
|
||||
border: 0px;
|
||||
margin: 2px;
|
||||
padding: 0px;
|
||||
min-width: 0px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
list-style-image: url("chrome://browser/skin/Search-bar.png");
|
||||
-moz-user-focus: ignore;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.filterList .button-box {
|
||||
border: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.filterList .button-menu-dropmarker {
|
||||
margin: 9px -3px -4px 8px;
|
||||
}
|
||||
|
||||
%ifdef PLACES_QUERY_BUILDER
|
||||
/* Calendar */
|
||||
.history-calendar {
|
||||
margin: 0px 0px 7px 6px;
|
||||
|
@ -229,16 +207,6 @@
|
|||
padding: 3px 3px 3px 0px;
|
||||
}
|
||||
|
||||
#searchModifiers {
|
||||
padding-right: 3px;
|
||||
}
|
||||
|
||||
#debugPanel {
|
||||
background-color: ThreeDFace;
|
||||
border-top: 2px solid;
|
||||
-moz-border-top-colors: ThreeDShadow ThreeDHighlight;
|
||||
}
|
||||
|
||||
.advancedSearchMinus {
|
||||
list-style-image: url("moz-icon://stock/gtk-remove?size=menu");
|
||||
}
|
||||
|
@ -257,26 +225,30 @@
|
|||
margin: 0 !important;
|
||||
}
|
||||
|
||||
#saveSearch {
|
||||
list-style-image: url("moz-icon://stock/gtk-save?size=menu");
|
||||
}
|
||||
|
||||
/**** expanders ****/
|
||||
.expander-up,
|
||||
.expander-down {
|
||||
min-width: 0;
|
||||
}
|
||||
%endif
|
||||
|
||||
#searchModifiers {
|
||||
padding-right: 3px;
|
||||
}
|
||||
|
||||
#saveSearch {
|
||||
list-style-image: url("moz-icon://stock/gtk-save?size=menu");
|
||||
}
|
||||
|
||||
/**** menuitem stock icons ****/
|
||||
#orgClose {
|
||||
list-style-image: url("moz-icon://stock/gtk-close?size=menu");
|
||||
}
|
||||
|
||||
menuitem[command="OrganizerCommand_import"] {
|
||||
#fileImport {
|
||||
list-style-image: url("moz-icon://stock/gtk-revert-to-saved?size=menu");
|
||||
}
|
||||
|
||||
menuitem[command="OrganizerCommand_export"] {
|
||||
#fileExport {
|
||||
list-style-image: url("moz-icon://stock/gtk-save-as?size=menu");
|
||||
}
|
||||
|
||||
|
|
|
@ -145,7 +145,6 @@ menuitem[command="placesCmd_open:window"] {
|
|||
}
|
||||
|
||||
#placesContext_open\:newtab,
|
||||
#placesContext_openContainer\:tabs,
|
||||
menuitem[command="placesCmd_open:tab"] {
|
||||
list-style-image: url("chrome://browser/skin/Toolbar-small.png");
|
||||
-moz-image-region: rect(0px 64px 16px 48px);
|
||||
|
|
|
@ -271,26 +271,14 @@ menubutton:not([disabled="true"]):hover:active {
|
|||
color: ButtonText !important;
|
||||
}
|
||||
|
||||
/* set up extended binding for the back & forward buttons */
|
||||
toolbar:not([mode="text"]) #back-button,
|
||||
toolbar:not([mode="text"]) #forward-button {
|
||||
-moz-binding: url(chrome://browser/skin/browser.xml#bf-menu-button);
|
||||
}
|
||||
|
||||
toolbar:not([mode="text"]) #back-button .toolbarbutton-menubutton-button,
|
||||
toolbar:not([mode="text"]) #forward-button .toolbarbutton-menubutton-button {
|
||||
-moz-binding: url('chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton-image');
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
}
|
||||
|
||||
toolbar:not([mode="text"]) #back-button .allowevents-box,
|
||||
toolbar:not([mode="text"]) #forward-button .allowevents-box {
|
||||
-moz-binding: url(chrome://browser/skin/browser.xml#bf-menu-button-allowevents-box);
|
||||
}
|
||||
|
||||
toolbar:not([mode="text"]) #back-button .toolbarbutton-menubutton-dropmarker,
|
||||
toolbar:not([mode="text"]) #forward-button .toolbarbutton-menubutton-dropmarker {
|
||||
margin-top: 1px;
|
||||
|
|
|
@ -15,39 +15,6 @@
|
|||
|
||||
<!-- :::/ widgets \ ::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
||||
|
||||
<binding id="bf-menu-button-allowevents-box"
|
||||
display="xul:button"
|
||||
extends="chrome://global/content/bindings/button.xml#button-base">
|
||||
<content allowevents="true">
|
||||
<children/>
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
<binding id="bf-menu-button" extends="chrome://global/content/bindings/toolbarbutton.xml#menu-button">
|
||||
<content>
|
||||
<children includes="observes|template|menupopup|tooltip"/>
|
||||
<xul:hbox flex="1" class="allowevents-box"/>
|
||||
<xul:vbox>
|
||||
<xul:hbox align="center" flex="1">
|
||||
<xul:toolbarbutton class="box-inherit toolbarbutton-menubutton-button"
|
||||
anonid="button"
|
||||
allowevents="true"
|
||||
flex="1"
|
||||
align="end"
|
||||
xbl:inherits="disabled,crop,image,label,accesskey,command,
|
||||
dir,pack,orient,toolbarmode,buttonstyle"/>
|
||||
</xul:hbox>
|
||||
<xul:hbox flex="1" class="toolbarbutton-text-box allowevents-box">
|
||||
<xul:label class="toolbarbutton-text"
|
||||
crop="right"
|
||||
xbl:inherits="value=label,accesskey,crop,toolbarmode,buttonstyle"
|
||||
flex="1"/>
|
||||
</xul:hbox>
|
||||
</xul:vbox>
|
||||
<xul:hbox flex="1" class="allowevents-box"/>
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
<binding id="bookmark-left">
|
||||
<content>
|
||||
<xul:spacer class="bookmark-image-left" xbl:inherits="selected"/>
|
||||
|
|
|
@ -45,7 +45,7 @@ classic.jar:
|
|||
skin/classic/browser/monitor_16-10.png
|
||||
skin/classic/browser/wrench.png
|
||||
skin/classic/browser/places/places.css (places/places.css)
|
||||
skin/classic/browser/places/organizer.css (places/organizer.css)
|
||||
* skin/classic/browser/places/organizer.css (places/organizer.css)
|
||||
skin/classic/browser/places/query.png (places/query.png)
|
||||
skin/classic/browser/places/livemarkItem.png (places/livemarkItem.png)
|
||||
skin/classic/browser/places/bookmarksMenu.png (places/bookmarksMenu.png)
|
||||
|
|
|
@ -206,21 +206,6 @@
|
|||
padding-top: 1px;
|
||||
}
|
||||
|
||||
#placeContent treechildren::-moz-tree-row(odd) {
|
||||
background-color: #edf3fe;
|
||||
}
|
||||
|
||||
#placeContent treechildren::-moz-tree-row(selected),
|
||||
#placeContent treechildren::-moz-tree-row(odd, selected) {
|
||||
background-color: -moz-mac-secondaryhighlight;
|
||||
}
|
||||
|
||||
#placeContent treechildren::-moz-tree-row(selected, focus),
|
||||
#placeContent treechildren::-moz-tree-row(odd, selected, focus) {
|
||||
background-color: Highlight;
|
||||
color: HighlightText !important;
|
||||
}
|
||||
|
||||
#placeContent treechildren::-moz-tree-cell,
|
||||
#placeContent treechildren::-moz-tree-column {
|
||||
border-right: 1px solid #d7dad7;
|
||||
|
@ -458,6 +443,7 @@ menulist[open="true"] > .menulist-label-box .menulist-label {
|
|||
background: url("chrome://global/skin/icons/round-button-active-right.png") no-repeat center right;
|
||||
}
|
||||
|
||||
%ifdef PLACES_QUERY_BUILDER
|
||||
/* Calendar */
|
||||
.history-calendar {
|
||||
margin: 0px 0px 7px 6px;
|
||||
|
@ -518,33 +504,6 @@ menulist[open="true"] > .menulist-label-box .menulist-label {
|
|||
color:#888;
|
||||
}
|
||||
|
||||
.no-margin-button {
|
||||
min-width:0em;
|
||||
}
|
||||
|
||||
/**
|
||||
* info pane
|
||||
*/
|
||||
|
||||
/* More/Less button */
|
||||
#infoScrollboxExpander {
|
||||
list-style-image: url("chrome://browser/skin/places/twisty-open.gif");
|
||||
-moz-appearance: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
max-width: 0;
|
||||
}
|
||||
|
||||
#infoScrollbox[minimal="true"] #infoScrollboxExpander {
|
||||
list-style-image: url("chrome://browser/skin/places/twisty-closed.gif");
|
||||
}
|
||||
|
||||
#itemsCountText,
|
||||
#selectItemDescription {
|
||||
color: GrayText;
|
||||
}
|
||||
|
||||
|
||||
.advancedSearchPlus,
|
||||
.advancedSearchMinus {
|
||||
width: 18px;
|
||||
|
@ -600,6 +559,33 @@ menulist[open="true"] > .menulist-label-box .menulist-label {
|
|||
.expander-up:hover:active {
|
||||
list-style-image: url("chrome://browser/skin/places/expander-open-active.png") !important;
|
||||
}
|
||||
%endif
|
||||
|
||||
.no-margin-button {
|
||||
min-width:0em;
|
||||
}
|
||||
|
||||
/**
|
||||
* info pane
|
||||
*/
|
||||
|
||||
/* More/Less button */
|
||||
#infoScrollboxExpander {
|
||||
list-style-image: url("chrome://browser/skin/places/twisty-open.gif");
|
||||
-moz-appearance: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
max-width: 0;
|
||||
}
|
||||
|
||||
#infoScrollbox[minimal="true"] #infoScrollboxExpander {
|
||||
list-style-image: url("chrome://browser/skin/places/twisty-closed.gif");
|
||||
}
|
||||
|
||||
#itemsCountText,
|
||||
#selectItemDescription {
|
||||
color: GrayText;
|
||||
}
|
||||
|
||||
#editBookmarkPanelGrid > rows > row > label {
|
||||
text-align: right !important;
|
||||
|
|
|
@ -42,7 +42,7 @@ classic.jar:
|
|||
skin/classic/browser/feeds/audioFeedIcon16.png (feeds/audioFeedIcon16.png)
|
||||
skin/classic/browser/feeds/subscribe.css (feeds/subscribe.css)
|
||||
skin/classic/browser/places/places.css (places/places.css)
|
||||
skin/classic/browser/places/organizer.css (places/organizer.css)
|
||||
* skin/classic/browser/places/organizer.css (places/organizer.css)
|
||||
skin/classic/browser/places/query.png (places/query.png)
|
||||
skin/classic/browser/places/bookmarksMenu.png (places/bookmarksMenu.png)
|
||||
skin/classic/browser/places/bookmarksToolbar.png (places/bookmarksToolbar.png)
|
||||
|
|
|
@ -146,29 +146,7 @@
|
|||
padding: 2px 2px 3px 4px;
|
||||
}
|
||||
|
||||
.filterList {
|
||||
-moz-appearance: none;
|
||||
background-color: transparent;
|
||||
border: 0px;
|
||||
margin: 2px;
|
||||
padding: 0px;
|
||||
min-width: 0px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
list-style-image: url("chrome://browser/skin/Search-bar.png");
|
||||
-moz-user-focus: ignore;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.filterList .button-box {
|
||||
border: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.filterList .button-menu-dropmarker {
|
||||
margin: 9px -3px -4px 8px;
|
||||
}
|
||||
|
||||
%ifdef PLACES_QUERY_BUILDER
|
||||
/* Calendar */
|
||||
.history-calendar {
|
||||
margin: 0px 0px 7px 6px;
|
||||
|
@ -235,16 +213,6 @@
|
|||
padding: 3px 3px 3px 0px;
|
||||
}
|
||||
|
||||
#searchModifiers {
|
||||
padding-right: 3px;
|
||||
}
|
||||
|
||||
#debugPanel {
|
||||
background-color: ThreeDFace;
|
||||
border-top: 2px solid;
|
||||
-moz-border-top-colors: ThreeDShadow ThreeDHighlight;
|
||||
}
|
||||
|
||||
/**** expanders ****/
|
||||
|
||||
.expander-up,
|
||||
|
@ -267,3 +235,9 @@
|
|||
.expander-up:hover:active {
|
||||
list-style-image: url("chrome://global/skin/arrow/arrow-up-hov.gif");
|
||||
}
|
||||
%endif
|
||||
|
||||
#searchModifiers {
|
||||
padding-right: 3px;
|
||||
}
|
||||
|
||||
|
|
|
@ -1641,7 +1641,8 @@ nsScriptSecurityManager::CheckFunctionAccess(JSContext *aCx, void *aFunObj,
|
|||
{
|
||||
#ifdef DEBUG
|
||||
{
|
||||
JSFunction *fun = OBJ_TO_FUNCTION((JSObject *)aFunObj);
|
||||
JSFunction *fun =
|
||||
(JSFunction *)caps_GetJSPrivate((JSObject *)aFunObj);
|
||||
JSScript *script = JS_GetFunctionScript(aCx, fun);
|
||||
|
||||
NS_ASSERTION(!script, "Null principal for non-native function!");
|
||||
|
@ -2156,7 +2157,7 @@ nsScriptSecurityManager::GetFunctionObjectPrincipal(JSContext *cx,
|
|||
nsresult *rv)
|
||||
{
|
||||
NS_PRECONDITION(rv, "Null out param");
|
||||
JSFunction *fun = OBJ_TO_FUNCTION(obj);
|
||||
JSFunction *fun = (JSFunction *) caps_GetJSPrivate(obj);
|
||||
JSScript *script = JS_GetFunctionScript(cx, fun);
|
||||
|
||||
*rv = NS_OK;
|
||||
|
@ -2180,17 +2181,29 @@ nsScriptSecurityManager::GetFunctionObjectPrincipal(JSContext *cx,
|
|||
// Script object came from, and we want the principal of
|
||||
// the eval function object or new Script object.
|
||||
|
||||
return GetScriptPrincipal(cx, frameScript, rv);
|
||||
script = frameScript;
|
||||
}
|
||||
else if (JS_GetFunctionObject(fun) != obj)
|
||||
{
|
||||
// Here, obj is a cloned function object. In this case, the
|
||||
// clone's prototype may have been precompiled from brutally
|
||||
// shared chrome, or else it is a lambda or nested function.
|
||||
// The general case here is a function compiled against a
|
||||
// different scope than the one it is parented by at runtime,
|
||||
// hence the creation of a clone to carry the correct scope
|
||||
// chain linkage.
|
||||
//
|
||||
// Since principals follow scope, we must get the object
|
||||
// principal from the clone's scope chain. There are no
|
||||
// reliable principals compiled into the function itself.
|
||||
|
||||
nsIPrincipal *result = doGetObjectPrincipal(obj);
|
||||
if (!result)
|
||||
*rv = NS_ERROR_FAILURE;
|
||||
return result;
|
||||
}
|
||||
|
||||
// Since principals follow scope, we must get the object
|
||||
// principal from the function's scope chain. There are no
|
||||
// reliable principals compiled into the function itself.
|
||||
|
||||
nsIPrincipal *result = doGetObjectPrincipal(obj);
|
||||
if (!result)
|
||||
*rv = NS_ERROR_FAILURE;
|
||||
return result;
|
||||
return GetScriptPrincipal(cx, script, rv);
|
||||
}
|
||||
|
||||
// static
|
||||
|
@ -2213,7 +2226,7 @@ nsScriptSecurityManager::GetFramePrincipal(JSContext *cx,
|
|||
#ifdef DEBUG
|
||||
if (NS_SUCCEEDED(*rv) && !result)
|
||||
{
|
||||
JSFunction *fun = OBJ_TO_FUNCTION(obj);
|
||||
JSFunction *fun = (JSFunction *)caps_GetJSPrivate(obj);
|
||||
JSScript *script = JS_GetFunctionScript(cx, fun);
|
||||
|
||||
NS_ASSERTION(!script, "Null principal for non-native function!");
|
||||
|
|
|
@ -161,7 +161,8 @@ MOZ_NO_XPCOM_OBSOLETE = @MOZ_NO_XPCOM_OBSOLETE@
|
|||
MOZ_NO_FAST_LOAD = @MOZ_NO_FAST_LOAD@
|
||||
NS_PRINTING = @NS_PRINTING@
|
||||
MOZ_CRASHREPORTER = @MOZ_CRASHREPORTER@
|
||||
MOZ_MOCHITEST = @MOZ_MOCHITEST@
|
||||
MOZ_MOCHITEST = @MOZ_MOCHITEST@
|
||||
MOZ_HELP_VIEWER = @MOZ_HELP_VIEWER@
|
||||
|
||||
MOZ_JAVAXPCOM = @MOZ_JAVAXPCOM@
|
||||
JAVA_INCLUDE_PATH="@JAVA_INCLUDE_PATH@"
|
||||
|
|
16
configure.in
16
configure.in
|
@ -1242,11 +1242,11 @@ Alpha | alpha | ALPHA)
|
|||
CPU_ARCH=Alpha
|
||||
;;
|
||||
|
||||
sun4u)
|
||||
sun4u | sparc*)
|
||||
CPU_ARCH=sparc
|
||||
;;
|
||||
|
||||
x86_64 | sparc | ppc | ia64)
|
||||
x86_64 | ia64)
|
||||
CPU_ARCH="$OS_TEST"
|
||||
;;
|
||||
esac
|
||||
|
@ -4281,6 +4281,7 @@ MOZ_PYTHON_VER_DOTTED=
|
|||
MOZ_RDF=1
|
||||
MOZ_REFLOW_PERF=
|
||||
MOZ_SAFE_BROWSING=
|
||||
MOZ_HELP_VIEWER=
|
||||
MOZ_SPELLCHECK=1
|
||||
MOZ_STATIC_MAIL_BUILD=
|
||||
MOZ_STORAGE=1
|
||||
|
@ -5826,6 +5827,17 @@ fi
|
|||
|
||||
AC_SUBST(MOZ_NATIVE_SQLITE)
|
||||
|
||||
dnl = Enable help viewer (off by default)
|
||||
dnl ========================================================
|
||||
MOZ_ARG_ENABLE_BOOL(help-viewer,
|
||||
[ --enable-help-viewer Enable help viewer],
|
||||
MOZ_HELP_VIEWER=1,
|
||||
MOZ_HELP_VIEWER= )
|
||||
if test -n "$MOZ_HELP_VIEWER"; then
|
||||
AC_DEFINE(MOZ_HELP_VIEWER)
|
||||
fi
|
||||
AC_SUBST(MOZ_HELP_VIEWER)
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Enable safe browsing (anti-phishing)
|
||||
dnl ========================================================
|
||||
|
|
|
@ -740,7 +740,7 @@ GK_ATOM(screen, "screen")
|
|||
GK_ATOM(screenX, "screenX")
|
||||
GK_ATOM(screenY, "screenY")
|
||||
GK_ATOM(script, "script")
|
||||
GK_ATOM(scriptEnabledBeforePrintPreview, "scriptEnabledBeforePrintPreview")
|
||||
GK_ATOM(scriptEnabledBeforePrintOrPreview, "scriptEnabledBeforePrintOrPreview")
|
||||
GK_ATOM(scrollbar, "scrollbar")
|
||||
GK_ATOM(scrollbarbutton, "scrollbarbutton")
|
||||
GK_ATOM(scrollbox, "scrollbox")
|
||||
|
|
|
@ -649,7 +649,7 @@ nsHTMLDocument::TryBookmarkCharset(nsIDocShell* aDocShell,
|
|||
&wantCharset,
|
||||
getter_AddRefs(closure),
|
||||
charset);
|
||||
// FIXME: Bug 337790
|
||||
// FIXME: Bug 337970
|
||||
NS_ASSERTION(!wantCharset, "resolved charset notification not implemented!");
|
||||
|
||||
if (NS_SUCCEEDED(rv) && !charset.IsEmpty()) {
|
||||
|
|
|
@ -70,6 +70,7 @@
|
|||
#include "nsContentUtils.h"
|
||||
#include "nsIScriptError.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsGUIEvent.h"
|
||||
#include "nsIXPConnect.h"
|
||||
|
@ -605,19 +606,7 @@ nsXBLPrototypeHandler::KeyEventMatched(nsIDOMKeyEvent* aKeyEvent)
|
|||
|
||||
if (mMisc) {
|
||||
aKeyEvent->GetCharCode(&code);
|
||||
// non-BMP characters are currently not handled.
|
||||
if (!IS_IN_BMP(code))
|
||||
return PR_FALSE;
|
||||
|
||||
// Ignore CapsLock, and distinguish between Ctrl-a and Ctrl-Shift-A,
|
||||
// unless any Shift-state is explicitly permitted (in which case,
|
||||
// mDetail is lowercase).
|
||||
PRBool isShift;
|
||||
aKeyEvent->GetShiftKey(&isShift);
|
||||
if ((mKeyMask & cShiftMask) && isShift)
|
||||
code = ToUpperCase(PRUnichar(code));
|
||||
else
|
||||
code = ToLowerCase(PRUnichar(code));
|
||||
code = ToLowerCase(PRUnichar(code));
|
||||
}
|
||||
else
|
||||
aKeyEvent->GetKeyCode(&code);
|
||||
|
@ -941,19 +930,11 @@ nsXBLPrototypeHandler::ConstructPrototype(nsIContent* aKeyElement,
|
|||
if (!key.IsEmpty()) {
|
||||
if (mKeyMask == 0)
|
||||
mKeyMask = cAllModifiers;
|
||||
// If Shift is required then ensure the case of the character matches the
|
||||
// Shift-state. Otherwise normalize to lowercase.
|
||||
if ((mKeyMask & (cShift | cShiftMask)) == (cShift | cShiftMask))
|
||||
ToUpperCase(key);
|
||||
else
|
||||
ToLowerCase(key);
|
||||
ToLowerCase(key);
|
||||
|
||||
// We have a charcode.
|
||||
mMisc = 1;
|
||||
// non-BMP characters are currently not handled.
|
||||
// KeyEventMatched doesn't match against surrogate codes.
|
||||
mDetail = key[0];
|
||||
|
||||
const PRUint8 GTK2Modifiers = cShift | cControl | cShiftMask | cControlMask;
|
||||
if ((mKeyMask & GTK2Modifiers) == GTK2Modifiers &&
|
||||
modifiers.First() != PRUnichar(',') &&
|
||||
|
@ -1023,11 +1004,7 @@ nsXBLPrototypeHandler::ModifiersMatchMask(nsIDOMUIEvent* aEvent)
|
|||
return PR_FALSE;
|
||||
}
|
||||
|
||||
// Punctuation and characters from some scripts may be on any level,
|
||||
// so ignore the Shift state for key events with unicase character codes.
|
||||
// (The Shift state is considered in KeyEventMatched for letters from
|
||||
// bicameral scripts.)
|
||||
if (!(key && mMisc) && (mKeyMask & cShiftMask)) {
|
||||
if (mKeyMask & cShiftMask) {
|
||||
key ? key->GetShiftKey(&keyPresent) : mouse->GetShiftKey(&keyPresent);
|
||||
if (keyPresent != ((mKeyMask & cShift) != 0))
|
||||
return PR_FALSE;
|
||||
|
|
|
@ -19,7 +19,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=398492
|
|||
</binding>
|
||||
</bindings>
|
||||
|
||||
<!-- test resuls are displayed in the html:body -->
|
||||
<!-- test results are displayed in the html:body -->
|
||||
<body xmlns="http://www.w3.org/1999/xhtml">
|
||||
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=398492"
|
||||
target="_blank">Mozilla Bug 398492</a>
|
||||
|
|
|
@ -9,7 +9,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=391002
|
|||
<script type="application/javascript" src="/MochiKit/packed.js" />
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"/>
|
||||
|
||||
<!-- test resuls are displayed in the html:body -->
|
||||
<!-- test results are displayed in the html:body -->
|
||||
<body xmlns="http://www.w3.org/1999/xhtml">
|
||||
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=391002"
|
||||
target="_blank">Mozilla Bug 391002</a>
|
||||
|
|
|
@ -9,7 +9,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=403868
|
|||
<script type="application/javascript" src="/MochiKit/packed.js" />
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"/>
|
||||
|
||||
<!-- test resuls are displayed in the html:body -->
|
||||
<!-- test results are displayed in the html:body -->
|
||||
<body xmlns="http://www.w3.org/1999/xhtml">
|
||||
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=403868"
|
||||
target="_blank">Mozilla Bug 403868</a>
|
||||
|
|
|
@ -24,7 +24,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=414907
|
|||
</binding>
|
||||
</bindings>
|
||||
|
||||
<!-- test resuls are displayed in the html:body -->
|
||||
<!-- test results are displayed in the html:body -->
|
||||
<body xmlns="http://www.w3.org/1999/xhtml">
|
||||
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=414907"
|
||||
target="_blank">Mozilla Bug 414907</a>
|
||||
|
|
|
@ -9,7 +9,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=418216
|
|||
<script type="application/javascript" src="/MochiKit/packed.js" />
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"/>
|
||||
|
||||
<!-- test resuls are displayed in the html:body -->
|
||||
<!-- test results are displayed in the html:body -->
|
||||
<body xmlns="http://www.w3.org/1999/xhtml">
|
||||
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=418216"
|
||||
target="_blank">Mozilla Bug 418216</a>
|
||||
|
|
|
@ -262,7 +262,9 @@ protected:
|
|||
*
|
||||
* @param aElement element to generate content inside
|
||||
* @param aForceCreation true to force creation for closed items such as menus
|
||||
* @param aContainer container content was added inside
|
||||
* @param aContainer container content was added inside. This is an in/out
|
||||
* parameter and must point to null or a valid object before calling
|
||||
* this function.
|
||||
* @param aNewIndexInContainer index with container in which content was added
|
||||
*/
|
||||
nsresult
|
||||
|
@ -279,7 +281,9 @@ protected:
|
|||
* @param aResult reference point for query
|
||||
* @param aForceCreation true to force creation for closed items such as menus
|
||||
* @param aNotify true to notify of DOM changes
|
||||
* @param aContainer container content was added inside
|
||||
* @param aContainer container content was added inside. This is an in/out
|
||||
* parameter and must point to null or a valid object before calling
|
||||
* this function.
|
||||
* @param aNewIndexInContainer index with container in which content was added
|
||||
*/
|
||||
nsresult
|
||||
|
@ -1211,7 +1215,9 @@ nsXULContentBuilder::CreateContainerContents(nsIContent* aElement,
|
|||
return NS_OK;
|
||||
|
||||
if (aContainer) {
|
||||
*aContainer = nsnull;
|
||||
// In case aContainer has already been initialized with a value go ahead
|
||||
// and release it.
|
||||
NS_IF_RELEASE(*aContainer);
|
||||
*aNewIndexInContainer = -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=396519
|
|||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
|
||||
<!-- test resuls are displayed in the html:body -->
|
||||
<!-- test results are displayed in the html:body -->
|
||||
<body xmlns="http://www.w3.org/1999/xhtml">
|
||||
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=396519"
|
||||
target="_blank">Mozilla Bug 396519</a>
|
||||
|
|
|
@ -76,8 +76,8 @@ class nsScriptObjectHolder;
|
|||
class nsXBLPrototypeHandler;
|
||||
|
||||
#define NS_PIDOMWINDOW_IID \
|
||||
{ 0x909852b5, 0xb9e6, 0x4d94, \
|
||||
{ 0x8d, 0xe3, 0x05, 0x16, 0x34, 0x80, 0x0b, 0x73 } }
|
||||
{ 0xc9c187f9, 0x2104, 0x4c2c, \
|
||||
{ 0xb4, 0xd7, 0xc1, 0xb1, 0x9d, 0xa5, 0xc7, 0xd8 } }
|
||||
|
||||
class nsPIDOMWindow : public nsIDOMWindowInternal
|
||||
{
|
||||
|
@ -269,6 +269,8 @@ public:
|
|||
// Restore the window state from aState.
|
||||
virtual nsresult RestoreWindowState(nsISupports *aState) = 0;
|
||||
|
||||
// Suspend timeouts in this and in child windows.
|
||||
virtual void SuspendTimeouts() = 0;
|
||||
// Resume suspended timeouts in this window and in child windows.
|
||||
virtual nsresult ResumeTimeouts() = 0;
|
||||
|
||||
|
|
|
@ -605,6 +605,7 @@ nsGlobalWindow::nsGlobalWindow(nsGlobalWindow *aOuterWindow)
|
|||
mFireOfflineStatusChangeEventOnThaw(PR_FALSE),
|
||||
mCreatingInnerWindow(PR_FALSE),
|
||||
mIsChrome(PR_FALSE),
|
||||
mTimersSuspended(PR_FALSE),
|
||||
mTimeoutInsertionPoint(nsnull),
|
||||
mTimeoutPublicIdCounter(1),
|
||||
mTimeoutFiringDepth(0),
|
||||
|
@ -3184,11 +3185,9 @@ nsGlobalWindow::SetInnerHeight(PRInt32 aInnerHeight)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGlobalWindow::GetOuterWidth(PRInt32* aOuterWidth)
|
||||
nsresult
|
||||
nsGlobalWindow::GetOuterSize(nsIntSize* aSizeCSSPixels)
|
||||
{
|
||||
FORWARD_TO_OUTER(GetOuterWidth, (aOuterWidth), NS_ERROR_NOT_INITIALIZED);
|
||||
|
||||
nsCOMPtr<nsIBaseWindow> treeOwnerAsWin;
|
||||
GetTreeOwner(getter_AddRefs(treeOwnerAsWin));
|
||||
NS_ENSURE_TRUE(treeOwnerAsWin, NS_ERROR_FAILURE);
|
||||
|
@ -3198,18 +3197,56 @@ nsGlobalWindow::GetOuterWidth(PRInt32* aOuterWidth)
|
|||
if (rootWindow) {
|
||||
rootWindow->FlushPendingNotifications(Flush_Layout);
|
||||
}
|
||||
PRInt32 notused;
|
||||
NS_ENSURE_SUCCESS(treeOwnerAsWin->GetSize(aOuterWidth, ¬used),
|
||||
|
||||
nsIntSize sizeDevPixels;
|
||||
NS_ENSURE_SUCCESS(treeOwnerAsWin->GetSize(&sizeDevPixels.width,
|
||||
&sizeDevPixels.height),
|
||||
NS_ERROR_FAILURE);
|
||||
|
||||
nsCOMPtr<nsPresContext> presContext;
|
||||
mDocShell->GetPresContext(getter_AddRefs(presContext));
|
||||
if (!presContext) {
|
||||
// XXX If we don't have a prescontext it's not really clear what we
|
||||
// should do... For now let's assume a 1:1 ratio.
|
||||
*aSizeCSSPixels = sizeDevPixels;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
*aSizeCSSPixels = nsIntSize(
|
||||
nsPresContext::AppUnitsToIntCSSPixels(presContext->DevPixelsToAppUnits(sizeDevPixels.width)),
|
||||
nsPresContext::AppUnitsToIntCSSPixels(presContext->DevPixelsToAppUnits(sizeDevPixels.height)));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGlobalWindow::SetOuterWidth(PRInt32 aOuterWidth)
|
||||
nsGlobalWindow::GetOuterWidth(PRInt32* aOuterWidth)
|
||||
{
|
||||
FORWARD_TO_OUTER(SetOuterWidth, (aOuterWidth), NS_ERROR_NOT_INITIALIZED);
|
||||
FORWARD_TO_OUTER(GetOuterWidth, (aOuterWidth), NS_ERROR_NOT_INITIALIZED);
|
||||
|
||||
nsIntSize sizeCSSPixels;
|
||||
nsresult rv = GetOuterSize(&sizeCSSPixels);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
*aOuterWidth = sizeCSSPixels.width;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGlobalWindow::GetOuterHeight(PRInt32* aOuterHeight)
|
||||
{
|
||||
FORWARD_TO_OUTER(GetOuterHeight, (aOuterHeight), NS_ERROR_NOT_INITIALIZED);
|
||||
|
||||
nsIntSize sizeCSSPixels;
|
||||
nsresult rv = GetOuterSize(&sizeCSSPixels);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
*aOuterHeight = sizeCSSPixels.height;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsGlobalWindow::SetOuterSize(PRInt32 aLengthCSSPixels, PRBool aIsWidth)
|
||||
{
|
||||
/*
|
||||
* If caller is not chrome and the user has not explicitly exempted the site,
|
||||
* prevent setting window.outerWidth by exiting early
|
||||
|
@ -3223,38 +3260,40 @@ nsGlobalWindow::SetOuterWidth(PRInt32 aOuterWidth)
|
|||
GetTreeOwner(getter_AddRefs(treeOwnerAsWin));
|
||||
NS_ENSURE_TRUE(treeOwnerAsWin, NS_ERROR_FAILURE);
|
||||
|
||||
NS_ENSURE_SUCCESS(CheckSecurityWidthAndHeight(&aOuterWidth, nsnull),
|
||||
nsCOMPtr<nsPresContext> presContext;
|
||||
mDocShell->GetPresContext(getter_AddRefs(presContext));
|
||||
PRInt32 lengthDevPixels;
|
||||
if (presContext) {
|
||||
lengthDevPixels =
|
||||
presContext->AppUnitsToDevPixels(nsPresContext::CSSPixelsToAppUnits(aLengthCSSPixels));
|
||||
} else {
|
||||
// XXX If we don't have a prescontext it's not really clear what we
|
||||
// should do... For now let's assume a 1:1 ratio.
|
||||
lengthDevPixels = aLengthCSSPixels;
|
||||
}
|
||||
|
||||
NS_ENSURE_SUCCESS(CheckSecurityWidthAndHeight(
|
||||
aIsWidth ? &lengthDevPixels : nsnull,
|
||||
aIsWidth ? nsnull : &lengthDevPixels),
|
||||
NS_ERROR_FAILURE);
|
||||
|
||||
PRInt32 notused, height;
|
||||
NS_ENSURE_SUCCESS(treeOwnerAsWin->GetSize(¬used, &height), NS_ERROR_FAILURE);
|
||||
PRInt32 width, height;
|
||||
NS_ENSURE_SUCCESS(treeOwnerAsWin->GetSize(&width, &height), NS_ERROR_FAILURE);
|
||||
|
||||
NS_ENSURE_SUCCESS(treeOwnerAsWin->SetSize(aOuterWidth, height, PR_TRUE),
|
||||
NS_ERROR_FAILURE);
|
||||
|
||||
return NS_OK;
|
||||
if (aIsWidth) {
|
||||
width = lengthDevPixels;
|
||||
} else {
|
||||
height = lengthDevPixels;
|
||||
}
|
||||
return treeOwnerAsWin->SetSize(width, height, PR_TRUE);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGlobalWindow::GetOuterHeight(PRInt32* aOuterHeight)
|
||||
nsGlobalWindow::SetOuterWidth(PRInt32 aOuterWidth)
|
||||
{
|
||||
FORWARD_TO_OUTER(GetOuterHeight, (aOuterHeight), NS_ERROR_NOT_INITIALIZED);
|
||||
FORWARD_TO_OUTER(SetOuterWidth, (aOuterWidth), NS_ERROR_NOT_INITIALIZED);
|
||||
|
||||
nsCOMPtr<nsIBaseWindow> treeOwnerAsWin;
|
||||
GetTreeOwner(getter_AddRefs(treeOwnerAsWin));
|
||||
NS_ENSURE_TRUE(treeOwnerAsWin, NS_ERROR_FAILURE);
|
||||
|
||||
nsGlobalWindow* rootWindow =
|
||||
static_cast<nsGlobalWindow *>(GetPrivateRoot());
|
||||
if (rootWindow) {
|
||||
rootWindow->FlushPendingNotifications(Flush_Layout);
|
||||
}
|
||||
|
||||
PRInt32 notused;
|
||||
NS_ENSURE_SUCCESS(treeOwnerAsWin->GetSize(¬used, aOuterHeight),
|
||||
NS_ERROR_FAILURE);
|
||||
|
||||
return NS_OK;
|
||||
return SetOuterSize(aOuterWidth, PR_TRUE);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -3262,29 +3301,7 @@ nsGlobalWindow::SetOuterHeight(PRInt32 aOuterHeight)
|
|||
{
|
||||
FORWARD_TO_OUTER(SetOuterHeight, (aOuterHeight), NS_ERROR_NOT_INITIALIZED);
|
||||
|
||||
/*
|
||||
* If caller is not chrome and the user has not explicitly exempted the site,
|
||||
* prevent setting window.outerHeight by exiting early
|
||||
*/
|
||||
|
||||
if (!CanMoveResizeWindows()) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIBaseWindow> treeOwnerAsWin;
|
||||
GetTreeOwner(getter_AddRefs(treeOwnerAsWin));
|
||||
NS_ENSURE_TRUE(treeOwnerAsWin, NS_ERROR_FAILURE);
|
||||
|
||||
NS_ENSURE_SUCCESS(CheckSecurityWidthAndHeight(nsnull, &aOuterHeight),
|
||||
NS_ERROR_FAILURE);
|
||||
|
||||
PRInt32 width, notused;
|
||||
NS_ENSURE_SUCCESS(treeOwnerAsWin->GetSize(&width, ¬used), NS_ERROR_FAILURE);
|
||||
|
||||
NS_ENSURE_SUCCESS(treeOwnerAsWin->SetSize(width, aOuterHeight, PR_TRUE),
|
||||
NS_ERROR_FAILURE);
|
||||
|
||||
return NS_OK;
|
||||
return SetOuterSize(aOuterHeight, PR_FALSE);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -8382,6 +8399,11 @@ nsGlobalWindow::SuspendTimeouts()
|
|||
{
|
||||
FORWARD_TO_INNER_VOID(SuspendTimeouts, ());
|
||||
|
||||
if (mTimersSuspended) {
|
||||
return;
|
||||
}
|
||||
mTimersSuspended = PR_TRUE;
|
||||
|
||||
PRTime now = PR_Now();
|
||||
for (nsTimeout *t = FirstTimeout(); IsTimeout(t); t = t->Next()) {
|
||||
// Change mWhen to be the time remaining for this timer.
|
||||
|
@ -8437,6 +8459,11 @@ nsGlobalWindow::ResumeTimeouts()
|
|||
{
|
||||
FORWARD_TO_INNER(ResumeTimeouts, (), NS_ERROR_NOT_INITIALIZED);
|
||||
|
||||
if (!mTimersSuspended) {
|
||||
return NS_OK;
|
||||
}
|
||||
mTimersSuspended = PR_FALSE;
|
||||
|
||||
// Restore all of the timeouts, using the stored time remaining
|
||||
// (stored in timeout->mWhen).
|
||||
|
||||
|
|
|
@ -300,6 +300,7 @@ public:
|
|||
|
||||
virtual NS_HIDDEN_(nsresult) SaveWindowState(nsISupports **aState);
|
||||
virtual NS_HIDDEN_(nsresult) RestoreWindowState(nsISupports *aState);
|
||||
virtual NS_HIDDEN_(void) SuspendTimeouts();
|
||||
virtual NS_HIDDEN_(nsresult) ResumeTimeouts();
|
||||
virtual NS_HIDDEN_(nsresult) FireDelayedDOMEvents();
|
||||
virtual NS_HIDDEN_(PRBool) IsFrozen() const
|
||||
|
@ -584,6 +585,9 @@ protected:
|
|||
nsresult GetScrollXY(PRInt32* aScrollX, PRInt32* aScrollY,
|
||||
PRBool aDoFlush);
|
||||
nsresult GetScrollMaxXY(PRInt32* aScrollMaxX, PRInt32* aScrollMaxY);
|
||||
|
||||
nsresult GetOuterSize(nsIntSize* aSizeCSSPixels);
|
||||
nsresult SetOuterSize(PRInt32 aLengthCSSPixels, PRBool aIsWidth);
|
||||
|
||||
PRBool IsFrame()
|
||||
{
|
||||
|
@ -599,8 +603,6 @@ protected:
|
|||
|
||||
already_AddRefed<nsIWidget> GetMainWidget();
|
||||
|
||||
void SuspendTimeouts();
|
||||
|
||||
void Freeze()
|
||||
{
|
||||
NS_ASSERTION(!IsFrozen(), "Double-freezing?");
|
||||
|
@ -674,6 +676,8 @@ protected:
|
|||
// Fast way to tell if this is a chrome window (without having to QI).
|
||||
PRPackedBool mIsChrome : 1;
|
||||
|
||||
PRPackedBool mTimersSuspended : 1;
|
||||
|
||||
nsCOMPtr<nsIScriptContext> mContext;
|
||||
nsWeakPtr mOpener;
|
||||
nsCOMPtr<nsIControllers> mControllers;
|
||||
|
|
|
@ -52,5 +52,11 @@ DIRS += \
|
|||
whatwg \
|
||||
$(NULL)
|
||||
|
||||
ifneq ($(MOZ_WIDGET_TOOLKIT),cocoa)
|
||||
DIRS += \
|
||||
dom-level2-html \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
|
|
@ -0,0 +1,695 @@
|
|||
/*
|
||||
Copyright (c) 2001-2005 World Wide Web Consortium,
|
||||
(Massachusetts Institute of Technology, Institut National de
|
||||
Recherche en Informatique et en Automatique, Keio University). All
|
||||
Rights Reserved. This program is distributed under the W3C's Software
|
||||
Intellectual Property License. This program is distributed in the
|
||||
hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE.
|
||||
See W3C License http://www.w3.org/Consortium/Legal/ for more details.
|
||||
*/
|
||||
|
||||
function assertNull(descr, actual) {
|
||||
return ok(actual === null, descr);
|
||||
}
|
||||
|
||||
|
||||
function assertNotNull(descr, actual) {
|
||||
return ok(actual !== null, descr);
|
||||
}
|
||||
|
||||
function assertTrue(descr, actual) {
|
||||
return ok(actual === true, descr);
|
||||
}
|
||||
|
||||
function assertFalse(descr, actual) {
|
||||
return ok(actual === false, descr);
|
||||
}
|
||||
|
||||
function assertEquals(descr, expected, actual) {
|
||||
return is(actual, expected, descr);
|
||||
}
|
||||
|
||||
function assertSize(descr, expected, actual) {
|
||||
var actualSize;
|
||||
ok(actual !== null, descr);
|
||||
actualSize = actual.length;
|
||||
is(actualSize, expected, descr);
|
||||
}
|
||||
|
||||
function assertEqualsAutoCase(context, descr, expected, actual) {
|
||||
if (builder.contentType == "text/html") {
|
||||
if(context == "attribute") {
|
||||
is(actual.toLowerCase(), expected.toLowerCase(), descr);
|
||||
} else {
|
||||
is(actual, expected.toUpperCase(), descr);
|
||||
}
|
||||
} else {
|
||||
is(actual, expected, descr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function assertEqualsCollectionAutoCase(context, descr, expected, actual) {
|
||||
//
|
||||
// if they aren't the same size, they aren't equal
|
||||
is(actual.length, expected.length, descr);
|
||||
|
||||
//
|
||||
// if there length is the same, then every entry in the expected list
|
||||
// must appear once and only once in the actual list
|
||||
var expectedLen = expected.length;
|
||||
var expectedValue;
|
||||
var actualLen = actual.length;
|
||||
var i;
|
||||
var j;
|
||||
var matches;
|
||||
for(i = 0; i < expectedLen; i++) {
|
||||
matches = 0;
|
||||
expectedValue = expected[i];
|
||||
for(j = 0; j < actualLen; j++) {
|
||||
if (builder.contentType == "text/html") {
|
||||
if (context == "attribute") {
|
||||
if (expectedValue.toLowerCase() == actual[j].toLowerCase()) {
|
||||
matches++;
|
||||
}
|
||||
} else {
|
||||
if (expectedValue.toUpperCase() == actual[j]) {
|
||||
matches++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(expectedValue == actual[j]) {
|
||||
matches++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(matches == 0) {
|
||||
ok(false, descr + ": No match found for " + expectedValue);
|
||||
}
|
||||
if(matches > 1) {
|
||||
ok(false, descr + ": Multiple matches found for " + expectedValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function assertEqualsCollection(descr, expected, actual) {
|
||||
//
|
||||
// if they aren't the same size, they aren't equal
|
||||
is(actual.length, expected.length, descr);
|
||||
//
|
||||
// if there length is the same, then every entry in the expected list
|
||||
// must appear once and only once in the actual list
|
||||
var expectedLen = expected.length;
|
||||
var expectedValue;
|
||||
var actualLen = actual.length;
|
||||
var i;
|
||||
var j;
|
||||
var matches;
|
||||
for(i = 0; i < expectedLen; i++) {
|
||||
matches = 0;
|
||||
expectedValue = expected[i];
|
||||
for(j = 0; j < actualLen; j++) {
|
||||
if(expectedValue == actual[j]) {
|
||||
matches++;
|
||||
}
|
||||
}
|
||||
if(matches == 0) {
|
||||
ok(false, descr + ": No match found for " + expectedValue);
|
||||
}
|
||||
if(matches > 1) {
|
||||
ok(false, descr + ": Multiple matches found for " + expectedValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function assertEqualsListAutoCase(context, descr, expected, actual) {
|
||||
var minLength = expected.length;
|
||||
if (actual.length < minLength) {
|
||||
minLength = actual.length;
|
||||
}
|
||||
//
|
||||
for(var i = 0; i < minLength; i++) {
|
||||
assertEqualsAutoCase(context, descr, expected[i], actual[i]);
|
||||
}
|
||||
//
|
||||
// if they aren't the same size, they aren't equal
|
||||
is(actual.length, expected.length, descr);
|
||||
}
|
||||
|
||||
|
||||
function assertEqualsList(descr, expected, actual) {
|
||||
var minLength = expected.length;
|
||||
if (actual.length < minLength) {
|
||||
minLength = actual.length;
|
||||
}
|
||||
//
|
||||
for(var i = 0; i < minLength; i++) {
|
||||
if(expected[i] != actual[i]) {
|
||||
is(actual[i], expected[i], descr);
|
||||
}
|
||||
}
|
||||
//
|
||||
// if they aren't the same size, they aren't equal
|
||||
is(actual.length, expected.length, descr);
|
||||
}
|
||||
|
||||
function assertInstanceOf(descr, type, obj) {
|
||||
if(type == "Attr") {
|
||||
is(2, obj.nodeType, descr);
|
||||
var specd = obj.specified;
|
||||
}
|
||||
}
|
||||
|
||||
function assertSame(descr, expected, actual) {
|
||||
if(expected != actual) {
|
||||
is(expected.nodeType, actual.nodeType, descr);
|
||||
is(expected.nodeValue, actual.nodeValue, descr);
|
||||
}
|
||||
}
|
||||
|
||||
function assertURIEquals(assertID, scheme, path, host, file, name, query, fragment, isAbsolute, actual) {
|
||||
//
|
||||
// URI must be non-null
|
||||
ok(assertID && actual);
|
||||
|
||||
var uri = actual;
|
||||
|
||||
var lastPound = actual.lastIndexOf("#");
|
||||
var actualFragment = "";
|
||||
if(lastPound != -1) {
|
||||
//
|
||||
// substring before pound
|
||||
//
|
||||
uri = actual.substring(0,lastPound);
|
||||
actualFragment = actual.substring(lastPound+1);
|
||||
}
|
||||
if(fragment != null) is(actualFragment, fragment, assertID);
|
||||
|
||||
var lastQuestion = uri.lastIndexOf("?");
|
||||
var actualQuery = "";
|
||||
if(lastQuestion != -1) {
|
||||
//
|
||||
// substring before pound
|
||||
//
|
||||
uri = actual.substring(0,lastQuestion);
|
||||
actualQuery = actual.substring(lastQuestion+1);
|
||||
}
|
||||
if(query != null) is(actualQuery, query, assertID);
|
||||
|
||||
var firstColon = uri.indexOf(":");
|
||||
var firstSlash = uri.indexOf("/");
|
||||
var actualPath = uri;
|
||||
var actualScheme = "";
|
||||
if(firstColon != -1 && firstColon < firstSlash) {
|
||||
actualScheme = uri.substring(0,firstColon);
|
||||
actualPath = uri.substring(firstColon + 1);
|
||||
}
|
||||
|
||||
if(scheme != null) {
|
||||
is(scheme, actualScheme, assertID);
|
||||
}
|
||||
|
||||
if(path != null) {
|
||||
is(path, actualPath, assertID);
|
||||
}
|
||||
|
||||
if(host != null) {
|
||||
var actualHost = "";
|
||||
if(actualPath.substring(0,2) == "//") {
|
||||
var termSlash = actualPath.substring(2).indexOf("/") + 2;
|
||||
actualHost = actualPath.substring(0,termSlash);
|
||||
}
|
||||
is(actualHost, host, assertID);
|
||||
}
|
||||
|
||||
if(file != null || name != null) {
|
||||
var actualFile = actualPath;
|
||||
var finalSlash = actualPath.lastIndexOf("/");
|
||||
if(finalSlash != -1) {
|
||||
actualFile = actualPath.substring(finalSlash+1);
|
||||
}
|
||||
if (file != null) {
|
||||
is(actualFile, file, assertID);
|
||||
}
|
||||
if (name != null) {
|
||||
var actualName = actualFile;
|
||||
var finalDot = actualFile.lastIndexOf(".");
|
||||
if (finalDot != -1) {
|
||||
actualName = actualName.substring(0, finalDot);
|
||||
}
|
||||
is(actualName, name, assertID);
|
||||
}
|
||||
}
|
||||
|
||||
if(isAbsolute != null) {
|
||||
is(actualPath.substring(0,1) == "/", isAbsolute, assertID);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// size() used by assertSize element
|
||||
function size(collection)
|
||||
{
|
||||
return collection.length;
|
||||
}
|
||||
|
||||
function same(expected, actual)
|
||||
{
|
||||
return expected === actual;
|
||||
}
|
||||
|
||||
function getSuffix(contentType) {
|
||||
switch(contentType) {
|
||||
case "text/html":
|
||||
return ".html";
|
||||
|
||||
case "text/xml":
|
||||
return ".xml";
|
||||
|
||||
case "application/xhtml+xml":
|
||||
return ".xhtml";
|
||||
|
||||
case "image/svg+xml":
|
||||
return ".svg";
|
||||
|
||||
case "text/mathml":
|
||||
return ".mml";
|
||||
}
|
||||
return ".html";
|
||||
}
|
||||
|
||||
function equalsAutoCase(context, expected, actual) {
|
||||
if (builder.contentType == "text/html") {
|
||||
if (context == "attribute") {
|
||||
return expected.toLowerCase() == actual;
|
||||
}
|
||||
return expected.toUpperCase() == actual;
|
||||
}
|
||||
return expected == actual;
|
||||
}
|
||||
|
||||
function catchInitializationError(blder, ex) {
|
||||
if (blder == null) {
|
||||
alert(ex);
|
||||
} else {
|
||||
blder.initializationError = ex;
|
||||
blder.initializationFatalError = ex;
|
||||
}
|
||||
}
|
||||
|
||||
function checkInitialization(blder, testname) {
|
||||
if (blder.initializationError != null) {
|
||||
if (blder.skipIncompatibleTests) {
|
||||
warn(testname + " not run:" + blder.initializationError);
|
||||
return blder.initializationError;
|
||||
} else {
|
||||
//
|
||||
// if an exception was thrown
|
||||
// rethrow it and do not run the test
|
||||
if (blder.initializationFatalError != null) {
|
||||
throw blder.initializationFatalError;
|
||||
} else {
|
||||
//
|
||||
// might be recoverable, warn but continue the test
|
||||
// XXX warn
|
||||
warn(testname + ": " + blder.initializationError);
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function createTempURI(scheme) {
|
||||
if (scheme == "http") {
|
||||
return "http://localhost:8080/webdav/tmp" + Math.floor(Math.random() * 100000) + ".xml";
|
||||
}
|
||||
return "file:///tmp/domts" + Math.floor(Math.random() * 100000) + ".xml";
|
||||
}
|
||||
|
||||
|
||||
function EventMonitor() {
|
||||
this.atEvents = new Array();
|
||||
this.bubbledEvents = new Array();
|
||||
this.capturedEvents = new Array();
|
||||
this.allEvents = new Array();
|
||||
}
|
||||
|
||||
EventMonitor.prototype.handleEvent = function(evt) {
|
||||
switch(evt.eventPhase) {
|
||||
case 1:
|
||||
monitor.capturedEvents[monitor.capturedEvents.length] = evt;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
monitor.atEvents[monitor.atEvents.length] = evt;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
monitor.bubbledEvents[monitor.bubbledEvents.length] = evt;
|
||||
break;
|
||||
}
|
||||
monitor.allEvents[monitor.allEvents.length] = evt;
|
||||
}
|
||||
|
||||
function DOMErrorImpl(err) {
|
||||
this.severity = err.severity;
|
||||
this.message = err.message;
|
||||
this.type = err.type;
|
||||
this.relatedException = err.relatedException;
|
||||
this.relatedData = err.relatedData;
|
||||
this.location = err.location;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function DOMErrorMonitor() {
|
||||
this.allErrors = new Array();
|
||||
}
|
||||
|
||||
DOMErrorMonitor.prototype.handleError = function(err) {
|
||||
errorMonitor.allErrors[errorMonitor.allErrors.length] = new DOMErrorImpl(err);
|
||||
}
|
||||
|
||||
DOMErrorMonitor.prototype.assertLowerSeverity = function(id, severity) {
|
||||
var i;
|
||||
for (i = 0; i < errorMonitor.allErrors.length; i++) {
|
||||
if (errorMonitor.allErrors[i].severity >= severity) {
|
||||
assertEquals(id, severity - 1, errorMonitor.allErrors[i].severity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function UserDataNotification(operation, key, data, src, dst) {
|
||||
this.operation = operation;
|
||||
this.key = key;
|
||||
this.data = data;
|
||||
this.src = src;
|
||||
this.dst = dst;
|
||||
}
|
||||
|
||||
function UserDataMonitor() {
|
||||
this.allNotifications = new Array();
|
||||
}
|
||||
|
||||
UserDataMonitor.prototype.handle = function(operation, key, data, src, dst) {
|
||||
userDataMonitor.allNotifications[this.allNotifications.length] =
|
||||
new UserDataNotification(operation, key, data, src, dst);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function IFrameBuilder() {
|
||||
this.contentType = "text/html";
|
||||
this.supportedContentTypes = [ "text/html",
|
||||
"text/xml",
|
||||
"image/svg+xml",
|
||||
"application/xhtml+xml" ];
|
||||
|
||||
this.supportsAsyncChange = false;
|
||||
this.async = true;
|
||||
this.fixedAttributeNames = [
|
||||
"validating", "expandEntityReferences", "coalescing",
|
||||
"signed", "hasNullString", "ignoringElementContentWhitespace", "namespaceAware", "ignoringComments", "schemaValidating"];
|
||||
|
||||
this.fixedAttributeValues = [false, true, false, true, true , false, false, true, false ];
|
||||
this.configurableAttributeNames = [ ];
|
||||
this.configurableAttributeValues = [ ];
|
||||
this.initializationError = null;
|
||||
this.initializationFatalError = null;
|
||||
this.skipIncompatibleTests = false;
|
||||
}
|
||||
|
||||
IFrameBuilder.prototype.hasFeature = function(feature, version) {
|
||||
return document.implementation.hasFeature(feature, version);
|
||||
}
|
||||
|
||||
IFrameBuilder.prototype.getImplementation = function() {
|
||||
return document.implementation;
|
||||
}
|
||||
|
||||
IFrameBuilder.prototype.setContentType = function(contentType) {
|
||||
this.contentType = contentType;
|
||||
if (contentType == "text/html") {
|
||||
this.fixedAttributeValues[6] = false;
|
||||
} else {
|
||||
this.fixedAttributeValues[6] = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
IFrameBuilder.prototype.preload = function(frame, varname, url) {
|
||||
var suffix;
|
||||
if (this.contentType == "text/html" ||
|
||||
this.contentType == "application/xhtml+xml") {
|
||||
if (url.substring(0,5) == "staff" || url == "nodtdstaff" ||
|
||||
url == "datatype_normalization") {
|
||||
suffix = ".xml";
|
||||
}
|
||||
}
|
||||
|
||||
if (!suffix) suffix = getSuffix(this.contentType);
|
||||
|
||||
var iframe = document.createElement("iframe");
|
||||
var srcname = url + suffix;
|
||||
iframe.setAttribute("name", srcname);
|
||||
iframe.setAttribute("src", fileBase + srcname);
|
||||
//
|
||||
// HTML and XHTML have onload attributes that will invoke loadComplete
|
||||
//
|
||||
if (suffix.indexOf("html") < 0) {
|
||||
iframe.addEventListener("load", loadComplete, false);
|
||||
}
|
||||
document.getElementsByTagName("body").item(0).appendChild(iframe);
|
||||
return 0;
|
||||
}
|
||||
|
||||
IFrameBuilder.prototype.load = function(frame, varname, url) {
|
||||
var suffix;
|
||||
if (url.substring(0,5) == "staff" || url == "nodtdstaff" || url == "datatype_normalization") {
|
||||
suffix = ".xml";
|
||||
}
|
||||
if (!suffix) suffix = getSuffix(this.contentType);
|
||||
var name = url + suffix;
|
||||
var iframes = document.getElementsByTagName("iframe");
|
||||
for(var i = 0; i < iframes.length; i++) {
|
||||
if (iframes.item(i).getAttribute("name") == name) {
|
||||
var item = iframes.item(i);
|
||||
if (typeof(item.contentDocument) != 'undefined') {
|
||||
return item.contentDocument;
|
||||
}
|
||||
if (typeof(item.document) != 'undefined') {
|
||||
return item.document;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
IFrameBuilder.prototype.getImplementationAttribute = function(attr) {
|
||||
for (var i = 0; i < this.fixedAttributeNames.length; i++) {
|
||||
if (this.fixedAttributeNames[i] == attr) {
|
||||
return this.fixedAttributeValues[i];
|
||||
}
|
||||
}
|
||||
throw "Unrecognized implementation attribute: " + attr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
IFrameBuilder.prototype.setImplementationAttribute = function(attribute, value) {
|
||||
var supported = this.getImplementationAttribute(attribute);
|
||||
if (supported != value) {
|
||||
this.initializationError = "IFrame loader does not support " + attribute + "=" + value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
IFrameBuilder.prototype.canSetImplementationAttribute = function(attribute, value) {
|
||||
var supported = this.getImplementationAttribute(attribute);
|
||||
return (supported == value);
|
||||
}
|
||||
|
||||
|
||||
function createBuilder(implementation) {
|
||||
if (implementation == null) {
|
||||
return new IFrameBuilder();
|
||||
}
|
||||
switch(implementation) {
|
||||
/* case "msxml3":
|
||||
return new MSXMLBuilder("Msxml2.DOMDocument.3.0");
|
||||
|
||||
case "msxml4":
|
||||
return new MSXMLBuilder("Msxml2.DOMDocument.4.0");*/
|
||||
|
||||
case "mozillaXML":
|
||||
return new MozillaXMLBuilder();
|
||||
/*
|
||||
case "svgplugin":
|
||||
return new SVGPluginBuilder();
|
||||
|
||||
case "dom3ls":
|
||||
return new DOM3LSBuilder(); */
|
||||
|
||||
case "iframe":
|
||||
return new IFrameBuilder();
|
||||
|
||||
case "xmlhttprequest":
|
||||
return new XMLHttpRequestBuilder();
|
||||
|
||||
default:
|
||||
alert ("unrecognized implementation " + implementation);
|
||||
}
|
||||
return new IFrameBuilder();
|
||||
}
|
||||
|
||||
function checkFeature(feature, version)
|
||||
{
|
||||
if (!builder.hasFeature(feature, version))
|
||||
{
|
||||
//
|
||||
// don't throw exception so that users can select to ignore the precondition
|
||||
//
|
||||
builder.initializationError = "builder does not support feature " + feature + " version " + version;
|
||||
}
|
||||
}
|
||||
|
||||
function createConfiguredBuilder() {
|
||||
var builder = null;
|
||||
var contentType = null;
|
||||
var i;
|
||||
var contentTypeSet = false;
|
||||
var parm = null;
|
||||
builder = new IFrameBuilder();
|
||||
return builder;
|
||||
}
|
||||
|
||||
|
||||
function preload(frame, varname, url) {
|
||||
return builder.preload(frame, varname, url);
|
||||
}
|
||||
|
||||
function load(frame, varname, url) {
|
||||
return builder.load(frame, varname, url);
|
||||
}
|
||||
|
||||
function getImplementationAttribute(attr) {
|
||||
return builder.getImplementationAttribute(attr);
|
||||
}
|
||||
|
||||
|
||||
function setImplementationAttribute(attribute, value) {
|
||||
builder.setImplementationAttribute(attribute, value);
|
||||
}
|
||||
|
||||
function setAsynchronous(value) {
|
||||
if (builder.supportsAsyncChange) {
|
||||
builder.async = value;
|
||||
} else {
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function createXPathEvaluator(doc) {
|
||||
try {
|
||||
return doc.getFeature("XPath", null);
|
||||
}
|
||||
catch(ex) {
|
||||
}
|
||||
return doc;
|
||||
}
|
||||
|
||||
function toLowerArray(src) {
|
||||
var newArray = new Array();
|
||||
var i;
|
||||
for (i = 0; i < src.length; i++) {
|
||||
newArray[i] = src[i].toLowerCase();
|
||||
}
|
||||
return newArray;
|
||||
}
|
||||
|
||||
function MSXMLBuilder_onreadystatechange() {
|
||||
if (builder.parser.readyState == 4) {
|
||||
loadComplete();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
var fileBase = location.href;
|
||||
if (fileBase.indexOf('?') != -1) {
|
||||
fileBase = fileBase.substring(0, fileBase.indexOf('?'));
|
||||
}
|
||||
fileBase = fileBase.substring(0, fileBase.lastIndexOf('/') + 1) + "files/";
|
||||
|
||||
function getResourceURI(name, scheme, contentType) {
|
||||
return fileBase + name + getSuffix(contentType);
|
||||
}
|
||||
|
||||
|
||||
function getImplementation() {
|
||||
return builder.getImplementation();
|
||||
}
|
||||
|
||||
//sayrer override the SimpleTest logger
|
||||
SimpleTest._logResult = function(test, passString, failString) {
|
||||
var msg = test.result ? passString : failString;
|
||||
msg += " | " + test.name;
|
||||
if (test.result) {
|
||||
if (test.todo)
|
||||
parentRunner.logger.error(msg)
|
||||
else
|
||||
parentRunner.logger.log(msg);
|
||||
} else {
|
||||
msg += " | " + test.diag;
|
||||
if (test.todo) {
|
||||
parentRunner.logger.log(msg)
|
||||
} else {
|
||||
// if (todoTests[docName]) {
|
||||
// parentRunner.logger.log("expected error in todo testcase | " + test.name);
|
||||
//} else {
|
||||
parentRunner.logger.error(msg);
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
window.doc = window;
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(function(){ setUpPage(); });
|
||||
function testFails (test) {
|
||||
if (!test.result) {
|
||||
test.todo = true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function markTodos() {
|
||||
if (todoTests[docName]) {
|
||||
// mark the failures as todos
|
||||
var failures = filter(testFails, SimpleTest._tests);
|
||||
// shouldn't be 0 failures
|
||||
todo(SimpleTest._tests != 0 && failures == 0, "test marked todo should fail somewhere");
|
||||
}
|
||||
}
|
||||
|
||||
function runJSUnitTests() {
|
||||
builder = createConfiguredBuilder();
|
||||
try {
|
||||
forEach(exposeTestFunctionNames(),
|
||||
function (testName) {
|
||||
window[testName]();
|
||||
}
|
||||
);
|
||||
} catch (ex) {
|
||||
//if (todoTests[docName]) {
|
||||
// todo(false, "Text threw exception: " + ex);
|
||||
//} else {
|
||||
ok(false, "Test threw exception: " + ex);
|
||||
//}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,764 @@
|
|||
#
|
||||
# ***** 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) 2007
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
relativesrcdir = dom/tests/mochitest/dom-level2-html
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = files
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
_TEST_FILES_A = \
|
||||
DOMTestCase.js \
|
||||
test_anchor01.html \
|
||||
test_anchor02.html \
|
||||
test_anchor03.html \
|
||||
test_anchor04.html \
|
||||
test_anchor05.html \
|
||||
test_anchor06.html \
|
||||
test_area01.html \
|
||||
test_area02.html \
|
||||
test_area03.html \
|
||||
test_area04.html \
|
||||
test_basefont01.html \
|
||||
test_body01.html \
|
||||
test_button01.html \
|
||||
test_button02.html \
|
||||
test_button03.html \
|
||||
test_button04.html \
|
||||
test_button05.html \
|
||||
test_button06.html \
|
||||
test_button07.html \
|
||||
test_button08.html \
|
||||
test_button09.html \
|
||||
test_dlist01.html \
|
||||
test_doc01.html \
|
||||
test_HTMLAnchorElement01.html \
|
||||
test_HTMLAnchorElement02.html \
|
||||
test_HTMLAnchorElement03.html \
|
||||
test_HTMLAnchorElement04.html \
|
||||
test_HTMLAnchorElement05.html \
|
||||
test_HTMLAnchorElement06.html \
|
||||
test_HTMLAnchorElement07.html \
|
||||
test_HTMLAnchorElement08.html \
|
||||
test_HTMLAnchorElement09.html \
|
||||
test_HTMLAnchorElement10.html \
|
||||
test_HTMLAnchorElement11.html \
|
||||
test_HTMLAnchorElement12.html \
|
||||
test_HTMLAnchorElement13.html \
|
||||
test_HTMLAnchorElement14.html \
|
||||
test_HTMLAreaElement01.html \
|
||||
test_HTMLAreaElement02.html \
|
||||
test_HTMLAreaElement03.html \
|
||||
test_HTMLAreaElement04.html \
|
||||
test_HTMLAreaElement05.html \
|
||||
test_HTMLAreaElement06.html \
|
||||
test_HTMLAreaElement07.html \
|
||||
test_HTMLAreaElement08.html \
|
||||
test_HTMLBaseElement01.html \
|
||||
test_HTMLBaseElement02.html \
|
||||
test_HTMLBaseFontElement01.html \
|
||||
test_HTMLBaseFontElement02.html \
|
||||
test_HTMLBaseFontElement03.html \
|
||||
test_HTMLBodyElement01.html \
|
||||
test_HTMLBodyElement02.html \
|
||||
test_HTMLBodyElement03.html \
|
||||
test_HTMLBodyElement04.html \
|
||||
test_HTMLBodyElement05.html \
|
||||
test_HTMLBodyElement06.html \
|
||||
test_HTMLBodyElement07.html \
|
||||
test_HTMLBodyElement08.html \
|
||||
test_HTMLBodyElement09.html \
|
||||
test_HTMLBodyElement10.html \
|
||||
test_HTMLBodyElement11.html \
|
||||
test_HTMLBodyElement12.html \
|
||||
test_HTMLBRElement01.html \
|
||||
test_HTMLButtonElement01.html \
|
||||
test_HTMLButtonElement02.html \
|
||||
test_HTMLButtonElement03.html \
|
||||
test_HTMLButtonElement04.html \
|
||||
test_HTMLButtonElement05.html \
|
||||
test_HTMLButtonElement06.html \
|
||||
test_HTMLButtonElement07.html \
|
||||
test_HTMLButtonElement08.html \
|
||||
test_HTMLCollection01.html \
|
||||
test_HTMLCollection02.html \
|
||||
test_HTMLCollection03.html \
|
||||
test_HTMLCollection04.html \
|
||||
test_HTMLCollection05.html \
|
||||
test_HTMLCollection06.html \
|
||||
test_HTMLCollection07.html \
|
||||
test_HTMLCollection08.html \
|
||||
test_HTMLCollection09.html \
|
||||
test_HTMLCollection10.html \
|
||||
test_HTMLCollection11.html \
|
||||
test_HTMLCollection12.html \
|
||||
$(NULL)
|
||||
|
||||
_TEST_FILES_B = \
|
||||
test_HTMLDirectoryElement01.html \
|
||||
test_HTMLDivElement01.html \
|
||||
test_HTMLDlistElement01.html \
|
||||
test_HTMLDocument01.html \
|
||||
test_HTMLDocument02.html \
|
||||
test_HTMLDocument03.html \
|
||||
test_HTMLDocument04.html \
|
||||
test_HTMLDocument05.html \
|
||||
test_HTMLDocument07.html \
|
||||
test_HTMLDocument08.html \
|
||||
test_HTMLDocument09.html \
|
||||
test_HTMLDocument10.html \
|
||||
test_HTMLDocument11.html \
|
||||
test_HTMLDocument12.html \
|
||||
test_HTMLDocument13.html \
|
||||
test_HTMLDocument14.html \
|
||||
test_HTMLDocument15.html \
|
||||
test_HTMLDocument16.html \
|
||||
test_HTMLDocument17.html \
|
||||
test_HTMLDocument18.html \
|
||||
test_HTMLDocument19.html \
|
||||
test_HTMLDocument20.html \
|
||||
test_HTMLDocument21.html \
|
||||
test_HTMLDocument22.html \
|
||||
test_HTMLDocument23.html \
|
||||
test_HTMLDocument24.html \
|
||||
test_HTMLDocument25.html \
|
||||
test_HTMLDocument26.html \
|
||||
test_HTMLDocument27.html \
|
||||
test_HTMLElement01.html \
|
||||
test_HTMLElement02.html \
|
||||
test_HTMLElement03.html \
|
||||
test_HTMLElement04.html \
|
||||
test_HTMLElement05.html \
|
||||
test_HTMLElement06.html \
|
||||
test_HTMLElement07.html \
|
||||
test_HTMLElement08.html \
|
||||
test_HTMLElement09.html \
|
||||
test_HTMLElement10.html \
|
||||
test_HTMLElement100.html \
|
||||
test_HTMLElement101.html \
|
||||
test_HTMLElement102.html \
|
||||
test_HTMLElement103.html \
|
||||
test_HTMLElement104.html \
|
||||
test_HTMLElement105.html \
|
||||
test_HTMLElement106.html \
|
||||
test_HTMLElement107.html \
|
||||
test_HTMLElement108.html \
|
||||
test_HTMLElement109.html \
|
||||
test_HTMLElement11.html \
|
||||
test_HTMLElement110.html \
|
||||
test_HTMLElement111.html \
|
||||
test_HTMLElement112.html \
|
||||
test_HTMLElement113.html \
|
||||
test_HTMLElement114.html \
|
||||
test_HTMLElement115.html \
|
||||
test_HTMLElement116.html \
|
||||
test_HTMLElement117.html \
|
||||
test_HTMLElement118.html \
|
||||
test_HTMLElement119.html \
|
||||
test_HTMLElement12.html \
|
||||
test_HTMLElement120.html \
|
||||
test_HTMLElement121.html \
|
||||
test_HTMLElement122.html \
|
||||
test_HTMLElement123.html \
|
||||
test_HTMLElement124.html \
|
||||
test_HTMLElement125.html \
|
||||
test_HTMLElement126.html \
|
||||
test_HTMLElement127.html \
|
||||
test_HTMLElement128.html \
|
||||
test_HTMLElement129.html \
|
||||
test_HTMLElement13.html \
|
||||
test_HTMLElement130.html \
|
||||
test_HTMLElement131.html \
|
||||
test_HTMLElement132.html \
|
||||
test_HTMLElement133.html \
|
||||
test_HTMLElement134.html \
|
||||
test_HTMLElement135.html \
|
||||
test_HTMLElement136.html \
|
||||
test_HTMLElement137.html \
|
||||
test_HTMLElement138.html \
|
||||
test_HTMLElement139.html \
|
||||
test_HTMLElement14.html \
|
||||
test_HTMLElement140.html \
|
||||
test_HTMLElement141.html \
|
||||
test_HTMLElement142.html \
|
||||
test_HTMLElement143.html \
|
||||
test_HTMLElement144.html \
|
||||
test_HTMLElement145.html \
|
||||
test_HTMLElement15.html \
|
||||
test_HTMLElement16.html \
|
||||
test_HTMLElement17.html \
|
||||
test_HTMLElement18.html \
|
||||
test_HTMLElement19.html \
|
||||
test_HTMLElement20.html \
|
||||
test_HTMLElement21.html \
|
||||
test_HTMLElement22.html \
|
||||
test_HTMLElement23.html \
|
||||
test_HTMLElement24.html \
|
||||
test_HTMLElement25.html \
|
||||
test_HTMLElement26.html \
|
||||
test_HTMLElement27.html \
|
||||
test_HTMLElement28.html \
|
||||
test_HTMLElement29.html \
|
||||
test_HTMLElement30.html \
|
||||
test_HTMLElement31.html \
|
||||
test_HTMLElement32.html \
|
||||
test_HTMLElement33.html \
|
||||
test_HTMLElement34.html \
|
||||
test_HTMLElement35.html \
|
||||
test_HTMLElement36.html \
|
||||
test_HTMLElement37.html \
|
||||
test_HTMLElement38.html \
|
||||
test_HTMLElement39.html \
|
||||
test_HTMLElement40.html \
|
||||
test_HTMLElement41.html \
|
||||
test_HTMLElement42.html \
|
||||
test_HTMLElement43.html \
|
||||
test_HTMLElement44.html \
|
||||
test_HTMLElement45.html \
|
||||
test_HTMLElement46.html \
|
||||
test_HTMLElement47.html \
|
||||
test_HTMLElement48.html \
|
||||
test_HTMLElement49.html \
|
||||
test_HTMLElement50.html \
|
||||
test_HTMLElement51.html \
|
||||
test_HTMLElement52.html \
|
||||
test_HTMLElement53.html \
|
||||
test_HTMLElement54.html \
|
||||
test_HTMLElement55.html \
|
||||
test_HTMLElement56.html \
|
||||
test_HTMLElement57.html \
|
||||
test_HTMLElement58.html \
|
||||
test_HTMLElement59.html \
|
||||
test_HTMLElement60.html \
|
||||
test_HTMLElement61.html \
|
||||
test_HTMLElement62.html \
|
||||
test_HTMLElement63.html \
|
||||
test_HTMLElement64.html \
|
||||
test_HTMLElement65.html \
|
||||
test_HTMLElement66.html \
|
||||
test_HTMLElement67.html \
|
||||
test_HTMLElement68.html \
|
||||
test_HTMLElement69.html \
|
||||
test_HTMLElement70.html \
|
||||
test_HTMLElement71.html \
|
||||
test_HTMLElement72.html \
|
||||
test_HTMLElement73.html \
|
||||
test_HTMLElement74.html \
|
||||
test_HTMLElement75.html \
|
||||
test_HTMLElement76.html \
|
||||
test_HTMLElement77.html \
|
||||
test_HTMLElement78.html \
|
||||
test_HTMLElement79.html \
|
||||
test_HTMLElement80.html \
|
||||
test_HTMLElement81.html \
|
||||
test_HTMLElement82.html \
|
||||
test_HTMLElement83.html \
|
||||
test_HTMLElement84.html \
|
||||
test_HTMLElement85.html \
|
||||
test_HTMLElement86.html \
|
||||
test_HTMLElement87.html \
|
||||
test_HTMLElement88.html \
|
||||
test_HTMLElement89.html \
|
||||
test_HTMLElement90.html \
|
||||
test_HTMLElement91.html \
|
||||
test_HTMLElement92.html \
|
||||
test_HTMLElement93.html \
|
||||
test_HTMLElement94.html \
|
||||
test_HTMLElement95.html \
|
||||
test_HTMLElement96.html \
|
||||
test_HTMLElement97.html \
|
||||
test_HTMLElement98.html \
|
||||
test_HTMLElement99.html \
|
||||
$(NULL)
|
||||
_TEST_FILES_C = \
|
||||
test_HTMLFieldSetElement01.html \
|
||||
test_HTMLFieldSetElement02.html \
|
||||
test_HTMLFontElement01.html \
|
||||
test_HTMLFontElement02.html \
|
||||
test_HTMLFontElement03.html \
|
||||
test_HTMLFormElement01.html \
|
||||
test_HTMLFormElement02.html \
|
||||
test_HTMLFormElement03.html \
|
||||
test_HTMLFormElement04.html \
|
||||
test_HTMLFormElement05.html \
|
||||
test_HTMLFormElement06.html \
|
||||
test_HTMLFormElement07.html \
|
||||
test_HTMLFormElement08.html \
|
||||
test_HTMLFormElement09.html \
|
||||
test_HTMLFormElement10.html \
|
||||
test_HTMLFrameElement01.html \
|
||||
test_HTMLFrameElement02.html \
|
||||
test_HTMLFrameElement03.html \
|
||||
test_HTMLFrameElement04.html \
|
||||
test_HTMLFrameElement05.html \
|
||||
test_HTMLFrameElement06.html \
|
||||
test_HTMLFrameElement07.html \
|
||||
test_HTMLFrameElement08.html \
|
||||
test_HTMLFrameElement09.html \
|
||||
test_HTMLFrameSetElement01.html \
|
||||
test_HTMLFrameSetElement02.html \
|
||||
test_HTMLHeadElement01.html \
|
||||
test_HTMLHeadingElement01.html \
|
||||
test_HTMLHeadingElement02.html \
|
||||
test_HTMLHeadingElement03.html \
|
||||
test_HTMLHeadingElement04.html \
|
||||
test_HTMLHeadingElement05.html \
|
||||
test_HTMLHeadingElement06.html \
|
||||
test_HTMLHRElement01.html \
|
||||
test_HTMLHRElement02.html \
|
||||
test_HTMLHRElement03.html \
|
||||
test_HTMLHRElement04.html \
|
||||
test_HTMLHtmlElement01.html \
|
||||
test_HTMLIFrameElement01.html \
|
||||
test_HTMLIFrameElement02.html \
|
||||
test_HTMLIFrameElement03.html \
|
||||
test_HTMLIFrameElement04.html \
|
||||
test_HTMLIFrameElement05.html \
|
||||
test_HTMLIFrameElement06.html \
|
||||
test_HTMLIFrameElement07.html \
|
||||
test_HTMLIFrameElement08.html \
|
||||
test_HTMLIFrameElement09.html \
|
||||
test_HTMLIFrameElement10.html \
|
||||
test_HTMLIFrameElement11.html \
|
||||
test_HTMLImageElement01.html \
|
||||
test_HTMLImageElement02.html \
|
||||
test_HTMLImageElement03.html \
|
||||
test_HTMLImageElement04.html \
|
||||
test_HTMLImageElement05.html \
|
||||
test_HTMLImageElement06.html \
|
||||
test_HTMLImageElement07.html \
|
||||
test_HTMLImageElement08.html \
|
||||
test_HTMLImageElement09.html \
|
||||
test_HTMLImageElement10.html \
|
||||
test_HTMLImageElement11.html \
|
||||
test_HTMLImageElement12.html \
|
||||
test_HTMLInputElement01.html \
|
||||
test_HTMLInputElement02.html \
|
||||
test_HTMLInputElement03.html \
|
||||
test_HTMLInputElement04.html \
|
||||
test_HTMLInputElement05.html \
|
||||
test_HTMLInputElement06.html \
|
||||
test_HTMLInputElement07.html \
|
||||
test_HTMLInputElement08.html \
|
||||
test_HTMLInputElement09.html \
|
||||
test_HTMLInputElement10.html \
|
||||
test_HTMLInputElement11.html \
|
||||
test_HTMLInputElement12.html \
|
||||
test_HTMLInputElement13.html \
|
||||
test_HTMLInputElement14.html \
|
||||
test_HTMLInputElement15.html \
|
||||
test_HTMLInputElement16.html \
|
||||
test_HTMLInputElement17.html \
|
||||
test_HTMLInputElement18.html \
|
||||
test_HTMLInputElement19.html \
|
||||
test_HTMLInputElement20.html \
|
||||
test_HTMLInputElement21.html \
|
||||
test_HTMLInputElement22.html \
|
||||
test_HTMLIsIndexElement01.html \
|
||||
test_HTMLIsIndexElement02.html \
|
||||
test_HTMLIsIndexElement03.html \
|
||||
test_HTMLLabelElement01.html \
|
||||
test_HTMLLabelElement02.html \
|
||||
test_HTMLLabelElement03.html \
|
||||
test_HTMLLabelElement04.html \
|
||||
test_HTMLLegendElement01.html \
|
||||
test_HTMLLegendElement02.html \
|
||||
test_HTMLLegendElement03.html \
|
||||
test_HTMLLegendElement04.html \
|
||||
test_HTMLLIElement01.html \
|
||||
test_HTMLLIElement02.html \
|
||||
test_HTMLLinkElement01.html \
|
||||
test_HTMLLinkElement02.html \
|
||||
test_HTMLLinkElement03.html \
|
||||
test_HTMLLinkElement04.html \
|
||||
test_HTMLLinkElement05.html \
|
||||
test_HTMLLinkElement06.html \
|
||||
test_HTMLLinkElement07.html \
|
||||
test_HTMLLinkElement08.html \
|
||||
test_HTMLLinkElement09.html \
|
||||
test_HTMLMapElement01.html \
|
||||
test_HTMLMapElement02.html \
|
||||
test_HTMLMenuElement01.html \
|
||||
test_HTMLMetaElement01.html \
|
||||
test_HTMLMetaElement02.html \
|
||||
test_HTMLMetaElement03.html \
|
||||
test_HTMLMetaElement04.html \
|
||||
test_HTMLModElement01.html \
|
||||
test_HTMLModElement02.html \
|
||||
test_HTMLModElement03.html \
|
||||
test_HTMLModElement04.html \
|
||||
$(NULL)
|
||||
|
||||
_TEST_FILES_D = \
|
||||
test_HTMLObjectElement01.html \
|
||||
test_HTMLObjectElement02.html \
|
||||
test_HTMLObjectElement03.html \
|
||||
test_HTMLObjectElement04.html \
|
||||
test_HTMLObjectElement05.html \
|
||||
test_HTMLObjectElement06.html \
|
||||
test_HTMLObjectElement07.html \
|
||||
test_HTMLObjectElement08.html \
|
||||
test_HTMLObjectElement09.html \
|
||||
test_HTMLObjectElement10.html \
|
||||
test_HTMLObjectElement11.html \
|
||||
test_HTMLObjectElement12.html \
|
||||
test_HTMLObjectElement13.html \
|
||||
test_HTMLObjectElement14.html \
|
||||
test_HTMLObjectElement15.html \
|
||||
test_HTMLObjectElement16.html \
|
||||
test_HTMLObjectElement17.html \
|
||||
test_HTMLObjectElement18.html \
|
||||
test_HTMLObjectElement19.html \
|
||||
test_HTMLObjectElement20.html \
|
||||
test_HTMLOListElement01.html \
|
||||
test_HTMLOListElement02.html \
|
||||
test_HTMLOListElement03.html \
|
||||
test_HTMLOptGroupElement01.html \
|
||||
test_HTMLOptGroupElement02.html \
|
||||
test_HTMLOptionElement01.html \
|
||||
test_HTMLOptionElement02.html \
|
||||
test_HTMLOptionElement03.html \
|
||||
test_HTMLOptionElement04.html \
|
||||
test_HTMLOptionElement05.html \
|
||||
test_HTMLOptionElement06.html \
|
||||
test_HTMLOptionElement07.html \
|
||||
test_HTMLOptionElement08.html \
|
||||
test_HTMLOptionElement09.html \
|
||||
test_HTMLOptionsCollection01.html \
|
||||
test_HTMLOptionsCollection02.html \
|
||||
test_HTMLOptionsCollection03.html \
|
||||
test_HTMLOptionsCollection04.html \
|
||||
test_HTMLOptionsCollection05.html \
|
||||
test_HTMLOptionsCollection06.html \
|
||||
test_HTMLOptionsCollection07.html \
|
||||
test_HTMLParagraphElement01.html \
|
||||
test_HTMLParamElement01.html \
|
||||
test_HTMLParamElement02.html \
|
||||
test_HTMLParamElement03.html \
|
||||
test_HTMLParamElement04.html \
|
||||
test_HTMLPreElement01.html \
|
||||
test_HTMLQuoteElement01.html \
|
||||
test_HTMLQuoteElement02.html \
|
||||
test_HTMLScriptElement01.html \
|
||||
test_HTMLScriptElement02.html \
|
||||
test_HTMLScriptElement03.html \
|
||||
test_HTMLScriptElement04.html \
|
||||
test_HTMLScriptElement05.html \
|
||||
test_HTMLScriptElement06.html \
|
||||
test_HTMLScriptElement07.html \
|
||||
test_HTMLSelectElement01.html \
|
||||
test_HTMLSelectElement02.html \
|
||||
test_HTMLSelectElement03.html \
|
||||
test_HTMLSelectElement04.html \
|
||||
test_HTMLSelectElement05.html \
|
||||
test_HTMLSelectElement06.html \
|
||||
test_HTMLSelectElement07.html \
|
||||
test_HTMLSelectElement08.html \
|
||||
test_HTMLSelectElement09.html \
|
||||
test_HTMLSelectElement10.html \
|
||||
test_HTMLSelectElement11.html \
|
||||
test_HTMLSelectElement12.html \
|
||||
test_HTMLSelectElement13.html \
|
||||
test_HTMLSelectElement14.html \
|
||||
test_HTMLSelectElement15.html \
|
||||
test_HTMLSelectElement16.html \
|
||||
test_HTMLSelectElement17.html \
|
||||
test_HTMLSelectElement18.html \
|
||||
test_HTMLSelectElement19.html \
|
||||
test_HTMLSelectElement20.html \
|
||||
test_HTMLStyleElement01.html \
|
||||
test_HTMLStyleElement02.html \
|
||||
test_HTMLStyleElement03.html \
|
||||
test_HTMLTableCaptionElement01.html \
|
||||
test_HTMLTableCellElement01.html \
|
||||
test_HTMLTableCellElement02.html \
|
||||
test_HTMLTableCellElement03.html \
|
||||
test_HTMLTableCellElement04.html \
|
||||
test_HTMLTableCellElement05.html \
|
||||
test_HTMLTableCellElement06.html \
|
||||
test_HTMLTableCellElement07.html \
|
||||
test_HTMLTableCellElement08.html \
|
||||
test_HTMLTableCellElement09.html \
|
||||
test_HTMLTableCellElement10.html \
|
||||
test_HTMLTableCellElement11.html \
|
||||
test_HTMLTableCellElement12.html \
|
||||
test_HTMLTableCellElement13.html \
|
||||
test_HTMLTableCellElement14.html \
|
||||
test_HTMLTableCellElement15.html \
|
||||
test_HTMLTableCellElement16.html \
|
||||
test_HTMLTableCellElement17.html \
|
||||
test_HTMLTableCellElement18.html \
|
||||
test_HTMLTableCellElement19.html \
|
||||
test_HTMLTableCellElement20.html \
|
||||
test_HTMLTableCellElement21.html \
|
||||
test_HTMLTableCellElement22.html \
|
||||
test_HTMLTableCellElement23.html \
|
||||
test_HTMLTableCellElement24.html \
|
||||
test_HTMLTableCellElement25.html \
|
||||
test_HTMLTableCellElement26.html \
|
||||
test_HTMLTableCellElement27.html \
|
||||
test_HTMLTableCellElement28.html \
|
||||
test_HTMLTableCellElement29.html \
|
||||
test_HTMLTableCellElement30.html \
|
||||
test_HTMLTableColElement01.html \
|
||||
test_HTMLTableColElement02.html \
|
||||
test_HTMLTableColElement03.html \
|
||||
test_HTMLTableColElement04.html \
|
||||
test_HTMLTableColElement05.html \
|
||||
test_HTMLTableColElement06.html \
|
||||
test_HTMLTableColElement07.html \
|
||||
test_HTMLTableColElement08.html \
|
||||
test_HTMLTableColElement09.html \
|
||||
test_HTMLTableColElement10.html \
|
||||
test_HTMLTableColElement11.html \
|
||||
test_HTMLTableColElement12.html \
|
||||
test_HTMLTableElement01.html \
|
||||
test_HTMLTableElement02.html \
|
||||
test_HTMLTableElement03.html \
|
||||
test_HTMLTableElement04.html \
|
||||
test_HTMLTableElement05.html \
|
||||
test_HTMLTableElement06.html \
|
||||
test_HTMLTableElement07.html \
|
||||
test_HTMLTableElement08.html \
|
||||
test_HTMLTableElement09.html \
|
||||
test_HTMLTableElement10.html \
|
||||
test_HTMLTableElement11.html \
|
||||
test_HTMLTableElement12.html \
|
||||
test_HTMLTableElement13.html \
|
||||
test_HTMLTableElement14.html \
|
||||
test_HTMLTableElement15.html \
|
||||
test_HTMLTableElement16.html \
|
||||
test_HTMLTableElement17.html \
|
||||
test_HTMLTableElement18.html \
|
||||
test_HTMLTableElement19.html \
|
||||
test_HTMLTableElement20.html \
|
||||
test_HTMLTableElement21.html \
|
||||
test_HTMLTableElement22.html \
|
||||
test_HTMLTableElement23.html \
|
||||
test_HTMLTableElement24.html \
|
||||
test_HTMLTableElement25.html \
|
||||
test_HTMLTableElement26.html \
|
||||
test_HTMLTableElement27.html \
|
||||
test_HTMLTableElement28.html \
|
||||
test_HTMLTableElement29.html \
|
||||
test_HTMLTableElement30.html \
|
||||
test_HTMLTableElement31.html \
|
||||
test_HTMLTableElement32.html \
|
||||
test_HTMLTableElement33.html \
|
||||
test_HTMLTableElement34.html \
|
||||
test_HTMLTableElement35.html \
|
||||
test_HTMLTableElement36.html \
|
||||
test_HTMLTableElement37.html \
|
||||
test_HTMLTableElement38.html \
|
||||
test_HTMLTableElement39.html \
|
||||
test_HTMLTableElement40.html \
|
||||
test_HTMLTableRowElement01.html \
|
||||
test_HTMLTableRowElement02.html \
|
||||
test_HTMLTableRowElement03.html \
|
||||
test_HTMLTableRowElement04.html \
|
||||
test_HTMLTableRowElement05.html \
|
||||
test_HTMLTableRowElement06.html \
|
||||
test_HTMLTableRowElement07.html \
|
||||
test_HTMLTableRowElement08.html \
|
||||
test_HTMLTableRowElement09.html \
|
||||
test_HTMLTableRowElement10.html \
|
||||
test_HTMLTableRowElement11.html \
|
||||
test_HTMLTableRowElement12.html \
|
||||
test_HTMLTableRowElement13.html \
|
||||
test_HTMLTableRowElement14.html \
|
||||
test_HTMLTableRowElement15.html \
|
||||
test_HTMLTableRowElement16.html \
|
||||
test_HTMLTableRowElement17.html \
|
||||
test_HTMLTableRowElement18.html \
|
||||
test_HTMLTableRowElement19.html \
|
||||
test_HTMLTableRowElement20.html \
|
||||
test_HTMLTableRowElement21.html \
|
||||
test_HTMLTableSectionElement01.html \
|
||||
test_HTMLTableSectionElement02.html \
|
||||
test_HTMLTableSectionElement03.html \
|
||||
test_HTMLTableSectionElement04.html \
|
||||
test_HTMLTableSectionElement05.html \
|
||||
test_HTMLTableSectionElement06.html \
|
||||
test_HTMLTableSectionElement07.html \
|
||||
test_HTMLTableSectionElement08.html \
|
||||
test_HTMLTableSectionElement09.html \
|
||||
test_HTMLTableSectionElement10.html \
|
||||
test_HTMLTableSectionElement11.html \
|
||||
test_HTMLTableSectionElement12.html \
|
||||
test_HTMLTableSectionElement13.html \
|
||||
test_HTMLTableSectionElement14.html \
|
||||
test_HTMLTableSectionElement15.html \
|
||||
test_HTMLTableSectionElement16.html \
|
||||
test_HTMLTableSectionElement17.html \
|
||||
test_HTMLTableSectionElement18.html \
|
||||
test_HTMLTableSectionElement19.html \
|
||||
test_HTMLTableSectionElement20.html \
|
||||
test_HTMLTableSectionElement21.html \
|
||||
test_HTMLTableSectionElement22.html \
|
||||
test_HTMLTableSectionElement23.html \
|
||||
test_HTMLTableSectionElement24.html \
|
||||
test_HTMLTableSectionElement25.html \
|
||||
test_HTMLTableSectionElement26.html \
|
||||
test_HTMLTableSectionElement27.html \
|
||||
test_HTMLTableSectionElement28.html \
|
||||
test_HTMLTableSectionElement29.html \
|
||||
test_HTMLTableSectionElement30.html \
|
||||
test_HTMLTableSectionElement31.html \
|
||||
test_HTMLTextAreaElement01.html \
|
||||
test_HTMLTextAreaElement02.html \
|
||||
test_HTMLTextAreaElement03.html \
|
||||
test_HTMLTextAreaElement04.html \
|
||||
test_HTMLTextAreaElement05.html \
|
||||
test_HTMLTextAreaElement06.html \
|
||||
test_HTMLTextAreaElement07.html \
|
||||
test_HTMLTextAreaElement08.html \
|
||||
test_HTMLTextAreaElement09.html \
|
||||
test_HTMLTextAreaElement10.html \
|
||||
test_HTMLTextAreaElement11.html \
|
||||
test_HTMLTextAreaElement12.html \
|
||||
test_HTMLTextAreaElement13.html \
|
||||
test_HTMLTextAreaElement14.html \
|
||||
test_HTMLTextAreaElement15.html \
|
||||
test_HTMLTitleElement01.html \
|
||||
test_HTMLUListElement01.html \
|
||||
test_HTMLUListElement02.html \
|
||||
$(NULL)
|
||||
_TEST_FILES_E = \
|
||||
test_object01.html \
|
||||
test_object02.html \
|
||||
test_object03.html \
|
||||
test_object04.html \
|
||||
test_object05.html \
|
||||
test_object06.html \
|
||||
test_object07.html \
|
||||
test_object08.html \
|
||||
test_object09.html \
|
||||
test_object10.html \
|
||||
test_object11.html \
|
||||
test_object12.html \
|
||||
test_object13.html \
|
||||
test_object14.html \
|
||||
test_object15.html \
|
||||
test_table01.html \
|
||||
test_table02.html \
|
||||
test_table03.html \
|
||||
test_table04.html \
|
||||
test_table06.html \
|
||||
test_table07.html \
|
||||
test_table08.html \
|
||||
test_table09.html \
|
||||
test_table10.html \
|
||||
test_table12.html \
|
||||
test_table15.html \
|
||||
test_table17.html \
|
||||
test_table18.html \
|
||||
test_table19.html \
|
||||
test_table20.html \
|
||||
test_table21.html \
|
||||
test_table22.html \
|
||||
test_table23.html \
|
||||
test_table24.html \
|
||||
test_table25.html \
|
||||
test_table26.html \
|
||||
test_table27.html \
|
||||
test_table28.html \
|
||||
test_table29.html \
|
||||
test_table30.html \
|
||||
test_table31.html \
|
||||
test_table32.html \
|
||||
test_table33.html \
|
||||
test_table34.html \
|
||||
test_table35.html \
|
||||
test_table36.html \
|
||||
test_table37.html \
|
||||
test_table38.html \
|
||||
test_table39.html \
|
||||
test_table40.html \
|
||||
test_table41.html \
|
||||
test_table42.html \
|
||||
test_table43.html \
|
||||
test_table44.html \
|
||||
test_table45.html \
|
||||
test_table46.html \
|
||||
test_table47.html \
|
||||
test_table48.html \
|
||||
test_table49.html \
|
||||
test_table50.html \
|
||||
test_table51.html \
|
||||
test_table52.html \
|
||||
test_table53.html \
|
||||
test_hasFeature01.html \
|
||||
test_hasFeature02.html \
|
||||
test_hasFeature03.html \
|
||||
test_hasFeature04.html \
|
||||
test_hasFeature05.html \
|
||||
test_hasFeature06.html \
|
||||
$(NULL)
|
||||
|
||||
_TEST_FILES_F = \
|
||||
test_HTMLAppletElement01.html \
|
||||
test_HTMLAppletElement02.html \
|
||||
test_HTMLAppletElement03.html \
|
||||
test_HTMLAppletElement04.html \
|
||||
test_HTMLAppletElement05.html \
|
||||
test_HTMLAppletElement06.html \
|
||||
test_HTMLAppletElement07.html \
|
||||
test_HTMLAppletElement08.html \
|
||||
test_HTMLAppletElement09.html \
|
||||
test_HTMLAppletElement10.html \
|
||||
test_HTMLAppletElement11.html \
|
||||
$(NULL)
|
||||
|
||||
# work around nsinstall limits on windows by splitting into groups
|
||||
libs:: $(_TEST_FILES_A)
|
||||
$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
|
||||
libs:: $(_TEST_FILES_B)
|
||||
$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
|
||||
libs:: $(_TEST_FILES_C)
|
||||
$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
|
||||
libs:: $(_TEST_FILES_D)
|
||||
$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
|
||||
libs:: $(_TEST_FILES_E)
|
||||
$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
|
||||
#libs:: $(_TEST_FILES_F)
|
||||
# $(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
|
|
@ -0,0 +1,267 @@
|
|||
#
|
||||
# ***** 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) 2007
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
relativesrcdir = dom/tests/mochitest/dom-level2-html/files
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
_TEST_FILES = \
|
||||
anchor.html \
|
||||
anchor.xhtml \
|
||||
anchor.xml \
|
||||
anchor2.html \
|
||||
anchor2.xhtml \
|
||||
anchor2.xml \
|
||||
applet.html \
|
||||
applet.xhtml \
|
||||
applet.xml \
|
||||
applet2.class \
|
||||
applet2.html \
|
||||
applet2.xhtml \
|
||||
applet2.xml \
|
||||
area.html \
|
||||
area.xhtml \
|
||||
area.xml \
|
||||
area2.html \
|
||||
area2.xhtml \
|
||||
area2.xml \
|
||||
base.html \
|
||||
base.xhtml \
|
||||
base.xml \
|
||||
base2.html \
|
||||
base2.xhtml \
|
||||
base2.xml \
|
||||
basefont.html \
|
||||
basefont.xhtml \
|
||||
basefont.xml \
|
||||
body.html \
|
||||
body.xhtml \
|
||||
body.xml \
|
||||
br.html \
|
||||
br.xhtml \
|
||||
br.xml \
|
||||
button.html \
|
||||
button.xhtml \
|
||||
button.xml \
|
||||
collection.html \
|
||||
collection.xhtml \
|
||||
collection.xml \
|
||||
directory.html \
|
||||
directory.xhtml \
|
||||
directory.xml \
|
||||
div.html \
|
||||
div.xhtml \
|
||||
div.xml \
|
||||
dl.html \
|
||||
dl.xhtml \
|
||||
dl.xml \
|
||||
document.html \
|
||||
document.xhtml \
|
||||
document.xml \
|
||||
element.html \
|
||||
element.xhtml \
|
||||
element.xml \
|
||||
fieldset.html \
|
||||
fieldset.xhtml \
|
||||
fieldset.xml \
|
||||
font.html \
|
||||
font.xhtml \
|
||||
font.xml \
|
||||
form.html \
|
||||
form.xhtml \
|
||||
form.xml \
|
||||
form2.html \
|
||||
form2.xhtml \
|
||||
form2.xml \
|
||||
form3.html \
|
||||
form3.xhtml \
|
||||
form3.xml \
|
||||
frame.html \
|
||||
frame.xhtml \
|
||||
frame.xml \
|
||||
frame2.html \
|
||||
frame2.xhtml \
|
||||
frame2.xml \
|
||||
frameset.html \
|
||||
frameset.xhtml \
|
||||
frameset.xml \
|
||||
head.html \
|
||||
head.xhtml \
|
||||
head.xml \
|
||||
heading.html \
|
||||
heading.xhtml \
|
||||
heading.xml \
|
||||
hr.html \
|
||||
hr.xhtml \
|
||||
hr.xml \
|
||||
html.html \
|
||||
html.xhtml \
|
||||
html.xml \
|
||||
iframe.html \
|
||||
iframe.xhtml \
|
||||
iframe.xml \
|
||||
iframe2.html \
|
||||
iframe2.xhtml \
|
||||
iframe2.xml \
|
||||
img.html \
|
||||
img.xhtml \
|
||||
img.xml \
|
||||
index.html \
|
||||
input.html \
|
||||
input.xhtml \
|
||||
input.xml \
|
||||
isindex.html \
|
||||
isindex.xhtml \
|
||||
isindex.xml \
|
||||
label.html \
|
||||
label.xhtml \
|
||||
label.xml \
|
||||
legend.html \
|
||||
legend.xhtml \
|
||||
legend.xml \
|
||||
li.html \
|
||||
li.xhtml \
|
||||
li.xml \
|
||||
link.html \
|
||||
link.xhtml \
|
||||
link.xml \
|
||||
link2.html \
|
||||
link2.xhtml \
|
||||
link2.xml \
|
||||
map.html \
|
||||
map.xhtml \
|
||||
map.xml \
|
||||
menu.html \
|
||||
menu.xhtml \
|
||||
menu.xml \
|
||||
meta.html \
|
||||
meta.xhtml \
|
||||
meta.xml \
|
||||
mod.html \
|
||||
mod.xhtml \
|
||||
mod.xml \
|
||||
object.html \
|
||||
object.xhtml \
|
||||
object.xml \
|
||||
object2.html \
|
||||
object2.xhtml \
|
||||
object2.xml \
|
||||
olist.html \
|
||||
olist.xhtml \
|
||||
olist.xml \
|
||||
optgroup.html \
|
||||
optgroup.xhtml \
|
||||
optgroup.xml \
|
||||
option.html \
|
||||
option.xhtml \
|
||||
option.xml \
|
||||
optionscollection.html \
|
||||
optionscollection.xhtml \
|
||||
optionscollection.xml \
|
||||
paragraph.html \
|
||||
paragraph.xhtml \
|
||||
paragraph.xml \
|
||||
param.html \
|
||||
param.xhtml \
|
||||
param.xml \
|
||||
pre.html \
|
||||
pre.xhtml \
|
||||
pre.xml \
|
||||
quote.html \
|
||||
quote.xhtml \
|
||||
quote.xml \
|
||||
right.png \
|
||||
script.html \
|
||||
script.xhtml \
|
||||
script.xml \
|
||||
select.html \
|
||||
select.xhtml \
|
||||
select.xml \
|
||||
style.html \
|
||||
style.xhtml \
|
||||
style.xml \
|
||||
table.html \
|
||||
table.xhtml \
|
||||
table.xml \
|
||||
table1.html \
|
||||
table1.xhtml \
|
||||
table1.xml \
|
||||
tablecaption.html \
|
||||
tablecaption.xhtml \
|
||||
tablecaption.xml \
|
||||
tablecell.html \
|
||||
tablecell.xhtml \
|
||||
tablecell.xml \
|
||||
tablecol.html \
|
||||
tablecol.xhtml \
|
||||
tablecol.xml \
|
||||
tablerow.html \
|
||||
tablerow.xhtml \
|
||||
tablerow.xml \
|
||||
tablesection.html \
|
||||
tablesection.xhtml \
|
||||
tablesection.xml \
|
||||
textarea.html \
|
||||
textarea.xhtml \
|
||||
textarea.xml \
|
||||
title.html \
|
||||
title.xhtml \
|
||||
title.xml \
|
||||
ulist.html \
|
||||
ulist.xhtml \
|
||||
ulist.xml \
|
||||
w3c_main.png \
|
||||
xhtml-lat1.ent \
|
||||
xhtml-special.ent \
|
||||
xhtml-symbol.ent \
|
||||
xhtml1-frameset.dtd \
|
||||
xhtml1-strict.dtd \
|
||||
xhtml1-transitional.dtd \
|
||||
$(NULL)
|
||||
_TEST_FILES_J = \
|
||||
applets/org/w3c/domts/DOMTSApplet.class \
|
||||
$(NULL)
|
||||
libs:: $(_TEST_FILES)
|
||||
$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
|
||||
libs:: $(_TEST_FILES_J)
|
||||
$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)/applets/org/w3c/domts
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
|
||||
<TITLE>NIST DOM HTML Test - Anchor</TITLE>
|
||||
</HEAD>
|
||||
<BODY onload="parent.loadComplete()">
|
||||
<P>
|
||||
<A ID="Anchor" DIR="LTR" HREF="./pix/submit.gif" ACCESSKEY="g" TYPE="image/gif" COORDS="0,0,100,100" SHAPE="rect" REL="GLOSSARY" REV="STYLESHEET" HREFLANG="en" CHARSET="US-ASCII" TABINDEX="22" NAME="Anchor">View Submit Button</A>
|
||||
</P>
|
||||
</BODY>
|
||||
</HTML>
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"xhtml1-transitional.dtd">
|
||||
<html xmlns='http://www.w3.org/1999/xhtml'>
|
||||
<head>
|
||||
<title>NIST DOM HTML Test - Anchor</title>
|
||||
</head>
|
||||
<body onload="parent.loadComplete()">
|
||||
<p>
|
||||
<a id="Anchor" dir="ltr" href="./pix/submit.gif" accesskey="g" type="image/gif" coords="0,0,100,100" shape="rect" rel="GLOSSARY" rev="STYLESHEET" hreflang="en" charset="US-ASCII" tabindex="22" name="Anchor">View Submit Button</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"xhtml1-transitional.dtd">
|
||||
<html xmlns='http://www.w3.org/1999/xhtml'>
|
||||
<head>
|
||||
<title>NIST DOM HTML Test - Anchor</title>
|
||||
</head>
|
||||
<body onload="parent.loadComplete()">
|
||||
<p>
|
||||
<a id="Anchor" dir="ltr" href="./pix/submit.gif" accesskey="g" type="image/gif" coords="0,0,100,100" shape="rect" rel="GLOSSARY" rev="STYLESHEET" hreflang="en" charset="US-ASCII" tabindex="22" name="Anchor">View Submit Button</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
|
||||
<TITLE>NIST DOM HTML Test - Anchor</TITLE>
|
||||
</HEAD>
|
||||
<BODY onload="parent.loadComplete()">
|
||||
<P>
|
||||
<A HREF="./pix/submit.gif" TARGET="dynamic">View Submit Button</A>
|
||||
</P>
|
||||
</BODY>
|
||||
</HTML>
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"xhtml1-transitional.dtd">
|
||||
<html xmlns='http://www.w3.org/1999/xhtml'>
|
||||
<head>
|
||||
<title>NIST DOM HTML Test - Anchor</title>
|
||||
</head>
|
||||
<body onload="parent.loadComplete()">
|
||||
<p>
|
||||
<a href="./pix/submit.gif" target="dynamic">View Submit Button</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"xhtml1-transitional.dtd">
|
||||
<html xmlns='http://www.w3.org/1999/xhtml'>
|
||||
<head>
|
||||
<title>NIST DOM HTML Test - Anchor</title>
|
||||
</head>
|
||||
<body onload="parent.loadComplete()">
|
||||
<p>
|
||||
<a href="./pix/submit.gif" target="dynamic">View Submit Button</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
|
||||
<TITLE>NIST DOM HTML Test - Applet</TITLE>
|
||||
</HEAD>
|
||||
<BODY onload="parent.loadComplete()">
|
||||
<P>
|
||||
<APPLET ALIGN="bottom" ALT="Applet Number 1" ARCHIVE="" CODE="org/w3c/domts/DOMTSApplet.class" CODEBASE="applets" HEIGHT="306" HSPACE="0" NAME="applet1" VSPACE="0" WIDTH="301"></APPLET>
|
||||
</P>
|
||||
</BODY>
|
||||
</HTML>
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"xhtml1-transitional.dtd">
|
||||
<html xmlns='http://www.w3.org/1999/xhtml'>
|
||||
<head>
|
||||
<title>NIST DOM HTML Test - Applet</title>
|
||||
</head>
|
||||
<body onload="parent.loadComplete()">
|
||||
<p>
|
||||
<applet align="bottom" alt="Applet Number 1" archive="" code="org/w3c/domts/DOMTSApplet.class" codebase="applets" height="306" hspace="0" name="applet1" vspace="0" width="301"></applet>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"xhtml1-transitional.dtd">
|
||||
<html xmlns='http://www.w3.org/1999/xhtml'>
|
||||
<head>
|
||||
<title>NIST DOM HTML Test - Applet</title>
|
||||
</head>
|
||||
<body onload="parent.loadComplete()">
|
||||
<p>
|
||||
<applet align="bottom" alt="Applet Number 1" archive="" code="org/w3c/domts/DOMTSApplet.class" codebase="applets" height="306" hspace="0" name="applet1" vspace="0" width="301"></applet>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
|
||||
<html><head>
|
||||
<title>300 Multiple Choices</title>
|
||||
</head><body>
|
||||
<h1>Multiple Choices</h1>
|
||||
The document name you requested (<code>/2004/04/ecmascript/level2/html/files/applet2.class</code>) could not be found on this server.
|
||||
However, we found documents with names similar to the one you requested.<p>Available documents:
|
||||
<ul>
|
||||
<li><a href="/2004/04/ecmascript/level2/html/files/applet2.xml">/2004/04/ecmascript/level2/html/files/applet2.xml</a> (common basename)
|
||||
<li><a href="/2004/04/ecmascript/level2/html/files/applet2.html">/2004/04/ecmascript/level2/html/files/applet2.html</a> (common basename)
|
||||
<li><a href="/2004/04/ecmascript/level2/html/files/applet2.xhtml">/2004/04/ecmascript/level2/html/files/applet2.xhtml</a> (common basename)
|
||||
</ul>
|
||||
Please consider informing the owner of the <a href="http://www.w3.org/2004/04/ecmascript/level2/html/files/document.html">referring page</a> about the broken link.
|
||||
</body></html>
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
|
||||
<TITLE>NIST DOM HTML Test - Applet</TITLE>
|
||||
</HEAD>
|
||||
<BODY onload="parent.loadComplete()">
|
||||
<P>
|
||||
<APPLET ALIGN="bottom" ALT="Applet Number 1" ARCHIVE="" OBJECT="DOMTSApplet.dat" CODEBASE="applets" HEIGHT="306" HSPACE="0" NAME="applet1" VSPACE="0" WIDTH="301"></APPLET>
|
||||
</P>
|
||||
</BODY>
|
||||
</HTML>
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"xhtml1-transitional.dtd">
|
||||
<html xmlns='http://www.w3.org/1999/xhtml'>
|
||||
<head>
|
||||
<title>NIST DOM HTML Test - Applet</title>
|
||||
</head>
|
||||
<body onload="parent.loadComplete()">
|
||||
<p>
|
||||
<applet align="bottom" alt="Applet Number 1" archive="" object="DOMTSApplet.dat" codebase="applets" height="306" hspace="0" name="applet1" vspace="0" width="301"></applet>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"xhtml1-transitional.dtd">
|
||||
<html xmlns='http://www.w3.org/1999/xhtml'>
|
||||
<head>
|
||||
<title>NIST DOM HTML Test - Applet</title>
|
||||
</head>
|
||||
<body onload="parent.loadComplete()">
|
||||
<p>
|
||||
<applet align="bottom" alt="Applet Number 1" archive="" object="DOMTSApplet.dat" codebase="applets" height="306" hspace="0" name="applet1" vspace="0" width="301"></applet>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче