Bug 335911: Change nsIContent::IsContentOfType to nsINode::IsNodeOfType. r/sr=bz
This commit is contained in:
Родитель
f1b79578c3
Коммит
36f352636c
|
@ -1819,7 +1819,7 @@ NS_IMETHODIMP nsAccessibilityService::GetAccessible(nsIDOMNode *aNode,
|
|||
#ifdef DEBUG_aleventhal_
|
||||
// Frame hint debugging
|
||||
++frameHintFailed;
|
||||
if (content->IsContentOfType(nsIContent::eTEXT)) {
|
||||
if (content->IsNodeOfType(nsINode::eTEXT)) {
|
||||
++frameHintFailedForText;
|
||||
}
|
||||
frameHintNonexistant += !*aFrameHint;
|
||||
|
@ -1868,7 +1868,7 @@ NS_IMETHODIMP nsAccessibilityService::GetAccessible(nsIDOMNode *aNode,
|
|||
/**
|
||||
* Attempt to create an accessible based on what we know
|
||||
*/
|
||||
if (content->IsContentOfType(nsIContent::eTEXT)) {
|
||||
if (content->IsNodeOfType(nsINode::eTEXT)) {
|
||||
// --- Create HTML for visible text frames ---
|
||||
if (frame->IsEmpty()) {
|
||||
*aIsHidden = PR_TRUE;
|
||||
|
@ -1876,7 +1876,7 @@ NS_IMETHODIMP nsAccessibilityService::GetAccessible(nsIDOMNode *aNode,
|
|||
}
|
||||
frame->GetAccessible(getter_AddRefs(newAcc));
|
||||
}
|
||||
else if (!content->IsContentOfType(nsIContent::eHTML)) {
|
||||
else if (!content->IsNodeOfType(nsINode::eHTML)) {
|
||||
// --- Try creating accessible non-HTML (XUL, etc.) ---
|
||||
// XUL elements may implement nsIAccessibleProvider via XBL
|
||||
// This allows them to say what kind of accessible to create
|
||||
|
|
|
@ -191,11 +191,11 @@ NS_IMETHODIMP nsAccessible::GetName(nsAString& aName)
|
|||
PRBool canAggregateName = mRoleMapEntry &&
|
||||
mRoleMapEntry->nameRule == eNameOkFromChildren;
|
||||
|
||||
if (content->IsContentOfType(nsIContent::eHTML)) {
|
||||
if (content->IsNodeOfType(nsINode::eHTML)) {
|
||||
return GetHTMLName(aName, canAggregateName);
|
||||
}
|
||||
|
||||
if (content->IsContentOfType(nsIContent::eXUL)) {
|
||||
if (content->IsNodeOfType(nsINode::eXUL)) {
|
||||
return GetXULName(aName, canAggregateName);
|
||||
}
|
||||
|
||||
|
@ -213,14 +213,14 @@ NS_IMETHODIMP nsAccessible::GetDescription(nsAString& aDescription)
|
|||
if (!content) {
|
||||
return NS_ERROR_FAILURE; // Node shut down
|
||||
}
|
||||
if (!content->IsContentOfType(nsIContent::eTEXT)) {
|
||||
if (!content->IsNodeOfType(nsINode::eTEXT)) {
|
||||
nsAutoString description;
|
||||
if (content->HasAttr(kNameSpaceID_XHTML2_Unofficial,
|
||||
nsAccessibilityAtoms::role)) {
|
||||
GetTextFromRelationID(nsAccessibilityAtoms::describedby, description);
|
||||
}
|
||||
if (description.IsEmpty()) {
|
||||
PRBool isXUL = content->IsContentOfType(nsIContent::eXUL);
|
||||
PRBool isXUL = content->IsNodeOfType(nsINode::eXUL);
|
||||
if (isXUL) {
|
||||
// Try XUL <description control="[id]">description text</description>
|
||||
nsIContent *descriptionContent =
|
||||
|
@ -745,7 +745,7 @@ NS_IMETHODIMP nsAccessible::GetState(PRUint32 *aState)
|
|||
// if someone sets it on another attribute,
|
||||
// it seems reasonable to consider it unavailable
|
||||
PRBool isDisabled;
|
||||
if (content->IsContentOfType(nsIContent::eHTML)) {
|
||||
if (content->IsNodeOfType(nsINode::eHTML)) {
|
||||
// In HTML, just the presence of the disabled attribute means it is disabled,
|
||||
// therefore disabled="false" indicates disabled!
|
||||
isDisabled = content->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::disabled);
|
||||
|
@ -759,7 +759,7 @@ NS_IMETHODIMP nsAccessible::GetState(PRUint32 *aState)
|
|||
if (isDisabled) {
|
||||
*aState |= STATE_UNAVAILABLE;
|
||||
}
|
||||
else if (content->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
else if (content->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
if (!content->HasAttr(kNameSpaceID_XHTML2_Unofficial,
|
||||
nsAccessibilityAtoms::role)) {
|
||||
// Default state for element accessible is focusable unless role is manually set
|
||||
|
@ -1209,7 +1209,7 @@ nsresult nsAccessible::AppendNameFromAccessibleFor(nsIContent *aContent,
|
|||
|
||||
nsresult nsAccessible::AppendFlatStringFromContentNode(nsIContent *aContent, nsAString *aFlatString)
|
||||
{
|
||||
if (aContent->IsContentOfType(nsIContent::eTEXT)) {
|
||||
if (aContent->IsNodeOfType(nsINode::eTEXT)) {
|
||||
nsCOMPtr<nsITextContent> textContent(do_QueryInterface(aContent));
|
||||
NS_ASSERTION(textContent, "No text content for text content type");
|
||||
// If it's a text node, append the text
|
||||
|
@ -1249,8 +1249,8 @@ nsresult nsAccessible::AppendFlatStringFromContentNode(nsIContent *aContent, nsA
|
|||
}
|
||||
|
||||
nsAutoString textEquivalent;
|
||||
if (!aContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
if (aContent->IsContentOfType(nsIContent::eXUL)) {
|
||||
if (!aContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
if (aContent->IsNodeOfType(nsINode::eXUL)) {
|
||||
nsCOMPtr<nsIPresShell> shell = GetPresShell();
|
||||
if (!shell) {
|
||||
return NS_ERROR_FAILURE;
|
||||
|
@ -1347,7 +1347,7 @@ nsresult nsAccessible::AppendFlatStringFromSubtreeRecurse(nsIContent *aContent,
|
|||
|
||||
nsIContent *nsAccessible::GetLabelContent(nsIContent *aForNode)
|
||||
{
|
||||
return aForNode->IsContentOfType(nsIContent::eXUL) ? GetXULLabelContent(aForNode) :
|
||||
return aForNode->IsNodeOfType(nsINode::eXUL) ? GetXULLabelContent(aForNode) :
|
||||
GetHTMLLabelContent(aForNode);
|
||||
}
|
||||
|
||||
|
@ -1950,7 +1950,7 @@ NS_IMETHODIMP nsAccessible::GetAccessibleRelated(PRUint32 aRelationType, nsIAcce
|
|||
case RELATION_LABEL_FOR:
|
||||
{
|
||||
if (content->Tag() == nsAccessibilityAtoms::label) {
|
||||
nsIAtom *relatedIDAttr = content->IsContentOfType(nsIContent::eHTML) ?
|
||||
nsIAtom *relatedIDAttr = content->IsNodeOfType(nsINode::eHTML) ?
|
||||
nsAccessibilityAtoms::_for : nsAccessibilityAtoms::control;
|
||||
content->GetAttr(kNameSpaceID_None, relatedIDAttr, relatedID);
|
||||
if (relatedID.IsEmpty()) {
|
||||
|
@ -1997,7 +1997,7 @@ NS_IMETHODIMP nsAccessible::GetAccessibleRelated(PRUint32 aRelationType, nsIAcce
|
|||
nsIContent *description =
|
||||
GetXULLabelContent(content, nsAccessibilityAtoms::description);
|
||||
if (!relatedNode && content->Tag() == nsAccessibilityAtoms::description &&
|
||||
content->IsContentOfType(nsIContent::eXUL)) {
|
||||
content->IsNodeOfType(nsINode::eXUL)) {
|
||||
// This affectively adds an optional control attribute to xul:description,
|
||||
// which only affects accessibility, by allowing the description to be
|
||||
// tied to a control.
|
||||
|
@ -2008,7 +2008,7 @@ NS_IMETHODIMP nsAccessible::GetAccessibleRelated(PRUint32 aRelationType, nsIAcce
|
|||
}
|
||||
case RELATION_DEFAULT_BUTTON:
|
||||
{
|
||||
if (content->IsContentOfType(nsIContent::eHTML)) {
|
||||
if (content->IsNodeOfType(nsINode::eHTML)) {
|
||||
nsCOMPtr<nsIForm> form;
|
||||
while ((form = do_QueryInterface(content)) == nsnull &&
|
||||
(content = content->GetParent()) != nsnull) /* nothing */ ;
|
||||
|
|
|
@ -107,7 +107,7 @@ NS_IMETHODIMP nsAccessibleTreeWalker::GetFullTreeParentNode(nsIDOMNode *aChildNo
|
|||
void nsAccessibleTreeWalker::GetKids(nsIDOMNode *aParentNode)
|
||||
{
|
||||
nsCOMPtr<nsIContent> parentContent(do_QueryInterface(aParentNode));
|
||||
if (!parentContent || !parentContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
if (!parentContent || !parentContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
mState.frame = nsnull; // Don't walk frames in non-HTML content, just walk the DOM.
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ void nsAccessibleTreeWalker::GetKids(nsIDOMNode *aParentNode)
|
|||
// Walk anonymous content? Not currently used for HTML -- anonymous content there uses frame walking
|
||||
mState.siblingIndex = 0; // Indicates our index into the sibling list
|
||||
if (parentContent) {
|
||||
if (mBindingManager && !parentContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
if (mBindingManager && !parentContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
// Walk anonymous content
|
||||
mBindingManager->GetXBLChildNodesFor(parentContent, getter_AddRefs(mState.siblingList)); // returns null if no anon nodes
|
||||
}
|
||||
|
|
|
@ -870,7 +870,7 @@ void nsRootAccessible::GetTargetNode(nsIDOMEvent *aEvent, nsIDOMNode **aTargetNo
|
|||
nsevent->GetOriginalTarget(getter_AddRefs(domEventTarget));
|
||||
nsCOMPtr<nsIContent> content(do_QueryInterface(domEventTarget));
|
||||
nsIContent *bindingParent;
|
||||
if (content && content->IsContentOfType(nsIContent::eHTML) &&
|
||||
if (content && content->IsNodeOfType(nsINode::eHTML) &&
|
||||
(bindingParent = content->GetBindingParent()) != nsnull) {
|
||||
// Use binding parent when the event occurs in
|
||||
// anonymous HTML content.
|
||||
|
|
|
@ -382,7 +382,7 @@ nsHTMLSelectListAccessible::CacheOptSiblings(nsIAccessibilityService *aAccServic
|
|||
|
||||
for (PRUint32 count = 0; count < numChildren; count ++) {
|
||||
nsIContent *childContent = aParentContent->GetChildAt(count);
|
||||
if (!childContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
if (!childContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
continue;
|
||||
}
|
||||
nsCOMPtr<nsIAtom> tag = childContent->Tag();
|
||||
|
@ -712,7 +712,7 @@ nsresult nsHTMLSelectOptionAccessible::GetFocusedOptionNode(nsIDOMNode *aListNod
|
|||
void nsHTMLSelectOptionAccessible::SelectionChangedIfOption(nsIContent *aPossibleOption)
|
||||
{
|
||||
if (!aPossibleOption || aPossibleOption->Tag() != nsAccessibilityAtoms::option ||
|
||||
!aPossibleOption->IsContentOfType(nsIContent::eHTML)) {
|
||||
!aPossibleOption->IsNodeOfType(nsINode::eHTML)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -257,7 +257,7 @@ NS_IMETHODIMP nsAccessNodeWrap::GetComputedStyleDeclaration(nsIDOMCSSStyleDeclar
|
|||
if (!content)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
if (content->IsContentOfType(nsIContent::eTEXT)) {
|
||||
if (content->IsNodeOfType(nsINode::eTEXT)) {
|
||||
content = content->GetParent();
|
||||
NS_ASSERTION(content, "No parent for text node");
|
||||
}
|
||||
|
|
|
@ -446,7 +446,7 @@ STDMETHODIMP nsAccessibleWrap::get_accRole(
|
|||
accessNode->GetDOMNode(getter_AddRefs(domNode));
|
||||
nsIContent *content = GetRoleContent(domNode);
|
||||
NS_ASSERTION(content, "No content for accessible");
|
||||
if (content && content->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
if (content && content->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
nsAutoString roleString;
|
||||
if (role != ROLE_CLIENT) {
|
||||
content->GetAttr(kNameSpaceID_XHTML2_Unofficial, nsAccessibilityAtoms::role, roleString);
|
||||
|
|
|
@ -61,8 +61,8 @@ class nsAttrName;
|
|||
|
||||
// IID for the nsIContent interface
|
||||
#define NS_ICONTENT_IID \
|
||||
{ 0xf967b2d6, 0xa81c, 0x492c, \
|
||||
{ 0x91, 0x4b, 0x53, 0x8c, 0x0c, 0x19, 0x37, 0x8c } }
|
||||
{ 0x26e42639, 0x013b, 0x442a, \
|
||||
{ 0xbe, 0xa0, 0x31, 0xad, 0x43, 0x33, 0x6f, 0x79 } }
|
||||
|
||||
/**
|
||||
* A node of content in a document's content model. This interface
|
||||
|
@ -506,39 +506,6 @@ public:
|
|||
*/
|
||||
virtual nsIContent *GetBindingParent() const = 0;
|
||||
|
||||
/**
|
||||
* Bit-flags to pass (or'ed together) to IsContentOfType()
|
||||
*/
|
||||
enum {
|
||||
/** text elements */
|
||||
eTEXT = 0x00000001,
|
||||
/** dom elements */
|
||||
eELEMENT = 0x00000002,
|
||||
/** html elements */
|
||||
eHTML = 0x00000004,
|
||||
/** form controls */
|
||||
eHTML_FORM_CONTROL = 0x00000008,
|
||||
/** XUL elements */
|
||||
eXUL = 0x00000010,
|
||||
/** xml processing instructions */
|
||||
ePROCESSING_INSTRUCTION = 0x00000020,
|
||||
/** svg elements */
|
||||
eSVG = 0x00000040,
|
||||
/** comment nodes */
|
||||
eCOMMENT = 0x00000080
|
||||
};
|
||||
|
||||
/**
|
||||
* API for doing a quick check if a content object is of a given
|
||||
* type, such as HTML, XUL, Text, ... Use this when you can instead of
|
||||
* checking the tag.
|
||||
*
|
||||
* @param aFlags what types you want to test for (see above, eTEXT, eELEMENT,
|
||||
* eHTML, eHTML_FORM_CONTROL, eXUL)
|
||||
* @return whether the content matches ALL flags passed in
|
||||
*/
|
||||
virtual PRBool IsContentOfType(PRUint32 aFlags) const = 0;
|
||||
|
||||
/**
|
||||
* Get the event listener manager, the guy you talk to to register for events
|
||||
* on this element.
|
||||
|
|
|
@ -91,8 +91,8 @@ class nsIDocumentObserver;
|
|||
|
||||
// IID for the nsIDocument interface
|
||||
#define NS_IDOCUMENT_IID \
|
||||
{ 0x726ce58e, 0x13ab, 0x4c91, \
|
||||
{ 0x80, 0x45, 0xa8, 0x7b, 0xfe, 0xd5, 0xfe, 0xcd } }
|
||||
{ 0x982d6716, 0xdb0b, 0x4bbf, \
|
||||
{ 0xb7, 0x23, 0x81, 0x24, 0x6c, 0x10, 0xdb, 0xbd } }
|
||||
|
||||
|
||||
// Flag for AddStyleSheet().
|
||||
|
|
|
@ -59,8 +59,8 @@ class nsIPrincipal;
|
|||
// IID for the nsINode interface
|
||||
// f96eef82-43fc-4eee-9784-4259415e98a9
|
||||
#define NS_INODE_IID \
|
||||
{ 0xf96eef82, 0x43fc, 0x4eee, \
|
||||
{ 0x97, 0x84, 0x42, 0x59, 0x41, 0x5e, 0x98, 0xa9 } }
|
||||
{ 0x1418310f, 0x2151, 0x47b7, \
|
||||
{ 0x9f, 0x4f, 0x4a, 0xc4, 0x95, 0x82, 0xfa, 0xc8 } }
|
||||
|
||||
// hack to make egcs / gcc 2.95.2 happy
|
||||
class nsINode_base : public nsIDOMGCParticipant {
|
||||
|
@ -85,6 +85,44 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Bit-flags to pass (or'ed together) to IsNodeOfType()
|
||||
*/
|
||||
enum {
|
||||
/** nsIContent nodes */
|
||||
eCONTENT = 1 << 0,
|
||||
/** nsIDocument nodes */
|
||||
eDOCUMENT = 1 << 1,
|
||||
/** nsIAttribute nodes */
|
||||
eATTRIBUTE = 1 << 2,
|
||||
/** elements */
|
||||
eELEMENT = 1 << 3,
|
||||
/** text nodes */
|
||||
eTEXT = 1 << 4,
|
||||
/** xml processing instructions */
|
||||
ePROCESSING_INSTRUCTION = 1 << 5,
|
||||
/** comment nodes */
|
||||
eCOMMENT = 1 << 6,
|
||||
/** html elements */
|
||||
eHTML = 1 << 7,
|
||||
/** form control elements */
|
||||
eHTML_FORM_CONTROL = 1 << 8,
|
||||
/** XUL elements */
|
||||
eXUL = 1 << 9,
|
||||
/** svg elements */
|
||||
eSVG = 1 << 10
|
||||
};
|
||||
|
||||
/**
|
||||
* API for doing a quick check if a content object is of a given
|
||||
* type, such as HTML, XUL, Text, ... Use this when you can instead of
|
||||
* checking the tag.
|
||||
*
|
||||
* @param aFlags what types you want to test for (see above)
|
||||
* @return whether the content matches ALL flags passed in
|
||||
*/
|
||||
virtual PRBool IsNodeOfType(PRUint32 aFlags) const = 0;
|
||||
|
||||
/**
|
||||
* Get the number of children
|
||||
* @return the number of children
|
||||
|
|
|
@ -215,7 +215,7 @@ mozSanitizingHTMLSerializer::IsContainer(PRInt32 aId)
|
|||
PRInt32
|
||||
mozSanitizingHTMLSerializer::GetIdForContent(nsIContent* aContent)
|
||||
{
|
||||
if (!aContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
if (!aContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
return eHTMLTag_unknown;
|
||||
}
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ public:
|
|||
|
||||
// nsIContent
|
||||
virtual PRBool MayHaveFrame() const;
|
||||
virtual PRBool IsContentOfType(PRUint32 aFlags) const;
|
||||
virtual PRBool IsNodeOfType(PRUint32 aFlags) const;
|
||||
|
||||
#ifdef DEBUG
|
||||
virtual void List(FILE* out, PRInt32 aIndent) const;
|
||||
|
@ -133,9 +133,9 @@ nsCommentNode::MayHaveFrame() const
|
|||
}
|
||||
|
||||
PRBool
|
||||
nsCommentNode::IsContentOfType(PRUint32 aFlags) const
|
||||
nsCommentNode::IsNodeOfType(PRUint32 aFlags) const
|
||||
{
|
||||
return !(aFlags & ~eCOMMENT);
|
||||
return !(aFlags & ~(eCONTENT | eCOMMENT));
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -710,7 +710,7 @@ nsContentList::Match(nsIContent *aContent)
|
|||
}
|
||||
|
||||
if (mMatchAtom) {
|
||||
if (!aContent->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
if (!aContent->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -791,7 +791,7 @@ nsContentUtils::InProlog(nsIDOMNode *aNode)
|
|||
while (pos > 0) {
|
||||
--pos;
|
||||
nsIContent *sibl = doc->GetChildAt(pos);
|
||||
if (sibl->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
if (sibl->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -1738,7 +1738,7 @@ nsContentUtils::BelongsInForm(nsIDOMHTMLFormElement *aForm,
|
|||
}
|
||||
|
||||
if (content->Tag() == nsHTMLAtoms::form &&
|
||||
content->IsContentOfType(nsIContent::eHTML)) {
|
||||
content->IsNodeOfType(nsINode::eHTML)) {
|
||||
// The child is contained within a form, but not the right form
|
||||
// so we ignore it.
|
||||
|
||||
|
@ -2507,7 +2507,7 @@ nsContentUtils::ReportToConsole(PropertiesFile aFile,
|
|||
static PRBool MatchFormControls(nsIContent* aContent, PRInt32 aNamespaceID,
|
||||
nsIAtom* aAtom, const nsAString& aData)
|
||||
{
|
||||
return aContent->IsContentOfType(nsIContent::eHTML_FORM_CONTROL);
|
||||
return aContent->IsNodeOfType(nsINode::eHTML_FORM_CONTROL);
|
||||
}
|
||||
|
||||
/* static */ already_AddRefed<nsContentList>
|
||||
|
|
|
@ -320,7 +320,7 @@ nsresult nsCopySupport::IsPlainTextContext(nsISelection *aSel, nsIDocument *aDoc
|
|||
{
|
||||
// checking for selection inside a plaintext form widget
|
||||
|
||||
if (!selContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
if (!selContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -770,6 +770,12 @@ nsDOMAttribute::LookupNamespaceURI(const nsAString& aNamespacePrefix,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsDOMAttribute::IsNodeOfType(PRUint32 aFlags) const
|
||||
{
|
||||
return !(aFlags & ~eATTRIBUTE);
|
||||
}
|
||||
|
||||
PRUint32
|
||||
nsDOMAttribute::GetChildCount() const
|
||||
{
|
||||
|
|
|
@ -109,6 +109,7 @@ public:
|
|||
nsresult SetOwnerDocument(nsIDocument* aDocument);
|
||||
|
||||
// nsINode interface
|
||||
virtual PRBool IsNodeOfType(PRUint32 aFlags) const;
|
||||
virtual PRUint32 GetChildCount() const;
|
||||
virtual nsIContent *GetChildAt(PRUint32 aIndex) const;
|
||||
virtual PRInt32 IndexOf(nsIContent* aPossibleChild) const;
|
||||
|
|
|
@ -290,7 +290,7 @@ nsDOMAttributeMap::SetNamedItemInternal(nsIDOMNode *aNode,
|
|||
nsAutoString value;
|
||||
attribute->GetValue(value);
|
||||
if (!aWithNS && ni->NamespaceID() == kNameSpaceID_None &&
|
||||
mContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
mContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
// Set via setAttribute(), which may do normalization on the
|
||||
// attribute name for HTML
|
||||
nsCOMPtr<nsIDOMElement> ourElement(do_QueryInterface(mContent));
|
||||
|
|
|
@ -1691,6 +1691,12 @@ nsDocument::FindContentForSubDocument(nsIDocument *aDocument) const
|
|||
return data.mResult;
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsDocument::IsNodeOfType(PRUint32 aFlags) const
|
||||
{
|
||||
return !(aFlags & ~eDOCUMENT);
|
||||
}
|
||||
|
||||
nsIContent *
|
||||
nsDocument::GetChildAt(PRUint32 aIndex) const
|
||||
{
|
||||
|
@ -1713,7 +1719,7 @@ nsresult
|
|||
nsDocument::InsertChildAt(nsIContent* aKid, PRUint32 aIndex,
|
||||
PRBool aNotify)
|
||||
{
|
||||
if (aKid->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
if (aKid->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
if (mRootContent) {
|
||||
NS_ERROR("Inserting element child when we already have one");
|
||||
return NS_ERROR_DOM_HIERARCHY_REQUEST_ERR;
|
||||
|
@ -1764,7 +1770,7 @@ nsDocument::RemoveChildAt(PRUint32 aIndex, PRBool aNotify)
|
|||
nsresult rv = NS_OK;
|
||||
if (oldKid) {
|
||||
if (oldKid == mRootContent) {
|
||||
NS_ASSERTION(oldKid->IsContentOfType(nsIContent::eELEMENT),
|
||||
NS_ASSERTION(oldKid->IsNodeOfType(nsINode::eELEMENT),
|
||||
"Non-element root content?");
|
||||
// Destroy the link map up front and null out mRootContent before we mess
|
||||
// with the child list. Hopefully no one in doRemoveChildAt will compare
|
||||
|
@ -1803,7 +1809,7 @@ nsDocument::VerifyRootContentState()
|
|||
nsIContent* kid = GetChildAt(i);
|
||||
NS_ASSERTION(kid, "Must have kid here");
|
||||
|
||||
if (kid->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
if (kid->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
NS_ASSERTION(!elementChild, "Multiple element kids?");
|
||||
elementChild = kid;
|
||||
}
|
||||
|
|
|
@ -528,6 +528,7 @@ public:
|
|||
virtual void OnPageHide(PRBool aPersisted);
|
||||
|
||||
// nsINode
|
||||
virtual PRBool IsNodeOfType(PRUint32 aFlags) const;
|
||||
virtual nsIContent *GetChildAt(PRUint32 aIndex) const;
|
||||
virtual PRInt32 IndexOf(nsIContent* aPossibleChild) const;
|
||||
virtual PRUint32 GetChildCount() const;
|
||||
|
|
|
@ -348,7 +348,7 @@ nsFrameLoader::EnsureDocShell()
|
|||
nsAutoString value;
|
||||
PRBool isContent = PR_FALSE;
|
||||
|
||||
if (mOwnerContent->IsContentOfType(nsIContent::eXUL)) {
|
||||
if (mOwnerContent->IsNodeOfType(nsINode::eXUL)) {
|
||||
mOwnerContent->GetAttr(kNameSpaceID_None, nsHTMLAtoms::type, value);
|
||||
}
|
||||
|
||||
|
|
|
@ -675,7 +675,7 @@ nsGenericDOMDataNode::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
|
|||
// NS_PRECONDITION(!aParent || aDocument == aParent->GetCurrentDoc(),
|
||||
// "aDocument must be current doc of aParent");
|
||||
NS_PRECONDITION(!aParent ||
|
||||
(aParent->IsContentOfType(eXUL) && aDocument == nsnull) ||
|
||||
(aParent->IsNodeOfType(eXUL) && aDocument == nsnull) ||
|
||||
aDocument == aParent->GetCurrentDoc(),
|
||||
"aDocument must be current doc of aParent");
|
||||
NS_PRECONDITION(!GetCurrentDoc() && !IsInDoc(),
|
||||
|
@ -959,11 +959,12 @@ nsGenericDOMDataNode::GetBindingParent() const
|
|||
}
|
||||
|
||||
PRBool
|
||||
nsGenericDOMDataNode::IsContentOfType(PRUint32 aFlags) const
|
||||
nsGenericDOMDataNode::IsNodeOfType(PRUint32 aFlags) const
|
||||
{
|
||||
return PR_FALSE;
|
||||
return !(aFlags & ~eCONTENT);
|
||||
}
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
void
|
||||
nsGenericDOMDataNode::List(FILE* out, PRInt32 aIndent) const
|
||||
|
|
|
@ -241,7 +241,7 @@ public:
|
|||
virtual const nsVoidArray *GetRangeList() const;
|
||||
|
||||
virtual nsIContent *GetBindingParent() const;
|
||||
virtual PRBool IsContentOfType(PRUint32 aFlags) const;
|
||||
virtual PRBool IsNodeOfType(PRUint32 aFlags) const;
|
||||
|
||||
virtual nsresult GetListenerManager(PRBool aCreateIfNotFound,
|
||||
nsIEventListenerManager** aResult);
|
||||
|
|
|
@ -290,7 +290,7 @@ nsNode3Tearoff::GetTextContent(nsIContent *aContent,
|
|||
aTextContent.Truncate();
|
||||
while (!iter->IsDone()) {
|
||||
nsIContent *content = iter->GetCurrentNode();
|
||||
if (content->IsContentOfType(nsIContent::eTEXT)) {
|
||||
if (content->IsNodeOfType(nsINode::eTEXT)) {
|
||||
nsCOMPtr<nsITextContent> textContent(do_QueryInterface(iter->GetCurrentNode()));
|
||||
if (textContent)
|
||||
textContent->AppendTextTo(aTextContent);
|
||||
|
@ -1713,7 +1713,7 @@ nsGenericElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
|
|||
// NS_PRECONDITION(!aParent || aDocument == aParent->GetCurrentDoc(),
|
||||
// "aDocument must be current doc of aParent");
|
||||
NS_PRECONDITION(!aParent ||
|
||||
(aParent->IsContentOfType(eXUL) && aDocument == nsnull) ||
|
||||
(aParent->IsNodeOfType(eXUL) && aDocument == nsnull) ||
|
||||
aDocument == aParent->GetCurrentDoc(),
|
||||
"aDocument must be current doc of aParent");
|
||||
NS_PRECONDITION(!GetCurrentDoc(), "Already have a document. Unbind first!");
|
||||
|
@ -2235,9 +2235,9 @@ nsGenericElement::GetBindingParent() const
|
|||
}
|
||||
|
||||
PRBool
|
||||
nsGenericElement::IsContentOfType(PRUint32 aFlags) const
|
||||
nsGenericElement::IsNodeOfType(PRUint32 aFlags) const
|
||||
{
|
||||
return !(aFlags & ~eELEMENT);
|
||||
return !(aFlags & ~(eCONTENT | eELEMENT));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -2661,7 +2661,7 @@ PRBool IsAllowedAsChild(nsIContent* aNewChild, PRUint16 aNewNodeType,
|
|||
for (PRUint32 index = 0; index < count; ++index) {
|
||||
nsIContent* childContent = aNewChild->GetChildAt(index);
|
||||
NS_ASSERTION(childContent, "Something went wrong");
|
||||
if (childContent->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
if (childContent->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
if (sawElement) {
|
||||
// Can't put two elements into a document
|
||||
return PR_FALSE;
|
||||
|
@ -3014,7 +3014,7 @@ nsGenericElement::doReplaceOrInsertBefore(PRBool aReplace,
|
|||
}
|
||||
else {
|
||||
// Not inserting a fragment but rather a single node.
|
||||
PRBool newContentIsXUL = newContent->IsContentOfType(eXUL);
|
||||
PRBool newContentIsXUL = newContent->IsNodeOfType(eXUL);
|
||||
|
||||
// Remove the element from the old parent if one exists
|
||||
nsINode* oldParent = newContent->GetNodeParent();
|
||||
|
@ -3821,7 +3821,7 @@ nsGenericElement::GetContentsAsText(nsAString& aText)
|
|||
for (i = 0; i < children; ++i) {
|
||||
nsIContent *child = GetChildAt(i);
|
||||
|
||||
if (child->IsContentOfType(eTEXT)) {
|
||||
if (child->IsNodeOfType(eTEXT)) {
|
||||
tc = do_QueryInterface(child);
|
||||
|
||||
tc->AppendTextTo(aText);
|
||||
|
|
|
@ -445,7 +445,7 @@ public:
|
|||
virtual const nsVoidArray *GetRangeList() const;
|
||||
virtual void SetFocus(nsPresContext* aContext);
|
||||
virtual nsIContent *GetBindingParent() const;
|
||||
virtual PRBool IsContentOfType(PRUint32 aFlags) const;
|
||||
virtual PRBool IsNodeOfType(PRUint32 aFlags) const;
|
||||
virtual nsresult GetListenerManager(PRBool aCreateIfNotFound,
|
||||
nsIEventListenerManager** aResult);
|
||||
virtual already_AddRefed<nsIURI> GetBaseURI() const;
|
||||
|
|
|
@ -1410,7 +1410,7 @@ nsObjectLoadingContent::ShouldShowDefaultPlugin(nsIContent* aContent)
|
|||
/* static */ PRBool
|
||||
nsObjectLoadingContent::IsUnsupportedPlugin(nsIContent* aContent)
|
||||
{
|
||||
if (!aContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
if (!aContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
|
@ -1425,7 +1425,7 @@ nsObjectLoadingContent::IsUnsupportedPlugin(nsIContent* aContent)
|
|||
nsIContent* child = aContent->GetChildAt(i);
|
||||
NS_ASSERTION(child, "GetChildCount lied!");
|
||||
|
||||
if (child->IsContentOfType(nsIContent::eHTML) &&
|
||||
if (child->IsNodeOfType(nsINode::eHTML) &&
|
||||
child->Tag() == nsHTMLAtoms::param &&
|
||||
child->AttrValueIs(kNameSpaceID_None, nsHTMLAtoms::name,
|
||||
NS_LITERAL_STRING("pluginurl"), eIgnoreCase)) {
|
||||
|
|
|
@ -1809,7 +1809,7 @@ nsPlainTextSerializer::IsCurrentNodeConverted(const nsIParserNode* aNode)
|
|||
PRInt32
|
||||
nsPlainTextSerializer::GetIdForContent(nsIContent* aContent)
|
||||
{
|
||||
if (!aContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
if (!aContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
return eHTMLTag_unknown;
|
||||
}
|
||||
|
||||
|
|
|
@ -274,7 +274,7 @@ nsScriptLoader::InNonScriptingContainer(nsIScriptElement* aScriptElement)
|
|||
// displayed and processed. This might change if we support either
|
||||
// prefs or per-document container settings for not allowing
|
||||
// frames or plugins.
|
||||
if (content->IsContentOfType(nsIContent::eHTML) &&
|
||||
if (content->IsNodeOfType(nsINode::eHTML) &&
|
||||
(localName == nsHTMLAtoms::iframe ||
|
||||
localName == nsHTMLAtoms::noframes ||
|
||||
localName == nsHTMLAtoms::noembed)) {
|
||||
|
|
|
@ -72,7 +72,7 @@ public:
|
|||
NS_FORWARD_NSIDOMTEXT(nsGenericDOMDataNode::)
|
||||
|
||||
// nsIContent
|
||||
virtual PRBool IsContentOfType(PRUint32 aFlags) const;
|
||||
virtual PRBool IsNodeOfType(PRUint32 aFlags) const;
|
||||
#ifdef DEBUG
|
||||
virtual void List(FILE* out, PRInt32 aIndent) const;
|
||||
virtual void DumpContent(FILE* out, PRInt32 aIndent, PRBool aDumpAll) const;
|
||||
|
@ -213,9 +213,9 @@ nsTextNode::GetNodeType(PRUint16* aNodeType)
|
|||
}
|
||||
|
||||
PRBool
|
||||
nsTextNode::IsContentOfType(PRUint32 aFlags) const
|
||||
nsTextNode::IsNodeOfType(PRUint32 aFlags) const
|
||||
{
|
||||
return !(aFlags & ~eTEXT);
|
||||
return !(aFlags & ~(eCONTENT | eTEXT));
|
||||
}
|
||||
|
||||
nsGenericDOMDataNode*
|
||||
|
|
|
@ -981,7 +981,7 @@ nsEventStateManager::HandleAccessKey(nsPresContext* aPresContext,
|
|||
nsCOMPtr<nsIContent> content = dont_AddRef(NS_STATIC_CAST(nsIContent*, mAccessKeys->Get(&key)));
|
||||
|
||||
// if it's a XUL element...
|
||||
if (content->IsContentOfType(nsIContent::eXUL)) {
|
||||
if (content->IsNodeOfType(nsINode::eXUL)) {
|
||||
// find out what type of content node this is
|
||||
if (content->Tag() == nsXULAtoms::label) {
|
||||
// If anything fails, this will be null ...
|
||||
|
@ -1272,7 +1272,7 @@ nsEventStateManager::FireContextClick()
|
|||
nsIAtom *tag = mGestureDownContent->Tag();
|
||||
PRBool allowedToDispatch = PR_TRUE;
|
||||
|
||||
if (mGestureDownContent->IsContentOfType(nsIContent::eXUL)) {
|
||||
if (mGestureDownContent->IsNodeOfType(nsINode::eXUL)) {
|
||||
if (tag == nsXULAtoms::scrollbar ||
|
||||
tag == nsXULAtoms::scrollbarbutton ||
|
||||
tag == nsXULAtoms::button)
|
||||
|
@ -1293,7 +1293,7 @@ nsEventStateManager::FireContextClick()
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (mGestureDownContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
else if (mGestureDownContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
nsCOMPtr<nsIFormControl> formCtrl(do_QueryInterface(mGestureDownContent));
|
||||
|
||||
if (formCtrl) {
|
||||
|
@ -1609,8 +1609,8 @@ nsEventStateManager::DoScrollTextsize(nsIFrame *aTargetFrame,
|
|||
// Exclude form controls and XUL content.
|
||||
nsIContent *content = aTargetFrame->GetContent();
|
||||
if (content &&
|
||||
!content->IsContentOfType(nsIContent::eHTML_FORM_CONTROL) &&
|
||||
!content->IsContentOfType(nsIContent::eXUL))
|
||||
!content->IsNodeOfType(nsINode::eHTML_FORM_CONTROL) &&
|
||||
!content->IsNodeOfType(nsINode::eXUL))
|
||||
{
|
||||
// positive adjustment to increase text size, non-positive to decrease
|
||||
ChangeTextSize((adjustment > 0) ? 1 : -1);
|
||||
|
@ -3047,7 +3047,7 @@ nsEventStateManager::ChangeFocusWith(nsIContent* aFocusContent,
|
|||
// Select text fields when focused via keyboard (tab or accesskey)
|
||||
if (sTextfieldSelectModel == eTextfieldSelect_auto &&
|
||||
mCurrentFocus &&
|
||||
mCurrentFocus->IsContentOfType(nsIContent::eHTML_FORM_CONTROL)) {
|
||||
mCurrentFocus->IsNodeOfType(nsINode::eHTML_FORM_CONTROL)) {
|
||||
nsCOMPtr<nsIFormControl> formControl(do_QueryInterface(mCurrentFocus));
|
||||
PRInt32 controlType = formControl->GetType();
|
||||
if (controlType == NS_FORM_INPUT_TEXT ||
|
||||
|
@ -3478,7 +3478,7 @@ nsEventStateManager::GetNextTabbableContent(nsIContent* aRootContent,
|
|||
mPresContext, aStartFrame);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (!aStartContent || aStartContent->Tag() != nsHTMLAtoms::area ||
|
||||
!aStartContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
!aStartContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
// Need to do special check in case we're in an imagemap which has multiple
|
||||
// content per frame, so don't skip over the starting frame.
|
||||
rv = forward ? frameTraversal->Next() : frameTraversal->Prev();
|
||||
|
@ -4038,7 +4038,7 @@ IsFocusable(nsIPresShell* aPresShell, nsIContent* aContent)
|
|||
// the content is focusable (not disabled).
|
||||
// We don't use nsIFrame::IsFocusable() because it defaults
|
||||
// tabindex to -1 for -moz-user-focus:ignore (bug 305840).
|
||||
if (aContent->IsContentOfType(nsIContent::eXUL)) {
|
||||
if (aContent->IsNodeOfType(nsINode::eXUL)) {
|
||||
// XXX Eventually we should have a better check, but for
|
||||
// now checking for style visibility and focusability caused
|
||||
// too many regressions.
|
||||
|
@ -4584,7 +4584,7 @@ nsEventStateManager::GetDocSelectionLocation(nsIContent **aStartContent,
|
|||
nsIContent *childContent = nsnull;
|
||||
|
||||
startContent = do_QueryInterface(startNode);
|
||||
if (startContent->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
if (startContent->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
NS_ASSERTION(*aStartOffset >= 0, "Start offset cannot be negative");
|
||||
childContent = startContent->GetChildAt(*aStartOffset);
|
||||
if (childContent) {
|
||||
|
@ -4593,7 +4593,7 @@ nsEventStateManager::GetDocSelectionLocation(nsIContent **aStartContent,
|
|||
}
|
||||
|
||||
endContent = do_QueryInterface(endNode);
|
||||
if (endContent->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
if (endContent->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
PRInt32 endOffset = 0;
|
||||
domRange->GetEndOffset(&endOffset);
|
||||
NS_ASSERTION(endOffset >= 0, "End offset cannot be negative");
|
||||
|
@ -4636,7 +4636,7 @@ nsEventStateManager::GetDocSelectionLocation(nsIContent **aStartContent,
|
|||
domNode->GetNodeValue(nodeValue);
|
||||
|
||||
PRBool isFormControl =
|
||||
startContent->IsContentOfType(nsIContent::eHTML_FORM_CONTROL);
|
||||
startContent->IsNodeOfType(nsINode::eHTML_FORM_CONTROL);
|
||||
|
||||
if (nodeValue.Length() == *aStartOffset && !isFormControl &&
|
||||
startContent != mDocument->GetRootContent()) {
|
||||
|
@ -4792,7 +4792,7 @@ nsEventStateManager::MoveFocusToCaret(PRBool aCanFocusDoc,
|
|||
|
||||
// Add better focusable test here later if necessary ...
|
||||
if (tag == nsHTMLAtoms::a &&
|
||||
testContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
testContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
*aIsSelectionWithFocus = PR_TRUE;
|
||||
}
|
||||
else {
|
||||
|
@ -4835,7 +4835,7 @@ nsEventStateManager::MoveFocusToCaret(PRBool aCanFocusDoc,
|
|||
// Add better focusable test here later if necessary ...
|
||||
if (testContent) {
|
||||
if (testContent->Tag() == nsHTMLAtoms::a &&
|
||||
testContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
testContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
*aIsSelectionWithFocus = PR_TRUE;
|
||||
FocusElementButNotDocument(testContent);
|
||||
return NS_OK;
|
||||
|
@ -4931,7 +4931,7 @@ nsEventStateManager::MoveCaretToFocus()
|
|||
nsCOMPtr<nsIDOMNode> firstChild;
|
||||
currentFocusNode->GetFirstChild(getter_AddRefs(firstChild));
|
||||
if (!firstChild ||
|
||||
mCurrentFocus->IsContentOfType(nsIContent::eHTML_FORM_CONTROL)) {
|
||||
mCurrentFocus->IsNodeOfType(nsINode::eHTML_FORM_CONTROL)) {
|
||||
// If current focus node is a leaf, set range to before the
|
||||
// node by using the parent as a container.
|
||||
// This prevents it from appearing as selected.
|
||||
|
@ -5095,7 +5095,7 @@ nsEventStateManager::IsFrameSetDoc(nsIDocShell* aDocShell)
|
|||
|
||||
nsINodeInfo *ni = childContent->NodeInfo();
|
||||
|
||||
if (childContent->IsContentOfType(nsIContent::eHTML) &&
|
||||
if (childContent->IsNodeOfType(nsINode::eHTML) &&
|
||||
ni->Equals(nsHTMLAtoms::frameset)) {
|
||||
isFrameSet = PR_TRUE;
|
||||
break;
|
||||
|
|
|
@ -418,7 +418,7 @@ nsXMLEventsManager::ContentRemoved(nsIDocument* aDocument,
|
|||
nsIContent* aChild,
|
||||
PRInt32 aIndexInContainer)
|
||||
{
|
||||
if (!aChild || !aChild->IsContentOfType(nsIContent::eELEMENT))
|
||||
if (!aChild || !aChild->IsNodeOfType(nsINode::eELEMENT))
|
||||
return;
|
||||
//Note, we can't use IDs here, the observer may not always have an ID.
|
||||
//And to remember: the same observer can be referenced by many
|
||||
|
|
|
@ -572,7 +572,7 @@ static PRBool
|
|||
IsBody(nsIContent *aContent)
|
||||
{
|
||||
return (aContent->NodeInfo()->Equals(nsHTMLAtoms::body) &&
|
||||
aContent->IsContentOfType(nsIContent::eHTML));
|
||||
aContent->IsNodeOfType(nsINode::eHTML));
|
||||
}
|
||||
|
||||
static PRBool
|
||||
|
@ -583,7 +583,7 @@ IsOffsetParent(nsIContent *aContent)
|
|||
return ((ni->Equals(nsHTMLAtoms::td) ||
|
||||
ni->Equals(nsHTMLAtoms::table) ||
|
||||
ni->Equals(nsHTMLAtoms::th)) &&
|
||||
aContent->IsContentOfType(nsIContent::eHTML));
|
||||
aContent->IsNodeOfType(nsINode::eHTML));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1347,7 +1347,7 @@ nsGenericHTMLElement::FindForm(nsIForm* aCurrentForm)
|
|||
while (content) {
|
||||
// If the current ancestor is a form, return it as our form
|
||||
if (content->Tag() == nsHTMLAtoms::form &&
|
||||
content->IsContentOfType(nsIContent::eHTML)) {
|
||||
content->IsNodeOfType(nsINode::eHTML)) {
|
||||
nsIDOMHTMLFormElement* form;
|
||||
CallQueryInterface(content, &form);
|
||||
|
||||
|
@ -1400,7 +1400,7 @@ static PRBool
|
|||
IsArea(nsIContent *aContent)
|
||||
{
|
||||
return (aContent->Tag() == nsHTMLAtoms::area &&
|
||||
aContent->IsContentOfType(nsIContent::eHTML));
|
||||
aContent->IsNodeOfType(nsINode::eHTML));
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -1922,9 +1922,9 @@ nsGenericHTMLElement::DumpContent(FILE* out, PRInt32 aIndent,
|
|||
|
||||
|
||||
PRBool
|
||||
nsGenericHTMLElement::IsContentOfType(PRUint32 aFlags) const
|
||||
nsGenericHTMLElement::IsNodeOfType(PRUint32 aFlags) const
|
||||
{
|
||||
return !(aFlags & ~(eELEMENT | eHTML));
|
||||
return !(aFlags & ~(eCONTENT | eELEMENT | eHTML));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -2956,9 +2956,9 @@ NS_INTERFACE_MAP_END_INHERITING(nsGenericHTMLElement)
|
|||
|
||||
|
||||
PRBool
|
||||
nsGenericHTMLFormElement::IsContentOfType(PRUint32 aFlags) const
|
||||
nsGenericHTMLFormElement::IsNodeOfType(PRUint32 aFlags) const
|
||||
{
|
||||
return !(aFlags & ~(eELEMENT | eHTML | eHTML_FORM_CONTROL));
|
||||
return !(aFlags & ~(eCONTENT | eELEMENT | eHTML | eHTML_FORM_CONTROL));
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -3498,7 +3498,7 @@ nsGenericHTMLElement::RemoveFocus(nsPresContext *aPresContext)
|
|||
if (!aPresContext)
|
||||
return;
|
||||
|
||||
if (IsContentOfType(eHTML_FORM_CONTROL)) {
|
||||
if (IsNodeOfType(eHTML_FORM_CONTROL)) {
|
||||
nsIFormControlFrame* formControlFrame = GetFormControlFrame(PR_FALSE);
|
||||
if (formControlFrame) {
|
||||
formControlFrame->SetFocus(PR_FALSE, PR_FALSE);
|
||||
|
|
|
@ -85,7 +85,7 @@ public:
|
|||
/** Typesafe, non-refcounting cast from nsIContent. Cheaper than QI. **/
|
||||
static nsGenericHTMLElement* FromContent(nsIContent *aContent)
|
||||
{
|
||||
if (aContent->IsContentOfType(eHTML))
|
||||
if (aContent->IsNodeOfType(eHTML))
|
||||
return NS_STATIC_CAST(nsGenericHTMLElement*, aContent);
|
||||
return nsnull;
|
||||
}
|
||||
|
@ -191,7 +191,7 @@ public:
|
|||
virtual void List(FILE* out, PRInt32 aIndent) const;
|
||||
virtual void DumpContent(FILE* out, PRInt32 aIndent,PRBool aDumpAll) const;
|
||||
#endif
|
||||
virtual PRBool IsContentOfType(PRUint32 aFlags) const;
|
||||
virtual PRBool IsNodeOfType(PRUint32 aFlags) const;
|
||||
virtual void RemoveFocus(nsPresContext *aPresContext);
|
||||
virtual PRBool IsFocusable(PRInt32 *aTabIndex = nsnull);
|
||||
|
||||
|
@ -794,7 +794,7 @@ public:
|
|||
|
||||
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
|
||||
|
||||
virtual PRBool IsContentOfType(PRUint32 aFlags) const;
|
||||
virtual PRBool IsNodeOfType(PRUint32 aFlags) const;
|
||||
|
||||
// nsIFormControl
|
||||
NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm);
|
||||
|
|
|
@ -318,7 +318,7 @@ nsHTMLLabelElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
|
|||
|
||||
inline PRBool IsNonLabelFormControl(nsIContent *aContent)
|
||||
{
|
||||
return aContent->IsContentOfType(nsIContent::eHTML_FORM_CONTROL) &&
|
||||
return aContent->IsNodeOfType(nsINode::eHTML_FORM_CONTROL) &&
|
||||
aContent->Tag() != nsHTMLAtoms::label;
|
||||
}
|
||||
|
||||
|
|
|
@ -735,7 +735,7 @@ nsHTMLSelectElement::RemoveOptionsFromList(nsIContent* aOptions,
|
|||
static PRBool IsOptGroup(nsIContent *aContent)
|
||||
{
|
||||
return (aContent->NodeInfo()->Equals(nsHTMLAtoms::optgroup) &&
|
||||
aContent->IsContentOfType(nsIContent::eHTML));
|
||||
aContent->IsNodeOfType(nsINode::eHTML));
|
||||
}
|
||||
|
||||
// If the document is such that recursing over these options gets us
|
||||
|
|
|
@ -135,7 +135,7 @@ nsHTMLTableCellElement::GetTable()
|
|||
if (parent) { // GetParent() should be a row
|
||||
nsIContent* section = parent->GetParent();
|
||||
if (section) {
|
||||
if (section->IsContentOfType(eHTML) &&
|
||||
if (section->IsNodeOfType(eHTML) &&
|
||||
section->NodeInfo()->Equals(nsHTMLAtoms::table)) {
|
||||
// XHTML, without a row group
|
||||
result = section;
|
||||
|
|
|
@ -263,7 +263,7 @@ IsCell(nsIContent *aContent, PRInt32 aNamespaceID,
|
|||
nsIAtom* tag = aContent->Tag();
|
||||
|
||||
return ((tag == nsHTMLAtoms::td || tag == nsHTMLAtoms::th) &&
|
||||
aContent->IsContentOfType(nsIContent::eHTML));
|
||||
aContent->IsNodeOfType(nsINode::eHTML));
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -3217,7 +3217,7 @@ nsHTMLDocument::RemoveFromIdTable(nsIContent *aContent)
|
|||
nsresult
|
||||
nsHTMLDocument::UnregisterNamedItems(nsIContent *aContent)
|
||||
{
|
||||
if (aContent->IsContentOfType(nsIContent::eTEXT)) {
|
||||
if (aContent->IsNodeOfType(nsINode::eTEXT)) {
|
||||
// Text nodes are not named items nor can they have children.
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -3253,7 +3253,7 @@ nsHTMLDocument::UnregisterNamedItems(nsIContent *aContent)
|
|||
nsresult
|
||||
nsHTMLDocument::RegisterNamedItems(nsIContent *aContent)
|
||||
{
|
||||
if (aContent->IsContentOfType(nsIContent::eTEXT)) {
|
||||
if (aContent->IsNodeOfType(nsINode::eTEXT)) {
|
||||
// Text nodes are not named items nor can they have children.
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -3292,7 +3292,7 @@ FindNamedItems(nsIAtom* aName, nsIContent *aContent,
|
|||
NS_ASSERTION(aEntry.mNameContentList != NAME_NOT_VALID,
|
||||
"Entry that should never have a list passed to FindNamedItems()!");
|
||||
|
||||
if (aContent->IsContentOfType(nsIContent::eTEXT)) {
|
||||
if (aContent->IsNodeOfType(nsINode::eTEXT)) {
|
||||
// Text nodes are not named items nor can they have children.
|
||||
return;
|
||||
}
|
||||
|
@ -3462,7 +3462,7 @@ nsHTMLDocument::ResolveName(const nsAString& aName,
|
|||
|
||||
nsIContent *e = entry->GetIdContent();
|
||||
|
||||
if (e && e != ID_NOT_IN_DOCUMENT && e->IsContentOfType(nsIContent::eHTML)) {
|
||||
if (e && e != ID_NOT_IN_DOCUMENT && e->IsNodeOfType(nsINode::eHTML)) {
|
||||
nsIAtom *tag = e->Tag();
|
||||
|
||||
if ((tag == nsHTMLAtoms::embed ||
|
||||
|
@ -3493,7 +3493,7 @@ nsHTMLDocument::GetBodyContent()
|
|||
NS_ENSURE_TRUE(child, NS_ERROR_UNEXPECTED);
|
||||
|
||||
if (child->NodeInfo()->Equals(nsHTMLAtoms::body, mDefaultNamespaceID) &&
|
||||
child->IsContentOfType(nsIContent::eHTML)) {
|
||||
child->IsNodeOfType(nsINode::eHTML)) {
|
||||
mBodyContent = do_QueryInterface(child);
|
||||
|
||||
return PR_TRUE;
|
||||
|
|
|
@ -297,9 +297,9 @@ nsSVGElement::UnsetAttr(PRInt32 aNamespaceID, nsIAtom* aName,
|
|||
}
|
||||
|
||||
PRBool
|
||||
nsSVGElement::IsContentOfType(PRUint32 aFlags) const
|
||||
nsSVGElement::IsNodeOfType(PRUint32 aFlags) const
|
||||
{
|
||||
return !(aFlags & ~(eELEMENT | eSVG));
|
||||
return !(aFlags & ~(eCONTENT | eELEMENT | eSVG));
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -83,7 +83,7 @@ public:
|
|||
virtual nsresult UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
|
||||
PRBool aNotify);
|
||||
|
||||
virtual PRBool IsContentOfType(PRUint32 aFlags) const;
|
||||
virtual PRBool IsNodeOfType(PRUint32 aFlags) const;
|
||||
|
||||
NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker);
|
||||
NS_IMETHOD SetInlineStyleRule(nsICSSStyleRule* aStyleRule, PRBool aNotify);
|
||||
|
|
|
@ -888,7 +888,7 @@ nsresult
|
|||
nsXBLContentSink::AddAttributes(const PRUnichar** aAtts,
|
||||
nsIContent* aContent)
|
||||
{
|
||||
if (aContent->IsContentOfType(nsIContent::eXUL))
|
||||
if (aContent->IsNodeOfType(nsINode::eXUL))
|
||||
return NS_OK; // Nothing to do, since the proto already has the attrs.
|
||||
|
||||
return nsXMLContentSink::AddAttributes(aAtts, aContent);
|
||||
|
|
|
@ -323,7 +323,7 @@ nsXBLPrototypeHandler::ExecuteHandler(nsIDOMEventReceiver* aReceiver,
|
|||
if (focusedContent) {
|
||||
while (content) {
|
||||
if (content->Tag() == nsHTMLAtoms::a &&
|
||||
content->IsContentOfType(nsIContent::eHTML)) {
|
||||
content->IsNodeOfType(nsINode::eHTML)) {
|
||||
isLink = PR_TRUE;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1061,7 +1061,7 @@ nsXBLService::LoadBindingDocumentInfo(nsIContent* aBoundElement,
|
|||
ni->Equals(nsXULAtoms::thumb, kNameSpaceID_XUL) ||
|
||||
((ni->Equals(nsHTMLAtoms::input) ||
|
||||
ni->Equals(nsHTMLAtoms::select)) &&
|
||||
aBoundElement->IsContentOfType(nsIContent::eHTML)))) &&
|
||||
aBoundElement->IsNodeOfType(nsINode::eHTML)))) &&
|
||||
!aForceSyncLoad) {
|
||||
// The third line of defense is to investigate whether or not the
|
||||
// document is currently being loaded asynchronously. If so, there's no
|
||||
|
|
|
@ -65,7 +65,7 @@ public:
|
|||
// Empty interface
|
||||
|
||||
// nsIContent
|
||||
virtual PRBool IsContentOfType(PRUint32 aFlags) const;
|
||||
virtual PRBool IsNodeOfType(PRUint32 aFlags) const;
|
||||
#ifdef DEBUG
|
||||
virtual void List(FILE* out, PRInt32 aIndent) const;
|
||||
virtual void DumpContent(FILE* out, PRInt32 aIndent,PRBool aDumpAll) const;
|
||||
|
@ -121,9 +121,9 @@ NS_IMPL_RELEASE_INHERITED(nsXMLCDATASection, nsGenericDOMDataNode)
|
|||
|
||||
|
||||
PRBool
|
||||
nsXMLCDATASection::IsContentOfType(PRUint32 aFlags) const
|
||||
nsXMLCDATASection::IsNodeOfType(PRUint32 aFlags) const
|
||||
{
|
||||
return !(aFlags & ~eTEXT);
|
||||
return !(aFlags & ~(eCONTENT | eTEXT));
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -131,9 +131,9 @@ nsXMLProcessingInstruction::GetAttrValue(nsIAtom *aName, nsAString& aValue)
|
|||
}
|
||||
|
||||
PRBool
|
||||
nsXMLProcessingInstruction::IsContentOfType(PRUint32 aFlags) const
|
||||
nsXMLProcessingInstruction::IsNodeOfType(PRUint32 aFlags) const
|
||||
{
|
||||
return !(aFlags & ~ePROCESSING_INSTRUCTION);
|
||||
return !(aFlags & ~(eCONTENT | ePROCESSING_INSTRUCTION));
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
|
|
@ -64,7 +64,7 @@ public:
|
|||
NS_DECL_NSIDOMPROCESSINGINSTRUCTION
|
||||
|
||||
// nsIContent
|
||||
virtual PRBool IsContentOfType(PRUint32 aFlags) const;
|
||||
virtual PRBool IsNodeOfType(PRUint32 aFlags) const;
|
||||
virtual PRBool MayHaveFrame() const;
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
|
@ -379,14 +379,14 @@ txXPathNodeUtils::getLocalName(const txXPathNode& aNode)
|
|||
}
|
||||
|
||||
if (aNode.isContent()) {
|
||||
if (aNode.mContent->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
if (aNode.mContent->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
nsIAtom* localName = aNode.mContent->Tag();
|
||||
NS_ADDREF(localName);
|
||||
|
||||
return localName;
|
||||
}
|
||||
|
||||
if (aNode.mContent->IsContentOfType(nsIContent::ePROCESSING_INSTRUCTION)) {
|
||||
if (aNode.mContent->IsNodeOfType(nsINode::ePROCESSING_INSTRUCTION)) {
|
||||
nsCOMPtr<nsIDOMNode> node = do_QueryInterface(aNode.mContent);
|
||||
nsAutoString target;
|
||||
node->GetNodeName(target);
|
||||
|
@ -414,20 +414,20 @@ txXPathNodeUtils::getLocalName(const txXPathNode& aNode, nsAString& aLocalName)
|
|||
}
|
||||
|
||||
if (aNode.isContent()) {
|
||||
if (aNode.mContent->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
if (aNode.mContent->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
nsINodeInfo* nodeInfo = aNode.mContent->NodeInfo();
|
||||
nodeInfo->GetLocalName(aLocalName);
|
||||
|
||||
// Check for html
|
||||
if (nodeInfo->NamespaceEquals(kNameSpaceID_None) &&
|
||||
aNode.mContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
aNode.mContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
ToUpperCase(aLocalName);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (aNode.mContent->IsContentOfType(nsIContent::ePROCESSING_INSTRUCTION)) {
|
||||
if (aNode.mContent->IsNodeOfType(nsINode::ePROCESSING_INSTRUCTION)) {
|
||||
// PIs don't have a nodeinfo but do have a name
|
||||
nsCOMPtr<nsIDOMNode> node = do_QueryInterface(aNode.mContent);
|
||||
node->GetNodeName(aLocalName);
|
||||
|
@ -445,7 +445,7 @@ txXPathNodeUtils::getLocalName(const txXPathNode& aNode, nsAString& aLocalName)
|
|||
|
||||
// Check for html
|
||||
if (aNode.mContent->NodeInfo()->NamespaceEquals(kNameSpaceID_None) &&
|
||||
aNode.mContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
aNode.mContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
ToUpperCase(aLocalName);
|
||||
}
|
||||
}
|
||||
|
@ -461,20 +461,20 @@ txXPathNodeUtils::getNodeName(const txXPathNode& aNode, nsAString& aName)
|
|||
}
|
||||
|
||||
if (aNode.isContent()) {
|
||||
if (aNode.mContent->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
if (aNode.mContent->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
nsINodeInfo* nodeInfo = aNode.mContent->NodeInfo();
|
||||
nodeInfo->GetQualifiedName(aName);
|
||||
|
||||
// Check for html
|
||||
if (nodeInfo->NamespaceEquals(kNameSpaceID_None) &&
|
||||
aNode.mContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
aNode.mContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
ToUpperCase(aName);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (aNode.mContent->IsContentOfType(nsIContent::ePROCESSING_INSTRUCTION)) {
|
||||
if (aNode.mContent->IsNodeOfType(nsINode::ePROCESSING_INSTRUCTION)) {
|
||||
// PIs don't have a nodeinfo but do have a name
|
||||
nsCOMPtr<nsIDOMNode> node = do_QueryInterface(aNode.mContent);
|
||||
node->GetNodeName(aName);
|
||||
|
@ -491,7 +491,7 @@ txXPathNodeUtils::getNodeName(const txXPathNode& aNode, nsAString& aName)
|
|||
|
||||
// Check for html
|
||||
if (aNode.mContent->NodeInfo()->NamespaceEquals(kNameSpaceID_None) &&
|
||||
aNode.mContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
aNode.mContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
ToUpperCase(aName);
|
||||
}
|
||||
}
|
||||
|
@ -542,10 +542,10 @@ static void appendTextContent(nsIContent* aElement, nsAString& aResult)
|
|||
nsIContent* content = aElement->GetChildAt(0);
|
||||
PRUint32 i = 0;
|
||||
while (content) {
|
||||
if (content->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
if (content->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
appendTextContent(content, aResult);
|
||||
}
|
||||
else if (content->IsContentOfType(nsIContent::eTEXT)) {
|
||||
else if (content->IsNodeOfType(nsINode::eTEXT)) {
|
||||
nsCOMPtr<nsITextContent> textContent = do_QueryInterface(content);
|
||||
textContent->AppendTextTo(aResult);
|
||||
}
|
||||
|
@ -576,13 +576,13 @@ txXPathNodeUtils::appendNodeValue(const txXPathNode& aNode, nsAString& aResult)
|
|||
return;
|
||||
}
|
||||
|
||||
if (aNode.mContent->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
if (aNode.mContent->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
appendTextContent(aNode.mContent, aResult);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (aNode.mContent->IsContentOfType(nsIContent::ePROCESSING_INSTRUCTION)) {
|
||||
if (aNode.mContent->IsNodeOfType(nsINode::ePROCESSING_INSTRUCTION)) {
|
||||
nsCOMPtr<nsIDOMNode> node = do_QueryInterface(aNode.mContent);
|
||||
|
||||
nsAutoString result;
|
||||
|
|
|
@ -265,7 +265,7 @@ txXPathNodeUtils::localNameEquals(const txXPathNode& aNode,
|
|||
return localName == aLocalName;
|
||||
#else
|
||||
if (aNode.isContent() &&
|
||||
aNode.mContent->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
aNode.mContent->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
return aNode.mContent->NodeInfo()->Equals(aLocalName);
|
||||
}
|
||||
|
||||
|
@ -294,7 +294,7 @@ txXPathNodeUtils::isElement(const txXPathNode& aNode)
|
|||
return aNode.mInner->getNodeType() == Node::ELEMENT_NODE;
|
||||
#else
|
||||
return aNode.isContent() &&
|
||||
aNode.mContent->IsContentOfType(nsIContent::eELEMENT);
|
||||
aNode.mContent->IsNodeOfType(nsINode::eELEMENT);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -318,7 +318,7 @@ txXPathNodeUtils::isProcessingInstruction(const txXPathNode& aNode)
|
|||
return aNode.mInner->getNodeType() == Node::PROCESSING_INSTRUCTION_NODE;
|
||||
#else
|
||||
return aNode.isContent() &&
|
||||
aNode.mContent->IsContentOfType(nsIContent::ePROCESSING_INSTRUCTION);
|
||||
aNode.mContent->IsNodeOfType(nsINode::ePROCESSING_INSTRUCTION);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -330,7 +330,7 @@ txXPathNodeUtils::isComment(const txXPathNode& aNode)
|
|||
return aNode.mInner->getNodeType() == Node::COMMENT_NODE;
|
||||
#else
|
||||
return aNode.isContent() &&
|
||||
aNode.mContent->IsContentOfType(nsIContent::eCOMMENT);
|
||||
aNode.mContent->IsNodeOfType(nsINode::eCOMMENT);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -342,7 +342,7 @@ txXPathNodeUtils::isText(const txXPathNode& aNode)
|
|||
return aNode.mInner->getNodeType() == Node::TEXT_NODE;
|
||||
#else
|
||||
return aNode.isContent() &&
|
||||
aNode.mContent->IsContentOfType(nsIContent::eTEXT);
|
||||
aNode.mContent->IsNodeOfType(nsINode::eTEXT);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -763,7 +763,7 @@ nsXULElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
|
|||
// NS_PRECONDITION(!aParent || aDocument == aParent->GetCurrentDoc(),
|
||||
// "aDocument must be current doc of aParent");
|
||||
NS_PRECONDITION(!aParent ||
|
||||
(aParent->IsContentOfType(eXUL) && aDocument == nsnull) ||
|
||||
(aParent->IsNodeOfType(eXUL) && aDocument == nsnull) ||
|
||||
aDocument == aParent->GetCurrentDoc(),
|
||||
"aDocument must be current doc of aParent");
|
||||
// XXXbz we'd like to assert that GetCurrentDoc() is null, but the cloning
|
||||
|
@ -1693,7 +1693,7 @@ nsXULElement::PreHandleEvent(nsEventChainPreVisitor& aVisitor)
|
|||
domDoc->GetElementById(command, getter_AddRefs(commandElt));
|
||||
nsCOMPtr<nsIContent> commandContent(do_QueryInterface(commandElt));
|
||||
if (commandContent &&
|
||||
commandContent->IsContentOfType(nsIContent::eXUL) &&
|
||||
commandContent->IsNodeOfType(nsINode::eXUL) &&
|
||||
commandContent->Tag() == nsXULAtoms::command) {
|
||||
// Reusing the event here, but DISPATCH_DONE/STARTED hack
|
||||
// is needed.
|
||||
|
@ -2245,9 +2245,9 @@ nsXULElement::GetBindingParent() const
|
|||
}
|
||||
|
||||
PRBool
|
||||
nsXULElement::IsContentOfType(PRUint32 aFlags) const
|
||||
nsXULElement::IsNodeOfType(PRUint32 aFlags) const
|
||||
{
|
||||
return !(aFlags & ~(eELEMENT | eXUL));
|
||||
return !(aFlags & ~(eCONTENT | eELEMENT | eXUL));
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
|
|
@ -432,7 +432,7 @@ public:
|
|||
/** Typesafe, non-refcounting cast from nsIContent. Cheaper than QI. **/
|
||||
static nsXULElement* FromContent(nsIContent *aContent)
|
||||
{
|
||||
if (aContent->IsContentOfType(eXUL))
|
||||
if (aContent->IsNodeOfType(eXUL))
|
||||
return NS_STATIC_CAST(nsXULElement*, aContent);
|
||||
return nsnull;
|
||||
}
|
||||
|
@ -514,7 +514,7 @@ public:
|
|||
virtual void RemoveFocus(nsPresContext* aPresContext);
|
||||
|
||||
virtual nsIContent *GetBindingParent() const;
|
||||
virtual PRBool IsContentOfType(PRUint32 aFlags) const;
|
||||
virtual PRBool IsNodeOfType(PRUint32 aFlags) const;
|
||||
virtual nsresult GetListenerManager(PRBool aCreateIfNotFound,
|
||||
nsIEventListenerManager** aResult);
|
||||
virtual PRBool IsFocusable(PRInt32 *aTabIndex = nsnull);
|
||||
|
|
|
@ -1712,7 +1712,7 @@ NS_IMETHODIMP
|
|||
nsXULDocument::AddSubtreeToDocument(nsIContent* aElement)
|
||||
{
|
||||
// From here on we only care about elements.
|
||||
if (!aElement->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
if (!aElement->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -1740,7 +1740,7 @@ NS_IMETHODIMP
|
|||
nsXULDocument::RemoveSubtreeFromDocument(nsIContent* aElement)
|
||||
{
|
||||
// From here on we only care about elements.
|
||||
if (!aElement->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
if (!aElement->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -3868,7 +3868,7 @@ nsXULDocument::FindBroadcaster(nsIContent* aElement,
|
|||
nsString& aAttribute,
|
||||
nsIDOMElement** aBroadcaster)
|
||||
{
|
||||
NS_ASSERTION(aElement->IsContentOfType(nsIContent::eELEMENT),
|
||||
NS_ASSERTION(aElement->IsNodeOfType(nsINode::eELEMENT),
|
||||
"Only pass elements into FindBroadcaster!");
|
||||
|
||||
nsresult rv;
|
||||
|
|
|
@ -766,7 +766,7 @@ nsXULContentBuilder::BuildContentFromTemplate(nsIContent *aTemplateNode,
|
|||
// first element we've generated?
|
||||
}
|
||||
}
|
||||
else if (tmplKid->IsContentOfType(nsIContent::eTEXT)) {
|
||||
else if (tmplKid->IsNodeOfType(nsINode::eTEXT)) {
|
||||
nsCOMPtr<nsIDOMNode> tmplTextNode = do_QueryInterface(tmplKid);
|
||||
if (!tmplTextNode) {
|
||||
NS_ERROR("textnode not implementing nsIDOMNode??");
|
||||
|
@ -1491,7 +1491,7 @@ nsXULContentBuilder::IsOpen(nsIContent* aElement)
|
|||
|
||||
// Treat the 'root' element as always open, -unless- it's a
|
||||
// menu/menupopup. We don't need to "fake" these as being open.
|
||||
if ((aElement == mRoot) && aElement->IsContentOfType(nsIContent::eXUL) &&
|
||||
if ((aElement == mRoot) && aElement->IsNodeOfType(nsINode::eXUL) &&
|
||||
(tag != nsXULAtoms::menu) &&
|
||||
(tag != nsXULAtoms::menubutton) &&
|
||||
(tag != nsXULAtoms::toolbarbutton) &&
|
||||
|
@ -1530,7 +1530,7 @@ nsXULContentBuilder::RemoveGeneratedContent(nsIContent* aElement)
|
|||
// it should be moved outside the inner loop. Bug 297290.
|
||||
if (element->NodeInfo()->Equals(nsXULAtoms::_template,
|
||||
kNameSpaceID_XUL) ||
|
||||
!element->IsContentOfType(nsIContent::eELEMENT))
|
||||
!element->IsNodeOfType(nsINode::eELEMENT))
|
||||
continue;
|
||||
|
||||
// If the element is in the template map, then we
|
||||
|
@ -1565,7 +1565,7 @@ nsXULContentBuilder::IsLazyWidgetItem(nsIContent* aElement)
|
|||
{
|
||||
// Determine if this is a <tree>, <treeitem>, or <menu> element
|
||||
|
||||
if (!aElement->IsContentOfType(nsIContent::eXUL)) {
|
||||
if (!aElement->IsNodeOfType(nsINode::eXUL)) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -275,7 +275,7 @@ XULSortServiceImpl::FindSortableContainer(nsIContent *aRoot,
|
|||
|
||||
nsIAtom *tag = aRoot->Tag();
|
||||
|
||||
if (aRoot->IsContentOfType(nsIContent::eXUL)) {
|
||||
if (aRoot->IsNodeOfType(nsINode::eXUL)) {
|
||||
if (tag == nsXULAtoms::_template) // ignore content within templates
|
||||
return NS_OK;
|
||||
|
||||
|
@ -294,7 +294,7 @@ XULSortServiceImpl::FindSortableContainer(nsIContent *aRoot,
|
|||
for (PRUint32 childIndex = 0; childIndex < numChildren; childIndex++) {
|
||||
nsIContent *child = aRoot->GetChildAt(childIndex);
|
||||
|
||||
if (child->IsContentOfType(nsIContent::eXUL)) {
|
||||
if (child->IsNodeOfType(nsINode::eXUL)) {
|
||||
rv = FindSortableContainer(child, aContainer);
|
||||
if (*aContainer)
|
||||
return rv;
|
||||
|
@ -349,7 +349,7 @@ XULSortServiceImpl::SetSortColumnHints(nsIContent *content,
|
|||
for (PRUint32 childIndex = 0; childIndex < numChildren; ++childIndex) {
|
||||
nsIContent *child = content->GetChildAt(childIndex);
|
||||
|
||||
if (child->IsContentOfType(nsIContent::eXUL)) {
|
||||
if (child->IsNodeOfType(nsINode::eXUL)) {
|
||||
nsIAtom *tag = child->Tag();
|
||||
|
||||
if (tag == nsXULAtoms::treecols ||
|
||||
|
@ -1089,7 +1089,7 @@ XULSortServiceImpl::SortContainer(nsIContent *container, sortPtr sortInfo,
|
|||
--childIndex;
|
||||
nsIContent *child = container->GetChildAt(childIndex);
|
||||
|
||||
if (child->IsContentOfType(nsIContent::eXUL)) {
|
||||
if (child->IsNodeOfType(nsINode::eXUL)) {
|
||||
nsIAtom *tag = child->Tag();
|
||||
|
||||
if (tag == nsXULAtoms::listitem ||
|
||||
|
@ -1153,7 +1153,7 @@ XULSortServiceImpl::SortContainer(nsIContent *container, sortPtr sortInfo,
|
|||
--childIndex;
|
||||
nsIContent *child = container->GetChildAt(childIndex);
|
||||
|
||||
if (child->IsContentOfType(nsIContent::eXUL)) {
|
||||
if (child->IsNodeOfType(nsINode::eXUL)) {
|
||||
nsIAtom *tag = child->Tag();
|
||||
|
||||
if (tag == nsXULAtoms::listitem ||
|
||||
|
|
|
@ -191,7 +191,7 @@ ForEachPing(nsIContent *content, ForEachPingCallback callback, void *closure)
|
|||
|
||||
// Make sure we are dealing with either an <A> or <AREA> element in the HTML
|
||||
// or XHTML namespace.
|
||||
if (!content->IsContentOfType(nsIContent::eHTML))
|
||||
if (!content->IsNodeOfType(nsINode::eHTML))
|
||||
return;
|
||||
nsIAtom *nameAtom = content->Tag();
|
||||
if (!nameAtom->EqualsUTF8(NS_LITERAL_CSTRING("a")) &&
|
||||
|
|
|
@ -6445,7 +6445,7 @@ nsNodeSH::PreCreate(nsISupports *nativeObj, JSContext *cx, JSObject *globalObj,
|
|||
nsISupports *native_parent;
|
||||
|
||||
if (content) {
|
||||
if (content->IsContentOfType(nsIContent::eXUL)) {
|
||||
if (content->IsNodeOfType(nsINode::eXUL)) {
|
||||
// For XUL elements, use the parent, if any.
|
||||
native_parent = content->GetParent();
|
||||
|
||||
|
@ -6457,7 +6457,7 @@ nsNodeSH::PreCreate(nsISupports *nativeObj, JSContext *cx, JSObject *globalObj,
|
|||
native_parent = doc;
|
||||
|
||||
// But for HTML form controls, use the form as scope parent.
|
||||
if (content->IsContentOfType(nsIContent::eELEMENT |
|
||||
if (content->IsNodeOfType(nsINode::eELEMENT |
|
||||
nsIContent::eHTML |
|
||||
nsIContent::eHTML_FORM_CONTROL)) {
|
||||
nsCOMPtr<nsIFormControl> form_control(do_QueryInterface(content));
|
||||
|
|
|
@ -1141,7 +1141,7 @@ nsHTMLEditor::GetInlinePropertyBase(nsIAtom *aProperty,
|
|||
skipNode = PR_TRUE;
|
||||
}
|
||||
}
|
||||
else if (content->IsContentOfType(nsIContent::eELEMENT))
|
||||
else if (content->IsNodeOfType(nsINode::eELEMENT))
|
||||
{ // handle non-text leaf nodes here
|
||||
skipNode = PR_TRUE;
|
||||
}
|
||||
|
|
|
@ -1696,7 +1696,7 @@ ChromeContextMenuListener::ContextMenu(nsIDOMEvent* aMouseEvent)
|
|||
do {
|
||||
// XXX test for selected text
|
||||
content = do_QueryInterface(node);
|
||||
if (content && content->IsContentOfType(nsIContent::eHTML)) {
|
||||
if (content && content->IsNodeOfType(nsINode::eHTML)) {
|
||||
const char *tagStr;
|
||||
content->Tag()->GetUTF8String(&tagStr);
|
||||
|
||||
|
|
|
@ -319,7 +319,7 @@ nsFindContentIterator::MaybeSetupInnerIterator()
|
|||
mInnerIterator = nsnull;
|
||||
|
||||
nsIContent* content = mOuterIterator->GetCurrentNode();
|
||||
if (!content || !content->IsContentOfType(nsIContent::eHTML_FORM_CONTROL))
|
||||
if (!content || !content->IsNodeOfType(nsINode::eHTML_FORM_CONTROL))
|
||||
return;
|
||||
|
||||
nsCOMPtr<nsIFormControl> formControl(do_QueryInterface(content));
|
||||
|
@ -783,7 +783,7 @@ nsFind::NextNode(nsIDOMRange* aSearchRange,
|
|||
|
||||
PRBool nsFind::IsBlockNode(nsIContent* aContent)
|
||||
{
|
||||
if (!aContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
if (!aContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
|
@ -812,7 +812,7 @@ PRBool nsFind::IsTextNode(nsIDOMNode* aNode)
|
|||
// also implements that interface.
|
||||
nsCOMPtr<nsIContent> content (do_QueryInterface(aNode));
|
||||
|
||||
return content && content->IsContentOfType(nsIContent::eTEXT);
|
||||
return content && content->IsNodeOfType(nsINode::eTEXT);
|
||||
}
|
||||
|
||||
PRBool nsFind::IsVisibleNode(nsIDOMNode *aDOMNode)
|
||||
|
@ -847,8 +847,8 @@ PRBool nsFind::SkipNode(nsIContent* aContent)
|
|||
|
||||
// We may not need to skip comment nodes,
|
||||
// now that IsTextNode distinguishes them from real text nodes.
|
||||
return (aContent->IsContentOfType(nsIContent::eCOMMENT) ||
|
||||
(aContent->IsContentOfType(nsIContent::eHTML) &&
|
||||
return (aContent->IsNodeOfType(nsINode::eCOMMENT) ||
|
||||
(aContent->IsNodeOfType(nsINode::eHTML) &&
|
||||
(atom == sScriptAtom ||
|
||||
atom == sNoframesAtom ||
|
||||
atom == sSelectAtom)));
|
||||
|
@ -864,8 +864,8 @@ PRBool nsFind::SkipNode(nsIContent* aContent)
|
|||
{
|
||||
atom = content->Tag();
|
||||
|
||||
if (aContent->IsContentOfType(nsIContent::eCOMMENT) ||
|
||||
(content->IsContentOfType(nsIContent::eHTML) &&
|
||||
if (aContent->IsNodeOfType(nsINode::eCOMMENT) ||
|
||||
(content->IsNodeOfType(nsINode::eHTML) &&
|
||||
(atom == sScriptAtom ||
|
||||
atom == sNoframesAtom ||
|
||||
atom == sSelectAtom)))
|
||||
|
|
|
@ -118,10 +118,10 @@ nsSpatialNavigation::KeyPress(nsIDOMEvent* aEvent)
|
|||
|
||||
nsCOMPtr<nsIContent> targetContent = do_QueryInterface(domEventTarget);
|
||||
|
||||
if (targetContent->IsContentOfType(nsIContent::eXUL))
|
||||
if (targetContent->IsNodeOfType(nsINode::eXUL))
|
||||
return NS_OK;
|
||||
|
||||
if (targetContent->IsContentOfType(nsIContent::eHTML_FORM_CONTROL))
|
||||
if (targetContent->IsNodeOfType(nsINode::eHTML_FORM_CONTROL))
|
||||
{
|
||||
nsCOMPtr<nsIFormControl> formControl(do_QueryInterface(targetContent));
|
||||
formControlType = formControl->GetType();
|
||||
|
@ -137,7 +137,7 @@ nsSpatialNavigation::KeyPress(nsIDOMEvent* aEvent)
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (!mService->mIgnoreTextFields && targetContent->IsContentOfType(nsIContent::eHTML))
|
||||
else if (!mService->mIgnoreTextFields && targetContent->IsNodeOfType(nsINode::eHTML))
|
||||
{
|
||||
// Test for isindex, a deprecated kind of text field. We're using a string
|
||||
// compare because <isindex> is not considered a form control, so it does
|
||||
|
|
|
@ -319,7 +319,7 @@ isContentOfType(nsIContent* content, const char* type)
|
|||
if (!content)
|
||||
return PR_FALSE;
|
||||
|
||||
if (content->IsContentOfType(nsIContent::eELEMENT))
|
||||
if (content->IsNodeOfType(nsINode::eELEMENT))
|
||||
{
|
||||
nsIAtom* atom = content->NodeInfo()->NameAtom();
|
||||
if (atom)
|
||||
|
@ -331,7 +331,7 @@ isContentOfType(nsIContent* content, const char* type)
|
|||
PRBool
|
||||
isArea(nsIContent* content)
|
||||
{
|
||||
if (!content || !content->IsContentOfType(nsIContent::eHTML))
|
||||
if (!content || !content->IsNodeOfType(nsINode::eHTML))
|
||||
return PR_FALSE;
|
||||
|
||||
return isContentOfType(content, "area");
|
||||
|
@ -342,7 +342,7 @@ isMap(nsIFrame* frame)
|
|||
{
|
||||
nsIContent* content = frame->GetContent();
|
||||
|
||||
if (!content || !content->IsContentOfType(nsIContent::eHTML))
|
||||
if (!content || !content->IsNodeOfType(nsINode::eHTML))
|
||||
return PR_FALSE;
|
||||
|
||||
return isContentOfType(content, "map");
|
||||
|
@ -356,7 +356,7 @@ isTargetable(PRBool focusDocuments, nsIFrame* frame)
|
|||
if (!currentContent)
|
||||
return PR_FALSE;
|
||||
|
||||
if (!currentContent->IsContentOfType(nsIContent::eHTML))
|
||||
if (!currentContent->IsNodeOfType(nsINode::eHTML))
|
||||
return PR_FALSE;
|
||||
|
||||
if (isContentOfType(currentContent, "map"))
|
||||
|
|
|
@ -1592,7 +1592,7 @@ nsTypeAheadFind::RangeStartsInsideLink(nsIDOMRange *aRange,
|
|||
}
|
||||
origContent = startContent;
|
||||
|
||||
if (startContent->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
if (startContent->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
nsIContent *childContent = startContent->GetChildAt(startOffset);
|
||||
if (childContent) {
|
||||
startContent = childContent;
|
||||
|
@ -1627,7 +1627,7 @@ nsTypeAheadFind::RangeStartsInsideLink(nsIDOMRange *aRange,
|
|||
// Keep testing while textContent is equal to something,
|
||||
// eventually we'll run out of ancestors
|
||||
|
||||
if (startContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
if (startContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
nsCOMPtr<nsILink> link(do_QueryInterface(startContent));
|
||||
if (link) {
|
||||
// Check to see if inside HTML link
|
||||
|
@ -2404,7 +2404,7 @@ nsTypeAheadFind::IsTargetContentOkay(nsIContent *aContent)
|
|||
return PR_FALSE;
|
||||
}
|
||||
|
||||
if (aContent->IsContentOfType(nsIContent::eHTML_FORM_CONTROL)) {
|
||||
if (aContent->IsNodeOfType(nsINode::eHTML_FORM_CONTROL)) {
|
||||
nsCOMPtr<nsIFormControl> formControl(do_QueryInterface(aContent));
|
||||
PRInt32 controlType = formControl->GetType();
|
||||
if (controlType == NS_FORM_SELECT ||
|
||||
|
@ -2418,7 +2418,7 @@ nsTypeAheadFind::IsTargetContentOkay(nsIContent *aContent)
|
|||
return PR_FALSE;
|
||||
}
|
||||
}
|
||||
else if (aContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
else if (aContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
// Test for isindex, a deprecated kind of text field. We're using a string
|
||||
// compare because <isindex> is not considered a form control, so it does
|
||||
// not support nsIFormControl or eHTML_FORM_CONTROL, and it's not worth
|
||||
|
|
|
@ -2236,7 +2236,7 @@ nsCSSFrameConstructor::CreateGeneratedFrameFor(nsIFrame* aParentFram
|
|||
kNameSpaceID_None, nsHTMLAtoms::alt,
|
||||
aStyleContext, getter_AddRefs(content),
|
||||
aFrame);
|
||||
} else if (aContent->IsContentOfType(nsIContent::eHTML) &&
|
||||
} else if (aContent->IsNodeOfType(nsINode::eHTML) &&
|
||||
aContent->NodeInfo()->Equals(nsHTMLAtoms::input)) {
|
||||
if (aContent->HasAttr(kNameSpaceID_None, nsHTMLAtoms::value)) {
|
||||
rv = CreateAttributeContent(aContent, aParentFrame,
|
||||
|
@ -2336,7 +2336,7 @@ nsCSSFrameConstructor::CreateGeneratedContentFrame(nsFrameConstructorState& aSta
|
|||
{
|
||||
*aResult = nsnull; // initialize OUT parameter
|
||||
|
||||
if (!aContent->IsContentOfType(nsIContent::eELEMENT))
|
||||
if (!aContent->IsNodeOfType(nsINode::eELEMENT))
|
||||
return PR_FALSE;
|
||||
|
||||
nsStyleSet *styleSet = mPresShell->StyleSet();
|
||||
|
@ -2509,7 +2509,7 @@ static PRBool
|
|||
IsOnlyWhitespace(nsIContent* aContent)
|
||||
{
|
||||
PRBool onlyWhiteSpace = PR_FALSE;
|
||||
if (aContent->IsContentOfType(nsIContent::eTEXT)) {
|
||||
if (aContent->IsNodeOfType(nsINode::eTEXT)) {
|
||||
nsCOMPtr<nsITextContent> textContent = do_QueryInterface(aContent);
|
||||
|
||||
onlyWhiteSpace = textContent->IsOnlyWhitespace();
|
||||
|
@ -3423,7 +3423,7 @@ IsSpecialContent(nsIContent* aContent,
|
|||
// Gross hack. Return true if this is a content node that we'd create a
|
||||
// frame for based on something other than display -- in other words if this
|
||||
// is a node that could never have a nsTableCellFrame, for example.
|
||||
if (aContent->IsContentOfType(nsIContent::eHTML) ||
|
||||
if (aContent->IsNodeOfType(nsINode::eHTML) ||
|
||||
aNameSpaceID == kNameSpaceID_XHTML) {
|
||||
// XXXbz this is duplicating some logic from ConstructHTMLFrame....
|
||||
// Would be nice to avoid that. :(
|
||||
|
@ -3580,7 +3580,7 @@ nsCSSFrameConstructor::AdjustParentFrame(nsFrameConstructorState& aState,
|
|||
IsSpecialContent(aChildContent, aTag, aNameSpaceID, aChildStyle)) &&
|
||||
// XXXbz evil hack for HTML forms.... see similar in
|
||||
// nsCSSFrameConstructor::TableProcessChild. It should just go away.
|
||||
(!aChildContent->IsContentOfType(nsIContent::eHTML) ||
|
||||
(!aChildContent->IsNodeOfType(nsINode::eHTML) ||
|
||||
!aChildContent->NodeInfo()->Equals(nsHTMLAtoms::form,
|
||||
kNameSpaceID_None))) {
|
||||
nsTableCreator tableCreator(aState.mPresShell);
|
||||
|
@ -4097,11 +4097,11 @@ MustGeneratePseudoParent(nsIContent* aContent, nsStyleContext* aStyleContext)
|
|||
return PR_FALSE;
|
||||
}
|
||||
|
||||
if (aContent->IsContentOfType(nsIContent::eTEXT)) {
|
||||
if (aContent->IsNodeOfType(nsINode::eTEXT)) {
|
||||
return !IsOnlyWhitespace(aContent);
|
||||
}
|
||||
|
||||
return !aContent->IsContentOfType(nsIContent::eCOMMENT);
|
||||
return !aContent->IsNodeOfType(nsINode::eCOMMENT);
|
||||
}
|
||||
|
||||
// this is called when a non table related element is a child of a table, row group,
|
||||
|
@ -4207,8 +4207,8 @@ nsCSSFrameConstructor::TableProcessChildren(nsFrameConstructorState& aState,
|
|||
++iter) {
|
||||
nsCOMPtr<nsIContent> childContent = *iter;
|
||||
if (childContent &&
|
||||
(childContent->IsContentOfType(nsIContent::eELEMENT) ||
|
||||
childContent->IsContentOfType(nsIContent::eTEXT)) &&
|
||||
(childContent->IsNodeOfType(nsINode::eELEMENT) ||
|
||||
childContent->IsNodeOfType(nsINode::eTEXT)) &&
|
||||
NeedFrameFor(aParentFrame, childContent)) {
|
||||
|
||||
rv = TableProcessChild(aState, childContent,
|
||||
|
@ -4343,9 +4343,9 @@ nsCSSFrameConstructor::TableProcessChild(nsFrameConstructorState& aState,
|
|||
nsINodeInfo *childNodeInfo = aChildContent->NodeInfo();
|
||||
// Sometimes aChildContent is a #text node. In those cases we want to
|
||||
// construct a foreign frame for it in any case.
|
||||
if (aChildContent->IsContentOfType(nsIContent::eHTML) &&
|
||||
if (aChildContent->IsNodeOfType(nsINode::eHTML) &&
|
||||
childNodeInfo->Equals(nsHTMLAtoms::form, kNameSpaceID_None) &&
|
||||
aParentContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
aParentContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
nsINodeInfo *parentNodeInfo = aParentContent->NodeInfo();
|
||||
|
||||
if (parentNodeInfo->Equals(nsHTMLAtoms::table) ||
|
||||
|
@ -4469,7 +4469,7 @@ nsCSSFrameConstructor::PropagateScrollToViewport()
|
|||
// of the viewport
|
||||
// XXX what about XHTML?
|
||||
nsCOMPtr<nsIDOMHTMLDocument> htmlDoc(do_QueryInterface(mDocument));
|
||||
if (!htmlDoc || !docElement->IsContentOfType(nsIContent::eHTML)) {
|
||||
if (!htmlDoc || !docElement->IsNodeOfType(nsINode::eHTML)) {
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
|
@ -4619,7 +4619,7 @@ nsCSSFrameConstructor::ConstructDocElementFrame(nsFrameConstructorState& aState,
|
|||
} else {
|
||||
// otherwise build a box or a block
|
||||
#ifdef MOZ_XUL
|
||||
if (aDocElement->IsContentOfType(nsIContent::eXUL)) {
|
||||
if (aDocElement->IsNodeOfType(nsINode::eXUL)) {
|
||||
contentFrame = NS_NewDocElementBoxFrame(mPresShell, styleContext);
|
||||
}
|
||||
else
|
||||
|
@ -4778,7 +4778,7 @@ nsCSSFrameConstructor::ConstructRootFrame(nsIContent* aDocElement,
|
|||
|
||||
if (!isPaginated) {
|
||||
#ifdef MOZ_XUL
|
||||
if (aDocElement->IsContentOfType(nsIContent::eXUL))
|
||||
if (aDocElement->IsNodeOfType(nsINode::eXUL))
|
||||
{
|
||||
// pass a temporary stylecontext, the correct one will be set later
|
||||
rootFrame = NS_NewRootBoxFrame(mPresShell, viewportPseudoStyle);
|
||||
|
@ -4816,11 +4816,11 @@ nsCSSFrameConstructor::ConstructRootFrame(nsIContent* aDocElement,
|
|||
// 3) nsIScrollable::Scrollbar_Always = scrollbars always
|
||||
// Only need to create a scroll frame/view for cases 2 and 3.
|
||||
|
||||
PRBool isHTML = aDocElement->IsContentOfType(nsIContent::eHTML);
|
||||
PRBool isHTML = aDocElement->IsNodeOfType(nsINode::eHTML);
|
||||
PRBool isXUL = PR_FALSE;
|
||||
|
||||
if (!isHTML) {
|
||||
isXUL = aDocElement->IsContentOfType(nsIContent::eXUL);
|
||||
isXUL = aDocElement->IsNodeOfType(nsINode::eXUL);
|
||||
}
|
||||
|
||||
// Never create scrollbars for XUL documents
|
||||
|
@ -5594,7 +5594,7 @@ nsCSSFrameConstructor::ConstructHTMLFrame(nsFrameConstructorState& aState,
|
|||
{
|
||||
// Ignore the tag if it's not HTML content and if it doesn't extend (via XBL)
|
||||
// a valid HTML namespace.
|
||||
if (!aContent->IsContentOfType(nsIContent::eHTML) &&
|
||||
if (!aContent->IsNodeOfType(nsINode::eHTML) &&
|
||||
aNameSpaceID != kNameSpaceID_XHTML) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -6821,7 +6821,7 @@ nsCSSFrameConstructor::ConstructFrameByDisplayType(nsFrameConstructorState& aSta
|
|||
// and that might need to be propagated.
|
||||
PRBool propagatedScrollToViewport = PR_FALSE;
|
||||
if (aContent->NodeInfo()->Equals(nsHTMLAtoms::body) &&
|
||||
aContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
aContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
propagatedScrollToViewport =
|
||||
PropagateScrollToViewport() == aContent;
|
||||
}
|
||||
|
@ -7165,11 +7165,11 @@ nsCSSFrameConstructor::ResolveStyleContext(nsIFrame* aParentFrame,
|
|||
|
||||
nsStyleSet *styleSet = mPresShell->StyleSet();
|
||||
|
||||
if (aContent->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
if (aContent->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
return styleSet->ResolveStyleFor(aContent, parentStyleContext);
|
||||
} else {
|
||||
|
||||
NS_ASSERTION(aContent->IsContentOfType(nsIContent::eTEXT),
|
||||
NS_ASSERTION(aContent->IsNodeOfType(nsINode::eTEXT),
|
||||
"shouldn't waste time creating style contexts for "
|
||||
"comments and processing instructions");
|
||||
|
||||
|
@ -7506,7 +7506,7 @@ nsCSSFrameConstructor::TestSVGConditions(nsIContent* aContent,
|
|||
nsAutoString value;
|
||||
|
||||
// Only elements can have tests on them
|
||||
if (! aContent->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
if (! aContent->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
aHasRequiredExtensions = PR_FALSE;
|
||||
aHasRequiredFeatures = PR_FALSE;
|
||||
aHasSystemLanguage = PR_FALSE;
|
||||
|
@ -7586,7 +7586,7 @@ nsCSSFrameConstructor::SVGSwitchProcessChildren(nsFrameConstructorState& aState,
|
|||
nsIContent* child = aContent->GetChildAt(i);
|
||||
|
||||
// Skip over children that aren't elements
|
||||
if (!child->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
if (!child->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -7966,8 +7966,8 @@ nsCSSFrameConstructor::ConstructFrame(nsFrameConstructorState& aState,
|
|||
}
|
||||
|
||||
// never create frames for comments or PIs
|
||||
if (aContent->IsContentOfType(nsIContent::eCOMMENT) ||
|
||||
aContent->IsContentOfType(nsIContent::ePROCESSING_INSTRUCTION))
|
||||
if (aContent->IsNodeOfType(nsINode::eCOMMENT) ||
|
||||
aContent->IsNodeOfType(nsINode::ePROCESSING_INSTRUCTION))
|
||||
return rv;
|
||||
|
||||
nsRefPtr<nsStyleContext> styleContext;
|
||||
|
@ -8075,7 +8075,7 @@ nsCSSFrameConstructor::ConstructFrameInternal( nsFrameConstructorState& aState,
|
|||
return rv;
|
||||
}
|
||||
|
||||
if (aContent->IsContentOfType(nsIContent::eTEXT))
|
||||
if (aContent->IsNodeOfType(nsINode::eTEXT))
|
||||
return ConstructTextFrame(aState, aContent, adjParentFrame, styleContext,
|
||||
*frameItems, pseudoParent);
|
||||
|
||||
|
@ -8966,7 +8966,7 @@ nsCSSFrameConstructor::ContentAppended(nsIContent* aContainer,
|
|||
// find out if the child is a block or inline, an inline means we don't have to reframe
|
||||
nsIContent *child = aContainer->GetChildAt(aNewIndexInContainer);
|
||||
PRBool needReframe = !child;
|
||||
if (child && child->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
if (child && child->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
nsRefPtr<nsStyleContext> styleContext;
|
||||
styleContext = ResolveStyleContext(parentFrame, child);
|
||||
// XXX since the block child goes in the last inline of the sacred triad, frames would
|
||||
|
@ -9158,7 +9158,7 @@ nsCSSFrameConstructor::NeedSpecialFrameReframe(nsIContent* aParent1,
|
|||
|
||||
// find out if aChild is a block or inline
|
||||
PRBool childIsBlock = PR_FALSE;
|
||||
if (aChild->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
if (aChild->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
nsRefPtr<nsStyleContext> styleContext;
|
||||
styleContext = ResolveStyleContext(aParentFrame, aChild);
|
||||
const nsStyleDisplay* display = styleContext->GetStyleDisplay();
|
||||
|
@ -9267,8 +9267,8 @@ PRBool NotifyListBoxBody(nsPresContext* aPresContext,
|
|||
if (!aContainer)
|
||||
return PR_FALSE;
|
||||
|
||||
if (aContainer->IsContentOfType(nsIContent::eXUL) &&
|
||||
aChild->IsContentOfType(nsIContent::eXUL) &&
|
||||
if (aContainer->IsNodeOfType(nsINode::eXUL) &&
|
||||
aChild->IsNodeOfType(nsINode::eXUL) &&
|
||||
aContainer->Tag() == nsXULAtoms::listbox &&
|
||||
aChild->Tag() == nsXULAtoms::listitem) {
|
||||
nsCOMPtr<nsIDOMXULElement> xulElement = do_QueryInterface(aContainer);
|
||||
|
@ -10303,7 +10303,7 @@ InvalidateCanvasIfNeeded(nsIFrame* aFrame)
|
|||
|
||||
// Check whether it's an HTML body
|
||||
if (node->Tag() != nsHTMLAtoms::body ||
|
||||
!node->IsContentOfType(nsIContent::eHTML)) {
|
||||
!node->IsNodeOfType(nsINode::eHTML)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -10614,7 +10614,7 @@ nsCSSFrameConstructor::RestyleLaterSiblings(nsIContent *aContent)
|
|||
index_end = parent->GetChildCount();
|
||||
index != index_end; ++index) {
|
||||
nsIContent *child = parent->GetChildAt(index);
|
||||
if (!child->IsContentOfType(nsIContent::eELEMENT))
|
||||
if (!child->IsNodeOfType(nsINode::eELEMENT))
|
||||
continue;
|
||||
|
||||
nsIFrame* primaryFrame = mPresShell->GetPrimaryFrameFor(child);
|
||||
|
@ -11493,7 +11493,7 @@ nsCSSFrameConstructor::FindPrimaryFrameFor(nsFrameManager* aFrameManager,
|
|||
|
||||
if (aHint && !*aFrame)
|
||||
{ // if we had a hint, and we didn't get a frame, see if we should try the slow way
|
||||
if (aContent->IsContentOfType(nsIContent::eTEXT))
|
||||
if (aContent->IsNodeOfType(nsINode::eTEXT))
|
||||
{
|
||||
#ifdef NOISY_FINDFRAME
|
||||
FFWC_slowSearchForText++;
|
||||
|
@ -11582,7 +11582,7 @@ nsCSSFrameConstructor::GetInsertionPoint(nsIFrame* aParentFrame,
|
|||
// have to look at insertionElement here...
|
||||
if (aMultiple && !*aMultiple) {
|
||||
nsIContent* content = insertionElement ? insertionElement : container;
|
||||
if (content->IsContentOfType(nsIContent::eHTML) &&
|
||||
if (content->IsNodeOfType(nsINode::eHTML) &&
|
||||
content->Tag() == nsHTMLAtoms::fieldset) {
|
||||
*aMultiple = PR_TRUE;
|
||||
}
|
||||
|
@ -12324,7 +12324,7 @@ nsCSSFrameConstructor::CreateLetterFrame(nsFrameConstructorState& aState,
|
|||
nsIFrame* aParentFrame,
|
||||
nsFrameItems& aResult)
|
||||
{
|
||||
NS_PRECONDITION(aTextContent->IsContentOfType(nsIContent::eTEXT),
|
||||
NS_PRECONDITION(aTextContent->IsNodeOfType(nsINode::eTEXT),
|
||||
"aTextContent isn't text");
|
||||
|
||||
// Get style context for the first-letter-frame
|
||||
|
|
|
@ -2696,7 +2696,7 @@ FindElementBackground(nsIFrame* aForFrame,
|
|||
return PR_TRUE; // A pseudo-element frame.
|
||||
|
||||
nsIContent* content = aForFrame->GetContent();
|
||||
if (!content || !content->IsContentOfType(nsIContent::eHTML))
|
||||
if (!content || !content->IsNodeOfType(nsINode::eHTML))
|
||||
return PR_TRUE; // not frame for an HTML element
|
||||
|
||||
if (!parentFrame)
|
||||
|
|
|
@ -384,9 +384,9 @@ nsFrameManager::GetPrimaryFrameFor(nsIContent* aContent)
|
|||
do {
|
||||
prevSibling = parent->GetChildAt(--index);
|
||||
} while (index &&
|
||||
(prevSibling->IsContentOfType(nsIContent::eTEXT) ||
|
||||
prevSibling->IsContentOfType(nsIContent::eCOMMENT) ||
|
||||
prevSibling->IsContentOfType(nsIContent::ePROCESSING_INSTRUCTION)));
|
||||
(prevSibling->IsNodeOfType(nsINode::eTEXT) ||
|
||||
prevSibling->IsNodeOfType(nsINode::eCOMMENT) ||
|
||||
prevSibling->IsNodeOfType(nsINode::ePROCESSING_INSTRUCTION)));
|
||||
if (prevSibling) {
|
||||
entry = NS_STATIC_CAST(PrimaryFrameMapEntry*,
|
||||
PL_DHashTableOperate(&mPrimaryFrameMap, prevSibling,
|
||||
|
@ -1221,7 +1221,7 @@ nsFrameManager::ReResolveStyleContext(nsPresContext *aPresContext,
|
|||
// Make sure not to do this for pseudo-frames -- those can't have :before
|
||||
// or :after content. Neither can non-elements or leaf frames.
|
||||
if (!pseudoTag && localContent &&
|
||||
localContent->IsContentOfType(nsIContent::eELEMENT) &&
|
||||
localContent->IsNodeOfType(nsINode::eELEMENT) &&
|
||||
!aFrame->IsLeaf()) {
|
||||
// Check for a new :before pseudo and an existing :before
|
||||
// frame, but only if the frame is the first continuation.
|
||||
|
@ -1247,7 +1247,7 @@ nsFrameManager::ReResolveStyleContext(nsPresContext *aPresContext,
|
|||
// Make sure not to do this for pseudo-frames -- those can't have :before
|
||||
// or :after content. Neither can non-elements or leaf frames.
|
||||
if (!pseudoTag && localContent &&
|
||||
localContent->IsContentOfType(nsIContent::eELEMENT) &&
|
||||
localContent->IsNodeOfType(nsINode::eELEMENT) &&
|
||||
!aFrame->IsLeaf()) {
|
||||
// Check for new :after content, but only if the frame is the
|
||||
// last continuation.
|
||||
|
|
|
@ -3938,7 +3938,7 @@ PresShell::GoToAnchor(const nsAString& aAnchorName, PRBool aScroll)
|
|||
content = do_QueryInterface(node);
|
||||
if (content) {
|
||||
if (content->Tag() == nsHTMLAtoms::a &&
|
||||
content->IsContentOfType(nsIContent::eHTML)) {
|
||||
content->IsNodeOfType(nsINode::eHTML)) {
|
||||
break;
|
||||
}
|
||||
content = nsnull;
|
||||
|
@ -6005,7 +6005,7 @@ PresShell::HandlePositionedEvent(nsIView* aView,
|
|||
// We use weak pointers because during this tight loop, the node
|
||||
// will *not* go away. And this happens on every mousemove.
|
||||
while (targetElement &&
|
||||
!targetElement->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
!targetElement->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
targetElement = targetElement->GetParent();
|
||||
}
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ nsFormControlHelper::GetWrapPropertyEnum(nsIContent * aContent, nsHTMLTextWrap&
|
|||
aWrapProp = eHTMLTextWrap_Soft; // the default
|
||||
|
||||
nsAutoString wrap;
|
||||
if (aContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
if (aContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
static nsIContent::AttrValuesArray strings[] =
|
||||
{&nsHTMLAtoms::HARD, &nsHTMLAtoms::OFF, nsnull};
|
||||
|
||||
|
|
|
@ -451,7 +451,7 @@ void nsListControlFrame::PaintFocus(nsIRenderingContext& aRC, nsPoint aPt)
|
|||
// it's an element. Text frames need not apply.
|
||||
childframe = containerFrame->GetFirstChild(nsnull);
|
||||
if (childframe &&
|
||||
!childframe->GetContent()->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
!childframe->GetContent()->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
childframe = nsnull;
|
||||
}
|
||||
result = NS_OK;
|
||||
|
@ -579,14 +579,14 @@ static inline PRBool
|
|||
IsOptGroup(nsIContent *aContent)
|
||||
{
|
||||
return (aContent->NodeInfo()->Equals(nsHTMLAtoms::optgroup) &&
|
||||
aContent->IsContentOfType(nsIContent::eHTML));
|
||||
aContent->IsNodeOfType(nsINode::eHTML));
|
||||
}
|
||||
|
||||
static inline PRBool
|
||||
IsOption(nsIContent *aContent)
|
||||
{
|
||||
return (aContent->NodeInfo()->Equals(nsHTMLAtoms::option) &&
|
||||
aContent->IsContentOfType(nsIContent::eHTML));
|
||||
aContent->IsNodeOfType(nsINode::eHTML));
|
||||
}
|
||||
|
||||
static PRUint32
|
||||
|
|
|
@ -6815,7 +6815,7 @@ PRBool
|
|||
nsBlockFrame::FrameStartsCounterScope(nsIFrame* aFrame)
|
||||
{
|
||||
nsIContent* content = aFrame->GetContent();
|
||||
if (!content || !content->IsContentOfType(nsIContent::eHTML))
|
||||
if (!content || !content->IsNodeOfType(nsINode::eHTML))
|
||||
return PR_FALSE;
|
||||
|
||||
nsIAtom *localName = content->NodeInfo()->NameAtom();
|
||||
|
|
|
@ -375,7 +375,7 @@ SyncFrameViewGeometryDependentProperties(nsPresContext* aPresContext,
|
|||
nsIContent *rootElem = doc->GetRootContent();
|
||||
if (!doc->GetParentDocument() &&
|
||||
(nsCOMPtr<nsISupports>(doc->GetContainer())) &&
|
||||
rootElem && rootElem->IsContentOfType(nsIContent::eXUL)) {
|
||||
rootElem && rootElem->IsNodeOfType(nsINode::eXUL)) {
|
||||
// we're XUL at the root of the document hierarchy. Try to make our
|
||||
// window translucent.
|
||||
// don't proceed unless this is the root view
|
||||
|
|
|
@ -328,7 +328,7 @@ nsFirstLetterFrame::DrainOverflowFrames(nsPresContext* aPresContext)
|
|||
nsRefPtr<nsStyleContext> sc;
|
||||
nsIContent* kidContent = kid->GetContent();
|
||||
if (kidContent) {
|
||||
NS_ASSERTION(kidContent->IsContentOfType(nsIContent::eTEXT),
|
||||
NS_ASSERTION(kidContent->IsNodeOfType(nsINode::eTEXT),
|
||||
"should contain only text nodes");
|
||||
sc = aPresContext->StyleSet()->ResolveStyleForNonElement(mStyleContext);
|
||||
if (sc) {
|
||||
|
|
|
@ -3363,7 +3363,7 @@ nsresult
|
|||
nsFrame::MakeFrameName(const nsAString& aType, nsAString& aResult) const
|
||||
{
|
||||
aResult = aType;
|
||||
if (mContent && !mContent->IsContentOfType(nsIContent::eTEXT)) {
|
||||
if (mContent && !mContent->IsNodeOfType(nsINode::eTEXT)) {
|
||||
nsAutoString buf;
|
||||
mContent->Tag()->ToString(buf);
|
||||
aResult.Append(NS_LITERAL_STRING("(") + buf + NS_LITERAL_STRING(")"));
|
||||
|
@ -4942,12 +4942,12 @@ nsIFrame::IsFocusable(PRInt32 *aTabIndex, PRBool aWithMouse)
|
|||
}
|
||||
PRBool isFocusable = PR_FALSE;
|
||||
|
||||
if (mContent && mContent->IsContentOfType(nsIContent::eELEMENT) &&
|
||||
if (mContent && mContent->IsNodeOfType(nsINode::eELEMENT) &&
|
||||
AreAncestorViewsVisible()) {
|
||||
const nsStyleVisibility* vis = GetStyleVisibility();
|
||||
if (vis->mVisible != NS_STYLE_VISIBILITY_COLLAPSE &&
|
||||
vis->mVisible != NS_STYLE_VISIBILITY_HIDDEN) {
|
||||
if (mContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
if (mContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
nsCOMPtr<nsISupports> container(GetPresContext()->GetContainer());
|
||||
nsCOMPtr<nsIEditorDocShell> editorDocShell(do_QueryInterface(container));
|
||||
if (editorDocShell) {
|
||||
|
@ -4967,7 +4967,7 @@ nsIFrame::IsFocusable(PRInt32 *aTabIndex, PRBool aWithMouse)
|
|||
isFocusable = mContent->IsFocusable(&tabIndex);
|
||||
if (!isFocusable && !aWithMouse &&
|
||||
GetType() == nsLayoutAtoms::scrollFrame &&
|
||||
mContent->IsContentOfType(nsIContent::eHTML) &&
|
||||
mContent->IsNodeOfType(nsINode::eHTML) &&
|
||||
!mContent->IsNativeAnonymous() && mContent->GetParent() &&
|
||||
!mContent->HasAttr(kNameSpaceID_None, nsHTMLAtoms::tabindex)) {
|
||||
// Elements with scrollable view are focusable with script & tabbable
|
||||
|
|
|
@ -319,7 +319,7 @@ nsSubDocumentFrame::GetDesiredSize(nsPresContext* aPresContext,
|
|||
{
|
||||
// <frame> processing does not use this routine, only <iframe>
|
||||
float p2t = 0;
|
||||
if (!mContent->IsContentOfType(nsIContent::eXUL))
|
||||
if (!mContent->IsNodeOfType(nsINode::eXUL))
|
||||
// If no width/height was specified, use 300/150.
|
||||
// This is for compatibility with IE.
|
||||
p2t = aPresContext->ScaledPixelsToTwips();
|
||||
|
@ -395,7 +395,7 @@ nsSubDocumentFrame::Reflow(nsPresContext* aPresContext,
|
|||
|
||||
if (aDesiredSize.mComputeMEW) {
|
||||
nscoord defaultAutoWidth = NSIntPixelsToTwips(300, aPresContext->ScaledPixelsToTwips());
|
||||
if (mContent->IsContentOfType(nsIContent::eXUL)) {
|
||||
if (mContent->IsNodeOfType(nsINode::eXUL)) {
|
||||
// XUL frames don't have a default 300px width
|
||||
defaultAutoWidth = 0;
|
||||
}
|
||||
|
@ -505,7 +505,7 @@ nsSubDocumentFrame::AttributeChanged(PRInt32 aNameSpaceID,
|
|||
if (!mFrameLoader)
|
||||
return NS_OK;
|
||||
|
||||
if (!mContent->IsContentOfType(nsIContent::eXUL)) {
|
||||
if (!mContent->IsNodeOfType(nsINode::eXUL)) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -394,7 +394,7 @@ nsHTMLFramesetFrame::Init(nsIContent* aContent,
|
|||
}
|
||||
nsIContent *child = mContent->GetChildAt(childX);
|
||||
|
||||
if (!child->IsContentOfType(nsIContent::eHTML))
|
||||
if (!child->IsNodeOfType(nsINode::eHTML))
|
||||
continue;
|
||||
|
||||
nsIAtom *tag = child->Tag();
|
||||
|
@ -732,7 +732,7 @@ nsHTMLFramesetFrame* nsHTMLFramesetFrame::GetFramesetParent(nsIFrame* aChild)
|
|||
if (content) {
|
||||
nsCOMPtr<nsIContent> contentParent = content->GetParent();
|
||||
|
||||
if (contentParent && contentParent->IsContentOfType(nsIContent::eHTML) &&
|
||||
if (contentParent && contentParent->IsNodeOfType(nsINode::eHTML) &&
|
||||
contentParent->Tag() == nsHTMLAtoms::frameset) {
|
||||
nsIFrame* fptr = aChild->GetParent();
|
||||
parent = (nsHTMLFramesetFrame*) fptr;
|
||||
|
@ -1351,7 +1351,7 @@ nsHTMLFramesetFrame::RecalculateBorderResize()
|
|||
for (childIndex = 0; childIndex < numChildren; childIndex++) {
|
||||
nsIContent *child = mContent->GetChildAt(childIndex);
|
||||
|
||||
if (child->IsContentOfType(nsIContent::eHTML)) {
|
||||
if (child->IsNodeOfType(nsINode::eHTML)) {
|
||||
nsINodeInfo *ni = child->NodeInfo();
|
||||
|
||||
if (ni->Equals(nsHTMLAtoms::frameset)) {
|
||||
|
|
|
@ -2634,12 +2634,12 @@ nsHTMLReflowState::IsBidiFormControl(nsPresContext* aPresContext)
|
|||
// Otherwise, just test this content node
|
||||
if (mReflowDepth == 0) {
|
||||
for ( ; content; content = content->GetParent()) {
|
||||
if (content->IsContentOfType(nsIContent::eHTML_FORM_CONTROL)) {
|
||||
if (content->IsNodeOfType(nsINode::eHTML_FORM_CONTROL)) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return (content->IsContentOfType(nsIContent::eHTML_FORM_CONTROL));
|
||||
return (content->IsNodeOfType(nsINode::eHTML_FORM_CONTROL));
|
||||
}
|
||||
|
||||
return PR_FALSE;
|
||||
|
|
|
@ -813,7 +813,7 @@ nsImageMap::SearchForAreas(nsIContent* aParent, PRBool& aFoundArea,
|
|||
for (i = 0; i < n; i++) {
|
||||
nsIContent *child = aParent->GetChildAt(i);
|
||||
|
||||
if (child->IsContentOfType(nsIContent::eHTML)) {
|
||||
if (child->IsNodeOfType(nsINode::eHTML)) {
|
||||
// If we haven't determined that the map element contains an
|
||||
// <a> element yet, then look for <area>.
|
||||
if (!aFoundAnchor && child->Tag() == nsHTMLAtoms::area) {
|
||||
|
@ -836,7 +836,7 @@ nsImageMap::SearchForAreas(nsIContent* aParent, PRBool& aFoundArea,
|
|||
}
|
||||
}
|
||||
|
||||
if (child->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
if (child->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
mContainsBlockContents = PR_TRUE;
|
||||
rv = SearchForAreas(child, aFoundArea, aFoundAnchor);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
@ -963,7 +963,7 @@ nsImageMap::AttributeChanged(nsIDocument* aDocument,
|
|||
// are the only cases we care about.
|
||||
if ((aContent->NodeInfo()->Equals(nsHTMLAtoms::area) ||
|
||||
aContent->NodeInfo()->Equals(nsHTMLAtoms::a)) &&
|
||||
aContent->IsContentOfType(nsIContent::eHTML) &&
|
||||
aContent->IsNodeOfType(nsINode::eHTML) &&
|
||||
aNameSpaceID == kNameSpaceID_None &&
|
||||
(aAttribute == nsHTMLAtoms::shape ||
|
||||
aAttribute == nsHTMLAtoms::coords)) {
|
||||
|
|
|
@ -818,7 +818,7 @@ NS_IMETHODIMP nsInlineFrame::GetAccessible(nsIAccessible** aAccessible)
|
|||
*aAccessible = nsnull;
|
||||
nsIAtom *tagAtom = mContent->Tag();
|
||||
if ((tagAtom == nsHTMLAtoms::img || tagAtom == nsHTMLAtoms::input ||
|
||||
tagAtom == nsHTMLAtoms::label) && mContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
tagAtom == nsHTMLAtoms::label) && mContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
// Only get accessibility service if we're going to use it
|
||||
nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
|
||||
if (!accService)
|
||||
|
|
|
@ -2412,7 +2412,7 @@ nsresult nsPluginInstanceOwner::EnsureCachedAttrParamArrays()
|
|||
// source order, while in XML and XHTML it's the same as the source order
|
||||
// (see the AddAttributes functions in the HTML and XML content sinks).
|
||||
PRInt16 start, end, increment;
|
||||
if (mContent->IsContentOfType(nsIContent::eHTML) &&
|
||||
if (mContent->IsNodeOfType(nsINode::eHTML) &&
|
||||
mContent->NodeInfo()->NamespaceEquals(kNameSpaceID_None)) {
|
||||
// HTML. Walk attributes in reverse order.
|
||||
start = numRealAttrs - 1;
|
||||
|
|
|
@ -2476,7 +2476,7 @@ nsFrameSelection::GetFrameForNodeOffset(nsIContent *aNode,
|
|||
|
||||
nsCOMPtr<nsIContent> theNode = aNode;
|
||||
|
||||
if (aNode->IsContentOfType(nsIContent::eELEMENT))
|
||||
if (aNode->IsNodeOfType(nsINode::eELEMENT))
|
||||
{
|
||||
PRInt32 childIndex = 0;
|
||||
PRInt32 numChildren = 0;
|
||||
|
@ -2517,7 +2517,7 @@ nsFrameSelection::GetFrameForNodeOffset(nsIContent *aNode,
|
|||
// Now that we have the child node, check if it too
|
||||
// can contain children. If so, call this method again!
|
||||
|
||||
if (theNode->IsContentOfType(nsIContent::eELEMENT))
|
||||
if (theNode->IsNodeOfType(nsINode::eELEMENT))
|
||||
{
|
||||
PRInt32 newOffset = 0;
|
||||
|
||||
|
@ -2743,7 +2743,7 @@ static PRBool IsCell(nsIContent *aContent)
|
|||
{
|
||||
return ((aContent->Tag() == nsHTMLAtoms::td ||
|
||||
aContent->Tag() == nsHTMLAtoms::th) &&
|
||||
aContent->IsContentOfType(nsIContent::eHTML));
|
||||
aContent->IsNodeOfType(nsINode::eHTML));
|
||||
}
|
||||
|
||||
nsITableCellLayout*
|
||||
|
@ -3515,7 +3515,7 @@ nsFrameSelection::GetParentTable(nsIContent *aCell, nsIContent **aTable)
|
|||
for (nsIContent* parent = aCell->GetParent(); parent;
|
||||
parent = parent->GetParent()) {
|
||||
if (parent->Tag() == nsHTMLAtoms::table &&
|
||||
parent->IsContentOfType(nsIContent::eHTML)) {
|
||||
parent->IsNodeOfType(nsINode::eHTML)) {
|
||||
*aTable = parent;
|
||||
NS_ADDREF(*aTable);
|
||||
|
||||
|
@ -3699,7 +3699,7 @@ nsTypedSelection::GetTableSelectionType(nsIDOMRange* aRange, PRInt32* aTableSele
|
|||
|
||||
// if we simply cannot have children, return NS_OK as a non-failing,
|
||||
// non-completing case for table selection
|
||||
if (!content->IsContentOfType(nsIContent::eELEMENT))
|
||||
if (!content->IsNodeOfType(nsINode::eELEMENT))
|
||||
return NS_OK; //got to be a text node, definitely not a table row/cell
|
||||
|
||||
PRInt32 startOffset;
|
||||
|
@ -3713,7 +3713,7 @@ nsTypedSelection::GetTableSelectionType(nsIDOMRange* aRange, PRInt32* aTableSele
|
|||
if ((endOffset - startOffset) != 1)
|
||||
return NS_OK;
|
||||
|
||||
if (!content->IsContentOfType(nsIContent::eHTML)) {
|
||||
if (!content->IsNodeOfType(nsINode::eHTML)) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -4223,7 +4223,7 @@ nsTypedSelection::GetPrimaryFrameForRangeEndpoint(nsIDOMNode *aNode, PRInt32 aOf
|
|||
if (!content)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
if (content->IsContentOfType(nsIContent::eELEMENT))
|
||||
if (content->IsNodeOfType(nsINode::eELEMENT))
|
||||
{
|
||||
if (aIsEndNode)
|
||||
aOffset--;
|
||||
|
@ -4440,7 +4440,7 @@ nsTypedSelection::selectFrames(nsPresContext* aPresContext, nsIDOMRange *aRange,
|
|||
if (NS_FAILED(result) || !content)
|
||||
return result;
|
||||
|
||||
if (!content->IsContentOfType(nsIContent::eELEMENT))
|
||||
if (!content->IsNodeOfType(nsINode::eELEMENT))
|
||||
{
|
||||
frame = mFrameSelection->GetShell()->GetPrimaryFrameFor(content);
|
||||
if (frame)
|
||||
|
@ -4464,7 +4464,7 @@ nsTypedSelection::selectFrames(nsPresContext* aPresContext, nsIDOMRange *aRange,
|
|||
if (NS_FAILED(result) || !content)
|
||||
return result;
|
||||
|
||||
if (!content->IsContentOfType(nsIContent::eELEMENT))
|
||||
if (!content->IsNodeOfType(nsINode::eELEMENT))
|
||||
{
|
||||
frame = mFrameSelection->GetShell()->GetPrimaryFrameFor(content);
|
||||
if (frame)
|
||||
|
|
|
@ -85,7 +85,7 @@ CompressWhitespace(nsIContent* aContent)
|
|||
PRUint32 numKids = aContent->GetChildCount();
|
||||
for (PRUint32 kid = 0; kid < numKids; kid++) {
|
||||
nsCOMPtr<nsITextContent> tc(do_QueryInterface(aContent->GetChildAt(kid)));
|
||||
if (tc && tc->IsContentOfType(nsIContent::eTEXT)) {
|
||||
if (tc && tc->IsNodeOfType(nsINode::eTEXT)) {
|
||||
nsAutoString text;
|
||||
tc->AppendTextTo(text);
|
||||
text.CompressWhitespace();
|
||||
|
|
|
@ -3195,7 +3195,7 @@ PRBool nsPrintEngine::HasFramesetChild(nsIContent* aContent)
|
|||
for (PRUint32 i = 0; i < numChildren; ++i) {
|
||||
nsIContent *child = aContent->GetChildAt(i);
|
||||
if (child->Tag() == nsHTMLAtoms::frameset &&
|
||||
child->IsContentOfType(nsIContent::eHTML)) {
|
||||
child->IsNodeOfType(nsINode::eHTML)) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -171,7 +171,7 @@ nsPrintPreviewListener::HandleEvent(nsIDOMEvent* aEvent)
|
|||
if (nsEvent)
|
||||
nsEvent->GetOriginalTarget(getter_AddRefs(target));
|
||||
nsCOMPtr<nsIContent> content(do_QueryInterface(target));
|
||||
if (content && !content->IsContentOfType(nsIContent::eXUL)) {
|
||||
if (content && !content->IsNodeOfType(nsINode::eXUL)) {
|
||||
eEventAction action = ::GetActionForEvent(aEvent);
|
||||
switch (action) {
|
||||
case eEventAction_Tab:
|
||||
|
|
|
@ -727,7 +727,7 @@ RuleProcessorData::RuleProcessorData(nsPresContext* aPresContext,
|
|||
MOZ_COUNT_CTOR(RuleProcessorData);
|
||||
|
||||
NS_PRECONDITION(aPresContext, "null pointer");
|
||||
NS_ASSERTION(!aContent || aContent->IsContentOfType(nsIContent::eELEMENT),
|
||||
NS_ASSERTION(!aContent || aContent->IsNodeOfType(nsINode::eELEMENT),
|
||||
"non-element leaked into SelectorMatches");
|
||||
|
||||
mPresContext = aPresContext;
|
||||
|
@ -774,7 +774,7 @@ RuleProcessorData::RuleProcessorData(nsPresContext* aPresContext,
|
|||
mHasAttributes = aContent->GetAttrCount() > 0;
|
||||
|
||||
// check for HTMLContent and Link status
|
||||
if (aContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
if (aContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
mIsHTMLContent = PR_TRUE;
|
||||
// Note that we want to treat non-XML HTML content as XHTML for namespace
|
||||
// purposes, since html.css has that namespace declared.
|
||||
|
@ -799,7 +799,7 @@ RuleProcessorData::RuleProcessorData(nsPresContext* aPresContext,
|
|||
// NOTE: optimization: cannot be an XLink if no attributes (since it needs an
|
||||
if(!mIsHTMLLink &&
|
||||
mHasAttributes &&
|
||||
!(mIsHTMLContent || aContent->IsContentOfType(nsIContent::eXUL)) &&
|
||||
!(mIsHTMLContent || aContent->IsNodeOfType(nsINode::eXUL)) &&
|
||||
nsStyleUtil::IsSimpleXlink(aContent, mPresContext, &mLinkState)) {
|
||||
mIsSimpleXLink = PR_TRUE;
|
||||
}
|
||||
|
@ -852,7 +852,7 @@ const nsString* RuleProcessorData::GetLang()
|
|||
nsAutoString value;
|
||||
PRBool hasAttr = content->GetAttr(kNameSpaceID_XML, nsHTMLAtoms::lang,
|
||||
value);
|
||||
if (!hasAttr && content->IsContentOfType(nsIContent::eHTML)) {
|
||||
if (!hasAttr && content->IsNodeOfType(nsINode::eHTML)) {
|
||||
hasAttr = content->GetAttr(kNameSpaceID_None, nsHTMLAtoms::lang,
|
||||
value);
|
||||
}
|
||||
|
@ -924,10 +924,10 @@ static PRBool IsSignificantChild(nsIContent* aChild, PRBool aTextIsSignificant,
|
|||
NS_ASSERTION(!aWhitespaceIsSignificant || aTextIsSignificant,
|
||||
"Nonsensical arguments");
|
||||
|
||||
PRBool isText = aChild->IsContentOfType(nsIContent::eTEXT);
|
||||
PRBool isText = aChild->IsNodeOfType(nsINode::eTEXT);
|
||||
|
||||
if (!isText && !aChild->IsContentOfType(nsIContent::eCOMMENT) &&
|
||||
!aChild->IsContentOfType(nsIContent::ePROCESSING_INSTRUCTION)) {
|
||||
if (!isText && !aChild->IsNodeOfType(nsINode::eCOMMENT) &&
|
||||
!aChild->IsNodeOfType(nsINode::ePROCESSING_INSTRUCTION)) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
|
@ -1106,7 +1106,7 @@ static PRBool SelectorMatches(RuleProcessorData &data,
|
|||
if (element) {
|
||||
do {
|
||||
child = element->GetChildAt(++index);
|
||||
if (child && child->IsContentOfType(nsIContent::eHTML) &&
|
||||
if (child && child->IsNodeOfType(nsINode::eHTML) &&
|
||||
child->Tag() == nsHTMLAtoms::param &&
|
||||
child->AttrValueIs(kNameSpaceID_None, nsHTMLAtoms::name,
|
||||
NS_LITERAL_STRING("pluginurl"), eIgnoreCase)) {
|
||||
|
@ -1492,7 +1492,7 @@ static PRBool SelectorMatchesTree(RuleProcessorData& aPrevData,
|
|||
PRInt32 index = parent->IndexOf(content);
|
||||
while (0 <= --index) {
|
||||
content = parent->GetChildAt(index);
|
||||
if (content->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
if (content->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
data = new (prevdata->mPresContext)
|
||||
RuleProcessorData(prevdata->mPresContext, content,
|
||||
prevdata->mRuleWalker,
|
||||
|
@ -1579,7 +1579,7 @@ static void ContentEnumFunc(nsICSSStyleRule* aRule, nsCSSSelector* aSelector,
|
|||
NS_IMETHODIMP
|
||||
nsCSSRuleProcessor::RulesMatching(ElementRuleProcessorData *aData)
|
||||
{
|
||||
NS_PRECONDITION(aData->mContent->IsContentOfType(nsIContent::eELEMENT),
|
||||
NS_PRECONDITION(aData->mContent->IsNodeOfType(nsINode::eELEMENT),
|
||||
"content must be element");
|
||||
|
||||
RuleCascadeData* cascade = GetRuleCascade(aData->mPresContext);
|
||||
|
@ -1644,7 +1644,7 @@ NS_IMETHODIMP
|
|||
nsCSSRuleProcessor::RulesMatching(PseudoRuleProcessorData* aData)
|
||||
{
|
||||
NS_PRECONDITION(!aData->mContent ||
|
||||
aData->mContent->IsContentOfType(nsIContent::eELEMENT),
|
||||
aData->mContent->IsNodeOfType(nsINode::eELEMENT),
|
||||
"content (if present) must be element");
|
||||
|
||||
RuleCascadeData* cascade = GetRuleCascade(aData->mPresContext);
|
||||
|
@ -1695,7 +1695,7 @@ NS_IMETHODIMP
|
|||
nsCSSRuleProcessor::HasStateDependentStyle(StateRuleProcessorData* aData,
|
||||
nsReStyleHint* aResult)
|
||||
{
|
||||
NS_PRECONDITION(aData->mContent->IsContentOfType(nsIContent::eELEMENT),
|
||||
NS_PRECONDITION(aData->mContent->IsNodeOfType(nsINode::eELEMENT),
|
||||
"content must be element");
|
||||
|
||||
RuleCascadeData* cascade = GetRuleCascade(aData->mPresContext);
|
||||
|
@ -1749,7 +1749,7 @@ NS_IMETHODIMP
|
|||
nsCSSRuleProcessor::HasAttributeDependentStyle(AttributeRuleProcessorData* aData,
|
||||
nsReStyleHint* aResult)
|
||||
{
|
||||
NS_PRECONDITION(aData->mContent->IsContentOfType(nsIContent::eELEMENT),
|
||||
NS_PRECONDITION(aData->mContent->IsNodeOfType(nsINode::eELEMENT),
|
||||
"content must be element");
|
||||
|
||||
AttributeEnumData data(aData);
|
||||
|
|
|
@ -57,7 +57,7 @@ nsDOMCSSAttributeDeclaration::nsDOMCSSAttributeDeclaration(nsIContent *aContent)
|
|||
|
||||
// This reference is not reference-counted. The content
|
||||
// object tells us when its about to go away.
|
||||
NS_ASSERTION(aContent && aContent->IsContentOfType(nsIContent::eELEMENT),
|
||||
NS_ASSERTION(aContent && aContent->IsNodeOfType(nsINode::eELEMENT),
|
||||
"Inline style for non-element content?");
|
||||
mContent = aContent;
|
||||
}
|
||||
|
|
|
@ -508,7 +508,7 @@ nsHTMLStyleSheet::HasAttributeDependentStyle(AttributeRuleProcessorData* aData,
|
|||
if (aData->mAttribute == nsHTMLAtoms::href &&
|
||||
(mLinkRule || mVisitedRule || mActiveRule) &&
|
||||
content &&
|
||||
content->IsContentOfType(nsIContent::eHTML) &&
|
||||
content->IsNodeOfType(nsINode::eHTML) &&
|
||||
aData->mContentTag == nsHTMLAtoms::a) {
|
||||
*aResult = eReStyle_Self;
|
||||
return NS_OK;
|
||||
|
|
|
@ -174,7 +174,7 @@ nsInspectorCSSUtils::GetStyleContextForContent(nsIContent* aContent,
|
|||
|
||||
nsStyleSet *styleSet = aPresShell->StyleSet();
|
||||
|
||||
if (!aContent->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
if (!aContent->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
NS_ASSERTION(!aPseudo, "Shouldn't have a pseudo for a non-element!");
|
||||
return styleSet->ResolveStyleForNonElement(parentContext);
|
||||
}
|
||||
|
|
|
@ -574,7 +574,7 @@ nsStyleSet::ResolveStyleFor(nsIContent* aContent,
|
|||
nsPresContext* presContext = PresContext();
|
||||
|
||||
NS_ASSERTION(aContent, "must have content");
|
||||
NS_ASSERTION(aContent->IsContentOfType(nsIContent::eELEMENT),
|
||||
NS_ASSERTION(aContent->IsNodeOfType(nsINode::eELEMENT),
|
||||
"content must be element");
|
||||
|
||||
if (aContent && presContext) {
|
||||
|
@ -644,7 +644,7 @@ nsStyleSet::ResolvePseudoStyleFor(nsIContent* aParentContent,
|
|||
|
||||
NS_ASSERTION(aPseudoTag, "must have pseudo tag");
|
||||
NS_ASSERTION(!aParentContent ||
|
||||
aParentContent->IsContentOfType(nsIContent::eELEMENT),
|
||||
aParentContent->IsNodeOfType(nsINode::eELEMENT),
|
||||
"content (if non-null) must be element");
|
||||
NS_ASSERTION(aParentContent ||
|
||||
nsCSSAnonBoxes::IsAnonBox(aPseudoTag),
|
||||
|
@ -687,7 +687,7 @@ nsStyleSet::ProbePseudoStyleFor(nsIContent* aParentContent,
|
|||
|
||||
NS_ASSERTION(aPseudoTag, "must have pseudo tag");
|
||||
NS_ASSERTION(aParentContent &&
|
||||
aParentContent->IsContentOfType(nsIContent::eELEMENT),
|
||||
aParentContent->IsNodeOfType(nsINode::eELEMENT),
|
||||
"aParentContent must be element");
|
||||
//NS_ASSERTION(nsCSSPseudoElements::IsPseudoElement(aPseudoTag),
|
||||
// "aPseudoTag must be a pseudo-element");
|
||||
|
@ -857,7 +857,7 @@ nsStyleSet::HasStateDependentStyle(nsPresContext* aPresContext,
|
|||
{
|
||||
nsReStyleHint result = nsReStyleHint(0);
|
||||
|
||||
if (aContent->IsContentOfType(nsIContent::eELEMENT) &&
|
||||
if (aContent->IsNodeOfType(nsINode::eELEMENT) &&
|
||||
(mRuleProcessors[eAgentSheet] ||
|
||||
mRuleProcessors[ePresHintSheet] ||
|
||||
mRuleProcessors[eUserSheet] ||
|
||||
|
@ -901,7 +901,7 @@ nsStyleSet::HasAttributeDependentStyle(nsPresContext* aPresContext,
|
|||
{
|
||||
nsReStyleHint result = nsReStyleHint(0);
|
||||
|
||||
if (aContent->IsContentOfType(nsIContent::eELEMENT) &&
|
||||
if (aContent->IsNodeOfType(nsINode::eELEMENT) &&
|
||||
(mRuleProcessors[eAgentSheet] ||
|
||||
mRuleProcessors[ePresHintSheet] ||
|
||||
mRuleProcessors[eUserSheet] ||
|
||||
|
|
|
@ -948,7 +948,7 @@ nsIBox::AddCSSPrefSize(nsBoxLayoutState& aState, nsIBox* aBox, nsSize& aSize)
|
|||
// ignore 'height' and 'width' attributes if the actual element is not XUL
|
||||
// For example, we might be magic XUL frames whose primary content is an HTML
|
||||
// <select>
|
||||
if (content && content->IsContentOfType(nsIContent::eXUL)) {
|
||||
if (content && content->IsNodeOfType(nsINode::eXUL)) {
|
||||
nsPresContext* presContext = aState.PresContext();
|
||||
|
||||
nsAutoString value;
|
||||
|
|
|
@ -2127,7 +2127,7 @@ nsBoxFrame::CreateViewForFrame(nsPresContext* aPresContext,
|
|||
// at whether the frame has any child frames
|
||||
nsIContent* content = aFrame->GetContent();
|
||||
|
||||
if (content && content->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
if (content && content->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
// The view needs to be visible, but marked as having transparent
|
||||
// content
|
||||
viewHasTransparentContent = PR_TRUE;
|
||||
|
|
|
@ -805,7 +805,7 @@ nsListBoxBodyFrame::ComputeIntrinsicWidth(nsBoxLayoutState& aBoxLayoutState)
|
|||
nsCOMPtr<nsITextContent> text =
|
||||
do_QueryInterface(child->GetChildAt(j));
|
||||
|
||||
if (text && text->IsContentOfType(nsIContent::eTEXT)) {
|
||||
if (text && text->IsNodeOfType(nsINode::eTEXT)) {
|
||||
text->AppendTextTo(value);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -225,7 +225,7 @@ nsTreeBodyFrame::GetMinSize(nsBoxLayoutState& aBoxLayoutState, nsSize& aSize)
|
|||
|
||||
PRInt32 desiredRows;
|
||||
if (baseElement->Tag() == nsHTMLAtoms::select &&
|
||||
baseElement->IsContentOfType(nsIContent::eHTML)) {
|
||||
baseElement->IsNodeOfType(nsINode::eHTML)) {
|
||||
aSize.width = CalcMaxRowWidth();
|
||||
nsAutoString size;
|
||||
baseElement->GetAttr(kNameSpaceID_None, nsHTMLAtoms::size, size);
|
||||
|
@ -1468,7 +1468,7 @@ nsTreeBodyFrame::MarkDirtyIfSelect()
|
|||
nsIContent* baseElement = GetBaseElement();
|
||||
|
||||
if (baseElement->Tag() == nsHTMLAtoms::select &&
|
||||
baseElement->IsContentOfType(nsIContent::eHTML)) {
|
||||
baseElement->IsNodeOfType(nsINode::eHTML)) {
|
||||
// If we are an intrinsically sized select widget, we may need to
|
||||
// resize, if the widest item was removed or a new item was added.
|
||||
// XXX optimize this more
|
||||
|
@ -3872,7 +3872,7 @@ nsTreeBodyFrame::GetBaseElement()
|
|||
|
||||
if (ni->Equals(nsXULAtoms::tree, kNameSpaceID_XUL) ||
|
||||
(ni->Equals(nsHTMLAtoms::select) &&
|
||||
parent->IsContentOfType(nsIContent::eHTML))) {
|
||||
parent->IsNodeOfType(nsINode::eHTML))) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ static void FindBodyElement(nsIContent* aParent, nsIContent** aResult)
|
|||
NS_ADDREF(*aResult);
|
||||
break;
|
||||
}
|
||||
else if (content->IsContentOfType(nsIContent::eELEMENT) &&
|
||||
else if (content->IsNodeOfType(nsINode::eELEMENT) &&
|
||||
!ni->Equals(nsXULAtoms::_template, kNameSpaceID_XUL)) {
|
||||
FindBodyElement(content, aResult);
|
||||
if (*aResult)
|
||||
|
|
|
@ -507,18 +507,18 @@ nsTreeContentView::GetCellText(PRInt32 aRow, nsITreeColumn* aCol, nsAString& _re
|
|||
|
||||
nsIAtom *rowTag = row->mContent->Tag();
|
||||
if (rowTag == nsHTMLAtoms::option &&
|
||||
row->mContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
row->mContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
// Use the text node child as the label
|
||||
nsCOMPtr<nsIDOMHTMLOptionElement> elem = do_QueryInterface(row->mContent);
|
||||
elem->GetText(_retval);
|
||||
}
|
||||
else if (rowTag == nsHTMLAtoms::optgroup &&
|
||||
row->mContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
row->mContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
nsCOMPtr<nsIDOMHTMLOptGroupElement> elem = do_QueryInterface(row->mContent);
|
||||
elem->GetLabel(_retval);
|
||||
}
|
||||
else if (rowTag == nsXULAtoms::treeitem &&
|
||||
row->mContent->IsContentOfType(nsIContent::eXUL)) {
|
||||
row->mContent->IsNodeOfType(nsINode::eXUL)) {
|
||||
nsCOMPtr<nsIContent> realRow;
|
||||
nsTreeUtils::GetImmediateChild(row->mContent, nsXULAtoms::treerow,
|
||||
getter_AddRefs(realRow));
|
||||
|
@ -576,7 +576,7 @@ nsTreeContentView::ToggleOpenState(PRInt32 aIndex)
|
|||
Row* row = (Row*)mRows[aIndex];
|
||||
|
||||
if (row->mContent->Tag() == nsHTMLAtoms::optgroup &&
|
||||
row->mContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
row->mContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
// we don't use an attribute for optgroup's open state
|
||||
if (row->IsOpen())
|
||||
CloseContainer(aIndex);
|
||||
|
@ -727,7 +727,7 @@ nsTreeContentView::ContentStatesChanged(nsIDocument* aDocument,
|
|||
PRInt32 aStateMask)
|
||||
{
|
||||
if (!aContent1 || !mSelection ||
|
||||
!aContent1->IsContentOfType(nsIContent::eHTML) ||
|
||||
!aContent1->IsNodeOfType(nsINode::eHTML) ||
|
||||
!(aStateMask & NS_EVENT_STATE_CHECKED))
|
||||
return;
|
||||
|
||||
|
@ -750,7 +750,7 @@ nsTreeContentView::AttributeChanged(nsIDocument *aDocument,
|
|||
// First check the tag to see if it's one that we care about.
|
||||
nsIAtom *tag = aContent->Tag();
|
||||
|
||||
if (aContent->IsContentOfType(nsIContent::eXUL)) {
|
||||
if (aContent->IsNodeOfType(nsINode::eXUL)) {
|
||||
if (tag != nsXULAtoms::treecol &&
|
||||
tag != nsXULAtoms::treeitem &&
|
||||
tag != nsXULAtoms::treeseparator &&
|
||||
|
@ -909,12 +909,12 @@ nsTreeContentView::ContentInserted(nsIDocument *aDocument,
|
|||
// First check the tag to see if it's one that we care about.
|
||||
nsIAtom *childTag = aChild->Tag();
|
||||
|
||||
if (aChild->IsContentOfType(nsIContent::eHTML)) {
|
||||
if (aChild->IsNodeOfType(nsINode::eHTML)) {
|
||||
if (childTag != nsHTMLAtoms::option &&
|
||||
childTag != nsHTMLAtoms::optgroup)
|
||||
return;
|
||||
}
|
||||
else if (aChild->IsContentOfType(nsIContent::eXUL)) {
|
||||
else if (aChild->IsNodeOfType(nsINode::eXUL)) {
|
||||
if (childTag != nsXULAtoms::treeitem &&
|
||||
childTag != nsXULAtoms::treeseparator &&
|
||||
childTag != nsXULAtoms::treechildren &&
|
||||
|
@ -933,8 +933,8 @@ nsTreeContentView::ContentInserted(nsIDocument *aDocument,
|
|||
if (!element)
|
||||
return; // this is not for us
|
||||
nsIAtom *parentTag = element->Tag();
|
||||
if ((element->IsContentOfType(nsIContent::eXUL) && parentTag == nsXULAtoms::tree) ||
|
||||
(element->IsContentOfType(nsIContent::eHTML) && parentTag == nsHTMLAtoms::select))
|
||||
if ((element->IsNodeOfType(nsINode::eXUL) && parentTag == nsXULAtoms::tree) ||
|
||||
(element->IsNodeOfType(nsINode::eHTML) && parentTag == nsHTMLAtoms::select))
|
||||
return; // this is not for us
|
||||
}
|
||||
|
||||
|
@ -992,12 +992,12 @@ nsTreeContentView::ContentRemoved(nsIDocument *aDocument,
|
|||
// First check the tag to see if it's one that we care about.
|
||||
nsIAtom *tag = aChild->Tag();
|
||||
|
||||
if (aChild->IsContentOfType(nsIContent::eHTML)) {
|
||||
if (aChild->IsNodeOfType(nsINode::eHTML)) {
|
||||
if (tag != nsHTMLAtoms::option &&
|
||||
tag != nsHTMLAtoms::optgroup)
|
||||
return;
|
||||
}
|
||||
else if (aChild->IsContentOfType(nsIContent::eXUL)) {
|
||||
else if (aChild->IsNodeOfType(nsINode::eXUL)) {
|
||||
if (tag != nsXULAtoms::treeitem &&
|
||||
tag != nsXULAtoms::treeseparator &&
|
||||
tag != nsXULAtoms::treechildren &&
|
||||
|
@ -1016,8 +1016,8 @@ nsTreeContentView::ContentRemoved(nsIDocument *aDocument,
|
|||
if (!element)
|
||||
return; // this is not for us
|
||||
nsIAtom *parentTag = element->Tag();
|
||||
if ((element->IsContentOfType(nsIContent::eXUL) && parentTag == nsXULAtoms::tree) ||
|
||||
(element->IsContentOfType(nsIContent::eHTML) && parentTag == nsHTMLAtoms::select))
|
||||
if ((element->IsNodeOfType(nsINode::eXUL) && parentTag == nsXULAtoms::tree) ||
|
||||
(element->IsNodeOfType(nsINode::eHTML) && parentTag == nsHTMLAtoms::select))
|
||||
return; // this is not for us
|
||||
}
|
||||
|
||||
|
@ -1084,13 +1084,13 @@ nsTreeContentView::Serialize(nsIContent* aContent, PRInt32 aParentIndex, PRInt32
|
|||
nsIAtom *tag = content->Tag();
|
||||
PRInt32 count = aRows.Count();
|
||||
|
||||
if (content->IsContentOfType(nsIContent::eXUL)) {
|
||||
if (content->IsNodeOfType(nsINode::eXUL)) {
|
||||
if (tag == nsXULAtoms::treeitem)
|
||||
SerializeItem(content, aParentIndex, aIndex, aRows);
|
||||
else if (tag == nsXULAtoms::treeseparator)
|
||||
SerializeSeparator(content, aParentIndex, aIndex, aRows);
|
||||
}
|
||||
else if (content->IsContentOfType(nsIContent::eHTML)) {
|
||||
else if (content->IsNodeOfType(nsINode::eHTML)) {
|
||||
if (tag == nsHTMLAtoms::option)
|
||||
SerializeOption(content, aParentIndex, aIndex, aRows);
|
||||
else if (tag == nsHTMLAtoms::optgroup)
|
||||
|
@ -1198,7 +1198,7 @@ nsTreeContentView::GetIndexInSubtree(nsIContent* aContainer,
|
|||
|
||||
nsIAtom *tag = content->Tag();
|
||||
|
||||
if (content->IsContentOfType(nsIContent::eXUL)) {
|
||||
if (content->IsNodeOfType(nsINode::eXUL)) {
|
||||
if (tag == nsXULAtoms::treeitem) {
|
||||
if (! content->AttrValueIs(kNameSpaceID_None, nsHTMLAtoms::hidden,
|
||||
nsXULAtoms::_true, eCaseMatters)) {
|
||||
|
@ -1221,7 +1221,7 @@ nsTreeContentView::GetIndexInSubtree(nsIContent* aContainer,
|
|||
(*aIndex)++;
|
||||
}
|
||||
}
|
||||
else if (content->IsContentOfType(nsIContent::eHTML)) {
|
||||
else if (content->IsNodeOfType(nsINode::eHTML)) {
|
||||
if (tag == nsHTMLAtoms::optgroup) {
|
||||
(*aIndex)++;
|
||||
GetIndexInSubtree(content, aContent, aIndex);
|
||||
|
@ -1292,8 +1292,8 @@ nsTreeContentView::InsertRowFor(nsIContent* aParent, nsIContent* aChild)
|
|||
nsCOMPtr<nsIContent> grandParent = aParent->GetParent();
|
||||
nsIAtom* grandParentTag = grandParent->Tag();
|
||||
|
||||
if ((grandParent->IsContentOfType(nsIContent::eXUL) && grandParentTag == nsXULAtoms::tree) ||
|
||||
(grandParent->IsContentOfType(nsIContent::eHTML) && grandParentTag == nsHTMLAtoms::select)
|
||||
if ((grandParent->IsNodeOfType(nsINode::eXUL) && grandParentTag == nsXULAtoms::tree) ||
|
||||
(grandParent->IsNodeOfType(nsINode::eHTML) && grandParentTag == nsHTMLAtoms::select)
|
||||
) {
|
||||
// Allow insertion to the outermost container.
|
||||
insertRow = PR_TRUE;
|
||||
|
@ -1326,13 +1326,13 @@ nsTreeContentView::InsertRow(PRInt32 aParentIndex, PRInt32 aIndex, nsIContent* a
|
|||
{
|
||||
nsAutoVoidArray rows;
|
||||
nsIAtom *tag = aContent->Tag();
|
||||
if (aContent->IsContentOfType(nsIContent::eXUL)) {
|
||||
if (aContent->IsNodeOfType(nsINode::eXUL)) {
|
||||
if (tag == nsXULAtoms::treeitem)
|
||||
SerializeItem(aContent, aParentIndex, &aIndex, rows);
|
||||
else if (tag == nsXULAtoms::treeseparator)
|
||||
SerializeSeparator(aContent, aParentIndex, &aIndex, rows);
|
||||
}
|
||||
else if (aContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
else if (aContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
if (tag == nsHTMLAtoms::option)
|
||||
SerializeOption(aContent, aParentIndex, &aIndex, rows);
|
||||
else if (tag == nsHTMLAtoms::optgroup)
|
||||
|
|
|
@ -689,7 +689,7 @@ nsTypeAheadFind::RangeStartsInsideLink(nsIDOMRange *aRange,
|
|||
}
|
||||
origContent = startContent;
|
||||
|
||||
if (startContent->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
if (startContent->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
nsIContent *childContent = startContent->GetChildAt(startOffset);
|
||||
if (childContent) {
|
||||
startContent = childContent;
|
||||
|
@ -724,7 +724,7 @@ nsTypeAheadFind::RangeStartsInsideLink(nsIDOMRange *aRange,
|
|||
// Keep testing while textContent is equal to something,
|
||||
// eventually we'll run out of ancestors
|
||||
|
||||
if (startContent->IsContentOfType(nsIContent::eHTML)) {
|
||||
if (startContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
nsCOMPtr<nsILink> link(do_QueryInterface(startContent));
|
||||
if (link) {
|
||||
// Check to see if inside HTML link
|
||||
|
|
|
@ -404,7 +404,7 @@ nsMenuBarX::MenuConstruct(const nsMenuEvent & aMenuEvent, nsIWidget* aParentWind
|
|||
nsIContent *menu = mMenuBarContent->GetChildAt(i);
|
||||
if (menu) {
|
||||
if (menu->Tag() == nsWidgetAtoms::menu &&
|
||||
menu->IsContentOfType(nsIContent::eXUL)) {
|
||||
menu->IsNodeOfType(nsINode::eXUL)) {
|
||||
nsAutoString menuName;
|
||||
nsAutoString menuAccessKey(NS_LITERAL_STRING(" "));
|
||||
menu->GetAttr(kNameSpaceID_None, nsWidgetAtoms::label, menuName);
|
||||
|
|
|
@ -189,7 +189,7 @@ nsNativeThemeGTK::GetGtkWidgetAndState(PRUint8 aWidgetType, nsIFrame* aFrame,
|
|||
|
||||
nsIAtom* atom = nsnull;
|
||||
nsIContent *content = aFrame->GetContent();
|
||||
if (content->IsContentOfType(nsIContent::eXUL)) {
|
||||
if (content->IsNodeOfType(nsINode::eXUL)) {
|
||||
if (aWidgetType == NS_THEME_CHECKBOX_LABEL ||
|
||||
aWidgetType == NS_THEME_RADIO_LABEL) {
|
||||
// Adjust stateFrame so GetContentState finds the correct state.
|
||||
|
@ -722,7 +722,7 @@ nsNativeThemeGTK::ThemeSupportsWidget(nsPresContext* aPresContext,
|
|||
{
|
||||
if (aFrame) {
|
||||
// For now don't support HTML.
|
||||
if (aFrame->GetContent()->IsContentOfType(nsIContent::eHTML))
|
||||
if (aFrame->GetContent()->IsNodeOfType(nsINode::eHTML))
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -195,7 +195,7 @@ nsNativeThemeGTK::GetGtkWidgetAndState(PRUint8 aWidgetType, nsIFrame* aFrame,
|
|||
|
||||
nsIAtom* atom = nsnull;
|
||||
nsIContent *content = aFrame->GetContent();
|
||||
if (content->IsContentOfType(nsIContent::eXUL)) {
|
||||
if (content->IsNodeOfType(nsINode::eXUL)) {
|
||||
if (aWidgetType == NS_THEME_CHECKBOX_LABEL ||
|
||||
aWidgetType == NS_THEME_RADIO_LABEL) {
|
||||
// Adjust stateFrame so GetContentState finds the correct state.
|
||||
|
@ -900,7 +900,7 @@ nsNativeThemeGTK::ThemeSupportsWidget(nsPresContext* aPresContext,
|
|||
PRUint8 aWidgetType)
|
||||
{
|
||||
if (aFrame) {
|
||||
if (aFrame->GetContent()->IsContentOfType(nsIContent::eHTML))
|
||||
if (aFrame->GetContent()->IsNodeOfType(nsINode::eHTML))
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -166,7 +166,7 @@ nsDragService::ComputeGlobalRectFromFrame ( nsIDOMNode* aDOMNode, Rect & outScre
|
|||
#if USE_TRANSLUCENT_DRAGGING && defined(MOZ_XUL)
|
||||
// until bug 41237 is fixed, only do translucent dragging if the drag is in
|
||||
// the chrome or it's a link.
|
||||
if (!content || !content->IsContentOfType(nsIContent::eXUL)) {
|
||||
if (!content || !content->IsNodeOfType(nsINode::eXUL)) {
|
||||
// the link node is the parent of the node we have (which is probably text or image).
|
||||
nsCOMPtr<nsIDOMNode> parent;
|
||||
aDOMNode->GetParentNode ( getter_AddRefs(parent) );
|
||||
|
|
|
@ -425,7 +425,7 @@ nsMenuBarX::MenuConstruct( const nsMenuEvent & aMenuEvent, nsIWidget* aParentWin
|
|||
nsIContent *menu = mMenuBarContent->GetChildAt(i);
|
||||
if ( menu ) {
|
||||
if (menu->Tag() == nsWidgetAtoms::menu &&
|
||||
menu->IsContentOfType(nsIContent::eXUL)) {
|
||||
menu->IsNodeOfType(nsINode::eXUL)) {
|
||||
nsAutoString menuName;
|
||||
nsAutoString menuAccessKey(NS_LITERAL_STRING(" "));
|
||||
menu->GetAttr(kNameSpaceID_None, nsWidgetAtoms::label, menuName);
|
||||
|
|
|
@ -788,7 +788,7 @@ nsNativeThemeMac::ThemeSupportsWidget(nsPresContext* aPresContext, nsIFrame* aFr
|
|||
{
|
||||
#ifndef MOZ_WIDGET_COCOA
|
||||
// Only support HTML widgets for Cocoa
|
||||
if (aFrame && aFrame->GetContent()->IsContentOfType(nsIContent::eHTML))
|
||||
if (aFrame && aFrame->GetContent()->IsNodeOfType(nsINode::eHTML))
|
||||
return PR_FALSE;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -387,7 +387,7 @@ nsNativeThemeWin::GetThemePartAndState(nsIFrame* aFrame, PRUint8 aWidgetType,
|
|||
|
||||
// XXXdwh This check will need to be more complicated, since HTML radio groups
|
||||
// use checked, but XUL radio groups use selected. There will need to be an
|
||||
// IsContentOfType test for HTML vs. XUL here.
|
||||
// IsNodeOfType test for HTML vs. XUL here.
|
||||
nsIAtom* atom = (aWidgetType == NS_THEME_CHECKBOX) ? mCheckedAtom : mSelectedAtom;
|
||||
|
||||
PRBool isHTML = PR_FALSE;
|
||||
|
@ -400,7 +400,7 @@ nsNativeThemeWin::GetThemePartAndState(nsIFrame* aFrame, PRUint8 aWidgetType,
|
|||
// For XUL checkboxes and radio buttons, the state of the parent
|
||||
// determines our state.
|
||||
nsIContent* content = aFrame->GetContent();
|
||||
PRBool isXULCheckboxRadio = content->IsContentOfType(nsIContent::eXUL);
|
||||
PRBool isXULCheckboxRadio = content->IsNodeOfType(nsINode::eXUL);
|
||||
if (!isXULCheckboxRadio) {
|
||||
// Attempt a QI.
|
||||
nsCOMPtr<nsIDOMHTMLInputElement> inputElt(do_QueryInterface(content));
|
||||
|
@ -696,7 +696,7 @@ nsNativeThemeWin::GetThemePartAndState(nsIFrame* aFrame, PRUint8 aWidgetType,
|
|||
|
||||
nsIFrame* parentFrame = aFrame->GetParent();
|
||||
nsCOMPtr<nsIMenuFrame> menuFrame(do_QueryInterface(parentFrame));
|
||||
if (menuFrame || (content && content->IsContentOfType(nsIContent::eHTML)) )
|
||||
if (menuFrame || (content && content->IsNodeOfType(nsINode::eHTML)) )
|
||||
// XUL menu lists and HTML selects get state from parent
|
||||
aFrame = parentFrame;
|
||||
|
||||
|
@ -852,7 +852,7 @@ nsNativeThemeWin::DrawWidgetBackground(nsIRenderingContext* aContext,
|
|||
// Draw focus rectangles for XP HTML checkboxes and radio buttons
|
||||
// XXX it'd be nice to draw these outside of the frame
|
||||
if ((aWidgetType == NS_THEME_CHECKBOX || aWidgetType == NS_THEME_RADIO)
|
||||
&& aFrame->GetContent()->IsContentOfType(nsIContent::eHTML)) {
|
||||
&& aFrame->GetContent()->IsNodeOfType(nsINode::eHTML)) {
|
||||
PRInt32 contentState ;
|
||||
contentState = GetContentState(aFrame, aWidgetType);
|
||||
|
||||
|
@ -953,7 +953,7 @@ nsNativeThemeWin::GetWidgetBorder(nsIDeviceContext* aContext,
|
|||
|
||||
if (aFrame && aWidgetType == NS_THEME_TEXTFIELD) {
|
||||
nsIContent* content = aFrame->GetContent();
|
||||
if (content && content->IsContentOfType(nsIContent::eHTML)) {
|
||||
if (content && content->IsNodeOfType(nsINode::eHTML)) {
|
||||
// We need to pad textfields by 1 pixel, since the caret will draw
|
||||
// flush against the edge by default if we don't.
|
||||
aResult->top++;
|
||||
|
@ -1423,7 +1423,7 @@ nsresult nsNativeThemeWin::ClassicGetThemePartAndState(nsIFrame* aFrame, PRUint8
|
|||
// The down state is flat if the button is focusable
|
||||
if (uiData->mUserFocus == NS_STYLE_USER_FOCUS_NORMAL) {
|
||||
#ifndef WINCE
|
||||
if (!aFrame->GetContent()->IsContentOfType(nsIContent::eHTML))
|
||||
if (!aFrame->GetContent()->IsNodeOfType(nsINode::eHTML))
|
||||
aState |= DFCS_FLAT;
|
||||
#endif
|
||||
aFocused = PR_TRUE;
|
||||
|
@ -1447,7 +1447,7 @@ nsresult nsNativeThemeWin::ClassicGetThemePartAndState(nsIFrame* aFrame, PRUint8
|
|||
aState = (aWidgetType == NS_THEME_CHECKBOX) ? DFCS_BUTTONCHECK : DFCS_BUTTONRADIO;
|
||||
nsIContent* content = aFrame->GetContent();
|
||||
|
||||
if (content->IsContentOfType(nsIContent::eXUL)) {
|
||||
if (content->IsNodeOfType(nsINode::eXUL)) {
|
||||
// XUL
|
||||
if (aWidgetType == NS_THEME_CHECKBOX) {
|
||||
if (IsChecked(aFrame))
|
||||
|
@ -1566,7 +1566,7 @@ nsresult nsNativeThemeWin::ClassicGetThemePartAndState(nsIFrame* aFrame, PRUint8
|
|||
nsIContent* content = aFrame->GetContent();
|
||||
nsIFrame* parentFrame = aFrame->GetParent();
|
||||
nsCOMPtr<nsIMenuFrame> menuFrame(do_QueryInterface(parentFrame));
|
||||
if (menuFrame || (content && content->IsContentOfType(nsIContent::eHTML)) )
|
||||
if (menuFrame || (content && content->IsNodeOfType(nsINode::eHTML)) )
|
||||
// XUL menu lists and HTML selects get state from parent
|
||||
aFrame = parentFrame;
|
||||
// XXX the button really shouldn't depress when clicking the
|
||||
|
@ -1907,7 +1907,7 @@ nsresult nsNativeThemeWin::ClassicDrawWidgetBackground(nsIRenderingContext* aCon
|
|||
|
||||
// Fill in background
|
||||
if (IsDisabled(aFrame) ||
|
||||
(aFrame->GetContent()->IsContentOfType(nsIContent::eXUL) &&
|
||||
(aFrame->GetContent()->IsNodeOfType(nsINode::eXUL) &&
|
||||
IsReadOnly(aFrame)))
|
||||
::FillRect(hdc, &widgetRect, (HBRUSH) (COLOR_BTNFACE+1));
|
||||
else
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче